From: Chanwoo Choi <cw00.choi@samsung.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] extcon: int3496: Switch to devm_acpi_dev_add_driver_gpios()
Date: Mon, 12 Jun 2017 10:01:04 +0900 [thread overview]
Message-ID: <593DE7D0.6010809@samsung.com> (raw)
In-Reply-To: <20170610190921.53567-1-andriy.shevchenko@linux.intel.com>
On 2017년 06월 11일 04:09, Andy Shevchenko wrote:
> Switch to use managed variant of acpi_dev_add_driver_gpios() to simplify
> error path and fix potentially wrong assingment if ->probe() fails.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/extcon/extcon-intel-int3496.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/extcon/extcon-intel-int3496.c b/drivers/extcon/extcon-intel-int3496.c
> index 9d17984bbbd4..d9f9afe45961 100644
> --- a/drivers/extcon/extcon-intel-int3496.c
> +++ b/drivers/extcon/extcon-intel-int3496.c
> @@ -94,8 +94,7 @@ static int int3496_probe(struct platform_device *pdev)
> struct int3496_data *data;
> int ret;
>
> - ret = acpi_dev_add_driver_gpios(ACPI_COMPANION(dev),
> - acpi_int3496_default_gpios);
> + ret = devm_acpi_dev_add_driver_gpios(dev, acpi_int3496_default_gpios);
> if (ret) {
> dev_err(dev, "can't add GPIO ACPI mapping\n");
> return ret;
> @@ -169,8 +168,6 @@ static int int3496_remove(struct platform_device *pdev)
> devm_free_irq(&pdev->dev, data->usb_id_irq, data);
> cancel_delayed_work_sync(&data->work);
>
> - acpi_dev_remove_driver_gpios(ACPI_COMPANION(&pdev->dev));
> -
> return 0;
> }
>
>
Applied it. Thanks.
--
Best Regards,
Chanwoo Choi
Samsung Electronics
prev parent reply other threads:[~2017-06-12 1:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170610190957epcas5p1310ebdee45e6e0d94ac0ae8aafb53239@epcas5p1.samsung.com>
2017-06-10 19:09 ` [PATCH v1] extcon: int3496: Switch to devm_acpi_dev_add_driver_gpios() Andy Shevchenko
2017-06-12 1:01 ` Chanwoo Choi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=593DE7D0.6010809@samsung.com \
--to=cw00.choi@samsung.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox