summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-05-31 11:05:11 +0300
committerLinus Walleij <linus.walleij@linaro.org>2016-05-31 13:39:31 +0300
commit4109508a85f5f51b3dcb1fb53674eec2beac60e1 (patch)
tree4fe6003778171a989791afb0f0f299a0e08675d3
parent7d36b2451ac524c672f35000f869000dbdb3ca21 (diff)
downloadlinux-4109508a85f5f51b3dcb1fb53674eec2beac60e1.tar.xz
pinctrl: uniphier: set pinctrl_desc name in common probe function
Every SoC driver sets the same name for struct pinctrl_desc and platform_driver. The common probe function can set desc->name instead of duplicating strings in each SoC driver. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/uniphier/pinctrl-uniphier-core.c1
-rw-r--r--drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c5
-rw-r--r--drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c5
-rw-r--r--drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c5
-rw-r--r--drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c5
-rw-r--r--drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c5
-rw-r--r--drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c5
7 files changed, 7 insertions, 24 deletions
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
index ab89efb6ee06..4aa67c6e7905 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
@@ -667,6 +667,7 @@ int uniphier_pinctrl_probe(struct platform_device *pdev,
}
priv->socdata = socdata;
+ desc->name = dev->driver->name;
desc->pctlops = &uniphier_pctlops;
desc->pmxops = &uniphier_pmxops;
desc->confops = &uniphier_confops;
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
index 5353ce4f611a..1e7bacd81785 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
@@ -19,8 +19,6 @@
#include "pinctrl-uniphier.h"
-#define DRIVER_NAME "uniphier-ld4-pinctrl"
-
static const struct pinctrl_pin_desc uniphier_ld4_pins[] = {
UNIPHIER_PINCTRL_PIN(0, "EA1", UNIPHIER_PIN_IECTRL_NONE,
8, UNIPHIER_PIN_DRV_4_8,
@@ -858,7 +856,6 @@ static struct uniphier_pinctrl_socdata uniphier_ld4_pindata = {
};
static struct pinctrl_desc uniphier_ld4_pinctrl_desc = {
- .name = DRIVER_NAME,
.pins = uniphier_ld4_pins,
.npins = ARRAY_SIZE(uniphier_ld4_pins),
};
@@ -878,7 +875,7 @@ MODULE_DEVICE_TABLE(of, uniphier_ld4_pinctrl_match);
static struct platform_driver uniphier_ld4_pinctrl_driver = {
.probe = uniphier_ld4_pinctrl_probe,
.driver = {
- .name = DRIVER_NAME,
+ .name = "uniphier-ld4-pinctrl",
.of_match_table = uniphier_ld4_pinctrl_match,
},
};
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
index c405960bd9b0..458c8a4e1bb6 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
@@ -19,8 +19,6 @@
#include "pinctrl-uniphier.h"
-#define DRIVER_NAME "uniphier-ld6b-pinctrl"
-
static const struct pinctrl_pin_desc uniphier_ld6b_pins[] = {
UNIPHIER_PINCTRL_PIN(0, "ED0", UNIPHIER_PIN_IECTRL_NONE,
0, UNIPHIER_PIN_DRV_4_8,
@@ -1246,7 +1244,6 @@ static struct uniphier_pinctrl_socdata uniphier_ld6b_pindata = {
};
static struct pinctrl_desc uniphier_ld6b_pinctrl_desc = {
- .name = DRIVER_NAME,
.pins = uniphier_ld6b_pins,
.npins = ARRAY_SIZE(uniphier_ld6b_pins),
};
@@ -1266,7 +1263,7 @@ MODULE_DEVICE_TABLE(of, uniphier_ld6b_pinctrl_match);
static struct platform_driver uniphier_ld6b_pinctrl_driver = {
.probe = uniphier_ld6b_pinctrl_probe,
.driver = {
- .name = DRIVER_NAME,
+ .name = "uniphier-ld6b-pinctrl",
.of_match_table = uniphier_ld6b_pinctrl_match,
},
};
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
index 54b08d51c501..7fcaeb5a510a 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
@@ -19,8 +19,6 @@
#include "pinctrl-uniphier.h"
-#define DRIVER_NAME "uniphier-pro4-pinctrl"
-
static const struct pinctrl_pin_desc uniphier_pro4_pins[] = {
UNIPHIER_PINCTRL_PIN(0, "CK24O", UNIPHIER_PIN_IECTRL_NONE,
0, UNIPHIER_PIN_DRV_4_8,
@@ -1532,7 +1530,6 @@ static struct uniphier_pinctrl_socdata uniphier_pro4_pindata = {
};
static struct pinctrl_desc uniphier_pro4_pinctrl_desc = {
- .name = DRIVER_NAME,
.pins = uniphier_pro4_pins,
.npins = ARRAY_SIZE(uniphier_pro4_pins),
};
@@ -1552,7 +1549,7 @@ MODULE_DEVICE_TABLE(of, uniphier_pro4_pinctrl_match);
static struct platform_driver uniphier_pro4_pinctrl_driver = {
.probe = uniphier_pro4_pinctrl_probe,
.driver = {
- .name = DRIVER_NAME,
+ .name = "uniphier-pro4-pinctrl",
.of_match_table = uniphier_pro4_pinctrl_match,
},
};
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
index 19b15db80e68..47fa57e05fbc 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
@@ -19,8 +19,6 @@
#include "pinctrl-uniphier.h"
-#define DRIVER_NAME "uniphier-pro5-pinctrl"
-
static const struct pinctrl_pin_desc uniphier_pro5_pins[] = {
UNIPHIER_PINCTRL_PIN(0, "AEXCKA1", 0,
0, UNIPHIER_PIN_DRV_4_8,
@@ -1323,7 +1321,6 @@ static struct uniphier_pinctrl_socdata uniphier_pro5_pindata = {
};
static struct pinctrl_desc uniphier_pro5_pinctrl_desc = {
- .name = DRIVER_NAME,
.pins = uniphier_pro5_pins,
.npins = ARRAY_SIZE(uniphier_pro5_pins),
};
@@ -1343,7 +1340,7 @@ MODULE_DEVICE_TABLE(of, uniphier_pro5_pinctrl_match);
static struct platform_driver uniphier_pro5_pinctrl_driver = {
.probe = uniphier_pro5_pinctrl_probe,
.driver = {
- .name = DRIVER_NAME,
+ .name = "uniphier-pro5-pinctrl",
.of_match_table = uniphier_pro5_pinctrl_match,
},
};
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
index 762de0e472a8..246e2bed6ef0 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
@@ -19,8 +19,6 @@
#include "pinctrl-uniphier.h"
-#define DRIVER_NAME "uniphier-pxs2-pinctrl"
-
static const struct pinctrl_pin_desc uniphier_pxs2_pins[] = {
UNIPHIER_PINCTRL_PIN(0, "ED0", UNIPHIER_PIN_IECTRL_NONE,
0, UNIPHIER_PIN_DRV_4_8,
@@ -1241,7 +1239,6 @@ static struct uniphier_pinctrl_socdata uniphier_pxs2_pindata = {
};
static struct pinctrl_desc uniphier_pxs2_pinctrl_desc = {
- .name = DRIVER_NAME,
.pins = uniphier_pxs2_pins,
.npins = ARRAY_SIZE(uniphier_pxs2_pins),
};
@@ -1261,7 +1258,7 @@ MODULE_DEVICE_TABLE(of, uniphier_pxs2_pinctrl_match);
static struct platform_driver uniphier_pxs2_pinctrl_driver = {
.probe = uniphier_pxs2_pinctrl_probe,
.driver = {
- .name = DRIVER_NAME,
+ .name = "uniphier-pxs2-pinctrl",
.of_match_table = uniphier_pxs2_pinctrl_match,
},
};
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
index 9fe87628b908..915259f13ea8 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
@@ -19,8 +19,6 @@
#include "pinctrl-uniphier.h"
-#define DRIVER_NAME "uniphier-sld8-pinctrl"
-
static const struct pinctrl_pin_desc uniphier_sld8_pins[] = {
UNIPHIER_PINCTRL_PIN(0, "PCA00", 0,
15, UNIPHIER_PIN_DRV_4_8,
@@ -766,7 +764,6 @@ static struct uniphier_pinctrl_socdata uniphier_sld8_pindata = {
};
static struct pinctrl_desc uniphier_sld8_pinctrl_desc = {
- .name = DRIVER_NAME,
.pins = uniphier_sld8_pins,
.npins = ARRAY_SIZE(uniphier_sld8_pins),
};
@@ -786,7 +783,7 @@ MODULE_DEVICE_TABLE(of, uniphier_sld8_pinctrl_match);
static struct platform_driver uniphier_sld8_pinctrl_driver = {
.probe = uniphier_sld8_pinctrl_probe,
.driver = {
- .name = DRIVER_NAME,
+ .name = "uniphier-sld8-pinctrl",
.of_match_table = uniphier_sld8_pinctrl_match,
},
};