On Wed, Apr 08, 2009 at 04:15:12PM +0800, loody wrote:
> Dear all:
>     when I register a platform driver with xxxx_probe, the kernel will
> call xxxx_probe with platform_device.
> And I know the platform_device is passed with the same name which I
> give in platform_driver.
> My questions is:
> In platfrm_devicde.dev, there are several parameters like below:
> 
>       struct device_driver *driver;   /* which driver has allocated this
>                                          device */
>       void            *driver_data;   /* data private to the driver */
>       void            *platform_data; /* Platform specific data, device
>                                          core doesn't touch it */
> 
> who assign the above parameters?

Different parts of the kernel.

driver is assigned by the driver core usually (platform drivers are a
bit different, some of them directly bind the device.)

driver_data is set by your driver using the proper api call
platform_data is also set by your hardware platform.

hope this helps,

greg k-h

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to