lkml.org 
[lkml]   [2021]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 2/8] hwmon: (adt7x10) Store bus_dev in private data
Date
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
\
 
 \ /
  Last update: 2021-12-21 22:05    [W:0.054 / U:1.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site