aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r--drivers/pci/pci-driver.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 0d0d533894e0..ae986e590b48 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -8,6 +8,8 @@
8#include <linux/init.h> 8#include <linux/init.h>
9#include <linux/device.h> 9#include <linux/device.h>
10#include <linux/mempolicy.h> 10#include <linux/mempolicy.h>
11#include <linux/string.h>
12#include <linux/slab.h>
11#include "pci.h" 13#include "pci.h"
12 14
13/* 15/*
@@ -26,7 +28,10 @@ struct pci_dynid {
26#ifdef CONFIG_HOTPLUG 28#ifdef CONFIG_HOTPLUG
27 29
28/** 30/**
29 * store_new_id 31 * store_new_id - add a new PCI device ID to this driver and re-probe devices
32 * @driver: target device driver
33 * @buf: buffer for scanning device ID data
34 * @count: input size
30 * 35 *
31 * Adds a new dynamic pci device ID to this driver, 36 * Adds a new dynamic pci device ID to this driver,
32 * and causes the driver to probe for all devices again. 37 * and causes the driver to probe for all devices again.
@@ -194,8 +199,10 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
194 199
195/** 200/**
196 * __pci_device_probe() 201 * __pci_device_probe()
202 * @drv: driver to call to check if it wants the PCI device
203 * @pci_dev: PCI device being probed
197 * 204 *
198 * returns 0 on success, else error. 205 * returns 0 on success, else error.
199 * side-effect: pci_dev->driver is set to drv when drv claims pci_dev. 206 * side-effect: pci_dev->driver is set to drv when drv claims pci_dev.
200 */ 207 */
201static int 208static int
@@ -377,6 +384,10 @@ int pci_register_driver(struct pci_driver *drv)
377 * the pci shutdown function, this test can go away. */ 384 * the pci shutdown function, this test can go away. */
378 if (!drv->driver.shutdown) 385 if (!drv->driver.shutdown)
379 drv->driver.shutdown = pci_device_shutdown; 386 drv->driver.shutdown = pci_device_shutdown;
387 else
388 printk(KERN_WARNING "Warning: PCI driver %s has a struct "
389 "device_driver shutdown method, please update!\n",
390 drv->name);
380 drv->driver.owner = drv->owner; 391 drv->driver.owner = drv->owner;
381 drv->driver.kobj.ktype = &pci_driver_kobj_type; 392 drv->driver.kobj.ktype = &pci_driver_kobj_type;
382 393
@@ -436,11 +447,11 @@ pci_dev_driver(const struct pci_dev *dev)
436 447
437/** 448/**
438 * pci_bus_match - Tell if a PCI device structure has a matching PCI device id structure 449 * pci_bus_match - Tell if a PCI device structure has a matching PCI device id structure
439 * @ids: array of PCI device id structures to search in
440 * @dev: the PCI device structure to match against 450 * @dev: the PCI device structure to match against
451 * @drv: the device driver to search for matching PCI device id structures
441 * 452 *
442 * Used by a driver to check whether a PCI device present in the 453 * Used by a driver to check whether a PCI device present in the
443 * system is in its list of supported devices.Returns the matching 454 * system is in its list of supported devices. Returns the matching
444 * pci_device_id structure or %NULL if there is no match. 455 * pci_device_id structure or %NULL if there is no match.
445 */ 456 */
446static int pci_bus_match(struct device *dev, struct device_driver *drv) 457static int pci_bus_match(struct device *dev, struct device_driver *drv)