@ -265,7 +265,7 @@ static int netdev_trig_notify(struct notifier_block *nb,
struct net_device * dev = netdev_notifier_info_to_dev ( ( struct netdev_notifier_info * ) dv ) ;
struct net_device * dev = netdev_notifier_info_to_dev ( ( struct netdev_notifier_info * ) dv ) ;
struct led_netdev_data * trigger_data = container_of ( nb , struct led_netdev_data , notifier ) ;
struct led_netdev_data * trigger_data = container_of ( nb , struct led_netdev_data , notifier ) ;
if ( evt ! = NETDEV_UP & & evt ! = NETDEV_DOWN & & evt ! = NETDEV_CHANGE & & evt ! = NETDEV_REGISTER & & evt ! = NETDEV_UNREGISTER )
if ( evt ! = NETDEV_UP & & evt ! = NETDEV_DOWN & & evt ! = NETDEV_CHANGE & & evt ! = NETDEV_REGISTER & & evt ! = NETDEV_UNREGISTER & & evt ! = NETDEV_CHANGENAME )
return NOTIFY_DONE ;
return NOTIFY_DONE ;
spin_lock_bh ( & trigger_data - > lock ) ;
spin_lock_bh ( & trigger_data - > lock ) ;
@ -274,9 +274,10 @@ static int netdev_trig_notify(struct notifier_block *nb,
if ( strcmp ( dev - > name , trigger_data - > device_name ) )
if ( strcmp ( dev - > name , trigger_data - > device_name ) )
goto done ;
goto done ;
if ( evt = = NETDEV_REGISTER ) {
if ( evt = = NETDEV_REGISTER | | evt = = NETDEV_CHANGENAME ) {
if ( trigger_data - > net_dev ! = NULL )
if ( trigger_data - > net_dev ! = NULL )
dev_put ( trigger_data - > net_dev ) ;
dev_put ( trigger_data - > net_dev ) ;
dev_hold ( dev ) ;
dev_hold ( dev ) ;
trigger_data - > net_dev = dev ;
trigger_data - > net_dev = dev ;
trigger_data - > link_up = 0 ;
trigger_data - > link_up = 0 ;