]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
zynq: nand: Cleanup xnandps_device_ready
authorJagannadha Sutradharudu Teki <jagannadha.sutradharudu-teki@xilinx.com>
Tue, 5 Mar 2013 14:05:04 +0000 (19:35 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 5 Mar 2013 15:58:43 +0000 (16:58 +0100)
Cleanup the xnandps_device_ready logic by removing unnecessary
status variable.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
drivers/mtd/nand/zynq_nand.c

index 1106cb8493203d268398b793475a2aec77cd4418..ae0ade3b48d461555eb2e620ad14cf72bdc129ee 100644 (file)
@@ -988,14 +988,13 @@ static void xnandps_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
  */
 static int xnandps_device_ready(struct mtd_info *mtd)
 {
-       unsigned long status;
-
        /* Check the raw_int_status1 bit */
-       status = readl(&xnandps_smc_mem_base->csr) & 0x40;
-       /* Clear the interrupt condition */
-       if (status)
+       if ((readl(&xnandps_smc_mem_base->csr)) & 0x40) {
+               /* Clear the interrupt condition */
                writel((1<<4), &xnandps_smc_mem_base->cfr);
-       return status ? 1 : 0;
+               return 1;
+       }
+       return 0;
 }
 
 int zynq_nand_init(struct nand_chip *nand_chip)