X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmtd%2Fmaps%2Fsc520cdp.c;h=9b50cfc355b113b411040b6d473a518ec5e92ccb;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=a06ed21e7ed1b85f9799a08f87b821947f261c42;hpb=6a77f38946aaee1cd85eeec6cf4229b204c15071;p=linux-2.6.git diff --git a/drivers/mtd/maps/sc520cdp.c b/drivers/mtd/maps/sc520cdp.c index a06ed21e7..9b50cfc35 100644 --- a/drivers/mtd/maps/sc520cdp.c +++ b/drivers/mtd/maps/sc520cdp.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: sc520cdp.c,v 1.21 2004/12/13 10:27:08 dedekind Exp $ + * $Id: sc520cdp.c,v 1.23 2005/11/17 08:20:27 dwmw2 Exp $ * * * The SC520CDP is an evaluation board for the Elan SC520 processor available @@ -25,7 +25,6 @@ * For details see http://www.amd.com/products/epd/desiging/evalboards/18.elansc520/520_cdp_brief/index.html */ -#include #include #include #include @@ -107,7 +106,7 @@ static struct map_info sc520cdp_map[] = { }, }; -#define NUM_FLASH_BANKS (sizeof(sc520cdp_map)/sizeof(struct map_info)) +#define NUM_FLASH_BANKS ARRAY_SIZE(sc520cdp_map) static struct mtd_info *mymtd[NUM_FLASH_BANKS]; static struct mtd_info *merged_mtd; @@ -164,7 +163,7 @@ struct sc520_par_table unsigned long default_address; }; -static struct sc520_par_table par_table[NUM_FLASH_BANKS] = +static const struct sc520_par_table par_table[NUM_FLASH_BANKS] = { { /* Flash Bank #0: selected by ROMCS0 */ SC520_PAR_ROMCS0, @@ -231,7 +230,7 @@ static void sc520cdp_setup_par(void) static int __init init_sc520cdp(void) { int i, devices_found = 0; - + #ifdef REPROGRAM_PAR /* reprogram PAR registers so flash appears at the desired addresses */ sc520cdp_setup_par(); @@ -278,7 +277,7 @@ static int __init init_sc520cdp(void) static void __exit cleanup_sc520cdp(void) { int i; - + if (merged_mtd) { del_mtd_device(merged_mtd); mtd_concat_destroy(merged_mtd);