Re: [PATCH 4/7] usbnet: remove EVENT_DEV_OPEN flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 13, 2012 at 10:12 AM, Ming Lei <tom.leiming@xxxxxxxxx> wrote:
> On Wed, Jun 13, 2012 at 2:14 AM, Oliver Neukum <oliver@xxxxxxxxxx> wrote:
>> Am Dienstag, 12. Juni 2012, 03:19:42 schrieb Ming Lei:
>>> EVENT_DEV_OPEN is introduced to mark if the interface is opened or
>>> not, but we already have IFF_UP to handle it, so just
>>> remove the flag and use IFF_UP.
>>
>> When is IFF_UP cleared? The flag is tested in usbnet_resume(),
>
> The flag is cleared just after usbnet_stop completes.

Looks we can use the below to replace EVENT_DEV_OPEN:

     (netif_running((dev)->net) && ((dev)->net->flags & IFF_UP))


Thanks,
-- 
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux