提交 88e6b818 编写于 作者: S Sergey Shtylyov 提交者: Damien Le Moal

ata: sata_rcar: make sata_rcar_ata_devchk() return 'bool'

sata_rcar_ata_devchk() returns 1 if a device is present, 0 if not --
the 'bool' type clearly fits better here than 'unsigned int'...
Signed-off-by: NSergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
上级 bba077d8
......@@ -283,8 +283,7 @@ static void sata_rcar_dev_select(struct ata_port *ap, unsigned int device)
ata_sff_pause(ap); /* needed; also flushes, for mmio */
}
static unsigned int sata_rcar_ata_devchk(struct ata_port *ap,
unsigned int device)
static bool sata_rcar_ata_devchk(struct ata_port *ap, unsigned int device)
{
struct ata_ioports *ioaddr = &ap->ioaddr;
u8 nsect, lbal;
......@@ -304,9 +303,9 @@ static unsigned int sata_rcar_ata_devchk(struct ata_port *ap,
lbal = ioread32(ioaddr->lbal_addr);
if (nsect == 0x55 && lbal == 0xaa)
return 1; /* found a device */
return true; /* found a device */
return 0; /* nothing found */
return false; /* nothing found */
}
static int sata_rcar_wait_after_reset(struct ata_link *link,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册