Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: 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, __devinitdata,
__devinitconst, and __devexit from the kernel documentation.

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 <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+14 -36
+3 -3
Documentation/DocBook/media/v4l/driver.xml
··· 116 116 return 0; /* a negative value on error, 0 on success. */ 117 117 } 118 118 119 - static void __devexit 119 + static void 120 120 my_remove (struct pci_dev * pci_dev) 121 121 { 122 122 my_device *my = pci_get_drvdata (pci_dev); ··· 124 124 /* Describe me. */ 125 125 } 126 126 127 - static int __devinit 127 + static int 128 128 my_probe (struct pci_dev * pci_dev, 129 129 const struct pci_device_id * pci_id) 130 130 { ··· 157 157 .id_table = my_pci_device_ids, 158 158 159 159 .probe = my_probe, 160 - .remove = __devexit_p (my_remove), 160 + .remove = my_remove, 161 161 162 162 /* Power management functions. */ 163 163 .suspend = my_suspend,
+3 -3
Documentation/PCI/pci-iov-howto.txt
··· 76 76 77 77 Following piece of code illustrates the usage of the SR-IOV API. 78 78 79 - static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id *id) 79 + static int dev_probe(struct pci_dev *dev, const struct pci_device_id *id) 80 80 { 81 81 pci_enable_sriov(dev, NR_VIRTFN); 82 82 ··· 85 85 return 0; 86 86 } 87 87 88 - static void __devexit dev_remove(struct pci_dev *dev) 88 + static void dev_remove(struct pci_dev *dev) 89 89 { 90 90 pci_disable_sriov(dev); 91 91 ··· 131 131 .name = "SR-IOV Physical Function driver", 132 132 .id_table = dev_id_table, 133 133 .probe = dev_probe, 134 - .remove = __devexit_p(dev_remove), 134 + .remove = dev_remove, 135 135 .suspend = dev_suspend, 136 136 .resume = dev_resume, 137 137 .shutdown = dev_shutdown,
-20
Documentation/PCI/pci.txt
··· 183 183 initializes. 184 184 __exit Exit code. Ignored for non-modular drivers. 185 185 186 - 187 - __devinit Device initialization code. 188 - Identical to __init if the kernel is not compiled 189 - with CONFIG_HOTPLUG, normal function otherwise. 190 - __devexit The same for __exit. 191 - 192 186 Tips on when/where to use the above attributes: 193 187 o The module_init()/module_exit() functions (and all 194 188 initialization functions called _only_ from these) 195 189 should be marked __init/__exit. 196 190 197 191 o Do not mark the struct pci_driver. 198 - 199 - o The ID table array should be marked __devinitconst; this is done 200 - automatically if the table is declared with DEFINE_PCI_DEVICE_TABLE(). 201 - 202 - o The probe() and remove() functions should be marked __devinit 203 - and __devexit respectively. All initialization functions 204 - exclusively called by the probe() routine, can be marked __devinit. 205 - Ditto for remove() and __devexit. 206 - 207 - o If mydriver_remove() is marked with __devexit(), then all address 208 - references to mydriver_remove must use __devexit_p(mydriver_remove) 209 - (in the struct pci_driver declaration for example). 210 - __devexit_p() will generate the function name _or_ NULL if the 211 - function will be discarded. For an example, see drivers/net/tg3.c. 212 192 213 193 o Do NOT mark a function if you are not sure which mark to use. 214 194 Better to not mark the function than mark the function wrong.
+1 -1
Documentation/acpi/enumeration.txt
··· 185 185 .acpi_match_table ACPI_PTR(mpu3050_acpi_match), 186 186 }, 187 187 .probe = mpu3050_probe, 188 - .remove = __devexit_p(mpu3050_remove), 188 + .remove = mpu3050_remove, 189 189 .id_table = mpu3050_ids, 190 190 }; 191 191
+1 -1
Documentation/i2c/instantiating-devices
··· 91 91 92 92 static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; 93 93 94 - static int __devinit usb_hcd_nxp_probe(struct platform_device *pdev) 94 + static int usb_hcd_nxp_probe(struct platform_device *pdev) 95 95 { 96 96 (...) 97 97 struct i2c_adapter *i2c_adap;
+2 -2
Documentation/rpmsg.txt
··· 236 236 return 0; 237 237 } 238 238 239 - static void __devexit rpmsg_sample_remove(struct rpmsg_channel *rpdev) 239 + static void rpmsg_sample_remove(struct rpmsg_channel *rpdev) 240 240 { 241 241 dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n"); 242 242 } ··· 253 253 .id_table = rpmsg_driver_sample_id_table, 254 254 .probe = rpmsg_sample_probe, 255 255 .callback = rpmsg_sample_cb, 256 - .remove = __devexit_p(rpmsg_sample_remove), 256 + .remove = rpmsg_sample_remove, 257 257 }; 258 258 259 259 static int __init init(void)
+2 -2
Documentation/spi/spi-summary
··· 345 345 }, 346 346 347 347 .probe = CHIP_probe, 348 - .remove = __devexit_p(CHIP_remove), 348 + .remove = CHIP_remove, 349 349 .suspend = CHIP_suspend, 350 350 .resume = CHIP_resume, 351 351 }; ··· 355 355 might look like this unless you're creating a device which is managing 356 356 a bus (appearing under /sys/class/spi_master). 357 357 358 - static int __devinit CHIP_probe(struct spi_device *spi) 358 + static int CHIP_probe(struct spi_device *spi) 359 359 { 360 360 struct CHIP *chip; 361 361 struct CHIP_platform_data *pdata;
+1 -2
Documentation/video4linux/v4l2-framework.txt
··· 174 174 175 175 static atomic_t drv_instance = ATOMIC_INIT(0); 176 176 177 - static int __devinit drv_probe(struct pci_dev *pdev, 178 - const struct pci_device_id *pci_id) 177 + static int drv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) 179 178 { 180 179 ... 181 180 state->instance = atomic_inc_return(&drv_instance) - 1;
+1 -2
Documentation/zh_CN/video4linux/v4l2-framework.txt
··· 182 182 183 183 static atomic_t drv_instance = ATOMIC_INIT(0); 184 184 185 - static int __devinit drv_probe(struct pci_dev *pdev, 186 - const struct pci_device_id *pci_id) 185 + static int drv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) 187 186 { 188 187 ... 189 188 state->instance = atomic_inc_return(&drv_instance) - 1;