summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBeomho Seo <beomho.seo@samsung.com>2014-04-18 18:31:24 +0900
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:47:29 +0900
commit07a6899fe7d43d4bcba7f762a26c81204c6c004b (patch)
tree9f731fc31b273954d0a38afe60eab2e0b852f4d0 /drivers
parent4d1f96558877a05d54b928a18fd5b4a00a85f279 (diff)
downloadlinux-3.10-07a6899fe7d43d4bcba7f762a26c81204c6c004b.tar.gz
linux-3.10-07a6899fe7d43d4bcba7f762a26c81204c6c004b.tar.bz2
linux-3.10-07a6899fe7d43d4bcba7f762a26c81204c6c004b.zip
modem_if: Change hardcoded link enable gpio value
Currently, link enable gpio is hardecoded to zero. Zero equal gpa0-0 value. It is value for uart rxd line. If link enable gpio is unused, it is don't have to call gpio request. This patch change to set line enable gpio value optionally, and remove unused variable 'ret'. Change-Id: I4095d57d76362722abd5c5fd92ef529772680d97 Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/modem_if/sipc4_modem.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/misc/modem_if/sipc4_modem.c b/drivers/misc/modem_if/sipc4_modem.c
index c4cd872526e..89892fa2481 100644
--- a/drivers/misc/modem_if/sipc4_modem.c
+++ b/drivers/misc/modem_if/sipc4_modem.c
@@ -416,12 +416,10 @@ static struct modem_data *modem_parse_dt(struct platform_device *pdev, struct de
mc->link_pm_data->gpio_link_enable = of_get_named_gpio(np, "link-enable-gpio", 0);
/* link enable is optional */
-/* if (!gpio_is_valid(mc->link_pm_data->gpio_link_enable)) {
- mif_err("failed to get link-enable gpio\n");
- return ERR_PTR(-EINVAL);
- }*/
+ if (gpio_is_valid(mc->link_pm_data->gpio_link_enable))
+ devm_gpio_request(&pdev->dev, mc->link_pm_data->gpio_link_enable,
+ "gpio_link_enable");
- mc->link_pm_data->gpio_link_enable = 0;
devm_gpio_request(&pdev->dev, mc->gpio_reset_req_n, "gpio_reset_req_n");
devm_gpio_request(&pdev->dev, mc->gpio_cp_on, "gpio_cp_on");
@@ -432,7 +430,6 @@ static struct modem_data *modem_parse_dt(struct platform_device *pdev, struct de
devm_gpio_request(&pdev->dev, mc->link_pm_data->gpio_link_slavewake, "gpio_link_slavewake");
devm_gpio_request(&pdev->dev, mc->link_pm_data->gpio_link_hostwake, "gpio_link_hostwake");
devm_gpio_request(&pdev->dev, mc->link_pm_data->gpio_link_active, "gpio_link_active");
- devm_gpio_request(&pdev->dev, mc->link_pm_data->gpio_link_enable, "gpio_link_enable");
platform_set_drvdata(pdev, mc);
@@ -449,7 +446,7 @@ dt_parse_err:
static int modem_probe(struct platform_device *pdev)
{
- int i, ret;
+ int i;
struct modem_data *pdata = pdev->dev.platform_data;
struct modem_shared *msd = NULL;
struct modem_ctl *modemctl = NULL;