Skip to contentSkip to conversation

Add MODALIAS= to the uevent for the ap bus.

S390 Martin Schwidefsky 1 participant 1 message Dec 4, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

From: Cornelia Huck <[email protected]>

[S390] Add MODALIAS= to the uevent for the ap bus.

---

 drivers/s390/crypto/ap_bus.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletion(-)
drivers/s390/crypto/ap_bus.c +9 -1
diff -urpN linux-2.6/drivers/s390/crypto/ap_bus.c linux-2.6-patched/drivers/s390/crypto/ap_bus.c
@@ -431,7 +431,15 @@ static int ap_uevent (struct device *dev
 			   ap_dev->device_type);
 	if (buffer_size - length <= 0)
 		return -ENOMEM;
-	envp[1] = 0;
+	buffer += length;
+	buffer_size -= length;
+	/* Add MODALIAS= */
+	envp[1] = buffer;
+	length = scnprintf(buffer, buffer_size, "MODALIAS=ap:t%02X",
+			   ap_dev->device_type);
+	if (buffer_size - length <= 0)
+		return -ENOMEM;
+	envp[2] = NULL;
 	return 0;
 }