Skip to content

driver core: export MAJOR/MINOR to the hotplug env

Kay Sievers lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7class core: export MAJOR/MINOR to the hotplug envdrivers/base/class.c include/linux/device.h+30 -100 replies
2/7block core: export MAJOR/MINOR to the hotplug envdrivers/block/genhd.c+34 -190 replies
3/7class_simple: pass dev_t to the class coredrivers/base/class_simple.c+2 -190 replies
4/7usb: class driver pass dev_t to the class coredrivers/usb/core/file.c+1 -80 replies
5/7i2c: class driver pass dev_t to the class coredrivers/i2c/i2c-dev.c+1 -80 replies
6/7videodev: pass dev_t to the class coredrivers/media/video/videodev.c+1 -100 replies
7/7inifiniband: pass dev_t to class coredrivers/infiniband/core/user_mad.c+1 -131 reply

Reviews trailers per patch

1 of 7 patches has a Reviewed-by or Acked-by.

PatchRoland Dreier
1/7
2/7
3/7
4/7
5/7
6/7
7/7A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] driver core: export MAJOR/MINOR to the hotplug env

This patch sequence moves the creation of the sysfs "dev" file of the class devices into the driver core. The struct class_device contains a dev_t value now. If set, the driver core will create the "dev" file containing the major/minor numbers automatically.

The MAJOR/MINOR values are also exported to the hotplug environment. This makes it easy for userspace, especially udev to know if it should wait for a "dev" file to create a device node or if it can just ignore the event. We currently carry a compiled in blacklist around for that reason.

It would also be possible to run some "tiny udev" while sysfs is not available - just by reading the hotplug call or the netlink-uevent.

Thanks,
Kay