From 5c441978a41fc49ceb4da56d37e951e161d94a68 Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Mon, 30 Jul 2012 14:40:37 -0700 Subject: [PATCH] --- yaml --- r: 319916 b: refs/heads/master c: f673934c615987abe16919ede8fcd3ff6805d0d6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/video/backlight/ot200_bl.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 97edeeffb747..8c26597808aa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5f9dd5c9fd4efacc9f8c36c0b3c17a4308bbe4d9 +refs/heads/master: f673934c615987abe16919ede8fcd3ff6805d0d6 diff --git a/trunk/drivers/video/backlight/ot200_bl.c b/trunk/drivers/video/backlight/ot200_bl.c index ef637ffc0799..469cf0f109d2 100644 --- a/trunk/drivers/video/backlight/ot200_bl.c +++ b/trunk/drivers/video/backlight/ot200_bl.c @@ -84,7 +84,8 @@ static int ot200_backlight_probe(struct platform_device *pdev) int retval = 0; /* request gpio */ - if (gpio_request(GPIO_DIMM, "ot200 backlight dimmer") < 0) { + if (devm_gpio_request(&pdev->dev, GPIO_DIMM, + "ot200 backlight dimmer") < 0) { dev_err(&pdev->dev, "failed to request GPIO %d\n", GPIO_DIMM); return -ENODEV; } @@ -93,8 +94,7 @@ static int ot200_backlight_probe(struct platform_device *pdev) pwm_timer = cs5535_mfgpt_alloc_timer(7, MFGPT_DOMAIN_ANY); if (!pwm_timer) { dev_err(&pdev->dev, "MFGPT 7 not available\n"); - retval = -ENODEV; - goto error_mfgpt_alloc; + return -ENODEV; } data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); @@ -131,8 +131,6 @@ static int ot200_backlight_probe(struct platform_device *pdev) error_devm_kzalloc: cs5535_mfgpt_free_timer(pwm_timer); -error_mfgpt_alloc: - gpio_free(GPIO_DIMM); return retval; } @@ -149,7 +147,6 @@ static int ot200_backlight_remove(struct platform_device *pdev) MAX_COMP2 - dim_table[100]); cs5535_mfgpt_free_timer(pwm_timer); - gpio_free(GPIO_DIMM); return 0; }