* [PATCH v4 4/5] dt/s3c64xx/spi: Use of_get_child_by_name to get a named child
@ 2012-09-18 7:10 Srinivas KANDAGATLA
[not found] ` <1347952249-24672-1-git-send-email-srinivas.kandagatla-qxv4g6HH51o@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Srinivas KANDAGATLA @ 2012-09-18 7:10 UTC (permalink / raw)
To: ben-linux-elnMNo+KYs3YtjvyW6yDsg
Cc: kgene.kim-Sze3O3UU22JBDgjK7y7TUQ,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E
From: Srinivas Kandagatla <srinivas.kandagatla-qxv4g6HH51o@public.gmane.org>
As follow-up to "dt: introduce of_get_child_by_name to get child node by
name." patch, This patch removes some of the code duplication in the
driver by replacing it with of_get_child_by_name instead.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla-qxv4g6HH51o@public.gmane.org>
---
drivers/spi/spi-s3c64xx.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index d1c8441..f226f33 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -835,9 +835,7 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata(
return ERR_PTR(-EINVAL);
}
- for_each_child_of_node(slave_np, data_np)
- if (!strcmp(data_np->name, "controller-data"))
- break;
+ data_np = of_get_child_by_name(slave_np, "controller-data");
if (!data_np) {
dev_err(&spi->dev, "child node 'controller-data' not found\n");
return ERR_PTR(-EINVAL);
@@ -847,6 +845,7 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata(
if (!cs) {
dev_err(&spi->dev, "could not allocate memory for controller"
" data\n");
+ of_node_put(data_np);
return ERR_PTR(-ENOMEM);
}
@@ -855,11 +854,13 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata(
dev_err(&spi->dev, "chip select gpio is not specified or "
"invalid\n");
kfree(cs);
+ of_node_put(data_np);
return ERR_PTR(-EINVAL);
}
of_property_read_u32(data_np, "samsung,spi-feedback-delay", &fb_delay);
cs->fb_delay = fb_delay;
+ of_node_put(data_np);
return cs;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v4 4/5] dt/s3c64xx/spi: Use of_get_child_by_name to get a named child
[not found] ` <1347952249-24672-1-git-send-email-srinivas.kandagatla-qxv4g6HH51o@public.gmane.org>
@ 2012-09-22 16:07 ` Mark Brown
[not found] ` <20120922160732.GT4495-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2012-09-22 16:07 UTC (permalink / raw)
To: Srinivas KANDAGATLA
Cc: kgene.kim-Sze3O3UU22JBDgjK7y7TUQ,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
ben-linux-elnMNo+KYs3YtjvyW6yDsg
On Tue, Sep 18, 2012 at 08:10:49AM +0100, Srinivas KANDAGATLA wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla-qxv4g6HH51o@public.gmane.org>
>
> As follow-up to "dt: introduce of_get_child_by_name to get child node by
> name." patch, This patch removes some of the code duplication in the
> driver by replacing it with of_get_child_by_name instead.
Applied, thanks. Please do use subject lines consistent with the thing
you're submitting against.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 4/5] dt/s3c64xx/spi: Use of_get_child_by_name to get a named child
[not found] ` <20120922160732.GT4495-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
@ 2012-09-24 12:51 ` Rob Herring
[not found] ` <5060576D.1020905-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2012-09-24 12:51 UTC (permalink / raw)
To: Mark Brown
Cc: kgene.kim-Sze3O3UU22JBDgjK7y7TUQ,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
ben-linux-elnMNo+KYs3YtjvyW6yDsg
On 09/22/2012 11:07 AM, Mark Brown wrote:
> On Tue, Sep 18, 2012 at 08:10:49AM +0100, Srinivas KANDAGATLA wrote:
>> From: Srinivas Kandagatla <srinivas.kandagatla-qxv4g6HH51o@public.gmane.org>
>>
>> As follow-up to "dt: introduce of_get_child_by_name to get child node by
>> name." patch, This patch removes some of the code duplication in the
>> driver by replacing it with of_get_child_by_name instead.
>
> Applied, thanks. Please do use subject lines consistent with the thing
> you're submitting against.
This dependency here is not yet applied. I was waiting for some acks for
some other conversions in the series. I can take it or ack the
dependency. Probably makes more sense for me to take it as there are
other non-spi patches.
Rob
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 4/5] dt/s3c64xx/spi: Use of_get_child_by_name to get a named child
[not found] ` <5060576D.1020905-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2012-09-25 11:06 ` Mark Brown
[not found] ` <20120925110618.GA4428-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2012-09-25 11:06 UTC (permalink / raw)
To: Rob Herring
Cc: kgene.kim-Sze3O3UU22JBDgjK7y7TUQ,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
ben-linux-elnMNo+KYs3YtjvyW6yDsg
On Mon, Sep 24, 2012 at 07:51:57AM -0500, Rob Herring wrote:
> On 09/22/2012 11:07 AM, Mark Brown wrote:
> > On Tue, Sep 18, 2012 at 08:10:49AM +0100, Srinivas KANDAGATLA wrote:
> >> As follow-up to "dt: introduce of_get_child_by_name to get child node by
> >> name." patch, This patch removes some of the code duplication in the
> >> driver by replacing it with of_get_child_by_name instead.
> > Applied, thanks. Please do use subject lines consistent with the thing
> > you're submitting against.
> This dependency here is not yet applied. I was waiting for some acks for
> some other conversions in the series. I can take it or ack the
> dependency. Probably makes more sense for me to take it as there are
> other non-spi patches.
Ugh, this isn't in mainline... looking at the original posting I see
this wasn't sent as a threaded patch series, it was sent as a bunch of
separate patches, so this got detached from the rest of the series. I
discarded the patch.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 4/5] dt/s3c64xx/spi: Use of_get_child_by_name to get a named child
[not found] ` <20120925110618.GA4428-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
@ 2012-10-02 14:26 ` Rob Herring
[not found] ` <506AF9A0.1030801-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2012-10-02 14:26 UTC (permalink / raw)
To: Mark Brown, Srinivas KANDAGATLA
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
kgene.kim-Sze3O3UU22JBDgjK7y7TUQ,
ben-linux-elnMNo+KYs3YtjvyW6yDsg
On 09/25/2012 06:06 AM, Mark Brown wrote:
> On Mon, Sep 24, 2012 at 07:51:57AM -0500, Rob Herring wrote:
>> On 09/22/2012 11:07 AM, Mark Brown wrote:
>>> On Tue, Sep 18, 2012 at 08:10:49AM +0100, Srinivas KANDAGATLA wrote:
>
>>>> As follow-up to "dt: introduce of_get_child_by_name to get child node by
>>>> name." patch, This patch removes some of the code duplication in the
>>>> driver by replacing it with of_get_child_by_name instead.
>
>>> Applied, thanks. Please do use subject lines consistent with the thing
>>> you're submitting against.
>
>> This dependency here is not yet applied. I was waiting for some acks for
>> some other conversions in the series. I can take it or ack the
>> dependency. Probably makes more sense for me to take it as there are
>> other non-spi patches.
>
> Ugh, this isn't in mainline... looking at the original posting I see
> this wasn't sent as a threaded patch series, it was sent as a bunch of
> separate patches, so this got detached from the rest of the series. I
> discarded the patch.
I've applied this one and it's dependency.
Rob
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH v4 4/5] dt/s3c64xx/spi: Use of_get_child_by_name to get a named child
[not found] ` <506AF9A0.1030801-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2012-10-17 7:13 ` Kukjin Kim
0 siblings, 0 replies; 6+ messages in thread
From: Kukjin Kim @ 2012-10-17 7:13 UTC (permalink / raw)
To: 'Rob Herring', 'Mark Brown',
'Srinivas KANDAGATLA'
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
ben-linux-elnMNo+KYs3YtjvyW6yDsg
Rob Herring wrote:
>
> On 09/25/2012 06:06 AM, Mark Brown wrote:
> > On Mon, Sep 24, 2012 at 07:51:57AM -0500, Rob Herring wrote:
> >> On 09/22/2012 11:07 AM, Mark Brown wrote:
> >>> On Tue, Sep 18, 2012 at 08:10:49AM +0100, Srinivas KANDAGATLA wrote:
> >
> >>>> As follow-up to "dt: introduce of_get_child_by_name to get child node
> by
> >>>> name." patch, This patch removes some of the code duplication in the
> >>>> driver by replacing it with of_get_child_by_name instead.
> >
> >>> Applied, thanks. Please do use subject lines consistent with the
> thing
> >>> you're submitting against.
> >
> >> This dependency here is not yet applied. I was waiting for some acks
> for
> >> some other conversions in the series. I can take it or ack the
> >> dependency. Probably makes more sense for me to take it as there are
> >> other non-spi patches.
> >
> > Ugh, this isn't in mainline... looking at the original posting I see
> > this wasn't sent as a threaded patch series, it was sent as a bunch of
> > separate patches, so this got detached from the rest of the series. I
> > discarded the patch.
>
> I've applied this one and it's dependency.
>
Just note, happens following error with non-DT such as s3c6400_defconfig...
LD drivers/mmc/built-in.o
drivers/spi/spi-s3c64xx.c: In function 's3c64xx_get_slave_ctrldata':
drivers/spi/spi-s3c64xx.c:838: error: implicit declaration of function
'of_get_child_by_name'
drivers/spi/spi-s3c64xx.c:838: warning: assignment makes pointer from
integer without a cast
make[3]: *** [drivers/spi/spi-s3c64xx.o] Error 1
make[2]: *** [drivers/spi] Error 2
I'm not sure anyone is fixing it now?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-10-17 7:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-18 7:10 [PATCH v4 4/5] dt/s3c64xx/spi: Use of_get_child_by_name to get a named child Srinivas KANDAGATLA
[not found] ` <1347952249-24672-1-git-send-email-srinivas.kandagatla-qxv4g6HH51o@public.gmane.org>
2012-09-22 16:07 ` Mark Brown
[not found] ` <20120922160732.GT4495-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-09-24 12:51 ` Rob Herring
[not found] ` <5060576D.1020905-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-09-25 11:06 ` Mark Brown
[not found] ` <20120925110618.GA4428-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-10-02 14:26 ` Rob Herring
[not found] ` <506AF9A0.1030801-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-17 7:13 ` Kukjin Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).