Fixed indentation of cpld_reconfigure store call-back and definition of
attribute list.

Signed-off-by: Jeremy Sowden <jer...@azazel.net>
---
 drivers/staging/kpc2000/kpc2000/core.c | 55 ++++++++++++++------------
 1 file changed, 29 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/core.c 
b/drivers/staging/kpc2000/kpc2000/core.c
index c05864cf33ce..6147c47c44ab 100644
--- a/drivers/staging/kpc2000/kpc2000/core.c
+++ b/drivers/staging/kpc2000/kpc2000/core.c
@@ -47,23 +47,27 @@ static ssize_t  show_cpld_config_reg(struct device *dev, 
struct device_attribute
        val = readq(pcard->sysinfo_regs_base + REG_CPLD_CONFIG);
        return scnprintf(buf, PAGE_SIZE, "%016llx\n", val);
 }
-static ssize_t cpld_reconfigure(struct device *dev, struct device_attribute 
*attr, const char *buf, size_t count)
-{
-    struct kp2000_device *pcard = dev_get_drvdata(dev);
-    long wr_val;
-    int rv;
-
-    rv = kstrtol(buf, 0, &wr_val);
-    if (rv < 0)  return rv;
-    if (wr_val > 7)  return -EINVAL;
 
-    wr_val = wr_val << 8;
-    wr_val |= 0x1; // Set the "Configure Go" bit
-    writeq(wr_val, pcard->sysinfo_regs_base + REG_CPLD_CONFIG);
-    return count;
+static ssize_t cpld_reconfigure(struct device *dev,
+                               struct device_attribute *attr,
+                               const char *buf, size_t count)
+{
+       struct kp2000_device *pcard = dev_get_drvdata(dev);
+       long wr_val;
+       int rv;
+
+       rv = kstrtol(buf, 0, &wr_val);
+       if (rv < 0)
+               return rv;
+       if (wr_val > 7)
+               return -EINVAL;
+
+       wr_val = wr_val << 8;
+       wr_val |= 0x1; // Set the "Configure Go" bit
+       writeq(wr_val, pcard->sysinfo_regs_base + REG_CPLD_CONFIG);
+       return count;
 }
 
-
 DEVICE_ATTR(ssid,       0444, show_attr, NULL);
 DEVICE_ATTR(ddna,       0444, show_attr, NULL);
 DEVICE_ATTR(card_id,    0444, show_attr, NULL);
@@ -74,20 +78,19 @@ DEVICE_ATTR(build_time, 0444, show_attr, NULL);
 DEVICE_ATTR(cpld_reg,   0444, show_cpld_config_reg, NULL);
 DEVICE_ATTR(cpld_reconfigure,   0220, NULL, cpld_reconfigure);
 
-static const struct attribute *  kp_attr_list[] = {
-    &dev_attr_ssid.attr,
-    &dev_attr_ddna.attr,
-    &dev_attr_card_id.attr,
-    &dev_attr_hw_rev.attr,
-    &dev_attr_build.attr,
-    &dev_attr_build_date.attr,
-    &dev_attr_build_time.attr,
-    &dev_attr_cpld_reg.attr,
-    &dev_attr_cpld_reconfigure.attr,
-    NULL,
+static const struct attribute *kp_attr_list[] = {
+       &dev_attr_ssid.attr,
+       &dev_attr_ddna.attr,
+       &dev_attr_card_id.attr,
+       &dev_attr_hw_rev.attr,
+       &dev_attr_build.attr,
+       &dev_attr_build_date.attr,
+       &dev_attr_build_time.attr,
+       &dev_attr_cpld_reg.attr,
+       &dev_attr_cpld_reconfigure.attr,
+       NULL,
 };
 
-
 /*******************************************************
   * Functions
   ******************************************************/
-- 
2.20.1

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to