From 4bf27b8b333bcd291664fd0f7d129099d474a23b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 21 Dec 2012 15:09:59 -0800 Subject: Drivers: dma: remove __dev* attributes. CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton Cc: Viresh Kumar Cc: Dan Williams Cc: Vinod Koul Cc: Barry Song Cc: Jeff Kirsher Cc: Alexander Duyck Cc: Russell King Cc: Linus Walleij Cc: Jassi Brar Cc: Dave Jiang Cc: Bill Pemberton Cc: Guennadi Liakhovetski Signed-off-by: Greg Kroah-Hartman --- drivers/dma/dw_dmac.c | 2 +- drivers/dma/edma.c | 2 +- drivers/dma/intel_mid_dma.c | 2 +- drivers/dma/ioat/dca.c | 9 +++------ drivers/dma/ioat/dma.c | 12 ++++++------ drivers/dma/ioat/dma.h | 13 ++++++------- drivers/dma/ioat/dma_v2.c | 2 +- drivers/dma/ioat/dma_v2.h | 8 ++++---- drivers/dma/ioat/dma_v3.c | 8 ++++---- drivers/dma/ioat/pci.c | 9 ++++----- drivers/dma/iop-adma.c | 2 +- drivers/dma/mmp_pdma.c | 2 +- drivers/dma/mmp_tdma.c | 2 +- drivers/dma/mpc512x_dma.c | 2 +- drivers/dma/pch_dma.c | 2 +- drivers/dma/pl330.c | 2 +- drivers/dma/ppc4xx/adma.c | 4 ++-- drivers/dma/sa11x0-dma.c | 2 +- drivers/dma/sh/shdma.c | 2 +- drivers/dma/sirf-dma.c | 2 +- drivers/dma/tegra20-apb-dma.c | 6 +++--- drivers/dma/timb_dma.c | 2 +- 22 files changed, 46 insertions(+), 51 deletions(-) (limited to 'drivers/dma') diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index 8f0b111af4d..3e8ba02ba29 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c @@ -1634,7 +1634,7 @@ static int dw_probe(struct platform_device *pdev) return 0; } -static int __devexit dw_remove(struct platform_device *pdev) +static int dw_remove(struct platform_device *pdev) { struct dw_dma *dw = platform_get_drvdata(pdev); struct dw_dma_chan *dwc, *_dwc; diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 232b4583ae9..f424298f1ac 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c @@ -585,7 +585,7 @@ err_reg1: return ret; } -static int __devexit edma_remove(struct platform_device *pdev) +static int edma_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct edma_cc *ecc = dev_get_drvdata(dev); diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c index bc764afacd9..a0de82e21a7 100644 --- a/drivers/dma/intel_mid_dma.c +++ b/drivers/dma/intel_mid_dma.c @@ -1308,7 +1308,7 @@ err_enable_device: * Free up all resources and data * Call shutdown_dma to complete contoller and chan cleanup */ -static void __devexit intel_mid_dma_remove(struct pci_dev *pdev) +static void intel_mid_dma_remove(struct pci_dev *pdev) { struct middma_device *device = pci_get_drvdata(pdev); diff --git a/drivers/dma/ioat/dca.c b/drivers/dma/ioat/dca.c index d6668071bd0..9b041858d10 100644 --- a/drivers/dma/ioat/dca.c +++ b/drivers/dma/ioat/dca.c @@ -242,8 +242,7 @@ static struct dca_ops ioat_dca_ops = { }; -struct dca_provider * __devinit -ioat_dca_init(struct pci_dev *pdev, void __iomem *iobase) +struct dca_provider *ioat_dca_init(struct pci_dev *pdev, void __iomem *iobase) { struct dca_provider *dca; struct ioat_dca_priv *ioatdca; @@ -408,8 +407,7 @@ static int ioat2_dca_count_dca_slots(void __iomem *iobase, u16 dca_offset) return slots; } -struct dca_provider * __devinit -ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase) +struct dca_provider *ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase) { struct dca_provider *dca; struct ioat_dca_priv *ioatdca; @@ -621,8 +619,7 @@ static inline int dca3_tag_map_invalid(u8 *tag_map) (tag_map[4] == DCA_TAG_MAP_VALID)); } -struct dca_provider * __devinit -ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase) +struct dca_provider *ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase) { struct dca_provider *dca; struct ioat_dca_priv *ioatdca; diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index 73b2b65cb1d..1a68a8ba87e 100644 --- a/drivers/dma/ioat/dma.c +++ b/drivers/dma/ioat/dma.c @@ -782,7 +782,7 @@ static void ioat1_dma_start_null_desc(struct ioat_dma_chan *ioat) */ #define IOAT_TEST_SIZE 2000 -static void __devinit ioat_dma_test_callback(void *dma_async_param) +static void ioat_dma_test_callback(void *dma_async_param) { struct completion *cmp = dma_async_param; @@ -793,7 +793,7 @@ static void __devinit ioat_dma_test_callback(void *dma_async_param) * ioat_dma_self_test - Perform a IOAT transaction to verify the HW works. * @device: device to be tested */ -int __devinit ioat_dma_self_test(struct ioatdma_device *device) +int ioat_dma_self_test(struct ioatdma_device *device) { int i; u8 *src; @@ -994,7 +994,7 @@ static void ioat_disable_interrupts(struct ioatdma_device *device) writeb(0, device->reg_base + IOAT_INTRCTRL_OFFSET); } -int __devinit ioat_probe(struct ioatdma_device *device) +int ioat_probe(struct ioatdma_device *device) { int err = -ENODEV; struct dma_device *dma = &device->common; @@ -1049,7 +1049,7 @@ err_dma_pool: return err; } -int __devinit ioat_register(struct ioatdma_device *device) +int ioat_register(struct ioatdma_device *device) { int err = dma_async_device_register(&device->common); @@ -1183,7 +1183,7 @@ void ioat_kobject_del(struct ioatdma_device *device) } } -int __devinit ioat1_dma_probe(struct ioatdma_device *device, int dca) +int ioat1_dma_probe(struct ioatdma_device *device, int dca) { struct pci_dev *pdev = device->pdev; struct dma_device *dma; @@ -1216,7 +1216,7 @@ int __devinit ioat1_dma_probe(struct ioatdma_device *device, int dca) return err; } -void __devexit ioat_dma_remove(struct ioatdma_device *device) +void ioat_dma_remove(struct ioatdma_device *device) { struct dma_device *dma = &device->common; diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h index 5e8fe01ba69..087935f1565 100644 --- a/drivers/dma/ioat/dma.h +++ b/drivers/dma/ioat/dma.h @@ -303,13 +303,12 @@ static inline void ioat_unmap(struct pci_dev *pdev, dma_addr_t addr, size_t len, pci_unmap_page(pdev, addr, len, direction); } -int __devinit ioat_probe(struct ioatdma_device *device); -int __devinit ioat_register(struct ioatdma_device *device); -int __devinit ioat1_dma_probe(struct ioatdma_device *dev, int dca); -int __devinit ioat_dma_self_test(struct ioatdma_device *device); -void __devexit ioat_dma_remove(struct ioatdma_device *device); -struct dca_provider * __devinit ioat_dca_init(struct pci_dev *pdev, - void __iomem *iobase); +int ioat_probe(struct ioatdma_device *device); +int ioat_register(struct ioatdma_device *device); +int ioat1_dma_probe(struct ioatdma_device *dev, int dca); +int ioat_dma_self_test(struct ioatdma_device *device); +void ioat_dma_remove(struct ioatdma_device *device); +struct dca_provider *ioat_dca_init(struct pci_dev *pdev, void __iomem *iobase); dma_addr_t ioat_get_current_completion(struct ioat_chan_common *chan); void ioat_init_channel(struct ioatdma_device *device, struct ioat_chan_common *chan, int idx); diff --git a/drivers/dma/ioat/dma_v2.c b/drivers/dma/ioat/dma_v2.c index b9d66785144..82d4e306c32 100644 --- a/drivers/dma/ioat/dma_v2.c +++ b/drivers/dma/ioat/dma_v2.c @@ -862,7 +862,7 @@ struct kobj_type ioat2_ktype = { .default_attrs = ioat2_attrs, }; -int __devinit ioat2_dma_probe(struct ioatdma_device *device, int dca) +int ioat2_dma_probe(struct ioatdma_device *device, int dca) { struct pci_dev *pdev = device->pdev; struct dma_device *dma; diff --git a/drivers/dma/ioat/dma_v2.h b/drivers/dma/ioat/dma_v2.h index be2a55b95c2..e100f644e34 100644 --- a/drivers/dma/ioat/dma_v2.h +++ b/drivers/dma/ioat/dma_v2.h @@ -155,10 +155,10 @@ static inline void ioat2_set_chainaddr(struct ioat2_dma_chan *ioat, u64 addr) chan->reg_base + IOAT2_CHAINADDR_OFFSET_HIGH); } -int __devinit ioat2_dma_probe(struct ioatdma_device *dev, int dca); -int __devinit ioat3_dma_probe(struct ioatdma_device *dev, int dca); -struct dca_provider * __devinit ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase); -struct dca_provider * __devinit ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase); +int ioat2_dma_probe(struct ioatdma_device *dev, int dca); +int ioat3_dma_probe(struct ioatdma_device *dev, int dca); +struct dca_provider *ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase); +struct dca_provider *ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase); int ioat2_check_space_lock(struct ioat2_dma_chan *ioat, int num_descs); int ioat2_enumerate_channels(struct ioatdma_device *device); struct dma_async_tx_descriptor * diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c index f7f1dc62c15..e5fc944de1f 100644 --- a/drivers/dma/ioat/dma_v3.c +++ b/drivers/dma/ioat/dma_v3.c @@ -836,7 +836,7 @@ ioat3_prep_interrupt_lock(struct dma_chan *c, unsigned long flags) return &desc->txd; } -static void __devinit ioat3_dma_test_callback(void *dma_async_param) +static void ioat3_dma_test_callback(void *dma_async_param) { struct completion *cmp = dma_async_param; @@ -844,7 +844,7 @@ static void __devinit ioat3_dma_test_callback(void *dma_async_param) } #define IOAT_NUM_SRC_TEST 6 /* must be <= 8 */ -static int __devinit ioat_xor_val_self_test(struct ioatdma_device *device) +static int ioat_xor_val_self_test(struct ioatdma_device *device) { int i, src_idx; struct page *dest; @@ -1096,7 +1096,7 @@ out: return err; } -static int __devinit ioat3_dma_self_test(struct ioatdma_device *device) +static int ioat3_dma_self_test(struct ioatdma_device *device) { int rc = ioat_dma_self_test(device); @@ -1187,7 +1187,7 @@ static bool is_snb_ioat(struct pci_dev *pdev) } } -int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca) +int ioat3_dma_probe(struct ioatdma_device *device, int dca) { struct pci_dev *pdev = device->pdev; int dca_en = system_has_dca_enabled(pdev); diff --git a/drivers/dma/ioat/pci.c b/drivers/dma/ioat/pci.c index bfa9a3536e0..4f686c527ab 100644 --- a/drivers/dma/ioat/pci.c +++ b/drivers/dma/ioat/pci.c @@ -109,9 +109,8 @@ static struct pci_device_id ioat_pci_tbl[] = { }; MODULE_DEVICE_TABLE(pci, ioat_pci_tbl); -static int __devinit ioat_pci_probe(struct pci_dev *pdev, - const struct pci_device_id *id); -static void __devexit ioat_remove(struct pci_dev *pdev); +static int ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id); +static void ioat_remove(struct pci_dev *pdev); static int ioat_dca_enabled = 1; module_param(ioat_dca_enabled, int, 0644); @@ -141,7 +140,7 @@ alloc_ioatdma(struct pci_dev *pdev, void __iomem *iobase) return d; } -static int __devinit ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) +static int ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) { void __iomem * const *iomap; struct device *dev = &pdev->dev; @@ -195,7 +194,7 @@ static int __devinit ioat_pci_probe(struct pci_dev *pdev, const struct pci_devic return 0; } -static void __devexit ioat_remove(struct pci_dev *pdev) +static void ioat_remove(struct pci_dev *pdev) { struct ioatdma_device *device = pci_get_drvdata(pdev); diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index 9072e173b86..eacb8be9981 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c @@ -1406,7 +1406,7 @@ out: } #endif -static int __devexit iop_adma_remove(struct platform_device *dev) +static int iop_adma_remove(struct platform_device *dev) { struct iop_adma_device *device = platform_get_drvdata(dev); struct dma_chan *chan, *_chan; diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c index 13bdf4a7e1e..c6d98c00f05 100644 --- a/drivers/dma/mmp_pdma.c +++ b/drivers/dma/mmp_pdma.c @@ -712,7 +712,7 @@ static void dma_do_tasklet(unsigned long data) } } -static int __devexit mmp_pdma_remove(struct platform_device *op) +static int mmp_pdma_remove(struct platform_device *op) { struct mmp_pdma_device *pdev = platform_get_drvdata(op); diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c index 323821c0c09..a9f1cd56689 100644 --- a/drivers/dma/mmp_tdma.c +++ b/drivers/dma/mmp_tdma.c @@ -467,7 +467,7 @@ static void mmp_tdma_issue_pending(struct dma_chan *chan) mmp_tdma_enable_chan(tdmac); } -static int __devexit mmp_tdma_remove(struct platform_device *pdev) +static int mmp_tdma_remove(struct platform_device *pdev) { struct mmp_tdma_device *tdev = platform_get_drvdata(pdev); diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c index 2cd024a91d4..2d956732aa3 100644 --- a/drivers/dma/mpc512x_dma.c +++ b/drivers/dma/mpc512x_dma.c @@ -799,7 +799,7 @@ static int mpc_dma_probe(struct platform_device *op) return retval; } -static int __devexit mpc_dma_remove(struct platform_device *op) +static int mpc_dma_remove(struct platform_device *op) { struct device *dev = &op->dev; struct mpc_dma *mdma = dev_get_drvdata(dev); diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c index eca1c4ddf03..3f2617255ef 100644 --- a/drivers/dma/pch_dma.c +++ b/drivers/dma/pch_dma.c @@ -961,7 +961,7 @@ err_free_mem: return err; } -static void __devexit pch_dma_remove(struct pci_dev *pdev) +static void pch_dma_remove(struct pci_dev *pdev) { struct pch_dma *pd = pci_get_drvdata(pdev); struct pch_dma_chan *pd_chan; diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 95555f37ea6..80680eee017 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2988,7 +2988,7 @@ probe_err1: return ret; } -static int __devexit pl330_remove(struct amba_device *adev) +static int pl330_remove(struct amba_device *adev) { struct dma_pl330_dmac *pdmac = amba_get_drvdata(adev); struct dma_pl330_chan *pch, *_p; diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c index b94afc339e7..5d3d95569a1 100644 --- a/drivers/dma/ppc4xx/adma.c +++ b/drivers/dma/ppc4xx/adma.c @@ -4592,7 +4592,7 @@ out: /** * ppc440spe_adma_remove - remove the asynch device */ -static int __devexit ppc440spe_adma_remove(struct platform_device *ofdev) +static int ppc440spe_adma_remove(struct platform_device *ofdev) { struct ppc440spe_adma_device *adev = dev_get_drvdata(&ofdev->dev); struct device_node *np = ofdev->dev.of_node; @@ -4905,7 +4905,7 @@ out_free: return ret; } -static const struct of_device_id ppc440spe_adma_of_match[] __devinitconst = { +static const struct of_device_id ppc440spe_adma_of_match[] = { { .compatible = "ibm,dma-440spe", }, { .compatible = "amcc,xor-accelerator", }, {}, diff --git a/drivers/dma/sa11x0-dma.c b/drivers/dma/sa11x0-dma.c index 2ad628df822..461a91ab70b 100644 --- a/drivers/dma/sa11x0-dma.c +++ b/drivers/dma/sa11x0-dma.c @@ -967,7 +967,7 @@ static int sa11x0_dma_probe(struct platform_device *pdev) return ret; } -static int __devexit sa11x0_dma_remove(struct platform_device *pdev) +static int sa11x0_dma_remove(struct platform_device *pdev) { struct sa11x0_dma_dev *d = platform_get_drvdata(pdev); unsigned pch; diff --git a/drivers/dma/sh/shdma.c b/drivers/dma/sh/shdma.c index 8201bb4e0cd..3315e4be9b8 100644 --- a/drivers/dma/sh/shdma.c +++ b/drivers/dma/sh/shdma.c @@ -880,7 +880,7 @@ ermrdmars: return err; } -static int __devexit sh_dmae_remove(struct platform_device *pdev) +static int sh_dmae_remove(struct platform_device *pdev) { struct sh_dmae_device *shdev = platform_get_drvdata(pdev); struct dma_device *dma_dev = &shdev->shdma_dev.dma_dev; diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c index c3de6edb965..94674a96c64 100644 --- a/drivers/dma/sirf-dma.c +++ b/drivers/dma/sirf-dma.c @@ -655,7 +655,7 @@ irq_dispose: return ret; } -static int __devexit sirfsoc_dma_remove(struct platform_device *op) +static int sirfsoc_dma_remove(struct platform_device *op) { struct device *dev = &op->dev; struct sirfsoc_dma *sdma = dev_get_drvdata(dev); diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c index efdfffa1334..c39e61bc817 100644 --- a/drivers/dma/tegra20-apb-dma.c +++ b/drivers/dma/tegra20-apb-dma.c @@ -1184,7 +1184,7 @@ static const struct tegra_dma_chip_data tegra30_dma_chip_data = { .max_dma_count = 1024UL * 64, }; -static const struct of_device_id tegra_dma_of_match[] __devinitconst = { +static const struct of_device_id tegra_dma_of_match[] = { { .compatible = "nvidia,tegra30-apbdma", .data = &tegra30_dma_chip_data, @@ -1360,7 +1360,7 @@ err_pm_disable: return ret; } -static int __devexit tegra_dma_remove(struct platform_device *pdev) +static int tegra_dma_remove(struct platform_device *pdev) { struct tegra_dma *tdma = platform_get_drvdata(pdev); int i; @@ -1403,7 +1403,7 @@ static int tegra_dma_runtime_resume(struct device *dev) return 0; } -static const struct dev_pm_ops tegra_dma_dev_pm_ops __devinitconst = { +static const struct dev_pm_ops tegra_dma_dev_pm_ops = { #ifdef CONFIG_PM_RUNTIME .runtime_suspend = tegra_dma_runtime_suspend, .runtime_resume = tegra_dma_runtime_resume, diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c index 98cf51e1544..952f823901a 100644 --- a/drivers/dma/timb_dma.c +++ b/drivers/dma/timb_dma.c @@ -798,7 +798,7 @@ err_release_region: } -static int __devexit td_remove(struct platform_device *pdev) +static int td_remove(struct platform_device *pdev) { struct timb_dma *td = platform_get_drvdata(pdev); struct resource *iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); -- cgit v1.2.3