Messages in this thread | | | Date | Mon, 03 Dec 2012 14:25:14 +0800 | From | Wanlong Gao <> | Subject | Re: [PATCH 1/1] regulator: new driver for LP8755 |
| |
<...> > + > +static int __devinit lp8755_regulator_init(struct lp8755_chip *pchip)
CONFIG_HOTPLUG is going away; it's already defined to always be 'Y'. So, please don't use __devinit anymore. refer to : http://marc.info/?l=linux-i2c&m=135341812915168&w=2
> +{ > + int ret, icnt, buck_num; > + struct lp8755_platform_data *pdata = pchip->pdata; > + > + struct regulator_config rconfig = { }; > + > + rconfig.regmap = pchip->regmap; > + rconfig.dev = pchip->dev; > + rconfig.driver_data = pchip; <..> > +} > + > +static int __devinit lp8755_int_config(struct lp8755_chip *pchip)
Ditto.
> +{ > + int ret; > + unsigned int regval; > + > + if (pchip->irq == 0) { > + dev_warn(pchip->dev, "not use interrupt : %s\n", __func__); > + return 0; > + } > + > + ret = lp8755_read(pchip, 0x0F, ®val);
> +} > + > +static int __devinit lp8755_probe(struct i2c_client *client,
Ditto.
> + const struct i2c_device_id *id) > +{ > + int ret, icnt; > + struct lp8755_chip *pchip; > + struct lp8755_platform_data *pdata = client->dev.platform_data; > + > + if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { > + dev_err(&client->dev, "i2c functionality check fail.\n"); > + return -EOPNOTSUPP; > + } > + > + if (pdata == NULL) { > + dev_err(&client->dev, "platform data is NULL.\n"); > + return -ENOMEM;
> + > + return ret; > +} > + > +static int __devexit lp8755_remove(struct i2c_client *client)
Ditto.
> +{ > + int icnt; > + struct lp8755_chip *pchip = i2c_get_clientdata(client); > + > + for (icnt = 0; icnt < mphase_buck[pchip->mphase].nreg; icnt++) <..> > +static struct i2c_driver lp8755_i2c_driver = { > + .driver = { > + .name = LP8755_NAME, > + }, > + .probe = lp8755_probe, > + .remove = __devexit_p(lp8755_remove),
Ditto. remove __devexit_p.
Thanks, Wanlong Gao
| |