devices/generic.c
branchstable-1.5
changeset 2632 08aa7305b9ba
parent 2631 827abf3c50de
child 2660 161c675135f0
equal deleted inserted replaced
2599:4b0b906df1b4 2632:08aa7305b9ba
   147 
   147 
   148     dev->ecdev = NULL;
   148     dev->ecdev = NULL;
   149     dev->socket = NULL;
   149     dev->socket = NULL;
   150     dev->rx_buf = NULL;
   150     dev->rx_buf = NULL;
   151 
   151 
       
   152 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
       
   153     dev->netdev = alloc_netdev(sizeof(ec_gen_device_t *), &null,
       
   154             NET_NAME_UNKNOWN, ether_setup);
       
   155 #else
   152     dev->netdev = alloc_netdev(sizeof(ec_gen_device_t *), &null, ether_setup);
   156     dev->netdev = alloc_netdev(sizeof(ec_gen_device_t *), &null, ether_setup);
       
   157 #endif
   153     if (!dev->netdev) {
   158     if (!dev->netdev) {
   154         return -ENOMEM;
   159         return -ENOMEM;
   155     }
   160     }
   156 
   161 
   157 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
   162 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)