diff options
author | Sergey Shtylyov <s.shtylyov@omp.ru> | 2022-02-09 22:46:29 +0100 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-02-19 03:18:43 +0100 |
commit | bba077d801b1eed07b2ae9ee62a5b134cb1a6830 (patch) | |
tree | 3e5fa27b05151d595c24128702a901a238c6b8a3 /drivers/ata | |
parent | ata: libata-sff: make ata_devchk() return 'bool' (diff) | |
download | linux-bba077d801b1eed07b2ae9ee62a5b134cb1a6830.tar.xz linux-bba077d801b1eed07b2ae9ee62a5b134cb1a6830.zip |
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: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/pata_samsung_cf.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c index 377cd6bd87ac..bdd2178c4a61 100644 --- a/drivers/ata/pata_samsung_cf.c +++ b/drivers/ata/pata_samsung_cf.c @@ -308,8 +308,7 @@ static void pata_s3c_dev_select(struct ata_port *ap, unsigned int device) /* * pata_s3c_devchk - PATA device presence detection */ -static unsigned int pata_s3c_devchk(struct ata_port *ap, - unsigned int device) +static bool pata_s3c_devchk(struct ata_port *ap, unsigned int device) { struct ata_ioports *ioaddr = &ap->ioaddr; 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); 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 */ } /* |