Fixed indentation of cpld_reconfigure store call-back and definition of attribute list. Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx> --- drivers/staging/kpc2000/kpc2000/core.c | 51 ++++++++++++++------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index e7e0d188ff73..7a5dd5f2300b 100644 --- a/drivers/staging/kpc2000/kpc2000/core.c +++ b/drivers/staging/kpc2000/kpc2000/core.c @@ -91,20 +91,24 @@ static ssize_t cpld_reg_show(struct device *dev, struct device_attribute *attr, 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) +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; + 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, ssid_show, NULL); @@ -118,19 +122,18 @@ DEVICE_ATTR(cpld_reg, 0444, cpld_reg_show, 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, + &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 devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel