All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pawel Moll <Pawel.Moll@arm.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: "arm@kernel.org" <arm@kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH 05/12] GPIO: gpio-generic: Add label to platform data
Date: Tue, 11 Feb 2014 17:20:56 +0000	[thread overview]
Message-ID: <1392139256.3380.45.camel@hornet> (raw)
In-Reply-To: <20140211171721.GE15081@lee--X1>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 1994 bytes --]

On Tue, 2014-02-11 at 17:17 +0000, Lee Jones wrote:
> > When registering more than one platform device, it is
> > useful to set the gpio chip label in the platform data.
> >
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Cc: Alexandre Courbot <gnurou@gmail.com>
> > Cc: Samuel Ortiz <sameo@linux.intel.com>
> > Cc: Lee Jones <lee.jones@linaro.org>
> > Signed-off-by: Pawel Moll <pawel.moll@arm.com>
> > ---
> > This patch has been already merged by Linux; it has been included
> > for completeness only.
> >
> >  drivers/gpio/gpio-generic.c     | 2 ++
> >  include/linux/basic_mmio_gpio.h | 1 +
> >  2 files changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
> > index d2196bf..8c778af 100644
> > --- a/drivers/gpio/gpio-generic.c
> > +++ b/drivers/gpio/gpio-generic.c
> > @@ -531,6 +531,8 @@ static int bgpio_pdev_probe(struct platform_device *pdev)
> >             return err;
> >
> >     if (pdata) {
> > +           if (pdata->label)
>
> Why is this check necessary?
>
> > +                   bgc->gc.label = pdata->label;

Because bgc->gc.label is initialized to a default value in bgpio_init()
and I don't want to override it with NULL if there is no label passed in
the platform data.

Pawel

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2548782
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

WARNING: multiple messages have this Message-ID (diff)
From: Pawel.Moll@arm.com (Pawel Moll)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/12] GPIO: gpio-generic: Add label to platform data
Date: Tue, 11 Feb 2014 17:20:56 +0000	[thread overview]
Message-ID: <1392139256.3380.45.camel@hornet> (raw)
In-Reply-To: <20140211171721.GE15081@lee--X1>

On Tue, 2014-02-11 at 17:17 +0000, Lee Jones wrote:
> > When registering more than one platform device, it is
> > useful to set the gpio chip label in the platform data.
> >
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Cc: Alexandre Courbot <gnurou@gmail.com>
> > Cc: Samuel Ortiz <sameo@linux.intel.com>
> > Cc: Lee Jones <lee.jones@linaro.org>
> > Signed-off-by: Pawel Moll <pawel.moll@arm.com>
> > ---
> > This patch has been already merged by Linux; it has been included
> > for completeness only.
> >
> >  drivers/gpio/gpio-generic.c     | 2 ++
> >  include/linux/basic_mmio_gpio.h | 1 +
> >  2 files changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
> > index d2196bf..8c778af 100644
> > --- a/drivers/gpio/gpio-generic.c
> > +++ b/drivers/gpio/gpio-generic.c
> > @@ -531,6 +531,8 @@ static int bgpio_pdev_probe(struct platform_device *pdev)
> >             return err;
> >
> >     if (pdata) {
> > +           if (pdata->label)
>
> Why is this check necessary?
>
> > +                   bgc->gc.label = pdata->label;

Because bgc->gc.label is initialized to a default value in bgpio_init()
and I don't want to override it with NULL if there is no label passed in
the platform data.

Pawel

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2548782

  reply	other threads:[~2014-02-11 17:22 UTC|newest]

Thread overview: 112+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 17:10 [PATCH 00/12] Versatile Express updates Pawel Moll
2014-02-11 17:10 ` [lm-sensors] " Pawel Moll
2014-02-11 17:10 ` Pawel Moll
2014-02-11 17:10 ` [PATCH 01/12] misc: vexpress-syscfg: Add udelay-based delay Pawel Moll
2014-02-11 17:10   ` Pawel Moll
2014-02-15 19:19   ` Greg Kroah-Hartman
2014-02-15 19:19     ` Greg Kroah-Hartman
2014-02-11 17:10 ` [PATCH 02/12] power/reset: vexpress: Use udelay instead of timers Pawel Moll
2014-02-11 17:10   ` Pawel Moll
2014-02-11 20:59   ` Arnd Bergmann
2014-02-11 20:59     ` Arnd Bergmann
2014-02-12 11:56     ` Pawel Moll
2014-02-12 11:56       ` Pawel Moll
2014-02-11 17:10 ` [PATCH 03/12] clk: versatile: Split config options for sp810 and vexpress_osc Pawel Moll
2014-02-11 17:10   ` Pawel Moll
2014-02-11 17:10 ` [PATCH 04/12] clocksource: Sched clock source for Versatile Express Pawel Moll
2014-02-11 17:10   ` Pawel Moll
2014-04-16 13:56   ` Rob Herring
2014-04-16 13:56     ` Rob Herring
2014-04-16 14:22     ` Pawel Moll
2014-04-16 14:22       ` Pawel Moll
2014-04-16 14:45       ` Rob Herring
2014-04-16 14:45         ` Rob Herring
2014-04-16 15:05         ` Pawel Moll
2014-04-16 15:05           ` Pawel Moll
2014-05-02 22:14   ` Linus Walleij
2014-05-02 22:14     ` Linus Walleij
2014-05-07  9:57     ` Pawel Moll
2014-05-07  9:57       ` Pawel Moll
2014-05-13  8:47       ` Linus Walleij
2014-05-13  8:47         ` Linus Walleij
2014-02-11 17:10 ` [PATCH 05/12] GPIO: gpio-generic: Add label to platform data Pawel Moll
2014-02-11 17:10   ` Pawel Moll
2014-02-11 17:17   ` Lee Jones
2014-02-11 17:17     ` Lee Jones
2014-02-11 17:20     ` Pawel Moll [this message]
2014-02-11 17:20       ` Pawel Moll
2014-02-11 17:29       ` Pawel Moll
2014-02-11 17:29         ` Pawel Moll
2014-02-11 17:46       ` Lee Jones
2014-02-11 17:46         ` Lee Jones
2014-02-11 17:10 ` [PATCH 06/12] mfd: vexpress-sysreg: Add labels to gpio banks Pawel Moll
2014-02-11 17:10   ` Pawel Moll
2014-02-11 17:19   ` Lee Jones
2014-02-11 17:19     ` Lee Jones
2014-02-13 13:08   ` Linus Walleij
2014-02-13 13:08     ` Linus Walleij
2014-02-13 13:11     ` Pawel Moll
2014-02-13 13:11       ` Pawel Moll
2014-02-11 17:10 ` [PATCH 07/12] mfd: syscon: Consider platform data a regmap config name Pawel Moll
2014-02-11 17:10   ` Pawel Moll
2014-02-11 17:24   ` Lee Jones
2014-02-11 17:24     ` Lee Jones
2014-02-12  7:09   ` Alexander Shiyan
2014-02-12  7:09     ` Alexander Shiyan
2014-02-12  8:26     ` Lee Jones
2014-02-12  8:26       ` Lee Jones
2014-02-12 11:06       ` Pawel Moll
2014-02-12 11:06         ` Pawel Moll
2014-02-12 11:18         ` Lee Jones
2014-02-12 11:18           ` Lee Jones
2014-02-12 11:27         ` Alexander Shiyan
2014-02-12 11:27           ` Alexander Shiyan
2014-02-12 11:43           ` Pawel Moll
2014-02-12 11:43             ` Pawel Moll
2014-02-11 17:10 ` [PATCH 08/12] mfd: vexpress-sysreg: Add syscon labels as platform data Pawel Moll
2014-02-11 17:10   ` Pawel Moll
2014-02-11 17:29   ` Lee Jones
2014-02-11 17:29     ` Lee Jones
2014-02-11 17:32     ` Pawel Moll
2014-02-11 17:32       ` Pawel Moll
2014-02-11 17:48       ` Lee Jones
2014-02-11 17:48         ` Lee Jones
2014-02-11 17:52         ` [PATCH v2 1/2] mfd: syscon: Add platform data with a regmap config name Pawel Moll
2014-02-11 17:52           ` Pawel Moll
2014-02-11 17:52           ` [PATCH v2 2/2] mfd: vexpress-sysreg: Add syscon labels as platform data Pawel Moll
2014-02-11 17:52             ` Pawel Moll
2014-02-12 11:20             ` Lee Jones
2014-02-12 11:20               ` Lee Jones
2014-02-11 17:55           ` [PATCH v2 1/2] mfd: syscon: Add platform data with a regmap config name Pawel Moll
2014-02-11 17:55             ` Pawel Moll
2014-02-12 11:19           ` Lee Jones
2014-02-12 11:19             ` Lee Jones
2014-02-11 17:10 ` [PATCH 09/12] hwmon: vexpress: Use devm helper for hwmon device registration Pawel Moll
2014-02-11 17:10   ` [lm-sensors] " Pawel Moll
2014-02-11 17:10   ` Pawel Moll
2014-02-11 20:57   ` Arnd Bergmann
2014-02-11 20:57     ` [lm-sensors] " Arnd Bergmann
2014-02-11 20:57     ` Arnd Bergmann
2014-02-11 17:10 ` [PATCH 10/12] ARM: vexpress: remove redundant vexpress_dt_cpus_num to get cpu count Pawel Moll
2014-02-11 17:10   ` Pawel Moll
2014-02-11 17:10 ` [PATCH 11/12] ARM: vexpress: Simplify SMP operations for DT-powered system Pawel Moll
2014-02-11 17:10   ` Pawel Moll
2014-02-11 17:10 ` [PATCH 12/12] ARM: vexpress: move HBI check to sysreg driver Pawel Moll
2014-02-11 17:10   ` Pawel Moll
2014-02-11 19:28 ` [PATCH 00/12] Versatile Express updates Arnd Bergmann
2014-02-11 19:28   ` [lm-sensors] " Arnd Bergmann
2014-02-11 19:28   ` Arnd Bergmann
2014-02-12 12:30   ` Pawel Moll
2014-02-12 12:30     ` [lm-sensors] " Pawel Moll
2014-02-12 12:30     ` Pawel Moll
2014-02-12  2:49 [PATCH 09/12] hwmon: vexpress: Use devm helper for hwmon device registration Guenter Roeck
2014-02-12  2:49 ` [lm-sensors] " Guenter Roeck
2014-02-12 11:56 ` Pawel Moll
2014-02-12 11:56   ` [lm-sensors] " Pawel Moll
2014-02-12 11:56   ` Pawel Moll
2014-02-12 11:59   ` Pawel Moll
2014-02-12 11:59     ` [lm-sensors] " Pawel Moll
2014-02-12 11:59     ` Pawel Moll
2014-02-12 16:41   ` Guenter Roeck
2014-02-12 16:41     ` [lm-sensors] " Guenter Roeck
2014-02-12 16:41     ` Guenter Roeck

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=1392139256.3380.45.camel@hornet \
    --to=pawel.moll@arm.com \
    --cc=arm@kernel.org \
    --cc=gnurou@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.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 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.