1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-30 20:50:38 +02:00

ar71xx: wrt160nl_part: include module.h and fix compiler warnings

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29856 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg 2012-01-22 17:55:38 +00:00
parent 681c0cf274
commit acc9c3cbf5

View File

@ -22,6 +22,7 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
@ -91,11 +92,15 @@ static int wrt160nl_parse_partitions(struct mtd_info *master,
struct uimage_header *uheader; struct uimage_header *uheader;
size_t retlen; size_t retlen;
unsigned int kernel_len; unsigned int kernel_len;
unsigned int uboot_len = max(master->erasesize, WRT160NL_UBOOT_LEN); unsigned int uboot_len;
unsigned int nvram_len = max(master->erasesize, WRT160NL_NVRAM_LEN); unsigned int nvram_len;
unsigned int art_len = max(master->erasesize, WRT160NL_ART_LEN); unsigned int art_len;
int ret; int ret;
uboot_len = max_t(unsigned int, master->erasesize, WRT160NL_UBOOT_LEN);
nvram_len = max_t(unsigned int, master->erasesize, WRT160NL_NVRAM_LEN);
art_len = max_t(unsigned int, master->erasesize, WRT160NL_ART_LEN);
header = vmalloc(sizeof(*header)); header = vmalloc(sizeof(*header));
if (!header) { if (!header) {
return -ENOMEM; return -ENOMEM;