Skip to contentSkip to conversation

pinctrl: rockchip: Remove of_match_ptr macro for DT only driver

PATCH In review Axel Lin 2 participants 4 messages Aug 23, 2013 – Aug 28, 2013

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/2 pinctrl: rockchip: Remove of_match_ptr macro for DT only driver

This is a DT only driver and rockchip_pinctrl_dt_match is always compiled in. Thus remove of_match_ptr macro.

---
 drivers/pinctrl/pinctrl-rockchip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/pinctrl-rockchip.c +1 -1
index 64ad0c0..7eb1249 100644
@@ -1365,7 +1365,7 @@ static struct platform_driver rockchip_pinctrl_driver = {
 	.driver = {
 		.name	= "rockchip-pinctrl",
 		.owner	= THIS_MODULE,
-		.of_match_table = of_match_ptr(rockchip_pinctrl_dt_match),
+		.of_match_table = rockchip_pinctrl_dt_match,
 	},
 };
 
Signature · 1 line
1.8.1.2
author
#1 lore raw

PATCH 2/2 pinctrl: rockchip: Remove non-reachable break statement

The break statement after return is non-reachable, remove them.

---
 drivers/pinctrl/pinctrl-rockchip.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/pinctrl/pinctrl-rockchip.c +0 -4
index 7eb1249..319a64a 100644
@@ -585,7 +585,6 @@ static int rockchip_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
 	switch (param) {
 	case PIN_CONFIG_BIAS_DISABLE:
 		return rockchip_set_pull(bank, pin - bank->pin_base, param);
-		break;
 	case PIN_CONFIG_BIAS_PULL_UP:
 	case PIN_CONFIG_BIAS_PULL_DOWN:
 	case PIN_CONFIG_BIAS_PULL_PIN_DEFAULT:
@@ -596,10 +595,8 @@ static int rockchip_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
 			return -EINVAL;
 
 		return rockchip_set_pull(bank, pin - bank->pin_base, param);
-		break;
 	default:
 		return -ENOTSUPP;
-		break;
 	}
 
 	return 0;
@@ -633,7 +630,6 @@ static int rockchip_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin,
 		break;
 	default:
 		return -ENOTSUPP;
-		break;
 	}
 
 	return 0;
Signature · 1 line
1.8.1.2
#2 lore raw

Re: [PATCH 2/2] pinctrl: rockchip: Remove non-reachable break statement

Quoted 3 lines · Axel Lin

The break statement after return is non-reachable, remove them.

Patch applied.

Yours,
Linus Walleij