Commit 7b8516b7 authored by Kulikov Vasiliy's avatar Kulikov Vasiliy Committed by David Woodhouse

mtd: nandsim: remove casts from void

Remove unnesessary casts from void*.
Signed-off-by: default avatarKulikov Vasiliy <segooon@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 42845d2a
...@@ -553,8 +553,8 @@ static uint64_t divide(uint64_t n, uint32_t d) ...@@ -553,8 +553,8 @@ static uint64_t divide(uint64_t n, uint32_t d)
*/ */
static int init_nandsim(struct mtd_info *mtd) static int init_nandsim(struct mtd_info *mtd)
{ {
struct nand_chip *chip = (struct nand_chip *)mtd->priv; struct nand_chip *chip = mtd->priv;
struct nandsim *ns = (struct nandsim *)(chip->priv); struct nandsim *ns = chip->priv;
int i, ret = 0; int i, ret = 0;
uint64_t remains; uint64_t remains;
uint64_t next_offset; uint64_t next_offset;
...@@ -1877,7 +1877,7 @@ static void switch_state(struct nandsim *ns) ...@@ -1877,7 +1877,7 @@ static void switch_state(struct nandsim *ns)
static u_char ns_nand_read_byte(struct mtd_info *mtd) static u_char ns_nand_read_byte(struct mtd_info *mtd)
{ {
struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv; struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv;
u_char outb = 0x00; u_char outb = 0x00;
/* Sanity and correctness checks */ /* Sanity and correctness checks */
...@@ -1950,7 +1950,7 @@ static u_char ns_nand_read_byte(struct mtd_info *mtd) ...@@ -1950,7 +1950,7 @@ static u_char ns_nand_read_byte(struct mtd_info *mtd)
static void ns_nand_write_byte(struct mtd_info *mtd, u_char byte) static void ns_nand_write_byte(struct mtd_info *mtd, u_char byte)
{ {
struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv; struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv;
/* Sanity and correctness checks */ /* Sanity and correctness checks */
if (!ns->lines.ce) { if (!ns->lines.ce) {
...@@ -2132,7 +2132,7 @@ static uint16_t ns_nand_read_word(struct mtd_info *mtd) ...@@ -2132,7 +2132,7 @@ static uint16_t ns_nand_read_word(struct mtd_info *mtd)
static void ns_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len) static void ns_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
{ {
struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv; struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv;
/* Check that chip is expecting data input */ /* Check that chip is expecting data input */
if (!(ns->state & STATE_DATAIN_MASK)) { 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,7 +2159,7 @@ static void ns_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
static void ns_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) static void ns_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
{ {
struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv; struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv;
/* Sanity and correctness checks */ /* Sanity and correctness checks */
if (!ns->lines.ce) { if (!ns->lines.ce) {
...@@ -2352,7 +2352,7 @@ module_init(ns_init_module); ...@@ -2352,7 +2352,7 @@ module_init(ns_init_module);
*/ */
static void __exit ns_cleanup_module(void) static void __exit ns_cleanup_module(void)
{ {
struct nandsim *ns = (struct nandsim *)(((struct nand_chip *)nsmtd->priv)->priv); struct nandsim *ns = ((struct nand_chip *)nsmtd->priv)->priv;
int i; int i;
free_nandsim(ns); /* Free nandsim private resources */ free_nandsim(ns); /* Free nandsim private resources */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment