extcon: Add an API to get extcon device from dt node
[firefly-linux-kernel-4.4.55.git] / net / rose / af_rose.c
index 9c834745159786e5e1d4338f51860be00943a0fd..e98fcfbe6007919d6c114708cde848a649bb2e4e 100644 (file)
@@ -202,10 +202,10 @@ static void rose_kill_by_device(struct net_device *dev)
 /*
  *     Handle device status changes.
  */
-static int rose_device_event(struct notifier_block *this, unsigned long event,
-       void *ptr)
+static int rose_device_event(struct notifier_block *this,
+                            unsigned long event, void *ptr)
 {
-       struct net_device *dev = (struct net_device *)ptr;
+       struct net_device *dev = netdev_notifier_info_to_dev(ptr);
 
        if (!net_eq(dev_net(dev), &init_net))
                return NOTIFY_DONE;