diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2014-04-01 10:02:53 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-04-11 03:29:16 -0400 |
commit | 848ef58695d8c013f24633352586279cfb40e9d9 (patch) | |
tree | 2aca76ac9a074b385459b0a7dd98ebf00c7a8e26 /net/rfkill | |
parent | 7bd494491be0a330df74bb7f79427f5604060585 (diff) |
net: rfkill: gpio: remove unused and obsolete platform parameters
After upgrading to descriptor based gpios, the gpio numbers
are not used anymore. The power_clk_name and the platform
specific setup and close hooks are not used by anybody, and
we should not encourage use of such things, so removing them.
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/rfkill')
-rw-r--r-- | net/rfkill/rfkill-gpio.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c index bd2a5b90400c..0adda445dfe7 100644 --- a/net/rfkill/rfkill-gpio.c +++ b/net/rfkill/rfkill-gpio.c | |||
@@ -87,7 +87,6 @@ static int rfkill_gpio_probe(struct platform_device *pdev) | |||
87 | { | 87 | { |
88 | struct rfkill_gpio_platform_data *pdata = pdev->dev.platform_data; | 88 | struct rfkill_gpio_platform_data *pdata = pdev->dev.platform_data; |
89 | struct rfkill_gpio_data *rfkill; | 89 | struct rfkill_gpio_data *rfkill; |
90 | const char *clk_name = NULL; | ||
91 | struct gpio_desc *gpio; | 90 | struct gpio_desc *gpio; |
92 | int ret; | 91 | int ret; |
93 | int len; | 92 | int len; |
@@ -101,7 +100,6 @@ static int rfkill_gpio_probe(struct platform_device *pdev) | |||
101 | if (ret) | 100 | if (ret) |
102 | return ret; | 101 | return ret; |
103 | } else if (pdata) { | 102 | } else if (pdata) { |
104 | clk_name = pdata->power_clk_name; | ||
105 | rfkill->name = pdata->name; | 103 | rfkill->name = pdata->name; |
106 | rfkill->type = pdata->type; | 104 | rfkill->type = pdata->type; |
107 | } else { | 105 | } else { |
@@ -120,7 +118,7 @@ static int rfkill_gpio_probe(struct platform_device *pdev) | |||
120 | snprintf(rfkill->reset_name, len + 6 , "%s_reset", rfkill->name); | 118 | snprintf(rfkill->reset_name, len + 6 , "%s_reset", rfkill->name); |
121 | snprintf(rfkill->shutdown_name, len + 9, "%s_shutdown", rfkill->name); | 119 | snprintf(rfkill->shutdown_name, len + 9, "%s_shutdown", rfkill->name); |
122 | 120 | ||
123 | rfkill->clk = devm_clk_get(&pdev->dev, clk_name); | 121 | rfkill->clk = devm_clk_get(&pdev->dev, NULL); |
124 | 122 | ||
125 | gpio = devm_gpiod_get_index(&pdev->dev, rfkill->reset_name, 0); | 123 | gpio = devm_gpiod_get_index(&pdev->dev, rfkill->reset_name, 0); |
126 | if (!IS_ERR(gpio)) { | 124 | if (!IS_ERR(gpio)) { |
@@ -146,14 +144,6 @@ static int rfkill_gpio_probe(struct platform_device *pdev) | |||
146 | return -EINVAL; | 144 | return -EINVAL; |
147 | } | 145 | } |
148 | 146 | ||
149 | if (pdata && pdata->gpio_runtime_setup) { | ||
150 | ret = pdata->gpio_runtime_setup(pdev); | ||
151 | if (ret) { | ||
152 | dev_err(&pdev->dev, "can't set up gpio\n"); | ||
153 | return ret; | ||
154 | } | ||
155 | } | ||
156 | |||
157 | rfkill->rfkill_dev = rfkill_alloc(rfkill->name, &pdev->dev, | 147 | rfkill->rfkill_dev = rfkill_alloc(rfkill->name, &pdev->dev, |
158 | rfkill->type, &rfkill_gpio_ops, | 148 | rfkill->type, &rfkill_gpio_ops, |
159 | rfkill); | 149 | rfkill); |
@@ -174,10 +164,7 @@ static int rfkill_gpio_probe(struct platform_device *pdev) | |||
174 | static int rfkill_gpio_remove(struct platform_device *pdev) | 164 | static int rfkill_gpio_remove(struct platform_device *pdev) |
175 | { | 165 | { |
176 | struct rfkill_gpio_data *rfkill = platform_get_drvdata(pdev); | 166 | struct rfkill_gpio_data *rfkill = platform_get_drvdata(pdev); |
177 | struct rfkill_gpio_platform_data *pdata = pdev->dev.platform_data; | ||
178 | 167 | ||
179 | if (pdata && pdata->gpio_runtime_close) | ||
180 | pdata->gpio_runtime_close(pdev); | ||
181 | rfkill_unregister(rfkill->rfkill_dev); | 168 | rfkill_unregister(rfkill->rfkill_dev); |
182 | rfkill_destroy(rfkill->rfkill_dev); | 169 | rfkill_destroy(rfkill->rfkill_dev); |
183 | 170 | ||