All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Sonic Zhang <sonic.adi@gmail.com>
Cc: linux-input@vger.kernel.org,
	Michael Hennerich <michael.hennerich@analog.com>,
	adi-buildroot-devel@lists.sourceforge.net,
	Sonic Zhang <sonic.zhang@analog.com>
Subject: Re: [PATCH v3 2/3] bfin_rotary: Move peripheral pinmux definition into platform data of bf527
Date: Wed, 4 Feb 2015 11:44:42 -0800	[thread overview]
Message-ID: <20150204194442.GB15782@dtor-ws> (raw)
In-Reply-To: <1423036686-31891-1-git-send-email-sonic.adi@gmail.com>

Hi Sonic,

On Wed, Feb 04, 2015 at 03:58:04PM +0800, Sonic Zhang wrote:
> @@ -102,7 +95,7 @@ static int bfin_rotary_probe(struct platform_device *pdev)
>  		return -EINVAL;
>  	}
>  
> -	error = peripheral_request_list(per_cnt, dev_name(&pdev->dev));
> +	error = peripheral_request_list(pdata->pin_list, dev_name(&pdev->dev));

I do not think the driver will be happy with pdata->oin_list == NULL
here.

>  	if (error) {
>  		dev_err(&pdev->dev, "requesting peripherals failed\n");
>  		return error;
> @@ -197,6 +190,7 @@ out1:
>  
>  static int bfin_rotary_remove(struct platform_device *pdev)
>  {
> +	struct bfin_rotary_platform_data *pdata = dev_get_platdata(&pdev->dev);

Why do you need this change?

>  	struct bfin_rot *rotary = platform_get_drvdata(pdev);
>  
>  	bfin_write_CNT_CONFIG(0);
> @@ -204,7 +198,7 @@ static int bfin_rotary_remove(struct platform_device *pdev)
>  
>  	free_irq(rotary->irq, pdev);
>  	input_unregister_device(rotary->input);
> -	peripheral_free_list(per_cnt);
> +	peripheral_free_list(pdata->pin_list);

Same here: NULL will cause severe indigestion.

Thanks.

-- 
Dmitry

  parent reply	other threads:[~2015-02-04 19:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-04  7:58 [PATCH v3 2/3] bfin_rotary: Move peripheral pinmux definition into platform data of bf527 Sonic Zhang
2015-02-04  7:58 ` [PATCH v3 3/3] bfin_rotary: replace bfin specific MMR function with generic IO function Sonic Zhang
2015-02-04 19:46   ` Dmitry Torokhov
2015-02-04  7:58 ` [PATCH] bfin_rotary: convert to use managed resources Sonic Zhang
2015-02-04 19:56   ` Dmitry Torokhov
2015-02-04 19:44 ` Dmitry Torokhov [this message]
2015-02-05  5:13   ` [PATCH v3 2/3] bfin_rotary: Move peripheral pinmux definition into platform data of bf527 Sonic Zhang
2015-02-05  7:39   ` Sonic Zhang

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=20150204194442.GB15782@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=adi-buildroot-devel@lists.sourceforge.net \
    --cc=linux-input@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=sonic.adi@gmail.com \
    --cc=sonic.zhang@analog.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.