Fixes for the following warnings:
drivers/mtd/devices/block2mtd.c: In function '_open_bdev':
drivers/mtd/devices/block2mtd.c:272:3: warning: ISO C90 forbids mixed
declarations and code
drivers/mtd/devices/block2mtd.c: In function 'add_device':
drivers/mtd/devices/block2mtd.c:399:13: warning: assignment discards qualifiers
from pointer target type
Can someone get these upstream.
Signed-off-by: Philip Prindeville <[email protected]>
--- linux-2.6.37.6/include/linux/mtd/partitions.h.orig 2011-05-15
22:07:04.000000000 -0600
+++ linux-2.6.37.6/include/linux/mtd/partitions.h 2011-05-15
22:15:57.000000000 -0600
@@ -37,7 +37,7 @@ struct mtd_info;
struct mtd_partition;
struct mtd_partition {
- char *name; /* identifier string */
+ const char *name; /* identifier string */
uint64_t size; /* partition size */
uint64_t offset; /* offset within the master MTD space */
uint32_t mask_flags; /* master MTD flags to mask out for
this partition */
--- linux-2.6.37.6/drivers/mtd/devices/block2mtd.c.orig 2011-05-15
22:07:04.000000000 -0600
+++ linux-2.6.37.6/drivers/mtd/devices/block2mtd.c 2011-05-15
22:17:02.000000000 -0600
@@ -264,12 +264,13 @@ static int _open_bdev(struct block2mtd_d
bdev = open_bdev_exclusive(dev->devname, FMODE_READ|FMODE_WRITE, NULL);
#ifndef MODULE
if (IS_ERR(bdev)) {
+ dev_t devt;
/* We might not have rootfs mounted at this point. Try
to resolve the device name by other means. */
wait_for_device_probe();
- dev_t devt = name_to_dev_t(dev->devname);
+ devt = name_to_dev_t(dev->devname);
if (devt) {
bdev = open_by_devnum(devt, FMODE_WRITE | FMODE_READ);
}
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel