iio: adc: ad7091r: Remove unneeded probe parameters

With the grouping of ad7091r initialization data and callbacks into the
init_info struct, there is no more need to pass the device name and
register map through probe function parameters as those will be available
in the init_info object.
Remove probe parameters that are not needed anymore.

Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://lore.kernel.org/r/090a6b461410a374511a8c73659de28b2665f96b.1703013352.git.marcelo.schmitt1@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Marcelo Schmitt 2023-12-19 17:28:05 -03:00 committed by Jonathan Cameron
parent ca1a679049
commit 6ff545a9b8
3 changed files with 7 additions and 9 deletions

View File

@ -341,9 +341,8 @@ static void ad7091r_remove(void *data)
regulator_disable(st->vref);
}
int ad7091r_probe(struct device *dev, const char *name,
const struct ad7091r_init_info *init_info,
struct regmap *map, int irq)
int ad7091r_probe(struct device *dev, const struct ad7091r_init_info *init_info,
int irq)
{
struct iio_dev *iio_dev;
struct ad7091r_state *st;
@ -373,7 +372,8 @@ int ad7091r_probe(struct device *dev, const char *name,
ret = devm_request_threaded_irq(dev, irq, NULL,
ad7091r_event_handler,
IRQF_TRIGGER_FALLING |
IRQF_ONESHOT, name, iio_dev);
IRQF_ONESHOT,
st->chip_info->name, iio_dev);
if (ret)
return ret;
} else {

View File

@ -70,9 +70,8 @@ struct ad7091r_init_info {
extern const struct iio_event_spec ad7091r_events[3];
int ad7091r_probe(struct device *dev, const char *name,
const struct ad7091r_init_info *init_info,
struct regmap *map, int irq);
int ad7091r_probe(struct device *dev, const struct ad7091r_init_info *init_info,
int irq);
bool ad7091r_volatile_reg(struct device *dev, unsigned int reg);
bool ad7091r_writeable_reg(struct device *dev, unsigned int reg);

View File

@ -64,14 +64,13 @@ static struct ad7091r_init_info ad7091r5_init_info = {
static int ad7091r5_i2c_probe(struct i2c_client *i2c)
{
const struct i2c_device_id *id = i2c_client_get_device_id(i2c);
const struct ad7091r_init_info *init_info;
init_info = i2c_get_match_data(i2c);
if (!init_info)
return -EINVAL;
return ad7091r_probe(&i2c->dev, id->name, init_info, NULL, i2c->irq);
return ad7091r_probe(&i2c->dev, init_info, i2c->irq);
}
static const struct of_device_id ad7091r5_dt_ids[] = {