• Kay Sievers's avatar
    Driver core: add missing kset uevent · 80f03e34
    Kay Sievers authored
    We get uevents for a bus/class going away, but not one registering.
    Add the missing uevent in kset_register(), which will send an
    event for a new bus/class. Suppress all unwanted uevents for bus
    subdirectories like /bus/*/devices/, /bus/*/drivers/.
    
    Now we get for module usbcore:
      add      /module/usbcore (module)
      add      /bus/usb (bus)
      add      /class/usb_host (class)
      add      /bus/usb/drivers/hub (drivers)
      add      /bus/usb/drivers/usb (drivers)
      remove   /bus/usb/drivers/usb (drivers)
      remove   /bus/usb/drivers/hub (drivers)
      remove   /class/usb_host (class)
      remove   /bus/usb (bus)
      remove   /module/usbcore (module)
    
    instead of:
      add      /module/usbcore (module)
      add      /bus/usb/drivers/hub (drivers)
      add      /bus/usb/drivers/usb (drivers)
      remove   /bus/usb/drivers/usb (drivers)
      remove   /bus/usb/drivers/hub (drivers)
      remove   /class/usb_host (class)
      remove   /bus/usb/drivers (bus)
      remove   /bus/usb/devices (bus)
      remove   /bus/usb (bus)
      remove   /module/usbcore (module)
    Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    80f03e34
kobject.c 14.3 KB