Changeset 29856


Ignore:
Timestamp:
2012-01-22T18:55:38+01:00 (6 years ago)
Author:
juhosg
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c

    r27049 r29856  
    2323 
    2424#include <linux/kernel.h> 
     25#include <linux/module.h> 
    2526#include <linux/slab.h> 
    2627#include <linux/vmalloc.h> 
     
    9293        size_t retlen; 
    9394        unsigned int kernel_len; 
    94         unsigned int uboot_len = max(master->erasesize, WRT160NL_UBOOT_LEN); 
    95         unsigned int nvram_len = max(master->erasesize, WRT160NL_NVRAM_LEN); 
    96         unsigned int art_len = max(master->erasesize, WRT160NL_ART_LEN); 
     95        unsigned int uboot_len; 
     96        unsigned int nvram_len; 
     97        unsigned int art_len; 
    9798        int ret; 
     99 
     100        uboot_len = max_t(unsigned int, master->erasesize, WRT160NL_UBOOT_LEN); 
     101        nvram_len = max_t(unsigned int, master->erasesize, WRT160NL_NVRAM_LEN); 
     102        art_len = max_t(unsigned int, master->erasesize, WRT160NL_ART_LEN); 
    98103 
    99104        header = vmalloc(sizeof(*header)); 
Note: See TracChangeset for help on using the changeset viewer.