[PATCH 03/11] staging: kpc2000: define all kpc_uio_class device attributes as read-only.

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

 



All 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/cell_probe.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
index 101eb23caaac..da15ae5b5a3d 100644
--- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
+++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
@@ -229,16 +229,16 @@ static ssize_t core_num_show(struct device *dev, struct device_attribute *attr,
 	return scnprintf(buf, PAGE_SIZE, "%u\n", kudev->core_num);
 }
 
-DEVICE_ATTR(offset,       0444, offset_show,       NULL);
-DEVICE_ATTR(size,         0444, size_show,         NULL);
-DEVICE_ATTR(type,         0444, type_show,         NULL);
-DEVICE_ATTR(s2c_dma_ch,   0444, s2c_dma_ch_show,   NULL);
-DEVICE_ATTR(c2s_dma_ch,   0444, c2s_dma_ch_show,   NULL);
-DEVICE_ATTR(s2c_dma,      0444, s2c_dma_show,      NULL);
-DEVICE_ATTR(c2s_dma,      0444, c2s_dma_show,      NULL);
-DEVICE_ATTR(irq_count,    0444, irq_count_show,    NULL);
-DEVICE_ATTR(irq_base_num, 0444, irq_base_num_show, NULL);
-DEVICE_ATTR(core_num,     0444, core_num_show,     NULL);
+DEVICE_ATTR_RO(offset);
+DEVICE_ATTR_RO(size);
+DEVICE_ATTR_RO(type);
+DEVICE_ATTR_RO(s2c_dma_ch);
+DEVICE_ATTR_RO(c2s_dma_ch);
+DEVICE_ATTR_RO(s2c_dma);
+DEVICE_ATTR_RO(c2s_dma);
+DEVICE_ATTR_RO(irq_count);
+DEVICE_ATTR_RO(irq_base_num);
+DEVICE_ATTR_RO(core_num);
 
 struct attribute *kpc_uio_class_attrs[] = {
 	&dev_attr_offset.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