All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [PATCH] hgafb: convert to new platform driver API (bugzilla	#9689)
Date: Wed, 4 Jun 2008 04:03:23 +0400	[thread overview]
Message-ID: <20080604000323.GA24548@polina.dev.rtsoft.ru> (raw)
In-Reply-To: <20080603161346.9685e0a9.akpm@linux-foundation.org>

On Tue, Jun 03, 2008 at 04:13:46PM -0700, Andrew Morton wrote:
[...]
> > -	info = framebuffer_alloc(0, NULL);
> > +	info = framebuffer_alloc(0, &pdev->dev);

(1)

[...]
> >  	if (!ret) {
> > -		ret = platform_device_register(&hgafb_device);
> > -		if (ret)
> > -			driver_unregister(&hgafb_driver);
> > +		hgafb_device = platform_device_register_simple("hgafb", 0, NULL, 0);
> > +
> > +		if (IS_ERR(hgafb_device)) {

(2)

> > +			platform_driver_unregister(&hgafb_driver);
> > +			ret = PTR_ERR(hgafb_device);
> > +		}
> >  	}
> >  
> >  	return ret;
> > @@ -647,8 +649,8 @@ static int __init hgafb_init(void)
> >  
> >  static void __exit hgafb_exit(void)
> >  {
> > -	platform_device_unregister(&hgafb_device);
> > -	driver_unregister(&hgafb_driver);
> > +	platform_device_unregister(hgafb_device);
> > +	platform_driver_unregister(&hgafb_driver);
> >  }
> 
> Oh.  I just merged Anton's similar patch, below.
> 
> What should we do?

Please drop mine. Krzysztof's patch is better because of (1) and (2).

(1) is nice addition. Plus mine doesn't do (2), i.e. IS_ERR(), thus
might cause troubles in case platform_device_register_simple() return
errors.

Thanks,

-- 
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

      reply	other threads:[~2008-06-04  0:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-02 17:36 [PATCH] hgafb: convert to new platform driver API (bugzilla #9689) Krzysztof Helt
2008-06-03 23:13 ` Andrew Morton
2008-06-04  0:03   ` Anton Vorontsov [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=20080604000323.GA24548@polina.dev.rtsoft.ru \
    --to=avorontsov@ru.mvista.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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.