Commit bba077d8 authored by Sergey Shtylyov's avatar Sergey Shtylyov Committed by Damien Le Moal
Browse files

ata: pata_samsung_cf: make pata_s3c_devchk() return 'bool'



pata_s3c_devchk() returns 1 if a device is present, 0 if not -- the 'bool'
type clearly fits better here than 'unsigned int'...

Signed-off-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
parent 1336aa88
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -308,8 +308,7 @@ static void pata_s3c_dev_select(struct ata_port *ap, unsigned int device)
/*
/*
 * pata_s3c_devchk - PATA device presence detection
 * pata_s3c_devchk - PATA device presence detection
 */
 */
static unsigned int pata_s3c_devchk(struct ata_port *ap,
static bool pata_s3c_devchk(struct ata_port *ap, unsigned int device)
				unsigned int device)
{
{
	struct ata_ioports *ioaddr = &ap->ioaddr;
	struct ata_ioports *ioaddr = &ap->ioaddr;
	u8 nsect, lbal;
	u8 nsect, lbal;
@@ -329,9 +328,9 @@ static unsigned int pata_s3c_devchk(struct ata_port *ap,
	lbal = ata_inb(ap->host, ioaddr->lbal_addr);
	lbal = ata_inb(ap->host, ioaddr->lbal_addr);


	if ((nsect == 0x55) && (lbal == 0xaa))
	if ((nsect == 0x55) && (lbal == 0xaa))
		return 1;	/* we found a device */
		return true;	/* we found a device */


	return 0;		/* nothing found */
	return false;		/* nothing found */
}
}


/*
/*