staging: gasket: apex: fix sysfs_show
authorNick Ewalt <nicholasewalt@google.com>
Mon, 15 Oct 2018 04:59:25 +0000 (21:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Oct 2018 14:30:37 +0000 (16:30 +0200)
sysfs_show was incorrectly extracting the sysfs_attribute_type from the
gasket_sysfs_attribute. This prevented dispatch from working properly.

Signed-off-by: Nick Ewalt <nicholasewalt@google.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gasket/apex_driver.c

index 6dca3b1..3c7a13a 100644 (file)
@@ -526,7 +526,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",