Messages in this thread Patch in this message | | | From | Cosmin Tanislav <> | Subject | [PATCH v2 2/8] hwmon: (adt7x10) Store bus_dev in private data | Date | Tue, 21 Dec 2021 23:04:32 +0200 |
| |
From: Cosmin Tanislav <cosmin.tanislav@analog.com>
It will later be used to access the bus device because callbacks only provide the hwmon device.
Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com> --- drivers/hwmon/adt7x10.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/hwmon/adt7x10.c b/drivers/hwmon/adt7x10.c index e9d33aa78a19..2439da9b64e6 100644 --- a/drivers/hwmon/adt7x10.c +++ b/drivers/hwmon/adt7x10.c @@ -56,6 +56,7 @@ struct adt7x10_data { const struct adt7x10_ops *ops; const char *name; struct device *hwmon_dev; + struct device *bus_dev; struct mutex update_lock; u8 config; u8 oldconfig; @@ -368,6 +369,7 @@ int adt7x10_probe(struct device *dev, const char *name, int irq, data->ops = ops; data->name = name; + data->bus_dev = dev; dev_set_drvdata(dev, data); mutex_init(&data->update_lock); -- 2.34.1
| |