]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/maps/dilnetpc.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
[linux-2.6-omap-h63xx.git] / drivers / mtd / maps / dilnetpc.c
index f99519692cb7815d369577c0c54ede59e7332f1f..efb221692641e6ff0ae03ab444cc1d4803ef73e5 100644 (file)
@@ -14,7 +14,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: dilnetpc.c,v 1.17 2004/11/28 09:40:39 dwmw2 Exp $
+ * $Id: dilnetpc.c,v 1.20 2005/11/07 11:14:26 gleixner Exp $
  *
  * The DIL/Net PC is a tiny embedded PC board made by SSV Embedded Systems
  * featuring the AMD Elan SC410 processor. There are two variants of this
@@ -218,8 +218,8 @@ static void dnp_set_vpp(struct map_info *not_used, int on)
        {
                if(--vpp_counter == 0)
                        setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x4);
-               else if(vpp_counter < 0)
-                       BUG();
+               else
+                       BUG_ON(vpp_counter < 0);
        }
        spin_unlock_irq(&dnpc_spin);
 }
@@ -240,8 +240,8 @@ static void adnp_set_vpp(struct map_info *not_used, int on)
        {
                if(--vpp_counter == 0)
                        setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x8);
-               else if(vpp_counter < 0)
-                       BUG();
+               else
+                       BUG_ON(vpp_counter < 0);
        }
        spin_unlock_irq(&dnpc_spin);
 }
@@ -272,13 +272,13 @@ static struct map_info dnpc_map = {
 
 static struct mtd_partition partition_info[]=
 {
-       { 
-               .name =         "ADNP boot", 
-               .offset =       0, 
+       {
+               .name =         "ADNP boot",
+               .offset =       0,
                .size =         0xf0000,
        },
-       { 
-               .name =         "ADNP system BIOS", 
+       {
+               .name =         "ADNP system BIOS",
                .offset =       MTDPART_OFS_NXTBLK,
                .size =         0x10000,
 #ifdef DNPC_BIOS_BLOCKS_WRITEPROTECTED
@@ -291,7 +291,7 @@ static struct mtd_partition partition_info[]=
                .size =         0x2f0000,
        },
        {
-               .name =         "ADNP system BIOS entry", 
+               .name =         "ADNP system BIOS entry",
                .offset =       MTDPART_OFS_NXTBLK,
                .size =         MTDPART_SIZ_FULL,
 #ifdef DNPC_BIOS_BLOCKS_WRITEPROTECTED
@@ -325,9 +325,9 @@ static struct mtd_info *merged_mtd;
 
 static struct mtd_partition higlvl_partition_info[]=
 {
-       { 
-               .name =         "ADNP boot block", 
-               .offset =       0, 
+       {
+               .name =         "ADNP boot block",
+               .offset =       0,
                .size =         CONFIG_MTD_DILNETPC_BOOTSIZE,
        },
        {
@@ -335,8 +335,8 @@ static struct mtd_partition higlvl_partition_info[]=
                .offset =       MTDPART_OFS_NXTBLK,
                .size =         ADNP_WINDOW_SIZE-CONFIG_MTD_DILNETPC_BOOTSIZE-0x20000,
        },
-       { 
-               .name =         "ADNP system BIOS + BIOS Entry", 
+       {
+               .name =         "ADNP system BIOS + BIOS Entry",
                .offset =       MTDPART_OFS_NXTBLK,
                .size =         MTDPART_SIZ_FULL,
 #ifdef DNPC_BIOS_BLOCKS_WRITEPROTECTED
@@ -371,7 +371,7 @@ static int __init init_dnpc(void)
 
        /*
        ** determine hardware (DNP/ADNP/invalid)
-       */      
+       */
        if((is_dnp = dnp_adnp_probe()) < 0)
                return -ENXIO;
 
@@ -397,13 +397,13 @@ static int __init init_dnpc(void)
                ++dnpc_map.name;
                for(i = 0; i < NUM_PARTITIONS; i++)
                        ++partition_info[i].name;
-               higlvl_partition_info[1].size = DNP_WINDOW_SIZE - 
+               higlvl_partition_info[1].size = DNP_WINDOW_SIZE -
                        CONFIG_MTD_DILNETPC_BOOTSIZE - 0x20000;
                for(i = 0; i < NUM_HIGHLVL_PARTITIONS; i++)
                        ++higlvl_partition_info[i].name;
        }
 
-       printk(KERN_NOTICE "DIL/Net %s flash: 0x%lx at 0x%lx\n", 
+       printk(KERN_NOTICE "DIL/Net %s flash: 0x%lx at 0x%lx\n",
                is_dnp ? "DNPC" : "ADNP", dnpc_map.size, dnpc_map.phys);
 
        dnpc_map.virt = ioremap_nocache(dnpc_map.phys, dnpc_map.size);
@@ -436,7 +436,7 @@ static int __init init_dnpc(void)
                iounmap(dnpc_map.virt);
                return -ENXIO;
        }
-               
+
        mymtd->owner = THIS_MODULE;
 
        /*