[RESEND x2 PATCH 2.6.26-git 1/2] MTD DataFlash: bugfix, binary page sizes now handled (v3)

David Brownell david-b at pacbell.net
Wed Jul 30 01:07:50 EDT 2008


> drivers/mtd/devices/mtd_dataflash.c: In function 'jedec_probe':
> drivers/mtd/devices/mtd_dataflash.c:611: error: incompatible type for argument 1 of 'dev_name'
> drivers/mtd/devices/mtd_dataflash.c:619: error: incompatible type for argument 1 of 'dev_name'
>

It seems the MTD debug facility doesn't follow the (recent)
rule of making debug code subject to dead code elimination
rather than the more error-prone CPP level elimination.
I sense a patch coming ...

The following tweak resolves the stuff above ... do you want
a new patch?

- Dave


--- g26.orig/drivers/mtd/devices/mtd_dataflash.c	2008-07-29 22:00:32.000000000 -0700
+++ g26/drivers/mtd/devices/mtd_dataflash.c	2008-07-29 22:00:17.000000000 -0700
@@ -609,7 +609,7 @@ static struct flash_info *__devinit jede
 			tmp++, info++) {
 		if (info->jedec_id == jedec) {
 			DEBUG(MTD_DEBUG_LEVEL1, "%s: OTP, sector protect%s\n",
-				dev_name(spi->dev),
+				dev_name(&spi->dev),
 				(info->flags & SUP_POW2PS)
 					? ", binary pagesize" : ""
 				);
@@ -618,7 +618,7 @@ static struct flash_info *__devinit jede
 				if (status < 0) {
 					DEBUG(MTD_DEBUG_LEVEL1,
 						"%s: status error %d\n",
-						dev_name(spi->dev), status);
+						dev_name(&spi->dev), status);
 					return ERR_PTR(status);
 				}
 				if (status & 0x1) {



More information about the linux-mtd mailing list