]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/usb/core/usb.c
USB: uevent environment key fix
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 6 Nov 2007 20:01:52 +0000 (15:01 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 28 Nov 2007 21:58:35 +0000 (13:58 -0800)
commit4a9bee8256a2dec26290a3bfff86ab86b8992547
tree8e30db88d70d67d6be81f0b0bdd5e52d618f8ba0
parent7e61559f6199bb387037abfc7d10a893973561fc
USB: uevent environment key fix

This patch (as1010) was written by both Kay Sievers and me.  It solves
the problem of duplicated keys in USB uevent structures by refactoring
the uevent subroutines, taking advantage of the way the hotplug core
calls uevent handlers for the device's bus and for the device's type.
Keys needed for both USB-device and USB-interface events are added in
usb_uevent(), which is the bus handler.  Keys appropriate only for
USB-device or USB-interface events are added in usb_dev_uevent() or
usb_if_uevent() respectively, the type handlers.

In addition, unnecessary tests for NULL pointers are removed as are
duplicated debugging log statements.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/driver.c
drivers/usb/core/message.c
drivers/usb/core/usb.c