staging: iio: isl29028: use regmap to retrieve struct device
Driver includes struct regmap and struct device in its global data.
Remove the struct device and use regmap API to retrieve device info.
Simplified version of Coccinelle semantic patch used:
@ a @
identifier drvdata, r;
position p;
@@
struct drvdata@p {
...
struct regmap *r;
...
};
@ b @
identifier a.drvdata, d;
position a.p;
@@
struct drvdata@p {
...
- struct device *d;
...
};
@ passed depends on b @
identifier a.drvdata, a.r, b.d, i, f;
@@
f (..., struct drvdata *i ,...) {
+ struct device *dev = regmap_get_device(i->r);
<+...
- i->d
+ dev
...+>
}
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>