rpms/kernel/devel linux-2.6-vio-modalias.patch, NONE, 1.1 kernel.spec, 1.474, 1.475
David Woodhouse (dwmw2)
fedora-extras-commits at redhat.com
Wed Mar 5 13:40:39 UTC 2008
Author: dwmw2
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22079
Modified Files:
kernel.spec
Added Files:
linux-2.6-vio-modalias.patch
Log Message:
add modalias attr for vio devices in sysfs
linux-2.6-vio-modalias.patch:
--- NEW FILE linux-2.6-vio-modalias.patch ---
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index f988672..12a0851 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -294,9 +294,27 @@ static ssize_t devspec_show(struct device *dev,
return sprintf(buf, "%s\n", of_node ? of_node->full_name : "none");
}
+static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
+ char *buf)
+{
+ const struct vio_dev *vio_dev = to_vio_dev(dev);
+ struct device_node *dn;
+ const char *cp;
+
+ dn = dev->archdata.of_node;
+ if (!dn)
+ return -ENODEV;
+ cp = of_get_property(dn, "compatible", NULL);
+ if (!cp)
+ return -ENODEV;
+
+ return sprintf(buf, "vio:T%sS%s", vio_dev->type, cp);
+}
+
static struct device_attribute vio_dev_attrs[] = {
__ATTR_RO(name),
__ATTR_RO(devspec),
+ __ATTR_RO(modalias),
__ATTR_NULL
};
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.474
retrieving revision 1.475
diff -u -r1.474 -r1.475
--- kernel.spec 5 Mar 2008 01:09:02 -0000 1.474
+++ kernel.spec 5 Mar 2008 13:39:49 -0000 1.475
@@ -586,6 +586,7 @@
Patch141: linux-2.6-ps3-storage-alias.patch
Patch142: linux-2.6-ps3-legacy-bootloader-hack.patch
Patch143: linux-2.6-g5-therm-shutdown.patch
+Patch144: linux-2.6-vio-modalias.patch
Patch160: linux-2.6-execshield.patch
Patch250: linux-2.6-debug-sizeof-structs.patch
@@ -1031,6 +1032,8 @@
ApplyPatch linux-2.6-ps3-legacy-bootloader-hack.patch
# Alleviate G5 thermal shutdown problems
ApplyPatch linux-2.6-g5-therm-shutdown.patch
+# Provide modalias in sysfs for vio devices
+ApplyPatch linux-2.6-vio-modalias.patch
#
# Exec shield
@@ -1751,6 +1754,9 @@
%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
%changelog
+* Wed Mar 05 2008 David Woodhouse <dwmw2 at redhat.com>
+- Add modalias in sysfs for vio devices (#431045)
+
* Tue Mar 04 2008 John W. Linville <linville at redhat.com>
- libertas: fix sanity check on sequence number in command response
- p54: fix EEPROM structure endianness
More information about the fedora-extras-commits
mailing list