From: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Russell King <rmk+kernel-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>,
Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] iommu: convert DT component matching to component_match_add_release()
Date: Fri, 3 Jun 2016 15:13:00 +0200 [thread overview]
Message-ID: <5751825C.40703@gmail.com> (raw)
In-Reply-To: <E1b8jzj-00046r-Pd-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org>
On 03/06/16 09:58, Russell King wrote:
> Convert DT component matching to use component_match_add_release().
>
> Signed-off-by: Russell King <rmk+kernel-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>
> ---
Reviewed-by: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> drivers/iommu/mtk_iommu.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
> index c3043d8754e3..c036df1c49ca 100644
> --- a/drivers/iommu/mtk_iommu.c
> +++ b/drivers/iommu/mtk_iommu.c
> @@ -557,6 +557,11 @@ static int compare_of(struct device *dev, void *data)
> return dev->of_node == data;
> }
>
> +static void release_of(struct device *dev, void *data)
> +{
> + of_node_put(data);
> +}
> +
> static int mtk_iommu_bind(struct device *dev)
> {
> struct mtk_iommu_data *data = dev_get_drvdata(dev);
> @@ -630,17 +635,19 @@ static int mtk_iommu_probe(struct platform_device *pdev)
> continue;
>
> plarbdev = of_find_device_by_node(larbnode);
> - of_node_put(larbnode);
> if (!plarbdev) {
> plarbdev = of_platform_device_create(
> larbnode, NULL,
> platform_bus_type.dev_root);
> - if (!plarbdev)
> + if (!plarbdev) {
> + of_node_put(larbnode);
> return -EPROBE_DEFER;
> + }
> }
> data->smi_imu.larb_imu[i].dev = &plarbdev->dev;
>
> - component_match_add(dev, &match, compare_of, larbnode);
> + component_match_add_release(dev, &match, release_of,
> + compare_of, larbnode);
> }
>
> platform_set_drvdata(pdev, data);
>
WARNING: multiple messages have this Message-ID (diff)
From: matthias.bgg@gmail.com (Matthias Brugger)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] iommu: convert DT component matching to component_match_add_release()
Date: Fri, 3 Jun 2016 15:13:00 +0200 [thread overview]
Message-ID: <5751825C.40703@gmail.com> (raw)
In-Reply-To: <E1b8jzj-00046r-Pd@rmk-PC.armlinux.org.uk>
On 03/06/16 09:58, Russell King wrote:
> Convert DT component matching to use component_match_add_release().
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> ---
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
> drivers/iommu/mtk_iommu.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
> index c3043d8754e3..c036df1c49ca 100644
> --- a/drivers/iommu/mtk_iommu.c
> +++ b/drivers/iommu/mtk_iommu.c
> @@ -557,6 +557,11 @@ static int compare_of(struct device *dev, void *data)
> return dev->of_node == data;
> }
>
> +static void release_of(struct device *dev, void *data)
> +{
> + of_node_put(data);
> +}
> +
> static int mtk_iommu_bind(struct device *dev)
> {
> struct mtk_iommu_data *data = dev_get_drvdata(dev);
> @@ -630,17 +635,19 @@ static int mtk_iommu_probe(struct platform_device *pdev)
> continue;
>
> plarbdev = of_find_device_by_node(larbnode);
> - of_node_put(larbnode);
> if (!plarbdev) {
> plarbdev = of_platform_device_create(
> larbnode, NULL,
> platform_bus_type.dev_root);
> - if (!plarbdev)
> + if (!plarbdev) {
> + of_node_put(larbnode);
> return -EPROBE_DEFER;
> + }
> }
> data->smi_imu.larb_imu[i].dev = &plarbdev->dev;
>
> - component_match_add(dev, &match, compare_of, larbnode);
> + component_match_add_release(dev, &match, release_of,
> + compare_of, larbnode);
> }
>
> platform_set_drvdata(pdev, data);
>
next prev parent reply other threads:[~2016-06-03 13:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 7:58 [PATCH] iommu: convert DT component matching to component_match_add_release() Russell King
2016-06-03 7:58 ` Russell King
[not found] ` <E1b8jzj-00046r-Pd-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org>
2016-06-03 13:13 ` Matthias Brugger [this message]
2016-06-03 13:13 ` Matthias Brugger
-- strict thread matches above, loose matches on Subject: below --
2016-10-19 10:30 Russell King
2016-10-19 10:30 ` Russell King
[not found] ` <E1bwo8o-0005LV-54-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org>
2016-11-10 11:25 ` Joerg Roedel
2016-11-10 11:25 ` Joerg Roedel
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=5751825C.40703@gmail.com \
--to=matthias.bgg-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=rmk+kernel-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.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.