All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Andrew Morton <akpm@linux-foundation.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Cc: "linux-kernel" <linux-kernel@vger.kernel.org>,
	openwrt-devel@lists.openwrt.org
Subject: [PATCH] gpiommc: Fix for configfs API change
Date: Mon, 21 Jul 2008 12:25:31 +0200	[thread overview]
Message-ID: <200807211225.31834.mb@bu3sch.de> (raw)

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

Signed-off-by: Michael Buesch <mb@bu3sch.de>

---

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

Index: linux-next/drivers/mmc/host/gpiommc.c
===================================================================
--- linux-next.orig/drivers/mmc/host/gpiommc.c	2008-07-21 12:10:55.000000000 +0200
+++ linux-next/drivers/mmc/host/gpiommc.c	2008-07-21 12:17:36.000000000 +0200
@@ -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,

-- 
Greetings Michael.

                 reply	other threads:[~2008-07-21 10:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200807211225.31834.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openwrt-devel@lists.openwrt.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.