mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sander Eikelenboom <linux@eikelenboom.it>
To: Jeff Garzik <jgarzik@pobox.com>, linux-kernel@vger.kernel.org
Cc: linux-ide@vger.kernel.org
Subject: libata-acpi.c ata_acpi_register_power_resource copy and paste mistake ?
Date: Thu, 28 Feb 2013 17:45:10 +0100	[thread overview]
Message-ID: <928867757.20130228174510@eikelenboom.it> (raw)

Hi Jeff,

During the last merge of ahci code (d9978ec5680059d727b39d6c706777c6973587f2), i saw this coming by:


--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -1024,30 +1024,20 @@ static void ata_acpi_register_power_resource(struct ata_device *dev)
 {
        struct scsi_device *sdev = dev->sdev;
        acpi_handle handle;
-       struct device *device;
 
        handle = ata_dev_acpi_handle(dev);
-       if (!handle)
-               return;
-
-       device = &sdev->sdev_gendev;
-
-       acpi_power_resource_register_device(device, handle);
+       if (handle)
+               acpi_dev_pm_remove_dependent(handle, &sdev->sdev_gendev);
 }

shouldn't:

acpi_dev_pm_remove_dependent(handle, &sdev->sdev_gendev);

be

acpi_dev_pm_add_dependent(handle, &sdev->sdev_gendev);

in the ata_acpi_register_power_resource function ?

(seems like a copy and paste mistake from the unregister function)

--
Sander




             reply	other threads:[~2013-02-28 16:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28 16:45 Sander Eikelenboom [this message]
2013-03-01  1:59 ` Aaron Lu
2013-03-01  2:11   ` Rafael J. Wysocki
2013-03-01 11:16     ` [PATCH] libata-acpi.c: fix copy and paste mistake in ata_acpi_register_power_resource Sander Eikelenboom
2013-03-01 16:34       ` Rafael J. Wysocki
2013-03-04 22:15       ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=928867757.20130228174510@eikelenboom.it \
    --to=linux@eikelenboom.it \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®