linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 03/23] OMAPDSS: tpd12s015: remove platform data support
Date: Tue, 15 Dec 2015 14:03:28 +0000	[thread overview]
Message-ID: <56701DB0.3020605@ti.com> (raw)
In-Reply-To: <1449676791-26304-4-git-send-email-tomi.valkeinen@ti.com>

[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]


On 13/12/15 22:07, Laurent Pinchart wrote:

>>  static int tpd_probe_of(struct platform_device *pdev)
>>  {
>> @@ -282,11 +257,7 @@ static int tpd_probe(struct platform_device *pdev)
>>
>>  	platform_set_drvdata(pdev, ddata);
>>
>> -	if (dev_get_platdata(&pdev->dev)) {
>> -		r = tpd_probe_pdata(pdev);
>> -		if (r)
>> -			return r;
>> -	} else if (pdev->dev.of_node) {
>> +	if (pdev->dev.of_node) {
>>  		r = tpd_probe_of(pdev);
>>  		if (r)
>>  			return r;
> 
> How about moving the else case not shown here to the beginning of the function 
> with
> 
> 	if (!pdev->dev.of_node)
> 		return -ENODEV;
> 
> and lowering the indentation level here with just
> 
> 	r = tpd_probe_of(pdev);
> 	if (r)
> 		return r;
> 
> Apart from that the patch looks good to me.

True, it can be cleaned up. I'll do that in a separate patch, so that
this one stays simple. I can also move the contents of tpd_probe_of()
into tpd_probe(), as there's no point in having a separate function for of.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      parent reply	other threads:[~2015-12-15 14:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-09 15:59 [PATCH 03/23] OMAPDSS: tpd12s015: remove platform data support Tomi Valkeinen
2015-12-13 20:07 ` Laurent Pinchart
2015-12-15 14:03 ` Tomi Valkeinen [this message]

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=56701DB0.3020605@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=linux-fbdev@vger.kernel.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 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).