public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Vikram Dhillon <opensolarisdev@gmail.com>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
	ACPI Devel Mailing List <linux-acpi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>, Len Brown <lenb@kernel.org>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	platform-driver-x86@vger.kernel.org,
	Eric Piel <eric.piel@tremplin-utc.net>,
	Mattia Dongili <malattia@linux.it>,
	Harald Welte <laforge@gnumonks.org>
Subject: Re: [PATCH 16/21] toshiba_bluetooth: Use struct dev_pm_ops for power management
Date: Sun, 24 Jun 2012 22:00:35 +0200	[thread overview]
Message-ID: <201206242200.35607.rjw@sisk.pl> (raw)
In-Reply-To: <CAK7t_7Vfgqps+iavyQmXhj+CwSoBOEkCyFhTo_mXnC3stQtxDw@mail.gmail.com>

On Sunday, June 24, 2012, Vikram Dhillon wrote:
> On Sat, Jun 23, 2012 at 5:18 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> >
> > Make the toshiba_bluetooth driver define its PM callbacks through
> > a struct dev_pm_ops object rather than by using legacy PM hooks
> > in struct acpi_device_ops.
> >
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > ---
> >  drivers/platform/x86/toshiba_bluetooth.c |   10 ++++++----
> >  1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > Index: linux/drivers/platform/x86/toshiba_bluetooth.c
> > ===================================================================
> > --- linux.orig/drivers/platform/x86/toshiba_bluetooth.c
> > +++ linux/drivers/platform/x86/toshiba_bluetooth.c
> > @@ -34,7 +34,6 @@ MODULE_LICENSE("GPL");
> >  static int toshiba_bt_rfkill_add(struct acpi_device *device);
> >  static int toshiba_bt_rfkill_remove(struct acpi_device *device, int type);
> >  static void toshiba_bt_rfkill_notify(struct acpi_device *device, u32 event);
> > -static int toshiba_bt_resume(struct acpi_device *device);
> >
> >  static const struct acpi_device_id bt_device_ids[] = {
> >        { "TOS6205", 0},
> > @@ -42,6 +41,9 @@ static const struct acpi_device_id bt_de
> >  };
> >  MODULE_DEVICE_TABLE(acpi, bt_device_ids);
> >
> > +static int toshiba_bt_resume(struct device *dev);
> > +static SIMPLE_DEV_PM_OPS(toshiba_bt_pm, NULL, toshiba_bt_resume);
> > +
> >  static struct acpi_driver toshiba_bt_rfkill_driver = {
> >        .name =         "Toshiba BT",
> >        .class =        "Toshiba",
> > @@ -50,9 +52,9 @@ static struct acpi_driver toshiba_bt_rfk
> >                                .add =          toshiba_bt_rfkill_add,
> >                                .remove =       toshiba_bt_rfkill_remove,
> >                                .notify =       toshiba_bt_rfkill_notify,
> > -                               .resume =       toshiba_bt_resume,
> >                        },
> >        .owner =        THIS_MODULE,
> > +       .drv.pm =       &toshiba_bt_pm,
> >  };
> >
> >
> > @@ -88,9 +90,9 @@ static void toshiba_bt_rfkill_notify(str
> >        toshiba_bluetooth_enable(device->handle);
> >  }
> >
> > -static int toshiba_bt_resume(struct acpi_device *device)
> > +static int toshiba_bt_resume(struct device *dev)
> >  {
> > -       return toshiba_bluetooth_enable(device->handle);
> > +       return toshiba_bluetooth_enable(to_acpi_device(dev)->handle);
> >  }
> >
> >  static int toshiba_bt_rfkill_add(struct acpi_device *device)
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
> 
> Looks good, will look into the other struct patch (#11) tomorrow.
> 
> Reviewed-by: Vikram Dhillon <opensolarisdev@gmail.com>

Thanks a lot!

Rafael

  reply	other threads:[~2012-06-24 19:55 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-23 21:06 [PATCH 0/21] ACPI / PM: Switch ACPI bus type and drivers to dev_pm_ops Rafael J. Wysocki
2012-06-23 21:08 ` [PATCH 1/21] ACPI / PM: Drop pm_message_t argument from device suspend callback Rafael J. Wysocki
2012-06-23 21:08 ` [PATCH 2/21] ACPI / PM: Make acpi_bus_type use struct dev_pm_ops for PM handling Rafael J. Wysocki
2012-06-23 21:09 ` [PATCH 3/21] ACPI / PM: Make acpi_bus_type use driver struct dev_pm_ops callbacks Rafael J. Wysocki
2012-06-23 21:10 ` [PATCH 4/21] ACPI: Use struct dev_pm_ops for power management in the fan driver Rafael J. Wysocki
2012-06-23 21:11 ` [PATCH 5/21] ACPI: Use struct dev_pm_ops for power management in the thermal driver Rafael J. Wysocki
2012-06-23 21:11 ` [PATCH 6/21] ACPI: Use struct dev_pm_ops for power management in processor driver Rafael J. Wysocki
2012-06-23 21:12 ` [PATCH 7/21] ACPI: Use struct dev_pm_ops for power management in the AC driver Rafael J. Wysocki
2012-06-23 21:13 ` [PATCH 8/21] ACPI: Use struct dev_pm_ops for power management in the battery driver Rafael J. Wysocki
2012-06-23 21:13 ` [PATCH 9/21] ACPI: Use struct dev_pm_ops for power management in the button driver Rafael J. Wysocki
2012-06-23 21:14 ` [PATCH 10/21] ACPI: Use struct dev_pm_ops for power management in the power driver Rafael J. Wysocki
2012-06-23 21:14 ` [PATCH 11/21] ACPI: Use struct dev_pm_ops for power management in the SBS driver Rafael J. Wysocki
2012-06-23 21:15 ` [PATCH 12/21] toshiba_acpi: Use struct dev_pm_ops for power management Rafael J. Wysocki
2012-06-23 21:16 ` [PATCH 13/21] hp_accel: " Rafael J. Wysocki
2012-06-24 20:00   ` Éric Piel
2012-06-24 20:14     ` Rafael J. Wysocki
2012-06-23 21:17 ` [PATCH 14/21] sony-laptop: " Rafael J. Wysocki
2012-06-23 21:17 ` [PATCH 15/21] panasonic-laptop: " Rafael J. Wysocki
2012-06-23 21:18 ` [PATCH 16/21] toshiba_bluetooth: " Rafael J. Wysocki
2012-06-24 12:40   ` Vikram Dhillon
2012-06-24 20:00     ` Rafael J. Wysocki [this message]
2012-06-23 21:18 ` [PATCH 17/21] xo15-ebook: " Rafael J. Wysocki
2012-06-23 21:19 ` [PATCH 18/21] acpi_power_meter: " Rafael J. Wysocki
2012-06-23 21:20 ` [PATCH 19/21] ACPI / PM: Do not execute legacy driver PM callbacks Rafael J. Wysocki
2012-06-23 21:21 ` [PATCH 20/21] ACPI / PM: Drop legacy driver PM callbacks that are not used any more Rafael J. Wysocki
2012-06-23 21:22 ` [PATCH 21/21] ACPI / PM: Drop PM callbacks from the ACPI bus type Rafael J. Wysocki
2012-06-28 22:11 ` [PATCH missing/21] classmate-laptop: Use struct dev_pm_ops for power management Rafael J. Wysocki
2012-06-29 11:39   ` Thadeu Cascardo
2012-06-29 21:52     ` Rafael J. Wysocki
2012-06-28 22:26 ` [PATCH missing 2/21] fujitsu-tablet: " Rafael J. Wysocki
2012-07-19  5:04 ` [PATCH 0/21] ACPI / PM: Switch ACPI bus type and drivers to dev_pm_ops Len Brown
2012-07-19  9:11   ` Rafael J. Wysocki

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=201206242200.35607.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=eric.piel@tremplin-utc.net \
    --cc=laforge@gnumonks.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=malattia@linux.it \
    --cc=mjg59@srcf.ucam.org \
    --cc=opensolarisdev@gmail.com \
    --cc=platform-driver-x86@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