diff options
author | Javier Carrasco <javier.carrasco@wolfvision.net> | 2023-03-15 09:20:20 +0100 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2023-03-17 23:23:54 +0100 |
commit | b48cc753c017d1f5c6e317538205d40e70d04f3c (patch) | |
tree | 6edaf995406cc58499e9da4a0ab9e4cf5b62b9b8 /drivers/rtc/rtc-pcf8523.c | |
parent | rtc: ds1390: mark OF related data as maybe unused (diff) | |
download | linux-b48cc753c017d1f5c6e317538205d40e70d04f3c.tar.xz linux-b48cc753c017d1f5c6e317538205d40e70d04f3c.zip |
rtc: pcf8523: fix coding-style issues
Minor modifications for coding-style correctness (tabs, spaces and blank
lines before and after brackets). In total 7 errors, 3 warnings and 1
check where removed from the checkpatch output without damaging code
readability.
Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
Link: https://lore.kernel.org/r/20230315082021.2104452-2-javier.carrasco@wolfvision.net
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-pcf8523.c')
-rw-r--r-- | drivers/rtc/rtc-pcf8523.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/rtc/rtc-pcf8523.c b/drivers/rtc/rtc-pcf8523.c index 2e111cdb94f7..ccb5aa690433 100644 --- a/drivers/rtc/rtc-pcf8523.c +++ b/drivers/rtc/rtc-pcf8523.c @@ -21,7 +21,7 @@ #define PCF8523_CONTROL2_AF BIT(3) #define PCF8523_REG_CONTROL3 0x02 -#define PCF8523_CONTROL3_PM GENMASK(7,5) +#define PCF8523_CONTROL3_PM GENMASK(7, 5) #define PCF8523_PM_STANDBY 0x7 #define PCF8523_CONTROL3_BLF BIT(2) /* battery low bit, read-only */ #define PCF8523_CONTROL3_BSF BIT(3) @@ -234,8 +234,7 @@ static int pcf8523_param_get(struct device *dev, struct rtc_param *param) int ret; u32 value; - switch(param->param) { - + switch (param->param) { case RTC_PARAM_BACKUP_SWITCH_MODE: ret = regmap_read(pcf8523->regmap, PCF8523_REG_CONTROL3, &value); if (ret < 0) @@ -243,7 +242,7 @@ static int pcf8523_param_get(struct device *dev, struct rtc_param *param) value = FIELD_GET(PCF8523_CONTROL3_PM, value); - switch(value) { + switch (value) { case 0x0: case 0x4: param->uvalue = RTC_BSM_LEVEL; @@ -273,7 +272,7 @@ static int pcf8523_param_set(struct device *dev, struct rtc_param *param) struct pcf8523 *pcf8523 = dev_get_drvdata(dev); u8 mode; - switch(param->param) { + switch (param->param) { case RTC_PARAM_BACKUP_SWITCH_MODE: switch (param->uvalue) { case RTC_BSM_DISABLED: @@ -385,9 +384,9 @@ static const struct rtc_class_ops pcf8523_rtc_ops = { }; static const struct regmap_config regmap_config = { - .reg_bits = 8, - .val_bits = 8, - .max_register = 0x13, + .reg_bits = 8, + .val_bits = 8, + .max_register = 0x13, }; static int pcf8523_probe(struct i2c_client *client) |