diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-04-19 04:00:05 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-04-19 16:37:16 -0400 |
commit | d71c7715326b561e5b11768e8146f46287d1edd8 (patch) | |
tree | 05fd1338cd342b59d1cfb272628b0eb0dc21795c /drivers/rtc/rtc-ep93xx.c | |
parent | 4fdf4d237fab355f7cc904c6cb1cf0d99b769eff (diff) |
rtc: ep93xx: fix checkpatch issues
Fix sysfs attribute declaration as suggested by checkpatch.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-ep93xx.c')
-rw-r--r-- | drivers/rtc/rtc-ep93xx.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c index 8dd85d602afd..1766496385fe 100644 --- a/drivers/rtc/rtc-ep93xx.c +++ b/drivers/rtc/rtc-ep93xx.c | |||
@@ -15,10 +15,10 @@ | |||
15 | #define EP93XX_RTC_DATA 0x000 | 15 | #define EP93XX_RTC_DATA 0x000 |
16 | #define EP93XX_RTC_MATCH 0x004 | 16 | #define EP93XX_RTC_MATCH 0x004 |
17 | #define EP93XX_RTC_STATUS 0x008 | 17 | #define EP93XX_RTC_STATUS 0x008 |
18 | #define EP93XX_RTC_STATUS_INTR (1<<0) | 18 | #define EP93XX_RTC_STATUS_INTR BIT(0) |
19 | #define EP93XX_RTC_LOAD 0x00C | 19 | #define EP93XX_RTC_LOAD 0x00C |
20 | #define EP93XX_RTC_CONTROL 0x010 | 20 | #define EP93XX_RTC_CONTROL 0x010 |
21 | #define EP93XX_RTC_CONTROL_MIE (1<<0) | 21 | #define EP93XX_RTC_CONTROL_MIE BIT(0) |
22 | #define EP93XX_RTC_SWCOMP 0x108 | 22 | #define EP93XX_RTC_SWCOMP 0x108 |
23 | #define EP93XX_RTC_SWCOMP_DEL_MASK 0x001f0000 | 23 | #define EP93XX_RTC_SWCOMP_DEL_MASK 0x001f0000 |
24 | #define EP93XX_RTC_SWCOMP_DEL_SHIFT 16 | 24 | #define EP93XX_RTC_SWCOMP_DEL_SHIFT 16 |
@@ -31,7 +31,7 @@ struct ep93xx_rtc { | |||
31 | }; | 31 | }; |
32 | 32 | ||
33 | static int ep93xx_rtc_get_swcomp(struct device *dev, unsigned short *preload, | 33 | static int ep93xx_rtc_get_swcomp(struct device *dev, unsigned short *preload, |
34 | unsigned short *delete) | 34 | unsigned short *delete) |
35 | { | 35 | { |
36 | struct ep93xx_rtc *ep93xx_rtc = dev_get_platdata(dev); | 36 | struct ep93xx_rtc *ep93xx_rtc = dev_get_platdata(dev); |
37 | unsigned long comp; | 37 | unsigned long comp; |
@@ -87,8 +87,8 @@ static const struct rtc_class_ops ep93xx_rtc_ops = { | |||
87 | .proc = ep93xx_rtc_proc, | 87 | .proc = ep93xx_rtc_proc, |
88 | }; | 88 | }; |
89 | 89 | ||
90 | static ssize_t ep93xx_rtc_show_comp_preload(struct device *dev, | 90 | static ssize_t comp_preload_show(struct device *dev, |
91 | struct device_attribute *attr, char *buf) | 91 | struct device_attribute *attr, char *buf) |
92 | { | 92 | { |
93 | unsigned short preload; | 93 | unsigned short preload; |
94 | 94 | ||
@@ -96,10 +96,10 @@ static ssize_t ep93xx_rtc_show_comp_preload(struct device *dev, | |||
96 | 96 | ||
97 | return sprintf(buf, "%d\n", preload); | 97 | return sprintf(buf, "%d\n", preload); |
98 | } | 98 | } |
99 | static DEVICE_ATTR(comp_preload, S_IRUGO, ep93xx_rtc_show_comp_preload, NULL); | 99 | static DEVICE_ATTR_RO(comp_preload); |
100 | 100 | ||
101 | static ssize_t ep93xx_rtc_show_comp_delete(struct device *dev, | 101 | static ssize_t comp_delete_show(struct device *dev, |
102 | struct device_attribute *attr, char *buf) | 102 | struct device_attribute *attr, char *buf) |
103 | { | 103 | { |
104 | unsigned short delete; | 104 | unsigned short delete; |
105 | 105 | ||
@@ -107,7 +107,7 @@ static ssize_t ep93xx_rtc_show_comp_delete(struct device *dev, | |||
107 | 107 | ||
108 | return sprintf(buf, "%d\n", delete); | 108 | return sprintf(buf, "%d\n", delete); |
109 | } | 109 | } |
110 | static DEVICE_ATTR(comp_delete, S_IRUGO, ep93xx_rtc_show_comp_delete, NULL); | 110 | static DEVICE_ATTR_RO(comp_delete); |
111 | 111 | ||
112 | static struct attribute *ep93xx_rtc_attrs[] = { | 112 | static struct attribute *ep93xx_rtc_attrs[] = { |
113 | &dev_attr_comp_preload.attr, | 113 | &dev_attr_comp_preload.attr, |