[PATCH V2] MMC/SD: Fix regression in 2.6.23-git3 due to change in calling add_uevent_var

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In commit 7eff2e7a8b65c25920207324e56611150eb1cd9a, the calling sequence
for add_uevent_var was changed. This patch propagates this change to
MMC/SD card support.

Signed-off-by: Larry Finger <[email protected]>
---

Linus, Andrew,

The wring patch was sent the first time.

Sorry,

Larry


 drivers/mmc/core/sdio_bus.c |   19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

Index: linux-2.6/drivers/mmc/core/sdio_bus.c
===================================================================
--- linux-2.6.orig/drivers/mmc/core/sdio_bus.c
+++ linux-2.6/drivers/mmc/core/sdio_bus.c
@@ -96,30 +96,21 @@ static int sdio_bus_match(struct device 
 }
 
 static int
-sdio_bus_uevent(struct device *dev, char **envp, int num_envp, char *buf,
-		int buf_size)
+sdio_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
 {
 	struct sdio_func *func = dev_to_sdio_func(dev);
-	int i = 0, length = 0;
 
-	if (add_uevent_var(envp, num_envp, &i,
-			buf, buf_size, &length,
-			"SDIO_CLASS=%02X", func->class))
+	if (add_uevent_var(env, "SDIO_CLASS=%02X", func->class))
 		return -ENOMEM;
 
-	if (add_uevent_var(envp, num_envp, &i,
-			buf, buf_size, &length,
-			"SDIO_ID=%04X:%04X", func->vendor, func->device))
+	if (add_uevent_var(env, "SDIO_ID=%04X:%04X", func->vendor,
+			func->device))
 		return -ENOMEM;
 
-	if (add_uevent_var(envp, num_envp, &i,
-			buf, buf_size, &length,
-			"MODALIAS=sdio:c%02Xv%04Xd%04X",
+	if (add_uevent_var(env, "MODALIAS=sdio:c%02Xv%04Xd%04X",
 			func->class, func->vendor, func->device))
 		return -ENOMEM;
 
-	envp[i] = NULL;
-
 	return 0;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux