Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Marcelo Schmitt and committed by
Jonathan Cameron
6ff545a9 ca1a6790

+7 -9
+4 -4
drivers/iio/adc/ad7091r-base.c
··· 341 341 regulator_disable(st->vref); 342 342 } 343 343 344 - int ad7091r_probe(struct device *dev, const char *name, 345 - const struct ad7091r_init_info *init_info, 346 - struct regmap *map, int irq) 344 + int ad7091r_probe(struct device *dev, const struct ad7091r_init_info *init_info, 345 + int irq) 347 346 { 348 347 struct iio_dev *iio_dev; 349 348 struct ad7091r_state *st; ··· 372 373 ret = devm_request_threaded_irq(dev, irq, NULL, 373 374 ad7091r_event_handler, 374 375 IRQF_TRIGGER_FALLING | 375 - IRQF_ONESHOT, name, iio_dev); 376 + IRQF_ONESHOT, 377 + st->chip_info->name, iio_dev); 376 378 if (ret) 377 379 return ret; 378 380 } else {
+2 -3
drivers/iio/adc/ad7091r-base.h
··· 70 70 71 71 extern const struct iio_event_spec ad7091r_events[3]; 72 72 73 - int ad7091r_probe(struct device *dev, const char *name, 74 - const struct ad7091r_init_info *init_info, 75 - struct regmap *map, int irq); 73 + int ad7091r_probe(struct device *dev, const struct ad7091r_init_info *init_info, 74 + int irq); 76 75 77 76 bool ad7091r_volatile_reg(struct device *dev, unsigned int reg); 78 77 bool ad7091r_writeable_reg(struct device *dev, unsigned int reg);
+1 -2
drivers/iio/adc/ad7091r5.c
··· 64 64 65 65 static int ad7091r5_i2c_probe(struct i2c_client *i2c) 66 66 { 67 - const struct i2c_device_id *id = i2c_client_get_device_id(i2c); 68 67 const struct ad7091r_init_info *init_info; 69 68 70 69 init_info = i2c_get_match_data(i2c); 71 70 if (!init_info) 72 71 return -EINVAL; 73 72 74 - return ad7091r_probe(&i2c->dev, id->name, init_info, NULL, i2c->irq); 73 + return ad7091r_probe(&i2c->dev, init_info, i2c->irq); 75 74 } 76 75 77 76 static const struct of_device_id ad7091r5_dt_ids[] = {