From: david@hardeman.nu
To: linux-kernel@vger.kernel.org
Cc: linux-input@vger.kernel.org, jbarnes@virtuousgeek.org,
akpm@linux-foundation.org, bjorn.helgaas@hp.com,
randy.dunlap@oracle.com, david@hardeman.nu
Subject: [patch 1/2] Add a shutdown method to pnp drivers
Date: Sun, 09 Aug 2009 11:56:46 +0200 [thread overview]
Message-ID: <20090809095743.926828201@hardeman.nu> (raw)
In-Reply-To: 20090809095645.198777507@hardeman.nu
[-- Attachment #1: add-pnp-shutdown-method --]
[-- Type: TEXT/PLAIN, Size: 1947 bytes --]
The shutdown method is used by the winbond cir driver to setup the
hardware for wake-from-S5.
Changes since last version: the previous patch added a shutdown method
to acpi drivers, the winbond cir driver is now a pnp driver so the
shutdown method is added to pnp drivers instead. Patch by
Bjorn Helgaas <bjorn.helgaas@hp.com>.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: David Härdeman <david@hardeman.nu>
Index: linux-2.6/drivers/pnp/driver.c
===================================================================
--- linux-2.6.orig/drivers/pnp/driver.c 2009-07-25 19:53:32.000000000 +0200
+++ linux-2.6/drivers/pnp/driver.c 2009-07-25 19:54:21.000000000 +0200
@@ -135,6 +135,15 @@
return 0;
}
+static void pnp_device_shutdown(struct device *dev)
+{
+ struct pnp_dev *pnp_dev = to_pnp_dev(dev);
+ struct pnp_driver *drv = pnp_dev->driver;
+
+ if (drv && drv->shutdown)
+ drv->shutdown(pnp_dev);
+}
+
static int pnp_bus_match(struct device *dev, struct device_driver *drv)
{
struct pnp_dev *pnp_dev = to_pnp_dev(dev);
@@ -203,6 +212,7 @@
.match = pnp_bus_match,
.probe = pnp_device_probe,
.remove = pnp_device_remove,
+ .shutdown = pnp_device_shutdown,
.suspend = pnp_bus_suspend,
.resume = pnp_bus_resume,
.dev_attrs = pnp_interface_attrs,
Index: linux-2.6/include/linux/pnp.h
===================================================================
--- linux-2.6.orig/include/linux/pnp.h 2009-07-25 19:53:32.000000000 +0200
+++ linux-2.6/include/linux/pnp.h 2009-07-25 19:54:21.000000000 +0200
@@ -360,6 +360,7 @@
unsigned int flags;
int (*probe) (struct pnp_dev *dev, const struct pnp_device_id *dev_id);
void (*remove) (struct pnp_dev *dev);
+ void (*shutdown) (struct pnp_dev *dev);
int (*suspend) (struct pnp_dev *dev, pm_message_t state);
int (*resume) (struct pnp_dev *dev);
struct device_driver driver;
--
David Härdeman
next prev parent reply other threads:[~2009-08-09 9:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-09 9:56 [patch 0/2] Winbond IR Driver - v2 david
2009-08-09 9:56 ` david [this message]
2009-08-09 9:56 ` [patch 2/2] Add a driver for the Winbond WPCD376I Consumer IR hardware david
2009-08-10 15:39 ` Bjorn Helgaas
2009-08-13 6:58 ` Dmitry Torokhov
2009-08-13 9:34 ` David Härdeman
2009-08-13 15:56 ` Dmitry Torokhov
2009-08-13 17:58 ` David Härdeman
2009-08-13 17:14 ` David Härdeman
2009-08-15 3:02 ` [patch 0/2] Winbond IR Driver - v2 Maxim Levitsky
2009-08-15 20:10 ` David Härdeman
2009-08-15 22:10 ` Maxim Levitsky
2009-08-16 18:43 ` David Härdeman
2009-08-17 3:56 ` Maxim Levitsky
-- strict thread matches above, loose matches on Subject: below --
2009-08-11 16:26 David Härdeman
2009-08-11 16:26 ` [patch 1/2] Add a shutdown method to pnp drivers David Härdeman
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=20090809095743.926828201@hardeman.nu \
--to=david@hardeman.nu \
--cc=akpm@linux-foundation.org \
--cc=bjorn.helgaas@hp.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
/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;
as well as URLs for NNTP newsgroup(s).