diff options
author | Adrian Glaubitz <glaubitz@physik.fu-berlin.de> | 2016-04-14 21:14:42 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-21 23:43:46 +0300 |
commit | 5bde2c9be701c4583f0a9243bd46590ec401bfba (patch) | |
tree | 2a65c18aafcbcd6fdd8c9ebdf76d4b1594a68393 /arch | |
parent | 36128d204b81c099b5779771127a5546eac549c9 (diff) | |
download | linux-5bde2c9be701c4583f0a9243bd46590ec401bfba.tar.xz |
sparc: Implement and wire up vio_hotplug for vio.
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/kernel/vio.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c index d7055609a41c..f6bb857254fc 100644 --- a/arch/sparc/kernel/vio.c +++ b/arch/sparc/kernel/vio.c @@ -45,6 +45,14 @@ static const struct vio_device_id *vio_match_device( return NULL; } +static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env) +{ + const struct vio_dev *vio_dev = to_vio_dev(dev); + + add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type, vio_dev->compat); + return 0; +} + static int vio_bus_match(struct device *dev, struct device_driver *drv) { struct vio_dev *vio_dev = to_vio_dev(dev); @@ -123,6 +131,7 @@ static struct device_attribute vio_dev_attrs[] = { static struct bus_type vio_bus_type = { .name = "vio", .dev_attrs = vio_dev_attrs, + .uevent = vio_hotplug, .match = vio_bus_match, .probe = vio_device_probe, .remove = vio_device_remove, |