2005-01-17 03:35:20

by Jeff Dike

[permalink] [raw]
Subject: [PATCH 3/10] UML - Provide a release method for the ubd driver

Define a release method for the ubd driver so that sysfs doesn't complain
when one is removed.

Signed-off-by: Jeff Dike <[email protected]>

Index: 2.6.10/arch/um/drivers/ubd_kern.c
===================================================================
--- 2.6.10.orig/arch/um/drivers/ubd_kern.c 2005-01-16 13:23:29.000000000 -0500
+++ 2.6.10/arch/um/drivers/ubd_kern.c 2005-01-16 13:23:34.000000000 -0500
@@ -635,6 +635,10 @@
return(err);
}

+static void ubd_device_release(struct device *dev)
+{
+}
+
static int ubd_new_disk(int major, u64 size, int unit,
struct gendisk **disk_out)

@@ -670,6 +674,7 @@
if (major == MAJOR_NR) {
ubd_dev[unit].pdev.id = unit;
ubd_dev[unit].pdev.name = DRIVER_NAME;
+ ubd_dev[unit].pdev.dev.release = ubd_device_release;
platform_device_register(&ubd_dev[unit].pdev);
disk->driverfs_dev = &ubd_dev[unit].pdev.dev;
}