LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] net: dsa: set parent of hwmon device
@ 2015-01-21  0:13 Vivien Didelot
  2015-01-21  0:13 ` [PATCH] net: dsa: set slave MII bus PHY mask Vivien Didelot
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Vivien Didelot @ 2015-01-21  0:13 UTC (permalink / raw)
  To: netdev
  Cc: Vivien Didelot, David S . Miller, Guenter Roeck, linux-kernel, kernel

Set the dsa device as the parent of the hwmon device, in order to link
the hwmon subsystem under the corresponding /sys/devices/platform/dsa.X/
sysfs directory.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 net/dsa/dsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 3731714..363102a 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -347,7 +347,7 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index,
 		hname[j] = '\0';
 		scnprintf(ds->hwmon_name, sizeof(ds->hwmon_name), "%s_dsa%d",
 			  hname, index);
-		ds->hwmon_dev = hwmon_device_register_with_groups(NULL,
+		ds->hwmon_dev = hwmon_device_register_with_groups(parent,
 					ds->hwmon_name, ds, dsa_hwmon_groups);
 		if (IS_ERR(ds->hwmon_dev))
 			ds->hwmon_dev = NULL;
-- 
2.2.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-01-26  0:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-21  0:13 [PATCH] net: dsa: set parent of hwmon device Vivien Didelot
2015-01-21  0:13 ` [PATCH] net: dsa: set slave MII bus PHY mask Vivien Didelot
2015-01-21  0:37   ` Florian Fainelli
2015-01-26  0:01   ` David Miller
2015-01-21  2:48 ` [PATCH] net: dsa: set parent of hwmon device Guenter Roeck
2015-01-21  3:50 ` Guenter Roeck
2015-01-21  5:58   ` Florian Fainelli
2015-01-21 16:26     ` Vivien Didelot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).