mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Driver core __dev* removal patches
Here are the remaining __dev* removal patches against the 3.8-rc2 tree. All of these patches were previously sent to the subsystem maintainers, most of them were picked up and pushed to you, but there were a number that fell through the cracks, and new drivers were added during the merge window, so this series cleans up the rest of the instances of these markings. Third time's the charm... Signed-off-by: Greg Kroah-Hartman <[email protected]> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEABECAAYFAlDmHOIACgkQMUfUDdst+ykTZgCePgK84Im3FFooEXJwaPbaf4ls lO4AoMEDoWK+BHWOsjQwFPOwFFPEN2Xh =6oAQ -----END PGP SIGNATURE----- Merge tag 'driver-core-3.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core __dev* removal patches - take 3 - from Greg Kroah-Hartman: "Here are the remaining __dev* removal patches against the 3.8-rc2 tree. All of these patches were previously sent to the subsystem maintainers, most of them were picked up and pushed to you, but there were a number that fell through the cracks, and new drivers were added during the merge window, so this series cleans up the rest of the instances of these markings. Third time's the charm... Signed-off-by: Greg Kroah-Hartman <[email protected]>" Fixed up trivial conflict with the pinctrl pull in pinctrl-sirf.c. * tag 'driver-core-3.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (54 commits) misc: remove __dev* attributes. include: remove __dev* attributes. Documentation: remove __dev* attributes. Drivers: misc: remove __dev* attributes. Drivers: block: remove __dev* attributes. Drivers: bcma: remove __dev* attributes. Drivers: char: remove __dev* attributes. Drivers: clocksource: remove __dev* attributes. Drivers: ssb: remove __dev* attributes. Drivers: dma: remove __dev* attributes. Drivers: gpu: remove __dev* attributes. Drivers: infinband: remove __dev* attributes. Drivers: memory: remove __dev* attributes. Drivers: mmc: remove __dev* attributes. Drivers: iommu: remove __dev* attributes. Drivers: power: remove __dev* attributes. Drivers: message: remove __dev* attributes. Drivers: macintosh: remove __dev* attributes. Drivers: mfd: remove __dev* attributes. pstore: remove __dev* attributes. ...
This commit is contained in:
commit
49569646b2
1112 changed files with 4523 additions and 5058 deletions
|
|
@ -116,7 +116,7 @@ my_suspend (struct pci_dev * pci_dev,
|
|||
return 0; /* a negative value on error, 0 on success. */
|
||||
}
|
||||
|
||||
static void __devexit
|
||||
static void
|
||||
my_remove (struct pci_dev * pci_dev)
|
||||
{
|
||||
my_device *my = pci_get_drvdata (pci_dev);
|
||||
|
|
@ -124,7 +124,7 @@ my_remove (struct pci_dev * pci_dev)
|
|||
/* Describe me. */
|
||||
}
|
||||
|
||||
static int __devinit
|
||||
static int
|
||||
my_probe (struct pci_dev * pci_dev,
|
||||
const struct pci_device_id * pci_id)
|
||||
{
|
||||
|
|
@ -157,7 +157,7 @@ my_pci_driver = {
|
|||
.id_table = my_pci_device_ids,
|
||||
|
||||
.probe = my_probe,
|
||||
.remove = __devexit_p (my_remove),
|
||||
.remove = my_remove,
|
||||
|
||||
/* Power management functions. */
|
||||
.suspend = my_suspend,
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ To notify SR-IOV core of Virtual Function Migration:
|
|||
|
||||
Following piece of code illustrates the usage of the SR-IOV API.
|
||||
|
||||
static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
static int dev_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
{
|
||||
pci_enable_sriov(dev, NR_VIRTFN);
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id *
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void __devexit dev_remove(struct pci_dev *dev)
|
||||
static void dev_remove(struct pci_dev *dev)
|
||||
{
|
||||
pci_disable_sriov(dev);
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ static struct pci_driver dev_driver = {
|
|||
.name = "SR-IOV Physical Function driver",
|
||||
.id_table = dev_id_table,
|
||||
.probe = dev_probe,
|
||||
.remove = __devexit_p(dev_remove),
|
||||
.remove = dev_remove,
|
||||
.suspend = dev_suspend,
|
||||
.resume = dev_resume,
|
||||
.shutdown = dev_shutdown,
|
||||
|
|
|
|||
|
|
@ -183,12 +183,6 @@ Please mark the initialization and cleanup functions where appropriate
|
|||
initializes.
|
||||
__exit Exit code. Ignored for non-modular drivers.
|
||||
|
||||
|
||||
__devinit Device initialization code.
|
||||
Identical to __init if the kernel is not compiled
|
||||
with CONFIG_HOTPLUG, normal function otherwise.
|
||||
__devexit The same for __exit.
|
||||
|
||||
Tips on when/where to use the above attributes:
|
||||
o The module_init()/module_exit() functions (and all
|
||||
initialization functions called _only_ from these)
|
||||
|
|
@ -196,20 +190,6 @@ Tips on when/where to use the above attributes:
|
|||
|
||||
o Do not mark the struct pci_driver.
|
||||
|
||||
o The ID table array should be marked __devinitconst; this is done
|
||||
automatically if the table is declared with DEFINE_PCI_DEVICE_TABLE().
|
||||
|
||||
o The probe() and remove() functions should be marked __devinit
|
||||
and __devexit respectively. All initialization functions
|
||||
exclusively called by the probe() routine, can be marked __devinit.
|
||||
Ditto for remove() and __devexit.
|
||||
|
||||
o If mydriver_remove() is marked with __devexit(), then all address
|
||||
references to mydriver_remove must use __devexit_p(mydriver_remove)
|
||||
(in the struct pci_driver declaration for example).
|
||||
__devexit_p() will generate the function name _or_ NULL if the
|
||||
function will be discarded. For an example, see drivers/net/tg3.c.
|
||||
|
||||
o Do NOT mark a function if you are not sure which mark to use.
|
||||
Better to not mark the function than mark the function wrong.
|
||||
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ input driver:
|
|||
.acpi_match_table ACPI_PTR(mpu3050_acpi_match),
|
||||
},
|
||||
.probe = mpu3050_probe,
|
||||
.remove = __devexit_p(mpu3050_remove),
|
||||
.remove = mpu3050_remove,
|
||||
.id_table = mpu3050_ids,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ Example (from the nxp OHCI driver):
|
|||
|
||||
static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };
|
||||
|
||||
static int __devinit usb_hcd_nxp_probe(struct platform_device *pdev)
|
||||
static int usb_hcd_nxp_probe(struct platform_device *pdev)
|
||||
{
|
||||
(...)
|
||||
struct i2c_adapter *i2c_adap;
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ static int rpmsg_sample_probe(struct rpmsg_channel *rpdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void __devexit rpmsg_sample_remove(struct rpmsg_channel *rpdev)
|
||||
static void rpmsg_sample_remove(struct rpmsg_channel *rpdev)
|
||||
{
|
||||
dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n");
|
||||
}
|
||||
|
|
@ -253,7 +253,7 @@ static struct rpmsg_driver rpmsg_sample_client = {
|
|||
.id_table = rpmsg_driver_sample_id_table,
|
||||
.probe = rpmsg_sample_probe,
|
||||
.callback = rpmsg_sample_cb,
|
||||
.remove = __devexit_p(rpmsg_sample_remove),
|
||||
.remove = rpmsg_sample_remove,
|
||||
};
|
||||
|
||||
static int __init init(void)
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ SPI protocol drivers somewhat resemble platform device drivers:
|
|||
},
|
||||
|
||||
.probe = CHIP_probe,
|
||||
.remove = __devexit_p(CHIP_remove),
|
||||
.remove = CHIP_remove,
|
||||
.suspend = CHIP_suspend,
|
||||
.resume = CHIP_resume,
|
||||
};
|
||||
|
|
@ -355,7 +355,7 @@ device whose board_info gave a modalias of "CHIP". Your probe() code
|
|||
might look like this unless you're creating a device which is managing
|
||||
a bus (appearing under /sys/class/spi_master).
|
||||
|
||||
static int __devinit CHIP_probe(struct spi_device *spi)
|
||||
static int CHIP_probe(struct spi_device *spi)
|
||||
{
|
||||
struct CHIP *chip;
|
||||
struct CHIP_platform_data *pdata;
|
||||
|
|
|
|||
|
|
@ -174,8 +174,7 @@ The recommended approach is as follows:
|
|||
|
||||
static atomic_t drv_instance = ATOMIC_INIT(0);
|
||||
|
||||
static int __devinit drv_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int drv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
|
||||
{
|
||||
...
|
||||
state->instance = atomic_inc_return(&drv_instance) - 1;
|
||||
|
|
|
|||
|
|
@ -182,8 +182,7 @@ int iterate(void *p)
|
|||
|
||||
static atomic_t drv_instance = ATOMIC_INIT(0);
|
||||
|
||||
static int __devinit drv_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *pci_id)
|
||||
static int drv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
|
||||
{
|
||||
...
|
||||
state->instance = atomic_inc_return(&drv_instance) - 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue