From 5509cd3616bf58dd82b62b0e350e09bbc75ccf21 Mon Sep 17 00:00:00 2001 From: Patrick Mochel Date: Wed, 31 Jul 2002 00:08:54 -0700 Subject: driverfs: make device_remove_file take a struct device_attribute *, instead of just a char * (for consistency with device_create_file) --- drivers/base/fs.c | 5 ++--- include/linux/device.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/base/fs.c b/drivers/base/fs.c index 4aa4938461e8..972d9433dcde 100644 --- a/drivers/base/fs.c +++ b/drivers/base/fs.c @@ -42,11 +42,11 @@ int device_create_file(struct device * dev, struct device_attribute * entry) * @name: name of the file * */ -void device_remove_file(struct device * dev, const char * name) +void device_remove_file(struct device * dev, struct device_attribute * attr) { if (dev) { get_device(dev); - driverfs_remove_file(&dev->dir,name); + driverfs_remove_file(&dev->dir,attr->name); put_device(dev); } } @@ -61,7 +61,6 @@ void device_remove_dir(struct device * dev) driverfs_remove_dir(&dev->dir); } - static int get_devpath_length(struct device * dev) { int length = 1; diff --git a/include/linux/device.h b/include/linux/device.h index 38048776fdd8..670be49d1718 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -180,7 +180,7 @@ g_list_to_dev(struct list_head *g_list) extern int device_register(struct device * dev); extern int device_create_file(struct device *device, struct device_attribute * entry); -extern void device_remove_file(struct device * dev, const char * name); +extern void device_remove_file(struct device * dev, struct device_attribute * attr); /* * Platform "fixup" functions - allow the platform to have their say -- cgit v1.2.3