lkml.org 
[lkml]   [2011]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] drivercore: Add helper macro for platform_driver boilerplate
Date
On Tue, Oct 4, 2011 at 6:26 PM, Grant Likely <grant.likely@secretlab.ca> wrote:

> diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c
> index ae2cd1c..7795d4d 100644
> --- a/drivers/spi/spi-coldfire-qspi.c
> +++ b/drivers/spi/spi-coldfire-qspi.c
> @@ -621,20 +621,10 @@ static struct platform_driver mcfqspi_driver = {
>        .driver.name    = DRIVER_NAME,
>        .driver.owner   = THIS_MODULE,
>        .driver.pm      = MCFQSPI_DEV_PM_OPS,
> +       .probe          = mcfqspi_probe,
>        .remove         = __devexit_p(mcfqspi_remove),
>  };

So I had no idea that platform_driver_probe() existed. It looks like
I function I should be using for SOC devices. But I'm confused by one
thing. That function says it's for non-hotpluggable devices. I don't
see in module_platform_driver() where you honor that restriction. It
looks like you're replacing the non-hotpluggable probe with a
hotpluggable probe.

--
Timur Tabi
Linux kernel developer at Freescale
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-10-06 20:37    [W:1.561 / U:0.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site