[PATCH 10/11] staging: kpc2000: define read-only kp device attributes as read-only.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Most of the device attributes are read-only, so use DEVICE_ATTR_RO
to define them.

Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx>
---
 drivers/staging/kpc2000/kpc2000/core.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c
index 7a5dd5f2300b..55e9038117a4 100644
--- a/drivers/staging/kpc2000/kpc2000/core.c
+++ b/drivers/staging/kpc2000/kpc2000/core.c
@@ -111,15 +111,15 @@ static ssize_t cpld_reconfigure(struct device *dev,
 	return count;
 }
 
-DEVICE_ATTR(ssid,             0444, ssid_show,       NULL);
-DEVICE_ATTR(ddna,             0444, ddna_show,       NULL);
-DEVICE_ATTR(card_id,          0444, card_id_show,    NULL);
-DEVICE_ATTR(hw_rev,           0444, hw_rev_show,     NULL);
-DEVICE_ATTR(build,            0444, build_show,      NULL);
-DEVICE_ATTR(build_date,       0444, build_date_show, NULL);
-DEVICE_ATTR(build_time,       0444, build_time_show, NULL);
-DEVICE_ATTR(cpld_reg,         0444, cpld_reg_show,   NULL);
-DEVICE_ATTR(cpld_reconfigure, 0220, NULL,            cpld_reconfigure);
+DEVICE_ATTR_RO(ssid);
+DEVICE_ATTR_RO(ddna);
+DEVICE_ATTR_RO(card_id);
+DEVICE_ATTR_RO(hw_rev);
+DEVICE_ATTR_RO(build);
+DEVICE_ATTR_RO(build_date);
+DEVICE_ATTR_RO(build_time);
+DEVICE_ATTR_RO(cpld_reg);
+DEVICE_ATTR(cpld_reconfigure, 0220, NULL, cpld_reconfigure);
 
 static const struct attribute *kp_attr_list[] = {
 	&dev_attr_ssid.attr,
-- 
2.20.1

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



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux