summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-cy8c95x0.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-09-02 21:26:44 +0300
committerLinus Walleij <linus.walleij@linaro.org>2022-09-08 10:05:58 +0200
commitc3e4095287afbc8954928ae79849766194d364ac (patch)
treec621bf32fdcd67cfd0137d5a4091e2a2f67dfa8b /drivers/pinctrl/pinctrl-cy8c95x0.c
parent1fa3df901f2c80d6a597abe462725e5a374b2795 (diff)
downloadlinux-c3e4095287afbc8954928ae79849766194d364ac.tar.gz
linux-c3e4095287afbc8954928ae79849766194d364ac.tar.bz2
linux-c3e4095287afbc8954928ae79849766194d364ac.zip
pinctrl: cy8c95x0: Use 'default' in all switch-cases
Move the default values to the 'default' case in the switches. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com> Link: https://lore.kernel.org/r/20220902182650.83098-11-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-cy8c95x0.c')
-rw-r--r--drivers/pinctrl/pinctrl-cy8c95x0.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-cy8c95x0.c
index 204a53d6c4c9..c714c438f641 100644
--- a/drivers/pinctrl/pinctrl-cy8c95x0.c
+++ b/drivers/pinctrl/pinctrl-cy8c95x0.c
@@ -279,9 +279,9 @@ static bool cy8c95x0_readable_register(struct device *dev, unsigned int reg)
switch (reg) {
case 0x24 ... 0x27:
return false;
+ default:
+ return true;
}
-
- return true;
}
static bool cy8c95x0_writeable_register(struct device *dev, unsigned int reg)
@@ -293,9 +293,9 @@ static bool cy8c95x0_writeable_register(struct device *dev, unsigned int reg)
return false;
case 0x24 ... 0x27:
return false;
+ default:
+ return true;
}
-
- return true;
}
static bool cy8c95x0_volatile_register(struct device *dev, unsigned int reg)
@@ -325,9 +325,9 @@ static bool cy8c95x0_precious_register(struct device *dev, unsigned int reg)
switch (reg) {
case CY8C95X0_INTSTATUS_(0) ... CY8C95X0_INTSTATUS_(7):
return true;
+ default:
+ return false;
}
-
- return false;
}
static const struct reg_default cy8c95x0_reg_defaults[] = {
@@ -1255,6 +1255,8 @@ static int cy8c95x0_probe(struct i2c_client *client)
case 60:
strscpy(chip->name, cy8c95x0_id[2].name, I2C_NAME_SIZE);
break;
+ default:
+ return -ENODEV;
}
reg = devm_regulator_get(&client->dev, "vdd");