]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/sh/drivers/dma/dma-sysfs.c
sysdev: Pass the attribute to the low level sysdev show/store function
[karo-tx-linux.git] / arch / sh / drivers / dma / dma-sysfs.c
index 51b57c0d1a3c01f98d99e4bb5071cdb1478b89d3..347ee11351ec6c4375c06a8bf3f970733f022181 100644 (file)
@@ -23,7 +23,8 @@ static struct sysdev_class dma_sysclass = {
 };
 EXPORT_SYMBOL(dma_sysclass);
 
-static ssize_t dma_show_devices(struct sys_device *dev, char *buf)
+static ssize_t dma_show_devices(struct sys_device *dev,
+                               struct sysdev_attribute *attr, char *buf)
 {
        ssize_t len = 0;
        int i;
@@ -57,13 +58,15 @@ static int __init dma_sysclass_init(void)
 }
 postcore_initcall(dma_sysclass_init);
 
-static ssize_t dma_show_dev_id(struct sys_device *dev, char *buf)
+static ssize_t dma_show_dev_id(struct sys_device *dev,
+                               struct sysdev_attribute *attr, char *buf)
 {
        struct dma_channel *channel = to_dma_channel(dev);
        return sprintf(buf, "%s\n", channel->dev_id);
 }
 
 static ssize_t dma_store_dev_id(struct sys_device *dev,
+                               struct sysdev_attribute *attr,
                                const char *buf, size_t count)
 {
        struct dma_channel *channel = to_dma_channel(dev);
@@ -74,6 +77,7 @@ static ssize_t dma_store_dev_id(struct sys_device *dev,
 static SYSDEV_ATTR(dev_id, S_IRUGO | S_IWUSR, dma_show_dev_id, dma_store_dev_id);
 
 static ssize_t dma_store_config(struct sys_device *dev,
+                               struct sysdev_attribute *attr,
                                const char *buf, size_t count)
 {
        struct dma_channel *channel = to_dma_channel(dev);
@@ -87,13 +91,15 @@ static ssize_t dma_store_config(struct sys_device *dev,
 
 static SYSDEV_ATTR(config, S_IWUSR, NULL, dma_store_config);
 
-static ssize_t dma_show_mode(struct sys_device *dev, char *buf)
+static ssize_t dma_show_mode(struct sys_device *dev,
+                               struct sysdev_attribute *attr, char *buf)
 {
        struct dma_channel *channel = to_dma_channel(dev);
        return sprintf(buf, "0x%08x\n", channel->mode);
 }
 
 static ssize_t dma_store_mode(struct sys_device *dev,
+                             struct sysdev_attribute *attr,
                              const char *buf, size_t count)
 {
        struct dma_channel *channel = to_dma_channel(dev);
@@ -104,7 +110,8 @@ static ssize_t dma_store_mode(struct sys_device *dev,
 static SYSDEV_ATTR(mode, S_IRUGO | S_IWUSR, dma_show_mode, dma_store_mode);
 
 #define dma_ro_attr(field, fmt)                                                \
-static ssize_t dma_show_##field(struct sys_device *dev, char *buf)     \
+static ssize_t dma_show_##field(struct sys_device *dev,                \
+                               struct sysdev_attribute *attr, char *buf)\
 {                                                                      \
        struct dma_channel *channel = to_dma_channel(dev);              \
        return sprintf(buf, fmt, channel->field);                       \