mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Greg KH <gregkh@suse.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-pci@atrey.karlin.mff.cuni.cz
Subject: [PATCH 9/10] drivers/char: pci_find_device remove (drivers/char/watchdog/alim7101_wdt.c)
Date: Sat, 10 Sep 2005 14:21:09 +0200	[thread overview]
Message-ID: <200509101221.j8ACL9wY017263@localhost.localdomain> (raw)
In-Reply-To: <200509101219.j8ACJHeb017063@localhost.localdomain>

Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>

 alim7101_wdt.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/char/watchdog/alim7101_wdt.c b/drivers/char/watchdog/alim7101_wdt.c
--- a/drivers/char/watchdog/alim7101_wdt.c
+++ b/drivers/char/watchdog/alim7101_wdt.c
@@ -333,6 +333,8 @@ static void __exit alim7101_wdt_unload(v
 	/* Deregister */
 	misc_deregister(&wdt_miscdev);
 	unregister_reboot_notifier(&wdt_notifier);
+
+	pci_dev_put(alim7101_pmu);
 }
 
 static int __init alim7101_wdt_init(void)
@@ -342,7 +344,8 @@ static int __init alim7101_wdt_init(void
 	char tmp;
 
 	printk(KERN_INFO PFX "Steve Hill <steve@navaho.co.uk>.\n");
-	alim7101_pmu = pci_find_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101,NULL);
+	alim7101_pmu = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101,
+		NULL);
 	if (!alim7101_pmu) {
 		printk(KERN_INFO PFX "ALi M7101 PMU not present - WDT not set\n");
 		return -EBUSY;
@@ -351,12 +354,14 @@ static int __init alim7101_wdt_init(void
 	/* Set the WDT in the PMU to 1 second */
 	pci_write_config_byte(alim7101_pmu, ALI_7101_WDT, 0x02);
 
-	ali1543_south = pci_find_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL);
+	ali1543_south = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533,
+		NULL);
 	if (!ali1543_south) {
 		printk(KERN_INFO PFX "ALi 1543 South-Bridge not present - WDT not set\n");
 		return -EBUSY;
 	}
 	pci_read_config_byte(ali1543_south, 0x5e, &tmp);
+	pci_dev_put(ali1543_south);
 	if ((tmp & 0x1e) == 0x00) {
 		if (!use_gpio) {
 			printk(KERN_INFO PFX "Detected old alim7101 revision 'a1d'.  If this is a cobalt board, set the 'use_gpio' module parameter.\n");

  parent reply	other threads:[~2005-09-10 12:21 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-10 12:19 [PATCH 0/10] drivers/char: pci_find_device remove Jiri Slaby
2005-09-10 12:21 ` [PATCH 1/10] drivers/char: pci_find_device remove (drivers/char/ip2main.c) Jiri Slaby
2005-09-10 20:17   ` Jiri Slaby
2005-09-11 22:54     ` Jiri Slaby
2005-10-06 22:16       ` Jiri Slaby
2005-10-12 16:47         ` Jiri Slaby
2005-10-12 17:06           ` [PATCH 2.6.14-rc4] Maintainers one entry removed Jiri Slaby
2005-10-12 18:14             ` Michael Krufky
2005-10-12 18:56             ` Alan Cox
     [not found]               ` <4af2d03a0510121137h2c89ee1fw35109a41351a8b2e@mail.gmail.com>
2005-10-12 19:14                 ` Michael H. Warfield
2005-10-12 20:09                   ` Jiri Slaby
2005-10-12 20:46                     ` David S. Miller
2005-10-12 19:52                 ` Michael H. Warfield
2005-09-10 20:57   ` [PATCH 1/10] drivers/char: pci_find_device remove (drivers/char/ip2main.c) Jeff Garzik
2005-09-10 12:21 ` Jiri Slaby [this message]
2005-09-10 12:21 ` [PATCH 7/10] drivers/char: pci_find_device remove (drivers/char/sx.c) Jiri Slaby
2005-09-10 12:21 ` [PATCH 3/10] drivers/char: pci_find_device remove (drivers/char/mxser.c) Jiri Slaby
2005-09-10 12:21 ` [PATCH 6/10] drivers/char: pci_find_device remove (drivers/char/stallion.c) Jiri Slaby
2005-09-10 20:56   ` Jeff Garzik
2005-09-10 12:21 ` [PATCH 8/10] drivers/char: pci_find_device remove (drivers/char/watchdog/alim1535_wdt.c) Jiri Slaby
2005-09-10 12:21 ` [PATCH 5/10] drivers/char: pci_find_device remove (drivers/char/specialix.c) Jiri Slaby
2005-09-10 20:19   ` Jiri Slaby
2005-10-06 22:20     ` Jiri Slaby
2005-09-10 20:56   ` Jeff Garzik
2005-09-10 21:00     ` Jiri Slaby
2005-09-10 21:17       ` Greg KH
2005-09-10 21:35         ` Jiri Slaby
2005-09-10 21:41           ` Jeff Garzik
2005-09-10 22:39             ` [PATCH] (i)stallion remove Jiri Slaby
2005-09-11  0:03               ` Alan Cox
2005-09-10 23:39                 ` Matthew Wilcox
2005-09-11  0:10                   ` Alan Cox
2005-09-12  1:39               ` Peter Chubb
2005-09-12  9:22                 ` Jiri Slaby
2005-09-12  9:31                 ` Christoph Hellwig
2005-09-10 21:38         ` [PATCH 5/10] drivers/char: pci_find_device remove (drivers/char/specialix.c) Jiri Slaby
2005-09-10 12:21 ` [PATCH 2/10] drivers/char: pci_find_device remove (drivers/char/istallion.c) Jiri Slaby
2005-09-10 12:21 ` [PATCH 4/10] drivers/char: pci_find_device remove (drivers/char/rocket.c) Jiri Slaby
2005-09-10 20:56   ` Jeff Garzik
2005-09-10 12:21 ` [PATCH 10/10] drivers/char: pci_find_device remove (drivers/char/watchdog/i8xx_tco.c) Jiri Slaby
2005-09-10 20:15   ` Jiri Slaby
2005-09-10 20:44     ` Nils Faerber
2005-09-10 20:58   ` Jeff Garzik
2005-09-10 22:00     ` Matthieu CASTET

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=200509101221.j8ACL9wY017263@localhost.localdomain \
    --to=jirislaby@gmail.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    /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®