Re: [PATCH 08/14] mfd: use platform_data in max8925

From: Samuel Ortiz
Date: Tue Apr 26 2011 - 05:45:52 EST


Hi Haojian,

On Wed, Apr 20, 2011 at 07:54:26PM +0800, Haojian Zhuang wrote:
> Use platform_data to pass parameters to client driver.
You need to provide more details about why this is needed, and how the sub
devices resources can change from one platform to another.

Also, some additional comments:


> +static struct resource bk_resources[] __devinitdata = {
> + {0, 0, "max8925-backlight", IORESOURCE_IO,},
> };
Do you really need to define this empty resource ? Can't you do that from the
device_*_init() routines ?

> +static void __devinit device_bk_init(struct max8925_chip *chip,
> + struct i2c_client *i2c,
> + struct max8925_platform_data *pdata)
I don't think you need to pass the i2c pointer here.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/