diff options
author | David S. Miller <davem@davemloft.net> | 2013-05-24 19:48:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-24 19:48:28 -0400 |
commit | e6ff4c75f9095f61b3a66c2a78e47b62864022dd (patch) | |
tree | 425ea9463cbec0b1975b8a33d9a56817143055d0 /drivers/pinctrl | |
parent | ee9c799c231324de681eb21e06d8bf4842768b75 (diff) | |
parent | 0e255f1c0c9add2f0c920240ac4cadc28ae274c3 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Merge net into net-next because some upcoming net-next changes
build on top of bug fixes that went into net.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-abx500.c | 30 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-coh901.c | 5 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-exynos5440.c | 5 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-lantiq.c | 3 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-samsung.c | 5 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-single.c | 3 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-xway.c | 4 | ||||
-rw-r--r-- | drivers/pinctrl/vt8500/pinctrl-wm8750.c | 2 |
8 files changed, 19 insertions, 38 deletions
diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c index aa17f7580f61..6d4532702f80 100644 --- a/drivers/pinctrl/pinctrl-abx500.c +++ b/drivers/pinctrl/pinctrl-abx500.c | |||
@@ -851,23 +851,12 @@ static int abx500_gpio_probe(struct platform_device *pdev) | |||
851 | 851 | ||
852 | if (abx500_pdata) | 852 | if (abx500_pdata) |
853 | pdata = abx500_pdata->gpio; | 853 | pdata = abx500_pdata->gpio; |
854 | if (!pdata) { | ||
855 | if (np) { | ||
856 | const struct of_device_id *match; | ||
857 | 854 | ||
858 | match = of_match_device(abx500_gpio_match, &pdev->dev); | 855 | if (!(pdata || np)) { |
859 | if (!match) | 856 | dev_err(&pdev->dev, "gpio dt and platform data missing\n"); |
860 | return -ENODEV; | 857 | return -ENODEV; |
861 | id = (unsigned long)match->data; | ||
862 | } else { | ||
863 | dev_err(&pdev->dev, "gpio dt and platform data missing\n"); | ||
864 | return -ENODEV; | ||
865 | } | ||
866 | } | 858 | } |
867 | 859 | ||
868 | if (platid) | ||
869 | id = platid->driver_data; | ||
870 | |||
871 | pct = devm_kzalloc(&pdev->dev, sizeof(struct abx500_pinctrl), | 860 | pct = devm_kzalloc(&pdev->dev, sizeof(struct abx500_pinctrl), |
872 | GFP_KERNEL); | 861 | GFP_KERNEL); |
873 | if (pct == NULL) { | 862 | if (pct == NULL) { |
@@ -882,6 +871,16 @@ static int abx500_gpio_probe(struct platform_device *pdev) | |||
882 | pct->chip.dev = &pdev->dev; | 871 | pct->chip.dev = &pdev->dev; |
883 | pct->chip.base = (np) ? -1 : pdata->gpio_base; | 872 | pct->chip.base = (np) ? -1 : pdata->gpio_base; |
884 | 873 | ||
874 | if (platid) | ||
875 | id = platid->driver_data; | ||
876 | else if (np) { | ||
877 | const struct of_device_id *match; | ||
878 | |||
879 | match = of_match_device(abx500_gpio_match, &pdev->dev); | ||
880 | if (match) | ||
881 | id = (unsigned long)match->data; | ||
882 | } | ||
883 | |||
885 | /* initialize the lock */ | 884 | /* initialize the lock */ |
886 | mutex_init(&pct->lock); | 885 | mutex_init(&pct->lock); |
887 | 886 | ||
@@ -900,8 +899,7 @@ static int abx500_gpio_probe(struct platform_device *pdev) | |||
900 | abx500_pinctrl_ab8505_init(&pct->soc); | 899 | abx500_pinctrl_ab8505_init(&pct->soc); |
901 | break; | 900 | break; |
902 | default: | 901 | default: |
903 | dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n", | 902 | dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n", id); |
904 | (int) platid->driver_data); | ||
905 | mutex_destroy(&pct->lock); | 903 | mutex_destroy(&pct->lock); |
906 | return -EINVAL; | 904 | return -EINVAL; |
907 | } | 905 | } |
diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c index edde3acc4186..a67af419f531 100644 --- a/drivers/pinctrl/pinctrl-coh901.c +++ b/drivers/pinctrl/pinctrl-coh901.c | |||
@@ -713,11 +713,6 @@ static int __init u300_gpio_probe(struct platform_device *pdev) | |||
713 | gpio->dev = &pdev->dev; | 713 | gpio->dev = &pdev->dev; |
714 | 714 | ||
715 | memres = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 715 | memres = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
716 | if (!memres) { | ||
717 | dev_err(gpio->dev, "could not get GPIO memory resource\n"); | ||
718 | return -ENODEV; | ||
719 | } | ||
720 | |||
721 | gpio->base = devm_ioremap_resource(&pdev->dev, memres); | 716 | gpio->base = devm_ioremap_resource(&pdev->dev, memres); |
722 | if (IS_ERR(gpio->base)) | 717 | if (IS_ERR(gpio->base)) |
723 | return PTR_ERR(gpio->base); | 718 | return PTR_ERR(gpio->base); |
diff --git a/drivers/pinctrl/pinctrl-exynos5440.c b/drivers/pinctrl/pinctrl-exynos5440.c index 6038503ed929..32a48f44f574 100644 --- a/drivers/pinctrl/pinctrl-exynos5440.c +++ b/drivers/pinctrl/pinctrl-exynos5440.c | |||
@@ -1000,11 +1000,6 @@ static int exynos5440_pinctrl_probe(struct platform_device *pdev) | |||
1000 | } | 1000 | } |
1001 | 1001 | ||
1002 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1002 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1003 | if (!res) { | ||
1004 | dev_err(dev, "cannot find IO resource\n"); | ||
1005 | return -ENOENT; | ||
1006 | } | ||
1007 | |||
1008 | priv->reg_base = devm_ioremap_resource(&pdev->dev, res); | 1003 | priv->reg_base = devm_ioremap_resource(&pdev->dev, res); |
1009 | if (IS_ERR(priv->reg_base)) | 1004 | if (IS_ERR(priv->reg_base)) |
1010 | return PTR_ERR(priv->reg_base); | 1005 | return PTR_ERR(priv->reg_base); |
diff --git a/drivers/pinctrl/pinctrl-lantiq.c b/drivers/pinctrl/pinctrl-lantiq.c index 615c5002b757..d22ca252b80d 100644 --- a/drivers/pinctrl/pinctrl-lantiq.c +++ b/drivers/pinctrl/pinctrl-lantiq.c | |||
@@ -52,7 +52,8 @@ static void ltq_pinctrl_dt_free_map(struct pinctrl_dev *pctldev, | |||
52 | int i; | 52 | int i; |
53 | 53 | ||
54 | for (i = 0; i < num_maps; i++) | 54 | for (i = 0; i < num_maps; i++) |
55 | if (map[i].type == PIN_MAP_TYPE_CONFIGS_PIN) | 55 | if (map[i].type == PIN_MAP_TYPE_CONFIGS_PIN || |
56 | map[i].type == PIN_MAP_TYPE_CONFIGS_GROUP) | ||
56 | kfree(map[i].data.configs.configs); | 57 | kfree(map[i].data.configs.configs); |
57 | kfree(map); | 58 | kfree(map); |
58 | } | 59 | } |
diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c index 976366899f68..055d0162098b 100644 --- a/drivers/pinctrl/pinctrl-samsung.c +++ b/drivers/pinctrl/pinctrl-samsung.c | |||
@@ -932,11 +932,6 @@ static int samsung_pinctrl_probe(struct platform_device *pdev) | |||
932 | drvdata->dev = dev; | 932 | drvdata->dev = dev; |
933 | 933 | ||
934 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 934 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
935 | if (!res) { | ||
936 | dev_err(dev, "cannot find IO resource\n"); | ||
937 | return -ENOENT; | ||
938 | } | ||
939 | |||
940 | drvdata->virt_base = devm_ioremap_resource(&pdev->dev, res); | 935 | drvdata->virt_base = devm_ioremap_resource(&pdev->dev, res); |
941 | if (IS_ERR(drvdata->virt_base)) | 936 | if (IS_ERR(drvdata->virt_base)) |
942 | return PTR_ERR(drvdata->virt_base); | 937 | return PTR_ERR(drvdata->virt_base); |
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 5f2d2bfd356e..b9fa04618601 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c | |||
@@ -1166,7 +1166,8 @@ static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs, | |||
1166 | (*map)->data.mux.function = np->name; | 1166 | (*map)->data.mux.function = np->name; |
1167 | 1167 | ||
1168 | if (pcs->is_pinconf) { | 1168 | if (pcs->is_pinconf) { |
1169 | if (pcs_parse_pinconf(pcs, np, function, map)) | 1169 | res = pcs_parse_pinconf(pcs, np, function, map); |
1170 | if (res) | ||
1170 | goto free_pingroups; | 1171 | goto free_pingroups; |
1171 | *num_maps = 2; | 1172 | *num_maps = 2; |
1172 | } else { | 1173 | } else { |
diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c index f2977cff8366..e92132c76a6b 100644 --- a/drivers/pinctrl/pinctrl-xway.c +++ b/drivers/pinctrl/pinctrl-xway.c | |||
@@ -716,10 +716,6 @@ static int pinmux_xway_probe(struct platform_device *pdev) | |||
716 | 716 | ||
717 | /* get and remap our register range */ | 717 | /* get and remap our register range */ |
718 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 718 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
719 | if (!res) { | ||
720 | dev_err(&pdev->dev, "Failed to get resource\n"); | ||
721 | return -ENOENT; | ||
722 | } | ||
723 | xway_info.membase[0] = devm_ioremap_resource(&pdev->dev, res); | 719 | xway_info.membase[0] = devm_ioremap_resource(&pdev->dev, res); |
724 | if (IS_ERR(xway_info.membase[0])) | 720 | if (IS_ERR(xway_info.membase[0])) |
725 | return PTR_ERR(xway_info.membase[0]); | 721 | return PTR_ERR(xway_info.membase[0]); |
diff --git a/drivers/pinctrl/vt8500/pinctrl-wm8750.c b/drivers/pinctrl/vt8500/pinctrl-wm8750.c index b964cc550568..de43262398db 100644 --- a/drivers/pinctrl/vt8500/pinctrl-wm8750.c +++ b/drivers/pinctrl/vt8500/pinctrl-wm8750.c | |||
@@ -53,7 +53,7 @@ static const struct wmt_pinctrl_bank_registers wm8750_banks[] = { | |||
53 | #define WMT_PIN_EXTGPIO6 WMT_PIN(0, 6) | 53 | #define WMT_PIN_EXTGPIO6 WMT_PIN(0, 6) |
54 | #define WMT_PIN_EXTGPIO7 WMT_PIN(0, 7) | 54 | #define WMT_PIN_EXTGPIO7 WMT_PIN(0, 7) |
55 | #define WMT_PIN_WAKEUP0 WMT_PIN(0, 16) | 55 | #define WMT_PIN_WAKEUP0 WMT_PIN(0, 16) |
56 | #define WMT_PIN_WAKEUP1 WMT_PIN(0, 16) | 56 | #define WMT_PIN_WAKEUP1 WMT_PIN(0, 17) |
57 | #define WMT_PIN_SD0CD WMT_PIN(0, 28) | 57 | #define WMT_PIN_SD0CD WMT_PIN(0, 28) |
58 | #define WMT_PIN_VDOUT0 WMT_PIN(1, 0) | 58 | #define WMT_PIN_VDOUT0 WMT_PIN(1, 0) |
59 | #define WMT_PIN_VDOUT1 WMT_PIN(1, 1) | 59 | #define WMT_PIN_VDOUT1 WMT_PIN(1, 1) |