[package] hostapd: sync 8.09 script with trunk
[openwrt/svn-archive/archive.git] / target / linux / generic-2.6 / patches-2.6.21 / 212-block2mtd_erase_scan.patch
1 Index: linux-2.6.21.7/drivers/mtd/devices/block2mtd.c
2 ===================================================================
3 --- linux-2.6.21.7.orig/drivers/mtd/devices/block2mtd.c
4 +++ linux-2.6.21.7/drivers/mtd/devices/block2mtd.c
5 @@ -112,7 +112,7 @@ static int _block2mtd_erase(struct block
6 if (IS_ERR(page))
7 return PTR_ERR(page);
8
9 - max = (u_long*)page_address(page) + PAGE_SIZE;
10 + max = (u_long*) ((u8 *) page_address(page) + PAGE_SIZE);
11 for (p=(u_long*)page_address(page); p<max; p++)
12 if (*p != -1UL) {
13 lock_page(page);