libata: fix ata_dev_disable()
Fix silly condition check bug in ata_dev_disable(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
112cc2b510
commit
09d7f9b065
1 changed files with 3 additions and 2 deletions
|
@ -600,8 +600,9 @@ static const char *sata_spd_string(unsigned int spd)
|
|||
|
||||
void ata_dev_disable(struct ata_device *dev)
|
||||
{
|
||||
if (ata_dev_enabled(dev) && ata_msg_drv(dev->ap)) {
|
||||
ata_dev_printk(dev, KERN_WARNING, "disabled\n");
|
||||
if (ata_dev_enabled(dev)) {
|
||||
if (ata_msg_drv(dev->ap))
|
||||
ata_dev_printk(dev, KERN_WARNING, "disabled\n");
|
||||
ata_down_xfermask_limit(dev, ATA_DNXFER_FORCE_PIO0 |
|
||||
ATA_DNXFER_QUIET);
|
||||
dev->class++;
|
||||
|
|
Loading…
Reference in a new issue