[PATCH v3 5/8] MTD: xway: fix nand locking

Boris Brezillon boris.brezillon at free-electrons.com
Sun Jun 19 09:40:27 PDT 2016


On Sun, 19 Jun 2016 18:34:30 +0200
Hauke Mehrtens <hauke at hauke-m.de> wrote:
> >> @@ -113,14 +115,8 @@ static unsigned char xway_read_byte(struct mtd_info *mtd)
> >>  {
> >>  	struct nand_chip *this = mtd_to_nand(mtd);
> >>  	unsigned long nandaddr = (unsigned long) this->IO_ADDR_R;
> >> -	unsigned long flags;
> >> -	int ret;
> >>  
> >> -	spin_lock_irqsave(&ebu_lock, flags);
> >> -	ret = ltq_r8((void __iomem *)(nandaddr + NAND_READ_DATA));
> >> -	spin_unlock_irqrestore(&ebu_lock, flags);
> >> -
> >> -	return ret;
> >> +	return ltq_r8((void __iomem *)(nandaddr + NAND_READ_DATA));  
> > 
> > 	Drop the cast and use this->IO_ADDR_R here.  
> 
> This will be done in the following patch, here I am only chaining the
> locking.

My bad, you're right.





More information about the linux-mtd mailing list