All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
To: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] Blackfin EMAC Driver: add proper __devinit/__devexit markings
Date: Mon, 28 Jul 2008 18:21:13 +0300	[thread overview]
Message-ID: <488DE3E9.3000703@teltonika.lt> (raw)
In-Reply-To: <1217169905-7055-2-git-send-email-cooloney@kernel.org>

Bryan Wu wrote:
> From: Mike Frysinger <vapier.adi@gmail.com>
> 
> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
> Signed-off-by: Bryan Wu <cooloney@kernel.org>
> ---
>  drivers/net/bfin_mac.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
> index 4144343..17951cb 100644
> --- a/drivers/net/bfin_mac.c
> +++ b/drivers/net/bfin_mac.c
> @@ -956,7 +956,7 @@ static int bfin_mac_close(struct net_device *dev)
>  	return 0;
>  }
>  
> -static int __init bfin_mac_probe(struct platform_device *pdev)
> +static int __devinit bfin_mac_probe(struct platform_device *pdev)

__init was OK here.
__devinit is for hotplug devices

>  {
>  	struct net_device *ndev;
>  	struct bfin_mac_local *lp;
> @@ -1082,7 +1082,7 @@ out_err_probe_mac:
>  	return rc;
>  }
>  
> -static int bfin_mac_remove(struct platform_device *pdev)
> +static int __devexit bfin_mac_remove(struct platform_device *pdev)

__devexit is for hotplug, use __exit

>  {
>  	struct net_device *ndev = platform_get_drvdata(pdev);
>  	struct bfin_mac_local *lp = netdev_priv(ndev);
> @@ -1129,7 +1129,7 @@ static int bfin_mac_resume(struct platform_device *pdev)
>  
>  static struct platform_driver bfin_mac_driver = {
>  	.probe = bfin_mac_probe,

.probe shouldn't be declared here. And you should use
platform_device_probe() instead of platform_device_add()

> -	.remove = bfin_mac_remove,
> +	.remove = __devexit_p(bfin_mac_remove),

should be __exit_p()

>  	.resume = bfin_mac_resume,
>  	.suspend = bfin_mac_suspend,
>  	.driver = {


WARNING: multiple messages have this Message-ID (diff)
From: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] Blackfin EMAC Driver: add proper __devinit/__devexit markings
Date: Mon, 28 Jul 2008 18:21:13 +0300	[thread overview]
Message-ID: <488DE3E9.3000703@teltonika.lt> (raw)
In-Reply-To: <1217169905-7055-2-git-send-email-cooloney@kernel.org>

Bryan Wu wrote:
> From: Mike Frysinger <vapier.adi@gmail.com>
> 
> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
> Signed-off-by: Bryan Wu <cooloney@kernel.org>
> ---
>  drivers/net/bfin_mac.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
> index 4144343..17951cb 100644
> --- a/drivers/net/bfin_mac.c
> +++ b/drivers/net/bfin_mac.c
> @@ -956,7 +956,7 @@ static int bfin_mac_close(struct net_device *dev)
>  	return 0;
>  }
>  
> -static int __init bfin_mac_probe(struct platform_device *pdev)
> +static int __devinit bfin_mac_probe(struct platform_device *pdev)

__init was OK here.
__devinit is for hotplug devices

>  {
>  	struct net_device *ndev;
>  	struct bfin_mac_local *lp;
> @@ -1082,7 +1082,7 @@ out_err_probe_mac:
>  	return rc;
>  }
>  
> -static int bfin_mac_remove(struct platform_device *pdev)
> +static int __devexit bfin_mac_remove(struct platform_device *pdev)

__devexit is for hotplug, use __exit

>  {
>  	struct net_device *ndev = platform_get_drvdata(pdev);
>  	struct bfin_mac_local *lp = netdev_priv(ndev);
> @@ -1129,7 +1129,7 @@ static int bfin_mac_resume(struct platform_device *pdev)
>  
>  static struct platform_driver bfin_mac_driver = {
>  	.probe = bfin_mac_probe,

.probe shouldn't be declared here. And you should use
platform_device_probe() instead of platform_device_add()

> -	.remove = bfin_mac_remove,
> +	.remove = __devexit_p(bfin_mac_remove),

should be __exit_p()

>  	.resume = bfin_mac_resume,
>  	.suspend = bfin_mac_suspend,
>  	.driver = {


  reply	other threads:[~2008-07-28 15:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-27 14:45 [PATCH 0/3] Blackfin EMAC Driver updates for 2.6.27 (v2) Bryan Wu
2008-07-27 14:45 ` [PATCH 1/3] Blackfin EMAC Driver: add proper __devinit/__devexit markings Bryan Wu
2008-07-28 15:21   ` Paulius Zaleckas [this message]
2008-07-28 15:21     ` Paulius Zaleckas
2008-07-29  3:34     ` Bryan Wu
2008-07-29 21:49   ` Jeff Garzik
2008-07-27 14:45 ` [PATCH 2/3] Blackfin EMAC Driver: enable TXDWA new feature for new silicon (rev > 0.2) Bryan Wu
2008-07-27 14:45 ` [PATCH 3/3] Blackfin EMAC Driver: Functional power management support Bryan Wu
  -- strict thread matches above, loose matches on Subject: below --
2008-07-27  6:13 [PATCH 0/3] Blackfin EMAC Driver updates for 2.6.27 Bryan Wu
2008-07-27  6:13 ` [PATCH 1/3] Blackfin EMAC Driver: add proper __devinit/__devexit markings Bryan Wu
2008-07-27 13:03   ` Mike Frysinger
2008-07-27 14:46     ` Bryan Wu

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=488DE3E9.3000703@teltonika.lt \
    --to=paulius.zaleckas@teltonika.lt \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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 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.