From e94b1766097d53e6f3ccfb36c8baa562ffeda3fc Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 6 Dec 2006 20:33:17 -0800 Subject: [PATCH] slab: remove SLAB_KERNEL SLAB_KERNEL is an alias of GFP_KERNEL. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/mtd/devices/m25p80.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mtd/devices') diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index ef4a731ca5c..334e078ffaf 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -451,7 +451,7 @@ static int __devinit m25p_probe(struct spi_device *spi) return -ENODEV; } - flash = kzalloc(sizeof *flash, SLAB_KERNEL); + flash = kzalloc(sizeof *flash, GFP_KERNEL); if (!flash) return -ENOMEM; -- cgit v1.2.3 From 5cbded585d129d0226cb48ac4202b253c781be26 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Wed, 13 Dec 2006 00:35:56 -0800 Subject: [PATCH] getting rid of all casts of k[cmz]alloc() calls Run this: #!/bin/sh for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do echo "De-casting $f..." perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f done And then go through and reinstate those cases where code is casting pointers to non-pointers. And then drop a few hunks which conflicted with outstanding work. Cc: Russell King , Ian Molton Cc: Mikael Starvik Cc: Yoshinori Sato Cc: Roman Zippel Cc: Geert Uytterhoeven Cc: Ralf Baechle Cc: Paul Mackerras Cc: Kyle McMartin Cc: Benjamin Herrenschmidt Cc: Martin Schwidefsky Cc: "David S. Miller" Cc: Jeff Dike Cc: Greg KH Cc: Jens Axboe Cc: Paul Fulghum Cc: Alan Cox Cc: Karsten Keil Cc: Mauro Carvalho Chehab Cc: Jeff Garzik Cc: James Bottomley Cc: Ian Kent Cc: Steven French Cc: David Woodhouse Cc: Neil Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/mtd/devices/mtd_dataflash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mtd/devices') diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 5db71604592..0a7e86859bf 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c @@ -459,7 +459,7 @@ add_dataflash(struct spi_device *spi, char *name, struct mtd_info *device; struct flash_platform_data *pdata = spi->dev.platform_data; - priv = (struct dataflash *) kzalloc(sizeof *priv, GFP_KERNEL); + priv = kzalloc(sizeof *priv, GFP_KERNEL); if (!priv) return -ENOMEM; -- cgit v1.2.3 From 17c65d69906a6e2e6df4822b00a9e5e00e35ea9a Mon Sep 17 00:00:00 2001 From: David Brownell Date: Fri, 29 Dec 2006 16:48:44 -0800 Subject: [PATCH] m25p80 build fixes (with MTD debug) Fix build issues that show up with the m25p80 SPI flash driver when building with MTD debug enabled. Signed-off-by: David Brownell Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/mtd/devices/m25p80.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/mtd/devices') diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 334e078ffaf..78c2511ae9e 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -437,7 +437,7 @@ static int __devinit m25p_probe(struct spi_device *spi) * or JEDEC get-id commands. Try them ... */ DEBUG(MTD_DEBUG_LEVEL1, "%s: no chip id\n", - flash->spi->dev.bus_id); + spi->dev.bus_id); return -ENODEV; } @@ -447,7 +447,7 @@ static int __devinit m25p_probe(struct spi_device *spi) } if (i == ARRAY_SIZE(m25p_data)) { DEBUG(MTD_DEBUG_LEVEL1, "%s: unrecognized id %s\n", - flash->spi->dev.bus_id, data->type); + spi->dev.bus_id, data->type); return -ENODEV; } -- cgit v1.2.3 From de4fa99266b2e1f6771644b9b50f33fe8f82d728 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Fri, 29 Dec 2006 16:48:47 -0800 Subject: [PATCH] SPI/MTD: mtd_dataflash oops prevention Return a fault code if the Dataflash driver runs into a "no device present" error when the MISO line has a pulldown (it currently expects a pullup), so that rmmod won't oops. Signed-off-by: David Brownell Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/mtd/devices/mtd_dataflash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mtd/devices') diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 0a7e86859bf..910e4061dfd 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c @@ -536,7 +536,7 @@ static int __devinit dataflash_probe(struct spi_device *spi) if (status <= 0 || status == 0xff) { DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n", spi->dev.bus_id, status); - if (status == 0xff) + if (status == 0 || status == 0xff) status = -ENODEV; return status; } -- cgit v1.2.3