From 068cb76fc59185b980f3ee8e207b00c46c097b2f Mon Sep 17 00:00:00 2001 From: Nick Ewalt Date: Tue, 25 Sep 2018 09:52:02 -0700 Subject: [PATCH] staging: gasket: apex: fix sysfs_show sysfs_show was incorrectly extracting the sysfs_attribute_type from the gasket_sysfs_attribute. This prevented dispatch from working properly. Change-Id: Ib962a10cf24bd4be416708e0a6294b6db431c76f Signed-off-by: Nick Ewalt --- apex_driver.c | 2 +- gasket_sysfs.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apex_driver.c b/apex_driver.c index 206c890..8904551 100644 --- a/apex_driver.c +++ b/apex_driver.c @@ -584,7 +584,7 @@ static ssize_t sysfs_show(struct device *device, struct device_attribute *attr, return -ENODEV; } - type = (enum sysfs_attribute_type)gasket_sysfs_get_attr(device, attr); + type = (enum sysfs_attribute_type)gasket_attr->data.attr_type; switch (type) { case ATTR_KERNEL_HIB_PAGE_TABLE_SIZE: ret = scnprintf(buf, PAGE_SIZE, "%u\n", diff --git a/gasket_sysfs.h b/gasket_sysfs.h index f32eaf8..151e8ed 100644 --- a/gasket_sysfs.h +++ b/gasket_sysfs.h @@ -152,8 +152,8 @@ void gasket_sysfs_put_device_data(struct device *device, * Returns the Gasket sysfs attribute associated with the kernel device * attribute and device structure itself. Upon success, this call will take a * reference to internal sysfs data that must be released with a call to - * gasket_sysfs_get_device_data. While this reference is held, the underlying - * device sysfs information/structure will remain valid/will not be deleted. + * gasket_sysfs_put_attr. While this reference is held, the underlying device + * sysfs information/structure will remain valid/will not be deleted. */ struct gasket_sysfs_attribute * gasket_sysfs_get_attr(struct device *device, struct device_attribute *attr);