diff options
author | Adrian Glaubitz <glaubitz@physik.fu-berlin.de> | 2016-04-14 20:14:41 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-21 16:43:46 -0400 |
commit | 36128d204b81c099b5779771127a5546eac549c9 (patch) | |
tree | a1949a8491ff61194c827f9ca23643336f876304 /arch | |
parent | 9a78d4fc28904785ffe4c2d361e25b251b479704 (diff) | |
download | linux-36128d204b81c099b5779771127a5546eac549c9.tar.gz linux-36128d204b81c099b5779771127a5546eac549c9.tar.bz2 linux-36128d204b81c099b5779771127a5546eac549c9.zip |
sparc: Implement and wire up modalias_show for vio.
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/kernel/vio.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c index cb5789c9f961..d7055609a41c 100644 --- a/arch/sparc/kernel/vio.c +++ b/arch/sparc/kernel/vio.c @@ -105,9 +105,18 @@ static ssize_t type_show(struct device *dev, return sprintf(buf, "%s\n", vdev->type); } +static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, + char *buf) +{ + const struct vio_dev *vdev = to_vio_dev(dev); + + return sprintf(buf, "vio:T%sS%s\n", vdev->type, vdev->compat); +} + static struct device_attribute vio_dev_attrs[] = { __ATTR_RO(devspec), __ATTR_RO(type), + __ATTR_RO(modalias), __ATTR_NULL }; |