All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 12/15] mfd: qcom-spmi-pmic: use devm_of_platform_populate()
Date: Tue, 30 May 2017 10:32:03 +0100	[thread overview]
Message-ID: <20170530093203.fcnhpcexgdzpykl7@dell> (raw)
In-Reply-To: <1496072763-31209-13-git-send-email-benjamin.gaignard@linaro.org>

On Mon, 29 May 2017, Benjamin Gaignard wrote:

> Usage of  devm_of_platform_populate() simplify driver code
> by allowing to delete pmic_spmi_remove().
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> 
> CC: Lee Jones <lee.jones@linaro.org>
> CC: linux-kernel@vger.kernel.org
> ---
>  drivers/mfd/qcom-spmi-pmic.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/qcom-spmi-pmic.c b/drivers/mfd/qcom-spmi-pmic.c
> index 8653e8b..2022bdf 100644
> --- a/drivers/mfd/qcom-spmi-pmic.c
> +++ b/drivers/mfd/qcom-spmi-pmic.c
> @@ -120,7 +120,6 @@ static void pmic_spmi_show_revid(struct regmap *map, struct device *dev)
>  
>  static int pmic_spmi_probe(struct spmi_device *sdev)
>  {
> -	struct device_node *root = sdev->dev.of_node;
>  	struct regmap *regmap;
>  
>  	regmap = devm_regmap_init_spmi_ext(sdev, &spmi_regmap_config);
> @@ -131,19 +130,13 @@ static int pmic_spmi_probe(struct spmi_device *sdev)
>  	if (sdev->usid % 2 == 0)
>  		pmic_spmi_show_revid(regmap, &sdev->dev);
>  
> -	return of_platform_populate(root, NULL, NULL, &sdev->dev);
> -}
> -
> -static void pmic_spmi_remove(struct spmi_device *sdev)
> -{
> -	of_platform_depopulate(&sdev->dev);
> +	return devm_of_platform_populate(&sdev->dev);
>  }
>  
>  MODULE_DEVICE_TABLE(of, pmic_spmi_id_table);
>  
>  static struct spmi_driver pmic_spmi_driver = {
>  	.probe = pmic_spmi_probe,
> -	.remove = pmic_spmi_remove,
>  	.driver = {
>  		.name = "pmic-spmi",
>  		.of_match_table = pmic_spmi_id_table,

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2017-05-30  9:32 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-29 15:45 [PATCH 00/15] make more driver use devm_of_platform_populate() Benjamin Gaignard
2017-05-29 15:45 ` Benjamin Gaignard
2017-05-29 15:45 ` Benjamin Gaignard
2017-05-29 15:45 ` Benjamin Gaignard
2017-05-29 15:45 ` Benjamin Gaignard
2017-05-29 15:45 ` [PATCH 01/15] iio: adc: stm32: " Benjamin Gaignard
2017-05-29 15:45   ` Benjamin Gaignard
2017-05-29 15:45   ` Benjamin Gaignard
2017-05-29 16:00   ` Jonathan Cameron
2017-05-29 16:00     ` Jonathan Cameron
2017-05-29 16:03   ` Fabrice Gasnier
2017-05-29 16:03     ` Fabrice Gasnier
2017-05-29 15:45 ` [PATCH 02/15] iio: dac: " Benjamin Gaignard
2017-05-29 15:45   ` Benjamin Gaignard
2017-05-29 15:45   ` Benjamin Gaignard
2017-05-29 16:10   ` Fabrice Gasnier
2017-05-29 16:10     ` Fabrice Gasnier
2017-05-29 15:45 ` [PATCH 03/15] drm: zte: " Benjamin Gaignard
2017-05-29 15:45   ` Benjamin Gaignard
2017-06-05  1:59   ` Shawn Guo
2017-06-05  1:59     ` Shawn Guo
2017-05-29 15:45 ` [PATCH 04/15] drm: msm: " Benjamin Gaignard
2017-05-29 15:45   ` Benjamin Gaignard
2017-05-29 15:45 ` [PATCH 05/15] mfd: stm32-timers: use devm_of_platform_populate Benjamin Gaignard
2017-05-29 15:45   ` Benjamin Gaignard
2017-05-30  9:29   ` Lee Jones
2017-05-30  9:29     ` Lee Jones
2017-05-29 15:45 ` [PATCH 06/15] mfd: atmel: use devm_of_platform_populate() Benjamin Gaignard
2017-05-30  9:30   ` Lee Jones
2017-05-29 15:45 ` [PATCH 07/15] mfd: cros_ec: " Benjamin Gaignard
2017-05-30  9:30   ` Lee Jones
2017-05-29 15:45 ` [PATCH 08/15] mfd: exynos: " Benjamin Gaignard
2017-05-29 15:45   ` Benjamin Gaignard
2017-05-29 15:45   ` Benjamin Gaignard
2017-05-30  9:31   ` Lee Jones
2017-05-30  9:31     ` Lee Jones
2017-05-29 15:45 ` [PATCH 09/15] mfd: fsl-imx25: " Benjamin Gaignard
2017-05-30  9:31   ` Lee Jones
2017-05-29 15:45 ` [PATCH 10/15] mfd: motorola-cpcap: " Benjamin Gaignard
2017-05-29 22:07   ` Andy Shevchenko
2017-05-30  7:29     ` Benjamin Gaignard
2017-05-30 10:03     ` Lee Jones
2017-05-30 10:46       ` Andy Shevchenko
2017-05-30 10:09   ` Lee Jones
2017-05-29 15:45 ` [PATCH 11/15] mfd: palmas: " Benjamin Gaignard
2017-05-30  9:31   ` Lee Jones
2017-05-29 15:46 ` [PATCH 12/15] mfd: qcom-spmi-pmic: " Benjamin Gaignard
2017-05-30  9:32   ` Lee Jones [this message]
2017-05-29 15:46 ` [PATCH 13/15] mfd: smsc-ece: " Benjamin Gaignard
2017-05-30  9:32   ` Lee Jones
2017-05-29 15:46 ` [PATCH 14/15] sound: stm32: " Benjamin Gaignard
2017-05-29 15:46   ` Benjamin Gaignard
2017-05-29 15:46   ` Benjamin Gaignard
2017-05-30  9:03   ` Olivier MOYSAN
2017-05-30  9:03     ` Olivier MOYSAN
2017-05-30  9:03     ` Olivier MOYSAN
2017-05-29 15:46 ` [PATCH 15/15] media: exynos4-is: " Benjamin Gaignard
2017-05-29 15:46   ` Benjamin Gaignard
2017-05-29 15:46   ` Benjamin Gaignard
2017-05-29 15:46   ` Benjamin Gaignard

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=20170530093203.fcnhpcexgdzpykl7@dell \
    --to=lee.jones@linaro.org \
    --cc=benjamin.gaignard@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.