Skip to content

Commit 5bde2c9

Browse files
glaubitzdavem330
authored andcommitted
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>
1 parent 36128d2 commit 5bde2c9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

arch/sparc/kernel/vio.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ static const struct vio_device_id *vio_match_device(
4545
return NULL;
4646
}
4747

48+
static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)
49+
{
50+
const struct vio_dev *vio_dev = to_vio_dev(dev);
51+
52+
add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type, vio_dev->compat);
53+
return 0;
54+
}
55+
4856
static int vio_bus_match(struct device *dev, struct device_driver *drv)
4957
{
5058
struct vio_dev *vio_dev = to_vio_dev(dev);
@@ -123,6 +131,7 @@ static struct device_attribute vio_dev_attrs[] = {
123131
static struct bus_type vio_bus_type = {
124132
.name = "vio",
125133
.dev_attrs = vio_dev_attrs,
134+
.uevent = vio_hotplug,
126135
.match = vio_bus_match,
127136
.probe = vio_device_probe,
128137
.remove = vio_device_remove,

0 commit comments

Comments
 (0)