1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/linux/isapnp-uevent.patch
3 # Copyright (C) 2024 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 We want our precious isapnp devices to just work TM and auto-load
15 matching modules, too.
17 - Signed-of-by: René Rebe <rene@exactcode.de>
19 --- linux-6.11/drivers/pnp/driver.c.orig 2024-09-15 16:57:56.000000000 +0200
20 +++ linux-6.11/drivers/pnp/driver.c 2024-09-30 21:42:08.664108160 +0200
22 drv->shutdown(pnp_dev);
25 +static int pnp_uevent(const struct device *dev, struct kobj_uevent_env *env)
27 + const struct pnp_dev *pnp_dev = to_pnp_dev(dev);
35 + if (add_uevent_var(env, "MODALIAS=pnp:d%s", pos->id))
43 static int pnp_bus_match(struct device *dev, const struct device_driver *drv)
45 struct pnp_dev *pnp_dev = to_pnp_dev(dev);
47 const struct bus_type pnp_bus_type = {
49 .match = pnp_bus_match,
50 + .uevent = pnp_uevent,
51 .probe = pnp_device_probe,
52 .remove = pnp_device_remove,
53 .shutdown = pnp_device_shutdown,