All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] sparc: Implement and wire up vio_hotplug for vio.
@ 2016-04-14 18:14 John Paul Adrian Glaubitz
  2016-04-17 19:29 ` Sam Ravnborg
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: John Paul Adrian Glaubitz @ 2016-04-14 18:14 UTC (permalink / raw)
  To: sparclinux

Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
---
 arch/sparc/kernel/vio.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c
index d705560..f6bb857 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,
-- 
2.8.0.rc3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-05-02  0:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-14 18:14 [PATCH 2/2] sparc: Implement and wire up vio_hotplug for vio John Paul Adrian Glaubitz
2016-04-17 19:29 ` Sam Ravnborg
2016-04-27 20:39 ` David Miller
2016-04-27 21:05 ` John Paul Adrian Glaubitz
2016-04-28  2:00 ` David Miller
2016-04-28  2:07 ` Julian Calaby
2016-04-28  2:10 ` David Miller
2016-04-28  2:30 ` Julian Calaby
2016-04-28  9:13 ` John Paul Adrian Glaubitz
2016-05-01 23:13 ` John Paul Adrian Glaubitz
2016-05-02  0:43 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.