mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@openedhand.com>
To: Philipp Zabel <philipp.zabel@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] asic3: move probe functions into __init section
Date: Wed, 18 Jun 2008 23:20:36 +0200	[thread overview]
Message-ID: <20080618212035.GD22566@caravaggio> (raw)
In-Reply-To: <1213810349.8144.11.camel@localhost.localdomain>

Hi Philipp,

On Wed, Jun 18, 2008 at 07:32:29PM +0200, Philipp Zabel wrote:
> Potentially free some memory by moving the _probe functions into __init.
> 
> Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
This one looks good to me, I'll submit push it to -mm as I'd prefer asic3
patches to go through there first.

Cheers,
Samuel.


> ---
>  drivers/mfd/asic3.c |    9 ++++-----
>  1 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
> index ef8a492..7d3488d 100644
> --- a/drivers/mfd/asic3.c
> +++ b/drivers/mfd/asic3.c
> @@ -295,7 +295,7 @@ static struct irq_chip asic3_irq_chip = {
>  	.unmask		= asic3_unmask_irq,
>  };
>  
> -static int asic3_irq_probe(struct platform_device *pdev)
> +static int __init asic3_irq_probe(struct platform_device *pdev)
>  {
>  	struct asic3 *asic = platform_get_drvdata(pdev);
>  	unsigned long clksel = 0;
> @@ -443,7 +443,7 @@ void asic3_gpio_set_value(struct asic3 *asic, unsigned gpio, int val)
>  }
>  EXPORT_SYMBOL(asic3_gpio_set_value);
>  
> -static int asic3_gpio_probe(struct platform_device *pdev)
> +static int __init asic3_gpio_probe(struct platform_device *pdev)
>  {
>  	struct asic3_platform_data *pdata = pdev->dev.platform_data;
>  	struct asic3 *asic = platform_get_drvdata(pdev);
> @@ -482,7 +482,7 @@ static void asic3_gpio_remove(struct platform_device *pdev)
>  
>  
>  /* Core */
> -static int asic3_probe(struct platform_device *pdev)
> +static int __init asic3_probe(struct platform_device *pdev)
>  {
>  	struct asic3_platform_data *pdata = pdev->dev.platform_data;
>  	struct asic3 *asic;
> @@ -573,7 +573,6 @@ static struct platform_driver asic3_device_driver = {
>  	.driver		= {
>  		.name	= "asic3",
>  	},
> -	.probe		= asic3_probe,
>  	.remove		= __devexit_p(asic3_remove),
>  	.shutdown	= asic3_shutdown,
>  };
> @@ -581,7 +580,7 @@ static struct platform_driver asic3_device_driver = {
>  static int __init asic3_init(void)
>  {
>  	int retval = 0;
> -	retval = platform_driver_register(&asic3_device_driver);
> +	retval = platform_driver_probe(&asic3_device_driver, asic3_probe);
>  	return retval;
>  }
>  
> -- 
> 1.5.5.4
> 
> 

  reply	other threads:[~2008-06-18 21:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-18 17:32 Philipp Zabel
2008-06-18 21:20 ` Samuel Ortiz [this message]
2008-06-18 23:26   ` pHilipp Zabel

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=20080618212035.GD22566@caravaggio \
    --to=sameo@openedhand.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philipp.zabel@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®