In an attempt to start to clean up the monstrosity of the sysfs abuse in the gasket driver, let's remove code that is not used at all. The gasket_sysfs_register_show() function is never used, so delete it. Cc: Rob Springer <rspringer@xxxxxxxxxx> Cc: John Joseph <jnjoseph@xxxxxxxxxx> Cc: Ben Chan <benchan@xxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/gasket/gasket_sysfs.c | 38 --------------------------- drivers/staging/gasket/gasket_sysfs.h | 4 --- 2 files changed, 42 deletions(-) diff --git a/drivers/staging/gasket/gasket_sysfs.c b/drivers/staging/gasket/gasket_sysfs.c index 94e55f19b43f..39f9595c85e8 100644 --- a/drivers/staging/gasket/gasket_sysfs.c +++ b/drivers/staging/gasket/gasket_sysfs.c @@ -396,44 +396,6 @@ void gasket_sysfs_put_attr( } EXPORT_SYMBOL(gasket_sysfs_put_attr); -ssize_t gasket_sysfs_register_show( - struct device *device, struct device_attribute *attr, char *buf) -{ - ulong reg_address, reg_bar, reg_value; - struct gasket_sysfs_mapping *mapping; - struct gasket_dev *gasket_dev; - struct gasket_sysfs_attribute *gasket_attr; - - mapping = get_mapping(device); - if (!mapping) { - gasket_nodev_info("Device driver may have been removed."); - return 0; - } - - gasket_dev = mapping->gasket_dev; - if (!gasket_dev) { - gasket_nodev_error( - "No sysfs mapping found for device 0x%p", device); - put_mapping(mapping); - return 0; - } - - gasket_attr = gasket_sysfs_get_attr(device, attr); - if (!gasket_attr) { - put_mapping(mapping); - return 0; - } - - reg_address = gasket_attr->data.bar_address.offset; - reg_bar = gasket_attr->data.bar_address.bar; - reg_value = gasket_dev_read_64(gasket_dev, reg_bar, reg_address); - - gasket_sysfs_put_attr(device, gasket_attr); - put_mapping(mapping); - return snprintf(buf, PAGE_SIZE, "0x%lX\n", reg_value); -} -EXPORT_SYMBOL(gasket_sysfs_register_show); - ssize_t gasket_sysfs_register_store( struct device *device, struct device_attribute *attr, const char *buf, size_t count) diff --git a/drivers/staging/gasket/gasket_sysfs.h b/drivers/staging/gasket/gasket_sysfs.h index 0949cdae876c..e9f4fad80461 100644 --- a/drivers/staging/gasket/gasket_sysfs.h +++ b/drivers/staging/gasket/gasket_sysfs.h @@ -167,10 +167,6 @@ struct gasket_sysfs_attribute *gasket_sysfs_get_attr( void gasket_sysfs_put_attr( struct device *device, struct gasket_sysfs_attribute *attr); -/* Display a register as a sysfs node. */ -ssize_t gasket_sysfs_register_show( - struct device *device, struct device_attribute *attr, char *buf); - /* * Write to a register sysfs node. * @buf: NULL-terminated data being written. -- 2.18.0 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel