All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shawn Guo <shawn.guo@freescale.com>
To: "Philippe Rétornaz" <philippe.retornaz@epfl.ch>
Cc: s.hauer@pengutronix.de, amit.kucheria@canonical.com,
	sameo@linux.intel.com, broonie@opensource.wolfsonmicro.com,
	linux-input@vger.kernel.org, u.kleine-koenig@pengutronix.de,
	dmitry.torokhov@gmail.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/6] mc13783: add power button support
Date: Fri, 22 Jul 2011 09:39:23 +0800	[thread overview]
Message-ID: <20110722013922.GC26837@S2100-06.ap.freescale.net> (raw)
In-Reply-To: <1311261006-28048-2-git-send-email-philippe.retornaz@epfl.ch>

On Thu, Jul 21, 2011 at 05:10:01PM +0200, Philippe Rétornaz wrote:
> This adds support for the power-on buttons of MC13783 PMIC.
> This is done using a misc input device.
> 
> Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
> ---
>  drivers/input/misc/Kconfig             |   10 +
>  drivers/input/misc/Makefile            |    1 +
>  drivers/input/misc/mc13783-pwrbutton.c |  288 ++++++++++++++++++++++++++++++++
>  drivers/mfd/mc13xxx-core.c             |    4 +
>  include/linux/mfd/mc13783.h            |    1 +
>  include/linux/mfd/mc13xxx.h            |   17 ++
>  6 files changed, 321 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/input/misc/mc13783-pwrbutton.c
> 
[...]
> diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
> index 7e4d44b..573e16b 100644
> --- a/drivers/mfd/mc13xxx-core.c
> +++ b/drivers/mfd/mc13xxx-core.c
> @@ -778,6 +778,10 @@ err_revision:
>  		mc13xxx_add_subdevice_pdata(mc13xxx, "%s-led",
>  				pdata->leds, sizeof(*pdata->leds));
>  
> +	if (pdata->buttons)
> +		mc13xxx_add_subdevice_pdata(mc13xxx, "%s-pwrbutton",
> +				pdata->buttons, sizeof(*pdata->buttons));
> +

I do not see pdata has been checked for not being a NULL pointer
before using it in this function.  I know it's not you who started
it, but since you have been there, I'm wondering if you can give
it a fix.

-- 
Regards,
Shawn

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: shawn.guo@freescale.com (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6] mc13783: add power button support
Date: Fri, 22 Jul 2011 09:39:23 +0800	[thread overview]
Message-ID: <20110722013922.GC26837@S2100-06.ap.freescale.net> (raw)
In-Reply-To: <1311261006-28048-2-git-send-email-philippe.retornaz@epfl.ch>

On Thu, Jul 21, 2011 at 05:10:01PM +0200, Philippe R?tornaz wrote:
> This adds support for the power-on buttons of MC13783 PMIC.
> This is done using a misc input device.
> 
> Signed-off-by: Philippe R?tornaz <philippe.retornaz@epfl.ch>
> ---
>  drivers/input/misc/Kconfig             |   10 +
>  drivers/input/misc/Makefile            |    1 +
>  drivers/input/misc/mc13783-pwrbutton.c |  288 ++++++++++++++++++++++++++++++++
>  drivers/mfd/mc13xxx-core.c             |    4 +
>  include/linux/mfd/mc13783.h            |    1 +
>  include/linux/mfd/mc13xxx.h            |   17 ++
>  6 files changed, 321 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/input/misc/mc13783-pwrbutton.c
> 
[...]
> diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
> index 7e4d44b..573e16b 100644
> --- a/drivers/mfd/mc13xxx-core.c
> +++ b/drivers/mfd/mc13xxx-core.c
> @@ -778,6 +778,10 @@ err_revision:
>  		mc13xxx_add_subdevice_pdata(mc13xxx, "%s-led",
>  				pdata->leds, sizeof(*pdata->leds));
>  
> +	if (pdata->buttons)
> +		mc13xxx_add_subdevice_pdata(mc13xxx, "%s-pwrbutton",
> +				pdata->buttons, sizeof(*pdata->buttons));
> +

I do not see pdata has been checked for not being a NULL pointer
before using it in this function.  I know it's not you who started
it, but since you have been there, I'm wondering if you can give
it a fix.

-- 
Regards,
Shawn

  parent reply	other threads:[~2011-07-22  1:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21 15:10 [PATCH v4 0/6] mc13783: add pwr button support Philippe Rétornaz
2011-07-21 15:10 ` Philippe Rétornaz
2011-07-21 14:44 ` Uwe Kleine-König
2011-07-21 14:44   ` Uwe Kleine-König
2011-07-21 15:10 ` [PATCH 1/6] mc13783: add power " Philippe Rétornaz
2011-07-21 15:10   ` Philippe Rétornaz
2011-07-21 15:10   ` [PATCH 2/6] mx31moboard: Add MC13783 " Philippe Rétornaz
2011-07-21 15:10     ` Philippe Rétornaz
2011-07-21 15:10     ` [PATCH 3/6] mc13xxx: Unconditionally register regulator subdevice Philippe Rétornaz
2011-07-21 15:10       ` Philippe Rétornaz
2011-07-21 15:10       ` [PATCH 4/6] mc13xxx: implicitly register led subdevice Philippe Rétornaz
2011-07-21 15:10         ` Philippe Rétornaz
2011-07-21 15:10         ` [PATCH 5/6] mc13xxx: remove obsolete leds and regualtors flags Philippe Rétornaz
2011-07-21 15:10           ` Philippe Rétornaz
2011-07-21 15:10           ` [PATCH 6/6] mc13xxx: remove unused define Philippe Rétornaz
2011-07-21 15:10             ` Philippe Rétornaz
2011-07-22  1:39   ` Shawn Guo [this message]
2011-07-22  1:39     ` [PATCH 1/6] mc13783: add power button support Shawn Guo

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=20110722013922.GC26837@S2100-06.ap.freescale.net \
    --to=shawn.guo@freescale.com \
    --cc=amit.kucheria@canonical.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=philippe.retornaz@epfl.ch \
    --cc=s.hauer@pengutronix.de \
    --cc=sameo@linux.intel.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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.