Commit c3e40952 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Walleij

pinctrl: cy8c95x0: Use 'default' in all switch-cases

Move the default values to the 'default' case in the switches.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: default avatarPatrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-11-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 1fa3df90
...@@ -279,9 +279,9 @@ static bool cy8c95x0_readable_register(struct device *dev, unsigned int reg) ...@@ -279,9 +279,9 @@ static bool cy8c95x0_readable_register(struct device *dev, unsigned int reg)
switch (reg) { switch (reg) {
case 0x24 ... 0x27: case 0x24 ... 0x27:
return false; return false;
default:
return true;
} }
return true;
} }
static bool cy8c95x0_writeable_register(struct device *dev, unsigned int reg) 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) ...@@ -293,9 +293,9 @@ static bool cy8c95x0_writeable_register(struct device *dev, unsigned int reg)
return false; return false;
case 0x24 ... 0x27: case 0x24 ... 0x27:
return false; return false;
default:
return true;
} }
return true;
} }
static bool cy8c95x0_volatile_register(struct device *dev, unsigned int reg) 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) ...@@ -325,9 +325,9 @@ static bool cy8c95x0_precious_register(struct device *dev, unsigned int reg)
switch (reg) { switch (reg) {
case CY8C95X0_INTSTATUS_(0) ... CY8C95X0_INTSTATUS_(7): case CY8C95X0_INTSTATUS_(0) ... CY8C95X0_INTSTATUS_(7):
return true; return true;
default:
return false;
} }
return false;
} }
static const struct reg_default cy8c95x0_reg_defaults[] = { static const struct reg_default cy8c95x0_reg_defaults[] = {
...@@ -1255,6 +1255,8 @@ static int cy8c95x0_probe(struct i2c_client *client) ...@@ -1255,6 +1255,8 @@ static int cy8c95x0_probe(struct i2c_client *client)
case 60: case 60:
strscpy(chip->name, cy8c95x0_id[2].name, I2C_NAME_SIZE); strscpy(chip->name, cy8c95x0_id[2].name, I2C_NAME_SIZE);
break; break;
default:
return -ENODEV;
} }
reg = devm_regulator_get(&client->dev, "vdd"); reg = devm_regulator_get(&client->dev, "vdd");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment