summaryrefslogtreecommitdiff
path: root/drivers/misc/modem_if
diff options
context:
space:
mode:
authorBeomho Seo <beomho.seo@samsung.com>2014-04-18 18:31:24 +0900
committerBeomho Seo <beomho.seo@samsung.com>2014-04-18 18:31:24 +0900
commit47c53475bf07dc2abb09a816b95f12b0be996bed (patch)
treedc26b97d3669384414f56789d19c431a8374a9a6 /drivers/misc/modem_if
parent11818686d5f9284b42d040fba814daca80cb3f28 (diff)
downloadlinux-3.10-47c53475bf07dc2abb09a816b95f12b0be996bed.tar.gz
linux-3.10-47c53475bf07dc2abb09a816b95f12b0be996bed.tar.bz2
linux-3.10-47c53475bf07dc2abb09a816b95f12b0be996bed.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/misc/modem_if')
-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;