aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nandsim.c
diff options
context:
space:
mode:
authorKulikov Vasiliy <segooon@gmail.com>2010-06-29 06:15:17 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-08-02 04:05:54 -0400
commit7b8516b780ec639f26a4c6cdb51e342d8feecd44 (patch)
tree34f290d02898545f5bb719871df6d2dcfac8b50c /drivers/mtd/nand/nandsim.c
parent42845d2a49e574788823ae5e91c39e64c25cd872 (diff)
mtd: nandsim: remove casts from void
Remove unnesessary casts from void*. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/nandsim.c')
-rw-r--r--drivers/mtd/nand/nandsim.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index 261337efe0ee..c25648bb5793 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -553,8 +553,8 @@ static uint64_t divide(uint64_t n, uint32_t d)
553 */ 553 */
554static int init_nandsim(struct mtd_info *mtd) 554static int init_nandsim(struct mtd_info *mtd)
555{ 555{
556 struct nand_chip *chip = (struct nand_chip *)mtd->priv; 556 struct nand_chip *chip = mtd->priv;
557 struct nandsim *ns = (struct nandsim *)(chip->priv); 557 struct nandsim *ns = chip->priv;
558 int i, ret = 0; 558 int i, ret = 0;
559 uint64_t remains; 559 uint64_t remains;
560 uint64_t next_offset; 560 uint64_t next_offset;
@@ -1877,7 +1877,7 @@ static void switch_state(struct nandsim *ns)
1877 1877
1878static u_char ns_nand_read_byte(struct mtd_info *mtd) 1878static u_char ns_nand_read_byte(struct mtd_info *mtd)
1879{ 1879{
1880 struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv; 1880 struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv;
1881 u_char outb = 0x00; 1881 u_char outb = 0x00;
1882 1882
1883 /* Sanity and correctness checks */ 1883 /* Sanity and correctness checks */
@@ -1950,7 +1950,7 @@ static u_char ns_nand_read_byte(struct mtd_info *mtd)
1950 1950
1951static void ns_nand_write_byte(struct mtd_info *mtd, u_char byte) 1951static void ns_nand_write_byte(struct mtd_info *mtd, u_char byte)
1952{ 1952{
1953 struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv; 1953 struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv;
1954 1954
1955 /* Sanity and correctness checks */ 1955 /* Sanity and correctness checks */
1956 if (!ns->lines.ce) { 1956 if (!ns->lines.ce) {
@@ -2132,7 +2132,7 @@ static uint16_t ns_nand_read_word(struct mtd_info *mtd)
2132 2132
2133static void ns_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len) 2133static void ns_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
2134{ 2134{
2135 struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv; 2135 struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv;
2136 2136
2137 /* Check that chip is expecting data input */ 2137 /* Check that chip is expecting data input */
2138 if (!(ns->state & STATE_DATAIN_MASK)) { 2138 if (!(ns->state & STATE_DATAIN_MASK)) {
@@ -2159,7 +2159,7 @@ static void ns_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
2159 2159
2160static void ns_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) 2160static void ns_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
2161{ 2161{
2162 struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv; 2162 struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv;
2163 2163
2164 /* Sanity and correctness checks */ 2164 /* Sanity and correctness checks */
2165 if (!ns->lines.ce) { 2165 if (!ns->lines.ce) {
@@ -2352,7 +2352,7 @@ module_init(ns_init_module);
2352 */ 2352 */
2353static void __exit ns_cleanup_module(void) 2353static void __exit ns_cleanup_module(void)
2354{ 2354{
2355 struct nandsim *ns = (struct nandsim *)(((struct nand_chip *)nsmtd->priv)->priv); 2355 struct nandsim *ns = ((struct nand_chip *)nsmtd->priv)->priv;
2356 int i; 2356 int i;
2357 2357
2358 free_nandsim(ns); /* Free nandsim private resources */ 2358 free_nandsim(ns); /* Free nandsim private resources */