Skip to contentSkip to conversation

gpiommc: Fix for configfs API change

PATCH New Michael Buesch 1 participant 1 message Jul 21, 2008 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpiommc: Fix for configfs API change

The configfs API changed in linux-next. This patch fixes gpiommc to use the new API. This fixes a compiler warning.

---

Warning remained unoticed when porting the stuff from 2.6.25 to linux-next.

drivers/mmc/host/gpiommc.c +8 -5
Index: linux-next/drivers/mmc/host/gpiommc.c
===================================================================
@@ -509,19 +509,20 @@ static struct config_item_type gpiommc_d
 	.ct_owner	= THIS_MODULE,
 };
 
-static struct config_item *gpiommc_make_item(struct config_group *group,
-					     const char *name)
+static int gpiommc_make_item(struct config_group *group,
+			     const char *name,
+			     struct config_item **new_item)
 {
 	struct gpiommc_configfs_device *dev;
 
 	if (strlen(name) > GPIOMMC_MAX_NAMELEN) {
 		printk(KERN_ERR PFX "configfs: device name too long\n");
-		return NULL;
+		return -E2BIG;
 	}
 
 	dev = kzalloc(sizeof(*dev), GFP_KERNEL);
 	if (!dev)
-		return NULL;
+		return -ENOMEM;
 
 	mutex_init(&dev->mutex);
 	config_item_init_type_name(&dev->item, name,
@@ -537,7 +538,9 @@ static struct config_item *gpiommc_make_
 	dev->pdata.no_spi_delay = 0;
 	dev->pdata.max_bus_speed = 5000000; /* 5 MHz */
 
-	return &(dev->item);
+	*new_item = &(dev->item);
+
+	return 0;
 }
 
 static void gpiommc_drop_item(struct config_group *group,
Signature · 1 line
Greetings Michael.