]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
rfkill: allocate static minor
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 24 Oct 2019 17:40:42 +0000 (19:40 +0200)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 04:45:21 +0000 (23:45 -0500)
commit6e9a3f3c0da6fcc59792594b84fc6f68712182e2
tree616f5198c5259497df2448990e81969e83d13523
parentd4727d8d63be146d57288374a7f1b26dd2ffc3a4
rfkill: allocate static minor

BugLink: https://bugs.launchpad.net/bugs/1859712
[ Upstream commit 8670b2b8b029a6650d133486be9d2ace146fd29a ]

udev has a feature of creating /dev/<node> device-nodes if it finds
a devnode:<node> modalias. This allows for auto-loading of modules that
provide the node. This requires to use a statically allocated minor
number for misc character devices.

However, rfkill uses dynamic minor numbers and prevents auto-loading
of the module. So allocate the next static misc minor number and use
it for rfkill.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Link: https://lore.kernel.org/r/20191024174042.19851-1-marcel@holtmann.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
include/linux/miscdevice.h
net/rfkill/core.c