git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
mtd
/
maps
/
dilnetpc.c
diff --git
a/drivers/mtd/maps/dilnetpc.c
b/drivers/mtd/maps/dilnetpc.c
index
b51c757
..
b1104fe
100644
(file)
--- a/
drivers/mtd/maps/dilnetpc.c
+++ b/
drivers/mtd/maps/dilnetpc.c
@@
-25,7
+25,6
@@
* and http://www.ssv-embedded.de/ssv/pc104/p170.htm
*/
* and http://www.ssv-embedded.de/ssv/pc104/p170.htm
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
@@
-218,8
+217,8
@@
static void dnp_set_vpp(struct map_info *not_used, int on)
{
if(--vpp_counter == 0)
setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x4);
{
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);
}
}
spin_unlock_irq(&dnpc_spin);
}
@@
-240,8
+239,8
@@
static void adnp_set_vpp(struct map_info *not_used, int on)
{
if(--vpp_counter == 0)
setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x8);
{
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);
}
}
spin_unlock_irq(&dnpc_spin);
}
@@
-300,7
+299,7
@@
static struct mtd_partition partition_info[]=
},
};
},
};
-#define NUM_PARTITIONS
(sizeof(partition_info)/sizeof(partition_info[0])
)
+#define NUM_PARTITIONS
ARRAY_SIZE(partition_info
)
static struct mtd_info *mymtd;
static struct mtd_info *lowlvl_parts[NUM_PARTITIONS];
static struct mtd_info *mymtd;
static struct mtd_info *lowlvl_parts[NUM_PARTITIONS];
@@
-345,7
+344,7
@@
static struct mtd_partition higlvl_partition_info[]=
},
};
},
};
-#define NUM_HIGHLVL_PARTITIONS
(sizeof(higlvl_partition_info)/sizeof(partition_info[0])
)
+#define NUM_HIGHLVL_PARTITIONS
ARRAY_SIZE(higlvl_partition_info
)
static int dnp_adnp_probe(void)
static int dnp_adnp_probe(void)