diff options
1706 files changed, 17804 insertions, 10059 deletions
diff --git a/Documentation/DocBook/media/v4l/driver.xml b/Documentation/DocBook/media/v4l/driver.xml index eacafe312cd2..7c6638bacedb 100644 --- a/Documentation/DocBook/media/v4l/driver.xml +++ b/Documentation/DocBook/media/v4l/driver.xml | |||
| @@ -116,7 +116,7 @@ my_suspend (struct pci_dev * pci_dev, | |||
| 116 | return 0; /* a negative value on error, 0 on success. */ | 116 | return 0; /* a negative value on error, 0 on success. */ |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | static void __devexit | 119 | static void |
| 120 | my_remove (struct pci_dev * pci_dev) | 120 | my_remove (struct pci_dev * pci_dev) |
| 121 | { | 121 | { |
| 122 | my_device *my = pci_get_drvdata (pci_dev); | 122 | my_device *my = pci_get_drvdata (pci_dev); |
| @@ -124,7 +124,7 @@ my_remove (struct pci_dev * pci_dev) | |||
| 124 | /* Describe me. */ | 124 | /* Describe me. */ |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | static int __devinit | 127 | static int |
| 128 | my_probe (struct pci_dev * pci_dev, | 128 | my_probe (struct pci_dev * pci_dev, |
| 129 | const struct pci_device_id * pci_id) | 129 | const struct pci_device_id * pci_id) |
| 130 | { | 130 | { |
| @@ -157,7 +157,7 @@ my_pci_driver = { | |||
| 157 | .id_table = my_pci_device_ids, | 157 | .id_table = my_pci_device_ids, |
| 158 | 158 | ||
| 159 | .probe = my_probe, | 159 | .probe = my_probe, |
| 160 | .remove = __devexit_p (my_remove), | 160 | .remove = my_remove, |
| 161 | 161 | ||
| 162 | /* Power management functions. */ | 162 | /* Power management functions. */ |
| 163 | .suspend = my_suspend, | 163 | .suspend = my_suspend, |
diff --git a/Documentation/PCI/pci-iov-howto.txt b/Documentation/PCI/pci-iov-howto.txt index cfaca7e69893..86551cc72e03 100644 --- a/Documentation/PCI/pci-iov-howto.txt +++ b/Documentation/PCI/pci-iov-howto.txt | |||
| @@ -76,7 +76,7 @@ To notify SR-IOV core of Virtual Function Migration: | |||
| 76 | 76 | ||
| 77 | Following piece of code illustrates the usage of the SR-IOV API. | 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 | pci_enable_sriov(dev, NR_VIRTFN); | 81 | pci_enable_sriov(dev, NR_VIRTFN); |
| 82 | 82 | ||
| @@ -85,7 +85,7 @@ static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id * | |||
| 85 | return 0; | 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 | pci_disable_sriov(dev); | 90 | pci_disable_sriov(dev); |
| 91 | 91 | ||
| @@ -131,7 +131,7 @@ static struct pci_driver dev_driver = { | |||
| 131 | .name = "SR-IOV Physical Function driver", | 131 | .name = "SR-IOV Physical Function driver", |
| 132 | .id_table = dev_id_table, | 132 | .id_table = dev_id_table, |
| 133 | .probe = dev_probe, | 133 | .probe = dev_probe, |
| 134 | .remove = __devexit_p(dev_remove), | 134 | .remove = dev_remove, |
| 135 | .suspend = dev_suspend, | 135 | .suspend = dev_suspend, |
| 136 | .resume = dev_resume, | 136 | .resume = dev_resume, |
| 137 | .shutdown = dev_shutdown, | 137 | .shutdown = dev_shutdown, |
diff --git a/Documentation/PCI/pci.txt b/Documentation/PCI/pci.txt index aa09e5476bba..bccf602a87f5 100644 --- a/Documentation/PCI/pci.txt +++ b/Documentation/PCI/pci.txt | |||
| @@ -183,12 +183,6 @@ Please mark the initialization and cleanup functions where appropriate | |||
| 183 | initializes. | 183 | initializes. |
| 184 | __exit Exit code. Ignored for non-modular drivers. | 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 | Tips on when/where to use the above attributes: | 186 | Tips on when/where to use the above attributes: |
| 193 | o The module_init()/module_exit() functions (and all | 187 | o The module_init()/module_exit() functions (and all |
| 194 | initialization functions called _only_ from these) | 188 | initialization functions called _only_ from these) |
| @@ -196,20 +190,6 @@ Tips on when/where to use the above attributes: | |||
| 196 | 190 | ||
| 197 | o Do not mark the struct pci_driver. | 191 | o Do not mark the struct pci_driver. |
| 198 | 192 | ||
| 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 | |||
| 213 | o Do NOT mark a function if you are not sure which mark to use. | 193 | o Do NOT mark a function if you are not sure which mark to use. |
| 214 | Better to not mark the function than mark the function wrong. | 194 | Better to not mark the function than mark the function wrong. |
| 215 | 195 | ||
diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt index 4f27785ca0c8..54469bc81b1c 100644 --- a/Documentation/acpi/enumeration.txt +++ b/Documentation/acpi/enumeration.txt | |||
| @@ -185,7 +185,7 @@ input driver: | |||
| 185 | .acpi_match_table ACPI_PTR(mpu3050_acpi_match), | 185 | .acpi_match_table ACPI_PTR(mpu3050_acpi_match), |
| 186 | }, | 186 | }, |
| 187 | .probe = mpu3050_probe, | 187 | .probe = mpu3050_probe, |
| 188 | .remove = __devexit_p(mpu3050_remove), | 188 | .remove = mpu3050_remove, |
| 189 | .id_table = mpu3050_ids, | 189 | .id_table = mpu3050_ids, |
| 190 | }; | 190 | }; |
| 191 | 191 | ||
diff --git a/Documentation/devicetree/bindings/clock/imx23-clock.txt b/Documentation/devicetree/bindings/clock/imx23-clock.txt index baadbb11fe98..5083c0b834b2 100644 --- a/Documentation/devicetree/bindings/clock/imx23-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx23-clock.txt | |||
| @@ -60,11 +60,6 @@ clks: clkctrl@80040000 { | |||
| 60 | compatible = "fsl,imx23-clkctrl"; | 60 | compatible = "fsl,imx23-clkctrl"; |
| 61 | reg = <0x80040000 0x2000>; | 61 | reg = <0x80040000 0x2000>; |
| 62 | #clock-cells = <1>; | 62 | #clock-cells = <1>; |
| 63 | clock-output-names = | ||
| 64 | ... | ||
| 65 | "uart", /* 32 */ | ||
| 66 | ... | ||
| 67 | "end_of_list"; | ||
| 68 | }; | 63 | }; |
| 69 | 64 | ||
| 70 | auart0: serial@8006c000 { | 65 | auart0: serial@8006c000 { |
diff --git a/Documentation/devicetree/bindings/clock/imx25-clock.txt b/Documentation/devicetree/bindings/clock/imx25-clock.txt index c2a3525ecb4e..db4f2f05c4d0 100644 --- a/Documentation/devicetree/bindings/clock/imx25-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx25-clock.txt | |||
| @@ -146,10 +146,6 @@ clks: ccm@53f80000 { | |||
| 146 | compatible = "fsl,imx25-ccm"; | 146 | compatible = "fsl,imx25-ccm"; |
| 147 | reg = <0x53f80000 0x4000>; | 147 | reg = <0x53f80000 0x4000>; |
| 148 | interrupts = <31>; | 148 | interrupts = <31>; |
| 149 | clock-output-names = ... | ||
| 150 | "uart_ipg", | ||
| 151 | "uart_serial", | ||
| 152 | ...; | ||
| 153 | }; | 149 | }; |
| 154 | 150 | ||
| 155 | uart1: serial@43f90000 { | 151 | uart1: serial@43f90000 { |
diff --git a/Documentation/devicetree/bindings/clock/imx28-clock.txt b/Documentation/devicetree/bindings/clock/imx28-clock.txt index 52a49a4a50b3..e6587af62ff0 100644 --- a/Documentation/devicetree/bindings/clock/imx28-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx28-clock.txt | |||
| @@ -83,11 +83,6 @@ clks: clkctrl@80040000 { | |||
| 83 | compatible = "fsl,imx28-clkctrl"; | 83 | compatible = "fsl,imx28-clkctrl"; |
| 84 | reg = <0x80040000 0x2000>; | 84 | reg = <0x80040000 0x2000>; |
| 85 | #clock-cells = <1>; | 85 | #clock-cells = <1>; |
| 86 | clock-output-names = | ||
| 87 | ... | ||
| 88 | "uart", /* 45 */ | ||
| 89 | ... | ||
| 90 | "end_of_list"; | ||
| 91 | }; | 86 | }; |
| 92 | 87 | ||
| 93 | auart0: serial@8006a000 { | 88 | auart0: serial@8006a000 { |
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt index d77b4e68dc42..f73fdf595568 100644 --- a/Documentation/devicetree/bindings/clock/imx6q-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt | |||
| @@ -211,10 +211,6 @@ clks: ccm@020c4000 { | |||
| 211 | reg = <0x020c4000 0x4000>; | 211 | reg = <0x020c4000 0x4000>; |
| 212 | interrupts = <0 87 0x04 0 88 0x04>; | 212 | interrupts = <0 87 0x04 0 88 0x04>; |
| 213 | #clock-cells = <1>; | 213 | #clock-cells = <1>; |
| 214 | clock-output-names = ... | ||
| 215 | "uart_ipg", | ||
| 216 | "uart_serial", | ||
| 217 | ...; | ||
| 218 | }; | 214 | }; |
| 219 | 215 | ||
| 220 | uart1: serial@02020000 { | 216 | uart1: serial@02020000 { |
diff --git a/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt index 558cdf3c9abc..d4eab9227ea4 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt | |||
| @@ -1,4 +1,19 @@ | |||
| 1 | GPIO line that should be set high/low to power off a device | 1 | Driver a GPIO line that can be used to turn the power off. |
| 2 | |||
| 3 | The driver supports both level triggered and edge triggered power off. | ||
| 4 | At driver load time, the driver will request the given gpio line and | ||
| 5 | install a pm_power_off handler. If the optional properties 'input' is | ||
| 6 | not found, the GPIO line will be driven in the inactive | ||
| 7 | state. Otherwise its configured as an input. | ||
| 8 | |||
| 9 | When the pm_power_off is called, the gpio is configured as an output, | ||
| 10 | and drive active, so triggering a level triggered power off | ||
| 11 | condition. This will also cause an inactive->active edge condition, so | ||
| 12 | triggering positive edge triggered power off. After a delay of 100ms, | ||
| 13 | the GPIO is set to inactive, thus causing an active->inactive edge, | ||
| 14 | triggering negative edge triggered power off. After another 100ms | ||
| 15 | delay the GPIO is driver active again. If the power is still on and | ||
| 16 | the CPU still running after a 3000ms delay, a WARN_ON(1) is emitted. | ||
| 2 | 17 | ||
| 3 | Required properties: | 18 | Required properties: |
| 4 | - compatible : should be "gpio-poweroff". | 19 | - compatible : should be "gpio-poweroff". |
| @@ -13,10 +28,9 @@ Optional properties: | |||
| 13 | property is not specified, the GPIO is initialized as an output in its | 28 | property is not specified, the GPIO is initialized as an output in its |
| 14 | inactive state. | 29 | inactive state. |
| 15 | 30 | ||
| 16 | |||
| 17 | Examples: | 31 | Examples: |
| 18 | 32 | ||
| 19 | gpio-poweroff { | 33 | gpio-poweroff { |
| 20 | compatible = "gpio-poweroff"; | 34 | compatible = "gpio-poweroff"; |
| 21 | gpios = <&gpio 4 0>; /* GPIO 4 Active Low */ | 35 | gpios = <&gpio 4 0>; |
| 22 | }; | 36 | }; |
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt new file mode 100644 index 000000000000..c596a6ad3285 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | CSR SiRFprimaII pinmux controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : "sirf,prima2-pinctrl" | ||
| 5 | - reg : Address range of the pinctrl registers | ||
| 6 | - interrupts : Interrupts used by every GPIO group | ||
| 7 | - gpio-controller : Indicates this device is a GPIO controller | ||
| 8 | - interrupt-controller : Marks the device node as an interrupt controller | ||
| 9 | Optional properties: | ||
| 10 | - sirf,pullups : if n-th bit of m-th bank is set, set a pullup on GPIO-n of bank m | ||
| 11 | - sirf,pulldowns : if n-th bit of m-th bank is set, set a pulldown on GPIO-n of bank m | ||
| 12 | |||
| 13 | Please refer to pinctrl-bindings.txt in this directory for details of the common | ||
| 14 | pinctrl bindings used by client devices. | ||
| 15 | |||
| 16 | SiRFprimaII's pinmux nodes act as a container for an abitrary number of subnodes. | ||
| 17 | Each of these subnodes represents some desired configuration for a group of pins. | ||
| 18 | |||
| 19 | Required subnode-properties: | ||
| 20 | - sirf,pins : An array of strings. Each string contains the name of a group. | ||
| 21 | - sirf,function: A string containing the name of the function to mux to the | ||
| 22 | group. | ||
| 23 | |||
| 24 | Valid values for group and function names can be found from looking at the | ||
| 25 | group and function arrays in driver files: | ||
| 26 | drivers/pinctrl/pinctrl-sirf.c | ||
| 27 | |||
| 28 | For example, pinctrl might have subnodes like the following: | ||
| 29 | uart2_pins_a: uart2@0 { | ||
| 30 | uart { | ||
| 31 | sirf,pins = "uart2grp"; | ||
| 32 | sirf,function = "uart2"; | ||
| 33 | }; | ||
| 34 | }; | ||
| 35 | uart2_noflow_pins_a: uart2@1 { | ||
| 36 | uart { | ||
| 37 | sirf,pins = "uart2_nostreamctrlgrp"; | ||
| 38 | sirf,function = "uart2_nostreamctrl"; | ||
| 39 | }; | ||
| 40 | }; | ||
| 41 | |||
| 42 | For a specific board, if it wants to use uart2 without hardware flow control, | ||
| 43 | it can add the following to its board-specific .dts file. | ||
| 44 | uart2: uart@0xb0070000 { | ||
| 45 | pinctrl-names = "default"; | ||
| 46 | pinctrl-0 = <&uart2_noflow_pins_a>; | ||
| 47 | } | ||
diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices index abf63615ee05..22182660dda7 100644 --- a/Documentation/i2c/instantiating-devices +++ b/Documentation/i2c/instantiating-devices | |||
| @@ -91,7 +91,7 @@ Example (from the nxp OHCI driver): | |||
| 91 | 91 | ||
| 92 | static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; | 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 | struct i2c_adapter *i2c_adap; | 97 | struct i2c_adapter *i2c_adap; |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index dd52d516cb89..dbca66182089 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
| @@ -36,7 +36,7 @@ neigh/default/unres_qlen_bytes - INTEGER | |||
| 36 | The maximum number of bytes which may be used by packets | 36 | The maximum number of bytes which may be used by packets |
| 37 | queued for each unresolved address by other network layers. | 37 | queued for each unresolved address by other network layers. |
| 38 | (added in linux 3.3) | 38 | (added in linux 3.3) |
| 39 | Seting negative value is meaningless and will retrun error. | 39 | Setting negative value is meaningless and will return error. |
| 40 | Default: 65536 Bytes(64KB) | 40 | Default: 65536 Bytes(64KB) |
| 41 | 41 | ||
| 42 | neigh/default/unres_qlen - INTEGER | 42 | neigh/default/unres_qlen - INTEGER |
| @@ -215,7 +215,7 @@ tcp_ecn - INTEGER | |||
| 215 | Possible values are: | 215 | Possible values are: |
| 216 | 0 Disable ECN. Neither initiate nor accept ECN. | 216 | 0 Disable ECN. Neither initiate nor accept ECN. |
| 217 | 1 Always request ECN on outgoing connection attempts. | 217 | 1 Always request ECN on outgoing connection attempts. |
| 218 | 2 Enable ECN when requested by incomming connections | 218 | 2 Enable ECN when requested by incoming connections |
| 219 | but do not request ECN on outgoing connections. | 219 | but do not request ECN on outgoing connections. |
| 220 | Default: 2 | 220 | Default: 2 |
| 221 | 221 | ||
| @@ -503,7 +503,7 @@ tcp_fastopen - INTEGER | |||
| 503 | tcp_syn_retries - INTEGER | 503 | tcp_syn_retries - INTEGER |
| 504 | Number of times initial SYNs for an active TCP connection attempt | 504 | Number of times initial SYNs for an active TCP connection attempt |
| 505 | will be retransmitted. Should not be higher than 255. Default value | 505 | will be retransmitted. Should not be higher than 255. Default value |
| 506 | is 6, which corresponds to 63seconds till the last restransmission | 506 | is 6, which corresponds to 63seconds till the last retransmission |
| 507 | with the current initial RTO of 1second. With this the final timeout | 507 | with the current initial RTO of 1second. With this the final timeout |
| 508 | for an active TCP connection attempt will happen after 127seconds. | 508 | for an active TCP connection attempt will happen after 127seconds. |
| 509 | 509 | ||
| @@ -1331,6 +1331,12 @@ force_tllao - BOOLEAN | |||
| 1331 | race condition where the sender deletes the cached link-layer address | 1331 | race condition where the sender deletes the cached link-layer address |
| 1332 | prior to receiving a response to a previous solicitation." | 1332 | prior to receiving a response to a previous solicitation." |
| 1333 | 1333 | ||
| 1334 | ndisc_notify - BOOLEAN | ||
| 1335 | Define mode for notification of address and device changes. | ||
| 1336 | 0 - (default): do nothing | ||
| 1337 | 1 - Generate unsolicited neighbour advertisements when device is brought | ||
| 1338 | up or hardware address changes. | ||
| 1339 | |||
| 1334 | icmp/*: | 1340 | icmp/*: |
| 1335 | ratelimit - INTEGER | 1341 | ratelimit - INTEGER |
| 1336 | Limit the maximal rates for sending ICMPv6 packets. | 1342 | Limit the maximal rates for sending ICMPv6 packets. |
| @@ -1530,7 +1536,7 @@ cookie_hmac_alg - STRING | |||
| 1530 | * sha1 | 1536 | * sha1 |
| 1531 | * none | 1537 | * none |
| 1532 | Ability to assign md5 or sha1 as the selected alg is predicated on the | 1538 | Ability to assign md5 or sha1 as the selected alg is predicated on the |
| 1533 | configuarion of those algorithms at build time (CONFIG_CRYPTO_MD5 and | 1539 | configuration of those algorithms at build time (CONFIG_CRYPTO_MD5 and |
| 1534 | CONFIG_CRYPTO_SHA1). | 1540 | CONFIG_CRYPTO_SHA1). |
| 1535 | 1541 | ||
| 1536 | Default: Dependent on configuration. MD5 if available, else SHA1 if | 1542 | Default: Dependent on configuration. MD5 if available, else SHA1 if |
| @@ -1548,7 +1554,7 @@ rcvbuf_policy - INTEGER | |||
| 1548 | blocking. | 1554 | blocking. |
| 1549 | 1555 | ||
| 1550 | 1: rcvbuf space is per association | 1556 | 1: rcvbuf space is per association |
| 1551 | 0: recbuf space is per socket | 1557 | 0: rcvbuf space is per socket |
| 1552 | 1558 | ||
| 1553 | Default: 0 | 1559 | Default: 0 |
| 1554 | 1560 | ||
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 4abe83e1045a..03591a750f99 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt | |||
| @@ -642,12 +642,13 @@ out the following operations: | |||
| 642 | * During system suspend it calls pm_runtime_get_noresume() and | 642 | * During system suspend it calls pm_runtime_get_noresume() and |
| 643 | pm_runtime_barrier() for every device right before executing the | 643 | pm_runtime_barrier() for every device right before executing the |
| 644 | subsystem-level .suspend() callback for it. In addition to that it calls | 644 | subsystem-level .suspend() callback for it. In addition to that it calls |
| 645 | pm_runtime_disable() for every device right after executing the | 645 | __pm_runtime_disable() with 'false' as the second argument for every device |
| 646 | subsystem-level .suspend() callback for it. | 646 | right before executing the subsystem-level .suspend_late() callback for it. |
| 647 | 647 | ||
| 648 | * During system resume it calls pm_runtime_enable() and pm_runtime_put_sync() | 648 | * During system resume it calls pm_runtime_enable() and pm_runtime_put_sync() |
| 649 | for every device right before and right after executing the subsystem-level | 649 | for every device right after executing the subsystem-level .resume_early() |
| 650 | .resume() callback for it, respectively. | 650 | callback and right after executing the subsystem-level .resume() callback |
| 651 | for it, respectively. | ||
| 651 | 652 | ||
| 652 | 7. Generic subsystem callbacks | 653 | 7. Generic subsystem callbacks |
| 653 | 654 | ||
diff --git a/Documentation/rpmsg.txt b/Documentation/rpmsg.txt index 409d9f964c5b..f7edc3aa1e92 100644 --- a/Documentation/rpmsg.txt +++ b/Documentation/rpmsg.txt | |||
| @@ -236,7 +236,7 @@ static int rpmsg_sample_probe(struct rpmsg_channel *rpdev) | |||
| 236 | return 0; | 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 | dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n"); | 241 | dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n"); |
| 242 | } | 242 | } |
| @@ -253,7 +253,7 @@ static struct rpmsg_driver rpmsg_sample_client = { | |||
| 253 | .id_table = rpmsg_driver_sample_id_table, | 253 | .id_table = rpmsg_driver_sample_id_table, |
| 254 | .probe = rpmsg_sample_probe, | 254 | .probe = rpmsg_sample_probe, |
| 255 | .callback = rpmsg_sample_cb, | 255 | .callback = rpmsg_sample_cb, |
| 256 | .remove = __devexit_p(rpmsg_sample_remove), | 256 | .remove = rpmsg_sample_remove, |
| 257 | }; | 257 | }; |
| 258 | 258 | ||
| 259 | static int __init init(void) | 259 | static int __init init(void) |
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary index 7312ec14dd89..2331eb214146 100644 --- a/Documentation/spi/spi-summary +++ b/Documentation/spi/spi-summary | |||
| @@ -345,7 +345,7 @@ SPI protocol drivers somewhat resemble platform device drivers: | |||
| 345 | }, | 345 | }, |
| 346 | 346 | ||
| 347 | .probe = CHIP_probe, | 347 | .probe = CHIP_probe, |
| 348 | .remove = __devexit_p(CHIP_remove), | 348 | .remove = CHIP_remove, |
| 349 | .suspend = CHIP_suspend, | 349 | .suspend = CHIP_suspend, |
| 350 | .resume = CHIP_resume, | 350 | .resume = CHIP_resume, |
| 351 | }; | 351 | }; |
| @@ -355,7 +355,7 @@ device whose board_info gave a modalias of "CHIP". Your probe() code | |||
| 355 | might look like this unless you're creating a device which is managing | 355 | might look like this unless you're creating a device which is managing |
| 356 | a bus (appearing under /sys/class/spi_master). | 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 | struct CHIP *chip; | 360 | struct CHIP *chip; |
| 361 | struct CHIP_platform_data *pdata; | 361 | struct CHIP_platform_data *pdata; |
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 2907ba6c3607..ccd42589e124 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
| @@ -38,6 +38,7 @@ show up in /proc/sys/kernel: | |||
| 38 | - l2cr [ PPC only ] | 38 | - l2cr [ PPC only ] |
| 39 | - modprobe ==> Documentation/debugging-modules.txt | 39 | - modprobe ==> Documentation/debugging-modules.txt |
| 40 | - modules_disabled | 40 | - modules_disabled |
| 41 | - msg_next_id [ sysv ipc ] | ||
| 41 | - msgmax | 42 | - msgmax |
| 42 | - msgmnb | 43 | - msgmnb |
| 43 | - msgmni | 44 | - msgmni |
| @@ -62,7 +63,9 @@ show up in /proc/sys/kernel: | |||
| 62 | - rtsig-max | 63 | - rtsig-max |
| 63 | - rtsig-nr | 64 | - rtsig-nr |
| 64 | - sem | 65 | - sem |
| 66 | - sem_next_id [ sysv ipc ] | ||
| 65 | - sg-big-buff [ generic SCSI device (sg) ] | 67 | - sg-big-buff [ generic SCSI device (sg) ] |
| 68 | - shm_next_id [ sysv ipc ] | ||
| 66 | - shm_rmid_forced | 69 | - shm_rmid_forced |
| 67 | - shmall | 70 | - shmall |
| 68 | - shmmax [ sysv ipc ] | 71 | - shmmax [ sysv ipc ] |
| @@ -320,6 +323,22 @@ to false. | |||
| 320 | 323 | ||
| 321 | ============================================================== | 324 | ============================================================== |
| 322 | 325 | ||
| 326 | msg_next_id, sem_next_id, and shm_next_id: | ||
| 327 | |||
| 328 | These three toggles allows to specify desired id for next allocated IPC | ||
| 329 | object: message, semaphore or shared memory respectively. | ||
| 330 | |||
| 331 | By default they are equal to -1, which means generic allocation logic. | ||
| 332 | Possible values to set are in range {0..INT_MAX}. | ||
| 333 | |||
| 334 | Notes: | ||
| 335 | 1) kernel doesn't guarantee, that new object will have desired id. So, | ||
| 336 | it's up to userspace, how to handle an object with "wrong" id. | ||
| 337 | 2) Toggle with non-default value will be set back to -1 by kernel after | ||
| 338 | successful IPC object allocation. | ||
| 339 | |||
| 340 | ============================================================== | ||
| 341 | |||
| 323 | nmi_watchdog: | 342 | nmi_watchdog: |
| 324 | 343 | ||
| 325 | Enables/Disables the NMI watchdog on x86 systems. When the value is | 344 | Enables/Disables the NMI watchdog on x86 systems. When the value is |
| @@ -542,6 +561,19 @@ are doing anyway :) | |||
| 542 | 561 | ||
| 543 | ============================================================== | 562 | ============================================================== |
| 544 | 563 | ||
| 564 | shmall: | ||
| 565 | |||
| 566 | This parameter sets the total amount of shared memory pages that | ||
| 567 | can be used system wide. Hence, SHMALL should always be at least | ||
| 568 | ceil(shmmax/PAGE_SIZE). | ||
| 569 | |||
| 570 | If you are not sure what the default PAGE_SIZE is on your Linux | ||
| 571 | system, you can run the following command: | ||
| 572 | |||
| 573 | # getconf PAGE_SIZE | ||
| 574 | |||
| 575 | ============================================================== | ||
| 576 | |||
| 545 | shmmax: | 577 | shmmax: |
| 546 | 578 | ||
| 547 | This value can be used to query and set the run time limit | 579 | This value can be used to query and set the run time limit |
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index 32bfe926e8d7..b89567ad04b7 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
| @@ -174,8 +174,7 @@ The recommended approach is as follows: | |||
| 174 | 174 | ||
| 175 | static atomic_t drv_instance = ATOMIC_INIT(0); | 175 | static atomic_t drv_instance = ATOMIC_INIT(0); |
| 176 | 176 | ||
| 177 | static int __devinit drv_probe(struct pci_dev *pdev, | 177 | static int drv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) |
| 178 | const struct pci_device_id *pci_id) | ||
| 179 | { | 178 | { |
| 180 | ... | 179 | ... |
| 181 | state->instance = atomic_inc_return(&drv_instance) - 1; | 180 | state->instance = atomic_inc_return(&drv_instance) - 1; |
diff --git a/Documentation/zh_CN/video4linux/v4l2-framework.txt b/Documentation/zh_CN/video4linux/v4l2-framework.txt index 3e74f13af426..44c1d934c4e3 100644 --- a/Documentation/zh_CN/video4linux/v4l2-framework.txt +++ b/Documentation/zh_CN/video4linux/v4l2-framework.txt | |||
| @@ -182,8 +182,7 @@ int iterate(void *p) | |||
| 182 | 182 | ||
| 183 | static atomic_t drv_instance = ATOMIC_INIT(0); | 183 | static atomic_t drv_instance = ATOMIC_INIT(0); |
| 184 | 184 | ||
| 185 | static int __devinit drv_probe(struct pci_dev *pdev, | 185 | static int drv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) |
| 186 | const struct pci_device_id *pci_id) | ||
| 187 | { | 186 | { |
| 188 | ... | 187 | ... |
| 189 | state->instance = atomic_inc_return(&drv_instance) - 1; | 188 | state->instance = atomic_inc_return(&drv_instance) - 1; |
diff --git a/MAINTAINERS b/MAINTAINERS index fa309ab7ccbf..3105c4868c4e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -228,7 +228,7 @@ S: Maintained | |||
| 228 | F: drivers/platform/x86/acerhdf.c | 228 | F: drivers/platform/x86/acerhdf.c |
| 229 | 229 | ||
| 230 | ACER WMI LAPTOP EXTRAS | 230 | ACER WMI LAPTOP EXTRAS |
| 231 | M: Joey Lee <jlee@novell.com> | 231 | M: "Lee, Chun-Yi" <jlee@suse.com> |
| 232 | L: platform-driver-x86@vger.kernel.org | 232 | L: platform-driver-x86@vger.kernel.org |
| 233 | S: Maintained | 233 | S: Maintained |
| 234 | F: drivers/platform/x86/acer-wmi.c | 234 | F: drivers/platform/x86/acer-wmi.c |
| @@ -449,6 +449,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git | |||
| 449 | S: Maintained | 449 | S: Maintained |
| 450 | F: drivers/char/agp/ | 450 | F: drivers/char/agp/ |
| 451 | F: include/linux/agp* | 451 | F: include/linux/agp* |
| 452 | F: include/uapi/linux/agp* | ||
| 452 | 453 | ||
| 453 | AHA152X SCSI DRIVER | 454 | AHA152X SCSI DRIVER |
| 454 | M: "Juergen E. Fischer" <fischer@norbit.de> | 455 | M: "Juergen E. Fischer" <fischer@norbit.de> |
| @@ -589,6 +590,7 @@ M: Jiri Kosina <jkosina@suse.cz> | |||
| 589 | S: Odd fixes | 590 | S: Odd fixes |
| 590 | F: arch/x86/kernel/apm_32.c | 591 | F: arch/x86/kernel/apm_32.c |
| 591 | F: include/linux/apm_bios.h | 592 | F: include/linux/apm_bios.h |
| 593 | F: include/uapi/linux/apm_bios.h | ||
| 592 | F: drivers/char/apm-emulation.c | 594 | F: drivers/char/apm-emulation.c |
| 593 | 595 | ||
| 594 | APPLE BCM5974 MULTITOUCH DRIVER | 596 | APPLE BCM5974 MULTITOUCH DRIVER |
| @@ -646,7 +648,7 @@ F: arch/arm/ | |||
| 646 | 648 | ||
| 647 | ARM SUB-ARCHITECTURES | 649 | ARM SUB-ARCHITECTURES |
| 648 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 650 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 649 | S: MAINTAINED | 651 | S: Maintained |
| 650 | F: arch/arm/mach-*/ | 652 | F: arch/arm/mach-*/ |
| 651 | F: arch/arm/plat-*/ | 653 | F: arch/arm/plat-*/ |
| 652 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git | 654 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git |
| @@ -1005,7 +1007,6 @@ F: drivers/mmc/host/msm_sdcc.c | |||
| 1005 | F: drivers/mmc/host/msm_sdcc.h | 1007 | F: drivers/mmc/host/msm_sdcc.h |
| 1006 | F: drivers/tty/serial/msm_serial.h | 1008 | F: drivers/tty/serial/msm_serial.h |
| 1007 | F: drivers/tty/serial/msm_serial.c | 1009 | F: drivers/tty/serial/msm_serial.c |
| 1008 | F: drivers/platform/msm/ | ||
| 1009 | F: drivers/*/pm8???-* | 1010 | F: drivers/*/pm8???-* |
| 1010 | F: include/linux/mfd/pm8xxx/ | 1011 | F: include/linux/mfd/pm8xxx/ |
| 1011 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm.git | 1012 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm.git |
| @@ -1069,7 +1070,6 @@ M: Russell King <linux@arm.linux.org.uk> | |||
| 1069 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1070 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 1070 | W: http://www.arm.linux.org.uk/ | 1071 | W: http://www.arm.linux.org.uk/ |
| 1071 | S: Maintained | 1072 | S: Maintained |
| 1072 | F: arch/arm/common/time-acorn.c | ||
| 1073 | F: arch/arm/include/asm/hardware/entry-macro-iomd.S | 1073 | F: arch/arm/include/asm/hardware/entry-macro-iomd.S |
| 1074 | F: arch/arm/include/asm/hardware/ioc.h | 1074 | F: arch/arm/include/asm/hardware/ioc.h |
| 1075 | F: arch/arm/include/asm/hardware/iomd.h | 1075 | F: arch/arm/include/asm/hardware/iomd.h |
| @@ -1094,7 +1094,6 @@ W: http://www.fluff.org/ben/linux/ | |||
| 1094 | S: Maintained | 1094 | S: Maintained |
| 1095 | F: arch/arm/plat-samsung/ | 1095 | F: arch/arm/plat-samsung/ |
| 1096 | F: arch/arm/plat-s3c24xx/ | 1096 | F: arch/arm/plat-s3c24xx/ |
| 1097 | F: arch/arm/plat-s5p/ | ||
| 1098 | F: arch/arm/mach-s3c24*/ | 1097 | F: arch/arm/mach-s3c24*/ |
| 1099 | F: arch/arm/mach-s3c64xx/ | 1098 | F: arch/arm/mach-s3c64xx/ |
| 1100 | F: drivers/*/*s3c2410* | 1099 | F: drivers/*/*s3c2410* |
| @@ -1125,7 +1124,6 @@ M: Sylwester Nawrocki <s.nawrocki@samsung.com> | |||
| 1125 | L: linux-arm-kernel@lists.infradead.org | 1124 | L: linux-arm-kernel@lists.infradead.org |
| 1126 | L: linux-media@vger.kernel.org | 1125 | L: linux-media@vger.kernel.org |
| 1127 | S: Maintained | 1126 | S: Maintained |
| 1128 | F: arch/arm/plat-s5p/dev-fimc* | ||
| 1129 | F: arch/arm/plat-samsung/include/plat/*fimc* | 1127 | F: arch/arm/plat-samsung/include/plat/*fimc* |
| 1130 | F: drivers/media/platform/s5p-fimc/ | 1128 | F: drivers/media/platform/s5p-fimc/ |
| 1131 | 1129 | ||
| @@ -1136,7 +1134,7 @@ M: Jeongtae Park <jtp.park@samsung.com> | |||
| 1136 | L: linux-arm-kernel@lists.infradead.org | 1134 | L: linux-arm-kernel@lists.infradead.org |
| 1137 | L: linux-media@vger.kernel.org | 1135 | L: linux-media@vger.kernel.org |
| 1138 | S: Maintained | 1136 | S: Maintained |
| 1139 | F: arch/arm/plat-s5p/dev-mfc.c | 1137 | F: arch/arm/plat-samsung/s5p-dev-mfc.c |
| 1140 | F: drivers/media/platform/s5p-mfc/ | 1138 | F: drivers/media/platform/s5p-mfc/ |
| 1141 | 1139 | ||
| 1142 | ARM/SAMSUNG S5P SERIES TV SUBSYSTEM SUPPORT | 1140 | ARM/SAMSUNG S5P SERIES TV SUBSYSTEM SUPPORT |
| @@ -1254,7 +1252,7 @@ F: drivers/video/vt8500lcdfb.* | |||
| 1254 | F: drivers/video/wm8505fb* | 1252 | F: drivers/video/wm8505fb* |
| 1255 | F: drivers/video/wmt_ge_rops.* | 1253 | F: drivers/video/wmt_ge_rops.* |
| 1256 | F: drivers/tty/serial/vt8500_serial.c | 1254 | F: drivers/tty/serial/vt8500_serial.c |
| 1257 | F: drivers/rtc/rtc-vt8500-c | 1255 | F: drivers/rtc/rtc-vt8500.c |
| 1258 | F: drivers/mmc/host/wmt-sdmmc.c | 1256 | F: drivers/mmc/host/wmt-sdmmc.c |
| 1259 | 1257 | ||
| 1260 | ARM/ZIPIT Z2 SUPPORT | 1258 | ARM/ZIPIT Z2 SUPPORT |
| @@ -1353,6 +1351,14 @@ W: http://wireless.kernel.org/en/users/Drivers/ath9k | |||
| 1353 | S: Supported | 1351 | S: Supported |
| 1354 | F: drivers/net/wireless/ath/ath9k/ | 1352 | F: drivers/net/wireless/ath/ath9k/ |
| 1355 | 1353 | ||
| 1354 | WILOCITY WIL6210 WIRELESS DRIVER | ||
| 1355 | M: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> | ||
| 1356 | L: linux-wireless@vger.kernel.org | ||
| 1357 | L: wil6210@qca.qualcomm.com | ||
| 1358 | S: Supported | ||
| 1359 | W: http://wireless.kernel.org/en/users/Drivers/wil6210 | ||
| 1360 | F: drivers/net/wireless/ath/wil6210/ | ||
| 1361 | |||
| 1356 | CARL9170 LINUX COMMUNITY WIRELESS DRIVER | 1362 | CARL9170 LINUX COMMUNITY WIRELESS DRIVER |
| 1357 | M: Christian Lamparter <chunkeey@googlemail.com> | 1363 | M: Christian Lamparter <chunkeey@googlemail.com> |
| 1358 | L: linux-wireless@vger.kernel.org | 1364 | L: linux-wireless@vger.kernel.org |
| @@ -1388,6 +1394,7 @@ W: http://linux-atm.sourceforge.net | |||
| 1388 | S: Maintained | 1394 | S: Maintained |
| 1389 | F: drivers/atm/ | 1395 | F: drivers/atm/ |
| 1390 | F: include/linux/atm* | 1396 | F: include/linux/atm* |
| 1397 | F: include/uapi/linux/atm* | ||
| 1391 | 1398 | ||
| 1392 | ATMEL AT91 / AT32 MCI DRIVER | 1399 | ATMEL AT91 / AT32 MCI DRIVER |
| 1393 | M: Ludovic Desroches <ludovic.desroches@atmel.com> | 1400 | M: Ludovic Desroches <ludovic.desroches@atmel.com> |
| @@ -1406,13 +1413,13 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | |||
| 1406 | S: Supported | 1413 | S: Supported |
| 1407 | F: drivers/dma/at_hdmac.c | 1414 | F: drivers/dma/at_hdmac.c |
| 1408 | F: drivers/dma/at_hdmac_regs.h | 1415 | F: drivers/dma/at_hdmac_regs.h |
| 1409 | F: arch/arm/mach-at91/include/mach/at_hdmac.h | 1416 | F: include/linux/platform_data/dma-atmel.h |
| 1410 | 1417 | ||
| 1411 | ATMEL ISI DRIVER | 1418 | ATMEL ISI DRIVER |
| 1412 | M: Josh Wu <josh.wu@atmel.com> | 1419 | M: Josh Wu <josh.wu@atmel.com> |
| 1413 | L: linux-media@vger.kernel.org | 1420 | L: linux-media@vger.kernel.org |
| 1414 | S: Supported | 1421 | S: Supported |
| 1415 | F: drivers/media/platform/atmel-isi.c | 1422 | F: drivers/media/platform/soc_camera/atmel-isi.c |
| 1416 | F: include/media/atmel-isi.h | 1423 | F: include/media/atmel-isi.h |
| 1417 | 1424 | ||
| 1418 | ATMEL LCDFB DRIVER | 1425 | ATMEL LCDFB DRIVER |
| @@ -1467,6 +1474,7 @@ W: http://people.redhat.com/sgrubb/audit/ | |||
| 1467 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current.git | 1474 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current.git |
| 1468 | S: Maintained | 1475 | S: Maintained |
| 1469 | F: include/linux/audit.h | 1476 | F: include/linux/audit.h |
| 1477 | F: include/uapi/linux/audit.h | ||
| 1470 | F: kernel/audit* | 1478 | F: kernel/audit* |
| 1471 | 1479 | ||
| 1472 | AUXILIARY DISPLAY DRIVERS | 1480 | AUXILIARY DISPLAY DRIVERS |
| @@ -1497,7 +1505,7 @@ M: Ralf Baechle <ralf@linux-mips.org> | |||
| 1497 | L: linux-hams@vger.kernel.org | 1505 | L: linux-hams@vger.kernel.org |
| 1498 | W: http://www.linux-ax25.org/ | 1506 | W: http://www.linux-ax25.org/ |
| 1499 | S: Maintained | 1507 | S: Maintained |
| 1500 | F: include/linux/ax25.h | 1508 | F: include/uapi/linux/ax25.h |
| 1501 | F: include/net/ax25.h | 1509 | F: include/net/ax25.h |
| 1502 | F: net/ax25/ | 1510 | F: net/ax25/ |
| 1503 | 1511 | ||
| @@ -1558,7 +1566,7 @@ M: "Tigran A. Aivazian" <tigran@aivazian.fsnet.co.uk> | |||
| 1558 | S: Maintained | 1566 | S: Maintained |
| 1559 | F: Documentation/filesystems/bfs.txt | 1567 | F: Documentation/filesystems/bfs.txt |
| 1560 | F: fs/bfs/ | 1568 | F: fs/bfs/ |
| 1561 | F: include/linux/bfs_fs.h | 1569 | F: include/uapi/linux/bfs_fs.h |
| 1562 | 1570 | ||
| 1563 | BLACKFIN ARCHITECTURE | 1571 | BLACKFIN ARCHITECTURE |
| 1564 | M: Mike Frysinger <vapier@gentoo.org> | 1572 | M: Mike Frysinger <vapier@gentoo.org> |
| @@ -1655,7 +1663,7 @@ L: netdev@vger.kernel.org | |||
| 1655 | W: http://sourceforge.net/projects/bonding/ | 1663 | W: http://sourceforge.net/projects/bonding/ |
| 1656 | S: Supported | 1664 | S: Supported |
| 1657 | F: drivers/net/bonding/ | 1665 | F: drivers/net/bonding/ |
| 1658 | F: include/linux/if_bonding.h | 1666 | F: include/uapi/linux/if_bonding.h |
| 1659 | 1667 | ||
| 1660 | BROADCOM B44 10/100 ETHERNET DRIVER | 1668 | BROADCOM B44 10/100 ETHERNET DRIVER |
| 1661 | M: Gary Zambrano <zambrano@broadcom.com> | 1669 | M: Gary Zambrano <zambrano@broadcom.com> |
| @@ -1734,6 +1742,7 @@ L: linux-scsi@vger.kernel.org | |||
| 1734 | S: Supported | 1742 | S: Supported |
| 1735 | F: block/bsg.c | 1743 | F: block/bsg.c |
| 1736 | F: include/linux/bsg.h | 1744 | F: include/linux/bsg.h |
| 1745 | F: include/uapi/linux/bsg.h | ||
| 1737 | 1746 | ||
| 1738 | BT87X AUDIO DRIVER | 1747 | BT87X AUDIO DRIVER |
| 1739 | M: Clemens Ladisch <clemens@ladisch.de> | 1748 | M: Clemens Ladisch <clemens@ladisch.de> |
| @@ -1804,7 +1813,7 @@ L: netdev@vger.kernel.org | |||
| 1804 | S: Supported | 1813 | S: Supported |
| 1805 | F: Documentation/networking/caif/ | 1814 | F: Documentation/networking/caif/ |
| 1806 | F: drivers/net/caif/ | 1815 | F: drivers/net/caif/ |
| 1807 | F: include/linux/caif/ | 1816 | F: include/uapi/linux/caif/ |
| 1808 | F: include/net/caif/ | 1817 | F: include/net/caif/ |
| 1809 | F: net/caif/ | 1818 | F: net/caif/ |
| 1810 | 1819 | ||
| @@ -1825,11 +1834,11 @@ W: http://gitorious.org/linux-can | |||
| 1825 | T: git git://gitorious.org/linux-can/linux-can-next.git | 1834 | T: git git://gitorious.org/linux-can/linux-can-next.git |
| 1826 | S: Maintained | 1835 | S: Maintained |
| 1827 | F: net/can/ | 1836 | F: net/can/ |
| 1828 | F: include/linux/can.h | ||
| 1829 | F: include/linux/can/core.h | 1837 | F: include/linux/can/core.h |
| 1830 | F: include/linux/can/bcm.h | 1838 | F: include/uapi/linux/can.h |
| 1831 | F: include/linux/can/raw.h | 1839 | F: include/uapi/linux/can/bcm.h |
| 1832 | F: include/linux/can/gw.h | 1840 | F: include/uapi/linux/can/raw.h |
| 1841 | F: include/uapi/linux/can/gw.h | ||
| 1833 | 1842 | ||
| 1834 | CAN NETWORK DRIVERS | 1843 | CAN NETWORK DRIVERS |
| 1835 | M: Wolfgang Grandegger <wg@grandegger.com> | 1844 | M: Wolfgang Grandegger <wg@grandegger.com> |
| @@ -1840,15 +1849,16 @@ T: git git://gitorious.org/linux-can/linux-can-next.git | |||
| 1840 | S: Maintained | 1849 | S: Maintained |
| 1841 | F: drivers/net/can/ | 1850 | F: drivers/net/can/ |
| 1842 | F: include/linux/can/dev.h | 1851 | F: include/linux/can/dev.h |
| 1843 | F: include/linux/can/error.h | ||
| 1844 | F: include/linux/can/netlink.h | ||
| 1845 | F: include/linux/can/platform/ | 1852 | F: include/linux/can/platform/ |
| 1853 | F: include/uapi/linux/can/error.h | ||
| 1854 | F: include/uapi/linux/can/netlink.h | ||
| 1846 | 1855 | ||
| 1847 | CAPABILITIES | 1856 | CAPABILITIES |
| 1848 | M: Serge Hallyn <serge.hallyn@canonical.com> | 1857 | M: Serge Hallyn <serge.hallyn@canonical.com> |
| 1849 | L: linux-security-module@vger.kernel.org | 1858 | L: linux-security-module@vger.kernel.org |
| 1850 | S: Supported | 1859 | S: Supported |
| 1851 | F: include/linux/capability.h | 1860 | F: include/linux/capability.h |
| 1861 | F: include/uapi/linux/capability.h | ||
| 1852 | F: security/capability.c | 1862 | F: security/capability.c |
| 1853 | F: security/commoncap.c | 1863 | F: security/commoncap.c |
| 1854 | F: kernel/capability.c | 1864 | F: kernel/capability.c |
| @@ -1861,6 +1871,7 @@ W: http://www.ibm.com/developerworks/power/cell/ | |||
| 1861 | S: Supported | 1871 | S: Supported |
| 1862 | F: arch/powerpc/include/asm/cell*.h | 1872 | F: arch/powerpc/include/asm/cell*.h |
| 1863 | F: arch/powerpc/include/asm/spu*.h | 1873 | F: arch/powerpc/include/asm/spu*.h |
| 1874 | F: arch/powerpc/include/uapi/asm/spu*.h | ||
| 1864 | F: arch/powerpc/oprofile/*cell* | 1875 | F: arch/powerpc/oprofile/*cell* |
| 1865 | F: arch/powerpc/platforms/cell/ | 1876 | F: arch/powerpc/platforms/cell/ |
| 1866 | 1877 | ||
| @@ -1909,7 +1920,7 @@ W: http://wireless.kernel.org/ | |||
| 1909 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git | 1920 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git |
| 1910 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git | 1921 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git |
| 1911 | S: Maintained | 1922 | S: Maintained |
| 1912 | F: include/linux/nl80211.h | 1923 | F: include/uapi/linux/nl80211.h |
| 1913 | F: include/net/cfg80211.h | 1924 | F: include/net/cfg80211.h |
| 1914 | F: net/wireless/* | 1925 | F: net/wireless/* |
| 1915 | X: net/wireless/wext* | 1926 | X: net/wireless/wext* |
| @@ -1961,9 +1972,9 @@ S: Maintained | |||
| 1961 | F: drivers/usb/host/ohci-ep93xx.c | 1972 | F: drivers/usb/host/ohci-ep93xx.c |
| 1962 | 1973 | ||
| 1963 | CIRRUS LOGIC CS4270 SOUND DRIVER | 1974 | CIRRUS LOGIC CS4270 SOUND DRIVER |
| 1964 | M: Timur Tabi <timur@freescale.com> | 1975 | M: Timur Tabi <timur@tabi.org> |
| 1965 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | 1976 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) |
| 1966 | S: Supported | 1977 | S: Odd Fixes |
| 1967 | F: sound/soc/codecs/cs4270* | 1978 | F: sound/soc/codecs/cs4270* |
| 1968 | 1979 | ||
| 1969 | CLEANCACHE API | 1980 | CLEANCACHE API |
| @@ -2012,6 +2023,7 @@ S: Maintained | |||
| 2012 | F: Documentation/filesystems/coda.txt | 2023 | F: Documentation/filesystems/coda.txt |
| 2013 | F: fs/coda/ | 2024 | F: fs/coda/ |
| 2014 | F: include/linux/coda*.h | 2025 | F: include/linux/coda*.h |
| 2026 | F: include/uapi/linux/coda*.h | ||
| 2015 | 2027 | ||
| 2016 | COMMON CLK FRAMEWORK | 2028 | COMMON CLK FRAMEWORK |
| 2017 | M: Mike Turquette <mturquette@linaro.org> | 2029 | M: Mike Turquette <mturquette@linaro.org> |
| @@ -2266,6 +2278,7 @@ W: http://www.cyclades.com/ | |||
| 2266 | S: Orphan | 2278 | S: Orphan |
| 2267 | F: drivers/tty/cyclades.c | 2279 | F: drivers/tty/cyclades.c |
| 2268 | F: include/linux/cyclades.h | 2280 | F: include/linux/cyclades.h |
| 2281 | F: include/uapi/linux/cyclades.h | ||
| 2269 | 2282 | ||
| 2270 | CYCLADES PC300 DRIVER | 2283 | CYCLADES PC300 DRIVER |
| 2271 | W: http://www.cyclades.com/ | 2284 | W: http://www.cyclades.com/ |
| @@ -2323,6 +2336,7 @@ L: dccp@vger.kernel.org | |||
| 2323 | W: http://www.linuxfoundation.org/collaborate/workgroups/networking/dccp | 2336 | W: http://www.linuxfoundation.org/collaborate/workgroups/networking/dccp |
| 2324 | S: Maintained | 2337 | S: Maintained |
| 2325 | F: include/linux/dccp.h | 2338 | F: include/linux/dccp.h |
| 2339 | F: include/uapi/linux/dccp.h | ||
| 2326 | F: include/linux/tfrc.h | 2340 | F: include/linux/tfrc.h |
| 2327 | F: net/dccp/ | 2341 | F: net/dccp/ |
| 2328 | 2342 | ||
| @@ -2349,7 +2363,7 @@ M: Massimo Dal Zotto <dz@debian.org> | |||
| 2349 | W: http://www.debian.org/~dz/i8k/ | 2363 | W: http://www.debian.org/~dz/i8k/ |
| 2350 | S: Maintained | 2364 | S: Maintained |
| 2351 | F: drivers/char/i8k.c | 2365 | F: drivers/char/i8k.c |
| 2352 | F: include/linux/i8k.h | 2366 | F: include/uapi/linux/i8k.h |
| 2353 | 2367 | ||
| 2354 | DELL SYSTEMS MANAGEMENT BASE DRIVER (dcdbas) | 2368 | DELL SYSTEMS MANAGEMENT BASE DRIVER (dcdbas) |
| 2355 | M: Doug Warzecha <Douglas_Warzecha@dell.com> | 2369 | M: Doug Warzecha <Douglas_Warzecha@dell.com> |
| @@ -2422,6 +2436,7 @@ S: Maintained | |||
| 2422 | F: Documentation/filesystems/quota.txt | 2436 | F: Documentation/filesystems/quota.txt |
| 2423 | F: fs/quota/ | 2437 | F: fs/quota/ |
| 2424 | F: include/linux/quota*.h | 2438 | F: include/linux/quota*.h |
| 2439 | F: include/uapi/linux/quota*.h | ||
| 2425 | 2440 | ||
| 2426 | DISPLAYLINK USB 2.0 FRAMEBUFFER DRIVER (UDLFB) | 2441 | DISPLAYLINK USB 2.0 FRAMEBUFFER DRIVER (UDLFB) |
| 2427 | M: Bernie Thompson <bernie@plugable.com> | 2442 | M: Bernie Thompson <bernie@plugable.com> |
| @@ -2528,6 +2543,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git | |||
| 2528 | S: Maintained | 2543 | S: Maintained |
| 2529 | F: drivers/gpu/drm/ | 2544 | F: drivers/gpu/drm/ |
| 2530 | F: include/drm/ | 2545 | F: include/drm/ |
| 2546 | F: include/uapi/drm/ | ||
| 2531 | 2547 | ||
| 2532 | INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets) | 2548 | INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets) |
| 2533 | M: Daniel Vetter <daniel.vetter@ffwll.ch> | 2549 | M: Daniel Vetter <daniel.vetter@ffwll.ch> |
| @@ -2537,6 +2553,7 @@ T: git git://people.freedesktop.org/~danvet/drm-intel | |||
| 2537 | S: Supported | 2553 | S: Supported |
| 2538 | F: drivers/gpu/drm/i915 | 2554 | F: drivers/gpu/drm/i915 |
| 2539 | F: include/drm/i915* | 2555 | F: include/drm/i915* |
| 2556 | F: include/uapi/drm/i915* | ||
| 2540 | 2557 | ||
| 2541 | DRM DRIVERS FOR EXYNOS | 2558 | DRM DRIVERS FOR EXYNOS |
| 2542 | M: Inki Dae <inki.dae@samsung.com> | 2559 | M: Inki Dae <inki.dae@samsung.com> |
| @@ -2548,6 +2565,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git | |||
| 2548 | S: Supported | 2565 | S: Supported |
| 2549 | F: drivers/gpu/drm/exynos | 2566 | F: drivers/gpu/drm/exynos |
| 2550 | F: include/drm/exynos* | 2567 | F: include/drm/exynos* |
| 2568 | F: include/uapi/drm/exynos* | ||
| 2551 | 2569 | ||
| 2552 | DRM DRIVERS FOR NVIDIA TEGRA | 2570 | DRM DRIVERS FOR NVIDIA TEGRA |
| 2553 | M: Thierry Reding <thierry.reding@avionic-design.de> | 2571 | M: Thierry Reding <thierry.reding@avionic-design.de> |
| @@ -2622,7 +2640,7 @@ W: http://github.com/mkrufky | |||
| 2622 | Q: http://patchwork.linuxtv.org/project/linux-media/list/ | 2640 | Q: http://patchwork.linuxtv.org/project/linux-media/list/ |
| 2623 | T: git git://linuxtv.org/media_tree.git | 2641 | T: git git://linuxtv.org/media_tree.git |
| 2624 | S: Maintained | 2642 | S: Maintained |
| 2625 | F: drivers/media/usb/dvb-usb-v2/cxusb* | 2643 | F: drivers/media/usb/dvb-usb/cxusb* |
| 2626 | 2644 | ||
| 2627 | DVB_USB_CYPRESS_FIRMWARE MEDIA DRIVER | 2645 | DVB_USB_CYPRESS_FIRMWARE MEDIA DRIVER |
| 2628 | M: Antti Palosaari <crope@iki.fi> | 2646 | M: Antti Palosaari <crope@iki.fi> |
| @@ -2722,6 +2740,7 @@ L: netfilter-devel@vger.kernel.org | |||
| 2722 | W: http://ebtables.sourceforge.net/ | 2740 | W: http://ebtables.sourceforge.net/ |
| 2723 | S: Maintained | 2741 | S: Maintained |
| 2724 | F: include/linux/netfilter_bridge/ebt_*.h | 2742 | F: include/linux/netfilter_bridge/ebt_*.h |
| 2743 | F: include/uapi/linux/netfilter_bridge/ebt_*.h | ||
| 2725 | F: net/bridge/netfilter/ebt*.c | 2744 | F: net/bridge/netfilter/ebt*.c |
| 2726 | 2745 | ||
| 2727 | EC100 MEDIA DRIVER | 2746 | EC100 MEDIA DRIVER |
| @@ -2933,12 +2952,6 @@ M: Maxim Levitsky <maximlevitsky@gmail.com> | |||
| 2933 | S: Maintained | 2952 | S: Maintained |
| 2934 | F: drivers/media/rc/ene_ir.* | 2953 | F: drivers/media/rc/ene_ir.* |
| 2935 | 2954 | ||
| 2936 | EPSON 1355 FRAMEBUFFER DRIVER | ||
| 2937 | M: Christopher Hoover <ch@murgatroid.com> | ||
| 2938 | M: Christopher Hoover <ch@hpl.hp.com> | ||
| 2939 | S: Maintained | ||
| 2940 | F: drivers/video/epson1355fb.c | ||
| 2941 | |||
| 2942 | EPSON S1D13XXX FRAMEBUFFER DRIVER | 2955 | EPSON S1D13XXX FRAMEBUFFER DRIVER |
| 2943 | M: Kristoffer Ericson <kristoffer.ericson@gmail.com> | 2956 | M: Kristoffer Ericson <kristoffer.ericson@gmail.com> |
| 2944 | S: Maintained | 2957 | S: Maintained |
| @@ -3051,6 +3064,7 @@ M: Eric Paris <eparis@redhat.com> | |||
| 3051 | S: Maintained | 3064 | S: Maintained |
| 3052 | F: fs/notify/fanotify/ | 3065 | F: fs/notify/fanotify/ |
| 3053 | F: include/linux/fanotify.h | 3066 | F: include/linux/fanotify.h |
| 3067 | F: include/uapi/linux/fanotify.h | ||
| 3054 | 3068 | ||
| 3055 | FARSYNC SYNCHRONOUS DRIVER | 3069 | FARSYNC SYNCHRONOUS DRIVER |
| 3056 | M: Kevin Curtis <kevin.curtis@farsite.co.uk> | 3070 | M: Kevin Curtis <kevin.curtis@farsite.co.uk> |
| @@ -3074,6 +3088,7 @@ F: drivers/scsi/fcoe/ | |||
| 3074 | F: include/scsi/fc/ | 3088 | F: include/scsi/fc/ |
| 3075 | F: include/scsi/libfc.h | 3089 | F: include/scsi/libfc.h |
| 3076 | F: include/scsi/libfcoe.h | 3090 | F: include/scsi/libfcoe.h |
| 3091 | F: include/uapi/scsi/fc/ | ||
| 3077 | 3092 | ||
| 3078 | FILE LOCKING (flock() and fcntl()/lockf()) | 3093 | FILE LOCKING (flock() and fcntl()/lockf()) |
| 3079 | M: Matthew Wilcox <matthew@wil.cx> | 3094 | M: Matthew Wilcox <matthew@wil.cx> |
| @@ -3081,6 +3096,8 @@ L: linux-fsdevel@vger.kernel.org | |||
| 3081 | S: Maintained | 3096 | S: Maintained |
| 3082 | F: include/linux/fcntl.h | 3097 | F: include/linux/fcntl.h |
| 3083 | F: include/linux/fs.h | 3098 | F: include/linux/fs.h |
| 3099 | F: include/uapi/linux/fcntl.h | ||
| 3100 | F: include/uapi/linux/fs.h | ||
| 3084 | F: fs/fcntl.c | 3101 | F: fs/fcntl.c |
| 3085 | F: fs/locks.c | 3102 | F: fs/locks.c |
| 3086 | 3103 | ||
| @@ -3170,11 +3187,13 @@ F: Documentation/devicetree/bindings/fb/ | |||
| 3170 | F: drivers/video/ | 3187 | F: drivers/video/ |
| 3171 | F: include/video/ | 3188 | F: include/video/ |
| 3172 | F: include/linux/fb.h | 3189 | F: include/linux/fb.h |
| 3190 | F: include/uapi/video/ | ||
| 3191 | F: include/uapi/linux/fb.h | ||
| 3173 | 3192 | ||
| 3174 | FREESCALE DIU FRAMEBUFFER DRIVER | 3193 | FREESCALE DIU FRAMEBUFFER DRIVER |
| 3175 | M: Timur Tabi <timur@freescale.com> | 3194 | M: Timur Tabi <timur@tabi.org> |
| 3176 | L: linux-fbdev@vger.kernel.org | 3195 | L: linux-fbdev@vger.kernel.org |
| 3177 | S: Supported | 3196 | S: Maintained |
| 3178 | F: drivers/video/fsl-diu-fb.* | 3197 | F: drivers/video/fsl-diu-fb.* |
| 3179 | 3198 | ||
| 3180 | FREESCALE DMA DRIVER | 3199 | FREESCALE DMA DRIVER |
| @@ -3196,7 +3215,7 @@ M: Sascha Hauer <kernel@pengutronix.de> | |||
| 3196 | L: linux-fbdev@vger.kernel.org | 3215 | L: linux-fbdev@vger.kernel.org |
| 3197 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 3216 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 3198 | S: Maintained | 3217 | S: Maintained |
| 3199 | F: arch/arm/plat-mxc/include/mach/imxfb.h | 3218 | F: include/linux/platform_data/video-imxfb.h |
| 3200 | F: drivers/video/imxfb.c | 3219 | F: drivers/video/imxfb.c |
| 3201 | 3220 | ||
| 3202 | FREESCALE SOC FS_ENET DRIVER | 3221 | FREESCALE SOC FS_ENET DRIVER |
| @@ -3209,9 +3228,8 @@ F: drivers/net/ethernet/freescale/fs_enet/ | |||
| 3209 | F: include/linux/fs_enet_pd.h | 3228 | F: include/linux/fs_enet_pd.h |
| 3210 | 3229 | ||
| 3211 | FREESCALE QUICC ENGINE LIBRARY | 3230 | FREESCALE QUICC ENGINE LIBRARY |
| 3212 | M: Timur Tabi <timur@freescale.com> | ||
| 3213 | L: linuxppc-dev@lists.ozlabs.org | 3231 | L: linuxppc-dev@lists.ozlabs.org |
| 3214 | S: Supported | 3232 | S: Orphan |
| 3215 | F: arch/powerpc/sysdev/qe_lib/ | 3233 | F: arch/powerpc/sysdev/qe_lib/ |
| 3216 | F: arch/powerpc/include/asm/*qe.h | 3234 | F: arch/powerpc/include/asm/*qe.h |
| 3217 | 3235 | ||
| @@ -3230,16 +3248,16 @@ S: Maintained | |||
| 3230 | F: drivers/net/ethernet/freescale/ucc_geth* | 3248 | F: drivers/net/ethernet/freescale/ucc_geth* |
| 3231 | 3249 | ||
| 3232 | FREESCALE QUICC ENGINE UCC UART DRIVER | 3250 | FREESCALE QUICC ENGINE UCC UART DRIVER |
| 3233 | M: Timur Tabi <timur@freescale.com> | 3251 | M: Timur Tabi <timur@tabi.org> |
| 3234 | L: linuxppc-dev@lists.ozlabs.org | 3252 | L: linuxppc-dev@lists.ozlabs.org |
| 3235 | S: Supported | 3253 | S: Maintained |
| 3236 | F: drivers/tty/serial/ucc_uart.c | 3254 | F: drivers/tty/serial/ucc_uart.c |
| 3237 | 3255 | ||
| 3238 | FREESCALE SOC SOUND DRIVERS | 3256 | FREESCALE SOC SOUND DRIVERS |
| 3239 | M: Timur Tabi <timur@freescale.com> | 3257 | M: Timur Tabi <timur@tabi.org> |
| 3240 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | 3258 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) |
| 3241 | L: linuxppc-dev@lists.ozlabs.org | 3259 | L: linuxppc-dev@lists.ozlabs.org |
| 3242 | S: Supported | 3260 | S: Maintained |
| 3243 | F: sound/soc/fsl/fsl* | 3261 | F: sound/soc/fsl/fsl* |
| 3244 | F: sound/soc/fsl/mpc8610_hpcd.c | 3262 | F: sound/soc/fsl/mpc8610_hpcd.c |
| 3245 | 3263 | ||
| @@ -3273,6 +3291,16 @@ F: Documentation/filesystems/caching/ | |||
| 3273 | F: fs/fscache/ | 3291 | F: fs/fscache/ |
| 3274 | F: include/linux/fscache*.h | 3292 | F: include/linux/fscache*.h |
| 3275 | 3293 | ||
| 3294 | F2FS FILE SYSTEM | ||
| 3295 | M: Jaegeuk Kim <jaegeuk.kim@samsung.com> | ||
| 3296 | L: linux-f2fs-devel@lists.sourceforge.net | ||
| 3297 | W: http://en.wikipedia.org/wiki/F2FS | ||
| 3298 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git | ||
| 3299 | S: Maintained | ||
| 3300 | F: Documentation/filesystems/f2fs.txt | ||
| 3301 | F: fs/f2fs/ | ||
| 3302 | F: include/linux/f2fs_fs.h | ||
| 3303 | |||
| 3276 | FUJITSU FR-V (FRV) PORT | 3304 | FUJITSU FR-V (FRV) PORT |
| 3277 | M: David Howells <dhowells@redhat.com> | 3305 | M: David Howells <dhowells@redhat.com> |
| 3278 | S: Maintained | 3306 | S: Maintained |
| @@ -3304,7 +3332,7 @@ L: fuse-devel@lists.sourceforge.net | |||
| 3304 | W: http://fuse.sourceforge.net/ | 3332 | W: http://fuse.sourceforge.net/ |
| 3305 | S: Maintained | 3333 | S: Maintained |
| 3306 | F: fs/fuse/ | 3334 | F: fs/fuse/ |
| 3307 | F: include/linux/fuse.h | 3335 | F: include/uapi/linux/fuse.h |
| 3308 | 3336 | ||
| 3309 | FUTURE DOMAIN TMC-16x0 SCSI DRIVER (16-bit) | 3337 | FUTURE DOMAIN TMC-16x0 SCSI DRIVER (16-bit) |
| 3310 | M: Rik Faith <faith@cs.unc.edu> | 3338 | M: Rik Faith <faith@cs.unc.edu> |
| @@ -3351,6 +3379,7 @@ L: linux-arch@vger.kernel.org | |||
| 3351 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git | 3379 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git |
| 3352 | S: Maintained | 3380 | S: Maintained |
| 3353 | F: include/asm-generic | 3381 | F: include/asm-generic |
| 3382 | F: include/uapi/asm-generic | ||
| 3354 | 3383 | ||
| 3355 | GENERIC UIO DRIVER FOR PCI DEVICES | 3384 | GENERIC UIO DRIVER FOR PCI DEVICES |
| 3356 | M: "Michael S. Tsirkin" <mst@redhat.com> | 3385 | M: "Michael S. Tsirkin" <mst@redhat.com> |
| @@ -3367,7 +3396,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-nmw.git | |||
| 3367 | S: Supported | 3396 | S: Supported |
| 3368 | F: Documentation/filesystems/gfs2*.txt | 3397 | F: Documentation/filesystems/gfs2*.txt |
| 3369 | F: fs/gfs2/ | 3398 | F: fs/gfs2/ |
| 3370 | F: include/linux/gfs2_ondisk.h | 3399 | F: include/uapi/linux/gfs2_ondisk.h |
| 3371 | 3400 | ||
| 3372 | GIGASET ISDN DRIVERS | 3401 | GIGASET ISDN DRIVERS |
| 3373 | M: Hansjoerg Lipp <hjlipp@web.de> | 3402 | M: Hansjoerg Lipp <hjlipp@web.de> |
| @@ -3377,7 +3406,7 @@ W: http://gigaset307x.sourceforge.net/ | |||
| 3377 | S: Maintained | 3406 | S: Maintained |
| 3378 | F: Documentation/isdn/README.gigaset | 3407 | F: Documentation/isdn/README.gigaset |
| 3379 | F: drivers/isdn/gigaset/ | 3408 | F: drivers/isdn/gigaset/ |
| 3380 | F: include/linux/gigaset_dev.h | 3409 | F: include/uapi/linux/gigaset_dev.h |
| 3381 | 3410 | ||
| 3382 | GPIO SUBSYSTEM | 3411 | GPIO SUBSYSTEM |
| 3383 | M: Grant Likely <grant.likely@secretlab.ca> | 3412 | M: Grant Likely <grant.likely@secretlab.ca> |
| @@ -3534,6 +3563,7 @@ S: Supported | |||
| 3534 | F: Documentation/scsi/hpsa.txt | 3563 | F: Documentation/scsi/hpsa.txt |
| 3535 | F: drivers/scsi/hpsa*.[ch] | 3564 | F: drivers/scsi/hpsa*.[ch] |
| 3536 | F: include/linux/cciss*.h | 3565 | F: include/linux/cciss*.h |
| 3566 | F: include/uapi/linux/cciss*.h | ||
| 3537 | 3567 | ||
| 3538 | HEWLETT-PACKARD SMART CISS RAID DRIVER (cciss) | 3568 | HEWLETT-PACKARD SMART CISS RAID DRIVER (cciss) |
| 3539 | M: Mike Miller <mike.miller@hp.com> | 3569 | M: Mike Miller <mike.miller@hp.com> |
| @@ -3542,6 +3572,7 @@ S: Supported | |||
| 3542 | F: Documentation/blockdev/cciss.txt | 3572 | F: Documentation/blockdev/cciss.txt |
| 3543 | F: drivers/block/cciss* | 3573 | F: drivers/block/cciss* |
| 3544 | F: include/linux/cciss_ioctl.h | 3574 | F: include/linux/cciss_ioctl.h |
| 3575 | F: include/uapi/linux/cciss_ioctl.h | ||
| 3545 | 3576 | ||
| 3546 | HFS FILESYSTEM | 3577 | HFS FILESYSTEM |
| 3547 | L: linux-fsdevel@vger.kernel.org | 3578 | L: linux-fsdevel@vger.kernel.org |
| @@ -3576,6 +3607,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git | |||
| 3576 | S: Maintained | 3607 | S: Maintained |
| 3577 | F: drivers/hid/ | 3608 | F: drivers/hid/ |
| 3578 | F: include/linux/hid* | 3609 | F: include/linux/hid* |
| 3610 | F: include/uapi/linux/hid* | ||
| 3579 | 3611 | ||
| 3580 | HIGH-RESOLUTION TIMERS, CLOCKEVENTS, DYNTICKS | 3612 | HIGH-RESOLUTION TIMERS, CLOCKEVENTS, DYNTICKS |
| 3581 | M: Thomas Gleixner <tglx@linutronix.de> | 3613 | M: Thomas Gleixner <tglx@linutronix.de> |
| @@ -3607,7 +3639,7 @@ M: Jes Sorensen <jes@trained-monkey.org> | |||
| 3607 | L: linux-hippi@sunsite.dk | 3639 | L: linux-hippi@sunsite.dk |
| 3608 | S: Maintained | 3640 | S: Maintained |
| 3609 | F: include/linux/hippidevice.h | 3641 | F: include/linux/hippidevice.h |
| 3610 | F: include/linux/if_hippi.h | 3642 | F: include/uapi/linux/if_hippi.h |
| 3611 | F: net/802/hippi.c | 3643 | F: net/802/hippi.c |
| 3612 | F: drivers/net/hippi/ | 3644 | F: drivers/net/hippi/ |
| 3613 | 3645 | ||
| @@ -3635,6 +3667,7 @@ S: Maintained | |||
| 3635 | F: Documentation/timers/hpet.txt | 3667 | F: Documentation/timers/hpet.txt |
| 3636 | F: drivers/char/hpet.c | 3668 | F: drivers/char/hpet.c |
| 3637 | F: include/linux/hpet.h | 3669 | F: include/linux/hpet.h |
| 3670 | F: include/uapi/linux/hpet.h | ||
| 3638 | 3671 | ||
| 3639 | HPET: x86 | 3672 | HPET: x86 |
| 3640 | M: "Venkatesh Pallipadi (Venki)" <venki@google.com> | 3673 | M: "Venkatesh Pallipadi (Venki)" <venki@google.com> |
| @@ -3735,6 +3768,8 @@ F: Documentation/i2c/ | |||
| 3735 | F: drivers/i2c/ | 3768 | F: drivers/i2c/ |
| 3736 | F: include/linux/i2c.h | 3769 | F: include/linux/i2c.h |
| 3737 | F: include/linux/i2c-*.h | 3770 | F: include/linux/i2c-*.h |
| 3771 | F: include/uapi/linux/i2c.h | ||
| 3772 | F: include/uapi/linux/i2c-*.h | ||
| 3738 | 3773 | ||
| 3739 | I2C-TAOS-EVM DRIVER | 3774 | I2C-TAOS-EVM DRIVER |
| 3740 | M: Jean Delvare <khali@linux-fr.org> | 3775 | M: Jean Delvare <khali@linux-fr.org> |
| @@ -3850,7 +3885,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git | |||
| 3850 | S: Maintained | 3885 | S: Maintained |
| 3851 | F: net/ieee802154/ | 3886 | F: net/ieee802154/ |
| 3852 | F: net/mac802154/ | 3887 | F: net/mac802154/ |
| 3853 | F: drivers/ieee802154/ | 3888 | F: drivers/net/ieee802154/ |
| 3854 | 3889 | ||
| 3855 | IGUANAWORKS USB IR TRANSCEIVER | 3890 | IGUANAWORKS USB IR TRANSCEIVER |
| 3856 | M: Sean Young <sean@mess.org> | 3891 | M: Sean Young <sean@mess.org> |
| @@ -3901,7 +3936,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git | |||
| 3901 | S: Supported | 3936 | S: Supported |
| 3902 | F: Documentation/infiniband/ | 3937 | F: Documentation/infiniband/ |
| 3903 | F: drivers/infiniband/ | 3938 | F: drivers/infiniband/ |
| 3904 | F: include/linux/if_infiniband.h | 3939 | F: include/uapi/linux/if_infiniband.h |
| 3905 | 3940 | ||
| 3906 | INOTIFY | 3941 | INOTIFY |
| 3907 | M: John McCutchan <john@johnmccutchan.com> | 3942 | M: John McCutchan <john@johnmccutchan.com> |
| @@ -3911,6 +3946,7 @@ S: Maintained | |||
| 3911 | F: Documentation/filesystems/inotify.txt | 3946 | F: Documentation/filesystems/inotify.txt |
| 3912 | F: fs/notify/inotify/ | 3947 | F: fs/notify/inotify/ |
| 3913 | F: include/linux/inotify.h | 3948 | F: include/linux/inotify.h |
| 3949 | F: include/uapi/linux/inotify.h | ||
| 3914 | 3950 | ||
| 3915 | INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS | 3951 | INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS |
| 3916 | M: Dmitry Torokhov <dmitry.torokhov@gmail.com> | 3952 | M: Dmitry Torokhov <dmitry.torokhov@gmail.com> |
| @@ -3921,6 +3957,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git | |||
| 3921 | S: Maintained | 3957 | S: Maintained |
| 3922 | F: drivers/input/ | 3958 | F: drivers/input/ |
| 3923 | F: include/linux/input.h | 3959 | F: include/linux/input.h |
| 3960 | F: include/uapi/linux/input.h | ||
| 3924 | F: include/linux/input/ | 3961 | F: include/linux/input/ |
| 3925 | 3962 | ||
| 3926 | INPUT MULTITOUCH (MT) PROTOCOL | 3963 | INPUT MULTITOUCH (MT) PROTOCOL |
| @@ -3941,7 +3978,6 @@ L: linux-scsi@vger.kernel.org | |||
| 3941 | T: git git://git.code.sf.net/p/intel-sas/isci | 3978 | T: git git://git.code.sf.net/p/intel-sas/isci |
| 3942 | S: Supported | 3979 | S: Supported |
| 3943 | F: drivers/scsi/isci/ | 3980 | F: drivers/scsi/isci/ |
| 3944 | F: firmware/isci/ | ||
| 3945 | 3981 | ||
| 3946 | INTEL IDLE DRIVER | 3982 | INTEL IDLE DRIVER |
| 3947 | M: Len Brown <lenb@kernel.org> | 3983 | M: Len Brown <lenb@kernel.org> |
| @@ -4036,12 +4072,6 @@ F: Documentation/networking/ixgbe.txt | |||
| 4036 | F: Documentation/networking/ixgbevf.txt | 4072 | F: Documentation/networking/ixgbevf.txt |
| 4037 | F: drivers/net/ethernet/intel/ | 4073 | F: drivers/net/ethernet/intel/ |
| 4038 | 4074 | ||
| 4039 | INTEL MRST PMU DRIVER | ||
| 4040 | M: Len Brown <len.brown@intel.com> | ||
| 4041 | L: linux-pm@vger.kernel.org | ||
| 4042 | S: Supported | ||
| 4043 | F: arch/x86/platform/mrst/pmu.* | ||
| 4044 | |||
| 4045 | INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT | 4075 | INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT |
| 4046 | M: Stanislav Yakovlev <stas.yakovlev@gmail.com> | 4076 | M: Stanislav Yakovlev <stas.yakovlev@gmail.com> |
| 4047 | L: linux-wireless@vger.kernel.org | 4077 | L: linux-wireless@vger.kernel.org |
| @@ -4070,7 +4100,7 @@ S: Supported | |||
| 4070 | W: http://linuxwimax.org | 4100 | W: http://linuxwimax.org |
| 4071 | F: Documentation/wimax/README.i2400m | 4101 | F: Documentation/wimax/README.i2400m |
| 4072 | F: drivers/net/wimax/i2400m/ | 4102 | F: drivers/net/wimax/i2400m/ |
| 4073 | F: include/linux/wimax/i2400m.h | 4103 | F: include/uapi/linux/wimax/i2400m.h |
| 4074 | 4104 | ||
| 4075 | INTEL WIRELESS 3945ABG/BG, 4965AGN (iwlegacy) | 4105 | INTEL WIRELESS 3945ABG/BG, 4965AGN (iwlegacy) |
| 4076 | M: Stanislaw Gruszka <sgruszka@redhat.com> | 4106 | M: Stanislaw Gruszka <sgruszka@redhat.com> |
| @@ -4092,9 +4122,9 @@ INTEL MANAGEMENT ENGINE (mei) | |||
| 4092 | M: Tomas Winkler <tomas.winkler@intel.com> | 4122 | M: Tomas Winkler <tomas.winkler@intel.com> |
| 4093 | L: linux-kernel@vger.kernel.org | 4123 | L: linux-kernel@vger.kernel.org |
| 4094 | S: Supported | 4124 | S: Supported |
| 4095 | F: include/linux/mei.h | 4125 | F: include/uapi/linux/mei.h |
| 4096 | F: drivers/misc/mei/* | 4126 | F: drivers/misc/mei/* |
| 4097 | F: Documentation/mei/* | 4127 | F: Documentation/misc-devices/mei/* |
| 4098 | 4128 | ||
| 4099 | IOC3 ETHERNET DRIVER | 4129 | IOC3 ETHERNET DRIVER |
| 4100 | M: Ralf Baechle <ralf@linux-mips.org> | 4130 | M: Ralf Baechle <ralf@linux-mips.org> |
| @@ -4134,6 +4164,7 @@ S: Supported | |||
| 4134 | F: Documentation/IPMI.txt | 4164 | F: Documentation/IPMI.txt |
| 4135 | F: drivers/char/ipmi/ | 4165 | F: drivers/char/ipmi/ |
| 4136 | F: include/linux/ipmi* | 4166 | F: include/linux/ipmi* |
| 4167 | F: include/uapi/linux/ipmi* | ||
| 4137 | 4168 | ||
| 4138 | IPS SCSI RAID DRIVER | 4169 | IPS SCSI RAID DRIVER |
| 4139 | M: Adaptec OEM Raid Solutions <aacraid@adaptec.com> | 4170 | M: Adaptec OEM Raid Solutions <aacraid@adaptec.com> |
| @@ -4151,7 +4182,7 @@ L: lvs-devel@vger.kernel.org | |||
| 4151 | S: Maintained | 4182 | S: Maintained |
| 4152 | F: Documentation/networking/ipvs-sysctl.txt | 4183 | F: Documentation/networking/ipvs-sysctl.txt |
| 4153 | F: include/net/ip_vs.h | 4184 | F: include/net/ip_vs.h |
| 4154 | F: include/linux/ip_vs.h | 4185 | F: include/uapi/linux/ip_vs.h |
| 4155 | F: net/netfilter/ipvs/ | 4186 | F: net/netfilter/ipvs/ |
| 4156 | 4187 | ||
| 4157 | IPWIRELESS DRIVER | 4188 | IPWIRELESS DRIVER |
| @@ -4164,8 +4195,8 @@ IPX NETWORK LAYER | |||
| 4164 | M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | 4195 | M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> |
| 4165 | L: netdev@vger.kernel.org | 4196 | L: netdev@vger.kernel.org |
| 4166 | S: Maintained | 4197 | S: Maintained |
| 4167 | F: include/linux/ipx.h | ||
| 4168 | F: include/net/ipx.h | 4198 | F: include/net/ipx.h |
| 4199 | F: include/uapi/linux/ipx.h | ||
| 4169 | F: net/ipx/ | 4200 | F: net/ipx/ |
| 4170 | 4201 | ||
| 4171 | IRDA SUBSYSTEM | 4202 | IRDA SUBSYSTEM |
| @@ -4228,6 +4259,8 @@ F: Documentation/isdn/ | |||
| 4228 | F: drivers/isdn/ | 4259 | F: drivers/isdn/ |
| 4229 | F: include/linux/isdn.h | 4260 | F: include/linux/isdn.h |
| 4230 | F: include/linux/isdn/ | 4261 | F: include/linux/isdn/ |
| 4262 | F: include/uapi/linux/isdn.h | ||
| 4263 | F: include/uapi/linux/isdn/ | ||
| 4231 | 4264 | ||
| 4232 | ISDN SUBSYSTEM (Eicon active card driver) | 4265 | ISDN SUBSYSTEM (Eicon active card driver) |
| 4233 | M: Armin Schindler <mac@melware.de> | 4266 | M: Armin Schindler <mac@melware.de> |
| @@ -4268,7 +4301,7 @@ W: http://www.ivtvdriver.org | |||
| 4268 | S: Maintained | 4301 | S: Maintained |
| 4269 | F: Documentation/video4linux/*.ivtv | 4302 | F: Documentation/video4linux/*.ivtv |
| 4270 | F: drivers/media/pci/ivtv/ | 4303 | F: drivers/media/pci/ivtv/ |
| 4271 | F: include/linux/ivtv* | 4304 | F: include/uapi/linux/ivtv* |
| 4272 | 4305 | ||
| 4273 | IX2505V MEDIA DRIVER | 4306 | IX2505V MEDIA DRIVER |
| 4274 | M: Malcolm Priestley <tvboxspy@gmail.com> | 4307 | M: Malcolm Priestley <tvboxspy@gmail.com> |
| @@ -4306,7 +4339,7 @@ L: linux-mtd@lists.infradead.org | |||
| 4306 | W: http://www.linux-mtd.infradead.org/doc/jffs2.html | 4339 | W: http://www.linux-mtd.infradead.org/doc/jffs2.html |
| 4307 | S: Maintained | 4340 | S: Maintained |
| 4308 | F: fs/jffs2/ | 4341 | F: fs/jffs2/ |
| 4309 | F: include/linux/jffs2.h | 4342 | F: include/uapi/linux/jffs2.h |
| 4310 | 4343 | ||
| 4311 | JOURNALLING LAYER FOR BLOCK DEVICES (JBD) | 4344 | JOURNALLING LAYER FOR BLOCK DEVICES (JBD) |
| 4312 | M: Andrew Morton <akpm@linux-foundation.org> | 4345 | M: Andrew Morton <akpm@linux-foundation.org> |
| @@ -4389,11 +4422,13 @@ W: http://nfs.sourceforge.net/ | |||
| 4389 | S: Supported | 4422 | S: Supported |
| 4390 | F: fs/nfsd/ | 4423 | F: fs/nfsd/ |
| 4391 | F: include/linux/nfsd/ | 4424 | F: include/linux/nfsd/ |
| 4425 | F: include/uapi/linux/nfsd/ | ||
| 4392 | F: fs/lockd/ | 4426 | F: fs/lockd/ |
| 4393 | F: fs/nfs_common/ | 4427 | F: fs/nfs_common/ |
| 4394 | F: net/sunrpc/ | 4428 | F: net/sunrpc/ |
| 4395 | F: include/linux/lockd/ | 4429 | F: include/linux/lockd/ |
| 4396 | F: include/linux/sunrpc/ | 4430 | F: include/linux/sunrpc/ |
| 4431 | F: include/uapi/linux/sunrpc/ | ||
| 4397 | 4432 | ||
| 4398 | KERNEL VIRTUAL MACHINE (KVM) | 4433 | KERNEL VIRTUAL MACHINE (KVM) |
| 4399 | M: Marcelo Tosatti <mtosatti@redhat.com> | 4434 | M: Marcelo Tosatti <mtosatti@redhat.com> |
| @@ -4405,6 +4440,7 @@ F: Documentation/*/kvm.txt | |||
| 4405 | F: arch/*/kvm/ | 4440 | F: arch/*/kvm/ |
| 4406 | F: arch/*/include/asm/kvm* | 4441 | F: arch/*/include/asm/kvm* |
| 4407 | F: include/linux/kvm* | 4442 | F: include/linux/kvm* |
| 4443 | F: include/uapi/linux/kvm* | ||
| 4408 | F: virt/kvm/ | 4444 | F: virt/kvm/ |
| 4409 | 4445 | ||
| 4410 | KERNEL VIRTUAL MACHINE (KVM) FOR AMD-V | 4446 | KERNEL VIRTUAL MACHINE (KVM) FOR AMD-V |
| @@ -4451,6 +4487,7 @@ W: http://kernel.org/pub/linux/utils/kernel/kexec/ | |||
| 4451 | L: kexec@lists.infradead.org | 4487 | L: kexec@lists.infradead.org |
| 4452 | S: Maintained | 4488 | S: Maintained |
| 4453 | F: include/linux/kexec.h | 4489 | F: include/linux/kexec.h |
| 4490 | F: include/uapi/linux/kexec.h | ||
| 4454 | F: kernel/kexec.c | 4491 | F: kernel/kexec.c |
| 4455 | 4492 | ||
| 4456 | KEYS/KEYRINGS: | 4493 | KEYS/KEYRINGS: |
| @@ -4692,6 +4729,7 @@ LLC (802.2) | |||
| 4692 | M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | 4729 | M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> |
| 4693 | S: Maintained | 4730 | S: Maintained |
| 4694 | F: include/linux/llc.h | 4731 | F: include/linux/llc.h |
| 4732 | F: include/uapi/linux/llc.h | ||
| 4695 | F: include/net/llc* | 4733 | F: include/net/llc* |
| 4696 | F: net/llc/ | 4734 | F: net/llc/ |
| 4697 | 4735 | ||
| @@ -4912,7 +4950,7 @@ MATROX FRAMEBUFFER DRIVER | |||
| 4912 | L: linux-fbdev@vger.kernel.org | 4950 | L: linux-fbdev@vger.kernel.org |
| 4913 | S: Orphan | 4951 | S: Orphan |
| 4914 | F: drivers/video/matrox/matroxfb_* | 4952 | F: drivers/video/matrox/matroxfb_* |
| 4915 | F: include/linux/matroxfb.h | 4953 | F: include/uapi/linux/matroxfb.h |
| 4916 | 4954 | ||
| 4917 | MAX16065 HARDWARE MONITOR DRIVER | 4955 | MAX16065 HARDWARE MONITOR DRIVER |
| 4918 | M: Guenter Roeck <linux@roeck-us.net> | 4956 | M: Guenter Roeck <linux@roeck-us.net> |
| @@ -4994,7 +5032,7 @@ T: git git://git.infradead.org/mtd-2.6.git | |||
| 4994 | S: Maintained | 5032 | S: Maintained |
| 4995 | F: drivers/mtd/ | 5033 | F: drivers/mtd/ |
| 4996 | F: include/linux/mtd/ | 5034 | F: include/linux/mtd/ |
| 4997 | F: include/mtd/ | 5035 | F: include/uapi/mtd/ |
| 4998 | 5036 | ||
| 4999 | MICROBLAZE ARCHITECTURE | 5037 | MICROBLAZE ARCHITECTURE |
| 5000 | M: Michal Simek <monstr@monstr.eu> | 5038 | M: Michal Simek <monstr@monstr.eu> |
| @@ -5032,12 +5070,6 @@ F: Documentation/video4linux/meye.txt | |||
| 5032 | F: drivers/media/pci/meye/ | 5070 | F: drivers/media/pci/meye/ |
| 5033 | F: include/uapi/linux/meye.h | 5071 | F: include/uapi/linux/meye.h |
| 5034 | 5072 | ||
| 5035 | MOTOROLA IMX MMC/SD HOST CONTROLLER INTERFACE DRIVER | ||
| 5036 | M: Pavel Pisa <ppisa@pikron.com> | ||
| 5037 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
| 5038 | S: Maintained | ||
| 5039 | F: drivers/mmc/host/imxmmc.* | ||
| 5040 | |||
| 5041 | MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD | 5073 | MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD |
| 5042 | M: Jiri Slaby <jirislaby@gmail.com> | 5074 | M: Jiri Slaby <jirislaby@gmail.com> |
| 5043 | S: Maintained | 5075 | S: Maintained |
| @@ -5052,7 +5084,7 @@ S: Maintained | |||
| 5052 | F: drivers/media/radio/radio-mr800.c | 5084 | F: drivers/media/radio/radio-mr800.c |
| 5053 | 5085 | ||
| 5054 | MSI LAPTOP SUPPORT | 5086 | MSI LAPTOP SUPPORT |
| 5055 | M: "Lee, Chun-Yi" <jlee@novell.com> | 5087 | M: "Lee, Chun-Yi" <jlee@suse.com> |
| 5056 | L: platform-driver-x86@vger.kernel.org | 5088 | L: platform-driver-x86@vger.kernel.org |
| 5057 | S: Maintained | 5089 | S: Maintained |
| 5058 | F: drivers/platform/x86/msi-laptop.c | 5090 | F: drivers/platform/x86/msi-laptop.c |
| @@ -5076,6 +5108,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git | |||
| 5076 | S: Maintained | 5108 | S: Maintained |
| 5077 | F: drivers/mmc/ | 5109 | F: drivers/mmc/ |
| 5078 | F: include/linux/mmc/ | 5110 | F: include/linux/mmc/ |
| 5111 | F: include/uapi/linux/mmc/ | ||
| 5079 | 5112 | ||
| 5080 | MULTIMEDIA CARD (MMC) ETC. OVER SPI | 5113 | MULTIMEDIA CARD (MMC) ETC. OVER SPI |
| 5081 | S: Orphan | 5114 | S: Orphan |
| @@ -5176,6 +5209,8 @@ S: Supported | |||
| 5176 | F: include/linux/netfilter* | 5209 | F: include/linux/netfilter* |
| 5177 | F: include/linux/netfilter/ | 5210 | F: include/linux/netfilter/ |
| 5178 | F: include/net/netfilter/ | 5211 | F: include/net/netfilter/ |
| 5212 | F: include/uapi/linux/netfilter* | ||
| 5213 | F: include/uapi/linux/netfilter/ | ||
| 5179 | F: net/*/netfilter.c | 5214 | F: net/*/netfilter.c |
| 5180 | F: net/*/netfilter/ | 5215 | F: net/*/netfilter/ |
| 5181 | F: net/netfilter/ | 5216 | F: net/netfilter/ |
| @@ -5194,8 +5229,8 @@ M: Ralf Baechle <ralf@linux-mips.org> | |||
| 5194 | L: linux-hams@vger.kernel.org | 5229 | L: linux-hams@vger.kernel.org |
| 5195 | W: http://www.linux-ax25.org/ | 5230 | W: http://www.linux-ax25.org/ |
| 5196 | S: Maintained | 5231 | S: Maintained |
| 5197 | F: include/linux/netrom.h | ||
| 5198 | F: include/net/netrom.h | 5232 | F: include/net/netrom.h |
| 5233 | F: include/uapi/linux/netrom.h | ||
| 5199 | F: net/netrom/ | 5234 | F: net/netrom/ |
| 5200 | 5235 | ||
| 5201 | NETWORK BLOCK DEVICE (NBD) | 5236 | NETWORK BLOCK DEVICE (NBD) |
| @@ -5204,6 +5239,7 @@ S: Maintained | |||
| 5204 | F: Documentation/blockdev/nbd.txt | 5239 | F: Documentation/blockdev/nbd.txt |
| 5205 | F: drivers/block/nbd.c | 5240 | F: drivers/block/nbd.c |
| 5206 | F: include/linux/nbd.h | 5241 | F: include/linux/nbd.h |
| 5242 | F: include/uapi/linux/nbd.h | ||
| 5207 | 5243 | ||
| 5208 | NETWORK DROP MONITOR | 5244 | NETWORK DROP MONITOR |
| 5209 | M: Neil Horman <nhorman@tuxdriver.com> | 5245 | M: Neil Horman <nhorman@tuxdriver.com> |
| @@ -5225,6 +5261,9 @@ F: include/net/ | |||
| 5225 | F: include/linux/in.h | 5261 | F: include/linux/in.h |
| 5226 | F: include/linux/net.h | 5262 | F: include/linux/net.h |
| 5227 | F: include/linux/netdevice.h | 5263 | F: include/linux/netdevice.h |
| 5264 | F: include/uapi/linux/in.h | ||
| 5265 | F: include/uapi/linux/net.h | ||
| 5266 | F: include/uapi/linux/netdevice.h | ||
| 5228 | 5267 | ||
| 5229 | NETWORKING [IPv4/IPv6] | 5268 | NETWORKING [IPv4/IPv6] |
| 5230 | M: "David S. Miller" <davem@davemloft.net> | 5269 | M: "David S. Miller" <davem@davemloft.net> |
| @@ -5270,6 +5309,7 @@ F: net/rfkill/ | |||
| 5270 | F: net/wireless/ | 5309 | F: net/wireless/ |
| 5271 | F: include/net/ieee80211* | 5310 | F: include/net/ieee80211* |
| 5272 | F: include/linux/wireless.h | 5311 | F: include/linux/wireless.h |
| 5312 | F: include/uapi/linux/wireless.h | ||
| 5273 | F: include/net/iw_handler.h | 5313 | F: include/net/iw_handler.h |
| 5274 | F: drivers/net/wireless/ | 5314 | F: drivers/net/wireless/ |
| 5275 | 5315 | ||
| @@ -5289,6 +5329,8 @@ F: include/linux/fcdevice.h | |||
| 5289 | F: include/linux/fddidevice.h | 5329 | F: include/linux/fddidevice.h |
| 5290 | F: include/linux/hippidevice.h | 5330 | F: include/linux/hippidevice.h |
| 5291 | F: include/linux/inetdevice.h | 5331 | F: include/linux/inetdevice.h |
| 5332 | F: include/uapi/linux/if_* | ||
| 5333 | F: include/uapi/linux/netdevice.h | ||
| 5292 | 5334 | ||
| 5293 | NETXEN (1/10) GbE SUPPORT | 5335 | NETXEN (1/10) GbE SUPPORT |
| 5294 | M: Sony Chacko <sony.chacko@qlogic.com> | 5336 | M: Sony Chacko <sony.chacko@qlogic.com> |
| @@ -5306,8 +5348,8 @@ L: linux-wireless@vger.kernel.org | |||
| 5306 | L: linux-nfc@lists.01.org (moderated for non-subscribers) | 5348 | L: linux-nfc@lists.01.org (moderated for non-subscribers) |
| 5307 | S: Maintained | 5349 | S: Maintained |
| 5308 | F: net/nfc/ | 5350 | F: net/nfc/ |
| 5309 | F: include/linux/nfc.h | ||
| 5310 | F: include/net/nfc/ | 5351 | F: include/net/nfc/ |
| 5352 | F: include/uapi/linux/nfc.h | ||
| 5311 | F: drivers/nfc/ | 5353 | F: drivers/nfc/ |
| 5312 | F: include/linux/platform_data/pn544.h | 5354 | F: include/linux/platform_data/pn544.h |
| 5313 | 5355 | ||
| @@ -5324,6 +5366,8 @@ F: net/sunrpc/ | |||
| 5324 | F: include/linux/lockd/ | 5366 | F: include/linux/lockd/ |
| 5325 | F: include/linux/nfs* | 5367 | F: include/linux/nfs* |
| 5326 | F: include/linux/sunrpc/ | 5368 | F: include/linux/sunrpc/ |
| 5369 | F: include/uapi/linux/nfs* | ||
| 5370 | F: include/uapi/linux/sunrpc/ | ||
| 5327 | 5371 | ||
| 5328 | NI5010 NETWORK DRIVER | 5372 | NI5010 NETWORK DRIVER |
| 5329 | M: Jan-Pascal van Best <janpascal@vanbest.org> | 5373 | M: Jan-Pascal van Best <janpascal@vanbest.org> |
| @@ -5470,8 +5514,7 @@ M: Benoît Cousson <b-cousson@ti.com> | |||
| 5470 | M: Paul Walmsley <paul@pwsan.com> | 5514 | M: Paul Walmsley <paul@pwsan.com> |
| 5471 | L: linux-omap@vger.kernel.org | 5515 | L: linux-omap@vger.kernel.org |
| 5472 | S: Maintained | 5516 | S: Maintained |
| 5473 | F: arch/arm/mach-omap2/omap_hwmod.c | 5517 | F: arch/arm/mach-omap2/omap_hwmod.* |
| 5474 | F: arch/arm/plat-omap/include/plat/omap_hwmod.h | ||
| 5475 | 5518 | ||
| 5476 | OMAP HWMOD DATA FOR OMAP4-BASED DEVICES | 5519 | OMAP HWMOD DATA FOR OMAP4-BASED DEVICES |
| 5477 | M: Benoît Cousson <b-cousson@ti.com> | 5520 | M: Benoît Cousson <b-cousson@ti.com> |
| @@ -5513,6 +5556,7 @@ M: Harald Welte <laforge@gnumonks.org> | |||
| 5513 | S: Maintained | 5556 | S: Maintained |
| 5514 | F: drivers/char/pcmcia/cm4000_cs.c | 5557 | F: drivers/char/pcmcia/cm4000_cs.c |
| 5515 | F: include/linux/cm4000_cs.h | 5558 | F: include/linux/cm4000_cs.h |
| 5559 | F: include/uapi/linux/cm4000_cs.h | ||
| 5516 | 5560 | ||
| 5517 | OMNIKEY CARDMAN 4040 DRIVER | 5561 | OMNIKEY CARDMAN 4040 DRIVER |
| 5518 | M: Harald Welte <laforge@gnumonks.org> | 5562 | M: Harald Welte <laforge@gnumonks.org> |
| @@ -5671,7 +5715,7 @@ S: Orphan | |||
| 5671 | F: drivers/parport/ | 5715 | F: drivers/parport/ |
| 5672 | F: include/linux/parport*.h | 5716 | F: include/linux/parport*.h |
| 5673 | F: drivers/char/ppdev.c | 5717 | F: drivers/char/ppdev.c |
| 5674 | F: include/linux/ppdev.h | 5718 | F: include/uapi/linux/ppdev.h |
| 5675 | 5719 | ||
| 5676 | PARAVIRT_OPS INTERFACE | 5720 | PARAVIRT_OPS INTERFACE |
| 5677 | M: Jeremy Fitzhardinge <jeremy@goop.org> | 5721 | M: Jeremy Fitzhardinge <jeremy@goop.org> |
| @@ -5812,11 +5856,11 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core | |||
| 5812 | S: Supported | 5856 | S: Supported |
| 5813 | F: kernel/events/* | 5857 | F: kernel/events/* |
| 5814 | F: include/linux/perf_event.h | 5858 | F: include/linux/perf_event.h |
| 5859 | F: include/uapi/linux/perf_event.h | ||
| 5815 | F: arch/*/kernel/perf_event*.c | 5860 | F: arch/*/kernel/perf_event*.c |
| 5816 | F: arch/*/kernel/*/perf_event*.c | 5861 | F: arch/*/kernel/*/perf_event*.c |
| 5817 | F: arch/*/kernel/*/*/perf_event*.c | 5862 | F: arch/*/kernel/*/*/perf_event*.c |
| 5818 | F: arch/*/include/asm/perf_event.h | 5863 | F: arch/*/include/asm/perf_event.h |
| 5819 | F: arch/*/lib/perf_event*.c | ||
| 5820 | F: arch/*/kernel/perf_callchain.c | 5864 | F: arch/*/kernel/perf_callchain.c |
| 5821 | F: tools/perf/ | 5865 | F: tools/perf/ |
| 5822 | 5866 | ||
| @@ -5825,6 +5869,7 @@ M: Christoph Hellwig <hch@infradead.org> | |||
| 5825 | L: linux-abi-devel@lists.sourceforge.net | 5869 | L: linux-abi-devel@lists.sourceforge.net |
| 5826 | S: Maintained | 5870 | S: Maintained |
| 5827 | F: include/linux/personality.h | 5871 | F: include/linux/personality.h |
| 5872 | F: include/uapi/linux/personality.h | ||
| 5828 | 5873 | ||
| 5829 | PHONET PROTOCOL | 5874 | PHONET PROTOCOL |
| 5830 | M: Remi Denis-Courmont <courmisch@gmail.com> | 5875 | M: Remi Denis-Courmont <courmisch@gmail.com> |
| @@ -5832,6 +5877,7 @@ S: Supported | |||
| 5832 | F: Documentation/networking/phonet.txt | 5877 | F: Documentation/networking/phonet.txt |
| 5833 | F: include/linux/phonet.h | 5878 | F: include/linux/phonet.h |
| 5834 | F: include/net/phonet/ | 5879 | F: include/net/phonet/ |
| 5880 | F: include/uapi/linux/phonet.h | ||
| 5835 | F: net/phonet/ | 5881 | F: net/phonet/ |
| 5836 | 5882 | ||
| 5837 | PHRAM MTD DRIVER | 5883 | PHRAM MTD DRIVER |
| @@ -5880,6 +5926,7 @@ M: Jiri Kosina <jkosina@suse.cz> | |||
| 5880 | S: Maintained | 5926 | S: Maintained |
| 5881 | F: drivers/block/pktcdvd.c | 5927 | F: drivers/block/pktcdvd.c |
| 5882 | F: include/linux/pktcdvd.h | 5928 | F: include/linux/pktcdvd.h |
| 5929 | F: include/uapi/linux/pktcdvd.h | ||
| 5883 | 5930 | ||
| 5884 | PKUNITY SOC DRIVERS | 5931 | PKUNITY SOC DRIVERS |
| 5885 | M: Guan Xuetao <gxt@mprc.pku.edu.cn> | 5932 | M: Guan Xuetao <gxt@mprc.pku.edu.cn> |
| @@ -5954,7 +6001,7 @@ PPP OVER ATM (RFC 2364) | |||
| 5954 | M: Mitchell Blank Jr <mitch@sfgoth.com> | 6001 | M: Mitchell Blank Jr <mitch@sfgoth.com> |
| 5955 | S: Maintained | 6002 | S: Maintained |
| 5956 | F: net/atm/pppoatm.c | 6003 | F: net/atm/pppoatm.c |
| 5957 | F: include/linux/atmppp.h | 6004 | F: include/uapi/linux/atmppp.h |
| 5958 | 6005 | ||
| 5959 | PPP OVER ETHERNET | 6006 | PPP OVER ETHERNET |
| 5960 | M: Michal Ostrowski <mostrows@earthlink.net> | 6007 | M: Michal Ostrowski <mostrows@earthlink.net> |
| @@ -5967,6 +6014,7 @@ M: James Chapman <jchapman@katalix.com> | |||
| 5967 | S: Maintained | 6014 | S: Maintained |
| 5968 | F: net/l2tp/l2tp_ppp.c | 6015 | F: net/l2tp/l2tp_ppp.c |
| 5969 | F: include/linux/if_pppol2tp.h | 6016 | F: include/linux/if_pppol2tp.h |
| 6017 | F: include/uapi/linux/if_pppol2tp.h | ||
| 5970 | 6018 | ||
| 5971 | PPS SUPPORT | 6019 | PPS SUPPORT |
| 5972 | M: Rodolfo Giometti <giometti@enneenne.com> | 6020 | M: Rodolfo Giometti <giometti@enneenne.com> |
| @@ -6064,6 +6112,7 @@ F: include/asm-generic/syscall.h | |||
| 6064 | F: include/linux/ptrace.h | 6112 | F: include/linux/ptrace.h |
| 6065 | F: include/linux/regset.h | 6113 | F: include/linux/regset.h |
| 6066 | F: include/linux/tracehook.h | 6114 | F: include/linux/tracehook.h |
| 6115 | F: include/uapi/linux/ptrace.h | ||
| 6067 | F: kernel/ptrace.c | 6116 | F: kernel/ptrace.c |
| 6068 | 6117 | ||
| 6069 | PVRUSB2 VIDEO4LINUX DRIVER | 6118 | PVRUSB2 VIDEO4LINUX DRIVER |
| @@ -6092,7 +6141,6 @@ T: git git://gitorious.org/linux-pwm/linux-pwm.git | |||
| 6092 | F: Documentation/pwm.txt | 6141 | F: Documentation/pwm.txt |
| 6093 | F: Documentation/devicetree/bindings/pwm/ | 6142 | F: Documentation/devicetree/bindings/pwm/ |
| 6094 | F: include/linux/pwm.h | 6143 | F: include/linux/pwm.h |
| 6095 | F: include/linux/of_pwm.h | ||
| 6096 | F: drivers/pwm/ | 6144 | F: drivers/pwm/ |
| 6097 | F: drivers/video/backlight/pwm_bl.c | 6145 | F: drivers/video/backlight/pwm_bl.c |
| 6098 | F: include/linux/pwm_backlight.h | 6146 | F: include/linux/pwm_backlight.h |
| @@ -6188,8 +6236,8 @@ M: Anders Larsen <al@alarsen.net> | |||
| 6188 | W: http://www.alarsen.net/linux/qnx4fs/ | 6236 | W: http://www.alarsen.net/linux/qnx4fs/ |
| 6189 | S: Maintained | 6237 | S: Maintained |
| 6190 | F: fs/qnx4/ | 6238 | F: fs/qnx4/ |
| 6191 | F: include/linux/qnx4_fs.h | 6239 | F: include/uapi/linux/qnx4_fs.h |
| 6192 | F: include/linux/qnxtypes.h | 6240 | F: include/uapi/linux/qnxtypes.h |
| 6193 | 6241 | ||
| 6194 | QT1010 MEDIA DRIVER | 6242 | QT1010 MEDIA DRIVER |
| 6195 | M: Antti Palosaari <crope@iki.fi> | 6243 | M: Antti Palosaari <crope@iki.fi> |
| @@ -6223,7 +6271,7 @@ M: Benjamin Herrenschmidt <benh@kernel.crashing.org> | |||
| 6223 | L: linux-fbdev@vger.kernel.org | 6271 | L: linux-fbdev@vger.kernel.org |
| 6224 | S: Maintained | 6272 | S: Maintained |
| 6225 | F: drivers/video/aty/radeon* | 6273 | F: drivers/video/aty/radeon* |
| 6226 | F: include/linux/radeonfb.h | 6274 | F: include/uapi/linux/radeonfb.h |
| 6227 | 6275 | ||
| 6228 | RADIOSHARK RADIO DRIVER | 6276 | RADIOSHARK RADIO DRIVER |
| 6229 | M: Hans de Goede <hdegoede@redhat.com> | 6277 | M: Hans de Goede <hdegoede@redhat.com> |
| @@ -6324,6 +6372,7 @@ S: Maintained | |||
| 6324 | F: Documentation/rtc.txt | 6372 | F: Documentation/rtc.txt |
| 6325 | F: drivers/rtc/ | 6373 | F: drivers/rtc/ |
| 6326 | F: include/linux/rtc.h | 6374 | F: include/linux/rtc.h |
| 6375 | F: include/uapi/linux/rtc.h | ||
| 6327 | 6376 | ||
| 6328 | REISERFS FILE SYSTEM | 6377 | REISERFS FILE SYSTEM |
| 6329 | L: reiserfs-devel@vger.kernel.org | 6378 | L: reiserfs-devel@vger.kernel.org |
| @@ -6378,8 +6427,8 @@ M: Ralf Baechle <ralf@linux-mips.org> | |||
| 6378 | L: linux-hams@vger.kernel.org | 6427 | L: linux-hams@vger.kernel.org |
| 6379 | W: http://www.linux-ax25.org/ | 6428 | W: http://www.linux-ax25.org/ |
| 6380 | S: Maintained | 6429 | S: Maintained |
| 6381 | F: include/linux/rose.h | ||
| 6382 | F: include/net/rose.h | 6430 | F: include/net/rose.h |
| 6431 | F: include/uapi/linux/rose.h | ||
| 6383 | F: net/rose/ | 6432 | F: net/rose/ |
| 6384 | 6433 | ||
| 6385 | RTL2830 MEDIA DRIVER | 6434 | RTL2830 MEDIA DRIVER |
| @@ -6556,6 +6605,8 @@ S: Supported | |||
| 6556 | F: include/linux/clocksource.h | 6605 | F: include/linux/clocksource.h |
| 6557 | F: include/linux/time.h | 6606 | F: include/linux/time.h |
| 6558 | F: include/linux/timex.h | 6607 | F: include/linux/timex.h |
| 6608 | F: include/uapi/linux/time.h | ||
| 6609 | F: include/uapi/linux/timex.h | ||
| 6559 | F: kernel/time/clocksource.c | 6610 | F: kernel/time/clocksource.c |
| 6560 | F: kernel/time/time*.c | 6611 | F: kernel/time/time*.c |
| 6561 | F: kernel/time/ntp.c | 6612 | F: kernel/time/ntp.c |
| @@ -6580,6 +6631,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core | |||
| 6580 | S: Maintained | 6631 | S: Maintained |
| 6581 | F: kernel/sched/ | 6632 | F: kernel/sched/ |
| 6582 | F: include/linux/sched.h | 6633 | F: include/linux/sched.h |
| 6634 | F: include/uapi/linux/sched.h | ||
| 6583 | 6635 | ||
| 6584 | SCORE ARCHITECTURE | 6636 | SCORE ARCHITECTURE |
| 6585 | M: Chen Liqin <liqin.chen@sunplusct.com> | 6637 | M: Chen Liqin <liqin.chen@sunplusct.com> |
| @@ -6733,7 +6785,7 @@ SENSABLE PHANTOM | |||
| 6733 | M: Jiri Slaby <jirislaby@gmail.com> | 6785 | M: Jiri Slaby <jirislaby@gmail.com> |
| 6734 | S: Maintained | 6786 | S: Maintained |
| 6735 | F: drivers/misc/phantom.c | 6787 | F: drivers/misc/phantom.c |
| 6736 | F: include/linux/phantom.h | 6788 | F: include/uapi/linux/phantom.h |
| 6737 | 6789 | ||
| 6738 | SERIAL ATA (SATA) SUBSYSTEM | 6790 | SERIAL ATA (SATA) SUBSYSTEM |
| 6739 | M: Jeff Garzik <jgarzik@pobox.com> | 6791 | M: Jeff Garzik <jgarzik@pobox.com> |
| @@ -6991,6 +7043,7 @@ L: linux-raid@vger.kernel.org | |||
| 6991 | S: Supported | 7043 | S: Supported |
| 6992 | F: drivers/md/ | 7044 | F: drivers/md/ |
| 6993 | F: include/linux/raid/ | 7045 | F: include/linux/raid/ |
| 7046 | F: include/uapi/linux/raid/ | ||
| 6994 | 7047 | ||
| 6995 | SONIC NETWORK DRIVER | 7048 | SONIC NETWORK DRIVER |
| 6996 | M: Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 7049 | M: Thomas Bogendoerfer <tsbogend@alpha.franken.de> |
| @@ -7031,6 +7084,7 @@ T: git git://git.alsa-project.org/alsa-kernel.git | |||
| 7031 | S: Maintained | 7084 | S: Maintained |
| 7032 | F: Documentation/sound/ | 7085 | F: Documentation/sound/ |
| 7033 | F: include/sound/ | 7086 | F: include/sound/ |
| 7087 | F: include/uapi/sound/ | ||
| 7034 | F: sound/ | 7088 | F: sound/ |
| 7035 | 7089 | ||
| 7036 | SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC) | 7090 | SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC) |
| @@ -7131,6 +7185,7 @@ S: Maintained | |||
| 7131 | F: Documentation/spi/ | 7185 | F: Documentation/spi/ |
| 7132 | F: drivers/spi/ | 7186 | F: drivers/spi/ |
| 7133 | F: include/linux/spi/ | 7187 | F: include/linux/spi/ |
| 7188 | F: include/uapi/linux/spi/ | ||
| 7134 | 7189 | ||
| 7135 | SPIDERNET NETWORK DRIVER for CELL | 7190 | SPIDERNET NETWORK DRIVER for CELL |
| 7136 | M: Ishizaki Kou <kou.ishizaki@toshiba.co.jp> | 7191 | M: Ishizaki Kou <kou.ishizaki@toshiba.co.jp> |
| @@ -7267,7 +7322,7 @@ F: drivers/staging/rtl8712/ | |||
| 7267 | STAGING - SILICON MOTION SM7XX FRAME BUFFER DRIVER | 7322 | STAGING - SILICON MOTION SM7XX FRAME BUFFER DRIVER |
| 7268 | M: Teddy Wang <teddy.wang@siliconmotion.com.cn> | 7323 | M: Teddy Wang <teddy.wang@siliconmotion.com.cn> |
| 7269 | S: Odd Fixes | 7324 | S: Odd Fixes |
| 7270 | F: drivers/staging/sm7xx/ | 7325 | F: drivers/staging/sm7xxfb/ |
| 7271 | 7326 | ||
| 7272 | STAGING - SOFTLOGIC 6x10 MPEG CODEC | 7327 | STAGING - SOFTLOGIC 6x10 MPEG CODEC |
| 7273 | M: Ben Collins <bcollins@bluecherry.net> | 7328 | M: Ben Collins <bcollins@bluecherry.net> |
| @@ -7285,7 +7340,7 @@ S: Odd Fixes | |||
| 7285 | F: drivers/staging/speakup/ | 7340 | F: drivers/staging/speakup/ |
| 7286 | 7341 | ||
| 7287 | STAGING - TI DSP BRIDGE DRIVERS | 7342 | STAGING - TI DSP BRIDGE DRIVERS |
| 7288 | M: Omar Ramirez Luna <omar.ramirez@ti.com> | 7343 | M: Omar Ramirez Luna <omar.ramirez@copitl.com> |
| 7289 | S: Odd Fixes | 7344 | S: Odd Fixes |
| 7290 | F: drivers/staging/tidspbridge/ | 7345 | F: drivers/staging/tidspbridge/ |
| 7291 | 7346 | ||
| @@ -7393,8 +7448,8 @@ TC CLASSIFIER | |||
| 7393 | M: Jamal Hadi Salim <jhs@mojatatu.com> | 7448 | M: Jamal Hadi Salim <jhs@mojatatu.com> |
| 7394 | L: netdev@vger.kernel.org | 7449 | L: netdev@vger.kernel.org |
| 7395 | S: Maintained | 7450 | S: Maintained |
| 7396 | F: include/linux/pkt_cls.h | ||
| 7397 | F: include/net/pkt_cls.h | 7451 | F: include/net/pkt_cls.h |
| 7452 | F: include/uapi/linux/pkt_cls.h | ||
| 7398 | F: net/sched/ | 7453 | F: net/sched/ |
| 7399 | 7454 | ||
| 7400 | TCP LOW PRIORITY MODULE | 7455 | TCP LOW PRIORITY MODULE |
| @@ -7486,6 +7541,7 @@ L: netdev@vger.kernel.org | |||
| 7486 | S: Supported | 7541 | S: Supported |
| 7487 | F: drivers/net/team/ | 7542 | F: drivers/net/team/ |
| 7488 | F: include/linux/if_team.h | 7543 | F: include/linux/if_team.h |
| 7544 | F: include/uapi/linux/if_team.h | ||
| 7489 | 7545 | ||
| 7490 | TECHNOTREND USB IR RECEIVER | 7546 | TECHNOTREND USB IR RECEIVER |
| 7491 | M: Sean Young <sean@mess.org> | 7547 | M: Sean Young <sean@mess.org> |
| @@ -7584,7 +7640,7 @@ L: netdev@vger.kernel.org (core kernel code) | |||
| 7584 | L: tipc-discussion@lists.sourceforge.net (user apps, general discussion) | 7640 | L: tipc-discussion@lists.sourceforge.net (user apps, general discussion) |
| 7585 | W: http://tipc.sourceforge.net/ | 7641 | W: http://tipc.sourceforge.net/ |
| 7586 | S: Maintained | 7642 | S: Maintained |
| 7587 | F: include/linux/tipc*.h | 7643 | F: include/uapi/linux/tipc*.h |
| 7588 | F: net/tipc/ | 7644 | F: net/tipc/ |
| 7589 | 7645 | ||
| 7590 | TILE ARCHITECTURE | 7646 | TILE ARCHITECTURE |
| @@ -7634,6 +7690,7 @@ W: http://www.buzzard.org.uk/toshiba/ | |||
| 7634 | S: Maintained | 7690 | S: Maintained |
| 7635 | F: drivers/char/toshiba.c | 7691 | F: drivers/char/toshiba.c |
| 7636 | F: include/linux/toshiba.h | 7692 | F: include/linux/toshiba.h |
| 7693 | F: include/uapi/linux/toshiba.h | ||
| 7637 | 7694 | ||
| 7638 | TMIO MMC DRIVER | 7695 | TMIO MMC DRIVER |
| 7639 | M: Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 7696 | M: Guennadi Liakhovetski <g.liakhovetski@gmx.de> |
| @@ -7701,6 +7758,9 @@ F: drivers/tty/serial/serial_core.c | |||
| 7701 | F: include/linux/serial_core.h | 7758 | F: include/linux/serial_core.h |
| 7702 | F: include/linux/serial.h | 7759 | F: include/linux/serial.h |
| 7703 | F: include/linux/tty.h | 7760 | F: include/linux/tty.h |
| 7761 | F: include/uapi/linux/serial_core.h | ||
| 7762 | F: include/uapi/linux/serial.h | ||
| 7763 | F: include/uapi/linux/tty.h | ||
| 7704 | 7764 | ||
| 7705 | TUA9001 MEDIA DRIVER | 7765 | TUA9001 MEDIA DRIVER |
| 7706 | M: Antti Palosaari <crope@iki.fi> | 7766 | M: Antti Palosaari <crope@iki.fi> |
| @@ -7780,7 +7840,7 @@ M: David Herrmann <dh.herrmann@googlemail.com> | |||
| 7780 | L: linux-input@vger.kernel.org | 7840 | L: linux-input@vger.kernel.org |
| 7781 | S: Maintained | 7841 | S: Maintained |
| 7782 | F: drivers/hid/uhid.c | 7842 | F: drivers/hid/uhid.c |
| 7783 | F: include/linux/uhid.h | 7843 | F: include/uapi/linux/uhid.h |
| 7784 | 7844 | ||
| 7785 | ULTRA-WIDEBAND (UWB) SUBSYSTEM: | 7845 | ULTRA-WIDEBAND (UWB) SUBSYSTEM: |
| 7786 | L: linux-usb@vger.kernel.org | 7846 | L: linux-usb@vger.kernel.org |
| @@ -7809,6 +7869,7 @@ S: Maintained | |||
| 7809 | F: Documentation/cdrom/ | 7869 | F: Documentation/cdrom/ |
| 7810 | F: drivers/cdrom/cdrom.c | 7870 | F: drivers/cdrom/cdrom.c |
| 7811 | F: include/linux/cdrom.h | 7871 | F: include/linux/cdrom.h |
| 7872 | F: include/uapi/linux/cdrom.h | ||
| 7812 | 7873 | ||
| 7813 | UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER | 7874 | UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER |
| 7814 | M: Vinayak Holikatti <vinholikatti@gmail.com> | 7875 | M: Vinayak Holikatti <vinholikatti@gmail.com> |
| @@ -7826,7 +7887,7 @@ T: git git://git.infradead.org/ubi-2.6.git | |||
| 7826 | S: Maintained | 7887 | S: Maintained |
| 7827 | F: drivers/mtd/ubi/ | 7888 | F: drivers/mtd/ubi/ |
| 7828 | F: include/linux/mtd/ubi.h | 7889 | F: include/linux/mtd/ubi.h |
| 7829 | F: include/mtd/ubi-user.h | 7890 | F: include/uapi/mtd/ubi-user.h |
| 7830 | 7891 | ||
| 7831 | UNSORTED BLOCK IMAGES (UBI) Fastmap | 7892 | UNSORTED BLOCK IMAGES (UBI) Fastmap |
| 7832 | M: Richard Weinberger <richard@nod.at> | 7893 | M: Richard Weinberger <richard@nod.at> |
| @@ -7860,7 +7921,7 @@ M: Oliver Neukum <oliver@neukum.org> | |||
| 7860 | L: linux-usb@vger.kernel.org | 7921 | L: linux-usb@vger.kernel.org |
| 7861 | S: Maintained | 7922 | S: Maintained |
| 7862 | F: drivers/net/usb/cdc_*.c | 7923 | F: drivers/net/usb/cdc_*.c |
| 7863 | F: include/linux/usb/cdc.h | 7924 | F: include/uapi/linux/usb/cdc.h |
| 7864 | 7925 | ||
| 7865 | USB CYPRESS C67X00 DRIVER | 7926 | USB CYPRESS C67X00 DRIVER |
| 7866 | M: Peter Korsgaard <jacmet@sunsite.dk> | 7927 | M: Peter Korsgaard <jacmet@sunsite.dk> |
| @@ -8181,6 +8242,7 @@ S: Maintained | |||
| 8181 | F: Documentation/vfio.txt | 8242 | F: Documentation/vfio.txt |
| 8182 | F: drivers/vfio/ | 8243 | F: drivers/vfio/ |
| 8183 | F: include/linux/vfio.h | 8244 | F: include/linux/vfio.h |
| 8245 | F: include/uapi/linux/vfio.h | ||
| 8184 | 8246 | ||
| 8185 | VIDEOBUF2 FRAMEWORK | 8247 | VIDEOBUF2 FRAMEWORK |
| 8186 | M: Pawel Osciak <pawel@osciak.com> | 8248 | M: Pawel Osciak <pawel@osciak.com> |
| @@ -8197,6 +8259,7 @@ L: virtualization@lists.linux-foundation.org | |||
| 8197 | S: Maintained | 8259 | S: Maintained |
| 8198 | F: drivers/char/virtio_console.c | 8260 | F: drivers/char/virtio_console.c |
| 8199 | F: include/linux/virtio_console.h | 8261 | F: include/linux/virtio_console.h |
| 8262 | F: include/uapi/linux/virtio_console.h | ||
| 8200 | 8263 | ||
| 8201 | VIRTIO CORE, NET AND BLOCK DRIVERS | 8264 | VIRTIO CORE, NET AND BLOCK DRIVERS |
| 8202 | M: Rusty Russell <rusty@rustcorp.com.au> | 8265 | M: Rusty Russell <rusty@rustcorp.com.au> |
| @@ -8215,7 +8278,7 @@ L: virtualization@lists.linux-foundation.org | |||
| 8215 | L: netdev@vger.kernel.org | 8278 | L: netdev@vger.kernel.org |
| 8216 | S: Maintained | 8279 | S: Maintained |
| 8217 | F: drivers/vhost/ | 8280 | F: drivers/vhost/ |
| 8218 | F: include/linux/vhost.h | 8281 | F: include/uapi/linux/vhost.h |
| 8219 | 8282 | ||
| 8220 | VIA RHINE NETWORK DRIVER | 8283 | VIA RHINE NETWORK DRIVER |
| 8221 | M: Roger Luethi <rl@hellgate.ch> | 8284 | M: Roger Luethi <rl@hellgate.ch> |
| @@ -8355,6 +8418,7 @@ S: Maintained | |||
| 8355 | F: Documentation/watchdog/ | 8418 | F: Documentation/watchdog/ |
| 8356 | F: drivers/watchdog/ | 8419 | F: drivers/watchdog/ |
| 8357 | F: include/linux/watchdog.h | 8420 | F: include/linux/watchdog.h |
| 8421 | F: include/uapi/linux/watchdog.h | ||
| 8358 | 8422 | ||
| 8359 | WD7000 SCSI DRIVER | 8423 | WD7000 SCSI DRIVER |
| 8360 | M: Miroslav Zagorac <zaga@fly.cc.fer.hr> | 8424 | M: Miroslav Zagorac <zaga@fly.cc.fer.hr> |
| @@ -8380,9 +8444,9 @@ L: wimax@linuxwimax.org | |||
| 8380 | S: Supported | 8444 | S: Supported |
| 8381 | W: http://linuxwimax.org | 8445 | W: http://linuxwimax.org |
| 8382 | F: Documentation/wimax/README.wimax | 8446 | F: Documentation/wimax/README.wimax |
| 8383 | F: include/linux/wimax.h | ||
| 8384 | F: include/linux/wimax/debug.h | 8447 | F: include/linux/wimax/debug.h |
| 8385 | F: include/net/wimax.h | 8448 | F: include/net/wimax.h |
| 8449 | F: include/uapi/linux/wimax.h | ||
| 8386 | F: net/wimax/ | 8450 | F: net/wimax/ |
| 8387 | 8451 | ||
| 8388 | WISTRON LAPTOP BUTTON DRIVER | 8452 | WISTRON LAPTOP BUTTON DRIVER |
| @@ -8468,7 +8532,7 @@ F: Documentation/x86/ | |||
| 8468 | F: arch/x86/ | 8532 | F: arch/x86/ |
| 8469 | 8533 | ||
| 8470 | X86 PLATFORM DRIVERS | 8534 | X86 PLATFORM DRIVERS |
| 8471 | M: Matthew Garrett <mjg@redhat.com> | 8535 | M: Matthew Garrett <matthew.garrett@nebula.com> |
| 8472 | L: platform-driver-x86@vger.kernel.org | 8536 | L: platform-driver-x86@vger.kernel.org |
| 8473 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86.git | 8537 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86.git |
| 8474 | S: Maintained | 8538 | S: Maintained |
| @@ -8500,6 +8564,7 @@ F: drivers/*/xen-*front.c | |||
| 8500 | F: drivers/xen/ | 8564 | F: drivers/xen/ |
| 8501 | F: arch/x86/include/asm/xen/ | 8565 | F: arch/x86/include/asm/xen/ |
| 8502 | F: include/xen/ | 8566 | F: include/xen/ |
| 8567 | F: include/uapi/xen/ | ||
| 8503 | 8568 | ||
| 8504 | XEN HYPERVISOR ARM | 8569 | XEN HYPERVISOR ARM |
| 8505 | M: Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 8570 | M: Stefano Stabellini <stefano.stabellini@eu.citrix.com> |
| @@ -1,7 +1,7 @@ | |||
| 1 | VERSION = 3 | 1 | VERSION = 3 |
| 2 | PATCHLEVEL = 8 | 2 | PATCHLEVEL = 8 |
| 3 | SUBLEVEL = 0 | 3 | SUBLEVEL = 0 |
| 4 | EXTRAVERSION = -rc2 | 4 | EXTRAVERSION = -rc4 |
| 5 | NAME = Terrified Chipmunk | 5 | NAME = Terrified Chipmunk |
| 6 | 6 | ||
| 7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/alpha/include/asm/parport.h b/arch/alpha/include/asm/parport.h index c5ee7cbb2fcd..6abd0af11f13 100644 --- a/arch/alpha/include/asm/parport.h +++ b/arch/alpha/include/asm/parport.h | |||
| @@ -9,8 +9,8 @@ | |||
| 9 | #ifndef _ASM_AXP_PARPORT_H | 9 | #ifndef _ASM_AXP_PARPORT_H |
| 10 | #define _ASM_AXP_PARPORT_H 1 | 10 | #define _ASM_AXP_PARPORT_H 1 |
| 11 | 11 | ||
| 12 | static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); | 12 | static int parport_pc_find_isa_ports (int autoirq, int autodma); |
| 13 | static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) | 13 | static int parport_pc_find_nonpci_ports (int autoirq, int autodma) |
| 14 | { | 14 | { |
| 15 | return parport_pc_find_isa_ports (autoirq, autodma); | 15 | return parport_pc_find_isa_ports (autoirq, autodma); |
| 16 | } | 16 | } |
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index ef757147cbf9..edb4e0097b75 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c | |||
| @@ -59,13 +59,13 @@ struct pci_controller *pci_isa_hose; | |||
| 59 | * Quirks. | 59 | * Quirks. |
| 60 | */ | 60 | */ |
| 61 | 61 | ||
| 62 | static void __devinit quirk_isa_bridge(struct pci_dev *dev) | 62 | static void quirk_isa_bridge(struct pci_dev *dev) |
| 63 | { | 63 | { |
| 64 | dev->class = PCI_CLASS_BRIDGE_ISA << 8; | 64 | dev->class = PCI_CLASS_BRIDGE_ISA << 8; |
| 65 | } | 65 | } |
| 66 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, quirk_isa_bridge); | 66 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, quirk_isa_bridge); |
| 67 | 67 | ||
| 68 | static void __devinit quirk_cypress(struct pci_dev *dev) | 68 | static void quirk_cypress(struct pci_dev *dev) |
| 69 | { | 69 | { |
| 70 | /* The Notorious Cy82C693 chip. */ | 70 | /* The Notorious Cy82C693 chip. */ |
| 71 | 71 | ||
| @@ -104,7 +104,7 @@ static void __devinit quirk_cypress(struct pci_dev *dev) | |||
| 104 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, quirk_cypress); | 104 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, quirk_cypress); |
| 105 | 105 | ||
| 106 | /* Called for each device after PCI setup is done. */ | 106 | /* Called for each device after PCI setup is done. */ |
| 107 | static void __devinit pcibios_fixup_final(struct pci_dev *dev) | 107 | static void pcibios_fixup_final(struct pci_dev *dev) |
| 108 | { | 108 | { |
| 109 | unsigned int class = dev->class >> 8; | 109 | unsigned int class = dev->class >> 8; |
| 110 | 110 | ||
| @@ -198,8 +198,7 @@ subsys_initcall(pcibios_init); | |||
| 198 | #ifdef ALPHA_RESTORE_SRM_SETUP | 198 | #ifdef ALPHA_RESTORE_SRM_SETUP |
| 199 | static struct pdev_srm_saved_conf *srm_saved_configs; | 199 | static struct pdev_srm_saved_conf *srm_saved_configs; |
| 200 | 200 | ||
| 201 | void __devinit | 201 | void pdev_save_srm_config(struct pci_dev *dev) |
| 202 | pdev_save_srm_config(struct pci_dev *dev) | ||
| 203 | { | 202 | { |
| 204 | struct pdev_srm_saved_conf *tmp; | 203 | struct pdev_srm_saved_conf *tmp; |
| 205 | static int printed = 0; | 204 | static int printed = 0; |
| @@ -241,8 +240,7 @@ pci_restore_srm_config(void) | |||
| 241 | } | 240 | } |
| 242 | #endif | 241 | #endif |
| 243 | 242 | ||
| 244 | void __devinit | 243 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 245 | pcibios_fixup_bus(struct pci_bus *bus) | ||
| 246 | { | 244 | { |
| 247 | struct pci_dev *dev = bus->self; | 245 | struct pci_dev *dev = bus->self; |
| 248 | 246 | ||
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index a41ad90a97a6..9603bc234b47 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
| @@ -68,7 +68,7 @@ enum ipi_message_type { | |||
| 68 | }; | 68 | }; |
| 69 | 69 | ||
| 70 | /* Set to a secondary's cpuid when it comes online. */ | 70 | /* Set to a secondary's cpuid when it comes online. */ |
| 71 | static int smp_secondary_alive __devinitdata = 0; | 71 | static int smp_secondary_alive = 0; |
| 72 | 72 | ||
| 73 | int smp_num_probed; /* Internal processor count */ | 73 | int smp_num_probed; /* Internal processor count */ |
| 74 | int smp_num_cpus = 1; /* Number that came online. */ | 74 | int smp_num_cpus = 1; /* Number that came online. */ |
| @@ -172,7 +172,7 @@ smp_callin(void) | |||
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | /* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */ | 174 | /* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */ |
| 175 | static int __devinit | 175 | static int |
| 176 | wait_for_txrdy (unsigned long cpumask) | 176 | wait_for_txrdy (unsigned long cpumask) |
| 177 | { | 177 | { |
| 178 | unsigned long timeout; | 178 | unsigned long timeout; |
| @@ -468,7 +468,7 @@ smp_prepare_cpus(unsigned int max_cpus) | |||
| 468 | smp_num_cpus = smp_num_probed; | 468 | smp_num_cpus = smp_num_probed; |
| 469 | } | 469 | } |
| 470 | 470 | ||
| 471 | void __devinit | 471 | void |
| 472 | smp_prepare_boot_cpu(void) | 472 | smp_prepare_boot_cpu(void) |
| 473 | { | 473 | { |
| 474 | } | 474 | } |
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c index 2533db280d9b..5cf4a481b8c5 100644 --- a/arch/alpha/kernel/sys_titan.c +++ b/arch/alpha/kernel/sys_titan.c | |||
| @@ -303,7 +303,7 @@ titan_late_init(void) | |||
| 303 | 303 | ||
| 304 | } | 304 | } |
| 305 | 305 | ||
| 306 | static int __devinit | 306 | static int |
| 307 | titan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 307 | titan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
| 308 | { | 308 | { |
| 309 | u8 intline; | 309 | u8 intline; |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f95ba14ae3d0..67874b82a4ed 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -371,7 +371,6 @@ config ARCH_CNS3XXX | |||
| 371 | config ARCH_CLPS711X | 371 | config ARCH_CLPS711X |
| 372 | bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" | 372 | bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" |
| 373 | select ARCH_REQUIRE_GPIOLIB | 373 | select ARCH_REQUIRE_GPIOLIB |
| 374 | select ARCH_USES_GETTIMEOFFSET | ||
| 375 | select AUTO_ZRELADDR | 374 | select AUTO_ZRELADDR |
| 376 | select CLKDEV_LOOKUP | 375 | select CLKDEV_LOOKUP |
| 377 | select COMMON_CLK | 376 | select COMMON_CLK |
| @@ -1230,6 +1229,7 @@ config ARM_ERRATA_430973 | |||
| 1230 | config ARM_ERRATA_458693 | 1229 | config ARM_ERRATA_458693 |
| 1231 | bool "ARM errata: Processor deadlock when a false hazard is created" | 1230 | bool "ARM errata: Processor deadlock when a false hazard is created" |
| 1232 | depends on CPU_V7 | 1231 | depends on CPU_V7 |
| 1232 | depends on !ARCH_MULTIPLATFORM | ||
| 1233 | help | 1233 | help |
| 1234 | This option enables the workaround for the 458693 Cortex-A8 (r2p0) | 1234 | This option enables the workaround for the 458693 Cortex-A8 (r2p0) |
| 1235 | erratum. For very specific sequences of memory operations, it is | 1235 | erratum. For very specific sequences of memory operations, it is |
| @@ -1243,6 +1243,7 @@ config ARM_ERRATA_458693 | |||
| 1243 | config ARM_ERRATA_460075 | 1243 | config ARM_ERRATA_460075 |
| 1244 | bool "ARM errata: Data written to the L2 cache can be overwritten with stale data" | 1244 | bool "ARM errata: Data written to the L2 cache can be overwritten with stale data" |
| 1245 | depends on CPU_V7 | 1245 | depends on CPU_V7 |
| 1246 | depends on !ARCH_MULTIPLATFORM | ||
| 1246 | help | 1247 | help |
| 1247 | This option enables the workaround for the 460075 Cortex-A8 (r2p0) | 1248 | This option enables the workaround for the 460075 Cortex-A8 (r2p0) |
| 1248 | erratum. Any asynchronous access to the L2 cache may encounter a | 1249 | erratum. Any asynchronous access to the L2 cache may encounter a |
| @@ -1255,6 +1256,7 @@ config ARM_ERRATA_460075 | |||
| 1255 | config ARM_ERRATA_742230 | 1256 | config ARM_ERRATA_742230 |
| 1256 | bool "ARM errata: DMB operation may be faulty" | 1257 | bool "ARM errata: DMB operation may be faulty" |
| 1257 | depends on CPU_V7 && SMP | 1258 | depends on CPU_V7 && SMP |
| 1259 | depends on !ARCH_MULTIPLATFORM | ||
| 1258 | help | 1260 | help |
| 1259 | This option enables the workaround for the 742230 Cortex-A9 | 1261 | This option enables the workaround for the 742230 Cortex-A9 |
| 1260 | (r1p0..r2p2) erratum. Under rare circumstances, a DMB instruction | 1262 | (r1p0..r2p2) erratum. Under rare circumstances, a DMB instruction |
| @@ -1267,6 +1269,7 @@ config ARM_ERRATA_742230 | |||
| 1267 | config ARM_ERRATA_742231 | 1269 | config ARM_ERRATA_742231 |
| 1268 | bool "ARM errata: Incorrect hazard handling in the SCU may lead to data corruption" | 1270 | bool "ARM errata: Incorrect hazard handling in the SCU may lead to data corruption" |
| 1269 | depends on CPU_V7 && SMP | 1271 | depends on CPU_V7 && SMP |
| 1272 | depends on !ARCH_MULTIPLATFORM | ||
| 1270 | help | 1273 | help |
| 1271 | This option enables the workaround for the 742231 Cortex-A9 | 1274 | This option enables the workaround for the 742231 Cortex-A9 |
| 1272 | (r2p0..r2p2) erratum. Under certain conditions, specific to the | 1275 | (r2p0..r2p2) erratum. Under certain conditions, specific to the |
| @@ -1317,6 +1320,7 @@ config PL310_ERRATA_727915 | |||
| 1317 | config ARM_ERRATA_743622 | 1320 | config ARM_ERRATA_743622 |
| 1318 | bool "ARM errata: Faulty hazard checking in the Store Buffer may lead to data corruption" | 1321 | bool "ARM errata: Faulty hazard checking in the Store Buffer may lead to data corruption" |
| 1319 | depends on CPU_V7 | 1322 | depends on CPU_V7 |
| 1323 | depends on !ARCH_MULTIPLATFORM | ||
| 1320 | help | 1324 | help |
| 1321 | This option enables the workaround for the 743622 Cortex-A9 | 1325 | This option enables the workaround for the 743622 Cortex-A9 |
| 1322 | (r2p*) erratum. Under very rare conditions, a faulty | 1326 | (r2p*) erratum. Under very rare conditions, a faulty |
| @@ -1330,6 +1334,7 @@ config ARM_ERRATA_743622 | |||
| 1330 | config ARM_ERRATA_751472 | 1334 | config ARM_ERRATA_751472 |
| 1331 | bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation" | 1335 | bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation" |
| 1332 | depends on CPU_V7 | 1336 | depends on CPU_V7 |
| 1337 | depends on !ARCH_MULTIPLATFORM | ||
| 1333 | help | 1338 | help |
| 1334 | This option enables the workaround for the 751472 Cortex-A9 (prior | 1339 | This option enables the workaround for the 751472 Cortex-A9 (prior |
| 1335 | to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the | 1340 | to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the |
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index e44da40d984f..5ebb44fe826a 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
| @@ -155,6 +155,7 @@ dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \ | |||
| 155 | dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb | 155 | dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb |
| 156 | 156 | ||
| 157 | targets += dtbs | 157 | targets += dtbs |
| 158 | targets += $(dtb-y) | ||
| 158 | endif | 159 | endif |
| 159 | 160 | ||
| 160 | # *.dtb used to be generated in the directory above. Clean out the | 161 | # *.dtb used to be generated in the directory above. Clean out the |
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index cf6c48a09eac..4c0abe85405f 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi | |||
| @@ -50,17 +50,19 @@ | |||
| 50 | ranges; | 50 | ranges; |
| 51 | 51 | ||
| 52 | serial@d0012000 { | 52 | serial@d0012000 { |
| 53 | compatible = "ns16550"; | 53 | compatible = "snps,dw-apb-uart"; |
| 54 | reg = <0xd0012000 0x100>; | 54 | reg = <0xd0012000 0x100>; |
| 55 | reg-shift = <2>; | 55 | reg-shift = <2>; |
| 56 | interrupts = <41>; | 56 | interrupts = <41>; |
| 57 | reg-io-width = <4>; | ||
| 57 | status = "disabled"; | 58 | status = "disabled"; |
| 58 | }; | 59 | }; |
| 59 | serial@d0012100 { | 60 | serial@d0012100 { |
| 60 | compatible = "ns16550"; | 61 | compatible = "snps,dw-apb-uart"; |
| 61 | reg = <0xd0012100 0x100>; | 62 | reg = <0xd0012100 0x100>; |
| 62 | reg-shift = <2>; | 63 | reg-shift = <2>; |
| 63 | interrupts = <42>; | 64 | interrupts = <42>; |
| 65 | reg-io-width = <4>; | ||
| 64 | status = "disabled"; | 66 | status = "disabled"; |
| 65 | }; | 67 | }; |
| 66 | 68 | ||
diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi index c45c7b4dc352..271855a6e224 100644 --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi | |||
| @@ -34,7 +34,14 @@ | |||
| 34 | reg = <0>; | 34 | reg = <0>; |
| 35 | clocks = <&cpuclk 0>; | 35 | clocks = <&cpuclk 0>; |
| 36 | }; | 36 | }; |
| 37 | } | 37 | |
| 38 | cpu@1 { | ||
| 39 | device_type = "cpu"; | ||
| 40 | compatible = "marvell,sheeva-v7"; | ||
| 41 | reg = <1>; | ||
| 42 | clocks = <&cpuclk 1>; | ||
| 43 | }; | ||
| 44 | }; | ||
| 38 | 45 | ||
| 39 | soc { | 46 | soc { |
| 40 | pinctrl { | 47 | pinctrl { |
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi index a2aee5707377..1c1937dbce73 100644 --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi | |||
| @@ -85,5 +85,13 @@ | |||
| 85 | #interrupts-cells = <2>; | 85 | #interrupts-cells = <2>; |
| 86 | interrupts = <24>; | 86 | interrupts = <24>; |
| 87 | }; | 87 | }; |
| 88 | |||
| 89 | ethernet@d0034000 { | ||
| 90 | compatible = "marvell,armada-370-neta"; | ||
| 91 | reg = <0xd0034000 0x2500>; | ||
| 92 | interrupts = <14>; | ||
| 93 | clocks = <&gateclk 1>; | ||
| 94 | status = "disabled"; | ||
| 95 | }; | ||
| 88 | }; | 96 | }; |
| 89 | }; | 97 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi index da03a129243a..4905cf3a5ef8 100644 --- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi | |||
| @@ -100,5 +100,13 @@ | |||
| 100 | #interrupts-cells = <2>; | 100 | #interrupts-cells = <2>; |
| 101 | interrupts = <24>; | 101 | interrupts = <24>; |
| 102 | }; | 102 | }; |
| 103 | |||
| 104 | ethernet@d0034000 { | ||
| 105 | compatible = "marvell,armada-370-neta"; | ||
| 106 | reg = <0xd0034000 0x2500>; | ||
| 107 | interrupts = <14>; | ||
| 108 | clocks = <&gateclk 1>; | ||
| 109 | status = "disabled"; | ||
| 110 | }; | ||
| 103 | }; | 111 | }; |
| 104 | }; | 112 | }; |
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi index 367aa3f94912..2e37ef101c90 100644 --- a/arch/arm/boot/dts/armada-xp.dtsi +++ b/arch/arm/boot/dts/armada-xp.dtsi | |||
| @@ -42,17 +42,19 @@ | |||
| 42 | 42 | ||
| 43 | soc { | 43 | soc { |
| 44 | serial@d0012200 { | 44 | serial@d0012200 { |
| 45 | compatible = "ns16550"; | 45 | compatible = "snps,dw-apb-uart"; |
| 46 | reg = <0xd0012200 0x100>; | 46 | reg = <0xd0012200 0x100>; |
| 47 | reg-shift = <2>; | 47 | reg-shift = <2>; |
| 48 | interrupts = <43>; | 48 | interrupts = <43>; |
| 49 | reg-io-width = <4>; | ||
| 49 | status = "disabled"; | 50 | status = "disabled"; |
| 50 | }; | 51 | }; |
| 51 | serial@d0012300 { | 52 | serial@d0012300 { |
| 52 | compatible = "ns16550"; | 53 | compatible = "snps,dw-apb-uart"; |
| 53 | reg = <0xd0012300 0x100>; | 54 | reg = <0xd0012300 0x100>; |
| 54 | reg-shift = <2>; | 55 | reg-shift = <2>; |
| 55 | interrupts = <44>; | 56 | interrupts = <44>; |
| 57 | reg-io-width = <4>; | ||
| 56 | status = "disabled"; | 58 | status = "disabled"; |
| 57 | }; | 59 | }; |
| 58 | 60 | ||
| @@ -93,14 +95,6 @@ | |||
| 93 | status = "disabled"; | 95 | status = "disabled"; |
| 94 | }; | 96 | }; |
| 95 | 97 | ||
| 96 | ethernet@d0034000 { | ||
| 97 | compatible = "marvell,armada-370-neta"; | ||
| 98 | reg = <0xd0034000 0x2500>; | ||
| 99 | interrupts = <14>; | ||
| 100 | clocks = <&gateclk 1>; | ||
| 101 | status = "disabled"; | ||
| 102 | }; | ||
| 103 | |||
| 104 | xor@d0060900 { | 98 | xor@d0060900 { |
| 105 | compatible = "marvell,orion-xor"; | 99 | compatible = "marvell,orion-xor"; |
| 106 | reg = <0xd0060900 0x100 | 100 | reg = <0xd0060900 0x100 |
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi index 68bccf41a2c6..cb7bcc51608d 100644 --- a/arch/arm/boot/dts/at91sam9260.dtsi +++ b/arch/arm/boot/dts/at91sam9260.dtsi | |||
| @@ -306,6 +306,22 @@ | |||
| 306 | }; | 306 | }; |
| 307 | }; | 307 | }; |
| 308 | 308 | ||
| 309 | ssc0 { | ||
| 310 | pinctrl_ssc0_tx: ssc0_tx-0 { | ||
| 311 | atmel,pins = | ||
| 312 | <1 16 0x1 0x0 /* PB16 periph A */ | ||
| 313 | 1 17 0x1 0x0 /* PB17 periph A */ | ||
| 314 | 1 18 0x1 0x0>; /* PB18 periph A */ | ||
| 315 | }; | ||
| 316 | |||
| 317 | pinctrl_ssc0_rx: ssc0_rx-0 { | ||
| 318 | atmel,pins = | ||
| 319 | <1 19 0x1 0x0 /* PB19 periph A */ | ||
| 320 | 1 20 0x1 0x0 /* PB20 periph A */ | ||
| 321 | 1 21 0x1 0x0>; /* PB21 periph A */ | ||
| 322 | }; | ||
| 323 | }; | ||
| 324 | |||
| 309 | pioA: gpio@fffff400 { | 325 | pioA: gpio@fffff400 { |
| 310 | compatible = "atmel,at91rm9200-gpio"; | 326 | compatible = "atmel,at91rm9200-gpio"; |
| 311 | reg = <0xfffff400 0x200>; | 327 | reg = <0xfffff400 0x200>; |
| @@ -450,6 +466,8 @@ | |||
| 450 | compatible = "atmel,at91rm9200-ssc"; | 466 | compatible = "atmel,at91rm9200-ssc"; |
| 451 | reg = <0xfffbc000 0x4000>; | 467 | reg = <0xfffbc000 0x4000>; |
| 452 | interrupts = <14 4 5>; | 468 | interrupts = <14 4 5>; |
| 469 | pinctrl-names = "default"; | ||
| 470 | pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; | ||
| 453 | status = "disabled"; | 471 | status = "disabled"; |
| 454 | }; | 472 | }; |
| 455 | 473 | ||
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi index 32ec62cf5385..271d4de026e9 100644 --- a/arch/arm/boot/dts/at91sam9263.dtsi +++ b/arch/arm/boot/dts/at91sam9263.dtsi | |||
| @@ -271,6 +271,38 @@ | |||
| 271 | }; | 271 | }; |
| 272 | }; | 272 | }; |
| 273 | 273 | ||
| 274 | ssc0 { | ||
| 275 | pinctrl_ssc0_tx: ssc0_tx-0 { | ||
| 276 | atmel,pins = | ||
| 277 | <1 0 0x2 0x0 /* PB0 periph B */ | ||
| 278 | 1 1 0x2 0x0 /* PB1 periph B */ | ||
| 279 | 1 2 0x2 0x0>; /* PB2 periph B */ | ||
| 280 | }; | ||
| 281 | |||
| 282 | pinctrl_ssc0_rx: ssc0_rx-0 { | ||
| 283 | atmel,pins = | ||
| 284 | <1 3 0x2 0x0 /* PB3 periph B */ | ||
| 285 | 1 4 0x2 0x0 /* PB4 periph B */ | ||
| 286 | 1 5 0x2 0x0>; /* PB5 periph B */ | ||
| 287 | }; | ||
| 288 | }; | ||
| 289 | |||
| 290 | ssc1 { | ||
| 291 | pinctrl_ssc1_tx: ssc1_tx-0 { | ||
| 292 | atmel,pins = | ||
| 293 | <1 6 0x1 0x0 /* PB6 periph A */ | ||
| 294 | 1 7 0x1 0x0 /* PB7 periph A */ | ||
| 295 | 1 8 0x1 0x0>; /* PB8 periph A */ | ||
| 296 | }; | ||
| 297 | |||
| 298 | pinctrl_ssc1_rx: ssc1_rx-0 { | ||
| 299 | atmel,pins = | ||
| 300 | <1 9 0x1 0x0 /* PB9 periph A */ | ||
| 301 | 1 10 0x1 0x0 /* PB10 periph A */ | ||
| 302 | 1 11 0x1 0x0>; /* PB11 periph A */ | ||
| 303 | }; | ||
| 304 | }; | ||
| 305 | |||
| 274 | pioA: gpio@fffff200 { | 306 | pioA: gpio@fffff200 { |
| 275 | compatible = "atmel,at91rm9200-gpio"; | 307 | compatible = "atmel,at91rm9200-gpio"; |
| 276 | reg = <0xfffff200 0x200>; | 308 | reg = <0xfffff200 0x200>; |
| @@ -368,6 +400,8 @@ | |||
| 368 | compatible = "atmel,at91rm9200-ssc"; | 400 | compatible = "atmel,at91rm9200-ssc"; |
| 369 | reg = <0xfff98000 0x4000>; | 401 | reg = <0xfff98000 0x4000>; |
| 370 | interrupts = <16 4 5>; | 402 | interrupts = <16 4 5>; |
| 403 | pinctrl-names = "default"; | ||
| 404 | pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; | ||
| 371 | status = "disabled"; | 405 | status = "disabled"; |
| 372 | }; | 406 | }; |
| 373 | 407 | ||
| @@ -375,6 +409,8 @@ | |||
| 375 | compatible = "atmel,at91rm9200-ssc"; | 409 | compatible = "atmel,at91rm9200-ssc"; |
| 376 | reg = <0xfff9c000 0x4000>; | 410 | reg = <0xfff9c000 0x4000>; |
| 377 | interrupts = <17 4 5>; | 411 | interrupts = <17 4 5>; |
| 412 | pinctrl-names = "default"; | ||
| 413 | pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>; | ||
| 378 | status = "disabled"; | 414 | status = "disabled"; |
| 379 | }; | 415 | }; |
| 380 | 416 | ||
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi index 231858ffd850..6b1d4cab24c2 100644 --- a/arch/arm/boot/dts/at91sam9g45.dtsi +++ b/arch/arm/boot/dts/at91sam9g45.dtsi | |||
| @@ -290,6 +290,38 @@ | |||
| 290 | }; | 290 | }; |
| 291 | }; | 291 | }; |
| 292 | 292 | ||
| 293 | ssc0 { | ||
| 294 | pinctrl_ssc0_tx: ssc0_tx-0 { | ||
| 295 | atmel,pins = | ||
| 296 | <3 0 0x1 0x0 /* PD0 periph A */ | ||
| 297 | 3 1 0x1 0x0 /* PD1 periph A */ | ||
| 298 | 3 2 0x1 0x0>; /* PD2 periph A */ | ||
| 299 | }; | ||
| 300 | |||
| 301 | pinctrl_ssc0_rx: ssc0_rx-0 { | ||
| 302 | atmel,pins = | ||
| 303 | <3 3 0x1 0x0 /* PD3 periph A */ | ||
| 304 | 3 4 0x1 0x0 /* PD4 periph A */ | ||
| 305 | 3 5 0x1 0x0>; /* PD5 periph A */ | ||
| 306 | }; | ||
| 307 | }; | ||
| 308 | |||
| 309 | ssc1 { | ||
| 310 | pinctrl_ssc1_tx: ssc1_tx-0 { | ||
| 311 | atmel,pins = | ||
| 312 | <3 10 0x1 0x0 /* PD10 periph A */ | ||
| 313 | 3 11 0x1 0x0 /* PD11 periph A */ | ||
| 314 | 3 12 0x1 0x0>; /* PD12 periph A */ | ||
| 315 | }; | ||
| 316 | |||
| 317 | pinctrl_ssc1_rx: ssc1_rx-0 { | ||
| 318 | atmel,pins = | ||
| 319 | <3 13 0x1 0x0 /* PD13 periph A */ | ||
| 320 | 3 14 0x1 0x0 /* PD14 periph A */ | ||
| 321 | 3 15 0x1 0x0>; /* PD15 periph A */ | ||
| 322 | }; | ||
| 323 | }; | ||
| 324 | |||
| 293 | pioA: gpio@fffff200 { | 325 | pioA: gpio@fffff200 { |
| 294 | compatible = "atmel,at91rm9200-gpio"; | 326 | compatible = "atmel,at91rm9200-gpio"; |
| 295 | reg = <0xfffff200 0x200>; | 327 | reg = <0xfffff200 0x200>; |
| @@ -425,6 +457,8 @@ | |||
| 425 | compatible = "atmel,at91sam9g45-ssc"; | 457 | compatible = "atmel,at91sam9g45-ssc"; |
| 426 | reg = <0xfff9c000 0x4000>; | 458 | reg = <0xfff9c000 0x4000>; |
| 427 | interrupts = <16 4 5>; | 459 | interrupts = <16 4 5>; |
| 460 | pinctrl-names = "default"; | ||
| 461 | pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; | ||
| 428 | status = "disabled"; | 462 | status = "disabled"; |
| 429 | }; | 463 | }; |
| 430 | 464 | ||
| @@ -432,6 +466,8 @@ | |||
| 432 | compatible = "atmel,at91sam9g45-ssc"; | 466 | compatible = "atmel,at91sam9g45-ssc"; |
| 433 | reg = <0xfffa0000 0x4000>; | 467 | reg = <0xfffa0000 0x4000>; |
| 434 | interrupts = <17 4 5>; | 468 | interrupts = <17 4 5>; |
| 469 | pinctrl-names = "default"; | ||
| 470 | pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>; | ||
| 435 | status = "disabled"; | 471 | status = "disabled"; |
| 436 | }; | 472 | }; |
| 437 | 473 | ||
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi index e9efb34f4379..80e29c605d4e 100644 --- a/arch/arm/boot/dts/at91sam9n12.dtsi +++ b/arch/arm/boot/dts/at91sam9n12.dtsi | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | tcb1 = &tcb1; | 28 | tcb1 = &tcb1; |
| 29 | i2c0 = &i2c0; | 29 | i2c0 = &i2c0; |
| 30 | i2c1 = &i2c1; | 30 | i2c1 = &i2c1; |
| 31 | ssc0 = &ssc0; | ||
| 31 | }; | 32 | }; |
| 32 | cpus { | 33 | cpus { |
| 33 | cpu@0 { | 34 | cpu@0 { |
| @@ -244,6 +245,22 @@ | |||
| 244 | }; | 245 | }; |
| 245 | }; | 246 | }; |
| 246 | 247 | ||
| 248 | ssc0 { | ||
| 249 | pinctrl_ssc0_tx: ssc0_tx-0 { | ||
| 250 | atmel,pins = | ||
| 251 | <0 24 0x2 0x0 /* PA24 periph B */ | ||
| 252 | 0 25 0x2 0x0 /* PA25 periph B */ | ||
| 253 | 0 26 0x2 0x0>; /* PA26 periph B */ | ||
| 254 | }; | ||
| 255 | |||
| 256 | pinctrl_ssc0_rx: ssc0_rx-0 { | ||
| 257 | atmel,pins = | ||
| 258 | <0 27 0x2 0x0 /* PA27 periph B */ | ||
| 259 | 0 28 0x2 0x0 /* PA28 periph B */ | ||
| 260 | 0 29 0x2 0x0>; /* PA29 periph B */ | ||
| 261 | }; | ||
| 262 | }; | ||
| 263 | |||
| 247 | pioA: gpio@fffff400 { | 264 | pioA: gpio@fffff400 { |
| 248 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | 265 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; |
| 249 | reg = <0xfffff400 0x200>; | 266 | reg = <0xfffff400 0x200>; |
| @@ -294,6 +311,15 @@ | |||
| 294 | status = "disabled"; | 311 | status = "disabled"; |
| 295 | }; | 312 | }; |
| 296 | 313 | ||
| 314 | ssc0: ssc@f0010000 { | ||
| 315 | compatible = "atmel,at91sam9g45-ssc"; | ||
| 316 | reg = <0xf0010000 0x4000>; | ||
| 317 | interrupts = <28 4 5>; | ||
| 318 | pinctrl-names = "default"; | ||
| 319 | pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; | ||
| 320 | status = "disabled"; | ||
| 321 | }; | ||
| 322 | |||
| 297 | usart0: serial@f801c000 { | 323 | usart0: serial@f801c000 { |
| 298 | compatible = "atmel,at91sam9260-usart"; | 324 | compatible = "atmel,at91sam9260-usart"; |
| 299 | reg = <0xf801c000 0x4000>; | 325 | reg = <0xf801c000 0x4000>; |
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi index 40ac3a4eb1ab..3a47cf952146 100644 --- a/arch/arm/boot/dts/at91sam9x5.dtsi +++ b/arch/arm/boot/dts/at91sam9x5.dtsi | |||
| @@ -88,13 +88,6 @@ | |||
| 88 | interrupts = <1 4 7>; | 88 | interrupts = <1 4 7>; |
| 89 | }; | 89 | }; |
| 90 | 90 | ||
| 91 | ssc0: ssc@f0010000 { | ||
| 92 | compatible = "atmel,at91sam9g45-ssc"; | ||
| 93 | reg = <0xf0010000 0x4000>; | ||
| 94 | interrupts = <28 4 5>; | ||
| 95 | status = "disabled"; | ||
| 96 | }; | ||
| 97 | |||
| 98 | tcb0: timer@f8008000 { | 91 | tcb0: timer@f8008000 { |
| 99 | compatible = "atmel,at91sam9x5-tcb"; | 92 | compatible = "atmel,at91sam9x5-tcb"; |
| 100 | reg = <0xf8008000 0x100>; | 93 | reg = <0xf8008000 0x100>; |
| @@ -290,6 +283,22 @@ | |||
| 290 | }; | 283 | }; |
| 291 | }; | 284 | }; |
| 292 | 285 | ||
| 286 | ssc0 { | ||
| 287 | pinctrl_ssc0_tx: ssc0_tx-0 { | ||
| 288 | atmel,pins = | ||
| 289 | <0 24 0x2 0x0 /* PA24 periph B */ | ||
| 290 | 0 25 0x2 0x0 /* PA25 periph B */ | ||
| 291 | 0 26 0x2 0x0>; /* PA26 periph B */ | ||
| 292 | }; | ||
| 293 | |||
| 294 | pinctrl_ssc0_rx: ssc0_rx-0 { | ||
| 295 | atmel,pins = | ||
| 296 | <0 27 0x2 0x0 /* PA27 periph B */ | ||
| 297 | 0 28 0x2 0x0 /* PA28 periph B */ | ||
| 298 | 0 29 0x2 0x0>; /* PA29 periph B */ | ||
| 299 | }; | ||
| 300 | }; | ||
| 301 | |||
| 293 | pioA: gpio@fffff400 { | 302 | pioA: gpio@fffff400 { |
| 294 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; | 303 | compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; |
| 295 | reg = <0xfffff400 0x200>; | 304 | reg = <0xfffff400 0x200>; |
| @@ -333,6 +342,15 @@ | |||
| 333 | }; | 342 | }; |
| 334 | }; | 343 | }; |
| 335 | 344 | ||
| 345 | ssc0: ssc@f0010000 { | ||
| 346 | compatible = "atmel,at91sam9g45-ssc"; | ||
| 347 | reg = <0xf0010000 0x4000>; | ||
| 348 | interrupts = <28 4 5>; | ||
| 349 | pinctrl-names = "default"; | ||
| 350 | pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; | ||
| 351 | status = "disabled"; | ||
| 352 | }; | ||
| 353 | |||
| 336 | mmc0: mmc@f0008000 { | 354 | mmc0: mmc@f0008000 { |
| 337 | compatible = "atmel,hsmci"; | 355 | compatible = "atmel,hsmci"; |
| 338 | reg = <0xf0008000 0x600>; | 356 | reg = <0xf0008000 0x600>; |
diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi index 2efd9c891bc9..63f2fbcfe819 100644 --- a/arch/arm/boot/dts/dbx5x0.dtsi +++ b/arch/arm/boot/dts/dbx5x0.dtsi | |||
| @@ -170,7 +170,9 @@ | |||
| 170 | gpio-bank = <8>; | 170 | gpio-bank = <8>; |
| 171 | }; | 171 | }; |
| 172 | 172 | ||
| 173 | pinctrl { | 173 | pinctrl@80157000 { |
| 174 | // This is actually the PRCMU base address | ||
| 175 | reg = <0x80157000 0x2000>; | ||
| 174 | compatible = "stericsson,nmk_pinctrl"; | 176 | compatible = "stericsson,nmk_pinctrl"; |
| 175 | }; | 177 | }; |
| 176 | 178 | ||
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi index f3f7e9d8adca..42eac1ff3cc8 100644 --- a/arch/arm/boot/dts/dove.dtsi +++ b/arch/arm/boot/dts/dove.dtsi | |||
| @@ -117,6 +117,7 @@ | |||
| 117 | pinctrl: pinctrl@d0200 { | 117 | pinctrl: pinctrl@d0200 { |
| 118 | compatible = "marvell,dove-pinctrl"; | 118 | compatible = "marvell,dove-pinctrl"; |
| 119 | reg = <0xd0200 0x10>; | 119 | reg = <0xd0200 0x10>; |
| 120 | clocks = <&gate_clk 22>; | ||
| 120 | }; | 121 | }; |
| 121 | 122 | ||
| 122 | spi0: spi@10600 { | 123 | spi0: spi@10600 { |
diff --git a/arch/arm/boot/dts/ecx-2000.dts b/arch/arm/boot/dts/ecx-2000.dts index 46477ac1de99..139b40cc3a23 100644 --- a/arch/arm/boot/dts/ecx-2000.dts +++ b/arch/arm/boot/dts/ecx-2000.dts | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | 32 | ||
| 33 | cpu@0 { | 33 | cpu@0 { |
| 34 | compatible = "arm,cortex-a15"; | 34 | compatible = "arm,cortex-a15"; |
| 35 | device_type = "cpu"; | ||
| 35 | reg = <0>; | 36 | reg = <0>; |
| 36 | clocks = <&a9pll>; | 37 | clocks = <&a9pll>; |
| 37 | clock-names = "cpu"; | 38 | clock-names = "cpu"; |
| @@ -39,6 +40,7 @@ | |||
| 39 | 40 | ||
| 40 | cpu@1 { | 41 | cpu@1 { |
| 41 | compatible = "arm,cortex-a15"; | 42 | compatible = "arm,cortex-a15"; |
| 43 | device_type = "cpu"; | ||
| 42 | reg = <1>; | 44 | reg = <1>; |
| 43 | clocks = <&a9pll>; | 45 | clocks = <&a9pll>; |
| 44 | clock-names = "cpu"; | 46 | clock-names = "cpu"; |
| @@ -46,6 +48,7 @@ | |||
| 46 | 48 | ||
| 47 | cpu@2 { | 49 | cpu@2 { |
| 48 | compatible = "arm,cortex-a15"; | 50 | compatible = "arm,cortex-a15"; |
| 51 | device_type = "cpu"; | ||
| 49 | reg = <2>; | 52 | reg = <2>; |
| 50 | clocks = <&a9pll>; | 53 | clocks = <&a9pll>; |
| 51 | clock-names = "cpu"; | 54 | clock-names = "cpu"; |
| @@ -53,6 +56,7 @@ | |||
| 53 | 56 | ||
| 54 | cpu@3 { | 57 | cpu@3 { |
| 55 | compatible = "arm,cortex-a15"; | 58 | compatible = "arm,cortex-a15"; |
| 59 | device_type = "cpu"; | ||
| 56 | reg = <3>; | 60 | reg = <3>; |
| 57 | clocks = <&a9pll>; | 61 | clocks = <&a9pll>; |
| 58 | clock-names = "cpu"; | 62 | clock-names = "cpu"; |
diff --git a/arch/arm/boot/dts/exynos4210-smdkv310.dts b/arch/arm/boot/dts/exynos4210-smdkv310.dts index 9b23a8255e39..f63490707f3a 100644 --- a/arch/arm/boot/dts/exynos4210-smdkv310.dts +++ b/arch/arm/boot/dts/exynos4210-smdkv310.dts | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | }; | 26 | }; |
| 27 | 27 | ||
| 28 | chosen { | 28 | chosen { |
| 29 | bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC2,115200 init=/linuxrc"; | 29 | bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc"; |
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | sdhci@12530000 { | 32 | sdhci@12530000 { |
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 2e3b6efaf1a2..3acf594ea60b 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi | |||
| @@ -574,7 +574,7 @@ | |||
| 574 | 574 | ||
| 575 | hdmi { | 575 | hdmi { |
| 576 | compatible = "samsung,exynos5-hdmi"; | 576 | compatible = "samsung,exynos5-hdmi"; |
| 577 | reg = <0x14530000 0x100000>; | 577 | reg = <0x14530000 0x70000>; |
| 578 | interrupts = <0 95 0>; | 578 | interrupts = <0 95 0>; |
| 579 | }; | 579 | }; |
| 580 | 580 | ||
diff --git a/arch/arm/boot/dts/exynos5440-ssdk5440.dts b/arch/arm/boot/dts/exynos5440-ssdk5440.dts index 921c83cf694f..81e2c964a900 100644 --- a/arch/arm/boot/dts/exynos5440-ssdk5440.dts +++ b/arch/arm/boot/dts/exynos5440-ssdk5440.dts | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | }; | 21 | }; |
| 22 | 22 | ||
| 23 | chosen { | 23 | chosen { |
| 24 | bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x81000000,8M console=ttySAC2,115200 init=/linuxrc"; | 24 | bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x81000000,8M console=ttySAC0,115200 init=/linuxrc"; |
| 25 | }; | 25 | }; |
| 26 | 26 | ||
| 27 | spi { | 27 | spi { |
diff --git a/arch/arm/boot/dts/highbank.dts b/arch/arm/boot/dts/highbank.dts index a9ae5d32e80d..5927a8df5625 100644 --- a/arch/arm/boot/dts/highbank.dts +++ b/arch/arm/boot/dts/highbank.dts | |||
| @@ -30,33 +30,37 @@ | |||
| 30 | #address-cells = <1>; | 30 | #address-cells = <1>; |
| 31 | #size-cells = <0>; | 31 | #size-cells = <0>; |
| 32 | 32 | ||
| 33 | cpu@0 { | 33 | cpu@900 { |
| 34 | compatible = "arm,cortex-a9"; | 34 | compatible = "arm,cortex-a9"; |
| 35 | reg = <0>; | 35 | device_type = "cpu"; |
| 36 | reg = <0x900>; | ||
| 36 | next-level-cache = <&L2>; | 37 | next-level-cache = <&L2>; |
| 37 | clocks = <&a9pll>; | 38 | clocks = <&a9pll>; |
| 38 | clock-names = "cpu"; | 39 | clock-names = "cpu"; |
| 39 | }; | 40 | }; |
| 40 | 41 | ||
| 41 | cpu@1 { | 42 | cpu@901 { |
| 42 | compatible = "arm,cortex-a9"; | 43 | compatible = "arm,cortex-a9"; |
| 43 | reg = <1>; | 44 | device_type = "cpu"; |
| 45 | reg = <0x901>; | ||
| 44 | next-level-cache = <&L2>; | 46 | next-level-cache = <&L2>; |
| 45 | clocks = <&a9pll>; | 47 | clocks = <&a9pll>; |
| 46 | clock-names = "cpu"; | 48 | clock-names = "cpu"; |
| 47 | }; | 49 | }; |
| 48 | 50 | ||
| 49 | cpu@2 { | 51 | cpu@902 { |
| 50 | compatible = "arm,cortex-a9"; | 52 | compatible = "arm,cortex-a9"; |
| 51 | reg = <2>; | 53 | device_type = "cpu"; |
| 54 | reg = <0x902>; | ||
| 52 | next-level-cache = <&L2>; | 55 | next-level-cache = <&L2>; |
| 53 | clocks = <&a9pll>; | 56 | clocks = <&a9pll>; |
| 54 | clock-names = "cpu"; | 57 | clock-names = "cpu"; |
| 55 | }; | 58 | }; |
| 56 | 59 | ||
| 57 | cpu@3 { | 60 | cpu@903 { |
| 58 | compatible = "arm,cortex-a9"; | 61 | compatible = "arm,cortex-a9"; |
| 59 | reg = <3>; | 62 | device_type = "cpu"; |
| 63 | reg = <0x903>; | ||
| 60 | next-level-cache = <&L2>; | 64 | next-level-cache = <&L2>; |
| 61 | clocks = <&a9pll>; | 65 | clocks = <&a9pll>; |
| 62 | clock-names = "cpu"; | 66 | clock-names = "cpu"; |
diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts index 7c43b8e70b9f..e7484e4ea659 100644 --- a/arch/arm/boot/dts/imx23-olinuxino.dts +++ b/arch/arm/boot/dts/imx23-olinuxino.dts | |||
| @@ -39,17 +39,17 @@ | |||
| 39 | hog_pins_a: hog@0 { | 39 | hog_pins_a: hog@0 { |
| 40 | reg = <0>; | 40 | reg = <0>; |
| 41 | fsl,pinmux-ids = < | 41 | fsl,pinmux-ids = < |
| 42 | 0x2013 /* MX23_PAD_SSP1_DETECT__GPIO_2_1 */ | 42 | 0x0113 /* MX23_PAD_GPMI_ALE__GPIO_0_17 */ |
| 43 | >; | 43 | >; |
| 44 | fsl,drive-strength = <0>; | 44 | fsl,drive-strength = <0>; |
| 45 | fsl,voltage = <1>; | 45 | fsl,voltage = <1>; |
| 46 | fsl,pull-up = <0>; | 46 | fsl,pull-up = <0>; |
| 47 | }; | 47 | }; |
| 48 | 48 | ||
| 49 | led_pin_gpio0_17: led_gpio0_17@0 { | 49 | led_pin_gpio2_1: led_gpio2_1@0 { |
| 50 | reg = <0>; | 50 | reg = <0>; |
| 51 | fsl,pinmux-ids = < | 51 | fsl,pinmux-ids = < |
| 52 | 0x0113 /* MX23_PAD_GPMI_ALE__GPIO_0_17 */ | 52 | 0x2013 /* MX23_PAD_SSP1_DETECT__GPIO_2_1 */ |
| 53 | >; | 53 | >; |
| 54 | fsl,drive-strength = <0>; | 54 | fsl,drive-strength = <0>; |
| 55 | fsl,voltage = <1>; | 55 | fsl,voltage = <1>; |
| @@ -110,7 +110,7 @@ | |||
| 110 | leds { | 110 | leds { |
| 111 | compatible = "gpio-leds"; | 111 | compatible = "gpio-leds"; |
| 112 | pinctrl-names = "default"; | 112 | pinctrl-names = "default"; |
| 113 | pinctrl-0 = <&led_pin_gpio0_17>; | 113 | pinctrl-0 = <&led_pin_gpio2_1>; |
| 114 | 114 | ||
| 115 | user { | 115 | user { |
| 116 | label = "green"; | 116 | label = "green"; |
diff --git a/arch/arm/boot/dts/imx31-bug.dts b/arch/arm/boot/dts/imx31-bug.dts index 24731cb78e8e..7f67402328d3 100644 --- a/arch/arm/boot/dts/imx31-bug.dts +++ b/arch/arm/boot/dts/imx31-bug.dts | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | 14 | ||
| 15 | / { | 15 | / { |
| 16 | model = "Buglabs i.MX31 Bug 1.x"; | 16 | model = "Buglabs i.MX31 Bug 1.x"; |
| 17 | compatible = "fsl,imx31-bug", "fsl,imx31"; | 17 | compatible = "buglabs,imx31-bug", "fsl,imx31"; |
| 18 | 18 | ||
| 19 | memory { | 19 | memory { |
| 20 | reg = <0x80000000 0x8000000>; /* 128M */ | 20 | reg = <0x80000000 0x8000000>; /* 128M */ |
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi index 552aed4ff982..edc3f1eb6699 100644 --- a/arch/arm/boot/dts/imx53.dtsi +++ b/arch/arm/boot/dts/imx53.dtsi | |||
| @@ -492,7 +492,7 @@ | |||
| 492 | compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; | 492 | compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; |
| 493 | reg = <0x53fcc000 0x4000>; | 493 | reg = <0x53fcc000 0x4000>; |
| 494 | interrupts = <83>; | 494 | interrupts = <83>; |
| 495 | clocks = <&clks 158>, <&clks 157>; | 495 | clocks = <&clks 87>, <&clks 86>; |
| 496 | clock-names = "ipg", "per"; | 496 | clock-names = "ipg", "per"; |
| 497 | status = "disabled"; | 497 | status = "disabled"; |
| 498 | }; | 498 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-6282.dtsi b/arch/arm/boot/dts/kirkwood-6282.dtsi index 9ae2004d5675..4ccea2130a6c 100644 --- a/arch/arm/boot/dts/kirkwood-6282.dtsi +++ b/arch/arm/boot/dts/kirkwood-6282.dtsi | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | #size-cells = <0>; | 39 | #size-cells = <0>; |
| 40 | interrupts = <32>; | 40 | interrupts = <32>; |
| 41 | clock-frequency = <100000>; | 41 | clock-frequency = <100000>; |
| 42 | clocks = <&gate_clk 7>; | ||
| 42 | status = "disabled"; | 43 | status = "disabled"; |
| 43 | }; | 44 | }; |
| 44 | }; | 45 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts index c0de5a7f660d..cd15452a52a6 100644 --- a/arch/arm/boot/dts/kirkwood-topkick.dts +++ b/arch/arm/boot/dts/kirkwood-topkick.dts | |||
| @@ -82,4 +82,21 @@ | |||
| 82 | gpios = <&gpio1 16 1>; | 82 | gpios = <&gpio1 16 1>; |
| 83 | }; | 83 | }; |
| 84 | }; | 84 | }; |
| 85 | regulators { | ||
| 86 | compatible = "simple-bus"; | ||
| 87 | #address-cells = <1>; | ||
| 88 | #size-cells = <0>; | ||
| 89 | |||
| 90 | sata0_power: regulator@1 { | ||
| 91 | compatible = "regulator-fixed"; | ||
| 92 | reg = <1>; | ||
| 93 | regulator-name = "SATA0 Power"; | ||
| 94 | regulator-min-microvolt = <5000000>; | ||
| 95 | regulator-max-microvolt = <5000000>; | ||
| 96 | enable-active-high; | ||
| 97 | regulator-always-on; | ||
| 98 | regulator-boot-on; | ||
| 99 | gpio = <&gpio1 4 0>; | ||
| 100 | }; | ||
| 101 | }; | ||
| 85 | }; | 102 | }; |
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index 7735cee4a9c6..110d6cbb795b 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi | |||
| @@ -144,6 +144,7 @@ | |||
| 144 | compatible = "marvell,orion-ehci"; | 144 | compatible = "marvell,orion-ehci"; |
| 145 | reg = <0x50000 0x1000>; | 145 | reg = <0x50000 0x1000>; |
| 146 | interrupts = <19>; | 146 | interrupts = <19>; |
| 147 | clocks = <&gate_clk 3>; | ||
| 147 | status = "okay"; | 148 | status = "okay"; |
| 148 | }; | 149 | }; |
| 149 | 150 | ||
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 9173d112ea01..e57d7e5bf96a 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
| @@ -686,8 +686,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
| 686 | * %-EINVAL no platform data passed | 686 | * %-EINVAL no platform data passed |
| 687 | * %0 successful. | 687 | * %0 successful. |
| 688 | */ | 688 | */ |
| 689 | static int __devinit | 689 | static int __sa1111_probe(struct device *me, struct resource *mem, int irq) |
| 690 | __sa1111_probe(struct device *me, struct resource *mem, int irq) | ||
| 691 | { | 690 | { |
| 692 | struct sa1111_platform_data *pd = me->platform_data; | 691 | struct sa1111_platform_data *pd = me->platform_data; |
| 693 | struct sa1111 *sachip; | 692 | struct sa1111 *sachip; |
| @@ -1011,7 +1010,7 @@ static int sa1111_resume(struct platform_device *dev) | |||
| 1011 | #define sa1111_resume NULL | 1010 | #define sa1111_resume NULL |
| 1012 | #endif | 1011 | #endif |
| 1013 | 1012 | ||
| 1014 | static int __devinit sa1111_probe(struct platform_device *pdev) | 1013 | static int sa1111_probe(struct platform_device *pdev) |
| 1015 | { | 1014 | { |
| 1016 | struct resource *mem; | 1015 | struct resource *mem; |
| 1017 | int irq; | 1016 | int irq; |
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c index 0c616d5fcb0f..a5c3dc38aa18 100644 --- a/arch/arm/common/scoop.c +++ b/arch/arm/common/scoop.c | |||
| @@ -176,7 +176,7 @@ static int scoop_resume(struct platform_device *dev) | |||
| 176 | #define scoop_resume NULL | 176 | #define scoop_resume NULL |
| 177 | #endif | 177 | #endif |
| 178 | 178 | ||
| 179 | static int __devinit scoop_probe(struct platform_device *pdev) | 179 | static int scoop_probe(struct platform_device *pdev) |
| 180 | { | 180 | { |
| 181 | struct scoop_dev *devptr; | 181 | struct scoop_dev *devptr; |
| 182 | struct scoop_config *inf; | 182 | struct scoop_config *inf; |
| @@ -243,7 +243,7 @@ err_ioremap: | |||
| 243 | return ret; | 243 | return ret; |
| 244 | } | 244 | } |
| 245 | 245 | ||
| 246 | static int __devexit scoop_remove(struct platform_device *pdev) | 246 | static int scoop_remove(struct platform_device *pdev) |
| 247 | { | 247 | { |
| 248 | struct scoop_dev *sdev = platform_get_drvdata(pdev); | 248 | struct scoop_dev *sdev = platform_get_drvdata(pdev); |
| 249 | int ret; | 249 | int ret; |
| @@ -268,7 +268,7 @@ static int __devexit scoop_remove(struct platform_device *pdev) | |||
| 268 | 268 | ||
| 269 | static struct platform_driver scoop_driver = { | 269 | static struct platform_driver scoop_driver = { |
| 270 | .probe = scoop_probe, | 270 | .probe = scoop_probe, |
| 271 | .remove = __devexit_p(scoop_remove), | 271 | .remove = scoop_remove, |
| 272 | .suspend = scoop_suspend, | 272 | .suspend = scoop_suspend, |
| 273 | .resume = scoop_resume, | 273 | .resume = scoop_resume, |
| 274 | .driver = { | 274 | .driver = { |
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index e4df17ca90c7..8f324b99416e 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c | |||
| @@ -206,6 +206,7 @@ static void __init vic_register(void __iomem *base, unsigned int irq, | |||
| 206 | struct device_node *node) | 206 | struct device_node *node) |
| 207 | { | 207 | { |
| 208 | struct vic_device *v; | 208 | struct vic_device *v; |
| 209 | int i; | ||
| 209 | 210 | ||
| 210 | if (vic_id >= ARRAY_SIZE(vic_devices)) { | 211 | if (vic_id >= ARRAY_SIZE(vic_devices)) { |
| 211 | printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__); | 212 | printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__); |
| @@ -220,6 +221,10 @@ static void __init vic_register(void __iomem *base, unsigned int irq, | |||
| 220 | vic_id++; | 221 | vic_id++; |
| 221 | v->domain = irq_domain_add_simple(node, fls(valid_sources), irq, | 222 | v->domain = irq_domain_add_simple(node, fls(valid_sources), irq, |
| 222 | &vic_irqdomain_ops, v); | 223 | &vic_irqdomain_ops, v); |
| 224 | /* create an IRQ mapping for each valid IRQ */ | ||
| 225 | for (i = 0; i < fls(valid_sources); i++) | ||
| 226 | if (valid_sources & (1 << i)) | ||
| 227 | irq_create_mapping(v->domain, i); | ||
| 223 | } | 228 | } |
| 224 | 229 | ||
| 225 | static void vic_ack_irq(struct irq_data *d) | 230 | static void vic_ack_irq(struct irq_data *d) |
| @@ -416,9 +421,9 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent) | |||
| 416 | return -EIO; | 421 | return -EIO; |
| 417 | 422 | ||
| 418 | /* | 423 | /* |
| 419 | * Passing -1 as first IRQ makes the simple domain allocate descriptors | 424 | * Passing 0 as first IRQ makes the simple domain allocate descriptors |
| 420 | */ | 425 | */ |
| 421 | __vic_init(regs, -1, ~0, ~0, node); | 426 | __vic_init(regs, 0, ~0, ~0, node); |
| 422 | 427 | ||
| 423 | return 0; | 428 | return 0; |
| 424 | } | 429 | } |
diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index a702fb345c01..b5bc96cb65a7 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig | |||
| @@ -33,9 +33,7 @@ CONFIG_MVNETA=y | |||
| 33 | CONFIG_MARVELL_PHY=y | 33 | CONFIG_MARVELL_PHY=y |
| 34 | CONFIG_SERIAL_8250=y | 34 | CONFIG_SERIAL_8250=y |
| 35 | CONFIG_SERIAL_8250_CONSOLE=y | 35 | CONFIG_SERIAL_8250_CONSOLE=y |
| 36 | CONFIG_SERIAL_OF_PLATFORM=y | 36 | CONFIG_SERIAL_8250_DW=y |
| 37 | CONFIG_I2C=y | ||
| 38 | CONFIG_I2C_MV64XXX=y | ||
| 39 | CONFIG_GPIOLIB=y | 37 | CONFIG_GPIOLIB=y |
| 40 | CONFIG_GPIO_SYSFS=y | 38 | CONFIG_GPIO_SYSFS=y |
| 41 | # CONFIG_USB_SUPPORT is not set | 39 | # CONFIG_USB_SUPPORT is not set |
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index 9b722612553d..379cf3292390 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c | |||
| @@ -78,7 +78,7 @@ void pcibios_report_status(u_int status_mask, int warn) | |||
| 78 | * Bug 3 is responsible for the sound DMA grinding to a halt. We now | 78 | * Bug 3 is responsible for the sound DMA grinding to a halt. We now |
| 79 | * live with bug 2. | 79 | * live with bug 2. |
| 80 | */ | 80 | */ |
| 81 | static void __devinit pci_fixup_83c553(struct pci_dev *dev) | 81 | static void pci_fixup_83c553(struct pci_dev *dev) |
| 82 | { | 82 | { |
| 83 | /* | 83 | /* |
| 84 | * Set memory region to start at address 0, and enable IO | 84 | * Set memory region to start at address 0, and enable IO |
| @@ -130,7 +130,7 @@ static void __devinit pci_fixup_83c553(struct pci_dev *dev) | |||
| 130 | } | 130 | } |
| 131 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_83C553, pci_fixup_83c553); | 131 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_83C553, pci_fixup_83c553); |
| 132 | 132 | ||
| 133 | static void __devinit pci_fixup_unassign(struct pci_dev *dev) | 133 | static void pci_fixup_unassign(struct pci_dev *dev) |
| 134 | { | 134 | { |
| 135 | dev->resource[0].end -= dev->resource[0].start; | 135 | dev->resource[0].end -= dev->resource[0].start; |
| 136 | dev->resource[0].start = 0; | 136 | dev->resource[0].start = 0; |
| @@ -142,7 +142,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C940F, | |||
| 142 | * if it is the host bridge by marking it as such. These resources are of | 142 | * if it is the host bridge by marking it as such. These resources are of |
| 143 | * no consequence to the PCI layer (they are handled elsewhere). | 143 | * no consequence to the PCI layer (they are handled elsewhere). |
| 144 | */ | 144 | */ |
| 145 | static void __devinit pci_fixup_dec21285(struct pci_dev *dev) | 145 | static void pci_fixup_dec21285(struct pci_dev *dev) |
| 146 | { | 146 | { |
| 147 | int i; | 147 | int i; |
| 148 | 148 | ||
| @@ -161,7 +161,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285, pci_fixup_d | |||
| 161 | /* | 161 | /* |
| 162 | * PCI IDE controllers use non-standard I/O port decoding, respect it. | 162 | * PCI IDE controllers use non-standard I/O port decoding, respect it. |
| 163 | */ | 163 | */ |
| 164 | static void __devinit pci_fixup_ide_bases(struct pci_dev *dev) | 164 | static void pci_fixup_ide_bases(struct pci_dev *dev) |
| 165 | { | 165 | { |
| 166 | struct resource *r; | 166 | struct resource *r; |
| 167 | int i; | 167 | int i; |
| @@ -182,7 +182,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases); | |||
| 182 | /* | 182 | /* |
| 183 | * Put the DEC21142 to sleep | 183 | * Put the DEC21142 to sleep |
| 184 | */ | 184 | */ |
| 185 | static void __devinit pci_fixup_dec21142(struct pci_dev *dev) | 185 | static void pci_fixup_dec21142(struct pci_dev *dev) |
| 186 | { | 186 | { |
| 187 | pci_write_config_dword(dev, 0x40, 0x80000000); | 187 | pci_write_config_dword(dev, 0x40, 0x80000000); |
| 188 | } | 188 | } |
| @@ -204,7 +204,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, pci_fixup_d | |||
| 204 | * functional. However, The CY82C693U _does not work_ in bus | 204 | * functional. However, The CY82C693U _does not work_ in bus |
| 205 | * master mode without locking the PCI bus solid. | 205 | * master mode without locking the PCI bus solid. |
| 206 | */ | 206 | */ |
| 207 | static void __devinit pci_fixup_cy82c693(struct pci_dev *dev) | 207 | static void pci_fixup_cy82c693(struct pci_dev *dev) |
| 208 | { | 208 | { |
| 209 | if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) { | 209 | if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) { |
| 210 | u32 base0, base1; | 210 | u32 base0, base1; |
| @@ -254,7 +254,7 @@ static void __devinit pci_fixup_cy82c693(struct pci_dev *dev) | |||
| 254 | } | 254 | } |
| 255 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, pci_fixup_cy82c693); | 255 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, pci_fixup_cy82c693); |
| 256 | 256 | ||
| 257 | static void __devinit pci_fixup_it8152(struct pci_dev *dev) | 257 | static void pci_fixup_it8152(struct pci_dev *dev) |
| 258 | { | 258 | { |
| 259 | int i; | 259 | int i; |
| 260 | /* fixup for ITE 8152 devices */ | 260 | /* fixup for ITE 8152 devices */ |
| @@ -361,9 +361,7 @@ void pcibios_fixup_bus(struct pci_bus *bus) | |||
| 361 | printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n", | 361 | printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n", |
| 362 | bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis"); | 362 | bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis"); |
| 363 | } | 363 | } |
| 364 | #ifdef CONFIG_HOTPLUG | ||
| 365 | EXPORT_SYMBOL(pcibios_fixup_bus); | 364 | EXPORT_SYMBOL(pcibios_fixup_bus); |
| 366 | #endif | ||
| 367 | 365 | ||
| 368 | /* | 366 | /* |
| 369 | * Swizzle the device pin each time we cross a bridge. If a platform does | 367 | * Swizzle the device pin each time we cross a bridge. If a platform does |
| @@ -380,7 +378,7 @@ EXPORT_SYMBOL(pcibios_fixup_bus); | |||
| 380 | * PCI standard swizzle is implemented on plug-in cards and Cardbus based | 378 | * PCI standard swizzle is implemented on plug-in cards and Cardbus based |
| 381 | * PCI extenders, so it can not be ignored. | 379 | * PCI extenders, so it can not be ignored. |
| 382 | */ | 380 | */ |
| 383 | static u8 __devinit pcibios_swizzle(struct pci_dev *dev, u8 *pin) | 381 | static u8 pcibios_swizzle(struct pci_dev *dev, u8 *pin) |
| 384 | { | 382 | { |
| 385 | struct pci_sys_data *sys = dev->sysdata; | 383 | struct pci_sys_data *sys = dev->sysdata; |
| 386 | int slot, oldpin = *pin; | 384 | int slot, oldpin = *pin; |
diff --git a/arch/arm/kernel/etm.c b/arch/arm/kernel/etm.c index 36d20bd50120..9b6de8c988f3 100644 --- a/arch/arm/kernel/etm.c +++ b/arch/arm/kernel/etm.c | |||
| @@ -339,7 +339,7 @@ static struct miscdevice etb_miscdev = { | |||
| 339 | .fops = &etb_fops, | 339 | .fops = &etb_fops, |
| 340 | }; | 340 | }; |
| 341 | 341 | ||
| 342 | static int __devinit etb_probe(struct amba_device *dev, const struct amba_id *id) | 342 | static int etb_probe(struct amba_device *dev, const struct amba_id *id) |
| 343 | { | 343 | { |
| 344 | struct tracectx *t = &tracer; | 344 | struct tracectx *t = &tracer; |
| 345 | int ret = 0; | 345 | int ret = 0; |
| @@ -531,7 +531,7 @@ static ssize_t trace_mode_store(struct kobject *kobj, | |||
| 531 | static struct kobj_attribute trace_mode_attr = | 531 | static struct kobj_attribute trace_mode_attr = |
| 532 | __ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store); | 532 | __ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store); |
| 533 | 533 | ||
| 534 | static int __devinit etm_probe(struct amba_device *dev, const struct amba_id *id) | 534 | static int etm_probe(struct amba_device *dev, const struct amba_id *id) |
| 535 | { | 535 | { |
| 536 | struct tracectx *t = &tracer; | 536 | struct tracectx *t = &tracer; |
| 537 | int ret = 0; | 537 | int ret = 0; |
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c index 9a4f6307a016..5f6620684e25 100644 --- a/arch/arm/kernel/perf_event_cpu.c +++ b/arch/arm/kernel/perf_event_cpu.c | |||
| @@ -132,7 +132,7 @@ static int cpu_pmu_request_irq(struct arm_pmu *cpu_pmu, irq_handler_t handler) | |||
| 132 | return 0; | 132 | return 0; |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | static void __devinit cpu_pmu_init(struct arm_pmu *cpu_pmu) | 135 | static void cpu_pmu_init(struct arm_pmu *cpu_pmu) |
| 136 | { | 136 | { |
| 137 | int cpu; | 137 | int cpu; |
| 138 | for_each_possible_cpu(cpu) { | 138 | for_each_possible_cpu(cpu) { |
| @@ -178,7 +178,7 @@ static struct notifier_block __cpuinitdata cpu_pmu_hotplug_notifier = { | |||
| 178 | /* | 178 | /* |
| 179 | * PMU platform driver and devicetree bindings. | 179 | * PMU platform driver and devicetree bindings. |
| 180 | */ | 180 | */ |
| 181 | static struct of_device_id __devinitdata cpu_pmu_of_device_ids[] = { | 181 | static struct of_device_id cpu_pmu_of_device_ids[] = { |
| 182 | {.compatible = "arm,cortex-a15-pmu", .data = armv7_a15_pmu_init}, | 182 | {.compatible = "arm,cortex-a15-pmu", .data = armv7_a15_pmu_init}, |
| 183 | {.compatible = "arm,cortex-a9-pmu", .data = armv7_a9_pmu_init}, | 183 | {.compatible = "arm,cortex-a9-pmu", .data = armv7_a9_pmu_init}, |
| 184 | {.compatible = "arm,cortex-a8-pmu", .data = armv7_a8_pmu_init}, | 184 | {.compatible = "arm,cortex-a8-pmu", .data = armv7_a8_pmu_init}, |
| @@ -190,7 +190,7 @@ static struct of_device_id __devinitdata cpu_pmu_of_device_ids[] = { | |||
| 190 | {}, | 190 | {}, |
| 191 | }; | 191 | }; |
| 192 | 192 | ||
| 193 | static struct platform_device_id __devinitdata cpu_pmu_plat_device_ids[] = { | 193 | static struct platform_device_id cpu_pmu_plat_device_ids[] = { |
| 194 | {.name = "arm-pmu"}, | 194 | {.name = "arm-pmu"}, |
| 195 | {}, | 195 | {}, |
| 196 | }; | 196 | }; |
| @@ -198,7 +198,7 @@ static struct platform_device_id __devinitdata cpu_pmu_plat_device_ids[] = { | |||
| 198 | /* | 198 | /* |
| 199 | * CPU PMU identification and probing. | 199 | * CPU PMU identification and probing. |
| 200 | */ | 200 | */ |
| 201 | static int __devinit probe_current_pmu(struct arm_pmu *pmu) | 201 | static int probe_current_pmu(struct arm_pmu *pmu) |
| 202 | { | 202 | { |
| 203 | int cpu = get_cpu(); | 203 | int cpu = get_cpu(); |
| 204 | unsigned long cpuid = read_cpuid_id(); | 204 | unsigned long cpuid = read_cpuid_id(); |
| @@ -252,7 +252,7 @@ static int __devinit probe_current_pmu(struct arm_pmu *pmu) | |||
| 252 | return ret; | 252 | return ret; |
| 253 | } | 253 | } |
| 254 | 254 | ||
| 255 | static int __devinit cpu_pmu_device_probe(struct platform_device *pdev) | 255 | static int cpu_pmu_device_probe(struct platform_device *pdev) |
| 256 | { | 256 | { |
| 257 | const struct of_device_id *of_id; | 257 | const struct of_device_id *of_id; |
| 258 | int (*init_fn)(struct arm_pmu *); | 258 | int (*init_fn)(struct arm_pmu *); |
diff --git a/arch/arm/kernel/perf_event_v6.c b/arch/arm/kernel/perf_event_v6.c index f3e22ff8b6a2..041d0526a288 100644 --- a/arch/arm/kernel/perf_event_v6.c +++ b/arch/arm/kernel/perf_event_v6.c | |||
| @@ -653,7 +653,7 @@ static int armv6_map_event(struct perf_event *event) | |||
| 653 | &armv6_perf_cache_map, 0xFF); | 653 | &armv6_perf_cache_map, 0xFF); |
| 654 | } | 654 | } |
| 655 | 655 | ||
| 656 | static int __devinit armv6pmu_init(struct arm_pmu *cpu_pmu) | 656 | static int armv6pmu_init(struct arm_pmu *cpu_pmu) |
| 657 | { | 657 | { |
| 658 | cpu_pmu->name = "v6"; | 658 | cpu_pmu->name = "v6"; |
| 659 | cpu_pmu->handle_irq = armv6pmu_handle_irq; | 659 | cpu_pmu->handle_irq = armv6pmu_handle_irq; |
| @@ -685,7 +685,7 @@ static int armv6mpcore_map_event(struct perf_event *event) | |||
| 685 | &armv6mpcore_perf_cache_map, 0xFF); | 685 | &armv6mpcore_perf_cache_map, 0xFF); |
| 686 | } | 686 | } |
| 687 | 687 | ||
| 688 | static int __devinit armv6mpcore_pmu_init(struct arm_pmu *cpu_pmu) | 688 | static int armv6mpcore_pmu_init(struct arm_pmu *cpu_pmu) |
| 689 | { | 689 | { |
| 690 | cpu_pmu->name = "v6mpcore"; | 690 | cpu_pmu->name = "v6mpcore"; |
| 691 | cpu_pmu->handle_irq = armv6pmu_handle_irq; | 691 | cpu_pmu->handle_irq = armv6pmu_handle_irq; |
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index 7d0cce85d17e..4fbc757d9cff 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c | |||
| @@ -1226,7 +1226,7 @@ static void armv7pmu_init(struct arm_pmu *cpu_pmu) | |||
| 1226 | cpu_pmu->max_period = (1LLU << 32) - 1; | 1226 | cpu_pmu->max_period = (1LLU << 32) - 1; |
| 1227 | }; | 1227 | }; |
| 1228 | 1228 | ||
| 1229 | static u32 __devinit armv7_read_num_pmnc_events(void) | 1229 | static u32 armv7_read_num_pmnc_events(void) |
| 1230 | { | 1230 | { |
| 1231 | u32 nb_cnt; | 1231 | u32 nb_cnt; |
| 1232 | 1232 | ||
| @@ -1237,7 +1237,7 @@ static u32 __devinit armv7_read_num_pmnc_events(void) | |||
| 1237 | return nb_cnt + 1; | 1237 | return nb_cnt + 1; |
| 1238 | } | 1238 | } |
| 1239 | 1239 | ||
| 1240 | static int __devinit armv7_a8_pmu_init(struct arm_pmu *cpu_pmu) | 1240 | static int armv7_a8_pmu_init(struct arm_pmu *cpu_pmu) |
| 1241 | { | 1241 | { |
| 1242 | armv7pmu_init(cpu_pmu); | 1242 | armv7pmu_init(cpu_pmu); |
| 1243 | cpu_pmu->name = "ARMv7 Cortex-A8"; | 1243 | cpu_pmu->name = "ARMv7 Cortex-A8"; |
| @@ -1246,7 +1246,7 @@ static int __devinit armv7_a8_pmu_init(struct arm_pmu *cpu_pmu) | |||
| 1246 | return 0; | 1246 | return 0; |
| 1247 | } | 1247 | } |
| 1248 | 1248 | ||
| 1249 | static int __devinit armv7_a9_pmu_init(struct arm_pmu *cpu_pmu) | 1249 | static int armv7_a9_pmu_init(struct arm_pmu *cpu_pmu) |
| 1250 | { | 1250 | { |
| 1251 | armv7pmu_init(cpu_pmu); | 1251 | armv7pmu_init(cpu_pmu); |
| 1252 | cpu_pmu->name = "ARMv7 Cortex-A9"; | 1252 | cpu_pmu->name = "ARMv7 Cortex-A9"; |
| @@ -1255,7 +1255,7 @@ static int __devinit armv7_a9_pmu_init(struct arm_pmu *cpu_pmu) | |||
| 1255 | return 0; | 1255 | return 0; |
| 1256 | } | 1256 | } |
| 1257 | 1257 | ||
| 1258 | static int __devinit armv7_a5_pmu_init(struct arm_pmu *cpu_pmu) | 1258 | static int armv7_a5_pmu_init(struct arm_pmu *cpu_pmu) |
| 1259 | { | 1259 | { |
| 1260 | armv7pmu_init(cpu_pmu); | 1260 | armv7pmu_init(cpu_pmu); |
| 1261 | cpu_pmu->name = "ARMv7 Cortex-A5"; | 1261 | cpu_pmu->name = "ARMv7 Cortex-A5"; |
| @@ -1264,7 +1264,7 @@ static int __devinit armv7_a5_pmu_init(struct arm_pmu *cpu_pmu) | |||
| 1264 | return 0; | 1264 | return 0; |
| 1265 | } | 1265 | } |
| 1266 | 1266 | ||
| 1267 | static int __devinit armv7_a15_pmu_init(struct arm_pmu *cpu_pmu) | 1267 | static int armv7_a15_pmu_init(struct arm_pmu *cpu_pmu) |
| 1268 | { | 1268 | { |
| 1269 | armv7pmu_init(cpu_pmu); | 1269 | armv7pmu_init(cpu_pmu); |
| 1270 | cpu_pmu->name = "ARMv7 Cortex-A15"; | 1270 | cpu_pmu->name = "ARMv7 Cortex-A15"; |
| @@ -1274,7 +1274,7 @@ static int __devinit armv7_a15_pmu_init(struct arm_pmu *cpu_pmu) | |||
| 1274 | return 0; | 1274 | return 0; |
| 1275 | } | 1275 | } |
| 1276 | 1276 | ||
| 1277 | static int __devinit armv7_a7_pmu_init(struct arm_pmu *cpu_pmu) | 1277 | static int armv7_a7_pmu_init(struct arm_pmu *cpu_pmu) |
| 1278 | { | 1278 | { |
| 1279 | armv7pmu_init(cpu_pmu); | 1279 | armv7pmu_init(cpu_pmu); |
| 1280 | cpu_pmu->name = "ARMv7 Cortex-A7"; | 1280 | cpu_pmu->name = "ARMv7 Cortex-A7"; |
diff --git a/arch/arm/kernel/perf_event_xscale.c b/arch/arm/kernel/perf_event_xscale.c index 0c8265e53d5f..2b0fe30ec12e 100644 --- a/arch/arm/kernel/perf_event_xscale.c +++ b/arch/arm/kernel/perf_event_xscale.c | |||
| @@ -440,7 +440,7 @@ static int xscale_map_event(struct perf_event *event) | |||
| 440 | &xscale_perf_cache_map, 0xFF); | 440 | &xscale_perf_cache_map, 0xFF); |
| 441 | } | 441 | } |
| 442 | 442 | ||
| 443 | static int __devinit xscale1pmu_init(struct arm_pmu *cpu_pmu) | 443 | static int xscale1pmu_init(struct arm_pmu *cpu_pmu) |
| 444 | { | 444 | { |
| 445 | cpu_pmu->name = "xscale1"; | 445 | cpu_pmu->name = "xscale1"; |
| 446 | cpu_pmu->handle_irq = xscale1pmu_handle_irq; | 446 | cpu_pmu->handle_irq = xscale1pmu_handle_irq; |
| @@ -810,7 +810,7 @@ static inline void xscale2pmu_write_counter(struct perf_event *event, u32 val) | |||
| 810 | } | 810 | } |
| 811 | } | 811 | } |
| 812 | 812 | ||
| 813 | static int __devinit xscale2pmu_init(struct arm_pmu *cpu_pmu) | 813 | static int xscale2pmu_init(struct arm_pmu *cpu_pmu) |
| 814 | { | 814 | { |
| 815 | cpu_pmu->name = "xscale2"; | 815 | cpu_pmu->name = "xscale2"; |
| 816 | cpu_pmu->handle_irq = xscale2pmu_handle_irq; | 816 | cpu_pmu->handle_irq = xscale2pmu_handle_irq; |
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 9211e8800c79..6e2f1631df5b 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c | |||
| @@ -358,7 +358,7 @@ static int cpld_video_probe(struct i2c_client *client, | |||
| 358 | return 0; | 358 | return 0; |
| 359 | } | 359 | } |
| 360 | 360 | ||
| 361 | static int __devexit cpld_video_remove(struct i2c_client *client) | 361 | static int cpld_video_remove(struct i2c_client *client) |
| 362 | { | 362 | { |
| 363 | cpld_client = NULL; | 363 | cpld_client = NULL; |
| 364 | return 0; | 364 | return 0; |
diff --git a/arch/arm/mach-davinci/cdce949.c b/arch/arm/mach-davinci/cdce949.c index f2232ca6d070..abafb92031c0 100644 --- a/arch/arm/mach-davinci/cdce949.c +++ b/arch/arm/mach-davinci/cdce949.c | |||
| @@ -256,7 +256,7 @@ static int cdce_probe(struct i2c_client *client, | |||
| 256 | return 0; | 256 | return 0; |
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | static int __devexit cdce_remove(struct i2c_client *client) | 259 | static int cdce_remove(struct i2c_client *client) |
| 260 | { | 260 | { |
| 261 | cdce_i2c_client = NULL; | 261 | cdce_i2c_client = NULL; |
| 262 | return 0; | 262 | return 0; |
| @@ -274,7 +274,7 @@ static struct i2c_driver cdce_driver = { | |||
| 274 | .name = "cdce949", | 274 | .name = "cdce949", |
| 275 | }, | 275 | }, |
| 276 | .probe = cdce_probe, | 276 | .probe = cdce_probe, |
| 277 | .remove = __devexit_p(cdce_remove), | 277 | .remove = cdce_remove, |
| 278 | .id_table = cdce_id, | 278 | .id_table = cdce_id, |
| 279 | }; | 279 | }; |
| 280 | 280 | ||
diff --git a/arch/arm/mach-dove/pcie.c b/arch/arm/mach-dove/pcie.c index 0ef4435b1657..8a275f297522 100644 --- a/arch/arm/mach-dove/pcie.c +++ b/arch/arm/mach-dove/pcie.c | |||
| @@ -135,7 +135,7 @@ static struct pci_ops pcie_ops = { | |||
| 135 | .write = pcie_wr_conf, | 135 | .write = pcie_wr_conf, |
| 136 | }; | 136 | }; |
| 137 | 137 | ||
| 138 | static void __devinit rc_pci_fixup(struct pci_dev *dev) | 138 | static void rc_pci_fixup(struct pci_dev *dev) |
| 139 | { | 139 | { |
| 140 | /* | 140 | /* |
| 141 | * Prevent enumeration of root complex. | 141 | * Prevent enumeration of root complex. |
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 91d5b6f1d5af..e103c290bc9e 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig | |||
| @@ -74,6 +74,8 @@ config SOC_EXYNOS5440 | |||
| 74 | depends on ARCH_EXYNOS5 | 74 | depends on ARCH_EXYNOS5 |
| 75 | select ARM_ARCH_TIMER | 75 | select ARM_ARCH_TIMER |
| 76 | select AUTO_ZRELADDR | 76 | select AUTO_ZRELADDR |
| 77 | select PINCTRL | ||
| 78 | select PINCTRL_EXYNOS5440 | ||
| 77 | help | 79 | help |
| 78 | Enable EXYNOS5440 SoC support | 80 | Enable EXYNOS5440 SoC support |
| 79 | 81 | ||
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index d6d0dc651089..1a89824a5f78 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
| @@ -424,11 +424,18 @@ static void __init exynos5_init_clocks(int xtal) | |||
| 424 | { | 424 | { |
| 425 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); | 425 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); |
| 426 | 426 | ||
| 427 | /* EXYNOS5440 can support only common clock framework */ | ||
| 428 | |||
| 429 | if (soc_is_exynos5440()) | ||
| 430 | return; | ||
| 431 | |||
| 432 | #ifdef CONFIG_SOC_EXYNOS5250 | ||
| 427 | s3c24xx_register_baseclocks(xtal); | 433 | s3c24xx_register_baseclocks(xtal); |
| 428 | s5p_register_clocks(xtal); | 434 | s5p_register_clocks(xtal); |
| 429 | 435 | ||
| 430 | exynos5_register_clocks(); | 436 | exynos5_register_clocks(); |
| 431 | exynos5_setup_clocks(); | 437 | exynos5_setup_clocks(); |
| 438 | #endif | ||
| 432 | } | 439 | } |
| 433 | 440 | ||
| 434 | #define COMBINER_ENABLE_SET 0x0 | 441 | #define COMBINER_ENABLE_SET 0x0 |
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index dc248167d206..981dc1e1da51 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
| @@ -135,7 +135,7 @@ static struct sys_timer highbank_timer = { | |||
| 135 | 135 | ||
| 136 | static void highbank_power_off(void) | 136 | static void highbank_power_off(void) |
| 137 | { | 137 | { |
| 138 | hignbank_set_pwr_shutdown(); | 138 | highbank_set_pwr_shutdown(); |
| 139 | 139 | ||
| 140 | while (1) | 140 | while (1) |
| 141 | cpu_do_idle(); | 141 | cpu_do_idle(); |
diff --git a/arch/arm/mach-highbank/hotplug.c b/arch/arm/mach-highbank/hotplug.c index 7b60faccd551..f30c52843396 100644 --- a/arch/arm/mach-highbank/hotplug.c +++ b/arch/arm/mach-highbank/hotplug.c | |||
| @@ -30,7 +30,7 @@ void __ref highbank_cpu_die(unsigned int cpu) | |||
| 30 | { | 30 | { |
| 31 | flush_cache_all(); | 31 | flush_cache_all(); |
| 32 | 32 | ||
| 33 | highbank_set_cpu_jump(cpu, secondary_startup); | 33 | highbank_set_cpu_jump(cpu, phys_to_virt(0)); |
| 34 | highbank_set_core_pwr(); | 34 | highbank_set_core_pwr(); |
| 35 | 35 | ||
| 36 | cpu_do_idle(); | 36 | cpu_do_idle(); |
diff --git a/arch/arm/mach-highbank/platsmp.c b/arch/arm/mach-highbank/platsmp.c index 1129957f6c1d..4ecc864ac8b9 100644 --- a/arch/arm/mach-highbank/platsmp.c +++ b/arch/arm/mach-highbank/platsmp.c | |||
| @@ -32,6 +32,7 @@ static void __cpuinit highbank_secondary_init(unsigned int cpu) | |||
| 32 | 32 | ||
| 33 | static int __cpuinit highbank_boot_secondary(unsigned int cpu, struct task_struct *idle) | 33 | static int __cpuinit highbank_boot_secondary(unsigned int cpu, struct task_struct *idle) |
| 34 | { | 34 | { |
| 35 | highbank_set_cpu_jump(cpu, secondary_startup); | ||
| 35 | gic_raise_softirq(cpumask_of(cpu), 0); | 36 | gic_raise_softirq(cpumask_of(cpu), 0); |
| 36 | return 0; | 37 | return 0; |
| 37 | } | 38 | } |
| @@ -61,19 +62,8 @@ static void __init highbank_smp_init_cpus(void) | |||
| 61 | 62 | ||
| 62 | static void __init highbank_smp_prepare_cpus(unsigned int max_cpus) | 63 | static void __init highbank_smp_prepare_cpus(unsigned int max_cpus) |
| 63 | { | 64 | { |
| 64 | int i; | ||
| 65 | |||
| 66 | if (scu_base_addr) | 65 | if (scu_base_addr) |
| 67 | scu_enable(scu_base_addr); | 66 | scu_enable(scu_base_addr); |
| 68 | |||
| 69 | /* | ||
| 70 | * Write the address of secondary startup into the jump table | ||
| 71 | * The cores are in wfi and wait until they receive a soft interrupt | ||
| 72 | * and a non-zero value to jump to. Then the secondary CPU branches | ||
| 73 | * to this address. | ||
| 74 | */ | ||
| 75 | for (i = 1; i < max_cpus; i++) | ||
| 76 | highbank_set_cpu_jump(i, secondary_startup); | ||
| 77 | } | 67 | } |
| 78 | 68 | ||
| 79 | struct smp_operations highbank_smp_ops __initdata = { | 69 | struct smp_operations highbank_smp_ops __initdata = { |
diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c index 74aa135966f0..04eddb4f4380 100644 --- a/arch/arm/mach-highbank/pm.c +++ b/arch/arm/mach-highbank/pm.c | |||
| @@ -14,10 +14,12 @@ | |||
| 14 | * this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include <linux/cpu_pm.h> | ||
| 17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
| 18 | #include <linux/io.h> | 19 | #include <linux/io.h> |
| 19 | #include <linux/suspend.h> | 20 | #include <linux/suspend.h> |
| 20 | 21 | ||
| 22 | #include <asm/cacheflush.h> | ||
| 21 | #include <asm/proc-fns.h> | 23 | #include <asm/proc-fns.h> |
| 22 | #include <asm/suspend.h> | 24 | #include <asm/suspend.h> |
| 23 | 25 | ||
| @@ -26,16 +28,31 @@ | |||
| 26 | 28 | ||
| 27 | static int highbank_suspend_finish(unsigned long val) | 29 | static int highbank_suspend_finish(unsigned long val) |
| 28 | { | 30 | { |
| 31 | outer_flush_all(); | ||
| 32 | outer_disable(); | ||
| 33 | |||
| 34 | highbank_set_pwr_suspend(); | ||
| 35 | |||
| 29 | cpu_do_idle(); | 36 | cpu_do_idle(); |
| 37 | |||
| 38 | highbank_clear_pwr_request(); | ||
| 30 | return 0; | 39 | return 0; |
| 31 | } | 40 | } |
| 32 | 41 | ||
| 33 | static int highbank_pm_enter(suspend_state_t state) | 42 | static int highbank_pm_enter(suspend_state_t state) |
| 34 | { | 43 | { |
| 35 | hignbank_set_pwr_suspend(); | 44 | cpu_pm_enter(); |
| 45 | cpu_cluster_pm_enter(); | ||
| 46 | |||
| 36 | highbank_set_cpu_jump(0, cpu_resume); | 47 | highbank_set_cpu_jump(0, cpu_resume); |
| 37 | cpu_suspend(0, highbank_suspend_finish); | 48 | cpu_suspend(0, highbank_suspend_finish); |
| 38 | 49 | ||
| 50 | cpu_cluster_pm_exit(); | ||
| 51 | cpu_pm_exit(); | ||
| 52 | |||
| 53 | highbank_smc1(0x102, 0x1); | ||
| 54 | if (scu_base_addr) | ||
| 55 | scu_enable(scu_base_addr); | ||
| 39 | return 0; | 56 | return 0; |
| 40 | } | 57 | } |
| 41 | 58 | ||
diff --git a/arch/arm/mach-highbank/sysregs.h b/arch/arm/mach-highbank/sysregs.h index e13e8ea7c6cb..70af9d13fcef 100644 --- a/arch/arm/mach-highbank/sysregs.h +++ b/arch/arm/mach-highbank/sysregs.h | |||
| @@ -44,28 +44,43 @@ static inline void highbank_set_core_pwr(void) | |||
| 44 | writel_relaxed(1, sregs_base + SREG_CPU_PWR_CTRL(cpu)); | 44 | writel_relaxed(1, sregs_base + SREG_CPU_PWR_CTRL(cpu)); |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | static inline void hignbank_set_pwr_suspend(void) | 47 | static inline void highbank_clear_core_pwr(void) |
| 48 | { | ||
| 49 | int cpu = cpu_logical_map(smp_processor_id()); | ||
| 50 | if (scu_base_addr) | ||
| 51 | scu_power_mode(scu_base_addr, SCU_PM_NORMAL); | ||
| 52 | else | ||
| 53 | writel_relaxed(0, sregs_base + SREG_CPU_PWR_CTRL(cpu)); | ||
| 54 | } | ||
| 55 | |||
| 56 | static inline void highbank_set_pwr_suspend(void) | ||
| 48 | { | 57 | { |
| 49 | writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ); | 58 | writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ); |
| 50 | highbank_set_core_pwr(); | 59 | highbank_set_core_pwr(); |
| 51 | } | 60 | } |
| 52 | 61 | ||
| 53 | static inline void hignbank_set_pwr_shutdown(void) | 62 | static inline void highbank_set_pwr_shutdown(void) |
| 54 | { | 63 | { |
| 55 | writel(HB_PWR_SHUTDOWN, sregs_base + HB_SREG_A9_PWR_REQ); | 64 | writel(HB_PWR_SHUTDOWN, sregs_base + HB_SREG_A9_PWR_REQ); |
| 56 | highbank_set_core_pwr(); | 65 | highbank_set_core_pwr(); |
| 57 | } | 66 | } |
| 58 | 67 | ||
| 59 | static inline void hignbank_set_pwr_soft_reset(void) | 68 | static inline void highbank_set_pwr_soft_reset(void) |
| 60 | { | 69 | { |
| 61 | writel(HB_PWR_SOFT_RESET, sregs_base + HB_SREG_A9_PWR_REQ); | 70 | writel(HB_PWR_SOFT_RESET, sregs_base + HB_SREG_A9_PWR_REQ); |
| 62 | highbank_set_core_pwr(); | 71 | highbank_set_core_pwr(); |
| 63 | } | 72 | } |
| 64 | 73 | ||
| 65 | static inline void hignbank_set_pwr_hard_reset(void) | 74 | static inline void highbank_set_pwr_hard_reset(void) |
| 66 | { | 75 | { |
| 67 | writel(HB_PWR_HARD_RESET, sregs_base + HB_SREG_A9_PWR_REQ); | 76 | writel(HB_PWR_HARD_RESET, sregs_base + HB_SREG_A9_PWR_REQ); |
| 68 | highbank_set_core_pwr(); | 77 | highbank_set_core_pwr(); |
| 69 | } | 78 | } |
| 70 | 79 | ||
| 80 | static inline void highbank_clear_pwr_request(void) | ||
| 81 | { | ||
| 82 | writel(~0UL, sregs_base + HB_SREG_A9_PWR_REQ); | ||
| 83 | highbank_clear_core_pwr(); | ||
| 84 | } | ||
| 85 | |||
| 71 | #endif | 86 | #endif |
diff --git a/arch/arm/mach-highbank/system.c b/arch/arm/mach-highbank/system.c index aed96ad9bd4a..37d8384dcf19 100644 --- a/arch/arm/mach-highbank/system.c +++ b/arch/arm/mach-highbank/system.c | |||
| @@ -22,9 +22,9 @@ | |||
| 22 | void highbank_restart(char mode, const char *cmd) | 22 | void highbank_restart(char mode, const char *cmd) |
| 23 | { | 23 | { |
| 24 | if (mode == 'h') | 24 | if (mode == 'h') |
| 25 | hignbank_set_pwr_hard_reset(); | 25 | highbank_set_pwr_hard_reset(); |
| 26 | else | 26 | else |
| 27 | hignbank_set_pwr_soft_reset(); | 27 | highbank_set_pwr_soft_reset(); |
| 28 | 28 | ||
| 29 | while (1) | 29 | while (1) |
| 30 | cpu_do_idle(); | 30 | cpu_do_idle(); |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 1ad0d76de8c7..3e628fd7a674 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
| @@ -841,8 +841,6 @@ config SOC_IMX6Q | |||
| 841 | select ARCH_HAS_CPUFREQ | 841 | select ARCH_HAS_CPUFREQ |
| 842 | select ARCH_HAS_OPP | 842 | select ARCH_HAS_OPP |
| 843 | select ARM_CPU_SUSPEND if PM | 843 | select ARM_CPU_SUSPEND if PM |
| 844 | select ARM_ERRATA_743622 | ||
| 845 | select ARM_ERRATA_751472 | ||
| 846 | select ARM_ERRATA_754322 | 844 | select ARM_ERRATA_754322 |
| 847 | select ARM_ERRATA_764369 if SMP | 845 | select ARM_ERRATA_764369 if SMP |
| 848 | select ARM_ERRATA_775420 | 846 | select ARM_ERRATA_775420 |
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c index b197aa73dc4b..2c570cdaae7b 100644 --- a/arch/arm/mach-imx/clk-imx25.c +++ b/arch/arm/mach-imx/clk-imx25.c | |||
| @@ -254,9 +254,9 @@ int __init mx25_clocks_init(void) | |||
| 254 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); | 254 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); |
| 255 | clk_register_clkdev(clk[usbotg_ahb], "ahb", "mxc-ehci.2"); | 255 | clk_register_clkdev(clk[usbotg_ahb], "ahb", "mxc-ehci.2"); |
| 256 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2"); | 256 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2"); |
| 257 | clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc"); | 257 | clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27"); |
| 258 | clk_register_clkdev(clk[usbotg_ahb], "ahb", "fsl-usb2-udc"); | 258 | clk_register_clkdev(clk[usbotg_ahb], "ahb", "imx-udc-mx27"); |
| 259 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); | 259 | clk_register_clkdev(clk[usb_div], "per", "imx-udc-mx27"); |
| 260 | clk_register_clkdev(clk[nfc_ipg_per], NULL, "imx25-nand.0"); | 260 | clk_register_clkdev(clk[nfc_ipg_per], NULL, "imx25-nand.0"); |
| 261 | /* i.mx25 has the i.mx35 type cspi */ | 261 | /* i.mx25 has the i.mx35 type cspi */ |
| 262 | clk_register_clkdev(clk[cspi1_ipg], NULL, "imx35-cspi.0"); | 262 | clk_register_clkdev(clk[cspi1_ipg], NULL, "imx35-cspi.0"); |
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 4c1d1e4efc74..1ffe3b534e51 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c | |||
| @@ -236,9 +236,9 @@ int __init mx27_clocks_init(unsigned long fref) | |||
| 236 | clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0"); | 236 | clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0"); |
| 237 | clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0"); | 237 | clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0"); |
| 238 | clk_register_clkdev(clk[per4_gate], "per", "imx27-camera.0"); | 238 | clk_register_clkdev(clk[per4_gate], "per", "imx27-camera.0"); |
| 239 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); | 239 | clk_register_clkdev(clk[usb_div], "per", "imx-udc-mx27"); |
| 240 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc"); | 240 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "imx-udc-mx27"); |
| 241 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc"); | 241 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "imx-udc-mx27"); |
| 242 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.0"); | 242 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.0"); |
| 243 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "mxc-ehci.0"); | 243 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "mxc-ehci.0"); |
| 244 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.0"); | 244 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.0"); |
diff --git a/arch/arm/mach-imx/clk-imx31.c b/arch/arm/mach-imx/clk-imx31.c index 8be64e0a4ace..16ccbd41dea9 100644 --- a/arch/arm/mach-imx/clk-imx31.c +++ b/arch/arm/mach-imx/clk-imx31.c | |||
| @@ -139,9 +139,9 @@ int __init mx31_clocks_init(unsigned long fref) | |||
| 139 | clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.2"); | 139 | clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.2"); |
| 140 | clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.2"); | 140 | clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.2"); |
| 141 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); | 141 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); |
| 142 | clk_register_clkdev(clk[usb_div_post], "per", "fsl-usb2-udc"); | 142 | clk_register_clkdev(clk[usb_div_post], "per", "imx-udc-mx27"); |
| 143 | clk_register_clkdev(clk[usb_gate], "ahb", "fsl-usb2-udc"); | 143 | clk_register_clkdev(clk[usb_gate], "ahb", "imx-udc-mx27"); |
| 144 | clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc"); | 144 | clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27"); |
| 145 | clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0"); | 145 | clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0"); |
| 146 | /* i.mx31 has the i.mx21 type uart */ | 146 | /* i.mx31 has the i.mx21 type uart */ |
| 147 | clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0"); | 147 | clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0"); |
diff --git a/arch/arm/mach-imx/clk-imx35.c b/arch/arm/mach-imx/clk-imx35.c index 66f3d65ea275..f0727e80815d 100644 --- a/arch/arm/mach-imx/clk-imx35.c +++ b/arch/arm/mach-imx/clk-imx35.c | |||
| @@ -251,9 +251,9 @@ int __init mx35_clocks_init() | |||
| 251 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2"); | 251 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2"); |
| 252 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); | 252 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); |
| 253 | clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.2"); | 253 | clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.2"); |
| 254 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); | 254 | clk_register_clkdev(clk[usb_div], "per", "imx-udc-mx27"); |
| 255 | clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc"); | 255 | clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27"); |
| 256 | clk_register_clkdev(clk[usbotg_gate], "ahb", "fsl-usb2-udc"); | 256 | clk_register_clkdev(clk[usbotg_gate], "ahb", "imx-udc-mx27"); |
| 257 | clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); | 257 | clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); |
| 258 | clk_register_clkdev(clk[nfc_div], NULL, "imx25-nand.0"); | 258 | clk_register_clkdev(clk[nfc_div], NULL, "imx25-nand.0"); |
| 259 | clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0"); | 259 | clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0"); |
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c index 579023f59dc1..fb7cb841b64c 100644 --- a/arch/arm/mach-imx/clk-imx51-imx53.c +++ b/arch/arm/mach-imx/clk-imx51-imx53.c | |||
| @@ -269,9 +269,9 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil, | |||
| 269 | clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.2"); | 269 | clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.2"); |
| 270 | clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.2"); | 270 | clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.2"); |
| 271 | clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.2"); | 271 | clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.2"); |
| 272 | clk_register_clkdev(clk[usboh3_per_gate], "per", "fsl-usb2-udc"); | 272 | clk_register_clkdev(clk[usboh3_per_gate], "per", "imx-udc-mx51"); |
| 273 | clk_register_clkdev(clk[usboh3_gate], "ipg", "fsl-usb2-udc"); | 273 | clk_register_clkdev(clk[usboh3_gate], "ipg", "imx-udc-mx51"); |
| 274 | clk_register_clkdev(clk[usboh3_gate], "ahb", "fsl-usb2-udc"); | 274 | clk_register_clkdev(clk[usboh3_gate], "ahb", "imx-udc-mx51"); |
| 275 | clk_register_clkdev(clk[nfc_gate], NULL, "imx51-nand"); | 275 | clk_register_clkdev(clk[nfc_gate], NULL, "imx51-nand"); |
| 276 | clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0"); | 276 | clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0"); |
| 277 | clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); | 277 | clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); |
diff --git a/arch/arm/mach-imx/cpufreq.c b/arch/arm/mach-imx/cpufreq.c index 36e8b3994470..d8c75c3c925d 100644 --- a/arch/arm/mach-imx/cpufreq.c +++ b/arch/arm/mach-imx/cpufreq.c | |||
| @@ -188,7 +188,7 @@ static struct cpufreq_driver mxc_driver = { | |||
| 188 | .name = "imx", | 188 | .name = "imx", |
| 189 | }; | 189 | }; |
| 190 | 190 | ||
| 191 | static int __devinit mxc_cpufreq_driver_init(void) | 191 | static int mxc_cpufreq_driver_init(void) |
| 192 | { | 192 | { |
| 193 | return cpufreq_register_driver(&mxc_driver); | 193 | return cpufreq_register_driver(&mxc_driver); |
| 194 | } | 194 | } |
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h index 6277baf1b7be..9bd5777ff0e7 100644 --- a/arch/arm/mach-imx/devices/devices-common.h +++ b/arch/arm/mach-imx/devices/devices-common.h | |||
| @@ -63,6 +63,7 @@ struct platform_device *__init imx_add_flexcan( | |||
| 63 | 63 | ||
| 64 | #include <linux/fsl_devices.h> | 64 | #include <linux/fsl_devices.h> |
| 65 | struct imx_fsl_usb2_udc_data { | 65 | struct imx_fsl_usb2_udc_data { |
| 66 | const char *devid; | ||
| 66 | resource_size_t iobase; | 67 | resource_size_t iobase; |
| 67 | resource_size_t irq; | 68 | resource_size_t irq; |
| 68 | }; | 69 | }; |
diff --git a/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c b/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c index 37e44398197b..3c06bd96e9cc 100644 --- a/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c +++ b/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c | |||
| @@ -11,35 +11,36 @@ | |||
| 11 | #include "../hardware.h" | 11 | #include "../hardware.h" |
| 12 | #include "devices-common.h" | 12 | #include "devices-common.h" |
| 13 | 13 | ||
| 14 | #define imx_fsl_usb2_udc_data_entry_single(soc) \ | 14 | #define imx_fsl_usb2_udc_data_entry_single(soc, _devid) \ |
| 15 | { \ | 15 | { \ |
| 16 | .devid = _devid, \ | ||
| 16 | .iobase = soc ## _USB_OTG_BASE_ADDR, \ | 17 | .iobase = soc ## _USB_OTG_BASE_ADDR, \ |
| 17 | .irq = soc ## _INT_USB_OTG, \ | 18 | .irq = soc ## _INT_USB_OTG, \ |
| 18 | } | 19 | } |
| 19 | 20 | ||
| 20 | #ifdef CONFIG_SOC_IMX25 | 21 | #ifdef CONFIG_SOC_IMX25 |
| 21 | const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst = | 22 | const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst = |
| 22 | imx_fsl_usb2_udc_data_entry_single(MX25); | 23 | imx_fsl_usb2_udc_data_entry_single(MX25, "imx-udc-mx27"); |
| 23 | #endif /* ifdef CONFIG_SOC_IMX25 */ | 24 | #endif /* ifdef CONFIG_SOC_IMX25 */ |
| 24 | 25 | ||
| 25 | #ifdef CONFIG_SOC_IMX27 | 26 | #ifdef CONFIG_SOC_IMX27 |
| 26 | const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst = | 27 | const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst = |
| 27 | imx_fsl_usb2_udc_data_entry_single(MX27); | 28 | imx_fsl_usb2_udc_data_entry_single(MX27, "imx-udc-mx27"); |
| 28 | #endif /* ifdef CONFIG_SOC_IMX27 */ | 29 | #endif /* ifdef CONFIG_SOC_IMX27 */ |
| 29 | 30 | ||
| 30 | #ifdef CONFIG_SOC_IMX31 | 31 | #ifdef CONFIG_SOC_IMX31 |
| 31 | const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst = | 32 | const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst = |
| 32 | imx_fsl_usb2_udc_data_entry_single(MX31); | 33 | imx_fsl_usb2_udc_data_entry_single(MX31, "imx-udc-mx27"); |
| 33 | #endif /* ifdef CONFIG_SOC_IMX31 */ | 34 | #endif /* ifdef CONFIG_SOC_IMX31 */ |
| 34 | 35 | ||
| 35 | #ifdef CONFIG_SOC_IMX35 | 36 | #ifdef CONFIG_SOC_IMX35 |
| 36 | const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst = | 37 | const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst = |
| 37 | imx_fsl_usb2_udc_data_entry_single(MX35); | 38 | imx_fsl_usb2_udc_data_entry_single(MX35, "imx-udc-mx27"); |
| 38 | #endif /* ifdef CONFIG_SOC_IMX35 */ | 39 | #endif /* ifdef CONFIG_SOC_IMX35 */ |
| 39 | 40 | ||
| 40 | #ifdef CONFIG_SOC_IMX51 | 41 | #ifdef CONFIG_SOC_IMX51 |
| 41 | const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data __initconst = | 42 | const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data __initconst = |
| 42 | imx_fsl_usb2_udc_data_entry_single(MX51); | 43 | imx_fsl_usb2_udc_data_entry_single(MX51, "imx-udc-mx51"); |
| 43 | #endif | 44 | #endif |
| 44 | 45 | ||
| 45 | struct platform_device *__init imx_add_fsl_usb2_udc( | 46 | struct platform_device *__init imx_add_fsl_usb2_udc( |
| @@ -57,7 +58,7 @@ struct platform_device *__init imx_add_fsl_usb2_udc( | |||
| 57 | .flags = IORESOURCE_IRQ, | 58 | .flags = IORESOURCE_IRQ, |
| 58 | }, | 59 | }, |
| 59 | }; | 60 | }; |
| 60 | return imx_add_platform_device_dmamask("fsl-usb2-udc", -1, | 61 | return imx_add_platform_device_dmamask(data->devid, -1, |
| 61 | res, ARRAY_SIZE(res), | 62 | res, ARRAY_SIZE(res), |
| 62 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | 63 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); |
| 63 | } | 64 | } |
diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c index c461e98496c3..7a9686ad994c 100644 --- a/arch/arm/mach-imx/mmdc.c +++ b/arch/arm/mach-imx/mmdc.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #define BP_MMDC_MAPSR_PSD 0 | 21 | #define BP_MMDC_MAPSR_PSD 0 |
| 22 | #define BP_MMDC_MAPSR_PSS 4 | 22 | #define BP_MMDC_MAPSR_PSS 4 |
| 23 | 23 | ||
| 24 | static int __devinit imx_mmdc_probe(struct platform_device *pdev) | 24 | static int imx_mmdc_probe(struct platform_device *pdev) |
| 25 | { | 25 | { |
| 26 | struct device_node *np = pdev->dev.of_node; | 26 | struct device_node *np = pdev->dev.of_node; |
| 27 | void __iomem *mmdc_base, *reg; | 27 | void __iomem *mmdc_base, *reg; |
diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c index 2f28018c4447..9082b84aeebb 100644 --- a/arch/arm/mach-iop13xx/pci.c +++ b/arch/arm/mach-iop13xx/pci.c | |||
| @@ -504,7 +504,7 @@ iop13xx_pci_abort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
| 504 | 504 | ||
| 505 | /* Scan an IOP13XX PCI bus. nr selects which ATU we use. | 505 | /* Scan an IOP13XX PCI bus. nr selects which ATU we use. |
| 506 | */ | 506 | */ |
| 507 | struct pci_bus * __devinit iop13xx_scan_bus(int nr, struct pci_sys_data *sys) | 507 | struct pci_bus *iop13xx_scan_bus(int nr, struct pci_sys_data *sys) |
| 508 | { | 508 | { |
| 509 | int which_atu; | 509 | int which_atu; |
| 510 | struct pci_bus *bus = NULL; | 510 | struct pci_bus *bus = NULL; |
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index ff4150a2ad05..de4fd2bb1e27 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
| @@ -67,6 +67,10 @@ static void __init kirkwood_legacy_clk_init(void) | |||
| 67 | orion_clkdev_add(NULL, "mv643xx_eth_port.1", | 67 | orion_clkdev_add(NULL, "mv643xx_eth_port.1", |
| 68 | of_clk_get_from_provider(&clkspec)); | 68 | of_clk_get_from_provider(&clkspec)); |
| 69 | 69 | ||
| 70 | clkspec.args[0] = CGC_BIT_SDIO; | ||
| 71 | orion_clkdev_add(NULL, "mvsdio", | ||
| 72 | of_clk_get_from_provider(&clkspec)); | ||
| 73 | |||
| 70 | } | 74 | } |
| 71 | 75 | ||
| 72 | static void __init kirkwood_of_clk_init(void) | 76 | static void __init kirkwood_of_clk_init(void) |
diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c index 15e69fcde9f4..23d2dd1b1b1e 100644 --- a/arch/arm/mach-kirkwood/board-usi_topkick.c +++ b/arch/arm/mach-kirkwood/board-usi_topkick.c | |||
| @@ -64,8 +64,6 @@ static unsigned int topkick_mpp_config[] __initdata = { | |||
| 64 | 0 | 64 | 0 |
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| 67 | #define TOPKICK_SATA0_PWR_ENABLE 36 | ||
| 68 | |||
| 69 | void __init usi_topkick_init(void) | 67 | void __init usi_topkick_init(void) |
| 70 | { | 68 | { |
| 71 | /* | 69 | /* |
| @@ -73,8 +71,6 @@ void __init usi_topkick_init(void) | |||
| 73 | */ | 71 | */ |
| 74 | kirkwood_mpp_conf(topkick_mpp_config); | 72 | kirkwood_mpp_conf(topkick_mpp_config); |
| 75 | 73 | ||
| 76 | /* SATA0 power enable */ | ||
| 77 | gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1); | ||
| 78 | 74 | ||
| 79 | kirkwood_ge00_init(&topkick_ge00_data); | 75 | kirkwood_ge00_init(&topkick_ge00_data); |
| 80 | kirkwood_sdio_init(&topkick_mvsdio_data); | 76 | kirkwood_sdio_init(&topkick_mvsdio_data); |
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index ef102646ba9a..a1c3ab6fc809 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c | |||
| @@ -214,7 +214,7 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) | |||
| 214 | * PCI_CLASS_BRIDGE_HOST or Linux will errantly try to process the BAR's on | 214 | * PCI_CLASS_BRIDGE_HOST or Linux will errantly try to process the BAR's on |
| 215 | * the device. Decoding setup is handled by the orion code. | 215 | * the device. Decoding setup is handled by the orion code. |
| 216 | */ | 216 | */ |
| 217 | static void __devinit rc_pci_fixup(struct pci_dev *dev) | 217 | static void rc_pci_fixup(struct pci_dev *dev) |
| 218 | { | 218 | { |
| 219 | if (dev->bus->parent == NULL && dev->devfn == 0) { | 219 | if (dev->bus->parent == NULL && dev->devfn == 0) { |
| 220 | int i; | 220 | int i; |
diff --git a/arch/arm/mach-ks8695/board-acs5k.c b/arch/arm/mach-ks8695/board-acs5k.c index 255502ddd879..b0c306ccbc6e 100644 --- a/arch/arm/mach-ks8695/board-acs5k.c +++ b/arch/arm/mach-ks8695/board-acs5k.c | |||
| @@ -92,7 +92,7 @@ static struct i2c_board_info acs5k_i2c_devs[] __initdata = { | |||
| 92 | }, | 92 | }, |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | static void __devinit acs5k_i2c_init(void) | 95 | static void acs5k_i2c_init(void) |
| 96 | { | 96 | { |
| 97 | /* The gpio interface */ | 97 | /* The gpio interface */ |
| 98 | platform_device_register(&acs5k_i2c_device); | 98 | platform_device_register(&acs5k_i2c_device); |
diff --git a/arch/arm/mach-mmp/sram.c b/arch/arm/mach-mmp/sram.c index a6c08ede4491..bf5e64906e65 100644 --- a/arch/arm/mach-mmp/sram.c +++ b/arch/arm/mach-mmp/sram.c | |||
| @@ -61,7 +61,7 @@ struct gen_pool *sram_get_gpool(char *pool_name) | |||
| 61 | } | 61 | } |
| 62 | EXPORT_SYMBOL(sram_get_gpool); | 62 | EXPORT_SYMBOL(sram_get_gpool); |
| 63 | 63 | ||
| 64 | static int __devinit sram_probe(struct platform_device *pdev) | 64 | static int sram_probe(struct platform_device *pdev) |
| 65 | { | 65 | { |
| 66 | struct sram_platdata *pdata = pdev->dev.platform_data; | 66 | struct sram_platdata *pdata = pdev->dev.platform_data; |
| 67 | struct sram_bank_info *info; | 67 | struct sram_bank_info *info; |
| @@ -125,7 +125,7 @@ out: | |||
| 125 | return ret; | 125 | return ret; |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | static int __devexit sram_remove(struct platform_device *pdev) | 128 | static int sram_remove(struct platform_device *pdev) |
| 129 | { | 129 | { |
| 130 | struct sram_bank_info *info; | 130 | struct sram_bank_info *info; |
| 131 | 131 | ||
diff --git a/arch/arm/mach-msm/proc_comm.c b/arch/arm/mach-msm/proc_comm.c index 8f1eecd88186..507f5ca80697 100644 --- a/arch/arm/mach-msm/proc_comm.c +++ b/arch/arm/mach-msm/proc_comm.c | |||
| @@ -120,7 +120,7 @@ int msm_proc_comm(unsigned cmd, unsigned *data1, unsigned *data2) | |||
| 120 | * and unknown state. This function should be called early to | 120 | * and unknown state. This function should be called early to |
| 121 | * wait on the ARM9. | 121 | * wait on the ARM9. |
| 122 | */ | 122 | */ |
| 123 | void __devinit proc_comm_boot_wait(void) | 123 | void proc_comm_boot_wait(void) |
| 124 | { | 124 | { |
| 125 | void __iomem *base = MSM_SHARED_RAM_BASE; | 125 | void __iomem *base = MSM_SHARED_RAM_BASE; |
| 126 | 126 | ||
diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c index c5a2eddc6cdc..b1588a1ea2f8 100644 --- a/arch/arm/mach-msm/smd.c +++ b/arch/arm/mach-msm/smd.c | |||
| @@ -988,7 +988,7 @@ int smd_core_init(void) | |||
| 988 | return 0; | 988 | return 0; |
| 989 | } | 989 | } |
| 990 | 990 | ||
| 991 | static int __devinit msm_smd_probe(struct platform_device *pdev) | 991 | static int msm_smd_probe(struct platform_device *pdev) |
| 992 | { | 992 | { |
| 993 | /* | 993 | /* |
| 994 | * If we haven't waited for the ARM9 to boot up till now, | 994 | * If we haven't waited for the ARM9 to boot up till now, |
diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c index a9a154a646dd..ee8c0b51df2c 100644 --- a/arch/arm/mach-mv78xx0/pcie.c +++ b/arch/arm/mach-mv78xx0/pcie.c | |||
| @@ -173,7 +173,7 @@ static struct pci_ops pcie_ops = { | |||
| 173 | .write = pcie_wr_conf, | 173 | .write = pcie_wr_conf, |
| 174 | }; | 174 | }; |
| 175 | 175 | ||
| 176 | static void __devinit rc_pci_fixup(struct pci_dev *dev) | 176 | static void rc_pci_fixup(struct pci_dev *dev) |
| 177 | { | 177 | { |
| 178 | /* | 178 | /* |
| 179 | * Prevent enumeration of root complex. | 179 | * Prevent enumeration of root complex. |
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c index 98167a4319f7..9f19069248da 100644 --- a/arch/arm/mach-nomadik/board-nhk8815.c +++ b/arch/arm/mach-nomadik/board-nhk8815.c | |||
| @@ -27,7 +27,6 @@ | |||
| 27 | #include <linux/pinctrl/machine.h> | 27 | #include <linux/pinctrl/machine.h> |
| 28 | #include <linux/platform_data/pinctrl-nomadik.h> | 28 | #include <linux/platform_data/pinctrl-nomadik.h> |
| 29 | #include <linux/platform_data/clocksource-nomadik-mtu.h> | 29 | #include <linux/platform_data/clocksource-nomadik-mtu.h> |
| 30 | #include <linux/platform_data/mtd-nomadik-nand.h> | ||
| 31 | #include <asm/hardware/vic.h> | 30 | #include <asm/hardware/vic.h> |
| 32 | #include <asm/sizes.h> | 31 | #include <asm/sizes.h> |
| 33 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
diff --git a/arch/arm/mach-nomadik/include/mach/irqs.h b/arch/arm/mach-nomadik/include/mach/irqs.h index b549d0571548..215f8cdb4004 100644 --- a/arch/arm/mach-nomadik/include/mach/irqs.h +++ b/arch/arm/mach-nomadik/include/mach/irqs.h | |||
| @@ -22,49 +22,49 @@ | |||
| 22 | 22 | ||
| 23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
| 24 | 24 | ||
| 25 | #define IRQ_VIC_START 1 /* first VIC interrupt is 1 */ | 25 | #define IRQ_VIC_START 32 /* first VIC interrupt is 1 */ |
| 26 | 26 | ||
| 27 | /* | 27 | /* |
| 28 | * Interrupt numbers generic for all Nomadik Chip cuts | 28 | * Interrupt numbers generic for all Nomadik Chip cuts |
| 29 | */ | 29 | */ |
| 30 | #define IRQ_WATCHDOG 1 | 30 | #define IRQ_WATCHDOG (IRQ_VIC_START+0) |
| 31 | #define IRQ_SOFTINT 2 | 31 | #define IRQ_SOFTINT (IRQ_VIC_START+1) |
| 32 | #define IRQ_CRYPTO 3 | 32 | #define IRQ_CRYPTO (IRQ_VIC_START+2) |
| 33 | #define IRQ_OWM 4 | 33 | #define IRQ_OWM (IRQ_VIC_START+3) |
| 34 | #define IRQ_MTU0 5 | 34 | #define IRQ_MTU0 (IRQ_VIC_START+4) |
| 35 | #define IRQ_MTU1 6 | 35 | #define IRQ_MTU1 (IRQ_VIC_START+5) |
| 36 | #define IRQ_GPIO0 7 | 36 | #define IRQ_GPIO0 (IRQ_VIC_START+6) |
| 37 | #define IRQ_GPIO1 8 | 37 | #define IRQ_GPIO1 (IRQ_VIC_START+7) |
| 38 | #define IRQ_GPIO2 9 | 38 | #define IRQ_GPIO2 (IRQ_VIC_START+8) |
| 39 | #define IRQ_GPIO3 10 | 39 | #define IRQ_GPIO3 (IRQ_VIC_START+9) |
| 40 | #define IRQ_RTC_RTT 11 | 40 | #define IRQ_RTC_RTT (IRQ_VIC_START+10) |
| 41 | #define IRQ_SSP 12 | 41 | #define IRQ_SSP (IRQ_VIC_START+11) |
| 42 | #define IRQ_UART0 13 | 42 | #define IRQ_UART0 (IRQ_VIC_START+12) |
| 43 | #define IRQ_DMA1 14 | 43 | #define IRQ_DMA1 (IRQ_VIC_START+13) |
| 44 | #define IRQ_CLCD_MDIF 15 | 44 | #define IRQ_CLCD_MDIF (IRQ_VIC_START+14) |
| 45 | #define IRQ_DMA0 16 | 45 | #define IRQ_DMA0 (IRQ_VIC_START+15) |
| 46 | #define IRQ_PWRFAIL 17 | 46 | #define IRQ_PWRFAIL (IRQ_VIC_START+16) |
| 47 | #define IRQ_UART1 18 | 47 | #define IRQ_UART1 (IRQ_VIC_START+17) |
| 48 | #define IRQ_FIRDA 19 | 48 | #define IRQ_FIRDA (IRQ_VIC_START+18) |
| 49 | #define IRQ_MSP0 20 | 49 | #define IRQ_MSP0 (IRQ_VIC_START+19) |
| 50 | #define IRQ_I2C0 21 | 50 | #define IRQ_I2C0 (IRQ_VIC_START+20) |
| 51 | #define IRQ_I2C1 22 | 51 | #define IRQ_I2C1 (IRQ_VIC_START+21) |
| 52 | #define IRQ_SDMMC 23 | 52 | #define IRQ_SDMMC (IRQ_VIC_START+22) |
| 53 | #define IRQ_USBOTG 24 | 53 | #define IRQ_USBOTG (IRQ_VIC_START+23) |
| 54 | #define IRQ_SVA_IT0 25 | 54 | #define IRQ_SVA_IT0 (IRQ_VIC_START+24) |
| 55 | #define IRQ_SVA_IT1 26 | 55 | #define IRQ_SVA_IT1 (IRQ_VIC_START+25) |
| 56 | #define IRQ_SAA_IT0 27 | 56 | #define IRQ_SAA_IT0 (IRQ_VIC_START+26) |
| 57 | #define IRQ_SAA_IT1 28 | 57 | #define IRQ_SAA_IT1 (IRQ_VIC_START+27) |
| 58 | #define IRQ_UART2 29 | 58 | #define IRQ_UART2 (IRQ_VIC_START+28) |
| 59 | #define IRQ_MSP2 30 | 59 | #define IRQ_MSP2 (IRQ_VIC_START+29) |
| 60 | #define IRQ_L2CC 49 | 60 | #define IRQ_L2CC (IRQ_VIC_START+30) |
| 61 | #define IRQ_HPI 50 | 61 | #define IRQ_HPI (IRQ_VIC_START+31) |
| 62 | #define IRQ_SKE 51 | 62 | #define IRQ_SKE (IRQ_VIC_START+32) |
| 63 | #define IRQ_KP 52 | 63 | #define IRQ_KP (IRQ_VIC_START+33) |
| 64 | #define IRQ_MEMST 55 | 64 | #define IRQ_MEMST (IRQ_VIC_START+34) |
| 65 | #define IRQ_SGA_IT 59 | 65 | #define IRQ_SGA_IT (IRQ_VIC_START+35) |
| 66 | #define IRQ_USBM 61 | 66 | #define IRQ_USBM (IRQ_VIC_START+36) |
| 67 | #define IRQ_MSP1 63 | 67 | #define IRQ_MSP1 (IRQ_VIC_START+37) |
| 68 | 68 | ||
| 69 | #define NOMADIK_GPIO_OFFSET (IRQ_VIC_START+64) | 69 | #define NOMADIK_GPIO_OFFSET (IRQ_VIC_START+64) |
| 70 | 70 | ||
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index a8fce3ccc707..2e98a3ac7c5e 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
| @@ -160,7 +160,7 @@ static struct omap_lcd_config ams_delta_lcd_config __initdata = { | |||
| 160 | .ctrl_name = "internal", | 160 | .ctrl_name = "internal", |
| 161 | }; | 161 | }; |
| 162 | 162 | ||
| 163 | static struct omap_usb_config ams_delta_usb_config = { | 163 | static struct omap_usb_config ams_delta_usb_config __initdata = { |
| 164 | .register_host = 1, | 164 | .register_host = 1, |
| 165 | .hmc_mode = 16, | 165 | .hmc_mode = 16, |
| 166 | .pins[0] = 2, | 166 | .pins[0] = 2, |
diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c index e962926b67bc..efc8f207f6fc 100644 --- a/arch/arm/mach-omap1/mailbox.c +++ b/arch/arm/mach-omap1/mailbox.c | |||
| @@ -142,7 +142,7 @@ static struct omap_mbox mbox_dsp_info = { | |||
| 142 | 142 | ||
| 143 | static struct omap_mbox *omap1_mboxes[] = { &mbox_dsp_info, NULL }; | 143 | static struct omap_mbox *omap1_mboxes[] = { &mbox_dsp_info, NULL }; |
| 144 | 144 | ||
| 145 | static int __devinit omap1_mbox_probe(struct platform_device *pdev) | 145 | static int omap1_mbox_probe(struct platform_device *pdev) |
| 146 | { | 146 | { |
| 147 | struct resource *mem; | 147 | struct resource *mem; |
| 148 | int ret; | 148 | int ret; |
| @@ -165,7 +165,7 @@ static int __devinit omap1_mbox_probe(struct platform_device *pdev) | |||
| 165 | return 0; | 165 | return 0; |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | static int __devexit omap1_mbox_remove(struct platform_device *pdev) | 168 | static int omap1_mbox_remove(struct platform_device *pdev) |
| 169 | { | 169 | { |
| 170 | omap_mbox_unregister(); | 170 | omap_mbox_unregister(); |
| 171 | iounmap(mbox_base); | 171 | iounmap(mbox_base); |
| @@ -174,7 +174,7 @@ static int __devexit omap1_mbox_remove(struct platform_device *pdev) | |||
| 174 | 174 | ||
| 175 | static struct platform_driver omap1_mbox_driver = { | 175 | static struct platform_driver omap1_mbox_driver = { |
| 176 | .probe = omap1_mbox_probe, | 176 | .probe = omap1_mbox_probe, |
| 177 | .remove = __devexit_p(omap1_mbox_remove), | 177 | .remove = omap1_mbox_remove, |
| 178 | .driver = { | 178 | .driver = { |
| 179 | .name = "omap-mailbox", | 179 | .name = "omap-mailbox", |
| 180 | }, | 180 | }, |
diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c index 104fed366b8f..1a1db5971cd9 100644 --- a/arch/arm/mach-omap1/usb.c +++ b/arch/arm/mach-omap1/usb.c | |||
| @@ -629,8 +629,14 @@ static void __init omap_1510_usb_init(struct omap_usb_config *config) | |||
| 629 | static inline void omap_1510_usb_init(struct omap_usb_config *config) {} | 629 | static inline void omap_1510_usb_init(struct omap_usb_config *config) {} |
| 630 | #endif | 630 | #endif |
| 631 | 631 | ||
| 632 | void __init omap1_usb_init(struct omap_usb_config *pdata) | 632 | void __init omap1_usb_init(struct omap_usb_config *_pdata) |
| 633 | { | 633 | { |
| 634 | struct omap_usb_config *pdata; | ||
| 635 | |||
| 636 | pdata = kmemdup(_pdata, sizeof(*pdata), GFP_KERNEL); | ||
| 637 | if (!pdata) | ||
| 638 | return; | ||
| 639 | |||
| 634 | pdata->usb0_init = omap1_usb0_init; | 640 | pdata->usb0_init = omap1_usb0_init; |
| 635 | pdata->usb1_init = omap1_usb1_init; | 641 | pdata->usb1_init = omap1_usb1_init; |
| 636 | pdata->usb2_init = omap1_usb2_init; | 642 | pdata->usb2_init = omap1_usb2_init; |
diff --git a/arch/arm/mach-omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c index bdf39481fbd6..6ef87580c33f 100644 --- a/arch/arm/mach-omap2/cclock3xxx_data.c +++ b/arch/arm/mach-omap2/cclock3xxx_data.c | |||
| @@ -1167,6 +1167,8 @@ static const struct clk_ops emu_src_ck_ops = { | |||
| 1167 | .recalc_rate = &omap2_clksel_recalc, | 1167 | .recalc_rate = &omap2_clksel_recalc, |
| 1168 | .get_parent = &omap2_clksel_find_parent_index, | 1168 | .get_parent = &omap2_clksel_find_parent_index, |
| 1169 | .set_parent = &omap2_clksel_set_parent, | 1169 | .set_parent = &omap2_clksel_set_parent, |
| 1170 | .enable = &omap2_clkops_enable_clkdm, | ||
| 1171 | .disable = &omap2_clkops_disable_clkdm, | ||
| 1170 | }; | 1172 | }; |
| 1171 | 1173 | ||
| 1172 | static struct clk emu_src_ck; | 1174 | static struct clk emu_src_ck; |
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 65468f6d7f0e..8033cb747c86 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
| @@ -744,7 +744,7 @@ static int gpmc_setup_irq(void) | |||
| 744 | return request_irq(gpmc_irq, gpmc_handle_irq, 0, "gpmc", NULL); | 744 | return request_irq(gpmc_irq, gpmc_handle_irq, 0, "gpmc", NULL); |
| 745 | } | 745 | } |
| 746 | 746 | ||
| 747 | static __devexit int gpmc_free_irq(void) | 747 | static int gpmc_free_irq(void) |
| 748 | { | 748 | { |
| 749 | int i; | 749 | int i; |
| 750 | 750 | ||
| @@ -762,7 +762,7 @@ static __devexit int gpmc_free_irq(void) | |||
| 762 | return 0; | 762 | return 0; |
| 763 | } | 763 | } |
| 764 | 764 | ||
| 765 | static void __devexit gpmc_mem_exit(void) | 765 | static void gpmc_mem_exit(void) |
| 766 | { | 766 | { |
| 767 | int cs; | 767 | int cs; |
| 768 | 768 | ||
| @@ -774,7 +774,7 @@ static void __devexit gpmc_mem_exit(void) | |||
| 774 | 774 | ||
| 775 | } | 775 | } |
| 776 | 776 | ||
| 777 | static int __devinit gpmc_mem_init(void) | 777 | static int gpmc_mem_init(void) |
| 778 | { | 778 | { |
| 779 | int cs, rc; | 779 | int cs, rc; |
| 780 | unsigned long boot_rom_space = 0; | 780 | unsigned long boot_rom_space = 0; |
| @@ -1121,7 +1121,7 @@ int gpmc_calc_timings(struct gpmc_timings *gpmc_t, | |||
| 1121 | return 0; | 1121 | return 0; |
| 1122 | } | 1122 | } |
| 1123 | 1123 | ||
| 1124 | static __devinit int gpmc_probe(struct platform_device *pdev) | 1124 | static int gpmc_probe(struct platform_device *pdev) |
| 1125 | { | 1125 | { |
| 1126 | int rc; | 1126 | int rc; |
| 1127 | u32 l; | 1127 | u32 l; |
| @@ -1177,7 +1177,7 @@ static __devinit int gpmc_probe(struct platform_device *pdev) | |||
| 1177 | return 0; | 1177 | return 0; |
| 1178 | } | 1178 | } |
| 1179 | 1179 | ||
| 1180 | static __devexit int gpmc_remove(struct platform_device *pdev) | 1180 | static int gpmc_remove(struct platform_device *pdev) |
| 1181 | { | 1181 | { |
| 1182 | gpmc_free_irq(); | 1182 | gpmc_free_irq(); |
| 1183 | gpmc_mem_exit(); | 1183 | gpmc_mem_exit(); |
| @@ -1187,7 +1187,7 @@ static __devexit int gpmc_remove(struct platform_device *pdev) | |||
| 1187 | 1187 | ||
| 1188 | static struct platform_driver gpmc_driver = { | 1188 | static struct platform_driver gpmc_driver = { |
| 1189 | .probe = gpmc_probe, | 1189 | .probe = gpmc_probe, |
| 1190 | .remove = __devexit_p(gpmc_remove), | 1190 | .remove = gpmc_remove, |
| 1191 | .driver = { | 1191 | .driver = { |
| 1192 | .name = DEVICE_NAME, | 1192 | .name = DEVICE_NAME, |
| 1193 | .owner = THIS_MODULE, | 1193 | .owner = THIS_MODULE, |
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 0d974565f8ca..0b080267b7f6 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c | |||
| @@ -342,7 +342,7 @@ struct omap_mbox mbox_2_info = { | |||
| 342 | struct omap_mbox *omap4_mboxes[] = { &mbox_1_info, &mbox_2_info, NULL }; | 342 | struct omap_mbox *omap4_mboxes[] = { &mbox_1_info, &mbox_2_info, NULL }; |
| 343 | #endif | 343 | #endif |
| 344 | 344 | ||
| 345 | static int __devinit omap2_mbox_probe(struct platform_device *pdev) | 345 | static int omap2_mbox_probe(struct platform_device *pdev) |
| 346 | { | 346 | { |
| 347 | struct resource *mem; | 347 | struct resource *mem; |
| 348 | int ret; | 348 | int ret; |
| @@ -395,7 +395,7 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev) | |||
| 395 | return 0; | 395 | return 0; |
| 396 | } | 396 | } |
| 397 | 397 | ||
| 398 | static int __devexit omap2_mbox_remove(struct platform_device *pdev) | 398 | static int omap2_mbox_remove(struct platform_device *pdev) |
| 399 | { | 399 | { |
| 400 | omap_mbox_unregister(); | 400 | omap_mbox_unregister(); |
| 401 | iounmap(mbox_base); | 401 | iounmap(mbox_base); |
| @@ -404,7 +404,7 @@ static int __devexit omap2_mbox_remove(struct platform_device *pdev) | |||
| 404 | 404 | ||
| 405 | static struct platform_driver omap2_mbox_driver = { | 405 | static struct platform_driver omap2_mbox_driver = { |
| 406 | .probe = omap2_mbox_probe, | 406 | .probe = omap2_mbox_probe, |
| 407 | .remove = __devexit_p(omap2_mbox_remove), | 407 | .remove = omap2_mbox_remove, |
| 408 | .driver = { | 408 | .driver = { |
| 409 | .name = "omap-mailbox", | 409 | .name = "omap-mailbox", |
| 410 | }, | 410 | }, |
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c index 081c71edddf4..646c14d9fdb9 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c | |||
| @@ -2070,7 +2070,7 @@ static struct omap_hwmod_irq_info am33xx_usbss_mpu_irqs[] = { | |||
| 2070 | { .name = "usbss-irq", .irq = 17 + OMAP_INTC_START, }, | 2070 | { .name = "usbss-irq", .irq = 17 + OMAP_INTC_START, }, |
| 2071 | { .name = "musb0-irq", .irq = 18 + OMAP_INTC_START, }, | 2071 | { .name = "musb0-irq", .irq = 18 + OMAP_INTC_START, }, |
| 2072 | { .name = "musb1-irq", .irq = 19 + OMAP_INTC_START, }, | 2072 | { .name = "musb1-irq", .irq = 19 + OMAP_INTC_START, }, |
| 2073 | { .irq = -1 + OMAP_INTC_START, }, | 2073 | { .irq = -1, }, |
| 2074 | }; | 2074 | }; |
| 2075 | 2075 | ||
| 2076 | static struct omap_hwmod am33xx_usbss_hwmod = { | 2076 | static struct omap_hwmod am33xx_usbss_hwmod = { |
| @@ -2515,7 +2515,7 @@ static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = { | |||
| 2515 | .user = OCP_USER_MPU, | 2515 | .user = OCP_USER_MPU, |
| 2516 | }; | 2516 | }; |
| 2517 | 2517 | ||
| 2518 | struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = { | 2518 | static struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = { |
| 2519 | { | 2519 | { |
| 2520 | .pa_start = 0x4A101000, | 2520 | .pa_start = 0x4A101000, |
| 2521 | .pa_end = 0x4A101000 + SZ_256 - 1, | 2521 | .pa_end = 0x4A101000 + SZ_256 - 1, |
| @@ -2523,7 +2523,7 @@ struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = { | |||
| 2523 | { } | 2523 | { } |
| 2524 | }; | 2524 | }; |
| 2525 | 2525 | ||
| 2526 | struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = { | 2526 | static struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = { |
| 2527 | .master = &am33xx_cpgmac0_hwmod, | 2527 | .master = &am33xx_cpgmac0_hwmod, |
| 2528 | .slave = &am33xx_mdio_hwmod, | 2528 | .slave = &am33xx_mdio_hwmod, |
| 2529 | .addr = am33xx_mdio_addr_space, | 2529 | .addr = am33xx_mdio_addr_space, |
diff --git a/arch/arm/mach-omap2/prm2xxx.c b/arch/arm/mach-omap2/prm2xxx.c index cc0e71430af1..418de9c3b319 100644 --- a/arch/arm/mach-omap2/prm2xxx.c +++ b/arch/arm/mach-omap2/prm2xxx.c | |||
| @@ -28,6 +28,14 @@ | |||
| 28 | #include "prm-regbits-24xx.h" | 28 | #include "prm-regbits-24xx.h" |
| 29 | 29 | ||
| 30 | /* | 30 | /* |
| 31 | * OMAP24xx PM_PWSTCTRL_*.POWERSTATE and PM_PWSTST_*.LASTSTATEENTERED bits - | ||
| 32 | * these are reversed from the bits used on OMAP3+ | ||
| 33 | */ | ||
| 34 | #define OMAP24XX_PWRDM_POWER_ON 0x0 | ||
| 35 | #define OMAP24XX_PWRDM_POWER_RET 0x1 | ||
| 36 | #define OMAP24XX_PWRDM_POWER_OFF 0x3 | ||
| 37 | |||
| 38 | /* | ||
| 31 | * omap2xxx_prm_reset_src_map - map from bits in the PRM_RSTST_WKUP | 39 | * omap2xxx_prm_reset_src_map - map from bits in the PRM_RSTST_WKUP |
| 32 | * hardware register (which are specific to the OMAP2xxx SoCs) to | 40 | * hardware register (which are specific to the OMAP2xxx SoCs) to |
| 33 | * reset source ID bit shifts (which is an OMAP SoC-independent | 41 | * reset source ID bit shifts (which is an OMAP SoC-independent |
| @@ -68,6 +76,34 @@ static u32 omap2xxx_prm_read_reset_sources(void) | |||
| 68 | } | 76 | } |
| 69 | 77 | ||
| 70 | /** | 78 | /** |
| 79 | * omap2xxx_pwrst_to_common_pwrst - convert OMAP2xxx pwrst to common pwrst | ||
| 80 | * @omap2xxx_pwrst: OMAP2xxx hardware power state to convert | ||
| 81 | * | ||
| 82 | * Return the common power state bits corresponding to the OMAP2xxx | ||
| 83 | * hardware power state bits @omap2xxx_pwrst, or -EINVAL upon error. | ||
| 84 | */ | ||
| 85 | static int omap2xxx_pwrst_to_common_pwrst(u8 omap2xxx_pwrst) | ||
| 86 | { | ||
| 87 | u8 pwrst; | ||
| 88 | |||
| 89 | switch (omap2xxx_pwrst) { | ||
| 90 | case OMAP24XX_PWRDM_POWER_OFF: | ||
| 91 | pwrst = PWRDM_POWER_OFF; | ||
| 92 | break; | ||
| 93 | case OMAP24XX_PWRDM_POWER_RET: | ||
| 94 | pwrst = PWRDM_POWER_RET; | ||
| 95 | break; | ||
| 96 | case OMAP24XX_PWRDM_POWER_ON: | ||
| 97 | pwrst = PWRDM_POWER_ON; | ||
| 98 | break; | ||
| 99 | default: | ||
| 100 | return -EINVAL; | ||
| 101 | } | ||
| 102 | |||
| 103 | return pwrst; | ||
| 104 | } | ||
| 105 | |||
| 106 | /** | ||
| 71 | * omap2xxx_prm_dpll_reset - use DPLL reset to reboot the OMAP SoC | 107 | * omap2xxx_prm_dpll_reset - use DPLL reset to reboot the OMAP SoC |
| 72 | * | 108 | * |
| 73 | * Set the DPLL reset bit, which should reboot the SoC. This is the | 109 | * Set the DPLL reset bit, which should reboot the SoC. This is the |
| @@ -97,10 +133,56 @@ int omap2xxx_clkdm_wakeup(struct clockdomain *clkdm) | |||
| 97 | return 0; | 133 | return 0; |
| 98 | } | 134 | } |
| 99 | 135 | ||
| 136 | static int omap2xxx_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst) | ||
| 137 | { | ||
| 138 | u8 omap24xx_pwrst; | ||
| 139 | |||
| 140 | switch (pwrst) { | ||
| 141 | case PWRDM_POWER_OFF: | ||
| 142 | omap24xx_pwrst = OMAP24XX_PWRDM_POWER_OFF; | ||
| 143 | break; | ||
| 144 | case PWRDM_POWER_RET: | ||
| 145 | omap24xx_pwrst = OMAP24XX_PWRDM_POWER_RET; | ||
| 146 | break; | ||
| 147 | case PWRDM_POWER_ON: | ||
| 148 | omap24xx_pwrst = OMAP24XX_PWRDM_POWER_ON; | ||
| 149 | break; | ||
| 150 | default: | ||
| 151 | return -EINVAL; | ||
| 152 | } | ||
| 153 | |||
| 154 | omap2_prm_rmw_mod_reg_bits(OMAP_POWERSTATE_MASK, | ||
| 155 | (omap24xx_pwrst << OMAP_POWERSTATE_SHIFT), | ||
| 156 | pwrdm->prcm_offs, OMAP2_PM_PWSTCTRL); | ||
| 157 | return 0; | ||
| 158 | } | ||
| 159 | |||
| 160 | static int omap2xxx_pwrdm_read_next_pwrst(struct powerdomain *pwrdm) | ||
| 161 | { | ||
| 162 | u8 omap2xxx_pwrst; | ||
| 163 | |||
| 164 | omap2xxx_pwrst = omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs, | ||
| 165 | OMAP2_PM_PWSTCTRL, | ||
| 166 | OMAP_POWERSTATE_MASK); | ||
| 167 | |||
| 168 | return omap2xxx_pwrst_to_common_pwrst(omap2xxx_pwrst); | ||
| 169 | } | ||
| 170 | |||
| 171 | static int omap2xxx_pwrdm_read_pwrst(struct powerdomain *pwrdm) | ||
| 172 | { | ||
| 173 | u8 omap2xxx_pwrst; | ||
| 174 | |||
| 175 | omap2xxx_pwrst = omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs, | ||
| 176 | OMAP2_PM_PWSTST, | ||
| 177 | OMAP_POWERSTATEST_MASK); | ||
| 178 | |||
| 179 | return omap2xxx_pwrst_to_common_pwrst(omap2xxx_pwrst); | ||
| 180 | } | ||
| 181 | |||
| 100 | struct pwrdm_ops omap2_pwrdm_operations = { | 182 | struct pwrdm_ops omap2_pwrdm_operations = { |
| 101 | .pwrdm_set_next_pwrst = omap2_pwrdm_set_next_pwrst, | 183 | .pwrdm_set_next_pwrst = omap2xxx_pwrdm_set_next_pwrst, |
| 102 | .pwrdm_read_next_pwrst = omap2_pwrdm_read_next_pwrst, | 184 | .pwrdm_read_next_pwrst = omap2xxx_pwrdm_read_next_pwrst, |
| 103 | .pwrdm_read_pwrst = omap2_pwrdm_read_pwrst, | 185 | .pwrdm_read_pwrst = omap2xxx_pwrdm_read_pwrst, |
| 104 | .pwrdm_set_logic_retst = omap2_pwrdm_set_logic_retst, | 186 | .pwrdm_set_logic_retst = omap2_pwrdm_set_logic_retst, |
| 105 | .pwrdm_set_mem_onst = omap2_pwrdm_set_mem_onst, | 187 | .pwrdm_set_mem_onst = omap2_pwrdm_set_mem_onst, |
| 106 | .pwrdm_set_mem_retst = omap2_pwrdm_set_mem_retst, | 188 | .pwrdm_set_mem_retst = omap2_pwrdm_set_mem_retst, |
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c index 30517f5af707..a3e121f94a86 100644 --- a/arch/arm/mach-omap2/prm2xxx_3xxx.c +++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c | |||
| @@ -103,28 +103,6 @@ int omap2_prm_deassert_hardreset(s16 prm_mod, u8 rst_shift, u8 st_shift) | |||
| 103 | /* Powerdomain low-level functions */ | 103 | /* Powerdomain low-level functions */ |
| 104 | 104 | ||
| 105 | /* Common functions across OMAP2 and OMAP3 */ | 105 | /* Common functions across OMAP2 and OMAP3 */ |
| 106 | int omap2_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst) | ||
| 107 | { | ||
| 108 | omap2_prm_rmw_mod_reg_bits(OMAP_POWERSTATE_MASK, | ||
| 109 | (pwrst << OMAP_POWERSTATE_SHIFT), | ||
| 110 | pwrdm->prcm_offs, OMAP2_PM_PWSTCTRL); | ||
| 111 | return 0; | ||
| 112 | } | ||
| 113 | |||
| 114 | int omap2_pwrdm_read_next_pwrst(struct powerdomain *pwrdm) | ||
| 115 | { | ||
| 116 | return omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs, | ||
| 117 | OMAP2_PM_PWSTCTRL, | ||
| 118 | OMAP_POWERSTATE_MASK); | ||
| 119 | } | ||
| 120 | |||
| 121 | int omap2_pwrdm_read_pwrst(struct powerdomain *pwrdm) | ||
| 122 | { | ||
| 123 | return omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs, | ||
| 124 | OMAP2_PM_PWSTST, | ||
| 125 | OMAP_POWERSTATEST_MASK); | ||
| 126 | } | ||
| 127 | |||
| 128 | int omap2_pwrdm_set_mem_onst(struct powerdomain *pwrdm, u8 bank, | 106 | int omap2_pwrdm_set_mem_onst(struct powerdomain *pwrdm, u8 bank, |
| 129 | u8 pwrst) | 107 | u8 pwrst) |
| 130 | { | 108 | { |
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c index 39822aabcff3..e648bd55b072 100644 --- a/arch/arm/mach-omap2/prm3xxx.c +++ b/arch/arm/mach-omap2/prm3xxx.c | |||
| @@ -277,6 +277,28 @@ static u32 omap3xxx_prm_read_reset_sources(void) | |||
| 277 | 277 | ||
| 278 | /* Powerdomain low-level functions */ | 278 | /* Powerdomain low-level functions */ |
| 279 | 279 | ||
| 280 | static int omap3_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst) | ||
| 281 | { | ||
| 282 | omap2_prm_rmw_mod_reg_bits(OMAP_POWERSTATE_MASK, | ||
| 283 | (pwrst << OMAP_POWERSTATE_SHIFT), | ||
| 284 | pwrdm->prcm_offs, OMAP2_PM_PWSTCTRL); | ||
| 285 | return 0; | ||
| 286 | } | ||
| 287 | |||
| 288 | static int omap3_pwrdm_read_next_pwrst(struct powerdomain *pwrdm) | ||
| 289 | { | ||
| 290 | return omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs, | ||
| 291 | OMAP2_PM_PWSTCTRL, | ||
| 292 | OMAP_POWERSTATE_MASK); | ||
| 293 | } | ||
| 294 | |||
| 295 | static int omap3_pwrdm_read_pwrst(struct powerdomain *pwrdm) | ||
| 296 | { | ||
| 297 | return omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs, | ||
| 298 | OMAP2_PM_PWSTST, | ||
| 299 | OMAP_POWERSTATEST_MASK); | ||
| 300 | } | ||
| 301 | |||
| 280 | /* Applicable only for OMAP3. Not supported on OMAP2 */ | 302 | /* Applicable only for OMAP3. Not supported on OMAP2 */ |
| 281 | static int omap3_pwrdm_read_prev_pwrst(struct powerdomain *pwrdm) | 303 | static int omap3_pwrdm_read_prev_pwrst(struct powerdomain *pwrdm) |
| 282 | { | 304 | { |
| @@ -355,9 +377,9 @@ static int omap3_pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm) | |||
| 355 | } | 377 | } |
| 356 | 378 | ||
| 357 | struct pwrdm_ops omap3_pwrdm_operations = { | 379 | struct pwrdm_ops omap3_pwrdm_operations = { |
| 358 | .pwrdm_set_next_pwrst = omap2_pwrdm_set_next_pwrst, | 380 | .pwrdm_set_next_pwrst = omap3_pwrdm_set_next_pwrst, |
| 359 | .pwrdm_read_next_pwrst = omap2_pwrdm_read_next_pwrst, | 381 | .pwrdm_read_next_pwrst = omap3_pwrdm_read_next_pwrst, |
| 360 | .pwrdm_read_pwrst = omap2_pwrdm_read_pwrst, | 382 | .pwrdm_read_pwrst = omap3_pwrdm_read_pwrst, |
| 361 | .pwrdm_read_prev_pwrst = omap3_pwrdm_read_prev_pwrst, | 383 | .pwrdm_read_prev_pwrst = omap3_pwrdm_read_prev_pwrst, |
| 362 | .pwrdm_set_logic_retst = omap2_pwrdm_set_logic_retst, | 384 | .pwrdm_set_logic_retst = omap2_pwrdm_set_logic_retst, |
| 363 | .pwrdm_read_logic_pwrst = omap3_pwrdm_read_logic_pwrst, | 385 | .pwrdm_read_logic_pwrst = omap3_pwrdm_read_logic_pwrst, |
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c index 7498bc77fe8b..c05a343d465d 100644 --- a/arch/arm/mach-omap2/prm44xx.c +++ b/arch/arm/mach-omap2/prm44xx.c | |||
| @@ -56,9 +56,9 @@ static struct omap_prcm_irq_setup omap4_prcm_irq_setup = { | |||
| 56 | * enumeration) | 56 | * enumeration) |
| 57 | */ | 57 | */ |
| 58 | static struct prm_reset_src_map omap44xx_prm_reset_src_map[] = { | 58 | static struct prm_reset_src_map omap44xx_prm_reset_src_map[] = { |
| 59 | { OMAP4430_RST_GLOBAL_WARM_SW_SHIFT, | 59 | { OMAP4430_GLOBAL_WARM_SW_RST_SHIFT, |
| 60 | OMAP_GLOBAL_WARM_RST_SRC_ID_SHIFT }, | 60 | OMAP_GLOBAL_WARM_RST_SRC_ID_SHIFT }, |
| 61 | { OMAP4430_RST_GLOBAL_COLD_SW_SHIFT, | 61 | { OMAP4430_GLOBAL_COLD_RST_SHIFT, |
| 62 | OMAP_GLOBAL_COLD_RST_SRC_ID_SHIFT }, | 62 | OMAP_GLOBAL_COLD_RST_SRC_ID_SHIFT }, |
| 63 | { OMAP4430_MPU_SECURITY_VIOL_RST_SHIFT, | 63 | { OMAP4430_MPU_SECURITY_VIOL_RST_SHIFT, |
| 64 | OMAP_SECU_VIOL_RST_SRC_ID_SHIFT }, | 64 | OMAP_SECU_VIOL_RST_SRC_ID_SHIFT }, |
| @@ -333,7 +333,7 @@ static u32 omap44xx_prm_read_reset_sources(void) | |||
| 333 | u32 r = 0; | 333 | u32 r = 0; |
| 334 | u32 v; | 334 | u32 v; |
| 335 | 335 | ||
| 336 | v = omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST, | 336 | v = omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST, |
| 337 | OMAP4_RM_RSTST); | 337 | OMAP4_RM_RSTST); |
| 338 | 338 | ||
| 339 | p = omap44xx_prm_reset_src_map; | 339 | p = omap44xx_prm_reset_src_map; |
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h index 22b0979206ca..8ee1fbdec561 100644 --- a/arch/arm/mach-omap2/prm44xx.h +++ b/arch/arm/mach-omap2/prm44xx.h | |||
| @@ -62,8 +62,8 @@ | |||
| 62 | 62 | ||
| 63 | /* OMAP4 specific register offsets */ | 63 | /* OMAP4 specific register offsets */ |
| 64 | #define OMAP4_RM_RSTCTRL 0x0000 | 64 | #define OMAP4_RM_RSTCTRL 0x0000 |
| 65 | #define OMAP4_RM_RSTTIME 0x0004 | 65 | #define OMAP4_RM_RSTST 0x0004 |
| 66 | #define OMAP4_RM_RSTST 0x0008 | 66 | #define OMAP4_RM_RSTTIME 0x0008 |
| 67 | #define OMAP4_PM_PWSTCTRL 0x0000 | 67 | #define OMAP4_PM_PWSTCTRL 0x0000 |
| 68 | #define OMAP4_PM_PWSTST 0x0004 | 68 | #define OMAP4_PM_PWSTST 0x0004 |
| 69 | 69 | ||
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index cd50e328db2a..d9c7c3bf0d9c 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
| @@ -506,7 +506,7 @@ static int __init pci_setup(struct pci_sys_data *sys) | |||
| 506 | /***************************************************************************** | 506 | /***************************************************************************** |
| 507 | * General PCIe + PCI | 507 | * General PCIe + PCI |
| 508 | ****************************************************************************/ | 508 | ****************************************************************************/ |
| 509 | static void __devinit rc_pci_fixup(struct pci_dev *dev) | 509 | static void rc_pci_fixup(struct pci_dev *dev) |
| 510 | { | 510 | { |
| 511 | /* | 511 | /* |
| 512 | * Prevent enumeration of root complex. | 512 | * Prevent enumeration of root complex. |
diff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-prima2/pm.c index fb5a7910af35..9936c180bf01 100644 --- a/arch/arm/mach-prima2/pm.c +++ b/arch/arm/mach-prima2/pm.c | |||
| @@ -123,7 +123,7 @@ static const struct of_device_id memc_ids[] = { | |||
| 123 | {} | 123 | {} |
| 124 | }; | 124 | }; |
| 125 | 125 | ||
| 126 | static int __devinit sirfsoc_memc_probe(struct platform_device *op) | 126 | static int sirfsoc_memc_probe(struct platform_device *op) |
| 127 | { | 127 | { |
| 128 | struct device_node *np = op->dev.of_node; | 128 | struct device_node *np = op->dev.of_node; |
| 129 | 129 | ||
diff --git a/arch/arm/mach-prima2/rtciobrg.c b/arch/arm/mach-prima2/rtciobrg.c index 9d80f1e20a98..557353602130 100644 --- a/arch/arm/mach-prima2/rtciobrg.c +++ b/arch/arm/mach-prima2/rtciobrg.c | |||
| @@ -107,7 +107,7 @@ static const struct of_device_id rtciobrg_ids[] = { | |||
| 107 | {} | 107 | {} |
| 108 | }; | 108 | }; |
| 109 | 109 | ||
| 110 | static int __devinit sirfsoc_rtciobrg_probe(struct platform_device *op) | 110 | static int sirfsoc_rtciobrg_probe(struct platform_device *op) |
| 111 | { | 111 | { |
| 112 | struct device_node *np = op->dev.of_node; | 112 | struct device_node *np = op->dev.of_node; |
| 113 | 113 | ||
diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c index 048c4299473c..7a39efc50865 100644 --- a/arch/arm/mach-pxa/corgi_pm.c +++ b/arch/arm/mach-pxa/corgi_pm.c | |||
| @@ -198,7 +198,7 @@ static struct sharpsl_charger_machinfo corgi_pm_machinfo = { | |||
| 198 | 198 | ||
| 199 | static struct platform_device *corgipm_device; | 199 | static struct platform_device *corgipm_device; |
| 200 | 200 | ||
| 201 | static int __devinit corgipm_init(void) | 201 | static int corgipm_init(void) |
| 202 | { | 202 | { |
| 203 | int ret; | 203 | int ret; |
| 204 | 204 | ||
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h index a611ad3153c7..b6132aa95dc0 100644 --- a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h +++ b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h | |||
| @@ -463,6 +463,9 @@ | |||
| 463 | GPIO76_LCD_PCLK, \ | 463 | GPIO76_LCD_PCLK, \ |
| 464 | GPIO77_LCD_BIAS | 464 | GPIO77_LCD_BIAS |
| 465 | 465 | ||
| 466 | /* these enable a work-around for a hw bug in pxa27x during ac97 warm reset */ | ||
| 467 | #define GPIO113_AC97_nRESET_GPIO_HIGH MFP_CFG_OUT(GPIO113, AF0, DEFAULT) | ||
| 468 | #define GPIO95_AC97_nRESET_GPIO_HIGH MFP_CFG_OUT(GPIO95, AF0, DEFAULT) | ||
| 466 | 469 | ||
| 467 | extern int keypad_set_wake(unsigned int on); | 470 | extern int keypad_set_wake(unsigned int on); |
| 468 | #endif /* __ASM_ARCH_MFP_PXA27X_H */ | 471 | #endif /* __ASM_ARCH_MFP_PXA27X_H */ |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 8047ee0effc5..616cb87b6179 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
| @@ -47,9 +47,9 @@ void pxa27x_clear_otgph(void) | |||
| 47 | EXPORT_SYMBOL(pxa27x_clear_otgph); | 47 | EXPORT_SYMBOL(pxa27x_clear_otgph); |
| 48 | 48 | ||
| 49 | static unsigned long ac97_reset_config[] = { | 49 | static unsigned long ac97_reset_config[] = { |
| 50 | GPIO113_GPIO, | 50 | GPIO113_AC97_nRESET_GPIO_HIGH, |
| 51 | GPIO113_AC97_nRESET, | 51 | GPIO113_AC97_nRESET, |
| 52 | GPIO95_GPIO, | 52 | GPIO95_AC97_nRESET_GPIO_HIGH, |
| 53 | GPIO95_AC97_nRESET, | 53 | GPIO95_AC97_nRESET, |
| 54 | }; | 54 | }; |
| 55 | 55 | ||
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index ec55c575ed19..0a36d3585f26 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c | |||
| @@ -829,7 +829,7 @@ static const struct platform_suspend_ops sharpsl_pm_ops = { | |||
| 829 | }; | 829 | }; |
| 830 | #endif | 830 | #endif |
| 831 | 831 | ||
| 832 | static int __devinit sharpsl_pm_probe(struct platform_device *pdev) | 832 | static int sharpsl_pm_probe(struct platform_device *pdev) |
| 833 | { | 833 | { |
| 834 | int ret, irq; | 834 | int ret, irq; |
| 835 | 835 | ||
| @@ -941,7 +941,7 @@ static struct platform_driver sharpsl_pm_driver = { | |||
| 941 | }, | 941 | }, |
| 942 | }; | 942 | }; |
| 943 | 943 | ||
| 944 | static int __devinit sharpsl_pm_init(void) | 944 | static int sharpsl_pm_init(void) |
| 945 | { | 945 | { |
| 946 | return platform_driver_register(&sharpsl_pm_driver); | 946 | return platform_driver_register(&sharpsl_pm_driver); |
| 947 | } | 947 | } |
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index 842596d4d31e..e191f9996b26 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c | |||
| @@ -232,7 +232,7 @@ struct sharpsl_charger_machinfo spitz_pm_machinfo = { | |||
| 232 | 232 | ||
| 233 | static struct platform_device *spitzpm_device; | 233 | static struct platform_device *spitzpm_device; |
| 234 | 234 | ||
| 235 | static int __devinit spitzpm_init(void) | 235 | static int spitzpm_init(void) |
| 236 | { | 236 | { |
| 237 | int ret; | 237 | int ret; |
| 238 | 238 | ||
diff --git a/arch/arm/mach-pxa/tosa-bt.c b/arch/arm/mach-pxa/tosa-bt.c index b9b1e5c2b290..fc3646c2c694 100644 --- a/arch/arm/mach-pxa/tosa-bt.c +++ b/arch/arm/mach-pxa/tosa-bt.c | |||
| @@ -102,7 +102,7 @@ err_reset: | |||
| 102 | return rc; | 102 | return rc; |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | static int __devexit tosa_bt_remove(struct platform_device *dev) | 105 | static int tosa_bt_remove(struct platform_device *dev) |
| 106 | { | 106 | { |
| 107 | struct tosa_bt_data *data = dev->dev.platform_data; | 107 | struct tosa_bt_data *data = dev->dev.platform_data; |
| 108 | struct rfkill *rfk = platform_get_drvdata(dev); | 108 | struct rfkill *rfk = platform_get_drvdata(dev); |
| @@ -125,7 +125,7 @@ static int __devexit tosa_bt_remove(struct platform_device *dev) | |||
| 125 | 125 | ||
| 126 | static struct platform_driver tosa_bt_driver = { | 126 | static struct platform_driver tosa_bt_driver = { |
| 127 | .probe = tosa_bt_probe, | 127 | .probe = tosa_bt_probe, |
| 128 | .remove = __devexit_p(tosa_bt_remove), | 128 | .remove = tosa_bt_remove, |
| 129 | 129 | ||
| 130 | .driver = { | 130 | .driver = { |
| 131 | .name = "tosa-bt", | 131 | .name = "tosa-bt", |
diff --git a/arch/arm/mach-s3c24xx/h1940-bluetooth.c b/arch/arm/mach-s3c24xx/h1940-bluetooth.c index 57aee916bdb1..3f40c61b6e02 100644 --- a/arch/arm/mach-s3c24xx/h1940-bluetooth.c +++ b/arch/arm/mach-s3c24xx/h1940-bluetooth.c | |||
| @@ -62,7 +62,7 @@ static const struct rfkill_ops h1940bt_rfkill_ops = { | |||
| 62 | .set_block = h1940bt_set_block, | 62 | .set_block = h1940bt_set_block, |
| 63 | }; | 63 | }; |
| 64 | 64 | ||
| 65 | static int __devinit h1940bt_probe(struct platform_device *pdev) | 65 | static int h1940bt_probe(struct platform_device *pdev) |
| 66 | { | 66 | { |
| 67 | struct rfkill *rfk; | 67 | struct rfkill *rfk; |
| 68 | int ret = 0; | 68 | int ret = 0; |
diff --git a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c index 5876c6ba7500..45e74363aaa9 100644 --- a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c +++ b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c | |||
| @@ -93,7 +93,7 @@ static struct notifier_block osiris_dvs_nb = { | |||
| 93 | .notifier_call = osiris_dvs_notify, | 93 | .notifier_call = osiris_dvs_notify, |
| 94 | }; | 94 | }; |
| 95 | 95 | ||
| 96 | static int __devinit osiris_dvs_probe(struct platform_device *pdev) | 96 | static int osiris_dvs_probe(struct platform_device *pdev) |
| 97 | { | 97 | { |
| 98 | int ret; | 98 | int ret; |
| 99 | 99 | ||
| @@ -126,7 +126,7 @@ err_nogpio: | |||
| 126 | return ret; | 126 | return ret; |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | static int __devexit osiris_dvs_remove(struct platform_device *pdev) | 129 | static int osiris_dvs_remove(struct platform_device *pdev) |
| 130 | { | 130 | { |
| 131 | dev_info(&pdev->dev, "exiting\n"); | 131 | dev_info(&pdev->dev, "exiting\n"); |
| 132 | 132 | ||
| @@ -167,7 +167,7 @@ static const struct dev_pm_ops osiris_dvs_pm = { | |||
| 167 | 167 | ||
| 168 | static struct platform_driver osiris_dvs_driver = { | 168 | static struct platform_driver osiris_dvs_driver = { |
| 169 | .probe = osiris_dvs_probe, | 169 | .probe = osiris_dvs_probe, |
| 170 | .remove = __devexit_p(osiris_dvs_remove), | 170 | .remove = osiris_dvs_remove, |
| 171 | .driver = { | 171 | .driver = { |
| 172 | .name = "osiris-dvs", | 172 | .name = "osiris-dvs", |
| 173 | .owner = THIS_MODULE, | 173 | .owner = THIS_MODULE, |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c index c6d8dba90623..553059f51841 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c | |||
| @@ -290,7 +290,7 @@ static const struct i2c_board_info wm2200_i2c[] = { | |||
| 290 | .platform_data = &wm2200_pdata, }, | 290 | .platform_data = &wm2200_pdata, }, |
| 291 | }; | 291 | }; |
| 292 | 292 | ||
| 293 | static __devinitdata const struct { | 293 | static const struct { |
| 294 | u8 id; | 294 | u8 id; |
| 295 | u8 rev; | 295 | u8 rev; |
| 296 | const char *name; | 296 | const char *name; |
| @@ -343,8 +343,8 @@ static __devinitdata const struct { | |||
| 343 | .i2c_devs = wm2200_i2c, .num_i2c_devs = ARRAY_SIZE(wm2200_i2c) }, | 343 | .i2c_devs = wm2200_i2c, .num_i2c_devs = ARRAY_SIZE(wm2200_i2c) }, |
| 344 | }; | 344 | }; |
| 345 | 345 | ||
| 346 | static __devinit int wlf_gf_module_probe(struct i2c_client *i2c, | 346 | static int wlf_gf_module_probe(struct i2c_client *i2c, |
| 347 | const struct i2c_device_id *i2c_id) | 347 | const struct i2c_device_id *i2c_id) |
| 348 | { | 348 | { |
| 349 | int ret, i, j, id, rev; | 349 | int ret, i, j, id, rev; |
| 350 | 350 | ||
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index cdde249166b5..bf6311a28f3d 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c | |||
| @@ -171,7 +171,7 @@ static struct fb_videomode crag6410_lcd_timing = { | |||
| 171 | }; | 171 | }; |
| 172 | 172 | ||
| 173 | /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */ | 173 | /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */ |
| 174 | static struct s3c_fb_platdata crag6410_lcd_pdata __devinitdata = { | 174 | static struct s3c_fb_platdata crag6410_lcd_pdata = { |
| 175 | .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, | 175 | .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, |
| 176 | .vtiming = &crag6410_lcd_timing, | 176 | .vtiming = &crag6410_lcd_timing, |
| 177 | .win[0] = &crag6410_fb_win0, | 177 | .win[0] = &crag6410_fb_win0, |
| @@ -181,7 +181,7 @@ static struct s3c_fb_platdata crag6410_lcd_pdata __devinitdata = { | |||
| 181 | 181 | ||
| 182 | /* 2x6 keypad */ | 182 | /* 2x6 keypad */ |
| 183 | 183 | ||
| 184 | static uint32_t crag6410_keymap[] __devinitdata = { | 184 | static uint32_t crag6410_keymap[] = { |
| 185 | /* KEY(row, col, keycode) */ | 185 | /* KEY(row, col, keycode) */ |
| 186 | KEY(0, 0, KEY_VOLUMEUP), | 186 | KEY(0, 0, KEY_VOLUMEUP), |
| 187 | KEY(0, 1, KEY_HOME), | 187 | KEY(0, 1, KEY_HOME), |
| @@ -197,12 +197,12 @@ static uint32_t crag6410_keymap[] __devinitdata = { | |||
| 197 | KEY(1, 5, KEY_CAMERA), | 197 | KEY(1, 5, KEY_CAMERA), |
| 198 | }; | 198 | }; |
| 199 | 199 | ||
| 200 | static struct matrix_keymap_data crag6410_keymap_data __devinitdata = { | 200 | static struct matrix_keymap_data crag6410_keymap_data = { |
| 201 | .keymap = crag6410_keymap, | 201 | .keymap = crag6410_keymap, |
| 202 | .keymap_size = ARRAY_SIZE(crag6410_keymap), | 202 | .keymap_size = ARRAY_SIZE(crag6410_keymap), |
| 203 | }; | 203 | }; |
| 204 | 204 | ||
| 205 | static struct samsung_keypad_platdata crag6410_keypad_data __devinitdata = { | 205 | static struct samsung_keypad_platdata crag6410_keypad_data = { |
| 206 | .keymap_data = &crag6410_keymap_data, | 206 | .keymap_data = &crag6410_keymap_data, |
| 207 | .rows = 2, | 207 | .rows = 2, |
| 208 | .cols = 6, | 208 | .cols = 6, |
| @@ -407,11 +407,11 @@ static struct wm831x_buckv_pdata vddarm_pdata = { | |||
| 407 | .dvs_gpio = S3C64XX_GPK(0), | 407 | .dvs_gpio = S3C64XX_GPK(0), |
| 408 | }; | 408 | }; |
| 409 | 409 | ||
| 410 | static struct regulator_consumer_supply vddarm_consumers[] __devinitdata = { | 410 | static struct regulator_consumer_supply vddarm_consumers[] = { |
| 411 | REGULATOR_SUPPLY("vddarm", NULL), | 411 | REGULATOR_SUPPLY("vddarm", NULL), |
| 412 | }; | 412 | }; |
| 413 | 413 | ||
| 414 | static struct regulator_init_data vddarm __devinitdata = { | 414 | static struct regulator_init_data vddarm = { |
| 415 | .constraints = { | 415 | .constraints = { |
| 416 | .name = "VDDARM", | 416 | .name = "VDDARM", |
| 417 | .min_uV = 1000000, | 417 | .min_uV = 1000000, |
| @@ -425,11 +425,11 @@ static struct regulator_init_data vddarm __devinitdata = { | |||
| 425 | .driver_data = &vddarm_pdata, | 425 | .driver_data = &vddarm_pdata, |
| 426 | }; | 426 | }; |
| 427 | 427 | ||
| 428 | static struct regulator_consumer_supply vddint_consumers[] __devinitdata = { | 428 | static struct regulator_consumer_supply vddint_consumers[] = { |
| 429 | REGULATOR_SUPPLY("vddint", NULL), | 429 | REGULATOR_SUPPLY("vddint", NULL), |
| 430 | }; | 430 | }; |
| 431 | 431 | ||
| 432 | static struct regulator_init_data vddint __devinitdata = { | 432 | static struct regulator_init_data vddint = { |
| 433 | .constraints = { | 433 | .constraints = { |
| 434 | .name = "VDDINT", | 434 | .name = "VDDINT", |
| 435 | .min_uV = 1000000, | 435 | .min_uV = 1000000, |
| @@ -442,27 +442,27 @@ static struct regulator_init_data vddint __devinitdata = { | |||
| 442 | .supply_regulator = "WALLVDD", | 442 | .supply_regulator = "WALLVDD", |
| 443 | }; | 443 | }; |
| 444 | 444 | ||
| 445 | static struct regulator_init_data vddmem __devinitdata = { | 445 | static struct regulator_init_data vddmem = { |
| 446 | .constraints = { | 446 | .constraints = { |
| 447 | .name = "VDDMEM", | 447 | .name = "VDDMEM", |
| 448 | .always_on = 1, | 448 | .always_on = 1, |
| 449 | }, | 449 | }, |
| 450 | }; | 450 | }; |
| 451 | 451 | ||
| 452 | static struct regulator_init_data vddsys __devinitdata = { | 452 | static struct regulator_init_data vddsys = { |
| 453 | .constraints = { | 453 | .constraints = { |
| 454 | .name = "VDDSYS,VDDEXT,VDDPCM,VDDSS", | 454 | .name = "VDDSYS,VDDEXT,VDDPCM,VDDSS", |
| 455 | .always_on = 1, | 455 | .always_on = 1, |
| 456 | }, | 456 | }, |
| 457 | }; | 457 | }; |
| 458 | 458 | ||
| 459 | static struct regulator_consumer_supply vddmmc_consumers[] __devinitdata = { | 459 | static struct regulator_consumer_supply vddmmc_consumers[] = { |
| 460 | REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"), | 460 | REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"), |
| 461 | REGULATOR_SUPPLY("vmmc", "s3c-sdhci.1"), | 461 | REGULATOR_SUPPLY("vmmc", "s3c-sdhci.1"), |
| 462 | REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"), | 462 | REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"), |
| 463 | }; | 463 | }; |
| 464 | 464 | ||
| 465 | static struct regulator_init_data vddmmc __devinitdata = { | 465 | static struct regulator_init_data vddmmc = { |
| 466 | .constraints = { | 466 | .constraints = { |
| 467 | .name = "VDDMMC,UH", | 467 | .name = "VDDMMC,UH", |
| 468 | .always_on = 1, | 468 | .always_on = 1, |
| @@ -472,7 +472,7 @@ static struct regulator_init_data vddmmc __devinitdata = { | |||
| 472 | .supply_regulator = "WALLVDD", | 472 | .supply_regulator = "WALLVDD", |
| 473 | }; | 473 | }; |
| 474 | 474 | ||
| 475 | static struct regulator_init_data vddotgi __devinitdata = { | 475 | static struct regulator_init_data vddotgi = { |
| 476 | .constraints = { | 476 | .constraints = { |
| 477 | .name = "VDDOTGi", | 477 | .name = "VDDOTGi", |
| 478 | .always_on = 1, | 478 | .always_on = 1, |
| @@ -480,7 +480,7 @@ static struct regulator_init_data vddotgi __devinitdata = { | |||
| 480 | .supply_regulator = "WALLVDD", | 480 | .supply_regulator = "WALLVDD", |
| 481 | }; | 481 | }; |
| 482 | 482 | ||
| 483 | static struct regulator_init_data vddotg __devinitdata = { | 483 | static struct regulator_init_data vddotg = { |
| 484 | .constraints = { | 484 | .constraints = { |
| 485 | .name = "VDDOTG", | 485 | .name = "VDDOTG", |
| 486 | .always_on = 1, | 486 | .always_on = 1, |
| @@ -488,7 +488,7 @@ static struct regulator_init_data vddotg __devinitdata = { | |||
| 488 | .supply_regulator = "WALLVDD", | 488 | .supply_regulator = "WALLVDD", |
| 489 | }; | 489 | }; |
| 490 | 490 | ||
| 491 | static struct regulator_init_data vddhi __devinitdata = { | 491 | static struct regulator_init_data vddhi = { |
| 492 | .constraints = { | 492 | .constraints = { |
| 493 | .name = "VDDHI", | 493 | .name = "VDDHI", |
| 494 | .always_on = 1, | 494 | .always_on = 1, |
| @@ -496,7 +496,7 @@ static struct regulator_init_data vddhi __devinitdata = { | |||
| 496 | .supply_regulator = "WALLVDD", | 496 | .supply_regulator = "WALLVDD", |
| 497 | }; | 497 | }; |
| 498 | 498 | ||
| 499 | static struct regulator_init_data vddadc __devinitdata = { | 499 | static struct regulator_init_data vddadc = { |
| 500 | .constraints = { | 500 | .constraints = { |
| 501 | .name = "VDDADC,VDDDAC", | 501 | .name = "VDDADC,VDDDAC", |
| 502 | .always_on = 1, | 502 | .always_on = 1, |
| @@ -504,7 +504,7 @@ static struct regulator_init_data vddadc __devinitdata = { | |||
| 504 | .supply_regulator = "WALLVDD", | 504 | .supply_regulator = "WALLVDD", |
| 505 | }; | 505 | }; |
| 506 | 506 | ||
| 507 | static struct regulator_init_data vddmem0 __devinitdata = { | 507 | static struct regulator_init_data vddmem0 = { |
| 508 | .constraints = { | 508 | .constraints = { |
| 509 | .name = "VDDMEM0", | 509 | .name = "VDDMEM0", |
| 510 | .always_on = 1, | 510 | .always_on = 1, |
| @@ -512,7 +512,7 @@ static struct regulator_init_data vddmem0 __devinitdata = { | |||
| 512 | .supply_regulator = "WALLVDD", | 512 | .supply_regulator = "WALLVDD", |
| 513 | }; | 513 | }; |
| 514 | 514 | ||
| 515 | static struct regulator_init_data vddpll __devinitdata = { | 515 | static struct regulator_init_data vddpll = { |
| 516 | .constraints = { | 516 | .constraints = { |
| 517 | .name = "VDDPLL", | 517 | .name = "VDDPLL", |
| 518 | .always_on = 1, | 518 | .always_on = 1, |
| @@ -520,7 +520,7 @@ static struct regulator_init_data vddpll __devinitdata = { | |||
| 520 | .supply_regulator = "WALLVDD", | 520 | .supply_regulator = "WALLVDD", |
| 521 | }; | 521 | }; |
| 522 | 522 | ||
| 523 | static struct regulator_init_data vddlcd __devinitdata = { | 523 | static struct regulator_init_data vddlcd = { |
| 524 | .constraints = { | 524 | .constraints = { |
| 525 | .name = "VDDLCD", | 525 | .name = "VDDLCD", |
| 526 | .always_on = 1, | 526 | .always_on = 1, |
| @@ -528,7 +528,7 @@ static struct regulator_init_data vddlcd __devinitdata = { | |||
| 528 | .supply_regulator = "WALLVDD", | 528 | .supply_regulator = "WALLVDD", |
| 529 | }; | 529 | }; |
| 530 | 530 | ||
| 531 | static struct regulator_init_data vddalive __devinitdata = { | 531 | static struct regulator_init_data vddalive = { |
| 532 | .constraints = { | 532 | .constraints = { |
| 533 | .name = "VDDALIVE", | 533 | .name = "VDDALIVE", |
| 534 | .always_on = 1, | 534 | .always_on = 1, |
| @@ -536,28 +536,28 @@ static struct regulator_init_data vddalive __devinitdata = { | |||
| 536 | .supply_regulator = "WALLVDD", | 536 | .supply_regulator = "WALLVDD", |
| 537 | }; | 537 | }; |
| 538 | 538 | ||
| 539 | static struct wm831x_backup_pdata banff_backup_pdata __devinitdata = { | 539 | static struct wm831x_backup_pdata banff_backup_pdata = { |
| 540 | .charger_enable = 1, | 540 | .charger_enable = 1, |
| 541 | .vlim = 2500, /* mV */ | 541 | .vlim = 2500, /* mV */ |
| 542 | .ilim = 200, /* uA */ | 542 | .ilim = 200, /* uA */ |
| 543 | }; | 543 | }; |
| 544 | 544 | ||
| 545 | static struct wm831x_status_pdata banff_red_led __devinitdata = { | 545 | static struct wm831x_status_pdata banff_red_led = { |
| 546 | .name = "banff:red:", | 546 | .name = "banff:red:", |
| 547 | .default_src = WM831X_STATUS_MANUAL, | 547 | .default_src = WM831X_STATUS_MANUAL, |
| 548 | }; | 548 | }; |
| 549 | 549 | ||
| 550 | static struct wm831x_status_pdata banff_green_led __devinitdata = { | 550 | static struct wm831x_status_pdata banff_green_led = { |
| 551 | .name = "banff:green:", | 551 | .name = "banff:green:", |
| 552 | .default_src = WM831X_STATUS_MANUAL, | 552 | .default_src = WM831X_STATUS_MANUAL, |
| 553 | }; | 553 | }; |
| 554 | 554 | ||
| 555 | static struct wm831x_touch_pdata touch_pdata __devinitdata = { | 555 | static struct wm831x_touch_pdata touch_pdata = { |
| 556 | .data_irq = S3C_EINT(26), | 556 | .data_irq = S3C_EINT(26), |
| 557 | .pd_irq = S3C_EINT(27), | 557 | .pd_irq = S3C_EINT(27), |
| 558 | }; | 558 | }; |
| 559 | 559 | ||
| 560 | static struct wm831x_pdata crag_pmic_pdata __devinitdata = { | 560 | static struct wm831x_pdata crag_pmic_pdata = { |
| 561 | .wm831x_num = 1, | 561 | .wm831x_num = 1, |
| 562 | .gpio_base = BANFF_PMIC_GPIO_BASE, | 562 | .gpio_base = BANFF_PMIC_GPIO_BASE, |
| 563 | .soft_shutdown = true, | 563 | .soft_shutdown = true, |
| @@ -601,7 +601,7 @@ static struct wm831x_pdata crag_pmic_pdata __devinitdata = { | |||
| 601 | .touch = &touch_pdata, | 601 | .touch = &touch_pdata, |
| 602 | }; | 602 | }; |
| 603 | 603 | ||
| 604 | static struct i2c_board_info i2c_devs0[] __devinitdata = { | 604 | static struct i2c_board_info i2c_devs0[] = { |
| 605 | { I2C_BOARD_INFO("24c08", 0x50), }, | 605 | { I2C_BOARD_INFO("24c08", 0x50), }, |
| 606 | { I2C_BOARD_INFO("tca6408", 0x20), | 606 | { I2C_BOARD_INFO("tca6408", 0x20), |
| 607 | .platform_data = &crag6410_pca_data, | 607 | .platform_data = &crag6410_pca_data, |
| @@ -616,13 +616,13 @@ static struct s3c2410_platform_i2c i2c0_pdata = { | |||
| 616 | .frequency = 400000, | 616 | .frequency = 400000, |
| 617 | }; | 617 | }; |
| 618 | 618 | ||
| 619 | static struct regulator_consumer_supply pvdd_1v2_consumers[] __devinitdata = { | 619 | static struct regulator_consumer_supply pvdd_1v2_consumers[] = { |
| 620 | REGULATOR_SUPPLY("DCVDD", "spi0.0"), | 620 | REGULATOR_SUPPLY("DCVDD", "spi0.0"), |
| 621 | REGULATOR_SUPPLY("AVDD", "spi0.0"), | 621 | REGULATOR_SUPPLY("AVDD", "spi0.0"), |
| 622 | REGULATOR_SUPPLY("AVDD", "spi0.1"), | 622 | REGULATOR_SUPPLY("AVDD", "spi0.1"), |
| 623 | }; | 623 | }; |
| 624 | 624 | ||
| 625 | static struct regulator_init_data pvdd_1v2 __devinitdata = { | 625 | static struct regulator_init_data pvdd_1v2 = { |
| 626 | .constraints = { | 626 | .constraints = { |
| 627 | .name = "PVDD_1V2", | 627 | .name = "PVDD_1V2", |
| 628 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | 628 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| @@ -632,7 +632,7 @@ static struct regulator_init_data pvdd_1v2 __devinitdata = { | |||
| 632 | .num_consumer_supplies = ARRAY_SIZE(pvdd_1v2_consumers), | 632 | .num_consumer_supplies = ARRAY_SIZE(pvdd_1v2_consumers), |
| 633 | }; | 633 | }; |
| 634 | 634 | ||
| 635 | static struct regulator_consumer_supply pvdd_1v8_consumers[] __devinitdata = { | 635 | static struct regulator_consumer_supply pvdd_1v8_consumers[] = { |
| 636 | REGULATOR_SUPPLY("LDOVDD", "1-001a"), | 636 | REGULATOR_SUPPLY("LDOVDD", "1-001a"), |
| 637 | REGULATOR_SUPPLY("PLLVDD", "1-001a"), | 637 | REGULATOR_SUPPLY("PLLVDD", "1-001a"), |
| 638 | REGULATOR_SUPPLY("DBVDD", "1-001a"), | 638 | REGULATOR_SUPPLY("DBVDD", "1-001a"), |
| @@ -664,7 +664,7 @@ static struct regulator_consumer_supply pvdd_1v8_consumers[] __devinitdata = { | |||
| 664 | REGULATOR_SUPPLY("CPVDD", "wm5110-codec"), | 664 | REGULATOR_SUPPLY("CPVDD", "wm5110-codec"), |
| 665 | }; | 665 | }; |
| 666 | 666 | ||
| 667 | static struct regulator_init_data pvdd_1v8 __devinitdata = { | 667 | static struct regulator_init_data pvdd_1v8 = { |
| 668 | .constraints = { | 668 | .constraints = { |
| 669 | .name = "PVDD_1V8", | 669 | .name = "PVDD_1V8", |
| 670 | .always_on = 1, | 670 | .always_on = 1, |
| @@ -674,12 +674,12 @@ static struct regulator_init_data pvdd_1v8 __devinitdata = { | |||
| 674 | .num_consumer_supplies = ARRAY_SIZE(pvdd_1v8_consumers), | 674 | .num_consumer_supplies = ARRAY_SIZE(pvdd_1v8_consumers), |
| 675 | }; | 675 | }; |
| 676 | 676 | ||
| 677 | static struct regulator_consumer_supply pvdd_3v3_consumers[] __devinitdata = { | 677 | static struct regulator_consumer_supply pvdd_3v3_consumers[] = { |
| 678 | REGULATOR_SUPPLY("MICVDD", "1-001a"), | 678 | REGULATOR_SUPPLY("MICVDD", "1-001a"), |
| 679 | REGULATOR_SUPPLY("AVDD1", "1-001a"), | 679 | REGULATOR_SUPPLY("AVDD1", "1-001a"), |
| 680 | }; | 680 | }; |
| 681 | 681 | ||
| 682 | static struct regulator_init_data pvdd_3v3 __devinitdata = { | 682 | static struct regulator_init_data pvdd_3v3 = { |
| 683 | .constraints = { | 683 | .constraints = { |
| 684 | .name = "PVDD_3V3", | 684 | .name = "PVDD_3V3", |
| 685 | .always_on = 1, | 685 | .always_on = 1, |
| @@ -689,7 +689,7 @@ static struct regulator_init_data pvdd_3v3 __devinitdata = { | |||
| 689 | .num_consumer_supplies = ARRAY_SIZE(pvdd_3v3_consumers), | 689 | .num_consumer_supplies = ARRAY_SIZE(pvdd_3v3_consumers), |
| 690 | }; | 690 | }; |
| 691 | 691 | ||
| 692 | static struct wm831x_pdata glenfarclas_pmic_pdata __devinitdata = { | 692 | static struct wm831x_pdata glenfarclas_pmic_pdata = { |
| 693 | .wm831x_num = 2, | 693 | .wm831x_num = 2, |
| 694 | .irq_base = GLENFARCLAS_PMIC_IRQ_BASE, | 694 | .irq_base = GLENFARCLAS_PMIC_IRQ_BASE, |
| 695 | .gpio_base = GLENFARCLAS_PMIC_GPIO_BASE, | 695 | .gpio_base = GLENFARCLAS_PMIC_GPIO_BASE, |
| @@ -721,7 +721,7 @@ static struct wm1250_ev1_pdata wm1250_ev1_pdata = { | |||
| 721 | }, | 721 | }, |
| 722 | }; | 722 | }; |
| 723 | 723 | ||
| 724 | static struct i2c_board_info i2c_devs1[] __devinitdata = { | 724 | static struct i2c_board_info i2c_devs1[] = { |
| 725 | { I2C_BOARD_INFO("wm8311", 0x34), | 725 | { I2C_BOARD_INFO("wm8311", 0x34), |
| 726 | .irq = S3C_EINT(0), | 726 | .irq = S3C_EINT(0), |
| 727 | .platform_data = &glenfarclas_pmic_pdata }, | 727 | .platform_data = &glenfarclas_pmic_pdata }, |
diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c index 7f07f08d8968..b143c4659346 100644 --- a/arch/arm/mach-sa1100/jornada720_ssp.c +++ b/arch/arm/mach-sa1100/jornada720_ssp.c | |||
| @@ -130,7 +130,7 @@ void jornada_ssp_end(void) | |||
| 130 | }; | 130 | }; |
| 131 | EXPORT_SYMBOL(jornada_ssp_end); | 131 | EXPORT_SYMBOL(jornada_ssp_end); |
| 132 | 132 | ||
| 133 | static int __devinit jornada_ssp_probe(struct platform_device *dev) | 133 | static int jornada_ssp_probe(struct platform_device *dev) |
| 134 | { | 134 | { |
| 135 | int ret; | 135 | int ret; |
| 136 | 136 | ||
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c index 88be0474f3d7..400f80332046 100644 --- a/arch/arm/mach-sa1100/neponset.c +++ b/arch/arm/mach-sa1100/neponset.c | |||
| @@ -154,7 +154,7 @@ static u_int neponset_get_mctrl(struct uart_port *port) | |||
| 154 | return ret; | 154 | return ret; |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | static struct sa1100_port_fns neponset_port_fns __devinitdata = { | 157 | static struct sa1100_port_fns neponset_port_fns = { |
| 158 | .set_mctrl = neponset_set_mctrl, | 158 | .set_mctrl = neponset_set_mctrl, |
| 159 | .get_mctrl = neponset_get_mctrl, | 159 | .get_mctrl = neponset_get_mctrl, |
| 160 | }; | 160 | }; |
| @@ -233,7 +233,7 @@ static struct sa1111_platform_data sa1111_info = { | |||
| 233 | .disable_devs = SA1111_DEVID_PS2_MSE, | 233 | .disable_devs = SA1111_DEVID_PS2_MSE, |
| 234 | }; | 234 | }; |
| 235 | 235 | ||
| 236 | static int __devinit neponset_probe(struct platform_device *dev) | 236 | static int neponset_probe(struct platform_device *dev) |
| 237 | { | 237 | { |
| 238 | struct neponset_drvdata *d; | 238 | struct neponset_drvdata *d; |
| 239 | struct resource *nep_res, *sa1111_res, *smc91x_res; | 239 | struct resource *nep_res, *sa1111_res, *smc91x_res; |
| @@ -368,7 +368,7 @@ static int __devinit neponset_probe(struct platform_device *dev) | |||
| 368 | return ret; | 368 | return ret; |
| 369 | } | 369 | } |
| 370 | 370 | ||
| 371 | static int __devexit neponset_remove(struct platform_device *dev) | 371 | static int neponset_remove(struct platform_device *dev) |
| 372 | { | 372 | { |
| 373 | struct neponset_drvdata *d = platform_get_drvdata(dev); | 373 | struct neponset_drvdata *d = platform_get_drvdata(dev); |
| 374 | int irq = platform_get_irq(dev, 0); | 374 | int irq = platform_get_irq(dev, 0); |
| @@ -420,7 +420,7 @@ static const struct dev_pm_ops neponset_pm_ops = { | |||
| 420 | 420 | ||
| 421 | static struct platform_driver neponset_device_driver = { | 421 | static struct platform_driver neponset_device_driver = { |
| 422 | .probe = neponset_probe, | 422 | .probe = neponset_probe, |
| 423 | .remove = __devexit_p(neponset_remove), | 423 | .remove = neponset_remove, |
| 424 | .driver = { | 424 | .driver = { |
| 425 | .name = "neponset", | 425 | .name = "neponset", |
| 426 | .owner = THIS_MODULE, | 426 | .owner = THIS_MODULE, |
diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c index 53d085871798..bffcd643d7a3 100644 --- a/arch/arm/mach-tegra/pcie.c +++ b/arch/arm/mach-tegra/pcie.c | |||
| @@ -331,7 +331,7 @@ static struct pci_ops tegra_pcie_ops = { | |||
| 331 | .write = tegra_pcie_write_conf, | 331 | .write = tegra_pcie_write_conf, |
| 332 | }; | 332 | }; |
| 333 | 333 | ||
| 334 | static void __devinit tegra_pcie_fixup_bridge(struct pci_dev *dev) | 334 | static void tegra_pcie_fixup_bridge(struct pci_dev *dev) |
| 335 | { | 335 | { |
| 336 | u16 reg; | 336 | u16 reg; |
| 337 | 337 | ||
| @@ -345,7 +345,7 @@ static void __devinit tegra_pcie_fixup_bridge(struct pci_dev *dev) | |||
| 345 | DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, tegra_pcie_fixup_bridge); | 345 | DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, tegra_pcie_fixup_bridge); |
| 346 | 346 | ||
| 347 | /* Tegra PCIE root complex wrongly reports device class */ | 347 | /* Tegra PCIE root complex wrongly reports device class */ |
| 348 | static void __devinit tegra_pcie_fixup_class(struct pci_dev *dev) | 348 | static void tegra_pcie_fixup_class(struct pci_dev *dev) |
| 349 | { | 349 | { |
| 350 | dev->class = PCI_CLASS_BRIDGE_PCI << 8; | 350 | dev->class = PCI_CLASS_BRIDGE_PCI << 8; |
| 351 | } | 351 | } |
| @@ -353,7 +353,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0bf0, tegra_pcie_fixup_class); | |||
| 353 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0bf1, tegra_pcie_fixup_class); | 353 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0bf1, tegra_pcie_fixup_class); |
| 354 | 354 | ||
| 355 | /* Tegra PCIE requires relaxed ordering */ | 355 | /* Tegra PCIE requires relaxed ordering */ |
| 356 | static void __devinit tegra_pcie_relax_enable(struct pci_dev *dev) | 356 | static void tegra_pcie_relax_enable(struct pci_dev *dev) |
| 357 | { | 357 | { |
| 358 | pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_RELAX_EN); | 358 | pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_RELAX_EN); |
| 359 | } | 359 | } |
diff --git a/arch/arm/mach-tegra/tegra2_emc.c b/arch/arm/mach-tegra/tegra2_emc.c index 837c7b9ea63b..e18aa2f83ebf 100644 --- a/arch/arm/mach-tegra/tegra2_emc.c +++ b/arch/arm/mach-tegra/tegra2_emc.c | |||
| @@ -268,7 +268,7 @@ static struct tegra_emc_pdata *tegra_emc_dt_parse_pdata( | |||
| 268 | } | 268 | } |
| 269 | #endif | 269 | #endif |
| 270 | 270 | ||
| 271 | static struct tegra_emc_pdata __devinit *tegra_emc_fill_pdata(struct platform_device *pdev) | 271 | static struct tegra_emc_pdata *tegra_emc_fill_pdata(struct platform_device *pdev) |
| 272 | { | 272 | { |
| 273 | struct clk *c = clk_get_sys(NULL, "emc"); | 273 | struct clk *c = clk_get_sys(NULL, "emc"); |
| 274 | struct tegra_emc_pdata *pdata; | 274 | struct tegra_emc_pdata *pdata; |
| @@ -296,7 +296,7 @@ static struct tegra_emc_pdata __devinit *tegra_emc_fill_pdata(struct platform_de | |||
| 296 | return pdata; | 296 | return pdata; |
| 297 | } | 297 | } |
| 298 | 298 | ||
| 299 | static int __devinit tegra_emc_probe(struct platform_device *pdev) | 299 | static int tegra_emc_probe(struct platform_device *pdev) |
| 300 | { | 300 | { |
| 301 | struct tegra_emc_pdata *pdata; | 301 | struct tegra_emc_pdata *pdata; |
| 302 | struct resource *res; | 302 | struct resource *res; |
| @@ -333,7 +333,7 @@ static int __devinit tegra_emc_probe(struct platform_device *pdev) | |||
| 333 | return 0; | 333 | return 0; |
| 334 | } | 334 | } |
| 335 | 335 | ||
| 336 | static struct of_device_id tegra_emc_of_match[] __devinitdata = { | 336 | static struct of_device_id tegra_emc_of_match[] = { |
| 337 | { .compatible = "nvidia,tegra20-emc", }, | 337 | { .compatible = "nvidia,tegra20-emc", }, |
| 338 | { }, | 338 | { }, |
| 339 | }; | 339 | }; |
diff --git a/arch/arm/mach-u300/dummyspichip.c b/arch/arm/mach-u300/dummyspichip.c index 03f793612594..2785cb67b5e8 100644 --- a/arch/arm/mach-u300/dummyspichip.c +++ b/arch/arm/mach-u300/dummyspichip.c | |||
| @@ -222,7 +222,7 @@ static ssize_t dummy_looptest(struct device *dev, | |||
| 222 | 222 | ||
| 223 | static DEVICE_ATTR(looptest, S_IRUGO, dummy_looptest, NULL); | 223 | static DEVICE_ATTR(looptest, S_IRUGO, dummy_looptest, NULL); |
| 224 | 224 | ||
| 225 | static int __devinit pl022_dummy_probe(struct spi_device *spi) | 225 | static int pl022_dummy_probe(struct spi_device *spi) |
| 226 | { | 226 | { |
| 227 | struct dummy *p_dummy; | 227 | struct dummy *p_dummy; |
| 228 | int status; | 228 | int status; |
| @@ -251,7 +251,7 @@ out_dev_create_looptest_failed: | |||
| 251 | return status; | 251 | return status; |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | static int __devexit pl022_dummy_remove(struct spi_device *spi) | 254 | static int pl022_dummy_remove(struct spi_device *spi) |
| 255 | { | 255 | { |
| 256 | struct dummy *p_dummy = dev_get_drvdata(&spi->dev); | 256 | struct dummy *p_dummy = dev_get_drvdata(&spi->dev); |
| 257 | 257 | ||
| @@ -269,7 +269,7 @@ static struct spi_driver pl022_dummy_driver = { | |||
| 269 | .owner = THIS_MODULE, | 269 | .owner = THIS_MODULE, |
| 270 | }, | 270 | }, |
| 271 | .probe = pl022_dummy_probe, | 271 | .probe = pl022_dummy_probe, |
| 272 | .remove = __devexit_p(pl022_dummy_remove), | 272 | .remove = pl022_dummy_remove, |
| 273 | }; | 273 | }; |
| 274 | 274 | ||
| 275 | static int __init pl022_init_dummy(void) | 275 | static int __init pl022_init_dummy(void) |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index db0bb75e2c76..5b286e06474c 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
| @@ -285,7 +285,8 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { | |||
| 285 | OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL), | 285 | OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL), |
| 286 | OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL), | 286 | OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL), |
| 287 | /* Requires device name bindings. */ | 287 | /* Requires device name bindings. */ |
| 288 | OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL), | 288 | OF_DEV_AUXDATA("stericsson,nmk_pinctrl", U8500_PRCMU_BASE, |
| 289 | "pinctrl-db8500", NULL), | ||
| 289 | /* Requires clock name and DMA bindings. */ | 290 | /* Requires clock name and DMA bindings. */ |
| 290 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000, | 291 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000, |
| 291 | "ux500-msp-i2s.0", &msp0_platform_data), | 292 | "ux500-msp-i2s.0", &msp0_platform_data), |
diff --git a/arch/arm/mach-versatile/include/mach/irqs.h b/arch/arm/mach-versatile/include/mach/irqs.h index bf44c61bd1f6..0fd771ca617b 100644 --- a/arch/arm/mach-versatile/include/mach/irqs.h +++ b/arch/arm/mach-versatile/include/mach/irqs.h | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | * IRQ interrupts definitions are the same as the INT definitions | 25 | * IRQ interrupts definitions are the same as the INT definitions |
| 26 | * held within platform.h | 26 | * held within platform.h |
| 27 | */ | 27 | */ |
| 28 | #define IRQ_VIC_START 0 | 28 | #define IRQ_VIC_START 32 |
| 29 | #define IRQ_WDOGINT (IRQ_VIC_START + INT_WDOGINT) | 29 | #define IRQ_WDOGINT (IRQ_VIC_START + INT_WDOGINT) |
| 30 | #define IRQ_SOFTINT (IRQ_VIC_START + INT_SOFTINT) | 30 | #define IRQ_SOFTINT (IRQ_VIC_START + INT_SOFTINT) |
| 31 | #define IRQ_COMMRx (IRQ_VIC_START + INT_COMMRx) | 31 | #define IRQ_COMMRx (IRQ_VIC_START + INT_COMMRx) |
| @@ -100,7 +100,7 @@ | |||
| 100 | /* | 100 | /* |
| 101 | * Secondary interrupt controller | 101 | * Secondary interrupt controller |
| 102 | */ | 102 | */ |
| 103 | #define IRQ_SIC_START 32 | 103 | #define IRQ_SIC_START 64 |
| 104 | #define IRQ_SIC_MMCI0B (IRQ_SIC_START + SIC_INT_MMCI0B) | 104 | #define IRQ_SIC_MMCI0B (IRQ_SIC_START + SIC_INT_MMCI0B) |
| 105 | #define IRQ_SIC_MMCI1B (IRQ_SIC_START + SIC_INT_MMCI1B) | 105 | #define IRQ_SIC_MMCI1B (IRQ_SIC_START + SIC_INT_MMCI1B) |
| 106 | #define IRQ_SIC_KMI0 (IRQ_SIC_START + SIC_INT_KMI0) | 106 | #define IRQ_SIC_KMI0 (IRQ_SIC_START + SIC_INT_KMI0) |
| @@ -120,7 +120,7 @@ | |||
| 120 | #define IRQ_SIC_PCI1 (IRQ_SIC_START + SIC_INT_PCI1) | 120 | #define IRQ_SIC_PCI1 (IRQ_SIC_START + SIC_INT_PCI1) |
| 121 | #define IRQ_SIC_PCI2 (IRQ_SIC_START + SIC_INT_PCI2) | 121 | #define IRQ_SIC_PCI2 (IRQ_SIC_START + SIC_INT_PCI2) |
| 122 | #define IRQ_SIC_PCI3 (IRQ_SIC_START + SIC_INT_PCI3) | 122 | #define IRQ_SIC_PCI3 (IRQ_SIC_START + SIC_INT_PCI3) |
| 123 | #define IRQ_SIC_END 63 | 123 | #define IRQ_SIC_END 95 |
| 124 | 124 | ||
| 125 | #define IRQ_GPIO0_START (IRQ_SIC_END + 1) | 125 | #define IRQ_GPIO0_START (IRQ_SIC_END + 1) |
| 126 | #define IRQ_GPIO0_END (IRQ_GPIO0_START + 31) | 126 | #define IRQ_GPIO0_END (IRQ_GPIO0_START + 31) |
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index 99e63f5f99d1..52d315b792c8 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig | |||
| @@ -42,7 +42,6 @@ config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA | |||
| 42 | bool "Enable A5 and A9 only errata work-arounds" | 42 | bool "Enable A5 and A9 only errata work-arounds" |
| 43 | default y | 43 | default y |
| 44 | select ARM_ERRATA_720789 | 44 | select ARM_ERRATA_720789 |
| 45 | select ARM_ERRATA_751472 | ||
| 46 | select PL310_ERRATA_753970 if CACHE_PL310 | 45 | select PL310_ERRATA_753970 if CACHE_PL310 |
| 47 | help | 46 | help |
| 48 | Provides common dependencies for Versatile Express platforms | 47 | Provides common dependencies for Versatile Express platforms |
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 6911b8b2745c..c2f37390308a 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
| @@ -352,7 +352,8 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask) | |||
| 352 | /* Unmapped register. */ | 352 | /* Unmapped register. */ |
| 353 | sync_reg_offset = L2X0_DUMMY_REG; | 353 | sync_reg_offset = L2X0_DUMMY_REG; |
| 354 | #endif | 354 | #endif |
| 355 | outer_cache.set_debug = pl310_set_debug; | 355 | if ((cache_id & L2X0_CACHE_ID_RTL_MASK) <= L2X0_CACHE_ID_RTL_R3P0) |
| 356 | outer_cache.set_debug = pl310_set_debug; | ||
| 356 | break; | 357 | break; |
| 357 | case L2X0_CACHE_ID_PART_L210: | 358 | case L2X0_CACHE_ID_PART_L210: |
| 358 | ways = (aux >> 13) & 0xf; | 359 | ways = (aux >> 13) & 0xf; |
| @@ -459,8 +460,8 @@ static void aurora_pa_range(unsigned long start, unsigned long end, | |||
| 459 | unsigned long flags; | 460 | unsigned long flags; |
| 460 | 461 | ||
| 461 | raw_spin_lock_irqsave(&l2x0_lock, flags); | 462 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
| 462 | writel(start, l2x0_base + AURORA_RANGE_BASE_ADDR_REG); | 463 | writel_relaxed(start, l2x0_base + AURORA_RANGE_BASE_ADDR_REG); |
| 463 | writel(end, l2x0_base + offset); | 464 | writel_relaxed(end, l2x0_base + offset); |
| 464 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); | 465 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
| 465 | 466 | ||
| 466 | cache_sync(); | 467 | cache_sync(); |
| @@ -505,15 +506,21 @@ static void aurora_clean_range(unsigned long start, unsigned long end) | |||
| 505 | 506 | ||
| 506 | static void aurora_flush_range(unsigned long start, unsigned long end) | 507 | static void aurora_flush_range(unsigned long start, unsigned long end) |
| 507 | { | 508 | { |
| 508 | if (!l2_wt_override) { | 509 | start &= ~(CACHE_LINE_SIZE - 1); |
| 509 | start &= ~(CACHE_LINE_SIZE - 1); | 510 | end = ALIGN(end, CACHE_LINE_SIZE); |
| 510 | end = ALIGN(end, CACHE_LINE_SIZE); | 511 | while (start != end) { |
| 511 | while (start != end) { | 512 | unsigned long range_end = calc_range_end(start, end); |
| 512 | unsigned long range_end = calc_range_end(start, end); | 513 | /* |
| 514 | * If L2 is forced to WT, the L2 will always be clean and we | ||
| 515 | * just need to invalidate. | ||
| 516 | */ | ||
| 517 | if (l2_wt_override) | ||
| 513 | aurora_pa_range(start, range_end - CACHE_LINE_SIZE, | 518 | aurora_pa_range(start, range_end - CACHE_LINE_SIZE, |
| 514 | AURORA_FLUSH_RANGE_REG); | 519 | AURORA_INVAL_RANGE_REG); |
| 515 | start = range_end; | 520 | else |
| 516 | } | 521 | aurora_pa_range(start, range_end - CACHE_LINE_SIZE, |
| 522 | AURORA_FLUSH_RANGE_REG); | ||
| 523 | start = range_end; | ||
| 517 | } | 524 | } |
| 518 | } | 525 | } |
| 519 | 526 | ||
| @@ -668,8 +675,9 @@ static void pl310_resume(void) | |||
| 668 | static void aurora_resume(void) | 675 | static void aurora_resume(void) |
| 669 | { | 676 | { |
| 670 | if (!(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { | 677 | if (!(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { |
| 671 | writel(l2x0_saved_regs.aux_ctrl, l2x0_base + L2X0_AUX_CTRL); | 678 | writel_relaxed(l2x0_saved_regs.aux_ctrl, |
| 672 | writel(l2x0_saved_regs.ctrl, l2x0_base + L2X0_CTRL); | 679 | l2x0_base + L2X0_AUX_CTRL); |
| 680 | writel_relaxed(l2x0_saved_regs.ctrl, l2x0_base + L2X0_CTRL); | ||
| 673 | } | 681 | } |
| 674 | } | 682 | } |
| 675 | 683 | ||
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 350f6a74992b..3a3c015f8d5c 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
| @@ -169,6 +169,7 @@ __v7_ca15mp_setup: | |||
| 169 | orreq r0, r0, r10 @ Enable CPU-specific SMP bits | 169 | orreq r0, r0, r10 @ Enable CPU-specific SMP bits |
| 170 | mcreq p15, 0, r0, c1, c0, 1 | 170 | mcreq p15, 0, r0, c1, c0, 1 |
| 171 | #endif | 171 | #endif |
| 172 | b __v7_setup | ||
| 172 | 173 | ||
| 173 | __v7_pj4b_setup: | 174 | __v7_pj4b_setup: |
| 174 | #ifdef CONFIG_CPU_PJ4B | 175 | #ifdef CONFIG_CPU_PJ4B |
| @@ -245,7 +246,8 @@ __v7_setup: | |||
| 245 | ldr r10, =0x00000c08 @ Cortex-A8 primary part number | 246 | ldr r10, =0x00000c08 @ Cortex-A8 primary part number |
| 246 | teq r0, r10 | 247 | teq r0, r10 |
| 247 | bne 2f | 248 | bne 2f |
| 248 | #ifdef CONFIG_ARM_ERRATA_430973 | 249 | #if defined(CONFIG_ARM_ERRATA_430973) && !defined(CONFIG_ARCH_MULTIPLATFORM) |
| 250 | |||
| 249 | teq r5, #0x00100000 @ only present in r1p* | 251 | teq r5, #0x00100000 @ only present in r1p* |
| 250 | mrceq p15, 0, r10, c1, c0, 1 @ read aux control register | 252 | mrceq p15, 0, r10, c1, c0, 1 @ read aux control register |
| 251 | orreq r10, r10, #(1 << 6) @ set IBE to 1 | 253 | orreq r10, r10, #(1 << 6) @ set IBE to 1 |
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c index f3771cdb9838..5b0b86bb34bb 100644 --- a/arch/arm/plat-omap/counter_32k.c +++ b/arch/arm/plat-omap/counter_32k.c | |||
| @@ -22,6 +22,8 @@ | |||
| 22 | #include <asm/mach/time.h> | 22 | #include <asm/mach/time.h> |
| 23 | #include <asm/sched_clock.h> | 23 | #include <asm/sched_clock.h> |
| 24 | 24 | ||
| 25 | #include <plat/counter-32k.h> | ||
| 26 | |||
| 25 | /* OMAP2_32KSYNCNT_CR_OFF: offset of 32ksync counter register */ | 27 | /* OMAP2_32KSYNCNT_CR_OFF: offset of 32ksync counter register */ |
| 26 | #define OMAP2_32KSYNCNT_REV_OFF 0x0 | 28 | #define OMAP2_32KSYNCNT_REV_OFF 0x0 |
| 27 | #define OMAP2_32KSYNCNT_REV_SCHEME (0x3 << 30) | 29 | #define OMAP2_32KSYNCNT_REV_SCHEME (0x3 << 30) |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 37a488aaa2ba..4136b20cba3c 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
| @@ -2000,7 +2000,7 @@ void omap_dma_global_context_restore(void) | |||
| 2000 | omap_clear_dma(ch); | 2000 | omap_clear_dma(ch); |
| 2001 | } | 2001 | } |
| 2002 | 2002 | ||
| 2003 | static int __devinit omap_system_dma_probe(struct platform_device *pdev) | 2003 | static int omap_system_dma_probe(struct platform_device *pdev) |
| 2004 | { | 2004 | { |
| 2005 | int ch, ret = 0; | 2005 | int ch, ret = 0; |
| 2006 | int dma_irq; | 2006 | int dma_irq; |
| @@ -2116,7 +2116,7 @@ exit_dma_lch_fail: | |||
| 2116 | return ret; | 2116 | return ret; |
| 2117 | } | 2117 | } |
| 2118 | 2118 | ||
| 2119 | static int __devexit omap_system_dma_remove(struct platform_device *pdev) | 2119 | static int omap_system_dma_remove(struct platform_device *pdev) |
| 2120 | { | 2120 | { |
| 2121 | int dma_irq; | 2121 | int dma_irq; |
| 2122 | 2122 | ||
| @@ -2140,7 +2140,7 @@ static int __devexit omap_system_dma_remove(struct platform_device *pdev) | |||
| 2140 | 2140 | ||
| 2141 | static struct platform_driver omap_system_dma_driver = { | 2141 | static struct platform_driver omap_system_dma_driver = { |
| 2142 | .probe = omap_system_dma_probe, | 2142 | .probe = omap_system_dma_probe, |
| 2143 | .remove = __devexit_p(omap_system_dma_remove), | 2143 | .remove = omap_system_dma_remove, |
| 2144 | .driver = { | 2144 | .driver = { |
| 2145 | .name = "omap_dma_system" | 2145 | .name = "omap_dma_system" |
| 2146 | }, | 2146 | }, |
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index d51b75bdcad4..7b433f3bddca 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
| @@ -777,7 +777,7 @@ EXPORT_SYMBOL_GPL(omap_dm_timers_active); | |||
| 777 | * Called by driver framework at the end of device registration for all | 777 | * Called by driver framework at the end of device registration for all |
| 778 | * timer devices. | 778 | * timer devices. |
| 779 | */ | 779 | */ |
| 780 | static int __devinit omap_dm_timer_probe(struct platform_device *pdev) | 780 | static int omap_dm_timer_probe(struct platform_device *pdev) |
| 781 | { | 781 | { |
| 782 | unsigned long flags; | 782 | unsigned long flags; |
| 783 | struct omap_dm_timer *timer; | 783 | struct omap_dm_timer *timer; |
| @@ -864,7 +864,7 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev) | |||
| 864 | * In addition to freeing platform resources it also deletes the timer | 864 | * In addition to freeing platform resources it also deletes the timer |
| 865 | * entry from the local list. | 865 | * entry from the local list. |
| 866 | */ | 866 | */ |
| 867 | static int __devexit omap_dm_timer_remove(struct platform_device *pdev) | 867 | static int omap_dm_timer_remove(struct platform_device *pdev) |
| 868 | { | 868 | { |
| 869 | struct omap_dm_timer *timer; | 869 | struct omap_dm_timer *timer; |
| 870 | unsigned long flags; | 870 | unsigned long flags; |
| @@ -891,7 +891,7 @@ MODULE_DEVICE_TABLE(of, omap_timer_match); | |||
| 891 | 891 | ||
| 892 | static struct platform_driver omap_dm_timer_driver = { | 892 | static struct platform_driver omap_dm_timer_driver = { |
| 893 | .probe = omap_dm_timer_probe, | 893 | .probe = omap_dm_timer_probe, |
| 894 | .remove = __devexit_p(omap_dm_timer_remove), | 894 | .remove = omap_dm_timer_remove, |
| 895 | .driver = { | 895 | .driver = { |
| 896 | .name = "omap_timer", | 896 | .name = "omap_timer", |
| 897 | .of_match_table = of_match_ptr(omap_timer_match), | 897 | .of_match_table = of_match_ptr(omap_timer_match), |
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 743fc2836f7a..a5bc92d7e476 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
| @@ -26,6 +26,8 @@ | |||
| 26 | 26 | ||
| 27 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
| 28 | 28 | ||
| 29 | #include <plat/sram.h> | ||
| 30 | |||
| 29 | #define ROUND_DOWN(value,boundary) ((value) & (~((boundary)-1))) | 31 | #define ROUND_DOWN(value,boundary) ((value) & (~((boundary)-1))) |
| 30 | 32 | ||
| 31 | static void __iomem *omap_sram_base; | 33 | static void __iomem *omap_sram_base; |
diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c index 584c9bf8ed2d..8e11e96eab5e 100644 --- a/arch/arm/plat-pxa/ssp.c +++ b/arch/arm/plat-pxa/ssp.c | |||
| @@ -72,7 +72,7 @@ void pxa_ssp_free(struct ssp_device *ssp) | |||
| 72 | } | 72 | } |
| 73 | EXPORT_SYMBOL(pxa_ssp_free); | 73 | EXPORT_SYMBOL(pxa_ssp_free); |
| 74 | 74 | ||
| 75 | static int __devinit pxa_ssp_probe(struct platform_device *pdev) | 75 | static int pxa_ssp_probe(struct platform_device *pdev) |
| 76 | { | 76 | { |
| 77 | const struct platform_device_id *id = platform_get_device_id(pdev); | 77 | const struct platform_device_id *id = platform_get_device_id(pdev); |
| 78 | struct resource *res; | 78 | struct resource *res; |
| @@ -164,7 +164,7 @@ err_free: | |||
| 164 | return ret; | 164 | return ret; |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | static int __devexit pxa_ssp_remove(struct platform_device *pdev) | 167 | static int pxa_ssp_remove(struct platform_device *pdev) |
| 168 | { | 168 | { |
| 169 | struct resource *res; | 169 | struct resource *res; |
| 170 | struct ssp_device *ssp; | 170 | struct ssp_device *ssp; |
| @@ -199,7 +199,7 @@ static const struct platform_device_id ssp_id_table[] = { | |||
| 199 | 199 | ||
| 200 | static struct platform_driver pxa_ssp_driver = { | 200 | static struct platform_driver pxa_ssp_driver = { |
| 201 | .probe = pxa_ssp_probe, | 201 | .probe = pxa_ssp_probe, |
| 202 | .remove = __devexit_p(pxa_ssp_remove), | 202 | .remove = pxa_ssp_remove, |
| 203 | .driver = { | 203 | .driver = { |
| 204 | .owner = THIS_MODULE, | 204 | .owner = THIS_MODULE, |
| 205 | .name = "pxa2xx-ssp", | 205 | .name = "pxa2xx-ssp", |
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index 37542c2689a2..2d676ab50f73 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c | |||
| @@ -416,7 +416,7 @@ static int s3c_adc_probe(struct platform_device *pdev) | |||
| 416 | return 0; | 416 | return 0; |
| 417 | } | 417 | } |
| 418 | 418 | ||
| 419 | static int __devexit s3c_adc_remove(struct platform_device *pdev) | 419 | static int s3c_adc_remove(struct platform_device *pdev) |
| 420 | { | 420 | { |
| 421 | struct adc_device *adc = platform_get_drvdata(pdev); | 421 | struct adc_device *adc = platform_get_drvdata(pdev); |
| 422 | 422 | ||
| @@ -516,7 +516,7 @@ static struct platform_driver s3c_adc_driver = { | |||
| 516 | .pm = &adc_pm_ops, | 516 | .pm = &adc_pm_ops, |
| 517 | }, | 517 | }, |
| 518 | .probe = s3c_adc_probe, | 518 | .probe = s3c_adc_probe, |
| 519 | .remove = __devexit_p(s3c_adc_remove), | 519 | .remove = s3c_adc_remove, |
| 520 | }; | 520 | }; |
| 521 | 521 | ||
| 522 | static int __init adc_init(void) | 522 | static int __init adc_init(void) |
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index e0072ce8d6e9..b69e11dc679d 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h | |||
| @@ -43,7 +43,7 @@ extern unsigned long samsung_cpu_id; | |||
| 43 | #define EXYNOS4_CPU_MASK 0xFFFE0000 | 43 | #define EXYNOS4_CPU_MASK 0xFFFE0000 |
| 44 | 44 | ||
| 45 | #define EXYNOS5250_SOC_ID 0x43520000 | 45 | #define EXYNOS5250_SOC_ID 0x43520000 |
| 46 | #define EXYNOS5440_SOC_ID 0x54400000 | 46 | #define EXYNOS5440_SOC_ID 0xE5440000 |
| 47 | #define EXYNOS5_SOC_MASK 0xFFFFF000 | 47 | #define EXYNOS5_SOC_MASK 0xFFFFF000 |
| 48 | 48 | ||
| 49 | #define IS_SAMSUNG_CPU(name, id, mask) \ | 49 | #define IS_SAMSUNG_CPU(name, id, mask) \ |
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 9c829b008261..f8f362aafee9 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig | |||
| @@ -2,6 +2,8 @@ config ARM64 | |||
| 2 | def_bool y | 2 | def_bool y |
| 3 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE | 3 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE |
| 4 | select ARCH_WANT_COMPAT_IPC_PARSE_VERSION | 4 | select ARCH_WANT_COMPAT_IPC_PARSE_VERSION |
| 5 | select ARM_AMBA | ||
| 6 | select CLONE_BACKWARDS | ||
| 5 | select COMMON_CLK | 7 | select COMMON_CLK |
| 6 | select GENERIC_CLOCKEVENTS | 8 | select GENERIC_CLOCKEVENTS |
| 7 | select GENERIC_HARDIRQS_NO_DEPRECATED | 9 | select GENERIC_HARDIRQS_NO_DEPRECATED |
| @@ -31,7 +33,6 @@ config ARM64 | |||
| 31 | select RTC_LIB | 33 | select RTC_LIB |
| 32 | select SPARSE_IRQ | 34 | select SPARSE_IRQ |
| 33 | select SYSCTL_EXCEPTION_TRACE | 35 | select SYSCTL_EXCEPTION_TRACE |
| 34 | select CLONE_BACKWARDS | ||
| 35 | help | 36 | help |
| 36 | ARM 64-bit (AArch64) Linux support. | 37 | ARM 64-bit (AArch64) Linux support. |
| 37 | 38 | ||
| @@ -90,6 +91,9 @@ config SWIOTLB | |||
| 90 | config IOMMU_HELPER | 91 | config IOMMU_HELPER |
| 91 | def_bool SWIOTLB | 92 | def_bool SWIOTLB |
| 92 | 93 | ||
| 94 | config GENERIC_GPIO | ||
| 95 | def_bool y | ||
| 96 | |||
| 93 | source "init/Kconfig" | 97 | source "init/Kconfig" |
| 94 | 98 | ||
| 95 | source "kernel/Kconfig.freezer" | 99 | source "kernel/Kconfig.freezer" |
diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile index 801e2d7fcbc6..32ac0aef0068 100644 --- a/arch/arm64/boot/dts/Makefile +++ b/arch/arm64/boot/dts/Makefile | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | targets += dtbs | 1 | targets += dtbs |
| 2 | targets += $(dtb-y) | ||
| 2 | 3 | ||
| 3 | dtbs: $(addprefix $(obj)/, $(dtb-y)) | 4 | dtbs: $(addprefix $(obj)/, $(dtb-y)) |
| 4 | 5 | ||
diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h index d9ec40217a27..618b450e5a1d 100644 --- a/arch/arm64/include/asm/compat.h +++ b/arch/arm64/include/asm/compat.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | */ | 23 | */ |
| 24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
| 25 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
| 26 | #include <linux/ptrace.h> | ||
| 26 | 27 | ||
| 27 | #define COMPAT_USER_HZ 100 | 28 | #define COMPAT_USER_HZ 100 |
| 28 | #define COMPAT_UTS_MACHINE "armv8l\0\0" | 29 | #define COMPAT_UTS_MACHINE "armv8l\0\0" |
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 64b133949502..e333a243bfcc 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h | |||
| @@ -24,7 +24,8 @@ | |||
| 24 | /* | 24 | /* |
| 25 | * Software defined PTE bits definition. | 25 | * Software defined PTE bits definition. |
| 26 | */ | 26 | */ |
| 27 | #define PTE_VALID (_AT(pteval_t, 1) << 0) /* pte_present() check */ | 27 | #define PTE_VALID (_AT(pteval_t, 1) << 0) |
| 28 | #define PTE_PROT_NONE (_AT(pteval_t, 1) << 1) /* only when !PTE_VALID */ | ||
| 28 | #define PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !pte_present() */ | 29 | #define PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !pte_present() */ |
| 29 | #define PTE_DIRTY (_AT(pteval_t, 1) << 55) | 30 | #define PTE_DIRTY (_AT(pteval_t, 1) << 55) |
| 30 | #define PTE_SPECIAL (_AT(pteval_t, 1) << 56) | 31 | #define PTE_SPECIAL (_AT(pteval_t, 1) << 56) |
| @@ -60,9 +61,12 @@ extern void __pgd_error(const char *file, int line, unsigned long val); | |||
| 60 | 61 | ||
| 61 | extern pgprot_t pgprot_default; | 62 | extern pgprot_t pgprot_default; |
| 62 | 63 | ||
| 63 | #define _MOD_PROT(p, b) __pgprot(pgprot_val(p) | (b)) | 64 | #define __pgprot_modify(prot,mask,bits) \ |
| 65 | __pgprot((pgprot_val(prot) & ~(mask)) | (bits)) | ||
| 66 | |||
| 67 | #define _MOD_PROT(p, b) __pgprot_modify(p, 0, b) | ||
| 64 | 68 | ||
| 65 | #define PAGE_NONE _MOD_PROT(pgprot_default, PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) | 69 | #define PAGE_NONE __pgprot_modify(pgprot_default, PTE_TYPE_MASK, PTE_PROT_NONE) |
| 66 | #define PAGE_SHARED _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) | 70 | #define PAGE_SHARED _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) |
| 67 | #define PAGE_SHARED_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN) | 71 | #define PAGE_SHARED_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN) |
| 68 | #define PAGE_COPY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) | 72 | #define PAGE_COPY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) |
| @@ -72,7 +76,7 @@ extern pgprot_t pgprot_default; | |||
| 72 | #define PAGE_KERNEL _MOD_PROT(pgprot_default, PTE_PXN | PTE_UXN | PTE_DIRTY) | 76 | #define PAGE_KERNEL _MOD_PROT(pgprot_default, PTE_PXN | PTE_UXN | PTE_DIRTY) |
| 73 | #define PAGE_KERNEL_EXEC _MOD_PROT(pgprot_default, PTE_UXN | PTE_DIRTY) | 77 | #define PAGE_KERNEL_EXEC _MOD_PROT(pgprot_default, PTE_UXN | PTE_DIRTY) |
| 74 | 78 | ||
| 75 | #define __PAGE_NONE __pgprot(_PAGE_DEFAULT | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) | 79 | #define __PAGE_NONE __pgprot(((_PAGE_DEFAULT) & ~PTE_TYPE_MASK) | PTE_PROT_NONE) |
| 76 | #define __PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) | 80 | #define __PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) |
| 77 | #define __PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN) | 81 | #define __PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN) |
| 78 | #define __PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) | 82 | #define __PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) |
| @@ -125,16 +129,15 @@ extern struct page *empty_zero_page; | |||
| 125 | /* | 129 | /* |
| 126 | * The following only work if pte_present(). Undefined behaviour otherwise. | 130 | * The following only work if pte_present(). Undefined behaviour otherwise. |
| 127 | */ | 131 | */ |
| 128 | #define pte_present(pte) (pte_val(pte) & PTE_VALID) | 132 | #define pte_present(pte) (pte_val(pte) & (PTE_VALID | PTE_PROT_NONE)) |
| 129 | #define pte_dirty(pte) (pte_val(pte) & PTE_DIRTY) | 133 | #define pte_dirty(pte) (pte_val(pte) & PTE_DIRTY) |
| 130 | #define pte_young(pte) (pte_val(pte) & PTE_AF) | 134 | #define pte_young(pte) (pte_val(pte) & PTE_AF) |
| 131 | #define pte_special(pte) (pte_val(pte) & PTE_SPECIAL) | 135 | #define pte_special(pte) (pte_val(pte) & PTE_SPECIAL) |
| 132 | #define pte_write(pte) (!(pte_val(pte) & PTE_RDONLY)) | 136 | #define pte_write(pte) (!(pte_val(pte) & PTE_RDONLY)) |
| 133 | #define pte_exec(pte) (!(pte_val(pte) & PTE_UXN)) | 137 | #define pte_exec(pte) (!(pte_val(pte) & PTE_UXN)) |
| 134 | 138 | ||
| 135 | #define pte_present_exec_user(pte) \ | 139 | #define pte_valid_user(pte) \ |
| 136 | ((pte_val(pte) & (PTE_VALID | PTE_USER | PTE_UXN)) == \ | 140 | ((pte_val(pte) & (PTE_VALID | PTE_USER)) == (PTE_VALID | PTE_USER)) |
| 137 | (PTE_VALID | PTE_USER)) | ||
| 138 | 141 | ||
| 139 | #define PTE_BIT_FUNC(fn,op) \ | 142 | #define PTE_BIT_FUNC(fn,op) \ |
| 140 | static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; } | 143 | static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; } |
| @@ -157,10 +160,13 @@ extern void __sync_icache_dcache(pte_t pteval, unsigned long addr); | |||
| 157 | static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | 160 | static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, |
| 158 | pte_t *ptep, pte_t pte) | 161 | pte_t *ptep, pte_t pte) |
| 159 | { | 162 | { |
| 160 | if (pte_present_exec_user(pte)) | 163 | if (pte_valid_user(pte)) { |
| 161 | __sync_icache_dcache(pte, addr); | 164 | if (pte_exec(pte)) |
| 162 | if (!pte_dirty(pte)) | 165 | __sync_icache_dcache(pte, addr); |
| 163 | pte = pte_wrprotect(pte); | 166 | if (!pte_dirty(pte)) |
| 167 | pte = pte_wrprotect(pte); | ||
| 168 | } | ||
| 169 | |||
| 164 | set_pte(ptep, pte); | 170 | set_pte(ptep, pte); |
| 165 | } | 171 | } |
| 166 | 172 | ||
| @@ -170,9 +176,6 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | |||
| 170 | #define pte_huge(pte) ((pte_val(pte) & PTE_TYPE_MASK) == PTE_TYPE_HUGEPAGE) | 176 | #define pte_huge(pte) ((pte_val(pte) & PTE_TYPE_MASK) == PTE_TYPE_HUGEPAGE) |
| 171 | #define pte_mkhuge(pte) (__pte((pte_val(pte) & ~PTE_TYPE_MASK) | PTE_TYPE_HUGEPAGE)) | 177 | #define pte_mkhuge(pte) (__pte((pte_val(pte) & ~PTE_TYPE_MASK) | PTE_TYPE_HUGEPAGE)) |
| 172 | 178 | ||
| 173 | #define __pgprot_modify(prot,mask,bits) \ | ||
| 174 | __pgprot((pgprot_val(prot) & ~(mask)) | (bits)) | ||
| 175 | |||
| 176 | #define __HAVE_ARCH_PTE_SPECIAL | 179 | #define __HAVE_ARCH_PTE_SPECIAL |
| 177 | 180 | ||
| 178 | /* | 181 | /* |
| @@ -264,7 +267,8 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr) | |||
| 264 | 267 | ||
| 265 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 268 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
| 266 | { | 269 | { |
| 267 | const pteval_t mask = PTE_USER | PTE_PXN | PTE_UXN | PTE_RDONLY; | 270 | const pteval_t mask = PTE_USER | PTE_PXN | PTE_UXN | PTE_RDONLY | |
| 271 | PTE_PROT_NONE | PTE_VALID; | ||
| 268 | pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask); | 272 | pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask); |
| 269 | return pte; | 273 | return pte; |
| 270 | } | 274 | } |
diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h index 58432625fdb3..5ef47ba3ed45 100644 --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h | |||
| @@ -395,8 +395,13 @@ __SYSCALL(370, sys_name_to_handle_at) | |||
| 395 | __SYSCALL(371, compat_sys_open_by_handle_at) | 395 | __SYSCALL(371, compat_sys_open_by_handle_at) |
| 396 | __SYSCALL(372, compat_sys_clock_adjtime) | 396 | __SYSCALL(372, compat_sys_clock_adjtime) |
| 397 | __SYSCALL(373, sys_syncfs) | 397 | __SYSCALL(373, sys_syncfs) |
| 398 | __SYSCALL(374, compat_sys_sendmmsg) | ||
| 399 | __SYSCALL(375, sys_setns) | ||
| 400 | __SYSCALL(376, compat_sys_process_vm_readv) | ||
| 401 | __SYSCALL(377, compat_sys_process_vm_writev) | ||
| 402 | __SYSCALL(378, sys_ni_syscall) /* 378 for kcmp */ | ||
| 398 | 403 | ||
| 399 | #define __NR_compat_syscalls 374 | 404 | #define __NR_compat_syscalls 379 |
| 400 | 405 | ||
| 401 | /* | 406 | /* |
| 402 | * Compat syscall numbers used by the AArch64 kernel. | 407 | * Compat syscall numbers used by the AArch64 kernel. |
diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c index c76c7241125b..f7073c7b1ca9 100644 --- a/arch/arm64/kernel/perf_event.c +++ b/arch/arm64/kernel/perf_event.c | |||
| @@ -1221,7 +1221,7 @@ static struct of_device_id armpmu_of_device_ids[] = { | |||
| 1221 | {}, | 1221 | {}, |
| 1222 | }; | 1222 | }; |
| 1223 | 1223 | ||
| 1224 | static int __devinit armpmu_device_probe(struct platform_device *pdev) | 1224 | static int armpmu_device_probe(struct platform_device *pdev) |
| 1225 | { | 1225 | { |
| 1226 | if (!cpu_pmu) | 1226 | if (!cpu_pmu) |
| 1227 | return -ENODEV; | 1227 | return -ENODEV; |
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index c958cb84d75f..6a389dc1bd49 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c | |||
| @@ -252,10 +252,6 @@ void update_vsyscall(struct timekeeper *tk) | |||
| 252 | 252 | ||
| 253 | void update_vsyscall_tz(void) | 253 | void update_vsyscall_tz(void) |
| 254 | { | 254 | { |
| 255 | ++vdso_data->tb_seq_count; | ||
| 256 | smp_wmb(); | ||
| 257 | vdso_data->tz_minuteswest = sys_tz.tz_minuteswest; | 255 | vdso_data->tz_minuteswest = sys_tz.tz_minuteswest; |
| 258 | vdso_data->tz_dsttime = sys_tz.tz_dsttime; | 256 | vdso_data->tz_dsttime = sys_tz.tz_dsttime; |
| 259 | smp_wmb(); | ||
| 260 | ++vdso_data->tb_seq_count; | ||
| 261 | } | 257 | } |
diff --git a/arch/arm64/kernel/vdso/gettimeofday.S b/arch/arm64/kernel/vdso/gettimeofday.S index 8bf658d974f9..f0a6d10b5211 100644 --- a/arch/arm64/kernel/vdso/gettimeofday.S +++ b/arch/arm64/kernel/vdso/gettimeofday.S | |||
| @@ -73,8 +73,6 @@ ENTRY(__kernel_gettimeofday) | |||
| 73 | /* If tz is NULL, return 0. */ | 73 | /* If tz is NULL, return 0. */ |
| 74 | cbz x1, 3f | 74 | cbz x1, 3f |
| 75 | ldp w4, w5, [vdso_data, #VDSO_TZ_MINWEST] | 75 | ldp w4, w5, [vdso_data, #VDSO_TZ_MINWEST] |
| 76 | seqcnt_read w9 | ||
| 77 | seqcnt_check w9, 1b | ||
| 78 | stp w4, w5, [x1, #TZ_MINWEST] | 76 | stp w4, w5, [x1, #TZ_MINWEST] |
| 79 | 3: | 77 | 3: |
| 80 | mov x0, xzr | 78 | mov x0, xzr |
diff --git a/arch/avr32/lib/delay.c b/arch/avr32/lib/delay.c index 9aa8800830f3..c2f4a07dcda1 100644 --- a/arch/avr32/lib/delay.c +++ b/arch/avr32/lib/delay.c | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | #include <asm/processor.h> | 20 | #include <asm/processor.h> |
| 21 | #include <asm/sysreg.h> | 21 | #include <asm/sysreg.h> |
| 22 | 22 | ||
| 23 | int __devinit read_current_timer(unsigned long *timer_value) | 23 | int read_current_timer(unsigned long *timer_value) |
| 24 | { | 24 | { |
| 25 | *timer_value = sysreg_read(COUNT); | 25 | *timer_value = sysreg_read(COUNT); |
| 26 | return 0; | 26 | return 0; |
diff --git a/arch/blackfin/mach-common/dpmc.c b/arch/blackfin/mach-common/dpmc.c index 978bb400be06..724a8c5f5578 100644 --- a/arch/blackfin/mach-common/dpmc.c +++ b/arch/blackfin/mach-common/dpmc.c | |||
| @@ -129,7 +129,7 @@ static struct notifier_block vreg_cpufreq_notifier_block = { | |||
| 129 | * bfin_dpmc_probe - | 129 | * bfin_dpmc_probe - |
| 130 | * | 130 | * |
| 131 | */ | 131 | */ |
| 132 | static int __devinit bfin_dpmc_probe(struct platform_device *pdev) | 132 | static int bfin_dpmc_probe(struct platform_device *pdev) |
| 133 | { | 133 | { |
| 134 | if (pdev->dev.platform_data) | 134 | if (pdev->dev.platform_data) |
| 135 | pdata = pdev->dev.platform_data; | 135 | pdata = pdev->dev.platform_data; |
| @@ -143,7 +143,7 @@ static int __devinit bfin_dpmc_probe(struct platform_device *pdev) | |||
| 143 | /** | 143 | /** |
| 144 | * bfin_dpmc_remove - | 144 | * bfin_dpmc_remove - |
| 145 | */ | 145 | */ |
| 146 | static int __devexit bfin_dpmc_remove(struct platform_device *pdev) | 146 | static int bfin_dpmc_remove(struct platform_device *pdev) |
| 147 | { | 147 | { |
| 148 | pdata = NULL; | 148 | pdata = NULL; |
| 149 | return cpufreq_unregister_notifier(&vreg_cpufreq_notifier_block, | 149 | return cpufreq_unregister_notifier(&vreg_cpufreq_notifier_block, |
| @@ -152,7 +152,7 @@ static int __devexit bfin_dpmc_remove(struct platform_device *pdev) | |||
| 152 | 152 | ||
| 153 | struct platform_driver bfin_dpmc_device_driver = { | 153 | struct platform_driver bfin_dpmc_device_driver = { |
| 154 | .probe = bfin_dpmc_probe, | 154 | .probe = bfin_dpmc_probe, |
| 155 | .remove = __devexit_p(bfin_dpmc_remove), | 155 | .remove = bfin_dpmc_remove, |
| 156 | .driver = { | 156 | .driver = { |
| 157 | .name = DRIVER_NAME, | 157 | .name = DRIVER_NAME, |
| 158 | } | 158 | } |
diff --git a/arch/cris/arch-v32/drivers/pci/bios.c b/arch/cris/arch-v32/drivers/pci/bios.c index e3dfc72d0cfd..64a5fb93767d 100644 --- a/arch/cris/arch-v32/drivers/pci/bios.c +++ b/arch/cris/arch-v32/drivers/pci/bios.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
| 3 | #include <arch/hwregs/intr_vect.h> | 3 | #include <arch/hwregs/intr_vect.h> |
| 4 | 4 | ||
| 5 | void __devinit pcibios_fixup_bus(struct pci_bus *b) | 5 | void pcibios_fixup_bus(struct pci_bus *b) |
| 6 | { | 6 | { |
| 7 | } | 7 | } |
| 8 | 8 | ||
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c index ebe2cb30bd11..04a16edd5401 100644 --- a/arch/cris/arch-v32/kernel/smp.c +++ b/arch/cris/arch-v32/kernel/smp.c | |||
| @@ -84,7 +84,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
| 84 | cpumask_set_cpu(i, &phys_cpu_present_map); | 84 | cpumask_set_cpu(i, &phys_cpu_present_map); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | void __devinit smp_prepare_boot_cpu(void) | 87 | void smp_prepare_boot_cpu(void) |
| 88 | { | 88 | { |
| 89 | /* PGD pointer has moved after per_cpu initialization so | 89 | /* PGD pointer has moved after per_cpu initialization so |
| 90 | * update the MMU. | 90 | * update the MMU. |
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c index 3cb3392f799e..a5136474c6fd 100644 --- a/arch/frv/kernel/setup.c +++ b/arch/frv/kernel/setup.c | |||
| @@ -852,7 +852,7 @@ void __init setup_arch(char **cmdline_p) | |||
| 852 | /* | 852 | /* |
| 853 | * | 853 | * |
| 854 | */ | 854 | */ |
| 855 | static int __devinit setup_arch_serial(void) | 855 | static int setup_arch_serial(void) |
| 856 | { | 856 | { |
| 857 | /* register those serial ports that are available */ | 857 | /* register those serial ports that are available */ |
| 858 | #ifndef CONFIG_GDBSTUB_UART0 | 858 | #ifndef CONFIG_GDBSTUB_UART0 |
diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c index 71e9bcf58105..d186b254ce99 100644 --- a/arch/frv/mb93090-mb00/pci-vdk.c +++ b/arch/frv/mb93090-mb00/pci-vdk.c | |||
| @@ -268,7 +268,7 @@ static void __init pci_fixup_umc_ide(struct pci_dev *d) | |||
| 268 | d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO; | 268 | d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO; |
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | static void __devinit pci_fixup_ide_bases(struct pci_dev *d) | 271 | static void pci_fixup_ide_bases(struct pci_dev *d) |
| 272 | { | 272 | { |
| 273 | int i; | 273 | int i; |
| 274 | 274 | ||
| @@ -287,7 +287,7 @@ static void __devinit pci_fixup_ide_bases(struct pci_dev *d) | |||
| 287 | } | 287 | } |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | static void __devinit pci_fixup_ide_trash(struct pci_dev *d) | 290 | static void pci_fixup_ide_trash(struct pci_dev *d) |
| 291 | { | 291 | { |
| 292 | int i; | 292 | int i; |
| 293 | 293 | ||
| @@ -300,7 +300,7 @@ static void __devinit pci_fixup_ide_trash(struct pci_dev *d) | |||
| 300 | d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0; | 300 | d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0; |
| 301 | } | 301 | } |
| 302 | 302 | ||
| 303 | static void __devinit pci_fixup_latency(struct pci_dev *d) | 303 | static void pci_fixup_latency(struct pci_dev *d) |
| 304 | { | 304 | { |
| 305 | /* | 305 | /* |
| 306 | * SiS 5597 and 5598 chipsets require latency timer set to | 306 | * SiS 5597 and 5598 chipsets require latency timer set to |
diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h index 301609c3fcec..359e68a03ca3 100644 --- a/arch/ia64/include/asm/acpi.h +++ b/arch/ia64/include/asm/acpi.h | |||
| @@ -153,7 +153,7 @@ extern int additional_cpus; | |||
| 153 | #else | 153 | #else |
| 154 | #define MAX_PXM_DOMAINS (256) | 154 | #define MAX_PXM_DOMAINS (256) |
| 155 | #endif | 155 | #endif |
| 156 | extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS]; | 156 | extern int pxm_to_nid_map[MAX_PXM_DOMAINS]; |
| 157 | extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; | 157 | extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; |
| 158 | #endif | 158 | #endif |
| 159 | 159 | ||
diff --git a/arch/ia64/include/asm/iosapic.h b/arch/ia64/include/asm/iosapic.h index b9c102e15f22..94c89a2d97fe 100644 --- a/arch/ia64/include/asm/iosapic.h +++ b/arch/ia64/include/asm/iosapic.h | |||
| @@ -87,18 +87,13 @@ static inline void iosapic_eoi(char __iomem *iosapic, u32 vector) | |||
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | extern void __init iosapic_system_init (int pcat_compat); | 89 | extern void __init iosapic_system_init (int pcat_compat); |
| 90 | extern int __devinit iosapic_init (unsigned long address, | 90 | extern int iosapic_init (unsigned long address, unsigned int gsi_base); |
| 91 | unsigned int gsi_base); | ||
| 92 | #ifdef CONFIG_HOTPLUG | ||
| 93 | extern int iosapic_remove (unsigned int gsi_base); | 91 | extern int iosapic_remove (unsigned int gsi_base); |
| 94 | #else | ||
| 95 | #define iosapic_remove(gsi_base) (-EINVAL) | ||
| 96 | #endif /* CONFIG_HOTPLUG */ | ||
| 97 | extern int gsi_to_irq (unsigned int gsi); | 92 | extern int gsi_to_irq (unsigned int gsi); |
| 98 | extern int iosapic_register_intr (unsigned int gsi, unsigned long polarity, | 93 | extern int iosapic_register_intr (unsigned int gsi, unsigned long polarity, |
| 99 | unsigned long trigger); | 94 | unsigned long trigger); |
| 100 | extern void iosapic_unregister_intr (unsigned int irq); | 95 | extern void iosapic_unregister_intr (unsigned int irq); |
| 101 | extern void __devinit iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi, | 96 | extern void iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi, |
| 102 | unsigned long polarity, | 97 | unsigned long polarity, |
| 103 | unsigned long trigger); | 98 | unsigned long trigger); |
| 104 | extern int __init iosapic_register_platform_intr (u32 int_type, | 99 | extern int __init iosapic_register_platform_intr (u32 int_type, |
| @@ -109,7 +104,7 @@ extern int __init iosapic_register_platform_intr (u32 int_type, | |||
| 109 | unsigned long trigger); | 104 | unsigned long trigger); |
| 110 | 105 | ||
| 111 | #ifdef CONFIG_NUMA | 106 | #ifdef CONFIG_NUMA |
| 112 | extern void __devinit map_iosapic_to_node (unsigned int, int); | 107 | extern void map_iosapic_to_node (unsigned int, int); |
| 113 | #endif | 108 | #endif |
| 114 | #else | 109 | #else |
| 115 | #define iosapic_system_init(pcat_compat) do { } while (0) | 110 | #define iosapic_system_init(pcat_compat) do { } while (0) |
diff --git a/arch/ia64/include/asm/parport.h b/arch/ia64/include/asm/parport.h index 67e16adfcd25..638b4d271b99 100644 --- a/arch/ia64/include/asm/parport.h +++ b/arch/ia64/include/asm/parport.h | |||
| @@ -9,10 +9,9 @@ | |||
| 9 | #ifndef _ASM_IA64_PARPORT_H | 9 | #ifndef _ASM_IA64_PARPORT_H |
| 10 | #define _ASM_IA64_PARPORT_H 1 | 10 | #define _ASM_IA64_PARPORT_H 1 |
| 11 | 11 | ||
| 12 | static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); | 12 | static int parport_pc_find_isa_ports(int autoirq, int autodma); |
| 13 | 13 | ||
| 14 | static int __devinit | 14 | static int parport_pc_find_nonpci_ports(int autoirq, int autodma) |
| 15 | parport_pc_find_nonpci_ports (int autoirq, int autodma) | ||
| 16 | { | 15 | { |
| 17 | return parport_pc_find_isa_ports(autoirq, autodma); | 16 | return parport_pc_find_isa_ports(autoirq, autodma); |
| 18 | } | 17 | } |
diff --git a/arch/ia64/include/asm/smp.h b/arch/ia64/include/asm/smp.h index 0b3b3997decd..fea21e986022 100644 --- a/arch/ia64/include/asm/smp.h +++ b/arch/ia64/include/asm/smp.h | |||
| @@ -55,7 +55,7 @@ extern struct smp_boot_data { | |||
| 55 | int cpu_phys_id[NR_CPUS]; | 55 | int cpu_phys_id[NR_CPUS]; |
| 56 | } smp_boot_data __initdata; | 56 | } smp_boot_data __initdata; |
| 57 | 57 | ||
| 58 | extern char no_int_routing __devinitdata; | 58 | extern char no_int_routing; |
| 59 | 59 | ||
| 60 | extern cpumask_t cpu_core_map[NR_CPUS]; | 60 | extern cpumask_t cpu_core_map[NR_CPUS]; |
| 61 | DECLARE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map); | 61 | DECLARE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map); |
diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h index 8b3ff2f5b861..c3cc42a15af1 100644 --- a/arch/ia64/include/asm/unistd.h +++ b/arch/ia64/include/asm/unistd.h | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | #define NR_syscalls 311 /* length of syscall table */ | 14 | #define NR_syscalls 312 /* length of syscall table */ |
| 15 | 15 | ||
| 16 | /* | 16 | /* |
| 17 | * The following defines stop scripts/checksyscalls.sh from complaining about | 17 | * The following defines stop scripts/checksyscalls.sh from complaining about |
diff --git a/arch/ia64/include/uapi/asm/unistd.h b/arch/ia64/include/uapi/asm/unistd.h index b706aa54df20..34fd6fe46da1 100644 --- a/arch/ia64/include/uapi/asm/unistd.h +++ b/arch/ia64/include/uapi/asm/unistd.h | |||
| @@ -324,5 +324,6 @@ | |||
| 324 | #define __NR_process_vm_readv 1332 | 324 | #define __NR_process_vm_readv 1332 |
| 325 | #define __NR_process_vm_writev 1333 | 325 | #define __NR_process_vm_writev 1333 |
| 326 | #define __NR_accept4 1334 | 326 | #define __NR_accept4 1334 |
| 327 | #define __NR_finit_module 1335 | ||
| 327 | 328 | ||
| 328 | #endif /* _UAPI_ASM_IA64_UNISTD_H */ | 329 | #endif /* _UAPI_ASM_IA64_UNISTD_H */ |
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index e9682f5be343..335eb07480fe 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
| @@ -422,7 +422,7 @@ static int __init acpi_parse_madt(struct acpi_table_header *table) | |||
| 422 | #define PXM_FLAG_LEN ((MAX_PXM_DOMAINS + 1)/32) | 422 | #define PXM_FLAG_LEN ((MAX_PXM_DOMAINS + 1)/32) |
| 423 | 423 | ||
| 424 | static int __initdata srat_num_cpus; /* number of cpus */ | 424 | static int __initdata srat_num_cpus; /* number of cpus */ |
| 425 | static u32 __devinitdata pxm_flag[PXM_FLAG_LEN]; | 425 | static u32 pxm_flag[PXM_FLAG_LEN]; |
| 426 | #define pxm_bit_set(bit) (set_bit(bit,(void *)pxm_flag)) | 426 | #define pxm_bit_set(bit) (set_bit(bit,(void *)pxm_flag)) |
| 427 | #define pxm_bit_test(bit) (test_bit(bit,(void *)pxm_flag)) | 427 | #define pxm_bit_test(bit) (test_bit(bit,(void *)pxm_flag)) |
| 428 | static struct acpi_table_slit __initdata *slit_table; | 428 | static struct acpi_table_slit __initdata *slit_table; |
| @@ -956,8 +956,8 @@ EXPORT_SYMBOL(acpi_unmap_lsapic); | |||
| 956 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ | 956 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ |
| 957 | 957 | ||
| 958 | #ifdef CONFIG_ACPI_NUMA | 958 | #ifdef CONFIG_ACPI_NUMA |
| 959 | static acpi_status __devinit | 959 | static acpi_status acpi_map_iosapic(acpi_handle handle, u32 depth, |
| 960 | acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret) | 960 | void *context, void **ret) |
| 961 | { | 961 | { |
| 962 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 962 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
| 963 | union acpi_object *obj; | 963 | union acpi_object *obj; |
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index e25b784a2b72..6bfd8429ee0f 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
| @@ -1785,6 +1785,7 @@ sys_call_table: | |||
| 1785 | data8 sys_process_vm_readv | 1785 | data8 sys_process_vm_readv |
| 1786 | data8 sys_process_vm_writev | 1786 | data8 sys_process_vm_writev |
| 1787 | data8 sys_accept4 | 1787 | data8 sys_accept4 |
| 1788 | data8 sys_finit_module // 1335 | ||
| 1788 | 1789 | ||
| 1789 | .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls | 1790 | .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls |
| 1790 | #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ | 1791 | #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ |
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index ef4b5d877cf2..ee33c3aaa2fc 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
| @@ -147,7 +147,7 @@ static struct iosapic_intr_info { | |||
| 147 | unsigned char trigger : 1; /* trigger mode (see iosapic.h) */ | 147 | unsigned char trigger : 1; /* trigger mode (see iosapic.h) */ |
| 148 | } iosapic_intr_info[NR_IRQS]; | 148 | } iosapic_intr_info[NR_IRQS]; |
| 149 | 149 | ||
| 150 | static unsigned char pcat_compat __devinitdata; /* 8259 compatibility flag */ | 150 | static unsigned char pcat_compat; /* 8259 compatibility flag */ |
| 151 | 151 | ||
| 152 | static inline void | 152 | static inline void |
| 153 | iosapic_write(struct iosapic *iosapic, unsigned int reg, u32 val) | 153 | iosapic_write(struct iosapic *iosapic, unsigned int reg, u32 val) |
| @@ -914,10 +914,8 @@ iosapic_register_platform_intr (u32 int_type, unsigned int gsi, | |||
| 914 | /* | 914 | /* |
| 915 | * ACPI calls this when it finds an entry for a legacy ISA IRQ override. | 915 | * ACPI calls this when it finds an entry for a legacy ISA IRQ override. |
| 916 | */ | 916 | */ |
| 917 | void __devinit | 917 | void iosapic_override_isa_irq(unsigned int isa_irq, unsigned int gsi, |
| 918 | iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi, | 918 | unsigned long polarity, unsigned long trigger) |
| 919 | unsigned long polarity, | ||
| 920 | unsigned long trigger) | ||
| 921 | { | 919 | { |
| 922 | int vector, irq; | 920 | int vector, irq; |
| 923 | unsigned int dest = cpu_physical_id(smp_processor_id()); | 921 | unsigned int dest = cpu_physical_id(smp_processor_id()); |
| @@ -1012,8 +1010,7 @@ iosapic_check_gsi_range (unsigned int gsi_base, unsigned int ver) | |||
| 1012 | return 0; | 1010 | return 0; |
| 1013 | } | 1011 | } |
| 1014 | 1012 | ||
| 1015 | int __devinit | 1013 | int iosapic_init(unsigned long phys_addr, unsigned int gsi_base) |
| 1016 | iosapic_init (unsigned long phys_addr, unsigned int gsi_base) | ||
| 1017 | { | 1014 | { |
| 1018 | int num_rte, err, index; | 1015 | int num_rte, err, index; |
| 1019 | unsigned int isa_irq, ver; | 1016 | unsigned int isa_irq, ver; |
| @@ -1070,9 +1067,7 @@ iosapic_init (unsigned long phys_addr, unsigned int gsi_base) | |||
| 1070 | return 0; | 1067 | return 0; |
| 1071 | } | 1068 | } |
| 1072 | 1069 | ||
| 1073 | #ifdef CONFIG_HOTPLUG | 1070 | int iosapic_remove(unsigned int gsi_base) |
| 1074 | int | ||
| 1075 | iosapic_remove (unsigned int gsi_base) | ||
| 1076 | { | 1071 | { |
| 1077 | int index, err = 0; | 1072 | int index, err = 0; |
| 1078 | unsigned long flags; | 1073 | unsigned long flags; |
| @@ -1098,11 +1093,9 @@ iosapic_remove (unsigned int gsi_base) | |||
| 1098 | spin_unlock_irqrestore(&iosapic_lock, flags); | 1093 | spin_unlock_irqrestore(&iosapic_lock, flags); |
| 1099 | return err; | 1094 | return err; |
| 1100 | } | 1095 | } |
| 1101 | #endif /* CONFIG_HOTPLUG */ | ||
| 1102 | 1096 | ||
| 1103 | #ifdef CONFIG_NUMA | 1097 | #ifdef CONFIG_NUMA |
| 1104 | void __devinit | 1098 | void map_iosapic_to_node(unsigned int gsi_base, int node) |
| 1105 | map_iosapic_to_node(unsigned int gsi_base, int node) | ||
| 1106 | { | 1099 | { |
| 1107 | int index; | 1100 | int index; |
| 1108 | 1101 | ||
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 6a368cb2043e..500f1e4d9f9d 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
| @@ -347,8 +347,7 @@ ia64_sync_itc (unsigned int master) | |||
| 347 | /* | 347 | /* |
| 348 | * Ideally sets up per-cpu profiling hooks. Doesn't do much now... | 348 | * Ideally sets up per-cpu profiling hooks. Doesn't do much now... |
| 349 | */ | 349 | */ |
| 350 | static inline void __devinit | 350 | static inline void smp_setup_percpu_timer(void) |
| 351 | smp_setup_percpu_timer (void) | ||
| 352 | { | 351 | { |
| 353 | } | 352 | } |
| 354 | 353 | ||
| @@ -563,7 +562,7 @@ smp_prepare_cpus (unsigned int max_cpus) | |||
| 563 | } | 562 | } |
| 564 | } | 563 | } |
| 565 | 564 | ||
| 566 | void __devinit smp_prepare_boot_cpu(void) | 565 | void smp_prepare_boot_cpu(void) |
| 567 | { | 566 | { |
| 568 | set_cpu_online(smp_processor_id(), true); | 567 | set_cpu_online(smp_processor_id(), true); |
| 569 | cpu_set(smp_processor_id(), cpu_callin_map); | 568 | cpu_set(smp_processor_id(), cpu_callin_map); |
| @@ -713,8 +712,7 @@ smp_cpus_done (unsigned int dummy) | |||
| 713 | (int)num_online_cpus(), bogosum/(500000/HZ), (bogosum/(5000/HZ))%100); | 712 | (int)num_online_cpus(), bogosum/(500000/HZ), (bogosum/(5000/HZ))%100); |
| 714 | } | 713 | } |
| 715 | 714 | ||
| 716 | static inline void __devinit | 715 | static inline void set_cpu_sibling_map(int cpu) |
| 717 | set_cpu_sibling_map(int cpu) | ||
| 718 | { | 716 | { |
| 719 | int i; | 717 | int i; |
| 720 | 718 | ||
| @@ -793,8 +791,7 @@ init_smp_config(void) | |||
| 793 | * identify_siblings(cpu) gets called from identify_cpu. This populates the | 791 | * identify_siblings(cpu) gets called from identify_cpu. This populates the |
| 794 | * information related to logical execution units in per_cpu_data structure. | 792 | * information related to logical execution units in per_cpu_data structure. |
| 795 | */ | 793 | */ |
| 796 | void __devinit | 794 | void identify_siblings(struct cpuinfo_ia64 *c) |
| 797 | identify_siblings(struct cpuinfo_ia64 *c) | ||
| 798 | { | 795 | { |
| 799 | long status; | 796 | long status; |
| 800 | u16 pltid; | 797 | u16 pltid; |
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index b1995efbfd21..88a794536bc0 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
| @@ -243,8 +243,7 @@ static int __init nojitter_setup(char *str) | |||
| 243 | __setup("nojitter", nojitter_setup); | 243 | __setup("nojitter", nojitter_setup); |
| 244 | 244 | ||
| 245 | 245 | ||
| 246 | void __devinit | 246 | void ia64_init_itm(void) |
| 247 | ia64_init_itm (void) | ||
| 248 | { | 247 | { |
| 249 | unsigned long platform_base_freq, itc_freq; | 248 | unsigned long platform_base_freq, itc_freq; |
| 250 | struct pal_freq_ratio itc_ratio, proc_ratio; | 249 | struct pal_freq_ratio itc_ratio, proc_ratio; |
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index 082e383c1b6f..b755ea92aea7 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
| @@ -294,11 +294,10 @@ setup_gate (void) | |||
| 294 | ia64_patch_gate(); | 294 | ia64_patch_gate(); |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | void __devinit | 297 | void ia64_mmu_init(void *my_cpu_data) |
| 298 | ia64_mmu_init (void *my_cpu_data) | ||
| 299 | { | 298 | { |
| 300 | unsigned long pta, impl_va_bits; | 299 | unsigned long pta, impl_va_bits; |
| 301 | extern void __devinit tlb_init (void); | 300 | extern void tlb_init(void); |
| 302 | 301 | ||
| 303 | #ifdef CONFIG_DISABLE_VHPT | 302 | #ifdef CONFIG_DISABLE_VHPT |
| 304 | # define VHPT_ENABLE_BIT 0 | 303 | # define VHPT_ENABLE_BIT 0 |
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c index 7b3cdc6c6d91..ed6129768681 100644 --- a/arch/ia64/mm/tlb.c +++ b/arch/ia64/mm/tlb.c | |||
| @@ -337,8 +337,7 @@ flush_tlb_range (struct vm_area_struct *vma, unsigned long start, | |||
| 337 | } | 337 | } |
| 338 | EXPORT_SYMBOL(flush_tlb_range); | 338 | EXPORT_SYMBOL(flush_tlb_range); |
| 339 | 339 | ||
| 340 | void __devinit | 340 | void ia64_tlb_init(void) |
| 341 | ia64_tlb_init (void) | ||
| 342 | { | 341 | { |
| 343 | ia64_ptce_info_t uninitialized_var(ptce_info); /* GCC be quiet */ | 342 | ia64_ptce_info_t uninitialized_var(ptce_info); /* GCC be quiet */ |
| 344 | u64 tr_pgbits; | 343 | u64 tr_pgbits; |
diff --git a/arch/ia64/pci/fixup.c b/arch/ia64/pci/fixup.c index eab28e314022..5dc969dd4ac0 100644 --- a/arch/ia64/pci/fixup.c +++ b/arch/ia64/pci/fixup.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | * video device at this point. | 24 | * video device at this point. |
| 25 | */ | 25 | */ |
| 26 | 26 | ||
| 27 | static void __devinit pci_fixup_video(struct pci_dev *pdev) | 27 | static void pci_fixup_video(struct pci_dev *pdev) |
| 28 | { | 28 | { |
| 29 | struct pci_dev *bridge; | 29 | struct pci_dev *bridge; |
| 30 | struct pci_bus *bus; | 30 | struct pci_bus *bus; |
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 5faa66c5c2a8..55b72ad57329 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
| @@ -116,8 +116,7 @@ struct pci_ops pci_root_ops = { | |||
| 116 | 116 | ||
| 117 | /* Called by ACPI when it finds a new root bus. */ | 117 | /* Called by ACPI when it finds a new root bus. */ |
| 118 | 118 | ||
| 119 | static struct pci_controller * __devinit | 119 | static struct pci_controller *alloc_pci_controller(int seg) |
| 120 | alloc_pci_controller (int seg) | ||
| 121 | { | 120 | { |
| 122 | struct pci_controller *controller; | 121 | struct pci_controller *controller; |
| 123 | 122 | ||
| @@ -165,8 +164,8 @@ new_space (u64 phys_base, int sparse) | |||
| 165 | return i; | 164 | return i; |
| 166 | } | 165 | } |
| 167 | 166 | ||
| 168 | static u64 __devinit | 167 | static u64 add_io_space(struct pci_root_info *info, |
| 169 | add_io_space (struct pci_root_info *info, struct acpi_resource_address64 *addr) | 168 | struct acpi_resource_address64 *addr) |
| 170 | { | 169 | { |
| 171 | struct resource *resource; | 170 | struct resource *resource; |
| 172 | char *name; | 171 | char *name; |
| @@ -226,8 +225,8 @@ out: | |||
| 226 | return ~0; | 225 | return ~0; |
| 227 | } | 226 | } |
| 228 | 227 | ||
| 229 | static acpi_status __devinit resource_to_window(struct acpi_resource *resource, | 228 | static acpi_status resource_to_window(struct acpi_resource *resource, |
| 230 | struct acpi_resource_address64 *addr) | 229 | struct acpi_resource_address64 *addr) |
| 231 | { | 230 | { |
| 232 | acpi_status status; | 231 | acpi_status status; |
| 233 | 232 | ||
| @@ -249,8 +248,7 @@ static acpi_status __devinit resource_to_window(struct acpi_resource *resource, | |||
| 249 | return AE_ERROR; | 248 | return AE_ERROR; |
| 250 | } | 249 | } |
| 251 | 250 | ||
| 252 | static acpi_status __devinit | 251 | static acpi_status count_window(struct acpi_resource *resource, void *data) |
| 253 | count_window (struct acpi_resource *resource, void *data) | ||
| 254 | { | 252 | { |
| 255 | unsigned int *windows = (unsigned int *) data; | 253 | unsigned int *windows = (unsigned int *) data; |
| 256 | struct acpi_resource_address64 addr; | 254 | struct acpi_resource_address64 addr; |
| @@ -263,7 +261,7 @@ count_window (struct acpi_resource *resource, void *data) | |||
| 263 | return AE_OK; | 261 | return AE_OK; |
| 264 | } | 262 | } |
| 265 | 263 | ||
| 266 | static __devinit acpi_status add_window(struct acpi_resource *res, void *data) | 264 | static acpi_status add_window(struct acpi_resource *res, void *data) |
| 267 | { | 265 | { |
| 268 | struct pci_root_info *info = data; | 266 | struct pci_root_info *info = data; |
| 269 | struct pci_window *window; | 267 | struct pci_window *window; |
| @@ -324,8 +322,7 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data) | |||
| 324 | return AE_OK; | 322 | return AE_OK; |
| 325 | } | 323 | } |
| 326 | 324 | ||
| 327 | struct pci_bus * __devinit | 325 | struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) |
| 328 | pci_acpi_scan_root(struct acpi_pci_root *root) | ||
| 329 | { | 326 | { |
| 330 | struct acpi_device *device = root->device; | 327 | struct acpi_device *device = root->device; |
| 331 | int domain = root->segment; | 328 | int domain = root->segment; |
| @@ -396,7 +393,7 @@ out1: | |||
| 396 | return NULL; | 393 | return NULL; |
| 397 | } | 394 | } |
| 398 | 395 | ||
| 399 | static int __devinit is_valid_resource(struct pci_dev *dev, int idx) | 396 | static int is_valid_resource(struct pci_dev *dev, int idx) |
| 400 | { | 397 | { |
| 401 | unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM; | 398 | unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM; |
| 402 | struct resource *devr = &dev->resource[idx], *busr; | 399 | struct resource *devr = &dev->resource[idx], *busr; |
| @@ -414,8 +411,7 @@ static int __devinit is_valid_resource(struct pci_dev *dev, int idx) | |||
| 414 | return 0; | 411 | return 0; |
| 415 | } | 412 | } |
| 416 | 413 | ||
| 417 | static void __devinit | 414 | static void pcibios_fixup_resources(struct pci_dev *dev, int start, int limit) |
| 418 | pcibios_fixup_resources(struct pci_dev *dev, int start, int limit) | ||
| 419 | { | 415 | { |
| 420 | int i; | 416 | int i; |
| 421 | 417 | ||
| @@ -427,13 +423,13 @@ pcibios_fixup_resources(struct pci_dev *dev, int start, int limit) | |||
| 427 | } | 423 | } |
| 428 | } | 424 | } |
| 429 | 425 | ||
| 430 | void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) | 426 | void pcibios_fixup_device_resources(struct pci_dev *dev) |
| 431 | { | 427 | { |
| 432 | pcibios_fixup_resources(dev, 0, PCI_BRIDGE_RESOURCES); | 428 | pcibios_fixup_resources(dev, 0, PCI_BRIDGE_RESOURCES); |
| 433 | } | 429 | } |
| 434 | EXPORT_SYMBOL_GPL(pcibios_fixup_device_resources); | 430 | EXPORT_SYMBOL_GPL(pcibios_fixup_device_resources); |
| 435 | 431 | ||
| 436 | static void __devinit pcibios_fixup_bridge_resources(struct pci_dev *dev) | 432 | static void pcibios_fixup_bridge_resources(struct pci_dev *dev) |
| 437 | { | 433 | { |
| 438 | pcibios_fixup_resources(dev, PCI_BRIDGE_RESOURCES, PCI_NUM_RESOURCES); | 434 | pcibios_fixup_resources(dev, PCI_BRIDGE_RESOURCES, PCI_NUM_RESOURCES); |
| 439 | } | 435 | } |
| @@ -441,8 +437,7 @@ static void __devinit pcibios_fixup_bridge_resources(struct pci_dev *dev) | |||
| 441 | /* | 437 | /* |
| 442 | * Called after each bus is probed, but before its children are examined. | 438 | * Called after each bus is probed, but before its children are examined. |
| 443 | */ | 439 | */ |
| 444 | void __devinit | 440 | void pcibios_fixup_bus(struct pci_bus *b) |
| 445 | pcibios_fixup_bus (struct pci_bus *b) | ||
| 446 | { | 441 | { |
| 447 | struct pci_dev *dev; | 442 | struct pci_dev *dev; |
| 448 | 443 | ||
diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c index 8630875e74b5..11f2275570fb 100644 --- a/arch/ia64/sn/kernel/io_common.c +++ b/arch/ia64/sn/kernel/io_common.c | |||
| @@ -435,8 +435,7 @@ void sn_generate_path(struct pci_bus *pci_bus, char *address) | |||
| 435 | geo_slot(geoid)); | 435 | geo_slot(geoid)); |
| 436 | } | 436 | } |
| 437 | 437 | ||
| 438 | void __devinit | 438 | void sn_pci_fixup_bus(struct pci_bus *bus) |
| 439 | sn_pci_fixup_bus(struct pci_bus *bus) | ||
| 440 | { | 439 | { |
| 441 | 440 | ||
| 442 | if (SN_ACPI_BASE_SUPPORT()) | 441 | if (SN_ACPI_BASE_SUPPORT()) |
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c index 4554f68b7865..b9992571c036 100644 --- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c +++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c | |||
| @@ -977,7 +977,7 @@ int sn_hwperf_get_nearest_node(cnodeid_t node, | |||
| 977 | return e; | 977 | return e; |
| 978 | } | 978 | } |
| 979 | 979 | ||
| 980 | static int __devinit sn_hwperf_misc_register_init(void) | 980 | static int sn_hwperf_misc_register_init(void) |
| 981 | { | 981 | { |
| 982 | int e; | 982 | int e; |
| 983 | 983 | ||
diff --git a/arch/ia64/xen/irq_xen.c b/arch/ia64/xen/irq_xen.c index 01f479ee1c43..efb74dafec4d 100644 --- a/arch/ia64/xen/irq_xen.c +++ b/arch/ia64/xen/irq_xen.c | |||
| @@ -273,9 +273,8 @@ xen_bind_early_percpu_irq(void) | |||
| 273 | */ | 273 | */ |
| 274 | 274 | ||
| 275 | #ifdef CONFIG_HOTPLUG_CPU | 275 | #ifdef CONFIG_HOTPLUG_CPU |
| 276 | static int __devinit | 276 | static int unbind_evtchn_callback(struct notifier_block *nfb, |
| 277 | unbind_evtchn_callback(struct notifier_block *nfb, | 277 | unsigned long action, void *hcpu) |
| 278 | unsigned long action, void *hcpu) | ||
| 279 | { | 278 | { |
| 280 | unsigned int cpu = (unsigned long)hcpu; | 279 | unsigned int cpu = (unsigned long)hcpu; |
| 281 | 280 | ||
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index a2cfc0abb05c..13168a769f8f 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c | |||
| @@ -127,7 +127,7 @@ static void unmap_cpu_to_physid(int, int); | |||
| 127 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 127 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
| 128 | /* Boot up APs Routines : BSP */ | 128 | /* Boot up APs Routines : BSP */ |
| 129 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 129 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
| 130 | void __devinit smp_prepare_boot_cpu(void) | 130 | void smp_prepare_boot_cpu(void) |
| 131 | { | 131 | { |
| 132 | bsp_phys_id = hard_smp_processor_id(); | 132 | bsp_phys_id = hard_smp_processor_id(); |
| 133 | physid_set(bsp_phys_id, phys_cpu_present_map); | 133 | physid_set(bsp_phys_id, phys_cpu_present_map); |
diff --git a/arch/m68k/emu/nfeth.c b/arch/m68k/emu/nfeth.c index a985a7e87d45..695cd737a42e 100644 --- a/arch/m68k/emu/nfeth.c +++ b/arch/m68k/emu/nfeth.c | |||
| @@ -39,7 +39,7 @@ enum { | |||
| 39 | #define MAX_UNIT 8 | 39 | #define MAX_UNIT 8 |
| 40 | 40 | ||
| 41 | /* These identify the driver base version and may not be removed. */ | 41 | /* These identify the driver base version and may not be removed. */ |
| 42 | static const char version[] __devinitconst = | 42 | static const char version[] = |
| 43 | KERN_INFO KBUILD_MODNAME ".c:v" DRV_VERSION " " DRV_RELDATE | 43 | KERN_INFO KBUILD_MODNAME ".c:v" DRV_VERSION " " DRV_RELDATE |
| 44 | " S.Opichal, M.Jurik, P.Stehlik\n" | 44 | " S.Opichal, M.Jurik, P.Stehlik\n" |
| 45 | KERN_INFO " http://aranym.org/\n"; | 45 | KERN_INFO " http://aranym.org/\n"; |
diff --git a/arch/m68k/include/asm/parport.h b/arch/m68k/include/asm/parport.h index 646b1872f73b..5ea75e6a7399 100644 --- a/arch/m68k/include/asm/parport.h +++ b/arch/m68k/include/asm/parport.h | |||
| @@ -15,8 +15,8 @@ | |||
| 15 | #define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2) | 15 | #define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2) |
| 16 | 16 | ||
| 17 | /* no dma, or IRQ autoprobing */ | 17 | /* no dma, or IRQ autoprobing */ |
| 18 | static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); | 18 | static int parport_pc_find_isa_ports (int autoirq, int autodma); |
| 19 | static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) | 19 | static int parport_pc_find_nonpci_ports (int autoirq, int autodma) |
| 20 | { | 20 | { |
| 21 | if (! (MACH_IS_Q40)) | 21 | if (! (MACH_IS_Q40)) |
| 22 | return 0; /* count=0 */ | 22 | return 0; /* count=0 */ |
diff --git a/arch/m68k/kernel/pcibios.c b/arch/m68k/kernel/pcibios.c index 73fa0b56a06c..931a31ff59dd 100644 --- a/arch/m68k/kernel/pcibios.c +++ b/arch/m68k/kernel/pcibios.c | |||
| @@ -87,7 +87,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) | |||
| 87 | return 0; | 87 | return 0; |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) | 90 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 91 | { | 91 | { |
| 92 | struct pci_dev *dev; | 92 | struct pci_dev *dev; |
| 93 | 93 | ||
| @@ -97,7 +97,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) | |||
| 97 | } | 97 | } |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | char __devinit *pcibios_setup(char *str) | 100 | char *pcibios_setup(char *str) |
| 101 | { | 101 | { |
| 102 | return str; | 102 | return str; |
| 103 | } | 103 | } |
diff --git a/arch/microblaze/configs/mmu_defconfig b/arch/microblaze/configs/mmu_defconfig index b3f5eecff2a7..d2b097a652d9 100644 --- a/arch/microblaze/configs/mmu_defconfig +++ b/arch/microblaze/configs/mmu_defconfig | |||
| @@ -1,25 +1,22 @@ | |||
| 1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
| 2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
| 3 | CONFIG_POSIX_MQUEUE=y | ||
| 4 | CONFIG_FHANDLE=y | ||
| 5 | CONFIG_AUDIT=y | ||
| 6 | CONFIG_AUDIT_LOGINUID_IMMUTABLE=y | ||
| 3 | CONFIG_IKCONFIG=y | 7 | CONFIG_IKCONFIG=y |
| 4 | CONFIG_IKCONFIG_PROC=y | 8 | CONFIG_IKCONFIG_PROC=y |
| 9 | CONFIG_SYSFS_DEPRECATED=y | ||
| 5 | CONFIG_SYSFS_DEPRECATED_V2=y | 10 | CONFIG_SYSFS_DEPRECATED_V2=y |
| 6 | CONFIG_BLK_DEV_INITRD=y | ||
| 7 | CONFIG_INITRAMFS_SOURCE="rootfs.cpio" | ||
| 8 | CONFIG_INITRAMFS_COMPRESSION_GZIP=y | ||
| 9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
| 10 | CONFIG_EXPERT=y | ||
| 11 | CONFIG_KALLSYMS_ALL=y | 11 | CONFIG_KALLSYMS_ALL=y |
| 12 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
| 13 | # CONFIG_HOTPLUG is not set | ||
| 14 | # CONFIG_BASE_FULL is not set | 12 | # CONFIG_BASE_FULL is not set |
| 15 | # CONFIG_FUTEX is not set | 13 | CONFIG_EMBEDDED=y |
| 16 | # CONFIG_EPOLL is not set | ||
| 17 | # CONFIG_SIGNALFD is not set | ||
| 18 | # CONFIG_SHMEM is not set | ||
| 19 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
| 20 | CONFIG_MODULES=y | 15 | CONFIG_MODULES=y |
| 21 | CONFIG_MODULE_UNLOAD=y | 16 | CONFIG_MODULE_UNLOAD=y |
| 22 | # CONFIG_BLK_DEV_BSG is not set | 17 | # CONFIG_BLK_DEV_BSG is not set |
| 18 | CONFIG_PARTITION_ADVANCED=y | ||
| 19 | # CONFIG_EFI_PARTITION is not set | ||
| 23 | CONFIG_OPT_LIB_ASM=y | 20 | CONFIG_OPT_LIB_ASM=y |
| 24 | CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 | 21 | CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 |
| 25 | CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 | 22 | CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 |
| @@ -31,39 +28,62 @@ CONFIG_HZ_100=y | |||
| 31 | CONFIG_MMU=y | 28 | CONFIG_MMU=y |
| 32 | CONFIG_CMDLINE_BOOL=y | 29 | CONFIG_CMDLINE_BOOL=y |
| 33 | CONFIG_CMDLINE_FORCE=y | 30 | CONFIG_CMDLINE_FORCE=y |
| 31 | CONFIG_HIGHMEM=y | ||
| 32 | CONFIG_PCI=y | ||
| 33 | CONFIG_PCI_XILINX=y | ||
| 34 | CONFIG_NET=y | 34 | CONFIG_NET=y |
| 35 | CONFIG_PACKET=y | 35 | CONFIG_PACKET=y |
| 36 | CONFIG_UNIX=y | 36 | CONFIG_UNIX=y |
| 37 | CONFIG_INET=y | 37 | CONFIG_INET=y |
| 38 | # CONFIG_INET_LRO is not set | 38 | # CONFIG_INET_LRO is not set |
| 39 | # CONFIG_IPV6 is not set | 39 | # CONFIG_IPV6 is not set |
| 40 | CONFIG_MTD=y | ||
| 40 | CONFIG_PROC_DEVICETREE=y | 41 | CONFIG_PROC_DEVICETREE=y |
| 41 | CONFIG_BLK_DEV_RAM=y | 42 | CONFIG_BLK_DEV_RAM=y |
| 42 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 43 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
| 43 | CONFIG_NETDEVICES=y | 44 | CONFIG_NETDEVICES=y |
| 44 | CONFIG_NET_ETHERNET=y | ||
| 45 | CONFIG_XILINX_EMACLITE=y | 45 | CONFIG_XILINX_EMACLITE=y |
| 46 | CONFIG_XILINX_LL_TEMAC=y | ||
| 46 | # CONFIG_INPUT is not set | 47 | # CONFIG_INPUT is not set |
| 47 | # CONFIG_SERIO is not set | 48 | # CONFIG_SERIO is not set |
| 48 | # CONFIG_VT is not set | 49 | # CONFIG_VT is not set |
| 50 | CONFIG_SERIAL_8250=y | ||
| 51 | CONFIG_SERIAL_8250_CONSOLE=y | ||
| 49 | CONFIG_SERIAL_UARTLITE=y | 52 | CONFIG_SERIAL_UARTLITE=y |
| 50 | CONFIG_SERIAL_UARTLITE_CONSOLE=y | 53 | CONFIG_SERIAL_UARTLITE_CONSOLE=y |
| 51 | # CONFIG_HW_RANDOM is not set | 54 | # CONFIG_HW_RANDOM is not set |
| 55 | CONFIG_XILINX_HWICAP=y | ||
| 56 | CONFIG_I2C=y | ||
| 57 | CONFIG_I2C_XILINX=y | ||
| 58 | CONFIG_SPI=y | ||
| 59 | CONFIG_SPI_XILINX=y | ||
| 60 | CONFIG_GPIOLIB=y | ||
| 61 | CONFIG_GPIO_SYSFS=y | ||
| 62 | CONFIG_GPIO_XILINX=y | ||
| 52 | # CONFIG_HWMON is not set | 63 | # CONFIG_HWMON is not set |
| 64 | CONFIG_WATCHDOG=y | ||
| 65 | CONFIG_XILINX_WATCHDOG=y | ||
| 66 | CONFIG_FB=y | ||
| 67 | CONFIG_FB_XILINX=y | ||
| 53 | # CONFIG_USB_SUPPORT is not set | 68 | # CONFIG_USB_SUPPORT is not set |
| 69 | CONFIG_UIO=y | ||
| 70 | CONFIG_UIO_PDRV=y | ||
| 71 | CONFIG_UIO_PDRV_GENIRQ=y | ||
| 72 | CONFIG_UIO_DMEM_GENIRQ=y | ||
| 54 | CONFIG_EXT2_FS=y | 73 | CONFIG_EXT2_FS=y |
| 55 | # CONFIG_DNOTIFY is not set | 74 | # CONFIG_DNOTIFY is not set |
| 75 | CONFIG_CRAMFS=y | ||
| 76 | CONFIG_ROMFS_FS=y | ||
| 56 | CONFIG_NFS_FS=y | 77 | CONFIG_NFS_FS=y |
| 57 | CONFIG_NFS_V3=y | ||
| 58 | CONFIG_CIFS=y | 78 | CONFIG_CIFS=y |
| 59 | CONFIG_CIFS_STATS=y | 79 | CONFIG_CIFS_STATS=y |
| 60 | CONFIG_CIFS_STATS2=y | 80 | CONFIG_CIFS_STATS2=y |
| 61 | CONFIG_PARTITION_ADVANCED=y | ||
| 62 | CONFIG_DEBUG_KERNEL=y | ||
| 63 | CONFIG_DETECT_HUNG_TASK=y | 81 | CONFIG_DETECT_HUNG_TASK=y |
| 64 | CONFIG_DEBUG_SLAB=y | 82 | CONFIG_DEBUG_SLAB=y |
| 65 | CONFIG_DEBUG_SPINLOCK=y | 83 | CONFIG_DEBUG_SPINLOCK=y |
| 66 | CONFIG_DEBUG_INFO=y | 84 | CONFIG_DEBUG_INFO=y |
| 67 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
| 68 | CONFIG_EARLY_PRINTK=y | 85 | CONFIG_EARLY_PRINTK=y |
| 86 | CONFIG_KEYS=y | ||
| 87 | CONFIG_ENCRYPTED_KEYS=y | ||
| 88 | CONFIG_KEYS_DEBUG_PROC_KEYS=y | ||
| 69 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 89 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
diff --git a/arch/microblaze/configs/nommu_defconfig b/arch/microblaze/configs/nommu_defconfig index 0249e4b7e1d3..10b5172283d7 100644 --- a/arch/microblaze/configs/nommu_defconfig +++ b/arch/microblaze/configs/nommu_defconfig | |||
| @@ -1,41 +1,42 @@ | |||
| 1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
| 2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
| 3 | CONFIG_POSIX_MQUEUE=y | 3 | CONFIG_POSIX_MQUEUE=y |
| 4 | CONFIG_FHANDLE=y | ||
| 5 | CONFIG_AUDIT=y | ||
| 6 | CONFIG_AUDIT_LOGINUID_IMMUTABLE=y | ||
| 4 | CONFIG_BSD_PROCESS_ACCT=y | 7 | CONFIG_BSD_PROCESS_ACCT=y |
| 5 | CONFIG_BSD_PROCESS_ACCT_V3=y | 8 | CONFIG_BSD_PROCESS_ACCT_V3=y |
| 6 | CONFIG_IKCONFIG=y | 9 | CONFIG_IKCONFIG=y |
| 7 | CONFIG_IKCONFIG_PROC=y | 10 | CONFIG_IKCONFIG_PROC=y |
| 11 | CONFIG_SYSFS_DEPRECATED=y | ||
| 8 | CONFIG_SYSFS_DEPRECATED_V2=y | 12 | CONFIG_SYSFS_DEPRECATED_V2=y |
| 9 | CONFIG_EXPERT=y | ||
| 10 | CONFIG_KALLSYMS_ALL=y | 13 | CONFIG_KALLSYMS_ALL=y |
| 11 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
| 12 | # CONFIG_HOTPLUG is not set | ||
| 13 | # CONFIG_BASE_FULL is not set | 14 | # CONFIG_BASE_FULL is not set |
| 15 | CONFIG_EMBEDDED=y | ||
| 14 | CONFIG_SLAB=y | 16 | CONFIG_SLAB=y |
| 15 | CONFIG_MODULES=y | 17 | CONFIG_MODULES=y |
| 16 | CONFIG_MODULE_UNLOAD=y | 18 | CONFIG_MODULE_UNLOAD=y |
| 17 | # CONFIG_BLK_DEV_BSG is not set | 19 | # CONFIG_BLK_DEV_BSG is not set |
| 18 | # CONFIG_OPT_LIB_FUNCTION is not set | 20 | CONFIG_PARTITION_ADVANCED=y |
| 21 | # CONFIG_EFI_PARTITION is not set | ||
| 19 | CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 | 22 | CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 |
| 20 | CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 | 23 | CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 |
| 21 | CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 | 24 | CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 |
| 22 | CONFIG_XILINX_MICROBLAZE0_USE_DIV=1 | 25 | CONFIG_XILINX_MICROBLAZE0_USE_DIV=1 |
| 23 | CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=2 | 26 | CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=2 |
| 24 | CONFIG_XILINX_MICROBLAZE0_USE_FPU=2 | 27 | CONFIG_XILINX_MICROBLAZE0_USE_FPU=2 |
| 25 | CONFIG_HIGH_RES_TIMERS=y | ||
| 26 | CONFIG_HZ_100=y | 28 | CONFIG_HZ_100=y |
| 27 | CONFIG_CMDLINE_BOOL=y | 29 | CONFIG_CMDLINE_BOOL=y |
| 28 | CONFIG_BINFMT_FLAT=y | 30 | CONFIG_CMDLINE_FORCE=y |
| 31 | CONFIG_PCI=y | ||
| 32 | CONFIG_PCI_XILINX=y | ||
| 29 | CONFIG_NET=y | 33 | CONFIG_NET=y |
| 30 | CONFIG_PACKET=y | 34 | CONFIG_PACKET=y |
| 31 | CONFIG_UNIX=y | 35 | CONFIG_UNIX=y |
| 32 | CONFIG_INET=y | 36 | CONFIG_INET=y |
| 33 | # CONFIG_INET_LRO is not set | 37 | # CONFIG_INET_LRO is not set |
| 34 | # CONFIG_IPV6 is not set | 38 | # CONFIG_IPV6 is not set |
| 35 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
| 36 | CONFIG_MTD=y | 39 | CONFIG_MTD=y |
| 37 | CONFIG_MTD_CONCAT=y | ||
| 38 | CONFIG_MTD_PARTITIONS=y | ||
| 39 | CONFIG_MTD_CMDLINE_PARTS=y | 40 | CONFIG_MTD_CMDLINE_PARTS=y |
| 40 | CONFIG_MTD_CHAR=y | 41 | CONFIG_MTD_CHAR=y |
| 41 | CONFIG_MTD_BLOCK=y | 42 | CONFIG_MTD_BLOCK=y |
| @@ -45,41 +46,55 @@ CONFIG_MTD_CFI_AMDSTD=y | |||
| 45 | CONFIG_MTD_RAM=y | 46 | CONFIG_MTD_RAM=y |
| 46 | CONFIG_MTD_UCLINUX=y | 47 | CONFIG_MTD_UCLINUX=y |
| 47 | CONFIG_PROC_DEVICETREE=y | 48 | CONFIG_PROC_DEVICETREE=y |
| 48 | CONFIG_BLK_DEV_NBD=y | ||
| 49 | CONFIG_BLK_DEV_RAM=y | 49 | CONFIG_BLK_DEV_RAM=y |
| 50 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
| 50 | CONFIG_NETDEVICES=y | 51 | CONFIG_NETDEVICES=y |
| 51 | CONFIG_NET_ETHERNET=y | 52 | CONFIG_XILINX_EMACLITE=y |
| 53 | CONFIG_XILINX_LL_TEMAC=y | ||
| 52 | # CONFIG_INPUT is not set | 54 | # CONFIG_INPUT is not set |
| 53 | # CONFIG_SERIO is not set | 55 | # CONFIG_SERIO is not set |
| 54 | # CONFIG_VT is not set | 56 | # CONFIG_VT is not set |
| 57 | CONFIG_SERIAL_8250=y | ||
| 58 | CONFIG_SERIAL_8250_CONSOLE=y | ||
| 55 | CONFIG_SERIAL_UARTLITE=y | 59 | CONFIG_SERIAL_UARTLITE=y |
| 56 | CONFIG_SERIAL_UARTLITE_CONSOLE=y | 60 | CONFIG_SERIAL_UARTLITE_CONSOLE=y |
| 57 | CONFIG_HW_RANDOM=y | 61 | # CONFIG_HW_RANDOM is not set |
| 62 | CONFIG_XILINX_HWICAP=y | ||
| 63 | CONFIG_I2C=y | ||
| 64 | CONFIG_I2C_XILINX=y | ||
| 65 | CONFIG_SPI=y | ||
| 66 | CONFIG_SPI_XILINX=y | ||
| 67 | CONFIG_GPIOLIB=y | ||
| 68 | CONFIG_GPIO_SYSFS=y | ||
| 69 | CONFIG_GPIO_XILINX=y | ||
| 58 | # CONFIG_HWMON is not set | 70 | # CONFIG_HWMON is not set |
| 59 | CONFIG_VIDEO_OUTPUT_CONTROL=y | 71 | CONFIG_WATCHDOG=y |
| 72 | CONFIG_XILINX_WATCHDOG=y | ||
| 73 | CONFIG_FB=y | ||
| 74 | CONFIG_FB_XILINX=y | ||
| 75 | # CONFIG_USB_SUPPORT is not set | ||
| 76 | CONFIG_UIO=y | ||
| 77 | CONFIG_UIO_PDRV=y | ||
| 78 | CONFIG_UIO_PDRV_GENIRQ=y | ||
| 79 | CONFIG_UIO_DMEM_GENIRQ=y | ||
| 60 | CONFIG_EXT2_FS=y | 80 | CONFIG_EXT2_FS=y |
| 61 | # CONFIG_DNOTIFY is not set | 81 | # CONFIG_DNOTIFY is not set |
| 62 | CONFIG_CRAMFS=y | 82 | CONFIG_CRAMFS=y |
| 63 | CONFIG_ROMFS_FS=y | 83 | CONFIG_ROMFS_FS=y |
| 64 | CONFIG_NFS_FS=y | 84 | CONFIG_NFS_FS=y |
| 65 | CONFIG_NFS_V3=y | ||
| 66 | CONFIG_NFS_V3_ACL=y | 85 | CONFIG_NFS_V3_ACL=y |
| 67 | CONFIG_UNUSED_SYMBOLS=y | 86 | CONFIG_NLS=y |
| 68 | CONFIG_DEBUG_FS=y | ||
| 69 | CONFIG_DEBUG_KERNEL=y | ||
| 70 | CONFIG_DEBUG_SHIRQ=y | ||
| 71 | CONFIG_DETECT_HUNG_TASK=y | 87 | CONFIG_DETECT_HUNG_TASK=y |
| 72 | CONFIG_SCHEDSTATS=y | 88 | CONFIG_DEBUG_SLAB=y |
| 73 | CONFIG_TIMER_STATS=y | 89 | CONFIG_DEBUG_SPINLOCK=y |
| 74 | CONFIG_DEBUG_OBJECTS=y | ||
| 75 | CONFIG_DEBUG_OBJECTS_SELFTEST=y | ||
| 76 | CONFIG_DEBUG_OBJECTS_FREE=y | ||
| 77 | CONFIG_DEBUG_OBJECTS_TIMERS=y | ||
| 78 | CONFIG_DEBUG_INFO=y | 90 | CONFIG_DEBUG_INFO=y |
| 79 | CONFIG_DEBUG_LIST=y | ||
| 80 | CONFIG_DEBUG_SG=y | ||
| 81 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
| 82 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
| 83 | CONFIG_EARLY_PRINTK=y | 91 | CONFIG_EARLY_PRINTK=y |
| 92 | CONFIG_KEYS=y | ||
| 93 | CONFIG_ENCRYPTED_KEYS=y | ||
| 94 | CONFIG_KEYS_DEBUG_PROC_KEYS=y | ||
| 95 | CONFIG_CRYPTO_ECB=y | ||
| 96 | CONFIG_CRYPTO_MD4=y | ||
| 97 | CONFIG_CRYPTO_MD5=y | ||
| 98 | CONFIG_CRYPTO_ARC4=y | ||
| 99 | CONFIG_CRYPTO_DES=y | ||
| 84 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 100 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
| 85 | # CONFIG_CRC32 is not set | ||
diff --git a/arch/microblaze/include/asm/highmem.h b/arch/microblaze/include/asm/highmem.h index 2446a73140ac..d04638932438 100644 --- a/arch/microblaze/include/asm/highmem.h +++ b/arch/microblaze/include/asm/highmem.h | |||
| @@ -71,7 +71,7 @@ static inline void kunmap(struct page *page) | |||
| 71 | kunmap_high(page); | 71 | kunmap_high(page); |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | static inline void *__kmap_atomic(struct page *page) | 74 | static inline void *kmap_atomic(struct page *page) |
| 75 | { | 75 | { |
| 76 | return kmap_atomic_prot(page, kmap_prot); | 76 | return kmap_atomic_prot(page, kmap_prot); |
| 77 | } | 77 | } |
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h index 927540d3cb7d..a1ab5f0009ef 100644 --- a/arch/microblaze/include/asm/uaccess.h +++ b/arch/microblaze/include/asm/uaccess.h | |||
| @@ -108,7 +108,7 @@ static inline int ___range_ok(unsigned long addr, unsigned long size) | |||
| 108 | # define __EX_TABLE_SECTION ".section __ex_table,\"a\"\n" | 108 | # define __EX_TABLE_SECTION ".section __ex_table,\"a\"\n" |
| 109 | #else | 109 | #else |
| 110 | # define __FIXUP_SECTION ".section .discard,\"ax\"\n" | 110 | # define __FIXUP_SECTION ".section .discard,\"ax\"\n" |
| 111 | # define __EX_TABLE_SECTION ".section .discard,\"a\"\n" | 111 | # define __EX_TABLE_SECTION ".section .discard,\"ax\"\n" |
| 112 | #endif | 112 | #endif |
| 113 | 113 | ||
| 114 | extern unsigned long __copy_tofrom_user(void __user *to, | 114 | extern unsigned long __copy_tofrom_user(void __user *to, |
diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h index a5f06ac97113..10f8ac186855 100644 --- a/arch/microblaze/include/asm/unistd.h +++ b/arch/microblaze/include/asm/unistd.h | |||
| @@ -37,9 +37,7 @@ | |||
| 37 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 37 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
| 38 | #define __ARCH_WANT_SYS_CLONE | 38 | #define __ARCH_WANT_SYS_CLONE |
| 39 | #define __ARCH_WANT_SYS_VFORK | 39 | #define __ARCH_WANT_SYS_VFORK |
| 40 | #ifdef CONFIG_MMU | ||
| 41 | #define __ARCH_WANT_SYS_FORK | 40 | #define __ARCH_WANT_SYS_FORK |
| 42 | #endif | ||
| 43 | 41 | ||
| 44 | /* | 42 | /* |
| 45 | * "Conditional" syscalls | 43 | * "Conditional" syscalls |
diff --git a/arch/microblaze/include/uapi/asm/unistd.h b/arch/microblaze/include/uapi/asm/unistd.h index ccb6920f3b33..5f7fe7582f3a 100644 --- a/arch/microblaze/include/uapi/asm/unistd.h +++ b/arch/microblaze/include/uapi/asm/unistd.h | |||
| @@ -395,7 +395,8 @@ | |||
| 395 | #define __NR_process_vm_readv 377 | 395 | #define __NR_process_vm_readv 377 |
| 396 | #define __NR_process_vm_writev 378 | 396 | #define __NR_process_vm_writev 378 |
| 397 | #define __NR_kcmp 379 | 397 | #define __NR_kcmp 379 |
| 398 | #define __NR_finit_module 380 | ||
| 398 | 399 | ||
| 399 | #define __NR_syscalls 380 | 400 | #define __NR_syscalls 381 |
| 400 | 401 | ||
| 401 | #endif /* _UAPI_ASM_MICROBLAZE_UNISTD_H */ | 402 | #endif /* _UAPI_ASM_MICROBLAZE_UNISTD_H */ |
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S index 1cbace29b5e2..4fca56cf02f6 100644 --- a/arch/microblaze/kernel/syscall_table.S +++ b/arch/microblaze/kernel/syscall_table.S | |||
| @@ -380,3 +380,4 @@ ENTRY(sys_call_table) | |||
| 380 | .long sys_process_vm_readv | 380 | .long sys_process_vm_readv |
| 381 | .long sys_process_vm_writev | 381 | .long sys_process_vm_writev |
| 382 | .long sys_kcmp | 382 | .long sys_kcmp |
| 383 | .long sys_finit_module | ||
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index a1c5b996d66d..96416553cb36 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c | |||
| @@ -287,7 +287,7 @@ static struct resource *__pci_mmap_make_offset(struct pci_dev *dev, | |||
| 287 | unsigned long io_offset = 0; | 287 | unsigned long io_offset = 0; |
| 288 | int i, res_bit; | 288 | int i, res_bit; |
| 289 | 289 | ||
| 290 | if (hose == 0) | 290 | if (!hose) |
| 291 | return NULL; /* should never happen */ | 291 | return NULL; /* should never happen */ |
| 292 | 292 | ||
| 293 | /* If memory, add on the PCI bridge address offset */ | 293 | /* If memory, add on the PCI bridge address offset */ |
| @@ -655,9 +655,8 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar, | |||
| 655 | * - Some 32 bits platforms such as 4xx can have physical space larger than | 655 | * - Some 32 bits platforms such as 4xx can have physical space larger than |
| 656 | * 32 bits so we need to use 64 bits values for the parsing | 656 | * 32 bits so we need to use 64 bits values for the parsing |
| 657 | */ | 657 | */ |
| 658 | void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, | 658 | void pci_process_bridge_OF_ranges(struct pci_controller *hose, |
| 659 | struct device_node *dev, | 659 | struct device_node *dev, int primary) |
| 660 | int primary) | ||
| 661 | { | 660 | { |
| 662 | const u32 *ranges; | 661 | const u32 *ranges; |
| 663 | int rlen; | 662 | int rlen; |
| @@ -822,15 +821,13 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, | |||
| 822 | /* Decide whether to display the domain number in /proc */ | 821 | /* Decide whether to display the domain number in /proc */ |
| 823 | int pci_proc_domain(struct pci_bus *bus) | 822 | int pci_proc_domain(struct pci_bus *bus) |
| 824 | { | 823 | { |
| 825 | struct pci_controller *hose = pci_bus_to_host(bus); | ||
| 826 | |||
| 827 | return 0; | 824 | return 0; |
| 828 | } | 825 | } |
| 829 | 826 | ||
| 830 | /* This header fixup will do the resource fixup for all devices as they are | 827 | /* This header fixup will do the resource fixup for all devices as they are |
| 831 | * probed, but not for bridge ranges | 828 | * probed, but not for bridge ranges |
| 832 | */ | 829 | */ |
| 833 | static void __devinit pcibios_fixup_resources(struct pci_dev *dev) | 830 | static void pcibios_fixup_resources(struct pci_dev *dev) |
| 834 | { | 831 | { |
| 835 | struct pci_controller *hose = pci_bus_to_host(dev->bus); | 832 | struct pci_controller *hose = pci_bus_to_host(dev->bus); |
| 836 | int i; | 833 | int i; |
| @@ -871,8 +868,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources); | |||
| 871 | * things go more smoothly when it gets it right. It should covers cases such | 868 | * things go more smoothly when it gets it right. It should covers cases such |
| 872 | * as Apple "closed" bridge resources and bare-metal pSeries unassigned bridges | 869 | * as Apple "closed" bridge resources and bare-metal pSeries unassigned bridges |
| 873 | */ | 870 | */ |
| 874 | static int __devinit pcibios_uninitialized_bridge_resource(struct pci_bus *bus, | 871 | static int pcibios_uninitialized_bridge_resource(struct pci_bus *bus, |
| 875 | struct resource *res) | 872 | struct resource *res) |
| 876 | { | 873 | { |
| 877 | struct pci_controller *hose = pci_bus_to_host(bus); | 874 | struct pci_controller *hose = pci_bus_to_host(bus); |
| 878 | struct pci_dev *dev = bus->self; | 875 | struct pci_dev *dev = bus->self; |
| @@ -933,7 +930,7 @@ static int __devinit pcibios_uninitialized_bridge_resource(struct pci_bus *bus, | |||
| 933 | } | 930 | } |
| 934 | 931 | ||
| 935 | /* Fixup resources of a PCI<->PCI bridge */ | 932 | /* Fixup resources of a PCI<->PCI bridge */ |
| 936 | static void __devinit pcibios_fixup_bridge(struct pci_bus *bus) | 933 | static void pcibios_fixup_bridge(struct pci_bus *bus) |
| 937 | { | 934 | { |
| 938 | struct resource *res; | 935 | struct resource *res; |
| 939 | int i; | 936 | int i; |
| @@ -970,14 +967,14 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus) | |||
| 970 | } | 967 | } |
| 971 | } | 968 | } |
| 972 | 969 | ||
| 973 | void __devinit pcibios_setup_bus_self(struct pci_bus *bus) | 970 | void pcibios_setup_bus_self(struct pci_bus *bus) |
| 974 | { | 971 | { |
| 975 | /* Fix up the bus resources for P2P bridges */ | 972 | /* Fix up the bus resources for P2P bridges */ |
| 976 | if (bus->self != NULL) | 973 | if (bus->self != NULL) |
| 977 | pcibios_fixup_bridge(bus); | 974 | pcibios_fixup_bridge(bus); |
| 978 | } | 975 | } |
| 979 | 976 | ||
| 980 | void __devinit pcibios_setup_bus_devices(struct pci_bus *bus) | 977 | void pcibios_setup_bus_devices(struct pci_bus *bus) |
| 981 | { | 978 | { |
| 982 | struct pci_dev *dev; | 979 | struct pci_dev *dev; |
| 983 | 980 | ||
| @@ -1002,7 +999,7 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus) | |||
| 1002 | } | 999 | } |
| 1003 | } | 1000 | } |
| 1004 | 1001 | ||
| 1005 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) | 1002 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 1006 | { | 1003 | { |
| 1007 | /* When called from the generic PCI probe, read PCI<->PCI bridge | 1004 | /* When called from the generic PCI probe, read PCI<->PCI bridge |
| 1008 | * bases. This is -not- called when generating the PCI tree from | 1005 | * bases. This is -not- called when generating the PCI tree from |
| @@ -1124,7 +1121,7 @@ static int __init reparent_resources(struct resource *parent, | |||
| 1124 | * as well. | 1121 | * as well. |
| 1125 | */ | 1122 | */ |
| 1126 | 1123 | ||
| 1127 | void pcibios_allocate_bus_resources(struct pci_bus *bus) | 1124 | static void pcibios_allocate_bus_resources(struct pci_bus *bus) |
| 1128 | { | 1125 | { |
| 1129 | struct pci_bus *b; | 1126 | struct pci_bus *b; |
| 1130 | int i; | 1127 | int i; |
| @@ -1179,7 +1176,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus) | |||
| 1179 | } | 1176 | } |
| 1180 | printk(KERN_WARNING "PCI: Cannot allocate resource region " | 1177 | printk(KERN_WARNING "PCI: Cannot allocate resource region " |
| 1181 | "%d of PCI bridge %d, will remap\n", i, bus->number); | 1178 | "%d of PCI bridge %d, will remap\n", i, bus->number); |
| 1182 | clear_resource: | 1179 | |
| 1183 | res->start = res->end = 0; | 1180 | res->start = res->end = 0; |
| 1184 | res->flags = 0; | 1181 | res->flags = 0; |
| 1185 | } | 1182 | } |
| @@ -1188,7 +1185,7 @@ clear_resource: | |||
| 1188 | pcibios_allocate_bus_resources(b); | 1185 | pcibios_allocate_bus_resources(b); |
| 1189 | } | 1186 | } |
| 1190 | 1187 | ||
| 1191 | static inline void __devinit alloc_resource(struct pci_dev *dev, int idx) | 1188 | static inline void alloc_resource(struct pci_dev *dev, int idx) |
| 1192 | { | 1189 | { |
| 1193 | struct resource *pr, *r = &dev->resource[idx]; | 1190 | struct resource *pr, *r = &dev->resource[idx]; |
| 1194 | 1191 | ||
| @@ -1351,7 +1348,7 @@ void __init pcibios_resource_survey(void) | |||
| 1351 | * rest of the code later, for now, keep it as-is as our main | 1348 | * rest of the code later, for now, keep it as-is as our main |
| 1352 | * resource allocation function doesn't deal with sub-trees yet. | 1349 | * resource allocation function doesn't deal with sub-trees yet. |
| 1353 | */ | 1350 | */ |
| 1354 | void __devinit pcibios_claim_one_bus(struct pci_bus *bus) | 1351 | void pcibios_claim_one_bus(struct pci_bus *bus) |
| 1355 | { | 1352 | { |
| 1356 | struct pci_dev *dev; | 1353 | struct pci_dev *dev; |
| 1357 | struct pci_bus *child_bus; | 1354 | struct pci_bus *child_bus; |
| @@ -1410,7 +1407,8 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) | |||
| 1410 | return pci_enable_resources(dev, mask); | 1407 | return pci_enable_resources(dev, mask); |
| 1411 | } | 1408 | } |
| 1412 | 1409 | ||
| 1413 | static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, struct list_head *resources) | 1410 | static void pcibios_setup_phb_resources(struct pci_controller *hose, |
| 1411 | struct list_head *resources) | ||
| 1414 | { | 1412 | { |
| 1415 | unsigned long io_offset; | 1413 | unsigned long io_offset; |
| 1416 | struct resource *res; | 1414 | struct resource *res; |
| @@ -1433,7 +1431,8 @@ static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, s | |||
| 1433 | res->end = res->start + IO_SPACE_LIMIT; | 1431 | res->end = res->start + IO_SPACE_LIMIT; |
| 1434 | res->flags = IORESOURCE_IO; | 1432 | res->flags = IORESOURCE_IO; |
| 1435 | } | 1433 | } |
| 1436 | pci_add_resource_offset(resources, res, hose->io_base_virt - _IO_BASE); | 1434 | pci_add_resource_offset(resources, res, |
| 1435 | (__force resource_size_t)(hose->io_base_virt - _IO_BASE)); | ||
| 1437 | 1436 | ||
| 1438 | pr_debug("PCI: PHB IO resource = %016llx-%016llx [%lx]\n", | 1437 | pr_debug("PCI: PHB IO resource = %016llx-%016llx [%lx]\n", |
| 1439 | (unsigned long long)res->start, | 1438 | (unsigned long long)res->start, |
| @@ -1477,7 +1476,7 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus) | |||
| 1477 | return of_node_get(hose->dn); | 1476 | return of_node_get(hose->dn); |
| 1478 | } | 1477 | } |
| 1479 | 1478 | ||
| 1480 | static void __devinit pcibios_scan_phb(struct pci_controller *hose) | 1479 | static void pcibios_scan_phb(struct pci_controller *hose) |
| 1481 | { | 1480 | { |
| 1482 | LIST_HEAD(resources); | 1481 | LIST_HEAD(resources); |
| 1483 | struct pci_bus *bus; | 1482 | struct pci_bus *bus; |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index b7dc39c6c849..2ac626ab9d43 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
| @@ -39,8 +39,8 @@ config MIPS | |||
| 39 | select GENERIC_CLOCKEVENTS | 39 | select GENERIC_CLOCKEVENTS |
| 40 | select GENERIC_CMOS_UPDATE | 40 | select GENERIC_CMOS_UPDATE |
| 41 | select HAVE_MOD_ARCH_SPECIFIC | 41 | select HAVE_MOD_ARCH_SPECIFIC |
| 42 | select MODULES_USE_ELF_REL | 42 | select MODULES_USE_ELF_REL if MODULES |
| 43 | select MODULES_USE_ELF_RELA if 64BIT | 43 | select MODULES_USE_ELF_RELA if MODULES && 64BIT |
| 44 | 44 | ||
| 45 | menu "Machine selection" | 45 | menu "Machine selection" |
| 46 | 46 | ||
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c index a7193ae13a5d..b67930d19325 100644 --- a/arch/mips/alchemy/common/time.c +++ b/arch/mips/alchemy/common/time.c | |||
| @@ -53,7 +53,7 @@ static struct clocksource au1x_counter1_clocksource = { | |||
| 53 | .read = au1x_counter1_read, | 53 | .read = au1x_counter1_read, |
| 54 | .mask = CLOCKSOURCE_MASK(32), | 54 | .mask = CLOCKSOURCE_MASK(32), |
| 55 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 55 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
| 56 | .rating = 100, | 56 | .rating = 1500, |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | static int au1x_rtcmatch2_set_next_event(unsigned long delta, | 59 | static int au1x_rtcmatch2_set_next_event(unsigned long delta, |
| @@ -84,7 +84,7 @@ static irqreturn_t au1x_rtcmatch2_irq(int irq, void *dev_id) | |||
| 84 | static struct clock_event_device au1x_rtcmatch2_clockdev = { | 84 | static struct clock_event_device au1x_rtcmatch2_clockdev = { |
| 85 | .name = "rtcmatch2", | 85 | .name = "rtcmatch2", |
| 86 | .features = CLOCK_EVT_FEAT_ONESHOT, | 86 | .features = CLOCK_EVT_FEAT_ONESHOT, |
| 87 | .rating = 100, | 87 | .rating = 1500, |
| 88 | .set_next_event = au1x_rtcmatch2_set_next_event, | 88 | .set_next_event = au1x_rtcmatch2_set_next_event, |
| 89 | .set_mode = au1x_rtcmatch2_set_mode, | 89 | .set_mode = au1x_rtcmatch2_set_mode, |
| 90 | .cpumask = cpu_all_mask, | 90 | .cpumask = cpu_all_mask, |
| @@ -158,20 +158,6 @@ cntr_err: | |||
| 158 | return -1; | 158 | return -1; |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | static void __init alchemy_setup_c0timer(void) | ||
| 162 | { | ||
| 163 | /* | ||
| 164 | * MIPS kernel assigns 'au1k_wait' to 'cpu_wait' before this | ||
| 165 | * function is called. Because the Alchemy counters are unusable | ||
| 166 | * the C0 timekeeping code is installed and use of the 'wait' | ||
| 167 | * instruction must be prohibited, which is done most easily by | ||
| 168 | * assigning NULL to cpu_wait. | ||
| 169 | */ | ||
| 170 | cpu_wait = NULL; | ||
| 171 | r4k_clockevent_init(); | ||
| 172 | init_r4k_clocksource(); | ||
| 173 | } | ||
| 174 | |||
| 175 | static int alchemy_m2inttab[] __initdata = { | 161 | static int alchemy_m2inttab[] __initdata = { |
| 176 | AU1000_RTC_MATCH2_INT, | 162 | AU1000_RTC_MATCH2_INT, |
| 177 | AU1500_RTC_MATCH2_INT, | 163 | AU1500_RTC_MATCH2_INT, |
| @@ -186,8 +172,7 @@ void __init plat_time_init(void) | |||
| 186 | int t; | 172 | int t; |
| 187 | 173 | ||
| 188 | t = alchemy_get_cputype(); | 174 | t = alchemy_get_cputype(); |
| 189 | if (t == ALCHEMY_CPU_UNKNOWN) | 175 | if (t == ALCHEMY_CPU_UNKNOWN || |
| 190 | alchemy_setup_c0timer(); | 176 | alchemy_time_init(alchemy_m2inttab[t])) |
| 191 | else if (alchemy_time_init(alchemy_m2inttab[t])) | 177 | cpu_wait = NULL; /* wait doesn't work with r4k timer */ |
| 192 | alchemy_setup_c0timer(); | ||
| 193 | } | 178 | } |
diff --git a/arch/mips/cavium-octeon/serial.c b/arch/mips/cavium-octeon/serial.c index 569f41bdcc46..f393f65f3923 100644 --- a/arch/mips/cavium-octeon/serial.c +++ b/arch/mips/cavium-octeon/serial.c | |||
| @@ -43,7 +43,7 @@ void octeon_serial_out(struct uart_port *up, int offset, int value) | |||
| 43 | cvmx_write_csr((uint64_t)(up->membase + (offset << 3)), (u8)value); | 43 | cvmx_write_csr((uint64_t)(up->membase + (offset << 3)), (u8)value); |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | static int __devinit octeon_serial_probe(struct platform_device *pdev) | 46 | static int octeon_serial_probe(struct platform_device *pdev) |
| 47 | { | 47 | { |
| 48 | int irq, res; | 48 | int irq, res; |
| 49 | struct resource *res_mem; | 49 | struct resource *res_mem; |
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index 31ab10f02bad..dbaec94046da 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
| @@ -45,8 +45,6 @@ | |||
| 45 | #define HUGETLB_PAGE_ORDER ({BUILD_BUG(); 0; }) | 45 | #define HUGETLB_PAGE_ORDER ({BUILD_BUG(); 0; }) |
| 46 | #endif /* CONFIG_MIPS_HUGE_TLB_SUPPORT */ | 46 | #endif /* CONFIG_MIPS_HUGE_TLB_SUPPORT */ |
| 47 | 47 | ||
| 48 | #ifndef __ASSEMBLY__ | ||
| 49 | |||
| 50 | #include <linux/pfn.h> | 48 | #include <linux/pfn.h> |
| 51 | #include <asm/io.h> | 49 | #include <asm/io.h> |
| 52 | 50 | ||
| @@ -139,8 +137,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
| 139 | */ | 137 | */ |
| 140 | #define ptep_buddy(x) ((pte_t *)((unsigned long)(x) ^ sizeof(pte_t))) | 138 | #define ptep_buddy(x) ((pte_t *)((unsigned long)(x) ^ sizeof(pte_t))) |
| 141 | 139 | ||
| 142 | #endif /* !__ASSEMBLY__ */ | ||
| 143 | |||
| 144 | /* | 140 | /* |
| 145 | * __pa()/__va() should be used only during mem init. | 141 | * __pa()/__va() should be used only during mem init. |
| 146 | */ | 142 | */ |
| @@ -202,7 +198,10 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
| 202 | #endif | 198 | #endif |
| 203 | 199 | ||
| 204 | #define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr))) | 200 | #define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr))) |
| 205 | #define virt_addr_valid(kaddr) pfn_valid(PFN_DOWN(virt_to_phys(kaddr))) | 201 | |
| 202 | extern int __virt_addr_valid(const volatile void *kaddr); | ||
| 203 | #define virt_addr_valid(kaddr) \ | ||
| 204 | __virt_addr_valid((const volatile void *) (kaddr)) | ||
| 206 | 205 | ||
| 207 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 206 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
| 208 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 207 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h index 90bf3b3fce19..d69ea743272b 100644 --- a/arch/mips/include/asm/pci.h +++ b/arch/mips/include/asm/pci.h | |||
| @@ -145,7 +145,7 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | |||
| 145 | extern char * (*pcibios_plat_setup)(char *str); | 145 | extern char * (*pcibios_plat_setup)(char *str); |
| 146 | 146 | ||
| 147 | /* this function parses memory ranges from a device node */ | 147 | /* this function parses memory ranges from a device node */ |
| 148 | extern void __devinit pci_load_of_ranges(struct pci_controller *hose, | 148 | extern void pci_load_of_ranges(struct pci_controller *hose, |
| 149 | struct device_node *node); | 149 | struct device_node *node); |
| 150 | 150 | ||
| 151 | #endif /* _ASM_PCI_H */ | 151 | #endif /* _ASM_PCI_H */ |
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h index 18806a52061c..b2050b9e64b1 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h | |||
| @@ -29,10 +29,11 @@ struct thread_info { | |||
| 29 | __u32 cpu; /* current CPU */ | 29 | __u32 cpu; /* current CPU */ |
| 30 | int preempt_count; /* 0 => preemptable, <0 => BUG */ | 30 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
| 31 | 31 | ||
| 32 | mm_segment_t addr_limit; /* thread address space: | 32 | mm_segment_t addr_limit; /* |
| 33 | 0-0xBFFFFFFF for user-thead | 33 | * thread address space limit: |
| 34 | 0-0xFFFFFFFF for kernel-thread | 34 | * 0x7fffffff for user-thead |
| 35 | */ | 35 | * 0xffffffff for kernel-thread |
| 36 | */ | ||
| 36 | struct restart_block restart_block; | 37 | struct restart_block restart_block; |
| 37 | struct pt_regs *regs; | 38 | struct pt_regs *regs; |
| 38 | }; | 39 | }; |
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h index cc98a9dcb01b..0eebf3c3e03c 100644 --- a/arch/mips/include/uapi/asm/unistd.h +++ b/arch/mips/include/uapi/asm/unistd.h | |||
| @@ -368,16 +368,17 @@ | |||
| 368 | #define __NR_process_vm_readv (__NR_Linux + 345) | 368 | #define __NR_process_vm_readv (__NR_Linux + 345) |
| 369 | #define __NR_process_vm_writev (__NR_Linux + 346) | 369 | #define __NR_process_vm_writev (__NR_Linux + 346) |
| 370 | #define __NR_kcmp (__NR_Linux + 347) | 370 | #define __NR_kcmp (__NR_Linux + 347) |
| 371 | #define __NR_finit_module (__NR_Linux + 348) | ||
| 371 | 372 | ||
| 372 | /* | 373 | /* |
| 373 | * Offset of the last Linux o32 flavoured syscall | 374 | * Offset of the last Linux o32 flavoured syscall |
| 374 | */ | 375 | */ |
| 375 | #define __NR_Linux_syscalls 347 | 376 | #define __NR_Linux_syscalls 348 |
| 376 | 377 | ||
| 377 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 378 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
| 378 | 379 | ||
| 379 | #define __NR_O32_Linux 4000 | 380 | #define __NR_O32_Linux 4000 |
| 380 | #define __NR_O32_Linux_syscalls 347 | 381 | #define __NR_O32_Linux_syscalls 348 |
| 381 | 382 | ||
| 382 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 383 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
| 383 | 384 | ||
| @@ -692,16 +693,17 @@ | |||
| 692 | #define __NR_process_vm_readv (__NR_Linux + 304) | 693 | #define __NR_process_vm_readv (__NR_Linux + 304) |
| 693 | #define __NR_process_vm_writev (__NR_Linux + 305) | 694 | #define __NR_process_vm_writev (__NR_Linux + 305) |
| 694 | #define __NR_kcmp (__NR_Linux + 306) | 695 | #define __NR_kcmp (__NR_Linux + 306) |
| 696 | #define __NR_finit_module (__NR_Linux + 307) | ||
| 695 | 697 | ||
| 696 | /* | 698 | /* |
| 697 | * Offset of the last Linux 64-bit flavoured syscall | 699 | * Offset of the last Linux 64-bit flavoured syscall |
| 698 | */ | 700 | */ |
| 699 | #define __NR_Linux_syscalls 306 | 701 | #define __NR_Linux_syscalls 307 |
| 700 | 702 | ||
| 701 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 703 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
| 702 | 704 | ||
| 703 | #define __NR_64_Linux 5000 | 705 | #define __NR_64_Linux 5000 |
| 704 | #define __NR_64_Linux_syscalls 306 | 706 | #define __NR_64_Linux_syscalls 307 |
| 705 | 707 | ||
| 706 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 708 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
| 707 | 709 | ||
| @@ -1021,15 +1023,16 @@ | |||
| 1021 | #define __NR_process_vm_readv (__NR_Linux + 309) | 1023 | #define __NR_process_vm_readv (__NR_Linux + 309) |
| 1022 | #define __NR_process_vm_writev (__NR_Linux + 310) | 1024 | #define __NR_process_vm_writev (__NR_Linux + 310) |
| 1023 | #define __NR_kcmp (__NR_Linux + 311) | 1025 | #define __NR_kcmp (__NR_Linux + 311) |
| 1026 | #define __NR_finit_module (__NR_Linux + 312) | ||
| 1024 | 1027 | ||
| 1025 | /* | 1028 | /* |
| 1026 | * Offset of the last N32 flavoured syscall | 1029 | * Offset of the last N32 flavoured syscall |
| 1027 | */ | 1030 | */ |
| 1028 | #define __NR_Linux_syscalls 311 | 1031 | #define __NR_Linux_syscalls 312 |
| 1029 | 1032 | ||
| 1030 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 1033 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
| 1031 | 1034 | ||
| 1032 | #define __NR_N32_Linux 6000 | 1035 | #define __NR_N32_Linux 6000 |
| 1033 | #define __NR_N32_Linux_syscalls 311 | 1036 | #define __NR_N32_Linux_syscalls 312 |
| 1034 | 1037 | ||
| 1035 | #endif /* _UAPI_ASM_UNISTD_H */ | 1038 | #endif /* _UAPI_ASM_UNISTD_H */ |
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c index 9690998d4ef3..50285b2c7ffe 100644 --- a/arch/mips/kernel/asm-offsets.c +++ b/arch/mips/kernel/asm-offsets.c | |||
| @@ -200,6 +200,9 @@ void output_mm_defines(void) | |||
| 200 | DEFINE(_PTRS_PER_PMD, PTRS_PER_PMD); | 200 | DEFINE(_PTRS_PER_PMD, PTRS_PER_PMD); |
| 201 | DEFINE(_PTRS_PER_PTE, PTRS_PER_PTE); | 201 | DEFINE(_PTRS_PER_PTE, PTRS_PER_PTE); |
| 202 | BLANK(); | 202 | BLANK(); |
| 203 | DEFINE(_PAGE_SHIFT, PAGE_SHIFT); | ||
| 204 | DEFINE(_PAGE_SIZE, PAGE_SIZE); | ||
| 205 | BLANK(); | ||
| 203 | } | 206 | } |
| 204 | 207 | ||
| 205 | #ifdef CONFIG_32BIT | 208 | #ifdef CONFIG_32BIT |
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index 8882e5766f27..8a0096d62812 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S | |||
| @@ -19,7 +19,6 @@ | |||
| 19 | #include <asm/mipsregs.h> | 19 | #include <asm/mipsregs.h> |
| 20 | #include <asm/stackframe.h> | 20 | #include <asm/stackframe.h> |
| 21 | #include <asm/war.h> | 21 | #include <asm/war.h> |
| 22 | #include <asm/page.h> | ||
| 23 | #include <asm/thread_info.h> | 22 | #include <asm/thread_info.h> |
| 24 | 23 | ||
| 25 | #define PANIC_PIC(msg) \ | 24 | #define PANIC_PIC(msg) \ |
| @@ -483,8 +482,8 @@ NESTED(nmi_handler, PT_SIZE, sp) | |||
| 483 | MFC0 k1, CP0_ENTRYHI | 482 | MFC0 k1, CP0_ENTRYHI |
| 484 | andi k1, 0xff /* ASID_MASK */ | 483 | andi k1, 0xff /* ASID_MASK */ |
| 485 | MFC0 k0, CP0_EPC | 484 | MFC0 k0, CP0_EPC |
| 486 | PTR_SRL k0, PAGE_SHIFT + 1 | 485 | PTR_SRL k0, _PAGE_SHIFT + 1 |
| 487 | PTR_SLL k0, PAGE_SHIFT + 1 | 486 | PTR_SLL k0, _PAGE_SHIFT + 1 |
| 488 | or k1, k0 | 487 | or k1, k0 |
| 489 | MTC0 k1, CP0_ENTRYHI | 488 | MTC0 k1, CP0_ENTRYHI |
| 490 | mtc0_tlbw_hazard | 489 | mtc0_tlbw_hazard |
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index ea695d9605e9..fcf97312f328 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S | |||
| @@ -21,7 +21,6 @@ | |||
| 21 | #include <asm/asmmacro.h> | 21 | #include <asm/asmmacro.h> |
| 22 | #include <asm/irqflags.h> | 22 | #include <asm/irqflags.h> |
| 23 | #include <asm/regdef.h> | 23 | #include <asm/regdef.h> |
| 24 | #include <asm/page.h> | ||
| 25 | #include <asm/pgtable-bits.h> | 24 | #include <asm/pgtable-bits.h> |
| 26 | #include <asm/mipsregs.h> | 25 | #include <asm/mipsregs.h> |
| 27 | #include <asm/stackframe.h> | 26 | #include <asm/stackframe.h> |
diff --git a/arch/mips/kernel/octeon_switch.S b/arch/mips/kernel/octeon_switch.S index 0441f54b2a6a..207f1341578b 100644 --- a/arch/mips/kernel/octeon_switch.S +++ b/arch/mips/kernel/octeon_switch.S | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | #include <asm/fpregdef.h> | 15 | #include <asm/fpregdef.h> |
| 16 | #include <asm/mipsregs.h> | 16 | #include <asm/mipsregs.h> |
| 17 | #include <asm/asm-offsets.h> | 17 | #include <asm/asm-offsets.h> |
| 18 | #include <asm/page.h> | ||
| 19 | #include <asm/pgtable-bits.h> | 18 | #include <asm/pgtable-bits.h> |
| 20 | #include <asm/regdef.h> | 19 | #include <asm/regdef.h> |
| 21 | #include <asm/stackframe.h> | 20 | #include <asm/stackframe.h> |
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c index b14c14d90fc2..d9c81c5a6c90 100644 --- a/arch/mips/kernel/perf_event_mipsxx.c +++ b/arch/mips/kernel/perf_event_mipsxx.c | |||
| @@ -847,7 +847,6 @@ static const struct mips_perf_event xlp_event_map[PERF_COUNT_HW_MAX] = { | |||
| 847 | [PERF_COUNT_HW_CACHE_MISSES] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */ | 847 | [PERF_COUNT_HW_CACHE_MISSES] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */ |
| 848 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = { 0x1b, CNTR_ALL }, /* PAPI_BR_CN */ | 848 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = { 0x1b, CNTR_ALL }, /* PAPI_BR_CN */ |
| 849 | [PERF_COUNT_HW_BRANCH_MISSES] = { 0x1c, CNTR_ALL }, /* PAPI_BR_MSP */ | 849 | [PERF_COUNT_HW_BRANCH_MISSES] = { 0x1c, CNTR_ALL }, /* PAPI_BR_MSP */ |
| 850 | [PERF_COUNT_HW_BUS_CYCLES] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 851 | }; | 850 | }; |
| 852 | 851 | ||
| 853 | /* 24K/34K/1004K cores can share the same cache event map. */ | 852 | /* 24K/34K/1004K cores can share the same cache event map. */ |
| @@ -1115,24 +1114,12 @@ static const struct mips_perf_event xlp_cache_map | |||
| 1115 | [C(RESULT_ACCESS)] = { 0x2f, CNTR_ALL }, /* PAPI_L1_DCW */ | 1114 | [C(RESULT_ACCESS)] = { 0x2f, CNTR_ALL }, /* PAPI_L1_DCW */ |
| 1116 | [C(RESULT_MISS)] = { 0x2e, CNTR_ALL }, /* PAPI_L1_STM */ | 1115 | [C(RESULT_MISS)] = { 0x2e, CNTR_ALL }, /* PAPI_L1_STM */ |
| 1117 | }, | 1116 | }, |
| 1118 | [C(OP_PREFETCH)] = { | ||
| 1119 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1120 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1121 | }, | ||
| 1122 | }, | 1117 | }, |
| 1123 | [C(L1I)] = { | 1118 | [C(L1I)] = { |
| 1124 | [C(OP_READ)] = { | 1119 | [C(OP_READ)] = { |
| 1125 | [C(RESULT_ACCESS)] = { 0x04, CNTR_ALL }, /* PAPI_L1_ICA */ | 1120 | [C(RESULT_ACCESS)] = { 0x04, CNTR_ALL }, /* PAPI_L1_ICA */ |
| 1126 | [C(RESULT_MISS)] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */ | 1121 | [C(RESULT_MISS)] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */ |
| 1127 | }, | 1122 | }, |
| 1128 | [C(OP_WRITE)] = { | ||
| 1129 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1130 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1131 | }, | ||
| 1132 | [C(OP_PREFETCH)] = { | ||
| 1133 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1134 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1135 | }, | ||
| 1136 | }, | 1123 | }, |
| 1137 | [C(LL)] = { | 1124 | [C(LL)] = { |
| 1138 | [C(OP_READ)] = { | 1125 | [C(OP_READ)] = { |
| @@ -1143,10 +1130,6 @@ static const struct mips_perf_event xlp_cache_map | |||
| 1143 | [C(RESULT_ACCESS)] = { 0x34, CNTR_ALL }, /* PAPI_L2_DCA */ | 1130 | [C(RESULT_ACCESS)] = { 0x34, CNTR_ALL }, /* PAPI_L2_DCA */ |
| 1144 | [C(RESULT_MISS)] = { 0x36, CNTR_ALL }, /* PAPI_L2_DCM */ | 1131 | [C(RESULT_MISS)] = { 0x36, CNTR_ALL }, /* PAPI_L2_DCM */ |
| 1145 | }, | 1132 | }, |
| 1146 | [C(OP_PREFETCH)] = { | ||
| 1147 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1148 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1149 | }, | ||
| 1150 | }, | 1133 | }, |
| 1151 | [C(DTLB)] = { | 1134 | [C(DTLB)] = { |
| 1152 | /* | 1135 | /* |
| @@ -1154,45 +1137,24 @@ static const struct mips_perf_event xlp_cache_map | |||
| 1154 | * read and write. | 1137 | * read and write. |
| 1155 | */ | 1138 | */ |
| 1156 | [C(OP_READ)] = { | 1139 | [C(OP_READ)] = { |
| 1157 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1158 | [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */ | 1140 | [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */ |
| 1159 | }, | 1141 | }, |
| 1160 | [C(OP_WRITE)] = { | 1142 | [C(OP_WRITE)] = { |
| 1161 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1162 | [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */ | 1143 | [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */ |
| 1163 | }, | 1144 | }, |
| 1164 | [C(OP_PREFETCH)] = { | ||
| 1165 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1166 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1167 | }, | ||
| 1168 | }, | 1145 | }, |
| 1169 | [C(ITLB)] = { | 1146 | [C(ITLB)] = { |
| 1170 | [C(OP_READ)] = { | 1147 | [C(OP_READ)] = { |
| 1171 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1172 | [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */ | 1148 | [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */ |
| 1173 | }, | 1149 | }, |
| 1174 | [C(OP_WRITE)] = { | 1150 | [C(OP_WRITE)] = { |
| 1175 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1176 | [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */ | 1151 | [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */ |
| 1177 | }, | 1152 | }, |
| 1178 | [C(OP_PREFETCH)] = { | ||
| 1179 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1180 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1181 | }, | ||
| 1182 | }, | 1153 | }, |
| 1183 | [C(BPU)] = { | 1154 | [C(BPU)] = { |
| 1184 | [C(OP_READ)] = { | 1155 | [C(OP_READ)] = { |
| 1185 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1186 | [C(RESULT_MISS)] = { 0x25, CNTR_ALL }, | 1156 | [C(RESULT_MISS)] = { 0x25, CNTR_ALL }, |
| 1187 | }, | 1157 | }, |
| 1188 | [C(OP_WRITE)] = { | ||
| 1189 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1190 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1191 | }, | ||
| 1192 | [C(OP_PREFETCH)] = { | ||
| 1193 | [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1194 | [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID }, | ||
| 1195 | }, | ||
| 1196 | }, | 1158 | }, |
| 1197 | }; | 1159 | }; |
| 1198 | 1160 | ||
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S index 9c51be5a163a..8d32d5a6b460 100644 --- a/arch/mips/kernel/r2300_switch.S +++ b/arch/mips/kernel/r2300_switch.S | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | #include <asm/fpregdef.h> | 15 | #include <asm/fpregdef.h> |
| 16 | #include <asm/mipsregs.h> | 16 | #include <asm/mipsregs.h> |
| 17 | #include <asm/asm-offsets.h> | 17 | #include <asm/asm-offsets.h> |
| 18 | #include <asm/page.h> | ||
| 19 | #include <asm/regdef.h> | 18 | #include <asm/regdef.h> |
| 20 | #include <asm/stackframe.h> | 19 | #include <asm/stackframe.h> |
| 21 | #include <asm/thread_info.h> | 20 | #include <asm/thread_info.h> |
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S index 42d2a3938420..8decdfacb448 100644 --- a/arch/mips/kernel/r4k_switch.S +++ b/arch/mips/kernel/r4k_switch.S | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | #include <asm/fpregdef.h> | 15 | #include <asm/fpregdef.h> |
| 16 | #include <asm/mipsregs.h> | 16 | #include <asm/mipsregs.h> |
| 17 | #include <asm/asm-offsets.h> | 17 | #include <asm/asm-offsets.h> |
| 18 | #include <asm/page.h> | ||
| 19 | #include <asm/pgtable-bits.h> | 18 | #include <asm/pgtable-bits.h> |
| 20 | #include <asm/regdef.h> | 19 | #include <asm/regdef.h> |
| 21 | #include <asm/stackframe.h> | 20 | #include <asm/stackframe.h> |
diff --git a/arch/mips/kernel/relocate_kernel.S b/arch/mips/kernel/relocate_kernel.S index e4142c5f7c2b..804ebb2c34a6 100644 --- a/arch/mips/kernel/relocate_kernel.S +++ b/arch/mips/kernel/relocate_kernel.S | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | #include <asm/asm.h> | 9 | #include <asm/asm.h> |
| 10 | #include <asm/asmmacro.h> | 10 | #include <asm/asmmacro.h> |
| 11 | #include <asm/regdef.h> | 11 | #include <asm/regdef.h> |
| 12 | #include <asm/page.h> | ||
| 13 | #include <asm/mipsregs.h> | 12 | #include <asm/mipsregs.h> |
| 14 | #include <asm/stackframe.h> | 13 | #include <asm/stackframe.h> |
| 15 | #include <asm/addrspace.h> | 14 | #include <asm/addrspace.h> |
| @@ -50,7 +49,7 @@ process_entry: | |||
| 50 | and s3, s2, 0x8 | 49 | and s3, s2, 0x8 |
| 51 | beq s3, zero, process_entry | 50 | beq s3, zero, process_entry |
| 52 | and s2, s2, ~0x8 | 51 | and s2, s2, ~0x8 |
| 53 | li s6, (1 << PAGE_SHIFT) / SZREG | 52 | li s6, (1 << _PAGE_SHIFT) / SZREG |
| 54 | 53 | ||
| 55 | copy_word: | 54 | copy_word: |
| 56 | /* copy page word by word */ | 55 | /* copy page word by word */ |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 374f66e05f3d..d20a4bc9ed05 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
| @@ -583,6 +583,7 @@ einval: li v0, -ENOSYS | |||
| 583 | sys sys_process_vm_readv 6 /* 4345 */ | 583 | sys sys_process_vm_readv 6 /* 4345 */ |
| 584 | sys sys_process_vm_writev 6 | 584 | sys sys_process_vm_writev 6 |
| 585 | sys sys_kcmp 5 | 585 | sys sys_kcmp 5 |
| 586 | sys sys_finit_module 3 | ||
| 586 | .endm | 587 | .endm |
| 587 | 588 | ||
| 588 | /* We pre-compute the number of _instruction_ bytes needed to | 589 | /* We pre-compute the number of _instruction_ bytes needed to |
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index 169de6a6d916..b64f642da073 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
| @@ -422,4 +422,5 @@ sys_call_table: | |||
| 422 | PTR sys_process_vm_readv | 422 | PTR sys_process_vm_readv |
| 423 | PTR sys_process_vm_writev /* 5305 */ | 423 | PTR sys_process_vm_writev /* 5305 */ |
| 424 | PTR sys_kcmp | 424 | PTR sys_kcmp |
| 425 | PTR sys_finit_module | ||
| 425 | .size sys_call_table,.-sys_call_table | 426 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index ad3de9668da9..c29ac197f446 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
| @@ -416,4 +416,5 @@ EXPORT(sysn32_call_table) | |||
| 416 | PTR compat_sys_process_vm_readv | 416 | PTR compat_sys_process_vm_readv |
| 417 | PTR compat_sys_process_vm_writev /* 6310 */ | 417 | PTR compat_sys_process_vm_writev /* 6310 */ |
| 418 | PTR sys_kcmp | 418 | PTR sys_kcmp |
| 419 | PTR sys_finit_module | ||
| 419 | .size sysn32_call_table,.-sysn32_call_table | 420 | .size sysn32_call_table,.-sysn32_call_table |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 9601be6afa3d..cf3e75e46650 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
| @@ -540,4 +540,5 @@ sys_call_table: | |||
| 540 | PTR compat_sys_process_vm_readv /* 4345 */ | 540 | PTR compat_sys_process_vm_readv /* 4345 */ |
| 541 | PTR compat_sys_process_vm_writev | 541 | PTR compat_sys_process_vm_writev |
| 542 | PTR sys_kcmp | 542 | PTR sys_kcmp |
| 543 | PTR sys_finit_module | ||
| 543 | .size sys_call_table,.-sys_call_table | 544 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 2e6374a589ec..66bf4e22d9b9 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
| @@ -188,7 +188,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | /* preload SMP state for boot cpu */ | 190 | /* preload SMP state for boot cpu */ |
| 191 | void __devinit smp_prepare_boot_cpu(void) | 191 | void smp_prepare_boot_cpu(void) |
| 192 | { | 192 | { |
| 193 | set_cpu_possible(0, true); | 193 | set_cpu_possible(0, true); |
| 194 | set_cpu_online(0, true); | 194 | set_cpu_online(0, true); |
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 007ccbe1e264..0a4336b803e9 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | #include <asm/asm-offsets.h> | 1 | #include <asm/asm-offsets.h> |
| 2 | #include <asm/page.h> | ||
| 3 | #include <asm/thread_info.h> | 2 | #include <asm/thread_info.h> |
| 4 | 3 | ||
| 4 | #define PAGE_SIZE _PAGE_SIZE | ||
| 5 | |||
| 5 | /* | 6 | /* |
| 6 | * Put .bss..swapper_pg_dir as the first thing in .bss. This will | 7 | * Put .bss..swapper_pg_dir as the first thing in .bss. This will |
| 7 | * ensure that it has .bss alignment (64K). | 8 | * ensure that it has .bss alignment (64K). |
diff --git a/arch/mips/lantiq/xway/dma.c b/arch/mips/lantiq/xway/dma.c index 6453962ac898..e44a1866653f 100644 --- a/arch/mips/lantiq/xway/dma.c +++ b/arch/mips/lantiq/xway/dma.c | |||
| @@ -210,7 +210,7 @@ ltq_dma_init_port(int p) | |||
| 210 | } | 210 | } |
| 211 | EXPORT_SYMBOL_GPL(ltq_dma_init_port); | 211 | EXPORT_SYMBOL_GPL(ltq_dma_init_port); |
| 212 | 212 | ||
| 213 | static int __devinit | 213 | static int |
| 214 | ltq_dma_init(struct platform_device *pdev) | 214 | ltq_dma_init(struct platform_device *pdev) |
| 215 | { | 215 | { |
| 216 | struct clk *clk; | 216 | struct clk *clk; |
diff --git a/arch/mips/lantiq/xway/gptu.c b/arch/mips/lantiq/xway/gptu.c index cbb56fc022bc..e30b1ed1b936 100644 --- a/arch/mips/lantiq/xway/gptu.c +++ b/arch/mips/lantiq/xway/gptu.c | |||
| @@ -133,7 +133,7 @@ static inline void clkdev_add_gptu(struct device *dev, const char *con, | |||
| 133 | clkdev_add(&clk->cl); | 133 | clkdev_add(&clk->cl); |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | static int __devinit gptu_probe(struct platform_device *pdev) | 136 | static int gptu_probe(struct platform_device *pdev) |
| 137 | { | 137 | { |
| 138 | struct clk *clk; | 138 | struct clk *clk; |
| 139 | struct resource *res; | 139 | struct resource *res; |
diff --git a/arch/mips/lantiq/xway/xrx200_phy_fw.c b/arch/mips/lantiq/xway/xrx200_phy_fw.c index fe808bf5366d..d4d9d31f152e 100644 --- a/arch/mips/lantiq/xway/xrx200_phy_fw.c +++ b/arch/mips/lantiq/xway/xrx200_phy_fw.c | |||
| @@ -54,7 +54,7 @@ static dma_addr_t xway_gphy_load(struct platform_device *pdev) | |||
| 54 | return dev_addr; | 54 | return dev_addr; |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | static int __devinit xway_phy_fw_probe(struct platform_device *pdev) | 57 | static int xway_phy_fw_probe(struct platform_device *pdev) |
| 58 | { | 58 | { |
| 59 | dma_addr_t fw_addr; | 59 | dma_addr_t fw_addr; |
| 60 | struct property *pp; | 60 | struct property *pp; |
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c index cacfd31e8ec9..7657fd21cd3f 100644 --- a/arch/mips/mm/ioremap.c +++ b/arch/mips/mm/ioremap.c | |||
| @@ -190,3 +190,9 @@ void __iounmap(const volatile void __iomem *addr) | |||
| 190 | 190 | ||
| 191 | EXPORT_SYMBOL(__ioremap); | 191 | EXPORT_SYMBOL(__ioremap); |
| 192 | EXPORT_SYMBOL(__iounmap); | 192 | EXPORT_SYMBOL(__iounmap); |
| 193 | |||
| 194 | int __virt_addr_valid(const volatile void *kaddr) | ||
| 195 | { | ||
| 196 | return pfn_valid(PFN_DOWN(virt_to_phys(kaddr))); | ||
| 197 | } | ||
| 198 | EXPORT_SYMBOL_GPL(__virt_addr_valid); | ||
diff --git a/arch/mips/mm/tlbex-fault.S b/arch/mips/mm/tlbex-fault.S index e99eaa1fbedc..318855eb5f80 100644 --- a/arch/mips/mm/tlbex-fault.S +++ b/arch/mips/mm/tlbex-fault.S | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | * Copyright (C) 1999 Silicon Graphics, Inc. | 7 | * Copyright (C) 1999 Silicon Graphics, Inc. |
| 8 | */ | 8 | */ |
| 9 | #include <asm/mipsregs.h> | 9 | #include <asm/mipsregs.h> |
| 10 | #include <asm/page.h> | ||
| 11 | #include <asm/regdef.h> | 10 | #include <asm/regdef.h> |
| 12 | #include <asm/stackframe.h> | 11 | #include <asm/stackframe.h> |
| 13 | 12 | ||
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 05613355627b..1c8ac49ec72c 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
| @@ -976,13 +976,6 @@ build_get_pgde32(u32 **p, unsigned int tmp, unsigned int ptr) | |||
| 976 | #endif | 976 | #endif |
| 977 | uasm_i_mfc0(p, tmp, C0_BADVADDR); /* get faulting address */ | 977 | uasm_i_mfc0(p, tmp, C0_BADVADDR); /* get faulting address */ |
| 978 | uasm_i_lw(p, ptr, uasm_rel_lo(pgdc), ptr); | 978 | uasm_i_lw(p, ptr, uasm_rel_lo(pgdc), ptr); |
| 979 | |||
| 980 | if (cpu_has_mips_r2) { | ||
| 981 | uasm_i_ext(p, tmp, tmp, PGDIR_SHIFT, (32 - PGDIR_SHIFT)); | ||
| 982 | uasm_i_ins(p, ptr, tmp, PGD_T_LOG2, (32 - PGDIR_SHIFT)); | ||
| 983 | return; | ||
| 984 | } | ||
| 985 | |||
| 986 | uasm_i_srl(p, tmp, tmp, PGDIR_SHIFT); /* get pgd only bits */ | 979 | uasm_i_srl(p, tmp, tmp, PGDIR_SHIFT); /* get pgd only bits */ |
| 987 | uasm_i_sll(p, tmp, tmp, PGD_T_LOG2); | 980 | uasm_i_sll(p, tmp, tmp, PGD_T_LOG2); |
| 988 | uasm_i_addu(p, ptr, ptr, tmp); /* add in pgd offset */ | 981 | uasm_i_addu(p, ptr, ptr, tmp); /* add in pgd offset */ |
| @@ -1018,15 +1011,6 @@ static void __cpuinit build_adjust_context(u32 **p, unsigned int ctx) | |||
| 1018 | 1011 | ||
| 1019 | static void __cpuinit build_get_ptep(u32 **p, unsigned int tmp, unsigned int ptr) | 1012 | static void __cpuinit build_get_ptep(u32 **p, unsigned int tmp, unsigned int ptr) |
| 1020 | { | 1013 | { |
| 1021 | if (cpu_has_mips_r2) { | ||
| 1022 | /* PTE ptr offset is obtained from BadVAddr */ | ||
| 1023 | UASM_i_MFC0(p, tmp, C0_BADVADDR); | ||
| 1024 | UASM_i_LW(p, ptr, 0, ptr); | ||
| 1025 | uasm_i_ext(p, tmp, tmp, PAGE_SHIFT+1, PGDIR_SHIFT-PAGE_SHIFT-1); | ||
| 1026 | uasm_i_ins(p, ptr, tmp, PTE_T_LOG2+1, PGDIR_SHIFT-PAGE_SHIFT-1); | ||
| 1027 | return; | ||
| 1028 | } | ||
| 1029 | |||
| 1030 | /* | 1014 | /* |
| 1031 | * Bug workaround for the Nevada. It seems as if under certain | 1015 | * Bug workaround for the Nevada. It seems as if under certain |
| 1032 | * circumstances the move from cp0_context might produce a | 1016 | * circumstances the move from cp0_context might produce a |
diff --git a/arch/mips/mti-sead3/sead3-i2c-drv.c b/arch/mips/mti-sead3/sead3-i2c-drv.c index 0375ee66bca3..7aa2225e75b9 100644 --- a/arch/mips/mti-sead3/sead3-i2c-drv.c +++ b/arch/mips/mti-sead3/sead3-i2c-drv.c | |||
| @@ -297,7 +297,7 @@ static void sead3_i2c_platform_setup(struct pic32_i2c_platform_data *priv) | |||
| 297 | priv->base + PIC32_I2CxSTATCLR); | 297 | priv->base + PIC32_I2CxSTATCLR); |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | static int __devinit sead3_i2c_platform_probe(struct platform_device *pdev) | 300 | static int sead3_i2c_platform_probe(struct platform_device *pdev) |
| 301 | { | 301 | { |
| 302 | struct pic32_i2c_platform_data *priv; | 302 | struct pic32_i2c_platform_data *priv; |
| 303 | struct resource *r; | 303 | struct resource *r; |
| @@ -345,7 +345,7 @@ out: | |||
| 345 | return ret; | 345 | return ret; |
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | static int __devexit sead3_i2c_platform_remove(struct platform_device *pdev) | 348 | static int sead3_i2c_platform_remove(struct platform_device *pdev) |
| 349 | { | 349 | { |
| 350 | struct pic32_i2c_platform_data *priv = platform_get_drvdata(pdev); | 350 | struct pic32_i2c_platform_data *priv = platform_get_drvdata(pdev); |
| 351 | 351 | ||
| @@ -383,7 +383,7 @@ static struct platform_driver sead3_i2c_platform_driver = { | |||
| 383 | .owner = THIS_MODULE, | 383 | .owner = THIS_MODULE, |
| 384 | }, | 384 | }, |
| 385 | .probe = sead3_i2c_platform_probe, | 385 | .probe = sead3_i2c_platform_probe, |
| 386 | .remove = __devexit_p(sead3_i2c_platform_remove), | 386 | .remove = sead3_i2c_platform_remove, |
| 387 | .suspend = sead3_i2c_platform_suspend, | 387 | .suspend = sead3_i2c_platform_suspend, |
| 388 | .resume = sead3_i2c_platform_resume, | 388 | .resume = sead3_i2c_platform_resume, |
| 389 | }; | 389 | }; |
diff --git a/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c b/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c index 46509b0a620d..514675ed0cde 100644 --- a/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c +++ b/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c | |||
| @@ -304,8 +304,7 @@ static void i2c_platform_disable(struct i2c_platform_data *priv) | |||
| 304 | pr_debug("i2c_platform_disable\n"); | 304 | pr_debug("i2c_platform_disable\n"); |
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | static int __devinit | 307 | static int i2c_platform_probe(struct platform_device *pdev) |
| 308 | i2c_platform_probe(struct platform_device *pdev) | ||
| 309 | { | 308 | { |
| 310 | struct i2c_platform_data *priv; | 309 | struct i2c_platform_data *priv; |
| 311 | struct resource *r; | 310 | struct resource *r; |
| @@ -362,8 +361,7 @@ out: | |||
| 362 | return ret; | 361 | return ret; |
| 363 | } | 362 | } |
| 364 | 363 | ||
| 365 | static int __devexit | 364 | static int i2c_platform_remove(struct platform_device *pdev) |
| 366 | i2c_platform_remove(struct platform_device *pdev) | ||
| 367 | { | 365 | { |
| 368 | struct i2c_platform_data *priv = platform_get_drvdata(pdev); | 366 | struct i2c_platform_data *priv = platform_get_drvdata(pdev); |
| 369 | 367 | ||
| @@ -408,7 +406,7 @@ static struct platform_driver i2c_platform_driver = { | |||
| 408 | .owner = THIS_MODULE, | 406 | .owner = THIS_MODULE, |
| 409 | }, | 407 | }, |
| 410 | .probe = i2c_platform_probe, | 408 | .probe = i2c_platform_probe, |
| 411 | .remove = __devexit_p(i2c_platform_remove), | 409 | .remove = i2c_platform_remove, |
| 412 | .suspend = i2c_platform_suspend, | 410 | .suspend = i2c_platform_suspend, |
| 413 | .resume = i2c_platform_resume, | 411 | .resume = i2c_platform_resume, |
| 414 | }; | 412 | }; |
diff --git a/arch/mips/pci/fixup-cobalt.c b/arch/mips/pci/fixup-cobalt.c index 3e7ce65d776c..9553b14002dd 100644 --- a/arch/mips/pci/fixup-cobalt.c +++ b/arch/mips/pci/fixup-cobalt.c | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | #define VIA_COBALT_BRD_ID_REG 0x94 | 37 | #define VIA_COBALT_BRD_ID_REG 0x94 |
| 38 | #define VIA_COBALT_BRD_REG_to_ID(reg) ((unsigned char)(reg) >> 4) | 38 | #define VIA_COBALT_BRD_REG_to_ID(reg) ((unsigned char)(reg) >> 4) |
| 39 | 39 | ||
| 40 | static void __devinit qube_raq_galileo_early_fixup(struct pci_dev *dev) | 40 | static void qube_raq_galileo_early_fixup(struct pci_dev *dev) |
| 41 | { | 41 | { |
| 42 | if (dev->devfn == PCI_DEVFN(0, 0) && | 42 | if (dev->devfn == PCI_DEVFN(0, 0) && |
| 43 | (dev->class >> 8) == PCI_CLASS_MEMORY_OTHER) { | 43 | (dev->class >> 8) == PCI_CLASS_MEMORY_OTHER) { |
| @@ -51,7 +51,7 @@ static void __devinit qube_raq_galileo_early_fixup(struct pci_dev *dev) | |||
| 51 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_GT64111, | 51 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_GT64111, |
| 52 | qube_raq_galileo_early_fixup); | 52 | qube_raq_galileo_early_fixup); |
| 53 | 53 | ||
| 54 | static void __devinit qube_raq_via_bmIDE_fixup(struct pci_dev *dev) | 54 | static void qube_raq_via_bmIDE_fixup(struct pci_dev *dev) |
| 55 | { | 55 | { |
| 56 | unsigned short cfgword; | 56 | unsigned short cfgword; |
| 57 | unsigned char lt; | 57 | unsigned char lt; |
| @@ -74,7 +74,7 @@ static void __devinit qube_raq_via_bmIDE_fixup(struct pci_dev *dev) | |||
| 74 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, | 74 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, |
| 75 | qube_raq_via_bmIDE_fixup); | 75 | qube_raq_via_bmIDE_fixup); |
| 76 | 76 | ||
| 77 | static void __devinit qube_raq_galileo_fixup(struct pci_dev *dev) | 77 | static void qube_raq_galileo_fixup(struct pci_dev *dev) |
| 78 | { | 78 | { |
| 79 | if (dev->devfn != PCI_DEVFN(0, 0)) | 79 | if (dev->devfn != PCI_DEVFN(0, 0)) |
| 80 | return; | 80 | return; |
| @@ -129,7 +129,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_GT64111, | |||
| 129 | 129 | ||
| 130 | int cobalt_board_id; | 130 | int cobalt_board_id; |
| 131 | 131 | ||
| 132 | static void __devinit qube_raq_via_board_id_fixup(struct pci_dev *dev) | 132 | static void qube_raq_via_board_id_fixup(struct pci_dev *dev) |
| 133 | { | 133 | { |
| 134 | u8 id; | 134 | u8 id; |
| 135 | int retval; | 135 | int retval; |
diff --git a/arch/mips/pci/fixup-emma2rh.c b/arch/mips/pci/fixup-emma2rh.c index 0d9ccf4dfc5a..beaec32b02e5 100644 --- a/arch/mips/pci/fixup-emma2rh.c +++ b/arch/mips/pci/fixup-emma2rh.c | |||
| @@ -52,7 +52,7 @@ static unsigned char irq_map[][5] __initdata = { | |||
| 52 | MARKEINS_PCI_IRQ_INTA, MARKEINS_PCI_IRQ_INTB,}, | 52 | MARKEINS_PCI_IRQ_INTA, MARKEINS_PCI_IRQ_INTB,}, |
| 53 | }; | 53 | }; |
| 54 | 54 | ||
| 55 | static void __devinit nec_usb_controller_fixup(struct pci_dev *dev) | 55 | static void nec_usb_controller_fixup(struct pci_dev *dev) |
| 56 | { | 56 | { |
| 57 | if (PCI_SLOT(dev->devfn) == EMMA2RH_USB_SLOT) | 57 | if (PCI_SLOT(dev->devfn) == EMMA2RH_USB_SLOT) |
| 58 | /* on board USB controller configuration */ | 58 | /* on board USB controller configuration */ |
| @@ -67,7 +67,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB, | |||
| 67 | * if it is the host bridge by marking it as such. These resources are of | 67 | * if it is the host bridge by marking it as such. These resources are of |
| 68 | * no consequence to the PCI layer (they are handled elsewhere). | 68 | * no consequence to the PCI layer (they are handled elsewhere). |
| 69 | */ | 69 | */ |
| 70 | static void __devinit emma2rh_pci_host_fixup(struct pci_dev *dev) | 70 | static void emma2rh_pci_host_fixup(struct pci_dev *dev) |
| 71 | { | 71 | { |
| 72 | int i; | 72 | int i; |
| 73 | 73 | ||
diff --git a/arch/mips/pci/fixup-fuloong2e.c b/arch/mips/pci/fixup-fuloong2e.c index 0857ab8c3919..63ab4a042cd6 100644 --- a/arch/mips/pci/fixup-fuloong2e.c +++ b/arch/mips/pci/fixup-fuloong2e.c | |||
| @@ -48,7 +48,7 @@ int pcibios_plat_dev_init(struct pci_dev *dev) | |||
| 48 | return 0; | 48 | return 0; |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | static void __devinit loongson2e_nec_fixup(struct pci_dev *pdev) | 51 | static void loongson2e_nec_fixup(struct pci_dev *pdev) |
| 52 | { | 52 | { |
| 53 | unsigned int val; | 53 | unsigned int val; |
| 54 | 54 | ||
| @@ -60,7 +60,7 @@ static void __devinit loongson2e_nec_fixup(struct pci_dev *pdev) | |||
| 60 | pci_write_config_dword(pdev, 0xe4, 1 << 5); | 60 | pci_write_config_dword(pdev, 0xe4, 1 << 5); |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | static void __devinit loongson2e_686b_func0_fixup(struct pci_dev *pdev) | 63 | static void loongson2e_686b_func0_fixup(struct pci_dev *pdev) |
| 64 | { | 64 | { |
| 65 | unsigned char c; | 65 | unsigned char c; |
| 66 | 66 | ||
| @@ -135,7 +135,7 @@ static void __devinit loongson2e_686b_func0_fixup(struct pci_dev *pdev) | |||
| 135 | printk(KERN_INFO"via686b fix: ISA bridge done\n"); | 135 | printk(KERN_INFO"via686b fix: ISA bridge done\n"); |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | static void __devinit loongson2e_686b_func1_fixup(struct pci_dev *pdev) | 138 | static void loongson2e_686b_func1_fixup(struct pci_dev *pdev) |
| 139 | { | 139 | { |
| 140 | printk(KERN_INFO"via686b fix: IDE\n"); | 140 | printk(KERN_INFO"via686b fix: IDE\n"); |
| 141 | 141 | ||
| @@ -168,19 +168,19 @@ static void __devinit loongson2e_686b_func1_fixup(struct pci_dev *pdev) | |||
| 168 | printk(KERN_INFO"via686b fix: IDE done\n"); | 168 | printk(KERN_INFO"via686b fix: IDE done\n"); |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | static void __devinit loongson2e_686b_func2_fixup(struct pci_dev *pdev) | 171 | static void loongson2e_686b_func2_fixup(struct pci_dev *pdev) |
| 172 | { | 172 | { |
| 173 | /* irq routing */ | 173 | /* irq routing */ |
| 174 | pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 10); | 174 | pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 10); |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | static void __devinit loongson2e_686b_func3_fixup(struct pci_dev *pdev) | 177 | static void loongson2e_686b_func3_fixup(struct pci_dev *pdev) |
| 178 | { | 178 | { |
| 179 | /* irq routing */ | 179 | /* irq routing */ |
| 180 | pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 11); | 180 | pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 11); |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | static void __devinit loongson2e_686b_func5_fixup(struct pci_dev *pdev) | 183 | static void loongson2e_686b_func5_fixup(struct pci_dev *pdev) |
| 184 | { | 184 | { |
| 185 | unsigned int val; | 185 | unsigned int val; |
| 186 | unsigned char c; | 186 | unsigned char c; |
diff --git a/arch/mips/pci/fixup-lemote2f.c b/arch/mips/pci/fixup-lemote2f.c index a7b917dcf604..519daaebb5da 100644 --- a/arch/mips/pci/fixup-lemote2f.c +++ b/arch/mips/pci/fixup-lemote2f.c | |||
| @@ -96,21 +96,21 @@ int pcibios_plat_dev_init(struct pci_dev *dev) | |||
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | /* CS5536 SPEC. fixup */ | 98 | /* CS5536 SPEC. fixup */ |
| 99 | static void __devinit loongson_cs5536_isa_fixup(struct pci_dev *pdev) | 99 | static void loongson_cs5536_isa_fixup(struct pci_dev *pdev) |
| 100 | { | 100 | { |
| 101 | /* the uart1 and uart2 interrupt in PIC is enabled as default */ | 101 | /* the uart1 and uart2 interrupt in PIC is enabled as default */ |
| 102 | pci_write_config_dword(pdev, PCI_UART1_INT_REG, 1); | 102 | pci_write_config_dword(pdev, PCI_UART1_INT_REG, 1); |
| 103 | pci_write_config_dword(pdev, PCI_UART2_INT_REG, 1); | 103 | pci_write_config_dword(pdev, PCI_UART2_INT_REG, 1); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | static void __devinit loongson_cs5536_ide_fixup(struct pci_dev *pdev) | 106 | static void loongson_cs5536_ide_fixup(struct pci_dev *pdev) |
| 107 | { | 107 | { |
| 108 | /* setting the mutex pin as IDE function */ | 108 | /* setting the mutex pin as IDE function */ |
| 109 | pci_write_config_dword(pdev, PCI_IDE_CFG_REG, | 109 | pci_write_config_dword(pdev, PCI_IDE_CFG_REG, |
| 110 | CS5536_IDE_FLASH_SIGNATURE); | 110 | CS5536_IDE_FLASH_SIGNATURE); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | static void __devinit loongson_cs5536_acc_fixup(struct pci_dev *pdev) | 113 | static void loongson_cs5536_acc_fixup(struct pci_dev *pdev) |
| 114 | { | 114 | { |
| 115 | /* enable the AUDIO interrupt in PIC */ | 115 | /* enable the AUDIO interrupt in PIC */ |
| 116 | pci_write_config_dword(pdev, PCI_ACC_INT_REG, 1); | 116 | pci_write_config_dword(pdev, PCI_ACC_INT_REG, 1); |
| @@ -118,14 +118,14 @@ static void __devinit loongson_cs5536_acc_fixup(struct pci_dev *pdev) | |||
| 118 | pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xc0); | 118 | pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xc0); |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | static void __devinit loongson_cs5536_ohci_fixup(struct pci_dev *pdev) | 121 | static void loongson_cs5536_ohci_fixup(struct pci_dev *pdev) |
| 122 | { | 122 | { |
| 123 | /* enable the OHCI interrupt in PIC */ | 123 | /* enable the OHCI interrupt in PIC */ |
| 124 | /* THE OHCI, EHCI, UDC, OTG are shared with interrupt in PIC */ | 124 | /* THE OHCI, EHCI, UDC, OTG are shared with interrupt in PIC */ |
| 125 | pci_write_config_dword(pdev, PCI_OHCI_INT_REG, 1); | 125 | pci_write_config_dword(pdev, PCI_OHCI_INT_REG, 1); |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | static void __devinit loongson_cs5536_ehci_fixup(struct pci_dev *pdev) | 128 | static void loongson_cs5536_ehci_fixup(struct pci_dev *pdev) |
| 129 | { | 129 | { |
| 130 | u32 hi, lo; | 130 | u32 hi, lo; |
| 131 | 131 | ||
| @@ -137,7 +137,7 @@ static void __devinit loongson_cs5536_ehci_fixup(struct pci_dev *pdev) | |||
| 137 | pci_write_config_dword(pdev, PCI_EHCI_FLADJ_REG, 0x2000); | 137 | pci_write_config_dword(pdev, PCI_EHCI_FLADJ_REG, 0x2000); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | static void __devinit loongson_nec_fixup(struct pci_dev *pdev) | 140 | static void loongson_nec_fixup(struct pci_dev *pdev) |
| 141 | { | 141 | { |
| 142 | unsigned int val; | 142 | unsigned int val; |
| 143 | 143 | ||
diff --git a/arch/mips/pci/fixup-malta.c b/arch/mips/pci/fixup-malta.c index 9a1a2244522a..75d03f6be3bd 100644 --- a/arch/mips/pci/fixup-malta.c +++ b/arch/mips/pci/fixup-malta.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #define PCID 4 | 8 | #define PCID 4 |
| 9 | 9 | ||
| 10 | /* This table is filled in by interrogating the PIIX4 chip */ | 10 | /* This table is filled in by interrogating the PIIX4 chip */ |
| 11 | static char pci_irq[5] __devinitdata = { | 11 | static char pci_irq[5] = { |
| 12 | }; | 12 | }; |
| 13 | 13 | ||
| 14 | static char irq_tab[][5] __initdata = { | 14 | static char irq_tab[][5] __initdata = { |
| @@ -50,10 +50,10 @@ int pcibios_plat_dev_init(struct pci_dev *dev) | |||
| 50 | return 0; | 50 | return 0; |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | static void __devinit malta_piix_func0_fixup(struct pci_dev *pdev) | 53 | static void malta_piix_func0_fixup(struct pci_dev *pdev) |
| 54 | { | 54 | { |
| 55 | unsigned char reg_val; | 55 | unsigned char reg_val; |
| 56 | static int piixirqmap[16] __devinitdata = { /* PIIX PIRQC[A:D] irq mappings */ | 56 | static int piixirqmap[16] = { /* PIIX PIRQC[A:D] irq mappings */ |
| 57 | 0, 0, 0, 3, | 57 | 0, 0, 0, 3, |
| 58 | 4, 5, 6, 7, | 58 | 4, 5, 6, 7, |
| 59 | 0, 9, 10, 11, | 59 | 0, 9, 10, 11, |
| @@ -84,7 +84,7 @@ static void __devinit malta_piix_func0_fixup(struct pci_dev *pdev) | |||
| 84 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_0, | 84 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_0, |
| 85 | malta_piix_func0_fixup); | 85 | malta_piix_func0_fixup); |
| 86 | 86 | ||
| 87 | static void __devinit malta_piix_func1_fixup(struct pci_dev *pdev) | 87 | static void malta_piix_func1_fixup(struct pci_dev *pdev) |
| 88 | { | 88 | { |
| 89 | unsigned char reg_val; | 89 | unsigned char reg_val; |
| 90 | 90 | ||
| @@ -104,7 +104,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB, | |||
| 104 | malta_piix_func1_fixup); | 104 | malta_piix_func1_fixup); |
| 105 | 105 | ||
| 106 | /* Enable PCI 2.1 compatibility in PIIX4 */ | 106 | /* Enable PCI 2.1 compatibility in PIIX4 */ |
| 107 | static void __devinit quirk_dlcsetup(struct pci_dev *dev) | 107 | static void quirk_dlcsetup(struct pci_dev *dev) |
| 108 | { | 108 | { |
| 109 | u8 odlc, ndlc; | 109 | u8 odlc, ndlc; |
| 110 | 110 | ||
diff --git a/arch/mips/pci/fixup-rc32434.c b/arch/mips/pci/fixup-rc32434.c index 76bb1be99d43..d0f6ecbf35f7 100644 --- a/arch/mips/pci/fixup-rc32434.c +++ b/arch/mips/pci/fixup-rc32434.c | |||
| @@ -32,12 +32,12 @@ | |||
| 32 | #include <asm/mach-rc32434/rc32434.h> | 32 | #include <asm/mach-rc32434/rc32434.h> |
| 33 | #include <asm/mach-rc32434/irq.h> | 33 | #include <asm/mach-rc32434/irq.h> |
| 34 | 34 | ||
| 35 | static int __devinitdata irq_map[2][12] = { | 35 | static int irq_map[2][12] = { |
| 36 | {0, 0, 2, 3, 2, 3, 0, 0, 0, 0, 0, 1}, | 36 | {0, 0, 2, 3, 2, 3, 0, 0, 0, 0, 0, 1}, |
| 37 | {0, 0, 1, 3, 0, 2, 1, 3, 0, 2, 1, 3} | 37 | {0, 0, 1, 3, 0, 2, 1, 3, 0, 2, 1, 3} |
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | int __devinit pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 40 | int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
| 41 | { | 41 | { |
| 42 | int irq = 0; | 42 | int irq = 0; |
| 43 | 43 | ||
| @@ -47,7 +47,7 @@ int __devinit pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 47 | return irq + GROUP4_IRQ_BASE + 4; | 47 | return irq + GROUP4_IRQ_BASE + 4; |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | static void __devinit rc32434_pci_early_fixup(struct pci_dev *dev) | 50 | static void rc32434_pci_early_fixup(struct pci_dev *dev) |
| 51 | { | 51 | { |
| 52 | if (PCI_SLOT(dev->devfn) == 6 && dev->bus->number == 0) { | 52 | if (PCI_SLOT(dev->devfn) == 6 && dev->bus->number == 0) { |
| 53 | /* disable prefetched memory range */ | 53 | /* disable prefetched memory range */ |
diff --git a/arch/mips/pci/fixup-sb1250.c b/arch/mips/pci/fixup-sb1250.c index d02900a72916..1441becdcb6c 100644 --- a/arch/mips/pci/fixup-sb1250.c +++ b/arch/mips/pci/fixup-sb1250.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | * Set the BCM1250, etc. PCI host bridge's TRDY timeout | 15 | * Set the BCM1250, etc. PCI host bridge's TRDY timeout |
| 16 | * to the finite max. | 16 | * to the finite max. |
| 17 | */ | 17 | */ |
| 18 | static void __devinit quirk_sb1250_pci(struct pci_dev *dev) | 18 | static void quirk_sb1250_pci(struct pci_dev *dev) |
| 19 | { | 19 | { |
| 20 | pci_write_config_byte(dev, 0x40, 0xff); | 20 | pci_write_config_byte(dev, 0x40, 0xff); |
| 21 | } | 21 | } |
| @@ -25,7 +25,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SIBYTE, PCI_DEVICE_ID_BCM1250_PCI, | |||
| 25 | /* | 25 | /* |
| 26 | * The BCM1250, etc. PCI/HT bridge reports as a host bridge. | 26 | * The BCM1250, etc. PCI/HT bridge reports as a host bridge. |
| 27 | */ | 27 | */ |
| 28 | static void __devinit quirk_sb1250_ht(struct pci_dev *dev) | 28 | static void quirk_sb1250_ht(struct pci_dev *dev) |
| 29 | { | 29 | { |
| 30 | dev->class = PCI_CLASS_BRIDGE_PCI << 8; | 30 | dev->class = PCI_CLASS_BRIDGE_PCI << 8; |
| 31 | } | 31 | } |
| @@ -35,7 +35,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SIBYTE, PCI_DEVICE_ID_BCM1250_HT, | |||
| 35 | /* | 35 | /* |
| 36 | * Set the SP1011 HT/PCI bridge's TRDY timeout to the finite max. | 36 | * Set the SP1011 HT/PCI bridge's TRDY timeout to the finite max. |
| 37 | */ | 37 | */ |
| 38 | static void __devinit quirk_sp1011(struct pci_dev *dev) | 38 | static void quirk_sp1011(struct pci_dev *dev) |
| 39 | { | 39 | { |
| 40 | pci_write_config_byte(dev, 0x64, 0xff); | 40 | pci_write_config_byte(dev, 0x64, 0xff); |
| 41 | } | 41 | } |
diff --git a/arch/mips/pci/ops-bcm63xx.c b/arch/mips/pci/ops-bcm63xx.c index 65c7bd100486..4a156629e958 100644 --- a/arch/mips/pci/ops-bcm63xx.c +++ b/arch/mips/pci/ops-bcm63xx.c | |||
| @@ -411,7 +411,7 @@ struct pci_ops bcm63xx_cb_ops = { | |||
| 411 | * only one IO window, so it cannot be shared by PCI and cardbus, use | 411 | * only one IO window, so it cannot be shared by PCI and cardbus, use |
| 412 | * fixup to choose and detect unhandled configuration | 412 | * fixup to choose and detect unhandled configuration |
| 413 | */ | 413 | */ |
| 414 | static void __devinit bcm63xx_fixup(struct pci_dev *dev) | 414 | static void bcm63xx_fixup(struct pci_dev *dev) |
| 415 | { | 415 | { |
| 416 | static int io_window = -1; | 416 | static int io_window = -1; |
| 417 | int i, found, new_io_window; | 417 | int i, found, new_io_window; |
diff --git a/arch/mips/pci/ops-tx4927.c b/arch/mips/pci/ops-tx4927.c index bc13e29d2bb3..0d69d6f4ea44 100644 --- a/arch/mips/pci/ops-tx4927.c +++ b/arch/mips/pci/ops-tx4927.c | |||
| @@ -191,13 +191,13 @@ static struct { | |||
| 191 | u8 trdyto; | 191 | u8 trdyto; |
| 192 | u8 retryto; | 192 | u8 retryto; |
| 193 | u16 gbwc; | 193 | u16 gbwc; |
| 194 | } tx4927_pci_opts __devinitdata = { | 194 | } tx4927_pci_opts = { |
| 195 | .trdyto = 0, | 195 | .trdyto = 0, |
| 196 | .retryto = 0, | 196 | .retryto = 0, |
| 197 | .gbwc = 0xfe0, /* 4064 GBUSCLK for CCFG.GTOT=0b11 */ | 197 | .gbwc = 0xfe0, /* 4064 GBUSCLK for CCFG.GTOT=0b11 */ |
| 198 | }; | 198 | }; |
| 199 | 199 | ||
| 200 | char *__devinit tx4927_pcibios_setup(char *str) | 200 | char *tx4927_pcibios_setup(char *str) |
| 201 | { | 201 | { |
| 202 | unsigned long val; | 202 | unsigned long val; |
| 203 | 203 | ||
| @@ -495,7 +495,7 @@ irqreturn_t tx4927_pcierr_interrupt(int irq, void *dev_id) | |||
| 495 | } | 495 | } |
| 496 | 496 | ||
| 497 | #ifdef CONFIG_TOSHIBA_FPCIB0 | 497 | #ifdef CONFIG_TOSHIBA_FPCIB0 |
| 498 | static void __devinit tx4927_quirk_slc90e66_bridge(struct pci_dev *dev) | 498 | static void tx4927_quirk_slc90e66_bridge(struct pci_dev *dev) |
| 499 | { | 499 | { |
| 500 | struct tx4927_pcic_reg __iomem *pcicptr = pci_bus_to_pcicptr(dev->bus); | 500 | struct tx4927_pcic_reg __iomem *pcicptr = pci_bus_to_pcicptr(dev->bus); |
| 501 | 501 | ||
diff --git a/arch/mips/pci/pci-alchemy.c b/arch/mips/pci/pci-alchemy.c index ec125bed721c..c4ea6cc55f94 100644 --- a/arch/mips/pci/pci-alchemy.c +++ b/arch/mips/pci/pci-alchemy.c | |||
| @@ -356,7 +356,7 @@ static struct syscore_ops alchemy_pci_pmops = { | |||
| 356 | .resume = alchemy_pci_resume, | 356 | .resume = alchemy_pci_resume, |
| 357 | }; | 357 | }; |
| 358 | 358 | ||
| 359 | static int __devinit alchemy_pci_probe(struct platform_device *pdev) | 359 | static int alchemy_pci_probe(struct platform_device *pdev) |
| 360 | { | 360 | { |
| 361 | struct alchemy_pci_platdata *pd = pdev->dev.platform_data; | 361 | struct alchemy_pci_platdata *pd = pdev->dev.platform_data; |
| 362 | struct alchemy_pci_context *ctx; | 362 | struct alchemy_pci_context *ctx; |
diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c index fdc24440294c..7f4f49b09b5b 100644 --- a/arch/mips/pci/pci-ip27.c +++ b/arch/mips/pci/pci-ip27.c | |||
| @@ -143,7 +143,7 @@ int __cpuinit bridge_probe(nasid_t nasid, int widget_id, int masterwid) | |||
| 143 | * A given PCI device, in general, should be able to intr any of the cpus | 143 | * A given PCI device, in general, should be able to intr any of the cpus |
| 144 | * on any one of the hubs connected to its xbow. | 144 | * on any one of the hubs connected to its xbow. |
| 145 | */ | 145 | */ |
| 146 | int __devinit pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 146 | int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
| 147 | { | 147 | { |
| 148 | return 0; | 148 | return 0; |
| 149 | } | 149 | } |
| @@ -212,7 +212,7 @@ static inline void pci_enable_swapping(struct pci_dev *dev) | |||
| 212 | bridge->b_widget.w_tflush; /* Flush */ | 212 | bridge->b_widget.w_tflush; /* Flush */ |
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | static void __devinit pci_fixup_ioc3(struct pci_dev *d) | 215 | static void pci_fixup_ioc3(struct pci_dev *d) |
| 216 | { | 216 | { |
| 217 | pci_disable_swapping(d); | 217 | pci_disable_swapping(d); |
| 218 | } | 218 | } |
diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c index 075d87acd12a..95681789b51e 100644 --- a/arch/mips/pci/pci-lantiq.c +++ b/arch/mips/pci/pci-lantiq.c | |||
| @@ -95,7 +95,7 @@ static inline u32 ltq_calc_bar11mask(void) | |||
| 95 | return bar11mask; | 95 | return bar11mask; |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | static int __devinit ltq_pci_startup(struct platform_device *pdev) | 98 | static int ltq_pci_startup(struct platform_device *pdev) |
| 99 | { | 99 | { |
| 100 | struct device_node *node = pdev->dev.of_node; | 100 | struct device_node *node = pdev->dev.of_node; |
| 101 | const __be32 *req_mask, *bus_clk; | 101 | const __be32 *req_mask, *bus_clk; |
| @@ -201,7 +201,7 @@ static int __devinit ltq_pci_startup(struct platform_device *pdev) | |||
| 201 | return 0; | 201 | return 0; |
| 202 | } | 202 | } |
| 203 | 203 | ||
| 204 | static int __devinit ltq_pci_probe(struct platform_device *pdev) | 204 | static int ltq_pci_probe(struct platform_device *pdev) |
| 205 | { | 205 | { |
| 206 | struct resource *res_cfg, *res_bridge; | 206 | struct resource *res_cfg, *res_bridge; |
| 207 | 207 | ||
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index 4040416e0603..a1843448fad3 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
| @@ -76,7 +76,7 @@ pcibios_align_resource(void *data, const struct resource *res, | |||
| 76 | return start; | 76 | return start; |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | static void __devinit pcibios_scanbus(struct pci_controller *hose) | 79 | static void pcibios_scanbus(struct pci_controller *hose) |
| 80 | { | 80 | { |
| 81 | static int next_busno; | 81 | static int next_busno; |
| 82 | static int need_domain_info; | 82 | static int need_domain_info; |
| @@ -120,8 +120,7 @@ static void __devinit pcibios_scanbus(struct pci_controller *hose) | |||
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | #ifdef CONFIG_OF | 122 | #ifdef CONFIG_OF |
| 123 | void __devinit pci_load_of_ranges(struct pci_controller *hose, | 123 | void pci_load_of_ranges(struct pci_controller *hose, struct device_node *node) |
| 124 | struct device_node *node) | ||
| 125 | { | 124 | { |
| 126 | const __be32 *ranges; | 125 | const __be32 *ranges; |
| 127 | int rlen; | 126 | int rlen; |
| @@ -174,7 +173,7 @@ void __devinit pci_load_of_ranges(struct pci_controller *hose, | |||
| 174 | 173 | ||
| 175 | static DEFINE_MUTEX(pci_scan_mutex); | 174 | static DEFINE_MUTEX(pci_scan_mutex); |
| 176 | 175 | ||
| 177 | void __devinit register_pci_controller(struct pci_controller *hose) | 176 | void register_pci_controller(struct pci_controller *hose) |
| 178 | { | 177 | { |
| 179 | if (request_resource(&iomem_resource, hose->mem_resource) < 0) | 178 | if (request_resource(&iomem_resource, hose->mem_resource) < 0) |
| 180 | goto out; | 179 | goto out; |
| @@ -303,7 +302,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) | |||
| 303 | return pcibios_plat_dev_init(dev); | 302 | return pcibios_plat_dev_init(dev); |
| 304 | } | 303 | } |
| 305 | 304 | ||
| 306 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) | 305 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 307 | { | 306 | { |
| 308 | struct pci_dev *dev = bus->self; | 307 | struct pci_dev *dev = bus->self; |
| 309 | 308 | ||
diff --git a/arch/mips/power/hibernate.S b/arch/mips/power/hibernate.S index f8a751c03282..61e2558a2dcb 100644 --- a/arch/mips/power/hibernate.S +++ b/arch/mips/power/hibernate.S | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | * Wu Zhangjin <wuzhangjin@gmail.com> | 8 | * Wu Zhangjin <wuzhangjin@gmail.com> |
| 9 | */ | 9 | */ |
| 10 | #include <asm/asm-offsets.h> | 10 | #include <asm/asm-offsets.h> |
| 11 | #include <asm/page.h> | ||
| 12 | #include <asm/regdef.h> | 11 | #include <asm/regdef.h> |
| 13 | #include <asm/asm.h> | 12 | #include <asm/asm.h> |
| 14 | 13 | ||
| @@ -35,7 +34,7 @@ LEAF(swsusp_arch_resume) | |||
| 35 | 0: | 34 | 0: |
| 36 | PTR_L t1, PBE_ADDRESS(t0) /* source */ | 35 | PTR_L t1, PBE_ADDRESS(t0) /* source */ |
| 37 | PTR_L t2, PBE_ORIG_ADDRESS(t0) /* destination */ | 36 | PTR_L t2, PBE_ORIG_ADDRESS(t0) /* destination */ |
| 38 | PTR_ADDU t3, t1, PAGE_SIZE | 37 | PTR_ADDU t3, t1, _PAGE_SIZE |
| 39 | 1: | 38 | 1: |
| 40 | REG_L t8, (t1) | 39 | REG_L t8, (t1) |
| 41 | REG_S t8, (t2) | 40 | REG_S t8, (t2) |
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c index d6c7bd4b5ab0..2e9c283b8e68 100644 --- a/arch/mips/sni/setup.c +++ b/arch/mips/sni/setup.c | |||
| @@ -236,7 +236,7 @@ void __init plat_mem_setup(void) | |||
| 236 | #include <video/vga.h> | 236 | #include <video/vga.h> |
| 237 | #include <video/cirrus.h> | 237 | #include <video/cirrus.h> |
| 238 | 238 | ||
| 239 | static void __devinit quirk_cirrus_ram_size(struct pci_dev *dev) | 239 | static void quirk_cirrus_ram_size(struct pci_dev *dev) |
| 240 | { | 240 | { |
| 241 | u16 cmd; | 241 | u16 cmd; |
| 242 | 242 | ||
diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c index b14ee53581a9..ce8f8b9b930c 100644 --- a/arch/mips/txx9/generic/pci.c +++ b/arch/mips/txx9/generic/pci.c | |||
| @@ -256,8 +256,7 @@ static irqreturn_t i8259_interrupt(int irq, void *dev_id) | |||
| 256 | return IRQ_HANDLED; | 256 | return IRQ_HANDLED; |
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | static int __devinit | 259 | static int txx9_i8259_irq_setup(int irq) |
| 260 | txx9_i8259_irq_setup(int irq) | ||
| 261 | { | 260 | { |
| 262 | int err; | 261 | int err; |
| 263 | 262 | ||
| @@ -269,7 +268,7 @@ txx9_i8259_irq_setup(int irq) | |||
| 269 | return err; | 268 | return err; |
| 270 | } | 269 | } |
| 271 | 270 | ||
| 272 | static void __devinit quirk_slc90e66_bridge(struct pci_dev *dev) | 271 | static void quirk_slc90e66_bridge(struct pci_dev *dev) |
| 273 | { | 272 | { |
| 274 | int irq; /* PCI/ISA Bridge interrupt */ | 273 | int irq; /* PCI/ISA Bridge interrupt */ |
| 275 | u8 reg_64; | 274 | u8 reg_64; |
| @@ -304,7 +303,7 @@ static void __devinit quirk_slc90e66_bridge(struct pci_dev *dev) | |||
| 304 | smsc_fdc37m81x_config_end(); | 303 | smsc_fdc37m81x_config_end(); |
| 305 | } | 304 | } |
| 306 | 305 | ||
| 307 | static void __devinit quirk_slc90e66_ide(struct pci_dev *dev) | 306 | static void quirk_slc90e66_ide(struct pci_dev *dev) |
| 308 | { | 307 | { |
| 309 | unsigned char dat; | 308 | unsigned char dat; |
| 310 | int regs[2] = {0x41, 0x43}; | 309 | int regs[2] = {0x41, 0x43}; |
| @@ -339,7 +338,7 @@ static void __devinit quirk_slc90e66_ide(struct pci_dev *dev) | |||
| 339 | } | 338 | } |
| 340 | #endif /* CONFIG_TOSHIBA_FPCIB0 */ | 339 | #endif /* CONFIG_TOSHIBA_FPCIB0 */ |
| 341 | 340 | ||
| 342 | static void __devinit tc35815_fixup(struct pci_dev *dev) | 341 | static void tc35815_fixup(struct pci_dev *dev) |
| 343 | { | 342 | { |
| 344 | /* This device may have PM registers but not they are not supported. */ | 343 | /* This device may have PM registers but not they are not supported. */ |
| 345 | if (dev->pm_cap) { | 344 | if (dev->pm_cap) { |
| @@ -348,7 +347,7 @@ static void __devinit tc35815_fixup(struct pci_dev *dev) | |||
| 348 | } | 347 | } |
| 349 | } | 348 | } |
| 350 | 349 | ||
| 351 | static void __devinit final_fixup(struct pci_dev *dev) | 350 | static void final_fixup(struct pci_dev *dev) |
| 352 | { | 351 | { |
| 353 | unsigned char bist; | 352 | unsigned char bist; |
| 354 | 353 | ||
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig index aa03f2e13385..e70001cfa05b 100644 --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig | |||
| @@ -6,6 +6,7 @@ config MN10300 | |||
| 6 | select ARCH_WANT_IPC_PARSE_VERSION | 6 | select ARCH_WANT_IPC_PARSE_VERSION |
| 7 | select HAVE_ARCH_TRACEHOOK | 7 | select HAVE_ARCH_TRACEHOOK |
| 8 | select HAVE_ARCH_KGDB | 8 | select HAVE_ARCH_KGDB |
| 9 | select GENERIC_ATOMIC64 | ||
| 9 | select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER | 10 | select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER |
| 10 | select GENERIC_CLOCKEVENTS | 11 | select GENERIC_CLOCKEVENTS |
| 11 | select MODULES_USE_ELF_RELA | 12 | select MODULES_USE_ELF_RELA |
diff --git a/arch/mn10300/kernel/smp.c b/arch/mn10300/kernel/smp.c index 95983cd21e77..5d7e152a23b7 100644 --- a/arch/mn10300/kernel/smp.c +++ b/arch/mn10300/kernel/smp.c | |||
| @@ -905,7 +905,7 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
| 905 | * Set up the cpu_online_mask, cpu_callout_map and cpu_callin_map of the boot | 905 | * Set up the cpu_online_mask, cpu_callout_map and cpu_callin_map of the boot |
| 906 | * processor (CPU 0). | 906 | * processor (CPU 0). |
| 907 | */ | 907 | */ |
| 908 | void __devinit smp_prepare_boot_cpu(void) | 908 | void smp_prepare_boot_cpu(void) |
| 909 | { | 909 | { |
| 910 | cpumask_set_cpu(0, &cpu_callout_map); | 910 | cpumask_set_cpu(0, &cpu_callout_map); |
| 911 | cpumask_set_cpu(0, &cpu_callin_map); | 911 | cpumask_set_cpu(0, &cpu_callin_map); |
| @@ -930,7 +930,7 @@ void initialize_secondary(void) | |||
| 930 | * __cpu_up - Set smp_commenced_mask for the nominated CPU | 930 | * __cpu_up - Set smp_commenced_mask for the nominated CPU |
| 931 | * @cpu: The target CPU. | 931 | * @cpu: The target CPU. |
| 932 | */ | 932 | */ |
| 933 | int __devinit __cpu_up(unsigned int cpu, struct task_struct *tidle) | 933 | int __cpu_up(unsigned int cpu, struct task_struct *tidle) |
| 934 | { | 934 | { |
| 935 | int timeout; | 935 | int timeout; |
| 936 | 936 | ||
diff --git a/arch/mn10300/unit-asb2305/pci.c b/arch/mn10300/unit-asb2305/pci.c index e2059486d3f8..6911e845b8cd 100644 --- a/arch/mn10300/unit-asb2305/pci.c +++ b/arch/mn10300/unit-asb2305/pci.c | |||
| @@ -282,7 +282,7 @@ static int __init pci_check_direct(void) | |||
| 282 | return -ENODEV; | 282 | return -ENODEV; |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | static int __devinit is_valid_resource(struct pci_dev *dev, int idx) | 285 | static int is_valid_resource(struct pci_dev *dev, int idx) |
| 286 | { | 286 | { |
| 287 | unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM; | 287 | unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM; |
| 288 | struct resource *devr = &dev->resource[idx], *busr; | 288 | struct resource *devr = &dev->resource[idx], *busr; |
| @@ -302,7 +302,7 @@ static int __devinit is_valid_resource(struct pci_dev *dev, int idx) | |||
| 302 | return 0; | 302 | return 0; |
| 303 | } | 303 | } |
| 304 | 304 | ||
| 305 | static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) | 305 | static void pcibios_fixup_device_resources(struct pci_dev *dev) |
| 306 | { | 306 | { |
| 307 | int limit, i; | 307 | int limit, i; |
| 308 | 308 | ||
| @@ -325,7 +325,7 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) | |||
| 325 | * Called after each bus is probed, but before its children | 325 | * Called after each bus is probed, but before its children |
| 326 | * are examined. | 326 | * are examined. |
| 327 | */ | 327 | */ |
| 328 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) | 328 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 329 | { | 329 | { |
| 330 | struct pci_dev *dev; | 330 | struct pci_dev *dev; |
| 331 | 331 | ||
diff --git a/arch/openrisc/lib/delay.c b/arch/openrisc/lib/delay.c index c330767c9217..c82b09f4a106 100644 --- a/arch/openrisc/lib/delay.c +++ b/arch/openrisc/lib/delay.c | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | #include <asm/timex.h> | 22 | #include <asm/timex.h> |
| 23 | #include <asm/processor.h> | 23 | #include <asm/processor.h> |
| 24 | 24 | ||
| 25 | int __devinit read_current_timer(unsigned long *timer_value) | 25 | int read_current_timer(unsigned long *timer_value) |
| 26 | { | 26 | { |
| 27 | *timer_value = mfspr(SPR_TTCR); | 27 | *timer_value = mfspr(SPR_TTCR); |
| 28 | return 0; | 28 | return 0; |
diff --git a/arch/parisc/include/asm/parport.h b/arch/parisc/include/asm/parport.h index 00d9cc3e7b97..c391d7cbc223 100644 --- a/arch/parisc/include/asm/parport.h +++ b/arch/parisc/include/asm/parport.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #define _ASM_PARPORT_H 1 | 8 | #define _ASM_PARPORT_H 1 |
| 9 | 9 | ||
| 10 | 10 | ||
| 11 | static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) | 11 | static int parport_pc_find_nonpci_ports (int autoirq, int autodma) |
| 12 | { | 12 | { |
| 13 | /* nothing ! */ | 13 | /* nothing ! */ |
| 14 | return 0; | 14 | return 0; |
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c index f48a640b55fb..f7752f6af29e 100644 --- a/arch/parisc/kernel/hardware.c +++ b/arch/parisc/kernel/hardware.c | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | * so don't reference this table after starting the init process | 38 | * so don't reference this table after starting the init process |
| 39 | */ | 39 | */ |
| 40 | 40 | ||
| 41 | static struct hp_hardware hp_hardware_list[] __devinitdata = { | 41 | static struct hp_hardware hp_hardware_list[] = { |
| 42 | {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"}, | 42 | {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"}, |
| 43 | {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"}, | 43 | {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"}, |
| 44 | {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"}, | 44 | {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"}, |
| @@ -1230,7 +1230,7 @@ static struct hp_cpu_type_mask { | |||
| 1230 | unsigned short model; | 1230 | unsigned short model; |
| 1231 | unsigned short mask; | 1231 | unsigned short mask; |
| 1232 | enum cpu_type cpu; | 1232 | enum cpu_type cpu; |
| 1233 | } hp_cpu_type_mask_list[] __devinitdata = { | 1233 | } hp_cpu_type_mask_list[] = { |
| 1234 | 1234 | ||
| 1235 | { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */ | 1235 | { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */ |
| 1236 | { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */ | 1236 | { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */ |
| @@ -1327,8 +1327,7 @@ const char * const cpu_name_version[][2] = { | |||
| 1327 | [mako2] = { "PA8900 (Shortfin)", "2.0" } | 1327 | [mako2] = { "PA8900 (Shortfin)", "2.0" } |
| 1328 | }; | 1328 | }; |
| 1329 | 1329 | ||
| 1330 | const char * __devinit | 1330 | const char *parisc_hardware_description(struct parisc_device_id *id) |
| 1331 | parisc_hardware_description(struct parisc_device_id *id) | ||
| 1332 | { | 1331 | { |
| 1333 | struct hp_hardware *listptr; | 1332 | struct hp_hardware *listptr; |
| 1334 | 1333 | ||
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h index b0ef73882b38..a8fb03e22770 100644 --- a/arch/powerpc/include/asm/eeh.h +++ b/arch/powerpc/include/asm/eeh.h | |||
| @@ -183,7 +183,7 @@ static inline void eeh_unlock(void) | |||
| 183 | #define EEH_MAX_ALLOWED_FREEZES 5 | 183 | #define EEH_MAX_ALLOWED_FREEZES 5 |
| 184 | 184 | ||
| 185 | typedef void *(*eeh_traverse_func)(void *data, void *flag); | 185 | typedef void *(*eeh_traverse_func)(void *data, void *flag); |
| 186 | int __devinit eeh_phb_pe_create(struct pci_controller *phb); | 186 | int eeh_phb_pe_create(struct pci_controller *phb); |
| 187 | int eeh_add_to_parent_pe(struct eeh_dev *edev); | 187 | int eeh_add_to_parent_pe(struct eeh_dev *edev); |
| 188 | int eeh_rmv_from_parent_pe(struct eeh_dev *edev, int purge_pe); | 188 | int eeh_rmv_from_parent_pe(struct eeh_dev *edev, int purge_pe); |
| 189 | void *eeh_pe_dev_traverse(struct eeh_pe *root, | 189 | void *eeh_pe_dev_traverse(struct eeh_pe *root, |
| @@ -191,8 +191,8 @@ void *eeh_pe_dev_traverse(struct eeh_pe *root, | |||
| 191 | void eeh_pe_restore_bars(struct eeh_pe *pe); | 191 | void eeh_pe_restore_bars(struct eeh_pe *pe); |
| 192 | struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe); | 192 | struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe); |
| 193 | 193 | ||
| 194 | void * __devinit eeh_dev_init(struct device_node *dn, void *data); | 194 | void *eeh_dev_init(struct device_node *dn, void *data); |
| 195 | void __devinit eeh_dev_phb_init_dynamic(struct pci_controller *phb); | 195 | void eeh_dev_phb_init_dynamic(struct pci_controller *phb); |
| 196 | int __init eeh_ops_register(struct eeh_ops *ops); | 196 | int __init eeh_ops_register(struct eeh_ops *ops); |
| 197 | int __exit eeh_ops_unregister(const char *name); | 197 | int __exit eeh_ops_unregister(const char *name); |
| 198 | unsigned long eeh_check_failure(const volatile void __iomem *token, | 198 | unsigned long eeh_check_failure(const volatile void __iomem *token, |
diff --git a/arch/powerpc/include/asm/io-workarounds.h b/arch/powerpc/include/asm/io-workarounds.h index fbae49286926..f96dd096ff4e 100644 --- a/arch/powerpc/include/asm/io-workarounds.h +++ b/arch/powerpc/include/asm/io-workarounds.h | |||
| @@ -31,8 +31,8 @@ struct iowa_bus { | |||
| 31 | void *private; | 31 | void *private; |
| 32 | }; | 32 | }; |
| 33 | 33 | ||
| 34 | void __devinit iowa_register_bus(struct pci_controller *, struct ppc_pci_io *, | 34 | void iowa_register_bus(struct pci_controller *, struct ppc_pci_io *, |
| 35 | int (*)(struct iowa_bus *, void *), void *); | 35 | int (*)(struct iowa_bus *, void *), void *); |
| 36 | struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR); | 36 | struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR); |
| 37 | struct iowa_bus *iowa_pio_find_bus(unsigned long); | 37 | struct iowa_bus *iowa_pio_find_bus(unsigned long); |
| 38 | 38 | ||
diff --git a/arch/powerpc/include/asm/parport.h b/arch/powerpc/include/asm/parport.h index 1ca1102b4a2f..6dc2577932b1 100644 --- a/arch/powerpc/include/asm/parport.h +++ b/arch/powerpc/include/asm/parport.h | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | #include <asm/prom.h> | 13 | #include <asm/prom.h> |
| 14 | 14 | ||
| 15 | static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) | 15 | static int parport_pc_find_nonpci_ports (int autoirq, int autodma) |
| 16 | { | 16 | { |
| 17 | struct device_node *np; | 17 | struct device_node *np; |
| 18 | const u32 *prop; | 18 | const u32 *prop; |
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h index 5a4e437c238d..195ce2ac5691 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h | |||
| @@ -54,8 +54,8 @@ struct smp_ops_t { | |||
| 54 | 54 | ||
| 55 | extern void smp_send_debugger_break(void); | 55 | extern void smp_send_debugger_break(void); |
| 56 | extern void start_secondary_resume(void); | 56 | extern void start_secondary_resume(void); |
| 57 | extern void __devinit smp_generic_give_timebase(void); | 57 | extern void smp_generic_give_timebase(void); |
| 58 | extern void __devinit smp_generic_take_timebase(void); | 58 | extern void smp_generic_take_timebase(void); |
| 59 | 59 | ||
| 60 | DECLARE_PER_CPU(unsigned int, cpu_pvr); | 60 | DECLARE_PER_CPU(unsigned int, cpu_pvr); |
| 61 | 61 | ||
diff --git a/arch/powerpc/include/asm/vio.h b/arch/powerpc/include/asm/vio.h index df81cb72d1e0..68d0cc998b1b 100644 --- a/arch/powerpc/include/asm/vio.h +++ b/arch/powerpc/include/asm/vio.h | |||
| @@ -139,7 +139,7 @@ extern void vio_unregister_driver(struct vio_driver *drv); | |||
| 139 | extern int vio_cmo_entitlement_update(size_t); | 139 | extern int vio_cmo_entitlement_update(size_t); |
| 140 | extern void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired); | 140 | extern void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired); |
| 141 | 141 | ||
| 142 | extern void __devinit vio_unregister_device(struct vio_dev *dev); | 142 | extern void vio_unregister_device(struct vio_dev *dev); |
| 143 | 143 | ||
| 144 | extern int vio_h_cop_sync(struct vio_dev *vdev, struct vio_pfo_op *op); | 144 | extern int vio_h_cop_sync(struct vio_dev *vdev, struct vio_pfo_op *op); |
| 145 | 145 | ||
diff --git a/arch/powerpc/include/uapi/asm/kvm_para.h b/arch/powerpc/include/uapi/asm/kvm_para.h index ed0e0254b47f..e3af3286a068 100644 --- a/arch/powerpc/include/uapi/asm/kvm_para.h +++ b/arch/powerpc/include/uapi/asm/kvm_para.h | |||
| @@ -78,7 +78,7 @@ struct kvm_vcpu_arch_shared { | |||
| 78 | 78 | ||
| 79 | #define KVM_HCALL_TOKEN(num) _EV_HCALL_TOKEN(EV_KVM_VENDOR_ID, num) | 79 | #define KVM_HCALL_TOKEN(num) _EV_HCALL_TOKEN(EV_KVM_VENDOR_ID, num) |
| 80 | 80 | ||
| 81 | #include <uapi/asm/epapr_hcalls.h> | 81 | #include <asm/epapr_hcalls.h> |
| 82 | 82 | ||
| 83 | #define KVM_FEATURE_MAGIC_PAGE 1 | 83 | #define KVM_FEATURE_MAGIC_PAGE 1 |
| 84 | 84 | ||
diff --git a/arch/powerpc/kernel/io-workarounds.c b/arch/powerpc/kernel/io-workarounds.c index 12d329bcbb98..50e90b7e7139 100644 --- a/arch/powerpc/kernel/io-workarounds.c +++ b/arch/powerpc/kernel/io-workarounds.c | |||
| @@ -118,7 +118,7 @@ static void iowa_##name at \ | |||
| 118 | #undef DEF_PCI_AC_RET | 118 | #undef DEF_PCI_AC_RET |
| 119 | #undef DEF_PCI_AC_NORET | 119 | #undef DEF_PCI_AC_NORET |
| 120 | 120 | ||
| 121 | static const struct ppc_pci_io __devinitconst iowa_pci_io = { | 121 | static const struct ppc_pci_io iowa_pci_io = { |
| 122 | 122 | ||
| 123 | #define DEF_PCI_AC_RET(name, ret, at, al, space, aa) .name = iowa_##name, | 123 | #define DEF_PCI_AC_RET(name, ret, at, al, space, aa) .name = iowa_##name, |
| 124 | #define DEF_PCI_AC_NORET(name, at, al, space, aa) .name = iowa_##name, | 124 | #define DEF_PCI_AC_NORET(name, at, al, space, aa) .name = iowa_##name, |
| @@ -146,7 +146,7 @@ static void __iomem *iowa_ioremap(phys_addr_t addr, unsigned long size, | |||
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | /* Enable IO workaround */ | 148 | /* Enable IO workaround */ |
| 149 | static void __devinit io_workaround_init(void) | 149 | static void io_workaround_init(void) |
| 150 | { | 150 | { |
| 151 | static int io_workaround_inited; | 151 | static int io_workaround_inited; |
| 152 | 152 | ||
| @@ -158,9 +158,8 @@ static void __devinit io_workaround_init(void) | |||
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | /* Register new bus to support workaround */ | 160 | /* Register new bus to support workaround */ |
| 161 | void __devinit iowa_register_bus(struct pci_controller *phb, | 161 | void iowa_register_bus(struct pci_controller *phb, struct ppc_pci_io *ops, |
| 162 | struct ppc_pci_io *ops, | 162 | int (*initfunc)(struct iowa_bus *, void *), void *data) |
| 163 | int (*initfunc)(struct iowa_bus *, void *), void *data) | ||
| 164 | { | 163 | { |
| 165 | struct iowa_bus *bus; | 164 | struct iowa_bus *bus; |
| 166 | struct device_node *np = phb->dn; | 165 | struct device_node *np = phb->dn; |
diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c index d45ec58703ce..0f1997097960 100644 --- a/arch/powerpc/kernel/isa-bridge.c +++ b/arch/powerpc/kernel/isa-bridge.c | |||
| @@ -41,8 +41,8 @@ EXPORT_SYMBOL_GPL(isa_bridge_pcidev); | |||
| 41 | #define ISA_SPACE_MASK 0x1 | 41 | #define ISA_SPACE_MASK 0x1 |
| 42 | #define ISA_SPACE_IO 0x1 | 42 | #define ISA_SPACE_IO 0x1 |
| 43 | 43 | ||
| 44 | static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node, | 44 | static void pci_process_ISA_OF_ranges(struct device_node *isa_node, |
| 45 | unsigned long phb_io_base_phys) | 45 | unsigned long phb_io_base_phys) |
| 46 | { | 46 | { |
| 47 | /* We should get some saner parsing here and remove these structs */ | 47 | /* We should get some saner parsing here and remove these structs */ |
| 48 | struct pci_address { | 48 | struct pci_address { |
| @@ -170,8 +170,8 @@ void __init isa_bridge_find_early(struct pci_controller *hose) | |||
| 170 | * isa_bridge_find_late - Find and map the ISA IO space upon discovery of | 170 | * isa_bridge_find_late - Find and map the ISA IO space upon discovery of |
| 171 | * a new ISA bridge | 171 | * a new ISA bridge |
| 172 | */ | 172 | */ |
| 173 | static void __devinit isa_bridge_find_late(struct pci_dev *pdev, | 173 | static void isa_bridge_find_late(struct pci_dev *pdev, |
| 174 | struct device_node *devnode) | 174 | struct device_node *devnode) |
| 175 | { | 175 | { |
| 176 | struct pci_controller *hose = pci_bus_to_host(pdev->bus); | 176 | struct pci_controller *hose = pci_bus_to_host(pdev->bus); |
| 177 | 177 | ||
| @@ -215,8 +215,8 @@ static void isa_bridge_remove(void) | |||
| 215 | /** | 215 | /** |
| 216 | * isa_bridge_notify - Get notified of PCI devices addition/removal | 216 | * isa_bridge_notify - Get notified of PCI devices addition/removal |
| 217 | */ | 217 | */ |
| 218 | static int __devinit isa_bridge_notify(struct notifier_block *nb, | 218 | static int isa_bridge_notify(struct notifier_block *nb, unsigned long action, |
| 219 | unsigned long action, void *data) | 219 | void *data) |
| 220 | { | 220 | { |
| 221 | struct device *dev = data; | 221 | struct device *dev = data; |
| 222 | struct pci_dev *pdev = to_pci_dev(dev); | 222 | struct pci_dev *pdev = to_pci_dev(dev); |
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index 9db8ec07ec94..07c12697d708 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | * lacking some bits needed here. | 37 | * lacking some bits needed here. |
| 38 | */ | 38 | */ |
| 39 | 39 | ||
| 40 | static int __devinit of_pci_phb_probe(struct platform_device *dev) | 40 | static int of_pci_phb_probe(struct platform_device *dev) |
| 41 | { | 41 | { |
| 42 | struct pci_controller *phb; | 42 | struct pci_controller *phb; |
| 43 | 43 | ||
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index abc0d0856994..7c37379ea9b1 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
| @@ -673,9 +673,8 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar, | |||
| 673 | * - Some 32 bits platforms such as 4xx can have physical space larger than | 673 | * - Some 32 bits platforms such as 4xx can have physical space larger than |
| 674 | * 32 bits so we need to use 64 bits values for the parsing | 674 | * 32 bits so we need to use 64 bits values for the parsing |
| 675 | */ | 675 | */ |
| 676 | void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, | 676 | void pci_process_bridge_OF_ranges(struct pci_controller *hose, |
| 677 | struct device_node *dev, | 677 | struct device_node *dev, int primary) |
| 678 | int primary) | ||
| 679 | { | 678 | { |
| 680 | const u32 *ranges; | 679 | const u32 *ranges; |
| 681 | int rlen; | 680 | int rlen; |
| @@ -848,7 +847,7 @@ int pci_proc_domain(struct pci_bus *bus) | |||
| 848 | /* This header fixup will do the resource fixup for all devices as they are | 847 | /* This header fixup will do the resource fixup for all devices as they are |
| 849 | * probed, but not for bridge ranges | 848 | * probed, but not for bridge ranges |
| 850 | */ | 849 | */ |
| 851 | static void __devinit pcibios_fixup_resources(struct pci_dev *dev) | 850 | static void pcibios_fixup_resources(struct pci_dev *dev) |
| 852 | { | 851 | { |
| 853 | struct pci_controller *hose = pci_bus_to_host(dev->bus); | 852 | struct pci_controller *hose = pci_bus_to_host(dev->bus); |
| 854 | int i; | 853 | int i; |
| @@ -902,8 +901,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources); | |||
| 902 | * things go more smoothly when it gets it right. It should covers cases such | 901 | * things go more smoothly when it gets it right. It should covers cases such |
| 903 | * as Apple "closed" bridge resources and bare-metal pSeries unassigned bridges | 902 | * as Apple "closed" bridge resources and bare-metal pSeries unassigned bridges |
| 904 | */ | 903 | */ |
| 905 | static int __devinit pcibios_uninitialized_bridge_resource(struct pci_bus *bus, | 904 | static int pcibios_uninitialized_bridge_resource(struct pci_bus *bus, |
| 906 | struct resource *res) | 905 | struct resource *res) |
| 907 | { | 906 | { |
| 908 | struct pci_controller *hose = pci_bus_to_host(bus); | 907 | struct pci_controller *hose = pci_bus_to_host(bus); |
| 909 | struct pci_dev *dev = bus->self; | 908 | struct pci_dev *dev = bus->self; |
| @@ -967,7 +966,7 @@ static int __devinit pcibios_uninitialized_bridge_resource(struct pci_bus *bus, | |||
| 967 | } | 966 | } |
| 968 | 967 | ||
| 969 | /* Fixup resources of a PCI<->PCI bridge */ | 968 | /* Fixup resources of a PCI<->PCI bridge */ |
| 970 | static void __devinit pcibios_fixup_bridge(struct pci_bus *bus) | 969 | static void pcibios_fixup_bridge(struct pci_bus *bus) |
| 971 | { | 970 | { |
| 972 | struct resource *res; | 971 | struct resource *res; |
| 973 | int i; | 972 | int i; |
| @@ -1007,7 +1006,7 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus) | |||
| 1007 | } | 1006 | } |
| 1008 | } | 1007 | } |
| 1009 | 1008 | ||
| 1010 | void __devinit pcibios_setup_bus_self(struct pci_bus *bus) | 1009 | void pcibios_setup_bus_self(struct pci_bus *bus) |
| 1011 | { | 1010 | { |
| 1012 | /* Fix up the bus resources for P2P bridges */ | 1011 | /* Fix up the bus resources for P2P bridges */ |
| 1013 | if (bus->self != NULL) | 1012 | if (bus->self != NULL) |
| @@ -1024,7 +1023,7 @@ void __devinit pcibios_setup_bus_self(struct pci_bus *bus) | |||
| 1024 | ppc_md.pci_dma_bus_setup(bus); | 1023 | ppc_md.pci_dma_bus_setup(bus); |
| 1025 | } | 1024 | } |
| 1026 | 1025 | ||
| 1027 | void __devinit pcibios_setup_bus_devices(struct pci_bus *bus) | 1026 | void pcibios_setup_bus_devices(struct pci_bus *bus) |
| 1028 | { | 1027 | { |
| 1029 | struct pci_dev *dev; | 1028 | struct pci_dev *dev; |
| 1030 | 1029 | ||
| @@ -1063,7 +1062,7 @@ void pcibios_set_master(struct pci_dev *dev) | |||
| 1063 | /* No special bus mastering setup handling */ | 1062 | /* No special bus mastering setup handling */ |
| 1064 | } | 1063 | } |
| 1065 | 1064 | ||
| 1066 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) | 1065 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 1067 | { | 1066 | { |
| 1068 | /* When called from the generic PCI probe, read PCI<->PCI bridge | 1067 | /* When called from the generic PCI probe, read PCI<->PCI bridge |
| 1069 | * bases. This is -not- called when generating the PCI tree from | 1068 | * bases. This is -not- called when generating the PCI tree from |
| @@ -1080,7 +1079,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) | |||
| 1080 | } | 1079 | } |
| 1081 | EXPORT_SYMBOL(pcibios_fixup_bus); | 1080 | EXPORT_SYMBOL(pcibios_fixup_bus); |
| 1082 | 1081 | ||
| 1083 | void __devinit pci_fixup_cardbus(struct pci_bus *bus) | 1082 | void pci_fixup_cardbus(struct pci_bus *bus) |
| 1084 | { | 1083 | { |
| 1085 | /* Now fixup devices on that bus */ | 1084 | /* Now fixup devices on that bus */ |
| 1086 | pcibios_setup_bus_devices(bus); | 1085 | pcibios_setup_bus_devices(bus); |
| @@ -1264,7 +1263,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus) | |||
| 1264 | pcibios_allocate_bus_resources(b); | 1263 | pcibios_allocate_bus_resources(b); |
| 1265 | } | 1264 | } |
| 1266 | 1265 | ||
| 1267 | static inline void __devinit alloc_resource(struct pci_dev *dev, int idx) | 1266 | static inline void alloc_resource(struct pci_dev *dev, int idx) |
| 1268 | { | 1267 | { |
| 1269 | struct resource *pr, *r = &dev->resource[idx]; | 1268 | struct resource *pr, *r = &dev->resource[idx]; |
| 1270 | 1269 | ||
| @@ -1500,7 +1499,8 @@ resource_size_t pcibios_io_space_offset(struct pci_controller *hose) | |||
| 1500 | return (unsigned long) hose->io_base_virt - _IO_BASE; | 1499 | return (unsigned long) hose->io_base_virt - _IO_BASE; |
| 1501 | } | 1500 | } |
| 1502 | 1501 | ||
| 1503 | static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, struct list_head *resources) | 1502 | static void pcibios_setup_phb_resources(struct pci_controller *hose, |
| 1503 | struct list_head *resources) | ||
| 1504 | { | 1504 | { |
| 1505 | struct resource *res; | 1505 | struct resource *res; |
| 1506 | int i; | 1506 | int i; |
| @@ -1639,7 +1639,7 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus) | |||
| 1639 | * pci_scan_phb - Given a pci_controller, setup and scan the PCI bus | 1639 | * pci_scan_phb - Given a pci_controller, setup and scan the PCI bus |
| 1640 | * @hose: Pointer to the PCI host controller instance structure | 1640 | * @hose: Pointer to the PCI host controller instance structure |
| 1641 | */ | 1641 | */ |
| 1642 | void __devinit pcibios_scan_phb(struct pci_controller *hose) | 1642 | void pcibios_scan_phb(struct pci_controller *hose) |
| 1643 | { | 1643 | { |
| 1644 | LIST_HEAD(resources); | 1644 | LIST_HEAD(resources); |
| 1645 | struct pci_bus *bus; | 1645 | struct pci_bus *bus; |
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 64f526a321f5..e37c2152acf4 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
| @@ -213,7 +213,7 @@ pci_create_OF_bus_map(void) | |||
| 213 | } | 213 | } |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | void __devinit pcibios_setup_phb_io_space(struct pci_controller *hose) | 216 | void pcibios_setup_phb_io_space(struct pci_controller *hose) |
| 217 | { | 217 | { |
| 218 | unsigned long io_offset; | 218 | unsigned long io_offset; |
| 219 | struct resource *res = &hose->io_resource; | 219 | struct resource *res = &hose->io_resource; |
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 2cbe6768fddd..51a133a78a09 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
| @@ -122,7 +122,7 @@ int pcibios_unmap_io_space(struct pci_bus *bus) | |||
| 122 | } | 122 | } |
| 123 | EXPORT_SYMBOL_GPL(pcibios_unmap_io_space); | 123 | EXPORT_SYMBOL_GPL(pcibios_unmap_io_space); |
| 124 | 124 | ||
| 125 | static int __devinit pcibios_map_phb_io_space(struct pci_controller *hose) | 125 | static int pcibios_map_phb_io_space(struct pci_controller *hose) |
| 126 | { | 126 | { |
| 127 | struct vm_struct *area; | 127 | struct vm_struct *area; |
| 128 | unsigned long phys_page; | 128 | unsigned long phys_page; |
| @@ -173,7 +173,7 @@ static int __devinit pcibios_map_phb_io_space(struct pci_controller *hose) | |||
| 173 | return 0; | 173 | return 0; |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | int __devinit pcibios_map_io_space(struct pci_bus *bus) | 176 | int pcibios_map_io_space(struct pci_bus *bus) |
| 177 | { | 177 | { |
| 178 | WARN_ON(bus == NULL); | 178 | WARN_ON(bus == NULL); |
| 179 | 179 | ||
| @@ -193,7 +193,7 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus) | |||
| 193 | } | 193 | } |
| 194 | EXPORT_SYMBOL_GPL(pcibios_map_io_space); | 194 | EXPORT_SYMBOL_GPL(pcibios_map_io_space); |
| 195 | 195 | ||
| 196 | void __devinit pcibios_setup_phb_io_space(struct pci_controller *hose) | 196 | void pcibios_setup_phb_io_space(struct pci_controller *hose) |
| 197 | { | 197 | { |
| 198 | pcibios_map_phb_io_space(hose); | 198 | pcibios_map_phb_io_space(hose); |
| 199 | } | 199 | } |
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c index dd9e4a04bf79..e7af165f8b9d 100644 --- a/arch/powerpc/kernel/pci_dn.c +++ b/arch/powerpc/kernel/pci_dn.c | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | * Traverse_func that inits the PCI fields of the device node. | 36 | * Traverse_func that inits the PCI fields of the device node. |
| 37 | * NOTE: this *must* be done before read/write config to the device. | 37 | * NOTE: this *must* be done before read/write config to the device. |
| 38 | */ | 38 | */ |
| 39 | void * __devinit update_dn_pci_info(struct device_node *dn, void *data) | 39 | void *update_dn_pci_info(struct device_node *dn, void *data) |
| 40 | { | 40 | { |
| 41 | struct pci_controller *phb = data; | 41 | struct pci_controller *phb = data; |
| 42 | const int *type = | 42 | const int *type = |
| @@ -129,7 +129,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre, | |||
| 129 | * subsystem is set up, before kmalloc is valid) and during the | 129 | * subsystem is set up, before kmalloc is valid) and during the |
| 130 | * dynamic lpar operation of adding a PHB to a running system. | 130 | * dynamic lpar operation of adding a PHB to a running system. |
| 131 | */ | 131 | */ |
| 132 | void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb) | 132 | void pci_devs_phb_init_dynamic(struct pci_controller *phb) |
| 133 | { | 133 | { |
| 134 | struct device_node *dn = phb->dn; | 134 | struct device_node *dn = phb->dn; |
| 135 | struct pci_dn *pdn; | 135 | struct pci_dn *pdn; |
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c index 30378a19f65d..2a67e9baa59f 100644 --- a/arch/powerpc/kernel/pci_of_scan.c +++ b/arch/powerpc/kernel/pci_of_scan.c | |||
| @@ -204,7 +204,7 @@ EXPORT_SYMBOL(of_create_pci_dev); | |||
| 204 | * this routine in turn call of_scan_bus() recusively to scan for more child | 204 | * this routine in turn call of_scan_bus() recusively to scan for more child |
| 205 | * devices. | 205 | * devices. |
| 206 | */ | 206 | */ |
| 207 | void __devinit of_scan_pci_bridge(struct pci_dev *dev) | 207 | void of_scan_pci_bridge(struct pci_dev *dev) |
| 208 | { | 208 | { |
| 209 | struct device_node *node = dev->dev.of_node; | 209 | struct device_node *node = dev->dev.of_node; |
| 210 | struct pci_bus *bus; | 210 | struct pci_bus *bus; |
| @@ -299,8 +299,8 @@ EXPORT_SYMBOL(of_scan_pci_bridge); | |||
| 299 | * @bus: pci_bus structure for the PCI bus | 299 | * @bus: pci_bus structure for the PCI bus |
| 300 | * @rescan_existing: Flag indicating bus has already been set up | 300 | * @rescan_existing: Flag indicating bus has already been set up |
| 301 | */ | 301 | */ |
| 302 | static void __devinit __of_scan_bus(struct device_node *node, | 302 | static void __of_scan_bus(struct device_node *node, struct pci_bus *bus, |
| 303 | struct pci_bus *bus, int rescan_existing) | 303 | int rescan_existing) |
| 304 | { | 304 | { |
| 305 | struct device_node *child; | 305 | struct device_node *child; |
| 306 | const u32 *reg; | 306 | const u32 *reg; |
| @@ -348,8 +348,7 @@ static void __devinit __of_scan_bus(struct device_node *node, | |||
| 348 | * @node: device tree node for the PCI bus | 348 | * @node: device tree node for the PCI bus |
| 349 | * @bus: pci_bus structure for the PCI bus | 349 | * @bus: pci_bus structure for the PCI bus |
| 350 | */ | 350 | */ |
| 351 | void __devinit of_scan_bus(struct device_node *node, | 351 | void of_scan_bus(struct device_node *node, struct pci_bus *bus) |
| 352 | struct pci_bus *bus) | ||
| 353 | { | 352 | { |
| 354 | __of_scan_bus(node, bus, 0); | 353 | __of_scan_bus(node, bus, 0); |
| 355 | } | 354 | } |
| @@ -363,8 +362,7 @@ EXPORT_SYMBOL_GPL(of_scan_bus); | |||
| 363 | * Same as of_scan_bus, but for a pci_bus structure that has already been | 362 | * Same as of_scan_bus, but for a pci_bus structure that has already been |
| 364 | * setup. | 363 | * setup. |
| 365 | */ | 364 | */ |
| 366 | void __devinit of_rescan_bus(struct device_node *node, | 365 | void of_rescan_bus(struct device_node *node, struct pci_bus *bus) |
| 367 | struct pci_bus *bus) | ||
| 368 | { | 366 | { |
| 369 | __of_scan_bus(node, bus, 1); | 367 | __of_scan_bus(node, bus, 1); |
| 370 | } | 368 | } |
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index 6de63e3250bb..71cb20d6ec61 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b/arch/powerpc/kernel/rtas_pci.c | |||
| @@ -209,7 +209,7 @@ void __init init_pci_config_tokens (void) | |||
| 209 | ibm_write_pci_config = rtas_token("ibm,write-pci-config"); | 209 | ibm_write_pci_config = rtas_token("ibm,write-pci-config"); |
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | unsigned long __devinit get_phb_buid (struct device_node *phb) | 212 | unsigned long get_phb_buid (struct device_node *phb) |
| 213 | { | 213 | { |
| 214 | struct resource r; | 214 | struct resource r; |
| 215 | 215 | ||
| @@ -237,7 +237,7 @@ static int phb_set_bus_ranges(struct device_node *dev, | |||
| 237 | return 0; | 237 | return 0; |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | int __devinit rtas_setup_phb(struct pci_controller *phb) | 240 | int rtas_setup_phb(struct pci_controller *phb) |
| 241 | { | 241 | { |
| 242 | struct device_node *dev = phb->dn; | 242 | struct device_node *dev = phb->dn; |
| 243 | 243 | ||
diff --git a/arch/powerpc/kernel/smp-tbsync.c b/arch/powerpc/kernel/smp-tbsync.c index 640de836e466..e68fd1ae727a 100644 --- a/arch/powerpc/kernel/smp-tbsync.c +++ b/arch/powerpc/kernel/smp-tbsync.c | |||
| @@ -36,13 +36,13 @@ static struct { | |||
| 36 | 36 | ||
| 37 | static volatile int running; | 37 | static volatile int running; |
| 38 | 38 | ||
| 39 | static void __devinit enter_contest(u64 mark, long add) | 39 | static void enter_contest(u64 mark, long add) |
| 40 | { | 40 | { |
| 41 | while (get_tb() < mark) | 41 | while (get_tb() < mark) |
| 42 | tbsync->race_result = add; | 42 | tbsync->race_result = add; |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | void __devinit smp_generic_take_timebase(void) | 45 | void smp_generic_take_timebase(void) |
| 46 | { | 46 | { |
| 47 | int cmd; | 47 | int cmd; |
| 48 | u64 tb; | 48 | u64 tb; |
| @@ -75,7 +75,7 @@ void __devinit smp_generic_take_timebase(void) | |||
| 75 | local_irq_restore(flags); | 75 | local_irq_restore(flags); |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | static int __devinit start_contest(int cmd, long offset, int num) | 78 | static int start_contest(int cmd, long offset, int num) |
| 79 | { | 79 | { |
| 80 | int i, score=0; | 80 | int i, score=0; |
| 81 | u64 tb; | 81 | u64 tb; |
| @@ -110,7 +110,7 @@ static int __devinit start_contest(int cmd, long offset, int num) | |||
| 110 | return score; | 110 | return score; |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | void __devinit smp_generic_give_timebase(void) | 113 | void smp_generic_give_timebase(void) |
| 114 | { | 114 | { |
| 115 | int i, score, score2, old, min=0, max=5000, offset=1000; | 115 | int i, score, score2, old, min=0, max=5000, offset=1000; |
| 116 | 116 | ||
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index e5b133ebd8a5..793401e65088 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
| @@ -82,7 +82,7 @@ int smt_enabled_at_boot = 1; | |||
| 82 | static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL; | 82 | static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL; |
| 83 | 83 | ||
| 84 | #ifdef CONFIG_PPC64 | 84 | #ifdef CONFIG_PPC64 |
| 85 | int __devinit smp_generic_kick_cpu(int nr) | 85 | int smp_generic_kick_cpu(int nr) |
| 86 | { | 86 | { |
| 87 | BUG_ON(nr < 0 || nr >= NR_CPUS); | 87 | BUG_ON(nr < 0 || nr >= NR_CPUS); |
| 88 | 88 | ||
| @@ -311,7 +311,7 @@ void smp_send_stop(void) | |||
| 311 | 311 | ||
| 312 | struct thread_info *current_set[NR_CPUS]; | 312 | struct thread_info *current_set[NR_CPUS]; |
| 313 | 313 | ||
| 314 | static void __devinit smp_store_cpu_info(int id) | 314 | static void smp_store_cpu_info(int id) |
| 315 | { | 315 | { |
| 316 | per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR); | 316 | per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR); |
| 317 | #ifdef CONFIG_PPC_FSL_BOOK3E | 317 | #ifdef CONFIG_PPC_FSL_BOOK3E |
| @@ -355,7 +355,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
| 355 | max_cpus = 1; | 355 | max_cpus = 1; |
| 356 | } | 356 | } |
| 357 | 357 | ||
| 358 | void __devinit smp_prepare_boot_cpu(void) | 358 | void smp_prepare_boot_cpu(void) |
| 359 | { | 359 | { |
| 360 | BUG_ON(smp_processor_id() != boot_cpuid); | 360 | BUG_ON(smp_processor_id() != boot_cpuid); |
| 361 | #ifdef CONFIG_PPC64 | 361 | #ifdef CONFIG_PPC64 |
| @@ -610,7 +610,7 @@ static struct device_node *cpu_to_l2cache(int cpu) | |||
| 610 | } | 610 | } |
| 611 | 611 | ||
| 612 | /* Activate a secondary processor. */ | 612 | /* Activate a secondary processor. */ |
| 613 | void __devinit start_secondary(void *unused) | 613 | void start_secondary(void *unused) |
| 614 | { | 614 | { |
| 615 | unsigned int cpu = smp_processor_id(); | 615 | unsigned int cpu = smp_processor_id(); |
| 616 | struct device_node *l2_cache; | 616 | struct device_node *l2_cache; |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index b3b14352b05e..6f6b1cccc916 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
| @@ -770,13 +770,8 @@ void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm, | |||
| 770 | 770 | ||
| 771 | void update_vsyscall_tz(void) | 771 | void update_vsyscall_tz(void) |
| 772 | { | 772 | { |
| 773 | /* Make userspace gettimeofday spin until we're done. */ | ||
| 774 | ++vdso_data->tb_update_count; | ||
| 775 | smp_mb(); | ||
| 776 | vdso_data->tz_minuteswest = sys_tz.tz_minuteswest; | 773 | vdso_data->tz_minuteswest = sys_tz.tz_minuteswest; |
| 777 | vdso_data->tz_dsttime = sys_tz.tz_dsttime; | 774 | vdso_data->tz_dsttime = sys_tz.tz_dsttime; |
| 778 | smp_mb(); | ||
| 779 | ++vdso_data->tb_update_count; | ||
| 780 | } | 775 | } |
| 781 | 776 | ||
| 782 | static void __init clocksource_init(void) | 777 | static void __init clocksource_init(void) |
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 201ba59738be..536016d792ba 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
| @@ -1289,7 +1289,7 @@ void vio_unregister_driver(struct vio_driver *viodrv) | |||
| 1289 | EXPORT_SYMBOL(vio_unregister_driver); | 1289 | EXPORT_SYMBOL(vio_unregister_driver); |
| 1290 | 1290 | ||
| 1291 | /* vio_dev refcount hit 0 */ | 1291 | /* vio_dev refcount hit 0 */ |
| 1292 | static void __devinit vio_dev_release(struct device *dev) | 1292 | static void vio_dev_release(struct device *dev) |
| 1293 | { | 1293 | { |
| 1294 | struct iommu_table *tbl = get_iommu_table_base(dev); | 1294 | struct iommu_table *tbl = get_iommu_table_base(dev); |
| 1295 | 1295 | ||
| @@ -1545,7 +1545,7 @@ static struct device_attribute vio_dev_attrs[] = { | |||
| 1545 | __ATTR_NULL | 1545 | __ATTR_NULL |
| 1546 | }; | 1546 | }; |
| 1547 | 1547 | ||
| 1548 | void __devinit vio_unregister_device(struct vio_dev *viodev) | 1548 | void vio_unregister_device(struct vio_dev *viodev) |
| 1549 | { | 1549 | { |
| 1550 | device_unregister(&viodev->dev); | 1550 | device_unregister(&viodev->dev); |
| 1551 | } | 1551 | } |
diff --git a/arch/powerpc/kvm/book3s_hv_ras.c b/arch/powerpc/kvm/book3s_hv_ras.c index 35f3cf0269b3..a353c485808c 100644 --- a/arch/powerpc/kvm/book3s_hv_ras.c +++ b/arch/powerpc/kvm/book3s_hv_ras.c | |||
| @@ -79,7 +79,9 @@ static void flush_tlb_power7(struct kvm_vcpu *vcpu) | |||
| 79 | static long kvmppc_realmode_mc_power7(struct kvm_vcpu *vcpu) | 79 | static long kvmppc_realmode_mc_power7(struct kvm_vcpu *vcpu) |
| 80 | { | 80 | { |
| 81 | unsigned long srr1 = vcpu->arch.shregs.msr; | 81 | unsigned long srr1 = vcpu->arch.shregs.msr; |
| 82 | #ifdef CONFIG_PPC_POWERNV | ||
| 82 | struct opal_machine_check_event *opal_evt; | 83 | struct opal_machine_check_event *opal_evt; |
| 84 | #endif | ||
| 83 | long handled = 1; | 85 | long handled = 1; |
| 84 | 86 | ||
| 85 | if (srr1 & SRR1_MC_LDSTERR) { | 87 | if (srr1 & SRR1_MC_LDSTERR) { |
| @@ -117,6 +119,7 @@ static long kvmppc_realmode_mc_power7(struct kvm_vcpu *vcpu) | |||
| 117 | handled = 0; | 119 | handled = 0; |
| 118 | } | 120 | } |
| 119 | 121 | ||
| 122 | #ifdef CONFIG_PPC_POWERNV | ||
| 120 | /* | 123 | /* |
| 121 | * See if OPAL has already handled the condition. | 124 | * See if OPAL has already handled the condition. |
| 122 | * We assume that if the condition is recovered then OPAL | 125 | * We assume that if the condition is recovered then OPAL |
| @@ -131,6 +134,7 @@ static long kvmppc_realmode_mc_power7(struct kvm_vcpu *vcpu) | |||
| 131 | 134 | ||
| 132 | if (handled) | 135 | if (handled) |
| 133 | opal_evt->in_use = 0; | 136 | opal_evt->in_use = 0; |
| 137 | #endif | ||
| 134 | 138 | ||
| 135 | return handled; | 139 | return handled; |
| 136 | } | 140 | } |
diff --git a/arch/powerpc/mm/tlb_hash64.c b/arch/powerpc/mm/tlb_hash64.c index ae758b3ff72c..0d82ef50dc3f 100644 --- a/arch/powerpc/mm/tlb_hash64.c +++ b/arch/powerpc/mm/tlb_hash64.c | |||
| @@ -186,8 +186,6 @@ void tlb_flush(struct mmu_gather *tlb) | |||
| 186 | * Because of that usage pattern, it's only available with CONFIG_HOTPLUG | 186 | * Because of that usage pattern, it's only available with CONFIG_HOTPLUG |
| 187 | * and is implemented for small size rather than speed. | 187 | * and is implemented for small size rather than speed. |
| 188 | */ | 188 | */ |
| 189 | #ifdef CONFIG_HOTPLUG | ||
| 190 | |||
| 191 | void __flush_hash_table_range(struct mm_struct *mm, unsigned long start, | 189 | void __flush_hash_table_range(struct mm_struct *mm, unsigned long start, |
| 192 | unsigned long end) | 190 | unsigned long end) |
| 193 | { | 191 | { |
| @@ -221,5 +219,3 @@ void __flush_hash_table_range(struct mm_struct *mm, unsigned long start, | |||
| 221 | arch_leave_lazy_mmu_mode(); | 219 | arch_leave_lazy_mmu_mode(); |
| 222 | local_irq_restore(flags); | 220 | local_irq_restore(flags); |
| 223 | } | 221 | } |
| 224 | |||
| 225 | #endif /* CONFIG_HOTPLUG */ | ||
diff --git a/arch/powerpc/platforms/40x/ppc40x_simple.c b/arch/powerpc/platforms/40x/ppc40x_simple.c index 969dddcf3320..8f3920e5a046 100644 --- a/arch/powerpc/platforms/40x/ppc40x_simple.c +++ b/arch/powerpc/platforms/40x/ppc40x_simple.c | |||
| @@ -57,7 +57,8 @@ static const char * const board[] __initconst = { | |||
| 57 | "amcc,makalu", | 57 | "amcc,makalu", |
| 58 | "apm,klondike", | 58 | "apm,klondike", |
| 59 | "est,hotfoot", | 59 | "est,hotfoot", |
| 60 | "plathome,obs600" | 60 | "plathome,obs600", |
| 61 | NULL | ||
| 61 | }; | 62 | }; |
| 62 | 63 | ||
| 63 | static int __init ppc40x_probe(void) | 64 | static int __init ppc40x_probe(void) |
diff --git a/arch/powerpc/platforms/44x/currituck.c b/arch/powerpc/platforms/44x/currituck.c index 6bd89a0e0dea..ecd3890c40d7 100644 --- a/arch/powerpc/platforms/44x/currituck.c +++ b/arch/powerpc/platforms/44x/currituck.c | |||
| @@ -46,7 +46,7 @@ static __initdata struct of_device_id ppc47x_of_bus[] = { | |||
| 46 | 46 | ||
| 47 | /* The EEPROM is missing and the default values are bogus. This forces USB in | 47 | /* The EEPROM is missing and the default values are bogus. This forces USB in |
| 48 | * to EHCI mode */ | 48 | * to EHCI mode */ |
| 49 | static void __devinit quirk_ppc_currituck_usb_fixup(struct pci_dev *dev) | 49 | static void quirk_ppc_currituck_usb_fixup(struct pci_dev *dev) |
| 50 | { | 50 | { |
| 51 | if (of_machine_is_compatible("ibm,currituck")) { | 51 | if (of_machine_is_compatible("ibm,currituck")) { |
| 52 | pci_write_config_dword(dev, 0xe0, 0x0114231f); | 52 | pci_write_config_dword(dev, 0xe0, 0x0114231f); |
diff --git a/arch/powerpc/platforms/44x/virtex_ml510.c b/arch/powerpc/platforms/44x/virtex_ml510.c index ba4a6e388a46..1fdb8748638d 100644 --- a/arch/powerpc/platforms/44x/virtex_ml510.c +++ b/arch/powerpc/platforms/44x/virtex_ml510.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | /** | 5 | /** |
| 6 | * ml510_ail_quirk | 6 | * ml510_ail_quirk |
| 7 | */ | 7 | */ |
| 8 | static void __devinit ml510_ali_quirk(struct pci_dev *dev) | 8 | static void ml510_ali_quirk(struct pci_dev *dev) |
| 9 | { | 9 | { |
| 10 | /* Enable the IDE controller */ | 10 | /* Enable the IDE controller */ |
| 11 | pci_write_config_byte(dev, 0x58, 0x4c); | 11 | pci_write_config_byte(dev, 0x58, 0x4c); |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c index a51cb07bd663..692998244d2c 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c | |||
| @@ -669,7 +669,7 @@ static struct miscdevice mpc52xx_wdt_miscdev = { | |||
| 669 | .fops = &mpc52xx_wdt_fops, | 669 | .fops = &mpc52xx_wdt_fops, |
| 670 | }; | 670 | }; |
| 671 | 671 | ||
| 672 | static int __devinit mpc52xx_gpt_wdt_init(void) | 672 | static int mpc52xx_gpt_wdt_init(void) |
| 673 | { | 673 | { |
| 674 | int err; | 674 | int err; |
| 675 | 675 | ||
| @@ -704,7 +704,7 @@ static int mpc52xx_gpt_wdt_setup(struct mpc52xx_gpt_priv *gpt, | |||
| 704 | 704 | ||
| 705 | #else | 705 | #else |
| 706 | 706 | ||
| 707 | static int __devinit mpc52xx_gpt_wdt_init(void) | 707 | static int mpc52xx_gpt_wdt_init(void) |
| 708 | { | 708 | { |
| 709 | return 0; | 709 | return 0; |
| 710 | } | 710 | } |
| @@ -720,7 +720,7 @@ static inline int mpc52xx_gpt_wdt_setup(struct mpc52xx_gpt_priv *gpt, | |||
| 720 | /* --------------------------------------------------------------------- | 720 | /* --------------------------------------------------------------------- |
| 721 | * of_platform bus binding code | 721 | * of_platform bus binding code |
| 722 | */ | 722 | */ |
| 723 | static int __devinit mpc52xx_gpt_probe(struct platform_device *ofdev) | 723 | static int mpc52xx_gpt_probe(struct platform_device *ofdev) |
| 724 | { | 724 | { |
| 725 | struct mpc52xx_gpt_priv *gpt; | 725 | struct mpc52xx_gpt_priv *gpt; |
| 726 | 726 | ||
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c index 16150fa430f9..f9f4537f546d 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | |||
| @@ -470,7 +470,7 @@ void mpc52xx_lpbfifo_abort(struct mpc52xx_lpbfifo_request *req) | |||
| 470 | } | 470 | } |
| 471 | EXPORT_SYMBOL(mpc52xx_lpbfifo_abort); | 471 | EXPORT_SYMBOL(mpc52xx_lpbfifo_abort); |
| 472 | 472 | ||
| 473 | static int __devinit mpc52xx_lpbfifo_probe(struct platform_device *op) | 473 | static int mpc52xx_lpbfifo_probe(struct platform_device *op) |
| 474 | { | 474 | { |
| 475 | struct resource res; | 475 | struct resource res; |
| 476 | int rc = -ENOMEM; | 476 | int rc = -ENOMEM; |
| @@ -540,7 +540,7 @@ static int __devinit mpc52xx_lpbfifo_probe(struct platform_device *op) | |||
| 540 | } | 540 | } |
| 541 | 541 | ||
| 542 | 542 | ||
| 543 | static int __devexit mpc52xx_lpbfifo_remove(struct platform_device *op) | 543 | static int mpc52xx_lpbfifo_remove(struct platform_device *op) |
| 544 | { | 544 | { |
| 545 | if (lpbfifo.dev != &op->dev) | 545 | if (lpbfifo.dev != &op->dev) |
| 546 | return 0; | 546 | return 0; |
| @@ -564,7 +564,7 @@ static int __devexit mpc52xx_lpbfifo_remove(struct platform_device *op) | |||
| 564 | return 0; | 564 | return 0; |
| 565 | } | 565 | } |
| 566 | 566 | ||
| 567 | static struct of_device_id mpc52xx_lpbfifo_match[] __devinitconst = { | 567 | static struct of_device_id mpc52xx_lpbfifo_match[] = { |
| 568 | { .compatible = "fsl,mpc5200-lpbfifo", }, | 568 | { .compatible = "fsl,mpc5200-lpbfifo", }, |
| 569 | {}, | 569 | {}, |
| 570 | }; | 570 | }; |
| @@ -576,6 +576,6 @@ static struct platform_driver mpc52xx_lpbfifo_driver = { | |||
| 576 | .of_match_table = mpc52xx_lpbfifo_match, | 576 | .of_match_table = mpc52xx_lpbfifo_match, |
| 577 | }, | 577 | }, |
| 578 | .probe = mpc52xx_lpbfifo_probe, | 578 | .probe = mpc52xx_lpbfifo_probe, |
| 579 | .remove = __devexit_p(mpc52xx_lpbfifo_remove), | 579 | .remove = mpc52xx_lpbfifo_remove, |
| 580 | }; | 580 | }; |
| 581 | module_platform_driver(mpc52xx_lpbfifo_driver); | 581 | module_platform_driver(mpc52xx_lpbfifo_driver); |
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c index 10ff526cd046..79799b29ffe2 100644 --- a/arch/powerpc/platforms/82xx/ep8248e.c +++ b/arch/powerpc/platforms/82xx/ep8248e.c | |||
| @@ -111,7 +111,7 @@ static struct mdiobb_ctrl ep8248e_mdio_ctrl = { | |||
| 111 | .ops = &ep8248e_mdio_ops, | 111 | .ops = &ep8248e_mdio_ops, |
| 112 | }; | 112 | }; |
| 113 | 113 | ||
| 114 | static int __devinit ep8248e_mdio_probe(struct platform_device *ofdev) | 114 | static int ep8248e_mdio_probe(struct platform_device *ofdev) |
| 115 | { | 115 | { |
| 116 | struct mii_bus *bus; | 116 | struct mii_bus *bus; |
| 117 | struct resource res; | 117 | struct resource res; |
diff --git a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c index ef6537b8ed33..624cb51d19c9 100644 --- a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c +++ b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c | |||
| @@ -145,8 +145,7 @@ static int mcu_gpiochip_remove(struct mcu *mcu) | |||
| 145 | return gpiochip_remove(&mcu->gc); | 145 | return gpiochip_remove(&mcu->gc); |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | static int __devinit mcu_probe(struct i2c_client *client, | 148 | static int mcu_probe(struct i2c_client *client, const struct i2c_device_id *id) |
| 149 | const struct i2c_device_id *id) | ||
| 150 | { | 149 | { |
| 151 | struct mcu *mcu; | 150 | struct mcu *mcu; |
| 152 | int ret; | 151 | int ret; |
| @@ -188,7 +187,7 @@ err: | |||
| 188 | return ret; | 187 | return ret; |
| 189 | } | 188 | } |
| 190 | 189 | ||
| 191 | static int __devexit mcu_remove(struct i2c_client *client) | 190 | static int mcu_remove(struct i2c_client *client) |
| 192 | { | 191 | { |
| 193 | struct mcu *mcu = i2c_get_clientdata(client); | 192 | struct mcu *mcu = i2c_get_clientdata(client); |
| 194 | int ret; | 193 | int ret; |
| @@ -216,7 +215,7 @@ static const struct i2c_device_id mcu_ids[] = { | |||
| 216 | }; | 215 | }; |
| 217 | MODULE_DEVICE_TABLE(i2c, mcu_ids); | 216 | MODULE_DEVICE_TABLE(i2c, mcu_ids); |
| 218 | 217 | ||
| 219 | static struct of_device_id mcu_of_match_table[] __devinitdata = { | 218 | static struct of_device_id mcu_of_match_table[] = { |
| 220 | { .compatible = "fsl,mcu-mpc8349emitx", }, | 219 | { .compatible = "fsl,mcu-mpc8349emitx", }, |
| 221 | { }, | 220 | { }, |
| 222 | }; | 221 | }; |
| @@ -228,7 +227,7 @@ static struct i2c_driver mcu_driver = { | |||
| 228 | .of_match_table = mcu_of_match_table, | 227 | .of_match_table = mcu_of_match_table, |
| 229 | }, | 228 | }, |
| 230 | .probe = mcu_probe, | 229 | .probe = mcu_probe, |
| 231 | .remove = __devexit_p(mcu_remove), | 230 | .remove = mcu_remove, |
| 232 | .id_table = mcu_ids, | 231 | .id_table = mcu_ids, |
| 233 | }; | 232 | }; |
| 234 | 233 | ||
diff --git a/arch/powerpc/platforms/85xx/corenet_ds.c b/arch/powerpc/platforms/85xx/corenet_ds.c index ed69c9250717..6f355d8c92f6 100644 --- a/arch/powerpc/platforms/85xx/corenet_ds.c +++ b/arch/powerpc/platforms/85xx/corenet_ds.c | |||
| @@ -64,7 +64,7 @@ void __init corenet_ds_setup_arch(void) | |||
| 64 | pr_info("%s board from Freescale Semiconductor\n", ppc_md.name); | 64 | pr_info("%s board from Freescale Semiconductor\n", ppc_md.name); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | static const struct of_device_id of_device_ids[] __devinitconst = { | 67 | static const struct of_device_id of_device_ids[] = { |
| 68 | { | 68 | { |
| 69 | .compatible = "simple-bus" | 69 | .compatible = "simple-bus" |
| 70 | }, | 70 | }, |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index c474505ad0d0..7a31a0e1df29 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c | |||
| @@ -154,7 +154,7 @@ static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev) | |||
| 154 | } | 154 | } |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | static void __devinit skip_fake_bridge(struct pci_dev *dev) | 157 | static void skip_fake_bridge(struct pci_dev *dev) |
| 158 | { | 158 | { |
| 159 | /* Make it an error to skip the fake bridge | 159 | /* Make it an error to skip the fake bridge |
| 160 | * in pci_setup_device() in probe.c */ | 160 | * in pci_setup_device() in probe.c */ |
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c index b4e58cdc09a5..ec0b7272fae2 100644 --- a/arch/powerpc/platforms/85xx/tqm85xx.c +++ b/arch/powerpc/platforms/85xx/tqm85xx.c | |||
| @@ -85,7 +85,7 @@ static void tqm85xx_show_cpuinfo(struct seq_file *m) | |||
| 85 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | 85 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | static void __devinit tqm85xx_ti1520_fixup(struct pci_dev *pdev) | 88 | static void tqm85xx_ti1520_fixup(struct pci_dev *pdev) |
| 89 | { | 89 | { |
| 90 | unsigned int val; | 90 | unsigned int val; |
| 91 | 91 | ||
diff --git a/arch/powerpc/platforms/86xx/gef_ppc9a.c b/arch/powerpc/platforms/86xx/gef_ppc9a.c index bf5338754c5a..c23f3443880a 100644 --- a/arch/powerpc/platforms/86xx/gef_ppc9a.c +++ b/arch/powerpc/platforms/86xx/gef_ppc9a.c | |||
| @@ -159,7 +159,7 @@ static void gef_ppc9a_show_cpuinfo(struct seq_file *m) | |||
| 159 | gef_ppc9a_get_vme_is_syscon() ? "yes" : "no"); | 159 | gef_ppc9a_get_vme_is_syscon() ? "yes" : "no"); |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | static void __devinit gef_ppc9a_nec_fixup(struct pci_dev *pdev) | 162 | static void gef_ppc9a_nec_fixup(struct pci_dev *pdev) |
| 163 | { | 163 | { |
| 164 | unsigned int val; | 164 | unsigned int val; |
| 165 | 165 | ||
diff --git a/arch/powerpc/platforms/86xx/gef_sbc310.c b/arch/powerpc/platforms/86xx/gef_sbc310.c index 0b7851330a07..8a6ac20686ea 100644 --- a/arch/powerpc/platforms/86xx/gef_sbc310.c +++ b/arch/powerpc/platforms/86xx/gef_sbc310.c | |||
| @@ -146,7 +146,7 @@ static void gef_sbc310_show_cpuinfo(struct seq_file *m) | |||
| 146 | 146 | ||
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | static void __devinit gef_sbc310_nec_fixup(struct pci_dev *pdev) | 149 | static void gef_sbc310_nec_fixup(struct pci_dev *pdev) |
| 150 | { | 150 | { |
| 151 | unsigned int val; | 151 | unsigned int val; |
| 152 | 152 | ||
diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c index b9eb174897b1..06c72636f299 100644 --- a/arch/powerpc/platforms/86xx/gef_sbc610.c +++ b/arch/powerpc/platforms/86xx/gef_sbc610.c | |||
| @@ -136,7 +136,7 @@ static void gef_sbc610_show_cpuinfo(struct seq_file *m) | |||
| 136 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); | 136 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); |
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | static void __devinit gef_sbc610_nec_fixup(struct pci_dev *pdev) | 139 | static void gef_sbc610_nec_fixup(struct pci_dev *pdev) |
| 140 | { | 140 | { |
| 141 | unsigned int val; | 141 | unsigned int val; |
| 142 | 142 | ||
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c index 4ab087671185..6ae25fb62015 100644 --- a/arch/powerpc/platforms/cell/setup.c +++ b/arch/powerpc/platforms/cell/setup.c | |||
| @@ -117,7 +117,7 @@ static void cell_fixup_pcie_rootcomplex(struct pci_dev *dev) | |||
| 117 | } | 117 | } |
| 118 | DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, cell_fixup_pcie_rootcomplex); | 118 | DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, cell_fixup_pcie_rootcomplex); |
| 119 | 119 | ||
| 120 | static int __devinit cell_setup_phb(struct pci_controller *phb) | 120 | static int cell_setup_phb(struct pci_controller *phb) |
| 121 | { | 121 | { |
| 122 | const char *model; | 122 | const char *model; |
| 123 | struct device_node *np; | 123 | struct device_node *np; |
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c index 49a65e2dfc71..d35dbbc8ec79 100644 --- a/arch/powerpc/platforms/cell/smp.c +++ b/arch/powerpc/platforms/cell/smp.c | |||
| @@ -67,7 +67,7 @@ static cpumask_t of_spin_map; | |||
| 67 | * 0 - failure | 67 | * 0 - failure |
| 68 | * 1 - success | 68 | * 1 - success |
| 69 | */ | 69 | */ |
| 70 | static inline int __devinit smp_startup_cpu(unsigned int lcpu) | 70 | static inline int smp_startup_cpu(unsigned int lcpu) |
| 71 | { | 71 | { |
| 72 | int status; | 72 | int status; |
| 73 | unsigned long start_here = __pa((u32)*((unsigned long *) | 73 | unsigned long start_here = __pa((u32)*((unsigned long *) |
| @@ -108,7 +108,7 @@ static int __init smp_iic_probe(void) | |||
| 108 | return cpumask_weight(cpu_possible_mask); | 108 | return cpumask_weight(cpu_possible_mask); |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | static void __devinit smp_cell_setup_cpu(int cpu) | 111 | static void smp_cell_setup_cpu(int cpu) |
| 112 | { | 112 | { |
| 113 | if (cpu != boot_cpuid) | 113 | if (cpu != boot_cpuid) |
| 114 | iic_setup_cpu(); | 114 | iic_setup_cpu(); |
| @@ -119,7 +119,7 @@ static void __devinit smp_cell_setup_cpu(int cpu) | |||
| 119 | mtspr(SPRN_DABRX, DABRX_KERNEL | DABRX_USER); | 119 | mtspr(SPRN_DABRX, DABRX_KERNEL | DABRX_USER); |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | static int __devinit smp_cell_kick_cpu(int nr) | 122 | static int smp_cell_kick_cpu(int nr) |
| 123 | { | 123 | { |
| 124 | BUG_ON(nr < 0 || nr >= NR_CPUS); | 124 | BUG_ON(nr < 0 || nr >= NR_CPUS); |
| 125 | 125 | ||
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index 83285c5a2049..1b87e198faa7 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c | |||
| @@ -323,7 +323,7 @@ chrp_find_bridges(void) | |||
| 323 | * ATA controller to be set to fully native mode or bad things | 323 | * ATA controller to be set to fully native mode or bad things |
| 324 | * will happen. | 324 | * will happen. |
| 325 | */ | 325 | */ |
| 326 | static void __devinit chrp_pci_fixup_winbond_ata(struct pci_dev *sl82c105) | 326 | static void chrp_pci_fixup_winbond_ata(struct pci_dev *sl82c105) |
| 327 | { | 327 | { |
| 328 | u8 progif; | 328 | u8 progif; |
| 329 | 329 | ||
diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c index feab30bbae23..dead91b177b9 100644 --- a/arch/powerpc/platforms/chrp/smp.c +++ b/arch/powerpc/platforms/chrp/smp.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | #include <asm/mpic.h> | 30 | #include <asm/mpic.h> |
| 31 | #include <asm/rtas.h> | 31 | #include <asm/rtas.h> |
| 32 | 32 | ||
| 33 | static int __devinit smp_chrp_kick_cpu(int nr) | 33 | static int smp_chrp_kick_cpu(int nr) |
| 34 | { | 34 | { |
| 35 | *(unsigned long *)KERNELBASE = nr; | 35 | *(unsigned long *)KERNELBASE = nr; |
| 36 | asm volatile("dcbf 0,%0"::"r"(KERNELBASE):"memory"); | 36 | asm volatile("dcbf 0,%0"::"r"(KERNELBASE):"memory"); |
| @@ -38,7 +38,7 @@ static int __devinit smp_chrp_kick_cpu(int nr) | |||
| 38 | return 0; | 38 | return 0; |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | static void __devinit smp_chrp_setup_cpu(int cpu_nr) | 41 | static void smp_chrp_setup_cpu(int cpu_nr) |
| 42 | { | 42 | { |
| 43 | mpic_setup_this_cpu(); | 43 | mpic_setup_this_cpu(); |
| 44 | } | 44 | } |
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c index 64fde058e545..92ac9b52b32d 100644 --- a/arch/powerpc/platforms/fsl_uli1575.c +++ b/arch/powerpc/platforms/fsl_uli1575.c | |||
| @@ -59,7 +59,7 @@ static inline bool is_quirk_valid(void) | |||
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | /* Bridge */ | 61 | /* Bridge */ |
| 62 | static void __devinit early_uli5249(struct pci_dev *dev) | 62 | static void early_uli5249(struct pci_dev *dev) |
| 63 | { | 63 | { |
| 64 | unsigned char temp; | 64 | unsigned char temp; |
| 65 | 65 | ||
| @@ -82,7 +82,7 @@ static void __devinit early_uli5249(struct pci_dev *dev) | |||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | 84 | ||
| 85 | static void __devinit quirk_uli1575(struct pci_dev *dev) | 85 | static void quirk_uli1575(struct pci_dev *dev) |
| 86 | { | 86 | { |
| 87 | int i; | 87 | int i; |
| 88 | 88 | ||
| @@ -139,7 +139,7 @@ static void __devinit quirk_uli1575(struct pci_dev *dev) | |||
| 139 | pci_write_config_byte(dev, 0x75, ULI_8259_IRQ15); | 139 | pci_write_config_byte(dev, 0x75, ULI_8259_IRQ15); |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | static void __devinit quirk_final_uli1575(struct pci_dev *dev) | 142 | static void quirk_final_uli1575(struct pci_dev *dev) |
| 143 | { | 143 | { |
| 144 | /* Set i8259 interrupt trigger | 144 | /* Set i8259 interrupt trigger |
| 145 | * IRQ 3: Level | 145 | * IRQ 3: Level |
| @@ -175,7 +175,7 @@ static void __devinit quirk_final_uli1575(struct pci_dev *dev) | |||
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | /* SATA */ | 177 | /* SATA */ |
| 178 | static void __devinit quirk_uli5288(struct pci_dev *dev) | 178 | static void quirk_uli5288(struct pci_dev *dev) |
| 179 | { | 179 | { |
| 180 | unsigned char c; | 180 | unsigned char c; |
| 181 | unsigned int d; | 181 | unsigned int d; |
| @@ -200,7 +200,7 @@ static void __devinit quirk_uli5288(struct pci_dev *dev) | |||
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | /* PATA */ | 202 | /* PATA */ |
| 203 | static void __devinit quirk_uli5229(struct pci_dev *dev) | 203 | static void quirk_uli5229(struct pci_dev *dev) |
| 204 | { | 204 | { |
| 205 | unsigned short temp; | 205 | unsigned short temp; |
| 206 | 206 | ||
| @@ -216,7 +216,7 @@ static void __devinit quirk_uli5229(struct pci_dev *dev) | |||
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | /* We have to do a dummy read on the P2P for the RTC to work, WTF */ | 218 | /* We have to do a dummy read on the P2P for the RTC to work, WTF */ |
| 219 | static void __devinit quirk_final_uli5249(struct pci_dev *dev) | 219 | static void quirk_final_uli5249(struct pci_dev *dev) |
| 220 | { | 220 | { |
| 221 | int i; | 221 | int i; |
| 222 | u8 *dummy; | 222 | u8 *dummy; |
| @@ -253,7 +253,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5249, quirk_final_uli5249); | |||
| 253 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x1575, quirk_final_uli1575); | 253 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x1575, quirk_final_uli1575); |
| 254 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229); | 254 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229); |
| 255 | 255 | ||
| 256 | static void __devinit hpcd_quirk_uli1575(struct pci_dev *dev) | 256 | static void hpcd_quirk_uli1575(struct pci_dev *dev) |
| 257 | { | 257 | { |
| 258 | u32 temp32; | 258 | u32 temp32; |
| 259 | 259 | ||
| @@ -269,7 +269,7 @@ static void __devinit hpcd_quirk_uli1575(struct pci_dev *dev) | |||
| 269 | pci_write_config_dword(dev, 0x90, (temp32 | 1<<22)); | 269 | pci_write_config_dword(dev, 0x90, (temp32 | 1<<22)); |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | static void __devinit hpcd_quirk_uli5288(struct pci_dev *dev) | 272 | static void hpcd_quirk_uli5288(struct pci_dev *dev) |
| 273 | { | 273 | { |
| 274 | unsigned char c; | 274 | unsigned char c; |
| 275 | 275 | ||
| @@ -295,7 +295,7 @@ static void __devinit hpcd_quirk_uli5288(struct pci_dev *dev) | |||
| 295 | * IRQ14 is a sideband interrupt from IDE device to CPU and we use this | 295 | * IRQ14 is a sideband interrupt from IDE device to CPU and we use this |
| 296 | * as the interrupt for IDE device. | 296 | * as the interrupt for IDE device. |
| 297 | */ | 297 | */ |
| 298 | static void __devinit hpcd_quirk_uli5229(struct pci_dev *dev) | 298 | static void hpcd_quirk_uli5229(struct pci_dev *dev) |
| 299 | { | 299 | { |
| 300 | unsigned char c; | 300 | unsigned char c; |
| 301 | 301 | ||
| @@ -317,7 +317,7 @@ static void __devinit hpcd_quirk_uli5229(struct pci_dev *dev) | |||
| 317 | * bug by re-assigning a correct irq to 5288. | 317 | * bug by re-assigning a correct irq to 5288. |
| 318 | * | 318 | * |
| 319 | */ | 319 | */ |
| 320 | static void __devinit hpcd_final_uli5288(struct pci_dev *dev) | 320 | static void hpcd_final_uli5288(struct pci_dev *dev) |
| 321 | { | 321 | { |
| 322 | struct pci_controller *hose = pci_bus_to_host(dev->bus); | 322 | struct pci_controller *hose = pci_bus_to_host(dev->bus); |
| 323 | struct device_node *hosenode = hose ? hose->dn : NULL; | 323 | struct device_node *hosenode = hose ? hose->dn : NULL; |
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c index 465ee8f5c086..f7136aae8bbf 100644 --- a/arch/powerpc/platforms/maple/pci.c +++ b/arch/powerpc/platforms/maple/pci.c | |||
| @@ -543,7 +543,7 @@ static int __init maple_add_bridge(struct device_node *dev) | |||
| 543 | } | 543 | } |
| 544 | 544 | ||
| 545 | 545 | ||
| 546 | void __devinit maple_pci_irq_fixup(struct pci_dev *dev) | 546 | void maple_pci_irq_fixup(struct pci_dev *dev) |
| 547 | { | 547 | { |
| 548 | DBG(" -> maple_pci_irq_fixup\n"); | 548 | DBG(" -> maple_pci_irq_fixup\n"); |
| 549 | 549 | ||
| @@ -648,7 +648,7 @@ int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel) | |||
| 648 | return irq; | 648 | return irq; |
| 649 | } | 649 | } |
| 650 | 650 | ||
| 651 | static void __devinit quirk_ipr_msi(struct pci_dev *dev) | 651 | static void quirk_ipr_msi(struct pci_dev *dev) |
| 652 | { | 652 | { |
| 653 | /* Something prevents MSIs from the IPR from working on Bimini, | 653 | /* Something prevents MSIs from the IPR from working on Bimini, |
| 654 | * and the driver has no smarts to recover. So disable MSI | 654 | * and the driver has no smarts to recover. So disable MSI |
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c index 9886296e08da..0237ab782fb8 100644 --- a/arch/powerpc/platforms/pasemi/gpio_mdio.c +++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c | |||
| @@ -216,7 +216,7 @@ static int gpio_mdio_reset(struct mii_bus *bus) | |||
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | 218 | ||
| 219 | static int __devinit gpio_mdio_probe(struct platform_device *ofdev) | 219 | static int gpio_mdio_probe(struct platform_device *ofdev) |
| 220 | { | 220 | { |
| 221 | struct device *dev = &ofdev->dev; | 221 | struct device *dev = &ofdev->dev; |
| 222 | struct device_node *np = ofdev->dev.of_node; | 222 | struct device_node *np = ofdev->dev.of_node; |
diff --git a/arch/powerpc/platforms/pasemi/pasemi.h b/arch/powerpc/platforms/pasemi/pasemi.h index b1e524f7489d..ea65bf0eb897 100644 --- a/arch/powerpc/platforms/pasemi/pasemi.h +++ b/arch/powerpc/platforms/pasemi/pasemi.h | |||
| @@ -3,8 +3,8 @@ | |||
| 3 | 3 | ||
| 4 | extern unsigned long pas_get_boot_time(void); | 4 | extern unsigned long pas_get_boot_time(void); |
| 5 | extern void pas_pci_init(void); | 5 | extern void pas_pci_init(void); |
| 6 | extern void __devinit pas_pci_irq_fixup(struct pci_dev *dev); | 6 | extern void pas_pci_irq_fixup(struct pci_dev *dev); |
| 7 | extern void __devinit pas_pci_dma_dev_setup(struct pci_dev *dev); | 7 | extern void pas_pci_dma_dev_setup(struct pci_dev *dev); |
| 8 | 8 | ||
| 9 | extern void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset); | 9 | extern void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset); |
| 10 | 10 | ||
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index 2ed9212d7d59..8c54de6d8ec4 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c | |||
| @@ -76,7 +76,7 @@ static void pas_restart(char *cmd) | |||
| 76 | static arch_spinlock_t timebase_lock; | 76 | static arch_spinlock_t timebase_lock; |
| 77 | static unsigned long timebase; | 77 | static unsigned long timebase; |
| 78 | 78 | ||
| 79 | static void __devinit pas_give_timebase(void) | 79 | static void pas_give_timebase(void) |
| 80 | { | 80 | { |
| 81 | unsigned long flags; | 81 | unsigned long flags; |
| 82 | 82 | ||
| @@ -94,7 +94,7 @@ static void __devinit pas_give_timebase(void) | |||
| 94 | local_irq_restore(flags); | 94 | local_irq_restore(flags); |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | static void __devinit pas_take_timebase(void) | 97 | static void pas_take_timebase(void) |
| 98 | { | 98 | { |
| 99 | while (!timebase) | 99 | while (!timebase) |
| 100 | smp_rmb(); | 100 | smp_rmb(); |
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index 43bbe1bda939..2b8af75abc23 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c | |||
| @@ -561,7 +561,7 @@ static struct pci_ops u4_pcie_pci_ops = | |||
| 561 | .write = u4_pcie_write_config, | 561 | .write = u4_pcie_write_config, |
| 562 | }; | 562 | }; |
| 563 | 563 | ||
| 564 | static void __devinit pmac_pci_fixup_u4_of_node(struct pci_dev *dev) | 564 | static void pmac_pci_fixup_u4_of_node(struct pci_dev *dev) |
| 565 | { | 565 | { |
| 566 | /* Apple's device-tree "hides" the root complex virtual P2P bridge | 566 | /* Apple's device-tree "hides" the root complex virtual P2P bridge |
| 567 | * on U4. However, Linux sees it, causing the PCI <-> OF matching | 567 | * on U4. However, Linux sees it, causing the PCI <-> OF matching |
| @@ -988,7 +988,7 @@ static int __init pmac_add_bridge(struct device_node *dev) | |||
| 988 | return 0; | 988 | return 0; |
| 989 | } | 989 | } |
| 990 | 990 | ||
| 991 | void __devinit pmac_pci_irq_fixup(struct pci_dev *dev) | 991 | void pmac_pci_irq_fixup(struct pci_dev *dev) |
| 992 | { | 992 | { |
| 993 | #ifdef CONFIG_PPC32 | 993 | #ifdef CONFIG_PPC32 |
| 994 | /* Fixup interrupt for the modem/ethernet combo controller. | 994 | /* Fixup interrupt for the modem/ethernet combo controller. |
| @@ -1138,7 +1138,7 @@ int pmac_pci_enable_device_hook(struct pci_dev *dev) | |||
| 1138 | return 0; | 1138 | return 0; |
| 1139 | } | 1139 | } |
| 1140 | 1140 | ||
| 1141 | void __devinit pmac_pci_fixup_ohci(struct pci_dev *dev) | 1141 | void pmac_pci_fixup_ohci(struct pci_dev *dev) |
| 1142 | { | 1142 | { |
| 1143 | struct device_node *node = pci_device_to_OF_node(dev); | 1143 | struct device_node *node = pci_device_to_OF_node(dev); |
| 1144 | 1144 | ||
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index b4ddaa3fbb29..bdb738a69e41 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
| @@ -484,7 +484,7 @@ static void smp_core99_give_timebase(void) | |||
| 484 | } | 484 | } |
| 485 | 485 | ||
| 486 | 486 | ||
| 487 | static void __devinit smp_core99_take_timebase(void) | 487 | static void smp_core99_take_timebase(void) |
| 488 | { | 488 | { |
| 489 | unsigned long flags; | 489 | unsigned long flags; |
| 490 | 490 | ||
| @@ -669,7 +669,7 @@ static void smp_core99_gpio_tb_freeze(int freeze) | |||
| 669 | volatile static long int core99_l2_cache; | 669 | volatile static long int core99_l2_cache; |
| 670 | volatile static long int core99_l3_cache; | 670 | volatile static long int core99_l3_cache; |
| 671 | 671 | ||
| 672 | static void __devinit core99_init_caches(int cpu) | 672 | static void core99_init_caches(int cpu) |
| 673 | { | 673 | { |
| 674 | #ifndef CONFIG_PPC64 | 674 | #ifndef CONFIG_PPC64 |
| 675 | if (!cpu_has_feature(CPU_FTR_L2CR)) | 675 | if (!cpu_has_feature(CPU_FTR_L2CR)) |
| @@ -801,7 +801,7 @@ static int __init smp_core99_probe(void) | |||
| 801 | return ncpus; | 801 | return ncpus; |
| 802 | } | 802 | } |
| 803 | 803 | ||
| 804 | static int __devinit smp_core99_kick_cpu(int nr) | 804 | static int smp_core99_kick_cpu(int nr) |
| 805 | { | 805 | { |
| 806 | unsigned int save_vector; | 806 | unsigned int save_vector; |
| 807 | unsigned long target, flags; | 807 | unsigned long target, flags; |
| @@ -844,7 +844,7 @@ static int __devinit smp_core99_kick_cpu(int nr) | |||
| 844 | return 0; | 844 | return 0; |
| 845 | } | 845 | } |
| 846 | 846 | ||
| 847 | static void __devinit smp_core99_setup_cpu(int cpu_nr) | 847 | static void smp_core99_setup_cpu(int cpu_nr) |
| 848 | { | 848 | { |
| 849 | /* Setup L2/L3 */ | 849 | /* Setup L2/L3 */ |
| 850 | if (cpu_nr != 0) | 850 | if (cpu_nr != 0) |
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 53d052e95cfc..8e90e8906df3 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c | |||
| @@ -76,7 +76,7 @@ static struct pci_dn *pnv_ioda_get_pdn(struct pci_dev *dev) | |||
| 76 | return PCI_DN(np); | 76 | return PCI_DN(np); |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | static int __devinit pnv_ioda_alloc_pe(struct pnv_phb *phb) | 79 | static int pnv_ioda_alloc_pe(struct pnv_phb *phb) |
| 80 | { | 80 | { |
| 81 | unsigned long pe; | 81 | unsigned long pe; |
| 82 | 82 | ||
| @@ -91,7 +91,7 @@ static int __devinit pnv_ioda_alloc_pe(struct pnv_phb *phb) | |||
| 91 | return pe; | 91 | return pe; |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | static void __devinit pnv_ioda_free_pe(struct pnv_phb *phb, int pe) | 94 | static void pnv_ioda_free_pe(struct pnv_phb *phb, int pe) |
| 95 | { | 95 | { |
| 96 | WARN_ON(phb->ioda.pe_array[pe].pdev); | 96 | WARN_ON(phb->ioda.pe_array[pe].pdev); |
| 97 | 97 | ||
| @@ -103,7 +103,7 @@ static void __devinit pnv_ioda_free_pe(struct pnv_phb *phb, int pe) | |||
| 103 | * but in the meantime, we need to protect them to avoid warnings | 103 | * but in the meantime, we need to protect them to avoid warnings |
| 104 | */ | 104 | */ |
| 105 | #ifdef CONFIG_PCI_MSI | 105 | #ifdef CONFIG_PCI_MSI |
| 106 | static struct pnv_ioda_pe * __devinit pnv_ioda_get_pe(struct pci_dev *dev) | 106 | static struct pnv_ioda_pe *pnv_ioda_get_pe(struct pci_dev *dev) |
| 107 | { | 107 | { |
| 108 | struct pci_controller *hose = pci_bus_to_host(dev->bus); | 108 | struct pci_controller *hose = pci_bus_to_host(dev->bus); |
| 109 | struct pnv_phb *phb = hose->private_data; | 109 | struct pnv_phb *phb = hose->private_data; |
| @@ -117,8 +117,7 @@ static struct pnv_ioda_pe * __devinit pnv_ioda_get_pe(struct pci_dev *dev) | |||
| 117 | } | 117 | } |
| 118 | #endif /* CONFIG_PCI_MSI */ | 118 | #endif /* CONFIG_PCI_MSI */ |
| 119 | 119 | ||
| 120 | static int __devinit pnv_ioda_configure_pe(struct pnv_phb *phb, | 120 | static int pnv_ioda_configure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe) |
| 121 | struct pnv_ioda_pe *pe) | ||
| 122 | { | 121 | { |
| 123 | struct pci_dev *parent; | 122 | struct pci_dev *parent; |
| 124 | uint8_t bcomp, dcomp, fcomp; | 123 | uint8_t bcomp, dcomp, fcomp; |
| @@ -207,8 +206,8 @@ static int __devinit pnv_ioda_configure_pe(struct pnv_phb *phb, | |||
| 207 | return 0; | 206 | return 0; |
| 208 | } | 207 | } |
| 209 | 208 | ||
| 210 | static void __devinit pnv_ioda_link_pe_by_weight(struct pnv_phb *phb, | 209 | static void pnv_ioda_link_pe_by_weight(struct pnv_phb *phb, |
| 211 | struct pnv_ioda_pe *pe) | 210 | struct pnv_ioda_pe *pe) |
| 212 | { | 211 | { |
| 213 | struct pnv_ioda_pe *lpe; | 212 | struct pnv_ioda_pe *lpe; |
| 214 | 213 | ||
| @@ -246,7 +245,7 @@ static unsigned int pnv_ioda_dma_weight(struct pci_dev *dev) | |||
| 246 | } | 245 | } |
| 247 | 246 | ||
| 248 | #if 0 | 247 | #if 0 |
| 249 | static struct pnv_ioda_pe * __devinit pnv_ioda_setup_dev_PE(struct pci_dev *dev) | 248 | static struct pnv_ioda_pe *pnv_ioda_setup_dev_PE(struct pci_dev *dev) |
| 250 | { | 249 | { |
| 251 | struct pci_controller *hose = pci_bus_to_host(dev->bus); | 250 | struct pci_controller *hose = pci_bus_to_host(dev->bus); |
| 252 | struct pnv_phb *phb = hose->private_data; | 251 | struct pnv_phb *phb = hose->private_data; |
| @@ -343,7 +342,7 @@ static void pnv_ioda_setup_same_PE(struct pci_bus *bus, struct pnv_ioda_pe *pe) | |||
| 343 | * subordinate PCI devices and buses. The second type of PE is normally | 342 | * subordinate PCI devices and buses. The second type of PE is normally |
| 344 | * orgiriated by PCIe-to-PCI bridge or PLX switch downstream ports. | 343 | * orgiriated by PCIe-to-PCI bridge or PLX switch downstream ports. |
| 345 | */ | 344 | */ |
| 346 | static void __devinit pnv_ioda_setup_bus_PE(struct pci_bus *bus, int all) | 345 | static void pnv_ioda_setup_bus_PE(struct pci_bus *bus, int all) |
| 347 | { | 346 | { |
| 348 | struct pci_controller *hose = pci_bus_to_host(bus); | 347 | struct pci_controller *hose = pci_bus_to_host(bus); |
| 349 | struct pnv_phb *phb = hose->private_data; | 348 | struct pnv_phb *phb = hose->private_data; |
| @@ -399,7 +398,7 @@ static void __devinit pnv_ioda_setup_bus_PE(struct pci_bus *bus, int all) | |||
| 399 | pnv_ioda_link_pe_by_weight(phb, pe); | 398 | pnv_ioda_link_pe_by_weight(phb, pe); |
| 400 | } | 399 | } |
| 401 | 400 | ||
| 402 | static void __devinit pnv_ioda_setup_PEs(struct pci_bus *bus) | 401 | static void pnv_ioda_setup_PEs(struct pci_bus *bus) |
| 403 | { | 402 | { |
| 404 | struct pci_dev *dev; | 403 | struct pci_dev *dev; |
| 405 | 404 | ||
| @@ -423,7 +422,7 @@ static void __devinit pnv_ioda_setup_PEs(struct pci_bus *bus) | |||
| 423 | * port to PE# here. The game rule here is expected to be changed | 422 | * port to PE# here. The game rule here is expected to be changed |
| 424 | * as soon as we can detected PLX bridge correctly. | 423 | * as soon as we can detected PLX bridge correctly. |
| 425 | */ | 424 | */ |
| 426 | static void __devinit pnv_pci_ioda_setup_PEs(void) | 425 | static void pnv_pci_ioda_setup_PEs(void) |
| 427 | { | 426 | { |
| 428 | struct pci_controller *hose, *tmp; | 427 | struct pci_controller *hose, *tmp; |
| 429 | 428 | ||
| @@ -432,14 +431,12 @@ static void __devinit pnv_pci_ioda_setup_PEs(void) | |||
| 432 | } | 431 | } |
| 433 | } | 432 | } |
| 434 | 433 | ||
| 435 | static void __devinit pnv_pci_ioda_dma_dev_setup(struct pnv_phb *phb, | 434 | static void pnv_pci_ioda_dma_dev_setup(struct pnv_phb *phb, struct pci_dev *dev) |
| 436 | struct pci_dev *dev) | ||
| 437 | { | 435 | { |
| 438 | /* We delay DMA setup after we have assigned all PE# */ | 436 | /* We delay DMA setup after we have assigned all PE# */ |
| 439 | } | 437 | } |
| 440 | 438 | ||
| 441 | static void __devinit pnv_ioda_setup_bus_dma(struct pnv_ioda_pe *pe, | 439 | static void pnv_ioda_setup_bus_dma(struct pnv_ioda_pe *pe, struct pci_bus *bus) |
| 442 | struct pci_bus *bus) | ||
| 443 | { | 440 | { |
| 444 | struct pci_dev *dev; | 441 | struct pci_dev *dev; |
| 445 | 442 | ||
| @@ -450,10 +447,9 @@ static void __devinit pnv_ioda_setup_bus_dma(struct pnv_ioda_pe *pe, | |||
| 450 | } | 447 | } |
| 451 | } | 448 | } |
| 452 | 449 | ||
| 453 | static void __devinit pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb, | 450 | static void pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb, |
| 454 | struct pnv_ioda_pe *pe, | 451 | struct pnv_ioda_pe *pe, unsigned int base, |
| 455 | unsigned int base, | 452 | unsigned int segs) |
| 456 | unsigned int segs) | ||
| 457 | { | 453 | { |
| 458 | 454 | ||
| 459 | struct page *tce_mem = NULL; | 455 | struct page *tce_mem = NULL; |
| @@ -541,7 +537,7 @@ static void __devinit pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb, | |||
| 541 | __free_pages(tce_mem, get_order(TCE32_TABLE_SIZE * segs)); | 537 | __free_pages(tce_mem, get_order(TCE32_TABLE_SIZE * segs)); |
| 542 | } | 538 | } |
| 543 | 539 | ||
| 544 | static void __devinit pnv_ioda_setup_dma(struct pnv_phb *phb) | 540 | static void pnv_ioda_setup_dma(struct pnv_phb *phb) |
| 545 | { | 541 | { |
| 546 | struct pci_controller *hose = phb->hose; | 542 | struct pci_controller *hose = phb->hose; |
| 547 | unsigned int residual, remaining, segs, tw, base; | 543 | unsigned int residual, remaining, segs, tw, base; |
| @@ -684,8 +680,8 @@ static void pnv_pci_init_ioda_msis(struct pnv_phb *phb) { } | |||
| 684 | * to bottom style. So the the I/O or MMIO segment assigned to | 680 | * to bottom style. So the the I/O or MMIO segment assigned to |
| 685 | * parent PE could be overrided by its child PEs if necessary. | 681 | * parent PE could be overrided by its child PEs if necessary. |
| 686 | */ | 682 | */ |
| 687 | static void __devinit pnv_ioda_setup_pe_seg(struct pci_controller *hose, | 683 | static void pnv_ioda_setup_pe_seg(struct pci_controller *hose, |
| 688 | struct pnv_ioda_pe *pe) | 684 | struct pnv_ioda_pe *pe) |
| 689 | { | 685 | { |
| 690 | struct pnv_phb *phb = hose->private_data; | 686 | struct pnv_phb *phb = hose->private_data; |
| 691 | struct pci_bus_region region; | 687 | struct pci_bus_region region; |
| @@ -753,7 +749,7 @@ static void __devinit pnv_ioda_setup_pe_seg(struct pci_controller *hose, | |||
| 753 | } | 749 | } |
| 754 | } | 750 | } |
| 755 | 751 | ||
| 756 | static void __devinit pnv_pci_ioda_setup_seg(void) | 752 | static void pnv_pci_ioda_setup_seg(void) |
| 757 | { | 753 | { |
| 758 | struct pci_controller *tmp, *hose; | 754 | struct pci_controller *tmp, *hose; |
| 759 | struct pnv_phb *phb; | 755 | struct pnv_phb *phb; |
| @@ -767,7 +763,7 @@ static void __devinit pnv_pci_ioda_setup_seg(void) | |||
| 767 | } | 763 | } |
| 768 | } | 764 | } |
| 769 | 765 | ||
| 770 | static void __devinit pnv_pci_ioda_setup_DMA(void) | 766 | static void pnv_pci_ioda_setup_DMA(void) |
| 771 | { | 767 | { |
| 772 | struct pci_controller *hose, *tmp; | 768 | struct pci_controller *hose, *tmp; |
| 773 | struct pnv_phb *phb; | 769 | struct pnv_phb *phb; |
| @@ -781,7 +777,7 @@ static void __devinit pnv_pci_ioda_setup_DMA(void) | |||
| 781 | } | 777 | } |
| 782 | } | 778 | } |
| 783 | 779 | ||
| 784 | static void __devinit pnv_pci_ioda_fixup(void) | 780 | static void pnv_pci_ioda_fixup(void) |
| 785 | { | 781 | { |
| 786 | pnv_pci_ioda_setup_PEs(); | 782 | pnv_pci_ioda_setup_PEs(); |
| 787 | pnv_pci_ioda_setup_seg(); | 783 | pnv_pci_ioda_setup_seg(); |
| @@ -829,7 +825,7 @@ static resource_size_t pnv_pci_window_alignment(struct pci_bus *bus, | |||
| 829 | /* Prevent enabling devices for which we couldn't properly | 825 | /* Prevent enabling devices for which we couldn't properly |
| 830 | * assign a PE | 826 | * assign a PE |
| 831 | */ | 827 | */ |
| 832 | static int __devinit pnv_pci_enable_device_hook(struct pci_dev *dev) | 828 | static int pnv_pci_enable_device_hook(struct pci_dev *dev) |
| 833 | { | 829 | { |
| 834 | struct pci_controller *hose = pci_bus_to_host(dev->bus); | 830 | struct pci_controller *hose = pci_bus_to_host(dev->bus); |
| 835 | struct pnv_phb *phb = hose->private_data; | 831 | struct pnv_phb *phb = hose->private_data; |
diff --git a/arch/powerpc/platforms/powernv/pci-p5ioc2.c b/arch/powerpc/platforms/powernv/pci-p5ioc2.c index 6b4bef4e9d82..7db8771a40f5 100644 --- a/arch/powerpc/platforms/powernv/pci-p5ioc2.c +++ b/arch/powerpc/platforms/powernv/pci-p5ioc2.c | |||
| @@ -84,8 +84,8 @@ static void pnv_pci_init_p5ioc2_msis(struct pnv_phb *phb) | |||
| 84 | static void pnv_pci_init_p5ioc2_msis(struct pnv_phb *phb) { } | 84 | static void pnv_pci_init_p5ioc2_msis(struct pnv_phb *phb) { } |
| 85 | #endif /* CONFIG_PCI_MSI */ | 85 | #endif /* CONFIG_PCI_MSI */ |
| 86 | 86 | ||
| 87 | static void __devinit pnv_pci_p5ioc2_dma_dev_setup(struct pnv_phb *phb, | 87 | static void pnv_pci_p5ioc2_dma_dev_setup(struct pnv_phb *phb, |
| 88 | struct pci_dev *pdev) | 88 | struct pci_dev *pdev) |
| 89 | { | 89 | { |
| 90 | if (phb->p5ioc2.iommu_table.it_map == NULL) | 90 | if (phb->p5ioc2.iommu_table.it_map == NULL) |
| 91 | iommu_init_table(&phb->p5ioc2.iommu_table, phb->hose->node); | 91 | iommu_init_table(&phb->p5ioc2.iommu_table, phb->hose->node); |
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c index c01688a1a741..b8b8e0bd9897 100644 --- a/arch/powerpc/platforms/powernv/pci.c +++ b/arch/powerpc/platforms/powernv/pci.c | |||
| @@ -464,8 +464,7 @@ void pnv_pci_setup_iommu_table(struct iommu_table *tbl, | |||
| 464 | tbl->it_type = TCE_PCI; | 464 | tbl->it_type = TCE_PCI; |
| 465 | } | 465 | } |
| 466 | 466 | ||
| 467 | static struct iommu_table * __devinit | 467 | static struct iommu_table *pnv_pci_setup_bml_iommu(struct pci_controller *hose) |
| 468 | pnv_pci_setup_bml_iommu(struct pci_controller *hose) | ||
| 469 | { | 468 | { |
| 470 | struct iommu_table *tbl; | 469 | struct iommu_table *tbl; |
| 471 | const __be64 *basep, *swinvp; | 470 | const __be64 *basep, *swinvp; |
| @@ -496,8 +495,8 @@ pnv_pci_setup_bml_iommu(struct pci_controller *hose) | |||
| 496 | return tbl; | 495 | return tbl; |
| 497 | } | 496 | } |
| 498 | 497 | ||
| 499 | static void __devinit pnv_pci_dma_fallback_setup(struct pci_controller *hose, | 498 | static void pnv_pci_dma_fallback_setup(struct pci_controller *hose, |
| 500 | struct pci_dev *pdev) | 499 | struct pci_dev *pdev) |
| 501 | { | 500 | { |
| 502 | struct device_node *np = pci_bus_to_OF_node(hose->bus); | 501 | struct device_node *np = pci_bus_to_OF_node(hose->bus); |
| 503 | struct pci_dn *pdn; | 502 | struct pci_dn *pdn; |
| @@ -512,7 +511,7 @@ static void __devinit pnv_pci_dma_fallback_setup(struct pci_controller *hose, | |||
| 512 | set_iommu_table_base(&pdev->dev, pdn->iommu_table); | 511 | set_iommu_table_base(&pdev->dev, pdn->iommu_table); |
| 513 | } | 512 | } |
| 514 | 513 | ||
| 515 | static void __devinit pnv_pci_dma_dev_setup(struct pci_dev *pdev) | 514 | static void pnv_pci_dma_dev_setup(struct pci_dev *pdev) |
| 516 | { | 515 | { |
| 517 | struct pci_controller *hose = pci_bus_to_host(pdev->bus); | 516 | struct pci_controller *hose = pci_bus_to_host(pdev->bus); |
| 518 | struct pnv_phb *phb = hose->private_data; | 517 | struct pnv_phb *phb = hose->private_data; |
| @@ -527,7 +526,7 @@ static void __devinit pnv_pci_dma_dev_setup(struct pci_dev *pdev) | |||
| 527 | } | 526 | } |
| 528 | 527 | ||
| 529 | /* Fixup wrong class code in p7ioc root complex */ | 528 | /* Fixup wrong class code in p7ioc root complex */ |
| 530 | static void __devinit pnv_p7ioc_rc_quirk(struct pci_dev *dev) | 529 | static void pnv_p7ioc_rc_quirk(struct pci_dev *dev) |
| 531 | { | 530 | { |
| 532 | dev->class = PCI_CLASS_BRIDGE_PCI << 8; | 531 | dev->class = PCI_CLASS_BRIDGE_PCI << 8; |
| 533 | } | 532 | } |
diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c index 7698b6e13c57..0bdc735db16f 100644 --- a/arch/powerpc/platforms/powernv/smp.c +++ b/arch/powerpc/platforms/powernv/smp.c | |||
| @@ -62,7 +62,7 @@ static int pnv_smp_cpu_bootable(unsigned int nr) | |||
| 62 | return 1; | 62 | return 1; |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | int __devinit pnv_smp_kick_cpu(int nr) | 65 | int pnv_smp_kick_cpu(int nr) |
| 66 | { | 66 | { |
| 67 | unsigned int pcpu = get_hard_smp_processor_id(nr); | 67 | unsigned int pcpu = get_hard_smp_processor_id(nr); |
| 68 | unsigned long start_here = __pa(*((unsigned long *) | 68 | unsigned long start_here = __pa(*((unsigned long *) |
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c index 9b47ba7a5de7..bfccdc7cb85f 100644 --- a/arch/powerpc/platforms/ps3/repository.c +++ b/arch/powerpc/platforms/ps3/repository.c | |||
| @@ -437,7 +437,7 @@ found_dev: | |||
| 437 | return 0; | 437 | return 0; |
| 438 | } | 438 | } |
| 439 | 439 | ||
| 440 | int __devinit ps3_repository_find_devices(enum ps3_bus_type bus_type, | 440 | int ps3_repository_find_devices(enum ps3_bus_type bus_type, |
| 441 | int (*callback)(const struct ps3_repository_device *repo)) | 441 | int (*callback)(const struct ps3_repository_device *repo)) |
| 442 | { | 442 | { |
| 443 | int result = 0; | 443 | int result = 0; |
diff --git a/arch/powerpc/platforms/pseries/eeh_dev.c b/arch/powerpc/platforms/pseries/eeh_dev.c index 66442341d3a6..1efa28f5fc54 100644 --- a/arch/powerpc/platforms/pseries/eeh_dev.c +++ b/arch/powerpc/platforms/pseries/eeh_dev.c | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | * It will create EEH device according to the given OF node. The function | 49 | * It will create EEH device according to the given OF node. The function |
| 50 | * might be called by PCI emunation, DR, PHB hotplug. | 50 | * might be called by PCI emunation, DR, PHB hotplug. |
| 51 | */ | 51 | */ |
| 52 | void * __devinit eeh_dev_init(struct device_node *dn, void *data) | 52 | void *eeh_dev_init(struct device_node *dn, void *data) |
| 53 | { | 53 | { |
| 54 | struct pci_controller *phb = data; | 54 | struct pci_controller *phb = data; |
| 55 | struct eeh_dev *edev; | 55 | struct eeh_dev *edev; |
| @@ -77,7 +77,7 @@ void * __devinit eeh_dev_init(struct device_node *dn, void *data) | |||
| 77 | * Scan the PHB OF node and its child association, then create the | 77 | * Scan the PHB OF node and its child association, then create the |
| 78 | * EEH devices accordingly | 78 | * EEH devices accordingly |
| 79 | */ | 79 | */ |
| 80 | void __devinit eeh_dev_phb_init_dynamic(struct pci_controller *phb) | 80 | void eeh_dev_phb_init_dynamic(struct pci_controller *phb) |
| 81 | { | 81 | { |
| 82 | struct device_node *dn = phb->dn; | 82 | struct device_node *dn = phb->dn; |
| 83 | 83 | ||
diff --git a/arch/powerpc/platforms/pseries/eeh_pe.c b/arch/powerpc/platforms/pseries/eeh_pe.c index d16c8ded1084..fe43d1aa2cf1 100644 --- a/arch/powerpc/platforms/pseries/eeh_pe.c +++ b/arch/powerpc/platforms/pseries/eeh_pe.c | |||
| @@ -66,7 +66,7 @@ static struct eeh_pe *eeh_pe_alloc(struct pci_controller *phb, int type) | |||
| 66 | * The function should be called while the PHB is detected during | 66 | * The function should be called while the PHB is detected during |
| 67 | * system boot or PCI hotplug in order to create PHB PE. | 67 | * system boot or PCI hotplug in order to create PHB PE. |
| 68 | */ | 68 | */ |
| 69 | int __devinit eeh_phb_pe_create(struct pci_controller *phb) | 69 | int eeh_phb_pe_create(struct pci_controller *phb) |
| 70 | { | 70 | { |
| 71 | struct eeh_pe *pe; | 71 | struct eeh_pe *pe; |
| 72 | 72 | ||
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c index 261a577a3dd2..c91b22be9288 100644 --- a/arch/powerpc/platforms/pseries/pci_dlpar.c +++ b/arch/powerpc/platforms/pseries/pci_dlpar.c | |||
| @@ -149,7 +149,7 @@ void pcibios_add_pci_devices(struct pci_bus * bus) | |||
| 149 | } | 149 | } |
| 150 | EXPORT_SYMBOL_GPL(pcibios_add_pci_devices); | 150 | EXPORT_SYMBOL_GPL(pcibios_add_pci_devices); |
| 151 | 151 | ||
| 152 | struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn) | 152 | struct pci_controller *init_phb_dynamic(struct device_node *dn) |
| 153 | { | 153 | { |
| 154 | struct pci_controller *phb; | 154 | struct pci_controller *phb; |
| 155 | 155 | ||
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index 9fc0a4941908..80cd0be71e06 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
| @@ -87,7 +87,7 @@ int smp_query_cpu_stopped(unsigned int pcpu) | |||
| 87 | * 0 - failure | 87 | * 0 - failure |
| 88 | * 1 - success | 88 | * 1 - success |
| 89 | */ | 89 | */ |
| 90 | static inline int __devinit smp_startup_cpu(unsigned int lcpu) | 90 | static inline int smp_startup_cpu(unsigned int lcpu) |
| 91 | { | 91 | { |
| 92 | int status; | 92 | int status; |
| 93 | unsigned long start_here = __pa((u32)*((unsigned long *) | 93 | unsigned long start_here = __pa((u32)*((unsigned long *) |
| @@ -133,7 +133,7 @@ out: | |||
| 133 | return 1; | 133 | return 1; |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | static void __devinit smp_xics_setup_cpu(int cpu) | 136 | static void smp_xics_setup_cpu(int cpu) |
| 137 | { | 137 | { |
| 138 | if (cpu != boot_cpuid) | 138 | if (cpu != boot_cpuid) |
| 139 | xics_setup_cpu(); | 139 | xics_setup_cpu(); |
| @@ -148,7 +148,7 @@ static void __devinit smp_xics_setup_cpu(int cpu) | |||
| 148 | #endif | 148 | #endif |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | static int __devinit smp_pSeries_kick_cpu(int nr) | 151 | static int smp_pSeries_kick_cpu(int nr) |
| 152 | { | 152 | { |
| 153 | BUG_ON(nr < 0 || nr >= NR_CPUS); | 153 | BUG_ON(nr < 0 || nr >= NR_CPUS); |
| 154 | 154 | ||
diff --git a/arch/powerpc/platforms/wsp/scom_smp.c b/arch/powerpc/platforms/wsp/scom_smp.c index 141e78032097..b56b70aeb497 100644 --- a/arch/powerpc/platforms/wsp/scom_smp.c +++ b/arch/powerpc/platforms/wsp/scom_smp.c | |||
| @@ -337,8 +337,7 @@ scom_fail: | |||
| 337 | return rc; | 337 | return rc; |
| 338 | } | 338 | } |
| 339 | 339 | ||
| 340 | int __devinit a2_scom_startup_cpu(unsigned int lcpu, int thr_idx, | 340 | int a2_scom_startup_cpu(unsigned int lcpu, int thr_idx, struct device_node *np) |
| 341 | struct device_node *np) | ||
| 342 | { | 341 | { |
| 343 | u64 init_iar, init_msr, init_ccr2; | 342 | u64 init_iar, init_msr, init_ccr2; |
| 344 | unsigned long start_here; | 343 | unsigned long start_here; |
diff --git a/arch/powerpc/platforms/wsp/smp.c b/arch/powerpc/platforms/wsp/smp.c index 0ba103ae83a5..332a18b81403 100644 --- a/arch/powerpc/platforms/wsp/smp.c +++ b/arch/powerpc/platforms/wsp/smp.c | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | #include "ics.h" | 23 | #include "ics.h" |
| 24 | #include "wsp.h" | 24 | #include "wsp.h" |
| 25 | 25 | ||
| 26 | static void __devinit smp_a2_setup_cpu(int cpu) | 26 | static void smp_a2_setup_cpu(int cpu) |
| 27 | { | 27 | { |
| 28 | doorbell_setup_this_cpu(); | 28 | doorbell_setup_this_cpu(); |
| 29 | 29 | ||
| @@ -31,7 +31,7 @@ static void __devinit smp_a2_setup_cpu(int cpu) | |||
| 31 | xics_setup_cpu(); | 31 | xics_setup_cpu(); |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | int __devinit smp_a2_kick_cpu(int nr) | 34 | int smp_a2_kick_cpu(int nr) |
| 35 | { | 35 | { |
| 36 | const char *enable_method; | 36 | const char *enable_method; |
| 37 | struct device_node *np; | 37 | struct device_node *np; |
diff --git a/arch/powerpc/platforms/wsp/wsp.h b/arch/powerpc/platforms/wsp/wsp.h index 10c1d1fff362..62ef21afb89a 100644 --- a/arch/powerpc/platforms/wsp/wsp.h +++ b/arch/powerpc/platforms/wsp/wsp.h | |||
| @@ -18,7 +18,7 @@ extern void a2_setup_smp(void); | |||
| 18 | extern int a2_scom_startup_cpu(unsigned int lcpu, int thr_idx, | 18 | extern int a2_scom_startup_cpu(unsigned int lcpu, int thr_idx, |
| 19 | struct device_node *np); | 19 | struct device_node *np); |
| 20 | extern int smp_a2_cpu_bootable(unsigned int nr); | 20 | extern int smp_a2_cpu_bootable(unsigned int nr); |
| 21 | extern int __devinit smp_a2_kick_cpu(int nr); | 21 | extern int smp_a2_kick_cpu(int nr); |
| 22 | 22 | ||
| 23 | extern void opb_pic_init(void); | 23 | extern void opb_pic_init(void); |
| 24 | 24 | ||
diff --git a/arch/powerpc/platforms/wsp/wsp_pci.c b/arch/powerpc/platforms/wsp/wsp_pci.c index 1526551f9fe6..8e22f561d171 100644 --- a/arch/powerpc/platforms/wsp/wsp_pci.c +++ b/arch/powerpc/platforms/wsp/wsp_pci.c | |||
| @@ -402,7 +402,7 @@ static struct wsp_dma_table *wsp_pci_create_dma32_table(struct wsp_phb *phb, | |||
| 402 | return ERR_PTR(-ENOMEM); | 402 | return ERR_PTR(-ENOMEM); |
| 403 | } | 403 | } |
| 404 | 404 | ||
| 405 | static void __devinit wsp_pci_dma_dev_setup(struct pci_dev *pdev) | 405 | static void wsp_pci_dma_dev_setup(struct pci_dev *pdev) |
| 406 | { | 406 | { |
| 407 | struct dev_archdata *archdata = &pdev->dev.archdata; | 407 | struct dev_archdata *archdata = &pdev->dev.archdata; |
| 408 | struct pci_controller *hose = pci_bus_to_host(pdev->bus); | 408 | struct pci_controller *hose = pci_bus_to_host(pdev->bus); |
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c index b3fbb271be87..d9130630f7ef 100644 --- a/arch/powerpc/sysdev/bestcomm/bestcomm.c +++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | #define DRIVER_NAME "bestcomm-core" | 30 | #define DRIVER_NAME "bestcomm-core" |
| 31 | 31 | ||
| 32 | /* MPC5200 device tree match tables */ | 32 | /* MPC5200 device tree match tables */ |
| 33 | static struct of_device_id mpc52xx_sram_ids[] __devinitdata = { | 33 | static struct of_device_id mpc52xx_sram_ids[] = { |
| 34 | { .compatible = "fsl,mpc5200-sram", }, | 34 | { .compatible = "fsl,mpc5200-sram", }, |
| 35 | { .compatible = "mpc5200-sram", }, | 35 | { .compatible = "mpc5200-sram", }, |
| 36 | {} | 36 | {} |
| @@ -273,8 +273,7 @@ static u32 fdt_ops[] = { | |||
| 273 | }; | 273 | }; |
| 274 | 274 | ||
| 275 | 275 | ||
| 276 | static int __devinit | 276 | static int bcom_engine_init(void) |
| 277 | bcom_engine_init(void) | ||
| 278 | { | 277 | { |
| 279 | int task; | 278 | int task; |
| 280 | phys_addr_t tdt_pa, ctx_pa, var_pa, fdt_pa; | 279 | phys_addr_t tdt_pa, ctx_pa, var_pa, fdt_pa; |
| @@ -365,7 +364,7 @@ bcom_engine_cleanup(void) | |||
| 365 | /* OF platform driver */ | 364 | /* OF platform driver */ |
| 366 | /* ======================================================================== */ | 365 | /* ======================================================================== */ |
| 367 | 366 | ||
| 368 | static int __devinit mpc52xx_bcom_probe(struct platform_device *op) | 367 | static int mpc52xx_bcom_probe(struct platform_device *op) |
| 369 | { | 368 | { |
| 370 | struct device_node *ofn_sram; | 369 | struct device_node *ofn_sram; |
| 371 | struct resource res_bcom; | 370 | struct resource res_bcom; |
diff --git a/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c b/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c index d131c8a1cb15..8cf93f029e17 100644 --- a/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c +++ b/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c | |||
| @@ -69,7 +69,7 @@ static int __init get_offset_from_cmdline(char *str) | |||
| 69 | __setup("cache-sram-size=", get_size_from_cmdline); | 69 | __setup("cache-sram-size=", get_size_from_cmdline); |
| 70 | __setup("cache-sram-offset=", get_offset_from_cmdline); | 70 | __setup("cache-sram-offset=", get_offset_from_cmdline); |
| 71 | 71 | ||
| 72 | static int __devinit mpc85xx_l2ctlr_of_probe(struct platform_device *dev) | 72 | static int mpc85xx_l2ctlr_of_probe(struct platform_device *dev) |
| 73 | { | 73 | { |
| 74 | long rval; | 74 | long rval; |
| 75 | unsigned int rem; | 75 | unsigned int rem; |
| @@ -160,7 +160,7 @@ static int __devinit mpc85xx_l2ctlr_of_probe(struct platform_device *dev) | |||
| 160 | return 0; | 160 | return 0; |
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | static int __devexit mpc85xx_l2ctlr_of_remove(struct platform_device *dev) | 163 | static int mpc85xx_l2ctlr_of_remove(struct platform_device *dev) |
| 164 | { | 164 | { |
| 165 | BUG_ON(!l2ctlr); | 165 | BUG_ON(!l2ctlr); |
| 166 | 166 | ||
| @@ -213,7 +213,7 @@ static struct platform_driver mpc85xx_l2ctlr_of_platform_driver = { | |||
| 213 | .of_match_table = mpc85xx_l2ctlr_of_match, | 213 | .of_match_table = mpc85xx_l2ctlr_of_match, |
| 214 | }, | 214 | }, |
| 215 | .probe = mpc85xx_l2ctlr_of_probe, | 215 | .probe = mpc85xx_l2ctlr_of_probe, |
| 216 | .remove = __devexit_p(mpc85xx_l2ctlr_of_remove), | 216 | .remove = mpc85xx_l2ctlr_of_remove, |
| 217 | }; | 217 | }; |
| 218 | 218 | ||
| 219 | static __init int mpc85xx_l2ctlr_of_init(void) | 219 | static __init int mpc85xx_l2ctlr_of_init(void) |
diff --git a/arch/powerpc/sysdev/fsl_ifc.c b/arch/powerpc/sysdev/fsl_ifc.c index 097cc9d2585b..2a36fd6a9583 100644 --- a/arch/powerpc/sysdev/fsl_ifc.c +++ b/arch/powerpc/sysdev/fsl_ifc.c | |||
| @@ -73,7 +73,7 @@ int fsl_ifc_find(phys_addr_t addr_base) | |||
| 73 | } | 73 | } |
| 74 | EXPORT_SYMBOL(fsl_ifc_find); | 74 | EXPORT_SYMBOL(fsl_ifc_find); |
| 75 | 75 | ||
| 76 | static int __devinit fsl_ifc_ctrl_init(struct fsl_ifc_ctrl *ctrl) | 76 | static int fsl_ifc_ctrl_init(struct fsl_ifc_ctrl *ctrl) |
| 77 | { | 77 | { |
| 78 | struct fsl_ifc_regs __iomem *ifc = ctrl->regs; | 78 | struct fsl_ifc_regs __iomem *ifc = ctrl->regs; |
| 79 | 79 | ||
| @@ -211,7 +211,7 @@ static irqreturn_t fsl_ifc_ctrl_irq(int irqno, void *data) | |||
| 211 | * resources for the NAND banks themselves are allocated | 211 | * resources for the NAND banks themselves are allocated |
| 212 | * in the chip probe function. | 212 | * in the chip probe function. |
| 213 | */ | 213 | */ |
| 214 | static int __devinit fsl_ifc_ctrl_probe(struct platform_device *dev) | 214 | static int fsl_ifc_ctrl_probe(struct platform_device *dev) |
| 215 | { | 215 | { |
| 216 | int ret = 0; | 216 | int ret = 0; |
| 217 | 217 | ||
diff --git a/arch/powerpc/sysdev/fsl_lbc.c b/arch/powerpc/sysdev/fsl_lbc.c index 483126d7b3c0..300be2d06a26 100644 --- a/arch/powerpc/sysdev/fsl_lbc.c +++ b/arch/powerpc/sysdev/fsl_lbc.c | |||
| @@ -185,8 +185,8 @@ int fsl_upm_run_pattern(struct fsl_upm *upm, void __iomem *io_base, u32 mar) | |||
| 185 | } | 185 | } |
| 186 | EXPORT_SYMBOL(fsl_upm_run_pattern); | 186 | EXPORT_SYMBOL(fsl_upm_run_pattern); |
| 187 | 187 | ||
| 188 | static int __devinit fsl_lbc_ctrl_init(struct fsl_lbc_ctrl *ctrl, | 188 | static int fsl_lbc_ctrl_init(struct fsl_lbc_ctrl *ctrl, |
| 189 | struct device_node *node) | 189 | struct device_node *node) |
| 190 | { | 190 | { |
| 191 | struct fsl_lbc_regs __iomem *lbc = ctrl->regs; | 191 | struct fsl_lbc_regs __iomem *lbc = ctrl->regs; |
| 192 | 192 | ||
| @@ -273,7 +273,7 @@ static irqreturn_t fsl_lbc_ctrl_irq(int irqno, void *data) | |||
| 273 | * in the chip probe function. | 273 | * in the chip probe function. |
| 274 | */ | 274 | */ |
| 275 | 275 | ||
| 276 | static int __devinit fsl_lbc_ctrl_probe(struct platform_device *dev) | 276 | static int fsl_lbc_ctrl_probe(struct platform_device *dev) |
| 277 | { | 277 | { |
| 278 | int ret; | 278 | int ret; |
| 279 | 279 | ||
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index 63c5f04ea580..6e53d97abd3f 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c | |||
| @@ -333,9 +333,8 @@ static int fsl_of_msi_remove(struct platform_device *ofdev) | |||
| 333 | return 0; | 333 | return 0; |
| 334 | } | 334 | } |
| 335 | 335 | ||
| 336 | static int __devinit fsl_msi_setup_hwirq(struct fsl_msi *msi, | 336 | static int fsl_msi_setup_hwirq(struct fsl_msi *msi, struct platform_device *dev, |
| 337 | struct platform_device *dev, | 337 | int offset, int irq_index) |
| 338 | int offset, int irq_index) | ||
| 339 | { | 338 | { |
| 340 | struct fsl_msi_cascade_data *cascade_data = NULL; | 339 | struct fsl_msi_cascade_data *cascade_data = NULL; |
| 341 | int virt_msir; | 340 | int virt_msir; |
| @@ -363,7 +362,7 @@ static int __devinit fsl_msi_setup_hwirq(struct fsl_msi *msi, | |||
| 363 | } | 362 | } |
| 364 | 363 | ||
| 365 | static const struct of_device_id fsl_of_msi_ids[]; | 364 | static const struct of_device_id fsl_of_msi_ids[]; |
| 366 | static int __devinit fsl_of_msi_probe(struct platform_device *dev) | 365 | static int fsl_of_msi_probe(struct platform_device *dev) |
| 367 | { | 366 | { |
| 368 | const struct of_device_id *match; | 367 | const struct of_device_id *match; |
| 369 | struct fsl_msi *msi; | 368 | struct fsl_msi *msi; |
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 5ba325bff3a2..92a5915b1827 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | 36 | ||
| 37 | static int fsl_pcie_bus_fixup, is_mpc83xx_pci; | 37 | static int fsl_pcie_bus_fixup, is_mpc83xx_pci; |
| 38 | 38 | ||
| 39 | static void __devinit quirk_fsl_pcie_header(struct pci_dev *dev) | 39 | static void quirk_fsl_pcie_header(struct pci_dev *dev) |
| 40 | { | 40 | { |
| 41 | u8 hdr_type; | 41 | u8 hdr_type; |
| 42 | 42 | ||
| @@ -871,7 +871,7 @@ void fsl_pci_assign_primary(void) | |||
| 871 | } | 871 | } |
| 872 | } | 872 | } |
| 873 | 873 | ||
| 874 | static int __devinit fsl_pci_probe(struct platform_device *pdev) | 874 | static int fsl_pci_probe(struct platform_device *pdev) |
| 875 | { | 875 | { |
| 876 | int ret; | 876 | int ret; |
| 877 | struct device_node *node; | 877 | struct device_node *node; |
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 5b6f556094dd..e2fb3171f41b 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
| @@ -644,7 +644,7 @@ err_rio_regs: | |||
| 644 | 644 | ||
| 645 | /* The probe function for RapidIO peer-to-peer network. | 645 | /* The probe function for RapidIO peer-to-peer network. |
| 646 | */ | 646 | */ |
| 647 | static int __devinit fsl_of_rio_rpn_probe(struct platform_device *dev) | 647 | static int fsl_of_rio_rpn_probe(struct platform_device *dev) |
| 648 | { | 648 | { |
| 649 | printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n", | 649 | printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n", |
| 650 | dev->dev.of_node->full_name); | 650 | dev->dev.of_node->full_name); |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 9c6e535daad2..3b2efd41abf2 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
| @@ -1864,7 +1864,7 @@ int __init smp_mpic_probe(void) | |||
| 1864 | return nr_cpus; | 1864 | return nr_cpus; |
| 1865 | } | 1865 | } |
| 1866 | 1866 | ||
| 1867 | void __devinit smp_mpic_setup_cpu(int cpu) | 1867 | void smp_mpic_setup_cpu(int cpu) |
| 1868 | { | 1868 | { |
| 1869 | mpic_setup_this_cpu(); | 1869 | mpic_setup_this_cpu(); |
| 1870 | } | 1870 | } |
diff --git a/arch/powerpc/sysdev/mpic_msgr.c b/arch/powerpc/sysdev/mpic_msgr.c index e961f8c4a8f0..c75325865a85 100644 --- a/arch/powerpc/sysdev/mpic_msgr.c +++ b/arch/powerpc/sysdev/mpic_msgr.c | |||
| @@ -160,7 +160,7 @@ static int mpic_msgr_block_number(struct device_node *node) | |||
| 160 | 160 | ||
| 161 | /* The probe function for a single message register block. | 161 | /* The probe function for a single message register block. |
| 162 | */ | 162 | */ |
| 163 | static __devinit int mpic_msgr_probe(struct platform_device *dev) | 163 | static int mpic_msgr_probe(struct platform_device *dev) |
| 164 | { | 164 | { |
| 165 | void __iomem *msgr_block_addr; | 165 | void __iomem *msgr_block_addr; |
| 166 | int block_number; | 166 | int block_number; |
diff --git a/arch/powerpc/sysdev/mv64x60_pci.c b/arch/powerpc/sysdev/mv64x60_pci.c index 364b14d4754b..330d56613c5a 100644 --- a/arch/powerpc/sysdev/mv64x60_pci.c +++ b/arch/powerpc/sysdev/mv64x60_pci.c | |||
| @@ -104,7 +104,7 @@ subsys_initcall(mv64x60_sysfs_init); | |||
| 104 | 104 | ||
| 105 | #endif /* CONFIG_SYSFS */ | 105 | #endif /* CONFIG_SYSFS */ |
| 106 | 106 | ||
| 107 | static void __devinit mv64x60_pci_fixup_early(struct pci_dev *dev) | 107 | static void mv64x60_pci_fixup_early(struct pci_dev *dev) |
| 108 | { | 108 | { |
| 109 | /* | 109 | /* |
| 110 | * Set the host bridge hdr_type to an invalid value so that | 110 | * Set the host bridge hdr_type to an invalid value so that |
diff --git a/arch/powerpc/sysdev/ppc4xx_msi.c b/arch/powerpc/sysdev/ppc4xx_msi.c index 82c6702dcbab..43948da837a7 100644 --- a/arch/powerpc/sysdev/ppc4xx_msi.c +++ b/arch/powerpc/sysdev/ppc4xx_msi.c | |||
| @@ -220,7 +220,7 @@ static int ppc4xx_of_msi_remove(struct platform_device *dev) | |||
| 220 | return 0; | 220 | return 0; |
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | static int __devinit ppc4xx_msi_probe(struct platform_device *dev) | 223 | static int ppc4xx_msi_probe(struct platform_device *dev) |
| 224 | { | 224 | { |
| 225 | struct ppc4xx_msi *msi; | 225 | struct ppc4xx_msi *msi; |
| 226 | struct resource res; | 226 | struct resource res; |
diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 4b8e08b56f49..7e3ce78d4290 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile | |||
| @@ -24,8 +24,8 @@ CHECKFLAGS += -D__s390__ -msize-long | |||
| 24 | else | 24 | else |
| 25 | LD_BFD := elf64-s390 | 25 | LD_BFD := elf64-s390 |
| 26 | LDFLAGS := -m elf64_s390 | 26 | LDFLAGS := -m elf64_s390 |
| 27 | KBUILD_AFLAGS_MODULE += -fpic -D__PIC__ | 27 | KBUILD_AFLAGS_MODULE += -fPIC |
| 28 | KBUILD_CFLAGS_MODULE += -fpic -D__PIC__ | 28 | KBUILD_CFLAGS_MODULE += -fPIC |
| 29 | KBUILD_CFLAGS += -m64 | 29 | KBUILD_CFLAGS += -m64 |
| 30 | KBUILD_AFLAGS += -m64 | 30 | KBUILD_AFLAGS += -m64 |
| 31 | UTS_MACHINE := s390x | 31 | UTS_MACHINE := s390x |
diff --git a/arch/s390/include/asm/dma.h b/arch/s390/include/asm/dma.h index de015d85e3e5..bb9bdcd20864 100644 --- a/arch/s390/include/asm/dma.h +++ b/arch/s390/include/asm/dma.h | |||
| @@ -10,4 +10,10 @@ | |||
| 10 | */ | 10 | */ |
| 11 | #define MAX_DMA_ADDRESS 0x80000000 | 11 | #define MAX_DMA_ADDRESS 0x80000000 |
| 12 | 12 | ||
| 13 | #ifdef CONFIG_PCI | ||
| 14 | extern int isa_dma_bridge_buggy; | ||
| 15 | #else | ||
| 16 | #define isa_dma_bridge_buggy (0) | ||
| 17 | #endif | ||
| 18 | |||
| 13 | #endif /* _ASM_S390_DMA_H */ | 19 | #endif /* _ASM_S390_DMA_H */ |
diff --git a/arch/s390/include/asm/io.h b/arch/s390/include/asm/io.h index 16c3eb164f4f..27cb32185ce1 100644 --- a/arch/s390/include/asm/io.h +++ b/arch/s390/include/asm/io.h | |||
| @@ -85,6 +85,11 @@ static inline void iounmap(volatile void __iomem *addr) | |||
| 85 | #define __raw_writel zpci_write_u32 | 85 | #define __raw_writel zpci_write_u32 |
| 86 | #define __raw_writeq zpci_write_u64 | 86 | #define __raw_writeq zpci_write_u64 |
| 87 | 87 | ||
| 88 | #define readb_relaxed readb | ||
| 89 | #define readw_relaxed readw | ||
| 90 | #define readl_relaxed readl | ||
| 91 | #define readq_relaxed readq | ||
| 92 | |||
| 88 | #endif /* CONFIG_PCI */ | 93 | #endif /* CONFIG_PCI */ |
| 89 | 94 | ||
| 90 | #include <asm-generic/io.h> | 95 | #include <asm-generic/io.h> |
diff --git a/arch/s390/include/asm/irq.h b/arch/s390/include/asm/irq.h index e6972f85d2b0..7def77302d63 100644 --- a/arch/s390/include/asm/irq.h +++ b/arch/s390/include/asm/irq.h | |||
| @@ -2,43 +2,61 @@ | |||
| 2 | #define _ASM_IRQ_H | 2 | #define _ASM_IRQ_H |
| 3 | 3 | ||
| 4 | #include <linux/hardirq.h> | 4 | #include <linux/hardirq.h> |
| 5 | #include <linux/percpu.h> | ||
| 6 | #include <linux/cache.h> | ||
| 5 | #include <linux/types.h> | 7 | #include <linux/types.h> |
| 6 | 8 | ||
| 7 | enum interruption_class { | 9 | enum interruption_main_class { |
| 8 | EXTERNAL_INTERRUPT, | 10 | EXTERNAL_INTERRUPT, |
| 9 | IO_INTERRUPT, | 11 | IO_INTERRUPT, |
| 10 | EXTINT_CLK, | 12 | NR_IRQS |
| 11 | EXTINT_EXC, | 13 | }; |
| 12 | EXTINT_EMS, | 14 | |
| 13 | EXTINT_TMR, | 15 | enum interruption_class { |
| 14 | EXTINT_TLA, | 16 | IRQEXT_CLK, |
| 15 | EXTINT_PFL, | 17 | IRQEXT_EXC, |
| 16 | EXTINT_DSD, | 18 | IRQEXT_EMS, |
| 17 | EXTINT_VRT, | 19 | IRQEXT_TMR, |
| 18 | EXTINT_SCP, | 20 | IRQEXT_TLA, |
| 19 | EXTINT_IUC, | 21 | IRQEXT_PFL, |
| 20 | EXTINT_CMS, | 22 | IRQEXT_DSD, |
| 21 | EXTINT_CMC, | 23 | IRQEXT_VRT, |
| 22 | EXTINT_CMR, | 24 | IRQEXT_SCP, |
| 23 | IOINT_CIO, | 25 | IRQEXT_IUC, |
| 24 | IOINT_QAI, | 26 | IRQEXT_CMS, |
| 25 | IOINT_DAS, | 27 | IRQEXT_CMC, |
| 26 | IOINT_C15, | 28 | IRQEXT_CMR, |
| 27 | IOINT_C70, | 29 | IRQIO_CIO, |
| 28 | IOINT_TAP, | 30 | IRQIO_QAI, |
| 29 | IOINT_VMR, | 31 | IRQIO_DAS, |
| 30 | IOINT_LCS, | 32 | IRQIO_C15, |
| 31 | IOINT_CLW, | 33 | IRQIO_C70, |
| 32 | IOINT_CTC, | 34 | IRQIO_TAP, |
| 33 | IOINT_APB, | 35 | IRQIO_VMR, |
| 34 | IOINT_ADM, | 36 | IRQIO_LCS, |
| 35 | IOINT_CSC, | 37 | IRQIO_CLW, |
| 36 | IOINT_PCI, | 38 | IRQIO_CTC, |
| 37 | IOINT_MSI, | 39 | IRQIO_APB, |
| 40 | IRQIO_ADM, | ||
| 41 | IRQIO_CSC, | ||
| 42 | IRQIO_PCI, | ||
| 43 | IRQIO_MSI, | ||
| 38 | NMI_NMI, | 44 | NMI_NMI, |
| 39 | NR_IRQS, | 45 | CPU_RST, |
| 46 | NR_ARCH_IRQS | ||
| 40 | }; | 47 | }; |
| 41 | 48 | ||
| 49 | struct irq_stat { | ||
| 50 | unsigned int irqs[NR_ARCH_IRQS]; | ||
| 51 | }; | ||
| 52 | |||
| 53 | DECLARE_PER_CPU_SHARED_ALIGNED(struct irq_stat, irq_stat); | ||
| 54 | |||
| 55 | static __always_inline void inc_irq_stat(enum interruption_class irq) | ||
| 56 | { | ||
| 57 | __get_cpu_var(irq_stat).irqs[irq]++; | ||
| 58 | } | ||
| 59 | |||
| 42 | struct ext_code { | 60 | struct ext_code { |
| 43 | unsigned short subcode; | 61 | unsigned short subcode; |
| 44 | unsigned short code; | 62 | unsigned short code; |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index c928dc1938f2..c1d7930a82f4 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
| @@ -1387,10 +1387,7 @@ static inline int has_transparent_hugepage(void) | |||
| 1387 | 1387 | ||
| 1388 | static inline unsigned long pmd_pfn(pmd_t pmd) | 1388 | static inline unsigned long pmd_pfn(pmd_t pmd) |
| 1389 | { | 1389 | { |
| 1390 | if (pmd_trans_huge(pmd)) | 1390 | return pmd_val(pmd) >> PAGE_SHIFT; |
| 1391 | return pmd_val(pmd) >> HPAGE_SHIFT; | ||
| 1392 | else | ||
| 1393 | return pmd_val(pmd) >> PAGE_SHIFT; | ||
| 1394 | } | 1391 | } |
| 1395 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ | 1392 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ |
| 1396 | 1393 | ||
diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h index fba4d66788a2..4c060bb5b8ea 100644 --- a/arch/s390/include/asm/timex.h +++ b/arch/s390/include/asm/timex.h | |||
| @@ -128,4 +128,32 @@ static inline unsigned long long get_clock_monotonic(void) | |||
| 128 | return get_clock_xt() - sched_clock_base_cc; | 128 | return get_clock_xt() - sched_clock_base_cc; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | /** | ||
| 132 | * tod_to_ns - convert a TOD format value to nanoseconds | ||
| 133 | * @todval: to be converted TOD format value | ||
| 134 | * Returns: number of nanoseconds that correspond to the TOD format value | ||
| 135 | * | ||
| 136 | * Converting a 64 Bit TOD format value to nanoseconds means that the value | ||
| 137 | * must be divided by 4.096. In order to achieve that we multiply with 125 | ||
| 138 | * and divide by 512: | ||
| 139 | * | ||
| 140 | * ns = (todval * 125) >> 9; | ||
| 141 | * | ||
| 142 | * In order to avoid an overflow with the multiplication we can rewrite this. | ||
| 143 | * With a split todval == 2^32 * th + tl (th upper 32 bits, tl lower 32 bits) | ||
| 144 | * we end up with | ||
| 145 | * | ||
| 146 | * ns = ((2^32 * th + tl) * 125 ) >> 9; | ||
| 147 | * -> ns = (2^23 * th * 125) + ((tl * 125) >> 9); | ||
| 148 | * | ||
| 149 | */ | ||
| 150 | static inline unsigned long long tod_to_ns(unsigned long long todval) | ||
| 151 | { | ||
| 152 | unsigned long long ns; | ||
| 153 | |||
| 154 | ns = ((todval >> 32) << 23) * 125; | ||
| 155 | ns += ((todval & 0xffffffff) * 125) >> 9; | ||
| 156 | return ns; | ||
| 157 | } | ||
| 158 | |||
| 131 | #endif | 159 | #endif |
diff --git a/arch/s390/include/uapi/asm/unistd.h b/arch/s390/include/uapi/asm/unistd.h index 63e6078699f1..864f693c237f 100644 --- a/arch/s390/include/uapi/asm/unistd.h +++ b/arch/s390/include/uapi/asm/unistd.h | |||
| @@ -279,7 +279,8 @@ | |||
| 279 | #define __NR_process_vm_writev 341 | 279 | #define __NR_process_vm_writev 341 |
| 280 | #define __NR_s390_runtime_instr 342 | 280 | #define __NR_s390_runtime_instr 342 |
| 281 | #define __NR_kcmp 343 | 281 | #define __NR_kcmp 343 |
| 282 | #define NR_syscalls 344 | 282 | #define __NR_finit_module 344 |
| 283 | #define NR_syscalls 345 | ||
| 283 | 284 | ||
| 284 | /* | 285 | /* |
| 285 | * There are some system calls that are not present on 64 bit, some | 286 | * There are some system calls that are not present on 64 bit, some |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 827e094a2f49..9b9a805656b5 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
| @@ -1659,3 +1659,9 @@ ENTRY(sys_kcmp_wrapper) | |||
| 1659 | llgfr %r5,%r5 # unsigned long | 1659 | llgfr %r5,%r5 # unsigned long |
| 1660 | llgfr %r6,%r6 # unsigned long | 1660 | llgfr %r6,%r6 # unsigned long |
| 1661 | jg sys_kcmp | 1661 | jg sys_kcmp |
| 1662 | |||
| 1663 | ENTRY(sys_finit_module_wrapper) | ||
| 1664 | lgfr %r2,%r2 # int | ||
| 1665 | llgtr %r3,%r3 # const char __user * | ||
| 1666 | lgfr %r4,%r4 # int | ||
| 1667 | jg sys_finit_module | ||
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index ba500d8dc392..4e8215e0d4b6 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
| @@ -1127,13 +1127,14 @@ debug_register_view(debug_info_t * id, struct debug_view *view) | |||
| 1127 | if (i == DEBUG_MAX_VIEWS) { | 1127 | if (i == DEBUG_MAX_VIEWS) { |
| 1128 | pr_err("Registering view %s/%s would exceed the maximum " | 1128 | pr_err("Registering view %s/%s would exceed the maximum " |
| 1129 | "number of views %i\n", id->name, view->name, i); | 1129 | "number of views %i\n", id->name, view->name, i); |
| 1130 | debugfs_remove(pde); | ||
| 1131 | rc = -1; | 1130 | rc = -1; |
| 1132 | } else { | 1131 | } else { |
| 1133 | id->views[i] = view; | 1132 | id->views[i] = view; |
| 1134 | id->debugfs_entries[i] = pde; | 1133 | id->debugfs_entries[i] = pde; |
| 1135 | } | 1134 | } |
| 1136 | spin_unlock_irqrestore(&id->lock, flags); | 1135 | spin_unlock_irqrestore(&id->lock, flags); |
| 1136 | if (rc) | ||
| 1137 | debugfs_remove(pde); | ||
| 1137 | out: | 1138 | out: |
| 1138 | return rc; | 1139 | return rc; |
| 1139 | } | 1140 | } |
| @@ -1146,9 +1147,9 @@ EXPORT_SYMBOL(debug_register_view); | |||
| 1146 | int | 1147 | int |
| 1147 | debug_unregister_view(debug_info_t * id, struct debug_view *view) | 1148 | debug_unregister_view(debug_info_t * id, struct debug_view *view) |
| 1148 | { | 1149 | { |
| 1149 | int rc = 0; | 1150 | struct dentry *dentry = NULL; |
| 1150 | int i; | ||
| 1151 | unsigned long flags; | 1151 | unsigned long flags; |
| 1152 | int i, rc = 0; | ||
| 1152 | 1153 | ||
| 1153 | if (!id) | 1154 | if (!id) |
| 1154 | goto out; | 1155 | goto out; |
| @@ -1160,10 +1161,12 @@ debug_unregister_view(debug_info_t * id, struct debug_view *view) | |||
| 1160 | if (i == DEBUG_MAX_VIEWS) | 1161 | if (i == DEBUG_MAX_VIEWS) |
| 1161 | rc = -1; | 1162 | rc = -1; |
| 1162 | else { | 1163 | else { |
| 1163 | debugfs_remove(id->debugfs_entries[i]); | 1164 | dentry = id->debugfs_entries[i]; |
| 1164 | id->views[i] = NULL; | 1165 | id->views[i] = NULL; |
| 1166 | id->debugfs_entries[i] = NULL; | ||
| 1165 | } | 1167 | } |
| 1166 | spin_unlock_irqrestore(&id->lock, flags); | 1168 | spin_unlock_irqrestore(&id->lock, flags); |
| 1169 | debugfs_remove(dentry); | ||
| 1167 | out: | 1170 | out: |
| 1168 | return rc; | 1171 | return rc; |
| 1169 | } | 1172 | } |
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index bf24293970ce..9df824ea1667 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c | |||
| @@ -24,43 +24,65 @@ | |||
| 24 | #include <asm/irq.h> | 24 | #include <asm/irq.h> |
| 25 | #include "entry.h" | 25 | #include "entry.h" |
| 26 | 26 | ||
| 27 | DEFINE_PER_CPU_SHARED_ALIGNED(struct irq_stat, irq_stat); | ||
| 28 | EXPORT_PER_CPU_SYMBOL_GPL(irq_stat); | ||
| 29 | |||
| 27 | struct irq_class { | 30 | struct irq_class { |
| 28 | char *name; | 31 | char *name; |
| 29 | char *desc; | 32 | char *desc; |
| 30 | }; | 33 | }; |
| 31 | 34 | ||
| 32 | static const struct irq_class intrclass_names[] = { | 35 | /* |
| 36 | * The list of "main" irq classes on s390. This is the list of interrrupts | ||
| 37 | * that appear both in /proc/stat ("intr" line) and /proc/interrupts. | ||
| 38 | * Historically only external and I/O interrupts have been part of /proc/stat. | ||
| 39 | * We can't add the split external and I/O sub classes since the first field | ||
| 40 | * in the "intr" line in /proc/stat is supposed to be the sum of all other | ||
| 41 | * fields. | ||
| 42 | * Since the external and I/O interrupt fields are already sums we would end | ||
| 43 | * up with having a sum which accounts each interrupt twice. | ||
| 44 | */ | ||
| 45 | static const struct irq_class irqclass_main_desc[NR_IRQS] = { | ||
| 33 | [EXTERNAL_INTERRUPT] = {.name = "EXT"}, | 46 | [EXTERNAL_INTERRUPT] = {.name = "EXT"}, |
| 34 | [IO_INTERRUPT] = {.name = "I/O"}, | 47 | [IO_INTERRUPT] = {.name = "I/O"} |
| 35 | [EXTINT_CLK] = {.name = "CLK", .desc = "[EXT] Clock Comparator"}, | 48 | }; |
| 36 | [EXTINT_EXC] = {.name = "EXC", .desc = "[EXT] External Call"}, | 49 | |
| 37 | [EXTINT_EMS] = {.name = "EMS", .desc = "[EXT] Emergency Signal"}, | 50 | /* |
| 38 | [EXTINT_TMR] = {.name = "TMR", .desc = "[EXT] CPU Timer"}, | 51 | * The list of split external and I/O interrupts that appear only in |
| 39 | [EXTINT_TLA] = {.name = "TAL", .desc = "[EXT] Timing Alert"}, | 52 | * /proc/interrupts. |
| 40 | [EXTINT_PFL] = {.name = "PFL", .desc = "[EXT] Pseudo Page Fault"}, | 53 | * In addition this list contains non external / I/O events like NMIs. |
| 41 | [EXTINT_DSD] = {.name = "DSD", .desc = "[EXT] DASD Diag"}, | 54 | */ |
| 42 | [EXTINT_VRT] = {.name = "VRT", .desc = "[EXT] Virtio"}, | 55 | static const struct irq_class irqclass_sub_desc[NR_ARCH_IRQS] = { |
| 43 | [EXTINT_SCP] = {.name = "SCP", .desc = "[EXT] Service Call"}, | 56 | [IRQEXT_CLK] = {.name = "CLK", .desc = "[EXT] Clock Comparator"}, |
| 44 | [EXTINT_IUC] = {.name = "IUC", .desc = "[EXT] IUCV"}, | 57 | [IRQEXT_EXC] = {.name = "EXC", .desc = "[EXT] External Call"}, |
| 45 | [EXTINT_CMS] = {.name = "CMS", .desc = "[EXT] CPU-Measurement: Sampling"}, | 58 | [IRQEXT_EMS] = {.name = "EMS", .desc = "[EXT] Emergency Signal"}, |
| 46 | [EXTINT_CMC] = {.name = "CMC", .desc = "[EXT] CPU-Measurement: Counter"}, | 59 | [IRQEXT_TMR] = {.name = "TMR", .desc = "[EXT] CPU Timer"}, |
| 47 | [EXTINT_CMR] = {.name = "CMR", .desc = "[EXT] CPU-Measurement: RI"}, | 60 | [IRQEXT_TLA] = {.name = "TAL", .desc = "[EXT] Timing Alert"}, |
| 48 | [IOINT_CIO] = {.name = "CIO", .desc = "[I/O] Common I/O Layer Interrupt"}, | 61 | [IRQEXT_PFL] = {.name = "PFL", .desc = "[EXT] Pseudo Page Fault"}, |
| 49 | [IOINT_QAI] = {.name = "QAI", .desc = "[I/O] QDIO Adapter Interrupt"}, | 62 | [IRQEXT_DSD] = {.name = "DSD", .desc = "[EXT] DASD Diag"}, |
| 50 | [IOINT_DAS] = {.name = "DAS", .desc = "[I/O] DASD"}, | 63 | [IRQEXT_VRT] = {.name = "VRT", .desc = "[EXT] Virtio"}, |
| 51 | [IOINT_C15] = {.name = "C15", .desc = "[I/O] 3215"}, | 64 | [IRQEXT_SCP] = {.name = "SCP", .desc = "[EXT] Service Call"}, |
| 52 | [IOINT_C70] = {.name = "C70", .desc = "[I/O] 3270"}, | 65 | [IRQEXT_IUC] = {.name = "IUC", .desc = "[EXT] IUCV"}, |
| 53 | [IOINT_TAP] = {.name = "TAP", .desc = "[I/O] Tape"}, | 66 | [IRQEXT_CMS] = {.name = "CMS", .desc = "[EXT] CPU-Measurement: Sampling"}, |
| 54 | [IOINT_VMR] = {.name = "VMR", .desc = "[I/O] Unit Record Devices"}, | 67 | [IRQEXT_CMC] = {.name = "CMC", .desc = "[EXT] CPU-Measurement: Counter"}, |
| 55 | [IOINT_LCS] = {.name = "LCS", .desc = "[I/O] LCS"}, | 68 | [IRQEXT_CMR] = {.name = "CMR", .desc = "[EXT] CPU-Measurement: RI"}, |
| 56 | [IOINT_CLW] = {.name = "CLW", .desc = "[I/O] CLAW"}, | 69 | [IRQIO_CIO] = {.name = "CIO", .desc = "[I/O] Common I/O Layer Interrupt"}, |
| 57 | [IOINT_CTC] = {.name = "CTC", .desc = "[I/O] CTC"}, | 70 | [IRQIO_QAI] = {.name = "QAI", .desc = "[I/O] QDIO Adapter Interrupt"}, |
| 58 | [IOINT_APB] = {.name = "APB", .desc = "[I/O] AP Bus"}, | 71 | [IRQIO_DAS] = {.name = "DAS", .desc = "[I/O] DASD"}, |
| 59 | [IOINT_ADM] = {.name = "ADM", .desc = "[I/O] EADM Subchannel"}, | 72 | [IRQIO_C15] = {.name = "C15", .desc = "[I/O] 3215"}, |
| 60 | [IOINT_CSC] = {.name = "CSC", .desc = "[I/O] CHSC Subchannel"}, | 73 | [IRQIO_C70] = {.name = "C70", .desc = "[I/O] 3270"}, |
| 61 | [IOINT_PCI] = {.name = "PCI", .desc = "[I/O] PCI Interrupt" }, | 74 | [IRQIO_TAP] = {.name = "TAP", .desc = "[I/O] Tape"}, |
| 62 | [IOINT_MSI] = {.name = "MSI", .desc = "[I/O] MSI Interrupt" }, | 75 | [IRQIO_VMR] = {.name = "VMR", .desc = "[I/O] Unit Record Devices"}, |
| 76 | [IRQIO_LCS] = {.name = "LCS", .desc = "[I/O] LCS"}, | ||
| 77 | [IRQIO_CLW] = {.name = "CLW", .desc = "[I/O] CLAW"}, | ||
| 78 | [IRQIO_CTC] = {.name = "CTC", .desc = "[I/O] CTC"}, | ||
| 79 | [IRQIO_APB] = {.name = "APB", .desc = "[I/O] AP Bus"}, | ||
| 80 | [IRQIO_ADM] = {.name = "ADM", .desc = "[I/O] EADM Subchannel"}, | ||
| 81 | [IRQIO_CSC] = {.name = "CSC", .desc = "[I/O] CHSC Subchannel"}, | ||
| 82 | [IRQIO_PCI] = {.name = "PCI", .desc = "[I/O] PCI Interrupt" }, | ||
| 83 | [IRQIO_MSI] = {.name = "MSI", .desc = "[I/O] MSI Interrupt" }, | ||
| 63 | [NMI_NMI] = {.name = "NMI", .desc = "[NMI] Machine Check"}, | 84 | [NMI_NMI] = {.name = "NMI", .desc = "[NMI] Machine Check"}, |
| 85 | [CPU_RST] = {.name = "RST", .desc = "[CPU] CPU Restart"}, | ||
| 64 | }; | 86 | }; |
| 65 | 87 | ||
| 66 | /* | 88 | /* |
| @@ -68,30 +90,34 @@ static const struct irq_class intrclass_names[] = { | |||
| 68 | */ | 90 | */ |
| 69 | int show_interrupts(struct seq_file *p, void *v) | 91 | int show_interrupts(struct seq_file *p, void *v) |
| 70 | { | 92 | { |
| 71 | int i = *(loff_t *) v, j; | 93 | int irq = *(loff_t *) v; |
| 94 | int cpu; | ||
| 72 | 95 | ||
| 73 | get_online_cpus(); | 96 | get_online_cpus(); |
| 74 | if (i == 0) { | 97 | if (irq == 0) { |
| 75 | seq_puts(p, " "); | 98 | seq_puts(p, " "); |
| 76 | for_each_online_cpu(j) | 99 | for_each_online_cpu(cpu) |
| 77 | seq_printf(p, "CPU%d ",j); | 100 | seq_printf(p, "CPU%d ", cpu); |
| 78 | seq_putc(p, '\n'); | 101 | seq_putc(p, '\n'); |
| 79 | } | 102 | } |
| 80 | 103 | if (irq < NR_IRQS) { | |
| 81 | if (i < NR_IRQS) { | 104 | seq_printf(p, "%s: ", irqclass_main_desc[irq].name); |
| 82 | seq_printf(p, "%s: ", intrclass_names[i].name); | 105 | for_each_online_cpu(cpu) |
| 83 | #ifndef CONFIG_SMP | 106 | seq_printf(p, "%10u ", kstat_cpu(cpu).irqs[irq]); |
| 84 | seq_printf(p, "%10u ", kstat_irqs(i)); | 107 | seq_putc(p, '\n'); |
| 85 | #else | 108 | goto skip_arch_irqs; |
| 86 | for_each_online_cpu(j) | 109 | } |
| 87 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | 110 | for (irq = 0; irq < NR_ARCH_IRQS; irq++) { |
| 88 | #endif | 111 | seq_printf(p, "%s: ", irqclass_sub_desc[irq].name); |
| 89 | if (intrclass_names[i].desc) | 112 | for_each_online_cpu(cpu) |
| 90 | seq_printf(p, " %s", intrclass_names[i].desc); | 113 | seq_printf(p, "%10u ", per_cpu(irq_stat, cpu).irqs[irq]); |
| 91 | seq_putc(p, '\n'); | 114 | if (irqclass_sub_desc[irq].desc) |
| 92 | } | 115 | seq_printf(p, " %s", irqclass_sub_desc[irq].desc); |
| 116 | seq_putc(p, '\n'); | ||
| 117 | } | ||
| 118 | skip_arch_irqs: | ||
| 93 | put_online_cpus(); | 119 | put_online_cpus(); |
| 94 | return 0; | 120 | return 0; |
| 95 | } | 121 | } |
| 96 | 122 | ||
| 97 | /* | 123 | /* |
| @@ -222,7 +248,7 @@ void __irq_entry do_extint(struct pt_regs *regs, struct ext_code ext_code, | |||
| 222 | /* Serve timer interrupts first. */ | 248 | /* Serve timer interrupts first. */ |
| 223 | clock_comparator_work(); | 249 | clock_comparator_work(); |
| 224 | } | 250 | } |
| 225 | kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; | 251 | kstat_incr_irqs_this_cpu(EXTERNAL_INTERRUPT, NULL); |
| 226 | if (ext_code.code != 0x1004) | 252 | if (ext_code.code != 0x1004) |
| 227 | __get_cpu_var(s390_idle).nohz_delay = 1; | 253 | __get_cpu_var(s390_idle).nohz_delay = 1; |
| 228 | 254 | ||
diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c index a6daa5c5cdb0..7918fbea36bb 100644 --- a/arch/s390/kernel/nmi.c +++ b/arch/s390/kernel/nmi.c | |||
| @@ -254,7 +254,7 @@ void notrace s390_do_machine_check(struct pt_regs *regs) | |||
| 254 | int umode; | 254 | int umode; |
| 255 | 255 | ||
| 256 | nmi_enter(); | 256 | nmi_enter(); |
| 257 | kstat_cpu(smp_processor_id()).irqs[NMI_NMI]++; | 257 | inc_irq_stat(NMI_NMI); |
| 258 | mci = (struct mci *) &S390_lowcore.mcck_interruption_code; | 258 | mci = (struct mci *) &S390_lowcore.mcck_interruption_code; |
| 259 | mcck = &__get_cpu_var(cpu_mcck); | 259 | mcck = &__get_cpu_var(cpu_mcck); |
| 260 | umode = user_mode(regs); | 260 | umode = user_mode(regs); |
diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c index c4e7269d4a09..86ec7447e1f5 100644 --- a/arch/s390/kernel/perf_cpum_cf.c +++ b/arch/s390/kernel/perf_cpum_cf.c | |||
| @@ -229,7 +229,7 @@ static void cpumf_measurement_alert(struct ext_code ext_code, | |||
| 229 | if (!(alert & CPU_MF_INT_CF_MASK)) | 229 | if (!(alert & CPU_MF_INT_CF_MASK)) |
| 230 | return; | 230 | return; |
| 231 | 231 | ||
| 232 | kstat_cpu(smp_processor_id()).irqs[EXTINT_CMC]++; | 232 | inc_irq_stat(IRQEXT_CMC); |
| 233 | cpuhw = &__get_cpu_var(cpu_hw_events); | 233 | cpuhw = &__get_cpu_var(cpu_hw_events); |
| 234 | 234 | ||
| 235 | /* Measurement alerts are shared and might happen when the PMU | 235 | /* Measurement alerts are shared and might happen when the PMU |
diff --git a/arch/s390/kernel/runtime_instr.c b/arch/s390/kernel/runtime_instr.c index 61066f6f71a5..077a99389b07 100644 --- a/arch/s390/kernel/runtime_instr.c +++ b/arch/s390/kernel/runtime_instr.c | |||
| @@ -71,7 +71,7 @@ static void runtime_instr_int_handler(struct ext_code ext_code, | |||
| 71 | if (!(param32 & CPU_MF_INT_RI_MASK)) | 71 | if (!(param32 & CPU_MF_INT_RI_MASK)) |
| 72 | return; | 72 | return; |
| 73 | 73 | ||
| 74 | kstat_cpu(smp_processor_id()).irqs[EXTINT_CMR]++; | 74 | inc_irq_stat(IRQEXT_CMR); |
| 75 | 75 | ||
| 76 | if (!current->thread.ri_cb) | 76 | if (!current->thread.ri_cb) |
| 77 | return; | 77 | return; |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 2568590973ad..a5360de85ec7 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 16 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
| 17 | 17 | ||
| 18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
| 19 | #include <linux/module.h> | 19 | #include <linux/export.h> |
| 20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
| 21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
| 22 | #include <linux/memblock.h> | 22 | #include <linux/memblock.h> |
| @@ -289,6 +289,7 @@ void machine_power_off(void) | |||
| 289 | * Dummy power off function. | 289 | * Dummy power off function. |
| 290 | */ | 290 | */ |
| 291 | void (*pm_power_off)(void) = machine_power_off; | 291 | void (*pm_power_off)(void) = machine_power_off; |
| 292 | EXPORT_SYMBOL_GPL(pm_power_off); | ||
| 292 | 293 | ||
| 293 | static int __init early_parse_mem(char *p) | 294 | static int __init early_parse_mem(char *p) |
| 294 | { | 295 | { |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index ea431e551c6b..7433a2f9e5cc 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
| @@ -433,9 +433,9 @@ static void do_ext_call_interrupt(struct ext_code ext_code, | |||
| 433 | 433 | ||
| 434 | cpu = smp_processor_id(); | 434 | cpu = smp_processor_id(); |
| 435 | if (ext_code.code == 0x1202) | 435 | if (ext_code.code == 0x1202) |
| 436 | kstat_cpu(cpu).irqs[EXTINT_EXC]++; | 436 | inc_irq_stat(IRQEXT_EXC); |
| 437 | else | 437 | else |
| 438 | kstat_cpu(cpu).irqs[EXTINT_EMS]++; | 438 | inc_irq_stat(IRQEXT_EMS); |
| 439 | /* | 439 | /* |
| 440 | * handle bit signal external calls | 440 | * handle bit signal external calls |
| 441 | */ | 441 | */ |
| @@ -623,9 +623,9 @@ static struct sclp_cpu_info *smp_get_cpu_info(void) | |||
| 623 | return info; | 623 | return info; |
| 624 | } | 624 | } |
| 625 | 625 | ||
| 626 | static int __devinit smp_add_present_cpu(int cpu); | 626 | static int __cpuinit smp_add_present_cpu(int cpu); |
| 627 | 627 | ||
| 628 | static int __devinit __smp_rescan_cpus(struct sclp_cpu_info *info, | 628 | static int __cpuinit __smp_rescan_cpus(struct sclp_cpu_info *info, |
| 629 | int sysfs_add) | 629 | int sysfs_add) |
| 630 | { | 630 | { |
| 631 | struct pcpu *pcpu; | 631 | struct pcpu *pcpu; |
| @@ -709,6 +709,7 @@ static void __cpuinit smp_start_secondary(void *cpuvoid) | |||
| 709 | pfault_init(); | 709 | pfault_init(); |
| 710 | notify_cpu_starting(smp_processor_id()); | 710 | notify_cpu_starting(smp_processor_id()); |
| 711 | set_cpu_online(smp_processor_id(), true); | 711 | set_cpu_online(smp_processor_id(), true); |
| 712 | inc_irq_stat(CPU_RST); | ||
| 712 | local_irq_enable(); | 713 | local_irq_enable(); |
| 713 | /* cpu_idle will call schedule for us */ | 714 | /* cpu_idle will call schedule for us */ |
| 714 | cpu_idle(); | 715 | cpu_idle(); |
| @@ -986,7 +987,7 @@ static int __cpuinit smp_cpu_notify(struct notifier_block *self, | |||
| 986 | return notifier_from_errno(err); | 987 | return notifier_from_errno(err); |
| 987 | } | 988 | } |
| 988 | 989 | ||
| 989 | static int __devinit smp_add_present_cpu(int cpu) | 990 | static int __cpuinit smp_add_present_cpu(int cpu) |
| 990 | { | 991 | { |
| 991 | struct cpu *c = &pcpu_devices[cpu].cpu; | 992 | struct cpu *c = &pcpu_devices[cpu].cpu; |
| 992 | struct device *s = &c->dev; | 993 | struct device *s = &c->dev; |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 48174850f3b0..6a6c61f94dd3 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
| @@ -352,3 +352,4 @@ SYSCALL(sys_process_vm_readv,sys_process_vm_readv,compat_sys_process_vm_readv_wr | |||
| 352 | SYSCALL(sys_process_vm_writev,sys_process_vm_writev,compat_sys_process_vm_writev_wrapper) | 352 | SYSCALL(sys_process_vm_writev,sys_process_vm_writev,compat_sys_process_vm_writev_wrapper) |
| 353 | SYSCALL(sys_ni_syscall,sys_s390_runtime_instr,sys_s390_runtime_instr_wrapper) | 353 | SYSCALL(sys_ni_syscall,sys_s390_runtime_instr,sys_s390_runtime_instr_wrapper) |
| 354 | SYSCALL(sys_kcmp,sys_kcmp,sys_kcmp_wrapper) | 354 | SYSCALL(sys_kcmp,sys_kcmp,sys_kcmp_wrapper) |
| 355 | SYSCALL(sys_finit_module,sys_finit_module,sys_finit_module_wrapper) | ||
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 7fcd690d42c7..a5f4f5a1d24b 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
| @@ -63,7 +63,7 @@ static DEFINE_PER_CPU(struct clock_event_device, comparators); | |||
| 63 | */ | 63 | */ |
| 64 | unsigned long long notrace __kprobes sched_clock(void) | 64 | unsigned long long notrace __kprobes sched_clock(void) |
| 65 | { | 65 | { |
| 66 | return (get_clock_monotonic() * 125) >> 9; | 66 | return tod_to_ns(get_clock_monotonic()); |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | /* | 69 | /* |
| @@ -168,7 +168,7 @@ static void clock_comparator_interrupt(struct ext_code ext_code, | |||
| 168 | unsigned int param32, | 168 | unsigned int param32, |
| 169 | unsigned long param64) | 169 | unsigned long param64) |
| 170 | { | 170 | { |
| 171 | kstat_cpu(smp_processor_id()).irqs[EXTINT_CLK]++; | 171 | inc_irq_stat(IRQEXT_CLK); |
| 172 | if (S390_lowcore.clock_comparator == -1ULL) | 172 | if (S390_lowcore.clock_comparator == -1ULL) |
| 173 | set_clock_comparator(S390_lowcore.clock_comparator); | 173 | set_clock_comparator(S390_lowcore.clock_comparator); |
| 174 | } | 174 | } |
| @@ -179,7 +179,7 @@ static void stp_timing_alert(struct stp_irq_parm *); | |||
| 179 | static void timing_alert_interrupt(struct ext_code ext_code, | 179 | static void timing_alert_interrupt(struct ext_code ext_code, |
| 180 | unsigned int param32, unsigned long param64) | 180 | unsigned int param32, unsigned long param64) |
| 181 | { | 181 | { |
| 182 | kstat_cpu(smp_processor_id()).irqs[EXTINT_TLA]++; | 182 | inc_irq_stat(IRQEXT_TLA); |
| 183 | if (param32 & 0x00c40000) | 183 | if (param32 & 0x00c40000) |
| 184 | etr_timing_alert((struct etr_irq_parm *) ¶m32); | 184 | etr_timing_alert((struct etr_irq_parm *) ¶m32); |
| 185 | if (param32 & 0x00038000) | 185 | if (param32 & 0x00038000) |
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index f1aba87cceb8..4b2e3e317004 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <linux/bootmem.h> | 10 | #include <linux/bootmem.h> |
| 11 | #include <linux/cpuset.h> | 11 | #include <linux/cpuset.h> |
| 12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
| 13 | #include <linux/export.h> | ||
| 13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
| 14 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
| 15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
| @@ -42,6 +43,7 @@ static struct mask_info socket_info; | |||
| 42 | static struct mask_info book_info; | 43 | static struct mask_info book_info; |
| 43 | 44 | ||
| 44 | struct cpu_topology_s390 cpu_topology[NR_CPUS]; | 45 | struct cpu_topology_s390 cpu_topology[NR_CPUS]; |
| 46 | EXPORT_SYMBOL_GPL(cpu_topology); | ||
| 45 | 47 | ||
| 46 | static cpumask_t cpu_group_map(struct mask_info *info, unsigned int cpu) | 48 | static cpumask_t cpu_group_map(struct mask_info *info, unsigned int cpu) |
| 47 | { | 49 | { |
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index c30615e605ac..82c481ddef76 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
| @@ -408,7 +408,7 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu) | |||
| 408 | return 0; | 408 | return 0; |
| 409 | } | 409 | } |
| 410 | 410 | ||
| 411 | sltime = ((vcpu->arch.sie_block->ckc - now)*125)>>9; | 411 | sltime = tod_to_ns(vcpu->arch.sie_block->ckc - now); |
| 412 | 412 | ||
| 413 | hrtimer_start(&vcpu->arch.ckc_timer, ktime_set (0, sltime) , HRTIMER_MODE_REL); | 413 | hrtimer_start(&vcpu->arch.ckc_timer, ktime_set (0, sltime) , HRTIMER_MODE_REL); |
| 414 | VCPU_EVENT(vcpu, 5, "enabled wait via clock comparator: %llx ns", sltime); | 414 | VCPU_EVENT(vcpu, 5, "enabled wait via clock comparator: %llx ns", sltime); |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index c9011bfaabbe..f090e819bf71 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
| @@ -613,7 +613,9 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) | |||
| 613 | kvm_s390_deliver_pending_interrupts(vcpu); | 613 | kvm_s390_deliver_pending_interrupts(vcpu); |
| 614 | 614 | ||
| 615 | vcpu->arch.sie_block->icptcode = 0; | 615 | vcpu->arch.sie_block->icptcode = 0; |
| 616 | preempt_disable(); | ||
| 616 | kvm_guest_enter(); | 617 | kvm_guest_enter(); |
| 618 | preempt_enable(); | ||
| 617 | VCPU_EVENT(vcpu, 6, "entering sie flags %x", | 619 | VCPU_EVENT(vcpu, 6, "entering sie flags %x", |
| 618 | atomic_read(&vcpu->arch.sie_block->cpuflags)); | 620 | atomic_read(&vcpu->arch.sie_block->cpuflags)); |
| 619 | trace_kvm_s390_sie_enter(vcpu, | 621 | trace_kvm_s390_sie_enter(vcpu, |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 42601d6e166f..2fb9e63b8fc4 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
| @@ -569,7 +569,7 @@ static void pfault_interrupt(struct ext_code ext_code, | |||
| 569 | subcode = ext_code.subcode; | 569 | subcode = ext_code.subcode; |
| 570 | if ((subcode & 0xff00) != __SUBCODE_MASK) | 570 | if ((subcode & 0xff00) != __SUBCODE_MASK) |
| 571 | return; | 571 | return; |
| 572 | kstat_cpu(smp_processor_id()).irqs[EXTINT_PFL]++; | 572 | inc_irq_stat(IRQEXT_PFL); |
| 573 | /* Get the token (= pid of the affected task). */ | 573 | /* Get the token (= pid of the affected task). */ |
| 574 | pid = sizeof(void *) == 4 ? param32 : param64; | 574 | pid = sizeof(void *) == 4 ? param32 : param64; |
| 575 | rcu_read_lock(); | 575 | rcu_read_lock(); |
diff --git a/arch/s390/oprofile/hwsampler.c b/arch/s390/oprofile/hwsampler.c index 0cb385da202c..b5b2916895e0 100644 --- a/arch/s390/oprofile/hwsampler.c +++ b/arch/s390/oprofile/hwsampler.c | |||
| @@ -233,7 +233,7 @@ static void hws_ext_handler(struct ext_code ext_code, | |||
| 233 | if (!(param32 & CPU_MF_INT_SF_MASK)) | 233 | if (!(param32 & CPU_MF_INT_SF_MASK)) |
| 234 | return; | 234 | return; |
| 235 | 235 | ||
| 236 | kstat_cpu(smp_processor_id()).irqs[EXTINT_CMS]++; | 236 | inc_irq_stat(IRQEXT_CMS); |
| 237 | atomic_xchg(&cb->ext_params, atomic_read(&cb->ext_params) | param32); | 237 | atomic_xchg(&cb->ext_params, atomic_read(&cb->ext_params) | param32); |
| 238 | 238 | ||
| 239 | if (hws_wq) | 239 | if (hws_wq) |
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 8fa416b8775f..60e0372545d2 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c | |||
| @@ -160,35 +160,6 @@ int pci_proc_domain(struct pci_bus *bus) | |||
| 160 | } | 160 | } |
| 161 | EXPORT_SYMBOL_GPL(pci_proc_domain); | 161 | EXPORT_SYMBOL_GPL(pci_proc_domain); |
| 162 | 162 | ||
| 163 | /* Store PCI function information block */ | ||
| 164 | static int zpci_store_fib(struct zpci_dev *zdev, u8 *fc) | ||
| 165 | { | ||
| 166 | struct zpci_fib *fib; | ||
| 167 | u8 status, cc; | ||
| 168 | |||
| 169 | fib = (void *) get_zeroed_page(GFP_KERNEL); | ||
| 170 | if (!fib) | ||
| 171 | return -ENOMEM; | ||
| 172 | |||
| 173 | do { | ||
| 174 | cc = __stpcifc(zdev->fh, 0, fib, &status); | ||
| 175 | if (cc == 2) { | ||
| 176 | msleep(ZPCI_INSN_BUSY_DELAY); | ||
| 177 | memset(fib, 0, PAGE_SIZE); | ||
| 178 | } | ||
| 179 | } while (cc == 2); | ||
| 180 | |||
| 181 | if (cc) | ||
| 182 | pr_err_once("%s: cc: %u status: %u\n", | ||
| 183 | __func__, cc, status); | ||
| 184 | |||
| 185 | /* Return PCI function controls */ | ||
| 186 | *fc = fib->fc; | ||
| 187 | |||
| 188 | free_page((unsigned long) fib); | ||
| 189 | return (cc) ? -EIO : 0; | ||
| 190 | } | ||
| 191 | |||
| 192 | /* Modify PCI: Register adapter interruptions */ | 163 | /* Modify PCI: Register adapter interruptions */ |
| 193 | static int zpci_register_airq(struct zpci_dev *zdev, unsigned int aisb, | 164 | static int zpci_register_airq(struct zpci_dev *zdev, unsigned int aisb, |
| 194 | u64 aibv) | 165 | u64 aibv) |
| @@ -385,7 +356,7 @@ unsigned int probe_irq_mask(unsigned long val) | |||
| 385 | } | 356 | } |
| 386 | EXPORT_SYMBOL_GPL(probe_irq_mask); | 357 | EXPORT_SYMBOL_GPL(probe_irq_mask); |
| 387 | 358 | ||
| 388 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) | 359 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 389 | { | 360 | { |
| 390 | } | 361 | } |
| 391 | 362 | ||
| @@ -469,7 +440,7 @@ static void zpci_irq_handler(void *dont, void *need) | |||
| 469 | int rescan = 0, max = aisb_max; | 440 | int rescan = 0, max = aisb_max; |
| 470 | struct zdev_irq_map *imap; | 441 | struct zdev_irq_map *imap; |
| 471 | 442 | ||
| 472 | kstat_cpu(smp_processor_id()).irqs[IOINT_PCI]++; | 443 | inc_irq_stat(IRQIO_PCI); |
| 473 | sbit = start; | 444 | sbit = start; |
| 474 | 445 | ||
| 475 | scan: | 446 | scan: |
| @@ -481,7 +452,7 @@ scan: | |||
| 481 | /* find vector bit */ | 452 | /* find vector bit */ |
| 482 | imap = bucket->imap[sbit]; | 453 | imap = bucket->imap[sbit]; |
| 483 | for_each_set_bit_left(mbit, &imap->aibv, imap->msi_vecs) { | 454 | for_each_set_bit_left(mbit, &imap->aibv, imap->msi_vecs) { |
| 484 | kstat_cpu(smp_processor_id()).irqs[IOINT_MSI]++; | 455 | inc_irq_stat(IRQIO_MSI); |
| 485 | clear_bit(63 - mbit, &imap->aibv); | 456 | clear_bit(63 - mbit, &imap->aibv); |
| 486 | 457 | ||
| 487 | spin_lock(&imap->lock); | 458 | spin_lock(&imap->lock); |
diff --git a/arch/s390/pci/pci_dma.c b/arch/s390/pci/pci_dma.c index 6138468b420f..a547419907c3 100644 --- a/arch/s390/pci/pci_dma.c +++ b/arch/s390/pci/pci_dma.c | |||
| @@ -13,8 +13,6 @@ | |||
| 13 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
| 14 | #include <asm/pci_dma.h> | 14 | #include <asm/pci_dma.h> |
| 15 | 15 | ||
| 16 | static enum zpci_ioat_dtype zpci_ioat_dt = ZPCI_IOTA_RTTO; | ||
| 17 | |||
| 18 | static struct kmem_cache *dma_region_table_cache; | 16 | static struct kmem_cache *dma_region_table_cache; |
| 19 | static struct kmem_cache *dma_page_table_cache; | 17 | static struct kmem_cache *dma_page_table_cache; |
| 20 | 18 | ||
diff --git a/arch/score/mm/cache.c b/arch/score/mm/cache.c index b25e95743600..f85ec1a7c88e 100644 --- a/arch/score/mm/cache.c +++ b/arch/score/mm/cache.c | |||
| @@ -113,7 +113,7 @@ static inline void setup_protection_map(void) | |||
| 113 | protection_map[15] = PAGE_SHARED; | 113 | protection_map[15] = PAGE_SHARED; |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | void __devinit cpu_cache_init(void) | 116 | void cpu_cache_init(void) |
| 117 | { | 117 | { |
| 118 | setup_protection_map(); | 118 | setup_protection_map(); |
| 119 | } | 119 | } |
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 3fede4556c91..a0fa5791cd44 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
| @@ -70,6 +70,16 @@ | |||
| 70 | * OFF-ON : MMC | 70 | * OFF-ON : MMC |
| 71 | */ | 71 | */ |
| 72 | 72 | ||
| 73 | /* | ||
| 74 | * FSI - DA7210 | ||
| 75 | * | ||
| 76 | * it needs amixer settings for playing | ||
| 77 | * | ||
| 78 | * amixer set 'HeadPhone' 80 | ||
| 79 | * amixer set 'Out Mixer Left DAC Left' on | ||
| 80 | * amixer set 'Out Mixer Right DAC Right' on | ||
| 81 | */ | ||
| 82 | |||
| 73 | /* Heartbeat */ | 83 | /* Heartbeat */ |
| 74 | static unsigned char led_pos[] = { 0, 1, 2, 3 }; | 84 | static unsigned char led_pos[] = { 0, 1, 2, 3 }; |
| 75 | 85 | ||
diff --git a/arch/sh/drivers/pci/fixups-dreamcast.c b/arch/sh/drivers/pci/fixups-dreamcast.c index a5fe1b54c952..d6cde700e316 100644 --- a/arch/sh/drivers/pci/fixups-dreamcast.c +++ b/arch/sh/drivers/pci/fixups-dreamcast.c | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
| 29 | #include <mach/pci.h> | 29 | #include <mach/pci.h> |
| 30 | 30 | ||
| 31 | static void __devinit gapspci_fixup_resources(struct pci_dev *dev) | 31 | static void gapspci_fixup_resources(struct pci_dev *dev) |
| 32 | { | 32 | { |
| 33 | struct pci_channel *p = dev->sysdata; | 33 | struct pci_channel *p = dev->sysdata; |
| 34 | 34 | ||
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c index 81e5dafed3e4..102f5d58b037 100644 --- a/arch/sh/drivers/pci/pci.c +++ b/arch/sh/drivers/pci/pci.c | |||
| @@ -32,7 +32,7 @@ static struct pci_channel *hose_head, **hose_tail = &hose_head; | |||
| 32 | 32 | ||
| 33 | static int pci_initialized; | 33 | static int pci_initialized; |
| 34 | 34 | ||
| 35 | static void __devinit pcibios_scanbus(struct pci_channel *hose) | 35 | static void pcibios_scanbus(struct pci_channel *hose) |
| 36 | { | 36 | { |
| 37 | static int next_busno; | 37 | static int next_busno; |
| 38 | static int need_domain_info; | 38 | static int need_domain_info; |
| @@ -82,7 +82,7 @@ static void __devinit pcibios_scanbus(struct pci_channel *hose) | |||
| 82 | DEFINE_RAW_SPINLOCK(pci_config_lock); | 82 | DEFINE_RAW_SPINLOCK(pci_config_lock); |
| 83 | static DEFINE_MUTEX(pci_scan_mutex); | 83 | static DEFINE_MUTEX(pci_scan_mutex); |
| 84 | 84 | ||
| 85 | int __devinit register_pci_controller(struct pci_channel *hose) | 85 | int register_pci_controller(struct pci_channel *hose) |
| 86 | { | 86 | { |
| 87 | int i; | 87 | int i; |
| 88 | 88 | ||
| @@ -156,7 +156,7 @@ subsys_initcall(pcibios_init); | |||
| 156 | * Called after each bus is probed, but before its children | 156 | * Called after each bus is probed, but before its children |
| 157 | * are examined. | 157 | * are examined. |
| 158 | */ | 158 | */ |
| 159 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) | 159 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 160 | { | 160 | { |
| 161 | } | 161 | } |
| 162 | 162 | ||
diff --git a/arch/sh/drivers/pci/pcie-sh7786.c b/arch/sh/drivers/pci/pcie-sh7786.c index 9e702f2f8045..c2c85f6cd738 100644 --- a/arch/sh/drivers/pci/pcie-sh7786.c +++ b/arch/sh/drivers/pci/pcie-sh7786.c | |||
| @@ -132,7 +132,7 @@ static struct clk fixed_pciexclkp = { | |||
| 132 | .rate = 100000000, /* 100 MHz reference clock */ | 132 | .rate = 100000000, /* 100 MHz reference clock */ |
| 133 | }; | 133 | }; |
| 134 | 134 | ||
| 135 | static void __devinit sh7786_pci_fixup(struct pci_dev *dev) | 135 | static void sh7786_pci_fixup(struct pci_dev *dev) |
| 136 | { | 136 | { |
| 137 | /* | 137 | /* |
| 138 | * Prevent enumeration of root complex resources. | 138 | * Prevent enumeration of root complex resources. |
diff --git a/arch/sh/include/asm/elf.h b/arch/sh/include/asm/elf.h index 37924afa8d8a..bf9f44f17c29 100644 --- a/arch/sh/include/asm/elf.h +++ b/arch/sh/include/asm/elf.h | |||
| @@ -203,9 +203,9 @@ extern void __kernel_vsyscall; | |||
| 203 | if (vdso_enabled) \ | 203 | if (vdso_enabled) \ |
| 204 | NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE); \ | 204 | NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE); \ |
| 205 | else \ | 205 | else \ |
| 206 | NEW_AUX_ENT(AT_IGNORE, 0); | 206 | NEW_AUX_ENT(AT_IGNORE, 0) |
| 207 | #else | 207 | #else |
| 208 | #define VSYSCALL_AUX_ENT | 208 | #define VSYSCALL_AUX_ENT NEW_AUX_ENT(AT_IGNORE, 0) |
| 209 | #endif /* CONFIG_VSYSCALL */ | 209 | #endif /* CONFIG_VSYSCALL */ |
| 210 | 210 | ||
| 211 | #ifdef CONFIG_SH_FPU | 211 | #ifdef CONFIG_SH_FPU |
diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h index b1320d55ca30..e699a12cdcca 100644 --- a/arch/sh/include/asm/processor_32.h +++ b/arch/sh/include/asm/processor_32.h | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | /* This decides where the kernel will search for a free chunk of vm | 39 | /* This decides where the kernel will search for a free chunk of vm |
| 40 | * space during mmap's. | 40 | * space during mmap's. |
| 41 | */ | 41 | */ |
| 42 | #define TASK_UNMAPPED_BASE (TASK_SIZE / 3) | 42 | #define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE / 3) |
| 43 | 43 | ||
| 44 | /* | 44 | /* |
| 45 | * Bit of SR register | 45 | * Bit of SR register |
diff --git a/arch/sh/include/asm/processor_64.h b/arch/sh/include/asm/processor_64.h index 1ee8946f0952..1cc7d3197143 100644 --- a/arch/sh/include/asm/processor_64.h +++ b/arch/sh/include/asm/processor_64.h | |||
| @@ -47,7 +47,7 @@ pc; }) | |||
| 47 | /* This decides where the kernel will search for a free chunk of vm | 47 | /* This decides where the kernel will search for a free chunk of vm |
| 48 | * space during mmap's. | 48 | * space during mmap's. |
| 49 | */ | 49 | */ |
| 50 | #define TASK_UNMAPPED_BASE (TASK_SIZE / 3) | 50 | #define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE / 3) |
| 51 | 51 | ||
| 52 | /* | 52 | /* |
| 53 | * Bit of SR register | 53 | * Bit of SR register |
diff --git a/arch/sh/include/uapi/asm/unistd_32.h b/arch/sh/include/uapi/asm/unistd_32.h index 9e465f246dc1..d13a1d623736 100644 --- a/arch/sh/include/uapi/asm/unistd_32.h +++ b/arch/sh/include/uapi/asm/unistd_32.h | |||
| @@ -379,7 +379,8 @@ | |||
| 379 | #define __NR_process_vm_readv 365 | 379 | #define __NR_process_vm_readv 365 |
| 380 | #define __NR_process_vm_writev 366 | 380 | #define __NR_process_vm_writev 366 |
| 381 | #define __NR_kcmp 367 | 381 | #define __NR_kcmp 367 |
| 382 | #define __NR_finit_module 368 | ||
| 382 | 383 | ||
| 383 | #define NR_syscalls 368 | 384 | #define NR_syscalls 369 |
| 384 | 385 | ||
| 385 | #endif /* __ASM_SH_UNISTD_32_H */ | 386 | #endif /* __ASM_SH_UNISTD_32_H */ |
diff --git a/arch/sh/include/uapi/asm/unistd_64.h b/arch/sh/include/uapi/asm/unistd_64.h index 8e3a2edd284e..e6820c86e8c7 100644 --- a/arch/sh/include/uapi/asm/unistd_64.h +++ b/arch/sh/include/uapi/asm/unistd_64.h | |||
| @@ -399,7 +399,8 @@ | |||
| 399 | #define __NR_process_vm_readv 376 | 399 | #define __NR_process_vm_readv 376 |
| 400 | #define __NR_process_vm_writev 377 | 400 | #define __NR_process_vm_writev 377 |
| 401 | #define __NR_kcmp 378 | 401 | #define __NR_kcmp 378 |
| 402 | #define __NR_finit_module 379 | ||
| 402 | 403 | ||
| 403 | #define NR_syscalls 379 | 404 | #define NR_syscalls 380 |
| 404 | 405 | ||
| 405 | #endif /* __ASM_SH_UNISTD_64_H */ | 406 | #endif /* __ASM_SH_UNISTD_64_H */ |
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S index fe97ae5e56f1..734234be2f01 100644 --- a/arch/sh/kernel/syscalls_32.S +++ b/arch/sh/kernel/syscalls_32.S | |||
| @@ -385,3 +385,4 @@ ENTRY(sys_call_table) | |||
| 385 | .long sys_process_vm_readv /* 365 */ | 385 | .long sys_process_vm_readv /* 365 */ |
| 386 | .long sys_process_vm_writev | 386 | .long sys_process_vm_writev |
| 387 | .long sys_kcmp | 387 | .long sys_kcmp |
| 388 | .long sys_finit_module | ||
diff --git a/arch/sh/kernel/syscalls_64.S b/arch/sh/kernel/syscalls_64.S index 5c7b1c67bdc1..579fcb9a896b 100644 --- a/arch/sh/kernel/syscalls_64.S +++ b/arch/sh/kernel/syscalls_64.S | |||
| @@ -405,3 +405,4 @@ sys_call_table: | |||
| 405 | .long sys_process_vm_readv | 405 | .long sys_process_vm_readv |
| 406 | .long sys_process_vm_writev | 406 | .long sys_process_vm_writev |
| 407 | .long sys_kcmp | 407 | .long sys_kcmp |
| 408 | .long sys_finit_module | ||
diff --git a/arch/sh/lib/mcount.S b/arch/sh/lib/mcount.S index 60164e65d665..52aa2011d753 100644 --- a/arch/sh/lib/mcount.S +++ b/arch/sh/lib/mcount.S | |||
| @@ -294,6 +294,8 @@ stack_panic: | |||
| 294 | .align 2 | 294 | .align 2 |
| 295 | .L_init_thread_union: | 295 | .L_init_thread_union: |
| 296 | .long init_thread_union | 296 | .long init_thread_union |
| 297 | .L_ebss: | ||
| 298 | .long __bss_stop | ||
| 297 | .Lpanic: | 299 | .Lpanic: |
| 298 | .long panic | 300 | .long panic |
| 299 | .Lpanic_s: | 301 | .Lpanic_s: |
diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h index cb33608cc68f..c55291e5b83e 100644 --- a/arch/sparc/include/asm/parport.h +++ b/arch/sparc/include/asm/parport.h | |||
| @@ -103,7 +103,7 @@ static inline unsigned int get_dma_residue(unsigned int dmanr) | |||
| 103 | return ebus_dma_residue(&sparc_ebus_dmas[dmanr].info); | 103 | return ebus_dma_residue(&sparc_ebus_dmas[dmanr].info); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | static int __devinit ecpp_probe(struct platform_device *op) | 106 | static int ecpp_probe(struct platform_device *op) |
| 107 | { | 107 | { |
| 108 | unsigned long base = op->resource[0].start; | 108 | unsigned long base = op->resource[0].start; |
| 109 | unsigned long config = op->resource[1].start; | 109 | unsigned long config = op->resource[1].start; |
| @@ -192,7 +192,7 @@ out_err: | |||
| 192 | return err; | 192 | return err; |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | static int __devexit ecpp_remove(struct platform_device *op) | 195 | static int ecpp_remove(struct platform_device *op) |
| 196 | { | 196 | { |
| 197 | struct parport *p = dev_get_drvdata(&op->dev); | 197 | struct parport *p = dev_get_drvdata(&op->dev); |
| 198 | int slot = p->dma; | 198 | int slot = p->dma; |
| @@ -242,7 +242,7 @@ static struct platform_driver ecpp_driver = { | |||
| 242 | .of_match_table = ecpp_match, | 242 | .of_match_table = ecpp_match, |
| 243 | }, | 243 | }, |
| 244 | .probe = ecpp_probe, | 244 | .probe = ecpp_probe, |
| 245 | .remove = __devexit_p(ecpp_remove), | 245 | .remove = ecpp_remove, |
| 246 | }; | 246 | }; |
| 247 | 247 | ||
| 248 | static int parport_pc_find_nonpci_ports(int autoirq, int autodma) | 248 | static int parport_pc_find_nonpci_ports(int autoirq, int autodma) |
diff --git a/arch/sparc/include/asm/timer_64.h b/arch/sparc/include/asm/timer_64.h index ef3c3682debf..01197d8215c4 100644 --- a/arch/sparc/include/asm/timer_64.h +++ b/arch/sparc/include/asm/timer_64.h | |||
| @@ -24,7 +24,7 @@ struct sparc64_tick_ops { | |||
| 24 | extern struct sparc64_tick_ops *tick_ops; | 24 | extern struct sparc64_tick_ops *tick_ops; |
| 25 | 25 | ||
| 26 | extern unsigned long sparc64_get_clock_tick(unsigned int cpu); | 26 | extern unsigned long sparc64_get_clock_tick(unsigned int cpu); |
| 27 | extern void __devinit setup_sparc64_timer(void); | 27 | extern void setup_sparc64_timer(void); |
| 28 | extern void __init time_init(void); | 28 | extern void __init time_init(void); |
| 29 | 29 | ||
| 30 | #endif /* _SPARC64_TIMER_H */ | 30 | #endif /* _SPARC64_TIMER_H */ |
diff --git a/arch/sparc/include/uapi/asm/unistd.h b/arch/sparc/include/uapi/asm/unistd.h index cac719d1bc5c..62ced589bcf7 100644 --- a/arch/sparc/include/uapi/asm/unistd.h +++ b/arch/sparc/include/uapi/asm/unistd.h | |||
| @@ -407,8 +407,9 @@ | |||
| 407 | #define __NR_process_vm_writev 339 | 407 | #define __NR_process_vm_writev 339 |
| 408 | #define __NR_kern_features 340 | 408 | #define __NR_kern_features 340 |
| 409 | #define __NR_kcmp 341 | 409 | #define __NR_kcmp 341 |
| 410 | #define __NR_finit_module 342 | ||
| 410 | 411 | ||
| 411 | #define NR_syscalls 342 | 412 | #define NR_syscalls 343 |
| 412 | 413 | ||
| 413 | /* Bitmask values returned from kern_features system call. */ | 414 | /* Bitmask values returned from kern_features system call. */ |
| 414 | #define KERN_FEATURE_MIXED_MODE_STACK 0x00000001 | 415 | #define KERN_FEATURE_MIXED_MODE_STACK 0x00000001 |
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c index 812e10bbb0b3..348fa1aeabce 100644 --- a/arch/sparc/kernel/apc.c +++ b/arch/sparc/kernel/apc.c | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | #define APC_DEVNAME "apc" | 31 | #define APC_DEVNAME "apc" |
| 32 | 32 | ||
| 33 | static u8 __iomem *regs; | 33 | static u8 __iomem *regs; |
| 34 | static int apc_no_idle __devinitdata = 0; | 34 | static int apc_no_idle = 0; |
| 35 | 35 | ||
| 36 | #define apc_readb(offs) (sbus_readb(regs+offs)) | 36 | #define apc_readb(offs) (sbus_readb(regs+offs)) |
| 37 | #define apc_writeb(val, offs) (sbus_writeb(val, regs+offs)) | 37 | #define apc_writeb(val, offs) (sbus_writeb(val, regs+offs)) |
| @@ -138,7 +138,7 @@ static const struct file_operations apc_fops = { | |||
| 138 | 138 | ||
| 139 | static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops }; | 139 | static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops }; |
| 140 | 140 | ||
| 141 | static int __devinit apc_probe(struct platform_device *op) | 141 | static int apc_probe(struct platform_device *op) |
| 142 | { | 142 | { |
| 143 | int err; | 143 | int err; |
| 144 | 144 | ||
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c index 773091ac71a3..86e55778e4af 100644 --- a/arch/sparc/kernel/auxio_64.c +++ b/arch/sparc/kernel/auxio_64.c | |||
| @@ -102,7 +102,7 @@ static const struct of_device_id auxio_match[] = { | |||
| 102 | 102 | ||
| 103 | MODULE_DEVICE_TABLE(of, auxio_match); | 103 | MODULE_DEVICE_TABLE(of, auxio_match); |
| 104 | 104 | ||
| 105 | static int __devinit auxio_probe(struct platform_device *dev) | 105 | static int auxio_probe(struct platform_device *dev) |
| 106 | { | 106 | { |
| 107 | struct device_node *dp = dev->dev.of_node; | 107 | struct device_node *dp = dev->dev.of_node; |
| 108 | unsigned long size; | 108 | unsigned long size; |
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c index 9708851a8b9f..052b5a44318f 100644 --- a/arch/sparc/kernel/central.c +++ b/arch/sparc/kernel/central.c | |||
| @@ -33,7 +33,7 @@ struct fhc { | |||
| 33 | struct platform_device leds_pdev; | 33 | struct platform_device leds_pdev; |
| 34 | }; | 34 | }; |
| 35 | 35 | ||
| 36 | static int __devinit clock_board_calc_nslots(struct clock_board *p) | 36 | static int clock_board_calc_nslots(struct clock_board *p) |
| 37 | { | 37 | { |
| 38 | u8 reg = upa_readb(p->clock_regs + CLOCK_STAT1) & 0xc0; | 38 | u8 reg = upa_readb(p->clock_regs + CLOCK_STAT1) & 0xc0; |
| 39 | 39 | ||
| @@ -60,7 +60,7 @@ static int __devinit clock_board_calc_nslots(struct clock_board *p) | |||
| 60 | } | 60 | } |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | static int __devinit clock_board_probe(struct platform_device *op) | 63 | static int clock_board_probe(struct platform_device *op) |
| 64 | { | 64 | { |
| 65 | struct clock_board *p = kzalloc(sizeof(*p), GFP_KERNEL); | 65 | struct clock_board *p = kzalloc(sizeof(*p), GFP_KERNEL); |
| 66 | int err = -ENOMEM; | 66 | int err = -ENOMEM; |
| @@ -157,7 +157,7 @@ static struct platform_driver clock_board_driver = { | |||
| 157 | }, | 157 | }, |
| 158 | }; | 158 | }; |
| 159 | 159 | ||
| 160 | static int __devinit fhc_probe(struct platform_device *op) | 160 | static int fhc_probe(struct platform_device *op) |
| 161 | { | 161 | { |
| 162 | struct fhc *p = kzalloc(sizeof(*p), GFP_KERNEL); | 162 | struct fhc *p = kzalloc(sizeof(*p), GFP_KERNEL); |
| 163 | int err = -ENOMEM; | 163 | int err = -ENOMEM; |
diff --git a/arch/sparc/kernel/chmc.c b/arch/sparc/kernel/chmc.c index 5f450260981d..dbb210d74e21 100644 --- a/arch/sparc/kernel/chmc.c +++ b/arch/sparc/kernel/chmc.c | |||
| @@ -336,9 +336,9 @@ static int jbusmc_print_dimm(int syndrome_code, | |||
| 336 | return 0; | 336 | return 0; |
| 337 | } | 337 | } |
| 338 | 338 | ||
| 339 | static u64 __devinit jbusmc_dimm_group_size(u64 base, | 339 | static u64 jbusmc_dimm_group_size(u64 base, |
| 340 | const struct linux_prom64_registers *mem_regs, | 340 | const struct linux_prom64_registers *mem_regs, |
| 341 | int num_mem_regs) | 341 | int num_mem_regs) |
| 342 | { | 342 | { |
| 343 | u64 max = base + (8UL * 1024 * 1024 * 1024); | 343 | u64 max = base + (8UL * 1024 * 1024 * 1024); |
| 344 | u64 max_seen = base; | 344 | u64 max_seen = base; |
| @@ -363,10 +363,10 @@ static u64 __devinit jbusmc_dimm_group_size(u64 base, | |||
| 363 | return max_seen - base; | 363 | return max_seen - base; |
| 364 | } | 364 | } |
| 365 | 365 | ||
| 366 | static void __devinit jbusmc_construct_one_dimm_group(struct jbusmc *p, | 366 | static void jbusmc_construct_one_dimm_group(struct jbusmc *p, |
| 367 | unsigned long index, | 367 | unsigned long index, |
| 368 | const struct linux_prom64_registers *mem_regs, | 368 | const struct linux_prom64_registers *mem_regs, |
| 369 | int num_mem_regs) | 369 | int num_mem_regs) |
| 370 | { | 370 | { |
| 371 | struct jbusmc_dimm_group *dp = &p->dimm_groups[index]; | 371 | struct jbusmc_dimm_group *dp = &p->dimm_groups[index]; |
| 372 | 372 | ||
| @@ -378,9 +378,9 @@ static void __devinit jbusmc_construct_one_dimm_group(struct jbusmc *p, | |||
| 378 | dp->size = jbusmc_dimm_group_size(dp->base_addr, mem_regs, num_mem_regs); | 378 | dp->size = jbusmc_dimm_group_size(dp->base_addr, mem_regs, num_mem_regs); |
| 379 | } | 379 | } |
| 380 | 380 | ||
| 381 | static void __devinit jbusmc_construct_dimm_groups(struct jbusmc *p, | 381 | static void jbusmc_construct_dimm_groups(struct jbusmc *p, |
| 382 | const struct linux_prom64_registers *mem_regs, | 382 | const struct linux_prom64_registers *mem_regs, |
| 383 | int num_mem_regs) | 383 | int num_mem_regs) |
| 384 | { | 384 | { |
| 385 | if (p->mc_reg_1 & JB_MC_REG1_DIMM1_BANK0) { | 385 | if (p->mc_reg_1 & JB_MC_REG1_DIMM1_BANK0) { |
| 386 | jbusmc_construct_one_dimm_group(p, 0, mem_regs, num_mem_regs); | 386 | jbusmc_construct_one_dimm_group(p, 0, mem_regs, num_mem_regs); |
| @@ -392,7 +392,7 @@ static void __devinit jbusmc_construct_dimm_groups(struct jbusmc *p, | |||
| 392 | } | 392 | } |
| 393 | } | 393 | } |
| 394 | 394 | ||
| 395 | static int __devinit jbusmc_probe(struct platform_device *op) | 395 | static int jbusmc_probe(struct platform_device *op) |
| 396 | { | 396 | { |
| 397 | const struct linux_prom64_registers *mem_regs; | 397 | const struct linux_prom64_registers *mem_regs; |
| 398 | struct device_node *mem_node; | 398 | struct device_node *mem_node; |
| @@ -689,7 +689,7 @@ static void chmc_fetch_decode_regs(struct chmc *p) | |||
| 689 | chmc_read_mcreg(p, CHMCTRL_DECODE4)); | 689 | chmc_read_mcreg(p, CHMCTRL_DECODE4)); |
| 690 | } | 690 | } |
| 691 | 691 | ||
| 692 | static int __devinit chmc_probe(struct platform_device *op) | 692 | static int chmc_probe(struct platform_device *op) |
| 693 | { | 693 | { |
| 694 | struct device_node *dp = op->dev.of_node; | 694 | struct device_node *dp = op->dev.of_node; |
| 695 | unsigned long ver; | 695 | unsigned long ver; |
| @@ -763,7 +763,7 @@ out_free: | |||
| 763 | goto out; | 763 | goto out; |
| 764 | } | 764 | } |
| 765 | 765 | ||
| 766 | static int __devinit us3mc_probe(struct platform_device *op) | 766 | static int us3mc_probe(struct platform_device *op) |
| 767 | { | 767 | { |
| 768 | if (mc_type == MC_TYPE_SAFARI) | 768 | if (mc_type == MC_TYPE_SAFARI) |
| 769 | return chmc_probe(op); | 769 | return chmc_probe(op); |
| @@ -772,21 +772,21 @@ static int __devinit us3mc_probe(struct platform_device *op) | |||
| 772 | return -ENODEV; | 772 | return -ENODEV; |
| 773 | } | 773 | } |
| 774 | 774 | ||
| 775 | static void __devexit chmc_destroy(struct platform_device *op, struct chmc *p) | 775 | static void chmc_destroy(struct platform_device *op, struct chmc *p) |
| 776 | { | 776 | { |
| 777 | list_del(&p->list); | 777 | list_del(&p->list); |
| 778 | of_iounmap(&op->resource[0], p->regs, 0x48); | 778 | of_iounmap(&op->resource[0], p->regs, 0x48); |
| 779 | kfree(p); | 779 | kfree(p); |
| 780 | } | 780 | } |
| 781 | 781 | ||
| 782 | static void __devexit jbusmc_destroy(struct platform_device *op, struct jbusmc *p) | 782 | static void jbusmc_destroy(struct platform_device *op, struct jbusmc *p) |
| 783 | { | 783 | { |
| 784 | mc_list_del(&p->list); | 784 | mc_list_del(&p->list); |
| 785 | of_iounmap(&op->resource[0], p->regs, JBUSMC_REGS_SIZE); | 785 | of_iounmap(&op->resource[0], p->regs, JBUSMC_REGS_SIZE); |
| 786 | kfree(p); | 786 | kfree(p); |
| 787 | } | 787 | } |
| 788 | 788 | ||
| 789 | static int __devexit us3mc_remove(struct platform_device *op) | 789 | static int us3mc_remove(struct platform_device *op) |
| 790 | { | 790 | { |
| 791 | void *p = dev_get_drvdata(&op->dev); | 791 | void *p = dev_get_drvdata(&op->dev); |
| 792 | 792 | ||
| @@ -814,7 +814,7 @@ static struct platform_driver us3mc_driver = { | |||
| 814 | .of_match_table = us3mc_match, | 814 | .of_match_table = us3mc_match, |
| 815 | }, | 815 | }, |
| 816 | .probe = us3mc_probe, | 816 | .probe = us3mc_probe, |
| 817 | .remove = __devexit_p(us3mc_remove), | 817 | .remove = us3mc_remove, |
| 818 | }; | 818 | }; |
| 819 | 819 | ||
| 820 | static inline bool us3mc_platform(void) | 820 | static inline bool us3mc_platform(void) |
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c index f09257c86107..75bb608c423e 100644 --- a/arch/sparc/kernel/ds.c +++ b/arch/sparc/kernel/ds.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #define DRV_MODULE_VERSION "1.0" | 29 | #define DRV_MODULE_VERSION "1.0" |
| 30 | #define DRV_MODULE_RELDATE "Jul 11, 2007" | 30 | #define DRV_MODULE_RELDATE "Jul 11, 2007" |
| 31 | 31 | ||
| 32 | static char version[] __devinitdata = | 32 | static char version[] = |
| 33 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; | 33 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; |
| 34 | MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); | 34 | MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); |
| 35 | MODULE_DESCRIPTION("Sun LDOM domain services driver"); | 35 | MODULE_DESCRIPTION("Sun LDOM domain services driver"); |
| @@ -1146,8 +1146,7 @@ static void ds_event(void *arg, int event) | |||
| 1146 | spin_unlock_irqrestore(&ds_lock, flags); | 1146 | spin_unlock_irqrestore(&ds_lock, flags); |
| 1147 | } | 1147 | } |
| 1148 | 1148 | ||
| 1149 | static int __devinit ds_probe(struct vio_dev *vdev, | 1149 | static int ds_probe(struct vio_dev *vdev, const struct vio_device_id *id) |
| 1150 | const struct vio_device_id *id) | ||
| 1151 | { | 1150 | { |
| 1152 | static int ds_version_printed; | 1151 | static int ds_version_printed; |
| 1153 | struct ldc_channel_config ds_cfg = { | 1152 | struct ldc_channel_config ds_cfg = { |
diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c index 81d92fc9983b..9fcc6b4e93b3 100644 --- a/arch/sparc/kernel/ldc.c +++ b/arch/sparc/kernel/ldc.c | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | #define DRV_MODULE_VERSION "1.1" | 27 | #define DRV_MODULE_VERSION "1.1" |
| 28 | #define DRV_MODULE_RELDATE "July 22, 2008" | 28 | #define DRV_MODULE_RELDATE "July 22, 2008" |
| 29 | 29 | ||
| 30 | static char version[] __devinitdata = | 30 | static char version[] = |
| 31 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; | 31 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; |
| 32 | #define LDC_PACKET_SIZE 64 | 32 | #define LDC_PACKET_SIZE 64 |
| 33 | 33 | ||
diff --git a/arch/sparc/kernel/leon_pci.c b/arch/sparc/kernel/leon_pci.c index fc0521161568..852dc8430528 100644 --- a/arch/sparc/kernel/leon_pci.c +++ b/arch/sparc/kernel/leon_pci.c | |||
| @@ -43,7 +43,7 @@ void leon_pci_init(struct platform_device *ofdev, struct leon_pci_info *info) | |||
| 43 | } | 43 | } |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | void __devinit pcibios_fixup_bus(struct pci_bus *pbus) | 46 | void pcibios_fixup_bus(struct pci_bus *pbus) |
| 47 | { | 47 | { |
| 48 | struct pci_dev *dev; | 48 | struct pci_dev *dev; |
| 49 | int i, has_io, has_mem; | 49 | int i, has_io, has_mem; |
diff --git a/arch/sparc/kernel/leon_pci_grpci2.c b/arch/sparc/kernel/leon_pci_grpci2.c index b1bc38853a3d..fc4320886a3a 100644 --- a/arch/sparc/kernel/leon_pci_grpci2.c +++ b/arch/sparc/kernel/leon_pci_grpci2.c | |||
| @@ -668,7 +668,7 @@ static irqreturn_t grpci2_err_interrupt(int irq, void *arg) | |||
| 668 | return IRQ_HANDLED; | 668 | return IRQ_HANDLED; |
| 669 | } | 669 | } |
| 670 | 670 | ||
| 671 | static int __devinit grpci2_of_probe(struct platform_device *ofdev) | 671 | static int grpci2_of_probe(struct platform_device *ofdev) |
| 672 | { | 672 | { |
| 673 | struct grpci2_regs *regs; | 673 | struct grpci2_regs *regs; |
| 674 | struct grpci2_priv *priv; | 674 | struct grpci2_priv *priv; |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index 75b31bcdeadf..baf4366e2d6a 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
| @@ -356,7 +356,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, | |||
| 356 | return dev; | 356 | return dev; |
| 357 | } | 357 | } |
| 358 | 358 | ||
| 359 | static void __devinit apb_calc_first_last(u8 map, u32 *first_p, u32 *last_p) | 359 | static void apb_calc_first_last(u8 map, u32 *first_p, u32 *last_p) |
| 360 | { | 360 | { |
| 361 | u32 idx, first, last; | 361 | u32 idx, first, last; |
| 362 | 362 | ||
| @@ -378,9 +378,9 @@ static void __devinit apb_calc_first_last(u8 map, u32 *first_p, u32 *last_p) | |||
| 378 | /* Cook up fake bus resources for SUNW,simba PCI bridges which lack | 378 | /* Cook up fake bus resources for SUNW,simba PCI bridges which lack |
| 379 | * a proper 'ranges' property. | 379 | * a proper 'ranges' property. |
| 380 | */ | 380 | */ |
| 381 | static void __devinit apb_fake_ranges(struct pci_dev *dev, | 381 | static void apb_fake_ranges(struct pci_dev *dev, |
| 382 | struct pci_bus *bus, | 382 | struct pci_bus *bus, |
| 383 | struct pci_pbm_info *pbm) | 383 | struct pci_pbm_info *pbm) |
| 384 | { | 384 | { |
| 385 | struct pci_bus_region region; | 385 | struct pci_bus_region region; |
| 386 | struct resource *res; | 386 | struct resource *res; |
| @@ -404,15 +404,15 @@ static void __devinit apb_fake_ranges(struct pci_dev *dev, | |||
| 404 | pcibios_bus_to_resource(dev, res, ®ion); | 404 | pcibios_bus_to_resource(dev, res, ®ion); |
| 405 | } | 405 | } |
| 406 | 406 | ||
| 407 | static void __devinit pci_of_scan_bus(struct pci_pbm_info *pbm, | 407 | static void pci_of_scan_bus(struct pci_pbm_info *pbm, |
| 408 | struct device_node *node, | 408 | struct device_node *node, |
| 409 | struct pci_bus *bus); | 409 | struct pci_bus *bus); |
| 410 | 410 | ||
| 411 | #define GET_64BIT(prop, i) ((((u64) (prop)[(i)]) << 32) | (prop)[(i)+1]) | 411 | #define GET_64BIT(prop, i) ((((u64) (prop)[(i)]) << 32) | (prop)[(i)+1]) |
| 412 | 412 | ||
| 413 | static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm, | 413 | static void of_scan_pci_bridge(struct pci_pbm_info *pbm, |
| 414 | struct device_node *node, | 414 | struct device_node *node, |
| 415 | struct pci_dev *dev) | 415 | struct pci_dev *dev) |
| 416 | { | 416 | { |
| 417 | struct pci_bus *bus; | 417 | struct pci_bus *bus; |
| 418 | const u32 *busrange, *ranges; | 418 | const u32 *busrange, *ranges; |
| @@ -503,9 +503,9 @@ after_ranges: | |||
| 503 | pci_of_scan_bus(pbm, node, bus); | 503 | pci_of_scan_bus(pbm, node, bus); |
| 504 | } | 504 | } |
| 505 | 505 | ||
| 506 | static void __devinit pci_of_scan_bus(struct pci_pbm_info *pbm, | 506 | static void pci_of_scan_bus(struct pci_pbm_info *pbm, |
| 507 | struct device_node *node, | 507 | struct device_node *node, |
| 508 | struct pci_bus *bus) | 508 | struct pci_bus *bus) |
| 509 | { | 509 | { |
| 510 | struct device_node *child; | 510 | struct device_node *child; |
| 511 | const u32 *reg; | 511 | const u32 *reg; |
| @@ -564,7 +564,7 @@ show_pciobppath_attr(struct device * dev, struct device_attribute * attr, char * | |||
| 564 | 564 | ||
| 565 | static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH, show_pciobppath_attr, NULL); | 565 | static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH, show_pciobppath_attr, NULL); |
| 566 | 566 | ||
| 567 | static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus) | 567 | static void pci_bus_register_of_sysfs(struct pci_bus *bus) |
| 568 | { | 568 | { |
| 569 | struct pci_dev *dev; | 569 | struct pci_dev *dev; |
| 570 | struct pci_bus *child_bus; | 570 | struct pci_bus *child_bus; |
| @@ -585,8 +585,8 @@ static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus) | |||
| 585 | pci_bus_register_of_sysfs(child_bus); | 585 | pci_bus_register_of_sysfs(child_bus); |
| 586 | } | 586 | } |
| 587 | 587 | ||
| 588 | struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm, | 588 | struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm, |
| 589 | struct device *parent) | 589 | struct device *parent) |
| 590 | { | 590 | { |
| 591 | LIST_HEAD(resources); | 591 | LIST_HEAD(resources); |
| 592 | struct device_node *node = pbm->op->dev.of_node; | 592 | struct device_node *node = pbm->op->dev.of_node; |
| @@ -618,7 +618,7 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm, | |||
| 618 | return bus; | 618 | return bus; |
| 619 | } | 619 | } |
| 620 | 620 | ||
| 621 | void __devinit pcibios_fixup_bus(struct pci_bus *pbus) | 621 | void pcibios_fixup_bus(struct pci_bus *pbus) |
| 622 | { | 622 | { |
| 623 | } | 623 | } |
| 624 | 624 | ||
| @@ -949,8 +949,7 @@ static int __init pcibios_init(void) | |||
| 949 | subsys_initcall(pcibios_init); | 949 | subsys_initcall(pcibios_init); |
| 950 | 950 | ||
| 951 | #ifdef CONFIG_SYSFS | 951 | #ifdef CONFIG_SYSFS |
| 952 | static void __devinit pci_bus_slot_names(struct device_node *node, | 952 | static void pci_bus_slot_names(struct device_node *node, struct pci_bus *bus) |
| 953 | struct pci_bus *bus) | ||
| 954 | { | 953 | { |
| 955 | const struct pci_slot_names { | 954 | const struct pci_slot_names { |
| 956 | u32 slot_mask; | 955 | u32 slot_mask; |
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c index 188f935276fd..e60fc6a67e9b 100644 --- a/arch/sparc/kernel/pci_fire.c +++ b/arch/sparc/kernel/pci_fire.c | |||
| @@ -408,8 +408,8 @@ static void pci_fire_hw_init(struct pci_pbm_info *pbm) | |||
| 408 | upa_writeq(~(u64)0, pbm->pbm_regs + FIRE_PEC_IENAB); | 408 | upa_writeq(~(u64)0, pbm->pbm_regs + FIRE_PEC_IENAB); |
| 409 | } | 409 | } |
| 410 | 410 | ||
| 411 | static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm, | 411 | static int pci_fire_pbm_init(struct pci_pbm_info *pbm, |
| 412 | struct platform_device *op, u32 portid) | 412 | struct platform_device *op, u32 portid) |
| 413 | { | 413 | { |
| 414 | const struct linux_prom64_registers *regs; | 414 | const struct linux_prom64_registers *regs; |
| 415 | struct device_node *dp = op->dev.of_node; | 415 | struct device_node *dp = op->dev.of_node; |
| @@ -454,7 +454,7 @@ static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm, | |||
| 454 | return 0; | 454 | return 0; |
| 455 | } | 455 | } |
| 456 | 456 | ||
| 457 | static int __devinit fire_probe(struct platform_device *op) | 457 | static int fire_probe(struct platform_device *op) |
| 458 | { | 458 | { |
| 459 | struct device_node *dp = op->dev.of_node; | 459 | struct device_node *dp = op->dev.of_node; |
| 460 | struct pci_pbm_info *pbm; | 460 | struct pci_pbm_info *pbm; |
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c index f4d29e15ce71..c647634ead2b 100644 --- a/arch/sparc/kernel/pci_psycho.c +++ b/arch/sparc/kernel/pci_psycho.c | |||
| @@ -366,8 +366,8 @@ static void pbm_config_busmastering(struct pci_pbm_info *pbm) | |||
| 366 | pci_config_write8(addr, 64); | 366 | pci_config_write8(addr, 64); |
| 367 | } | 367 | } |
| 368 | 368 | ||
| 369 | static void __devinit psycho_scan_bus(struct pci_pbm_info *pbm, | 369 | static void psycho_scan_bus(struct pci_pbm_info *pbm, |
| 370 | struct device *parent) | 370 | struct device *parent) |
| 371 | { | 371 | { |
| 372 | pbm_config_busmastering(pbm); | 372 | pbm_config_busmastering(pbm); |
| 373 | pbm->is_66mhz_capable = 0; | 373 | pbm->is_66mhz_capable = 0; |
| @@ -483,15 +483,15 @@ static void psycho_pbm_strbuf_init(struct pci_pbm_info *pbm, | |||
| 483 | #define PSYCHO_MEMSPACE_B 0x180000000UL | 483 | #define PSYCHO_MEMSPACE_B 0x180000000UL |
| 484 | #define PSYCHO_MEMSPACE_SIZE 0x07fffffffUL | 484 | #define PSYCHO_MEMSPACE_SIZE 0x07fffffffUL |
| 485 | 485 | ||
| 486 | static void __devinit psycho_pbm_init(struct pci_pbm_info *pbm, | 486 | static void psycho_pbm_init(struct pci_pbm_info *pbm, |
| 487 | struct platform_device *op, int is_pbm_a) | 487 | struct platform_device *op, int is_pbm_a) |
| 488 | { | 488 | { |
| 489 | psycho_pbm_init_common(pbm, op, "PSYCHO", PBM_CHIP_TYPE_PSYCHO); | 489 | psycho_pbm_init_common(pbm, op, "PSYCHO", PBM_CHIP_TYPE_PSYCHO); |
| 490 | psycho_pbm_strbuf_init(pbm, is_pbm_a); | 490 | psycho_pbm_strbuf_init(pbm, is_pbm_a); |
| 491 | psycho_scan_bus(pbm, &op->dev); | 491 | psycho_scan_bus(pbm, &op->dev); |
| 492 | } | 492 | } |
| 493 | 493 | ||
| 494 | static struct pci_pbm_info * __devinit psycho_find_sibling(u32 upa_portid) | 494 | static struct pci_pbm_info *psycho_find_sibling(u32 upa_portid) |
| 495 | { | 495 | { |
| 496 | struct pci_pbm_info *pbm; | 496 | struct pci_pbm_info *pbm; |
| 497 | 497 | ||
| @@ -504,7 +504,7 @@ static struct pci_pbm_info * __devinit psycho_find_sibling(u32 upa_portid) | |||
| 504 | 504 | ||
| 505 | #define PSYCHO_CONFIGSPACE 0x001000000UL | 505 | #define PSYCHO_CONFIGSPACE 0x001000000UL |
| 506 | 506 | ||
| 507 | static int __devinit psycho_probe(struct platform_device *op) | 507 | static int psycho_probe(struct platform_device *op) |
| 508 | { | 508 | { |
| 509 | const struct linux_prom64_registers *pr_regs; | 509 | const struct linux_prom64_registers *pr_regs; |
| 510 | struct device_node *dp = op->dev.of_node; | 510 | struct device_node *dp = op->dev.of_node; |
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c index 3efaa4644d60..6f00d27e8dac 100644 --- a/arch/sparc/kernel/pci_sabre.c +++ b/arch/sparc/kernel/pci_sabre.c | |||
| @@ -403,8 +403,7 @@ static void apb_init(struct pci_bus *sabre_bus) | |||
| 403 | } | 403 | } |
| 404 | } | 404 | } |
| 405 | 405 | ||
| 406 | static void __devinit sabre_scan_bus(struct pci_pbm_info *pbm, | 406 | static void sabre_scan_bus(struct pci_pbm_info *pbm, struct device *parent) |
| 407 | struct device *parent) | ||
| 408 | { | 407 | { |
| 409 | static int once; | 408 | static int once; |
| 410 | 409 | ||
| @@ -443,8 +442,8 @@ static void __devinit sabre_scan_bus(struct pci_pbm_info *pbm, | |||
| 443 | sabre_register_error_handlers(pbm); | 442 | sabre_register_error_handlers(pbm); |
| 444 | } | 443 | } |
| 445 | 444 | ||
| 446 | static void __devinit sabre_pbm_init(struct pci_pbm_info *pbm, | 445 | static void sabre_pbm_init(struct pci_pbm_info *pbm, |
| 447 | struct platform_device *op) | 446 | struct platform_device *op) |
| 448 | { | 447 | { |
| 449 | psycho_pbm_init_common(pbm, op, "SABRE", PBM_CHIP_TYPE_SABRE); | 448 | psycho_pbm_init_common(pbm, op, "SABRE", PBM_CHIP_TYPE_SABRE); |
| 450 | pbm->pci_afsr = pbm->controller_regs + SABRE_PIOAFSR; | 449 | pbm->pci_afsr = pbm->controller_regs + SABRE_PIOAFSR; |
| @@ -454,7 +453,7 @@ static void __devinit sabre_pbm_init(struct pci_pbm_info *pbm, | |||
| 454 | } | 453 | } |
| 455 | 454 | ||
| 456 | static const struct of_device_id sabre_match[]; | 455 | static const struct of_device_id sabre_match[]; |
| 457 | static int __devinit sabre_probe(struct platform_device *op) | 456 | static int sabre_probe(struct platform_device *op) |
| 458 | { | 457 | { |
| 459 | const struct of_device_id *match; | 458 | const struct of_device_id *match; |
| 460 | const struct linux_prom64_registers *pr_regs; | 459 | const struct linux_prom64_registers *pr_regs; |
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c index 13d4aa20b5a5..8f76f23dac38 100644 --- a/arch/sparc/kernel/pci_schizo.c +++ b/arch/sparc/kernel/pci_schizo.c | |||
| @@ -1064,8 +1064,7 @@ static void pbm_config_busmastering(struct pci_pbm_info *pbm) | |||
| 1064 | pci_config_write8(addr, 64); | 1064 | pci_config_write8(addr, 64); |
| 1065 | } | 1065 | } |
| 1066 | 1066 | ||
| 1067 | static void __devinit schizo_scan_bus(struct pci_pbm_info *pbm, | 1067 | static void schizo_scan_bus(struct pci_pbm_info *pbm, struct device *parent) |
| 1068 | struct device *parent) | ||
| 1069 | { | 1068 | { |
| 1070 | pbm_config_busmastering(pbm); | 1069 | pbm_config_busmastering(pbm); |
| 1071 | pbm->is_66mhz_capable = | 1070 | pbm->is_66mhz_capable = |
| @@ -1307,9 +1306,9 @@ static void schizo_pbm_hw_init(struct pci_pbm_info *pbm) | |||
| 1307 | } | 1306 | } |
| 1308 | } | 1307 | } |
| 1309 | 1308 | ||
| 1310 | static int __devinit schizo_pbm_init(struct pci_pbm_info *pbm, | 1309 | static int schizo_pbm_init(struct pci_pbm_info *pbm, |
| 1311 | struct platform_device *op, u32 portid, | 1310 | struct platform_device *op, u32 portid, |
| 1312 | int chip_type) | 1311 | int chip_type) |
| 1313 | { | 1312 | { |
| 1314 | const struct linux_prom64_registers *regs; | 1313 | const struct linux_prom64_registers *regs; |
| 1315 | struct device_node *dp = op->dev.of_node; | 1314 | struct device_node *dp = op->dev.of_node; |
| @@ -1400,8 +1399,7 @@ static inline int portid_compare(u32 x, u32 y, int chip_type) | |||
| 1400 | return (x == y); | 1399 | return (x == y); |
| 1401 | } | 1400 | } |
| 1402 | 1401 | ||
| 1403 | static struct pci_pbm_info * __devinit schizo_find_sibling(u32 portid, | 1402 | static struct pci_pbm_info *schizo_find_sibling(u32 portid, int chip_type) |
| 1404 | int chip_type) | ||
| 1405 | { | 1403 | { |
| 1406 | struct pci_pbm_info *pbm; | 1404 | struct pci_pbm_info *pbm; |
| 1407 | 1405 | ||
| @@ -1412,7 +1410,7 @@ static struct pci_pbm_info * __devinit schizo_find_sibling(u32 portid, | |||
| 1412 | return NULL; | 1410 | return NULL; |
| 1413 | } | 1411 | } |
| 1414 | 1412 | ||
| 1415 | static int __devinit __schizo_init(struct platform_device *op, unsigned long chip_type) | 1413 | static int __schizo_init(struct platform_device *op, unsigned long chip_type) |
| 1416 | { | 1414 | { |
| 1417 | struct device_node *dp = op->dev.of_node; | 1415 | struct device_node *dp = op->dev.of_node; |
| 1418 | struct pci_pbm_info *pbm; | 1416 | struct pci_pbm_info *pbm; |
| @@ -1460,7 +1458,7 @@ out_err: | |||
| 1460 | } | 1458 | } |
| 1461 | 1459 | ||
| 1462 | static const struct of_device_id schizo_match[]; | 1460 | static const struct of_device_id schizo_match[]; |
| 1463 | static int __devinit schizo_probe(struct platform_device *op) | 1461 | static int schizo_probe(struct platform_device *op) |
| 1464 | { | 1462 | { |
| 1465 | const struct of_device_id *match; | 1463 | const struct of_device_id *match; |
| 1466 | 1464 | ||
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index 051b69caeffd..d07f6b29aed8 100644 --- a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c | |||
| @@ -536,8 +536,7 @@ static struct dma_map_ops sun4v_dma_ops = { | |||
| 536 | .unmap_sg = dma_4v_unmap_sg, | 536 | .unmap_sg = dma_4v_unmap_sg, |
| 537 | }; | 537 | }; |
| 538 | 538 | ||
| 539 | static void __devinit pci_sun4v_scan_bus(struct pci_pbm_info *pbm, | 539 | static void pci_sun4v_scan_bus(struct pci_pbm_info *pbm, struct device *parent) |
| 540 | struct device *parent) | ||
| 541 | { | 540 | { |
| 542 | struct property *prop; | 541 | struct property *prop; |
| 543 | struct device_node *dp; | 542 | struct device_node *dp; |
| @@ -550,8 +549,8 @@ static void __devinit pci_sun4v_scan_bus(struct pci_pbm_info *pbm, | |||
| 550 | /* XXX register error interrupt handlers XXX */ | 549 | /* XXX register error interrupt handlers XXX */ |
| 551 | } | 550 | } |
| 552 | 551 | ||
| 553 | static unsigned long __devinit probe_existing_entries(struct pci_pbm_info *pbm, | 552 | static unsigned long probe_existing_entries(struct pci_pbm_info *pbm, |
| 554 | struct iommu *iommu) | 553 | struct iommu *iommu) |
| 555 | { | 554 | { |
| 556 | struct iommu_arena *arena = &iommu->arena; | 555 | struct iommu_arena *arena = &iommu->arena; |
| 557 | unsigned long i, cnt = 0; | 556 | unsigned long i, cnt = 0; |
| @@ -578,7 +577,7 @@ static unsigned long __devinit probe_existing_entries(struct pci_pbm_info *pbm, | |||
| 578 | return cnt; | 577 | return cnt; |
| 579 | } | 578 | } |
| 580 | 579 | ||
| 581 | static int __devinit pci_sun4v_iommu_init(struct pci_pbm_info *pbm) | 580 | static int pci_sun4v_iommu_init(struct pci_pbm_info *pbm) |
| 582 | { | 581 | { |
| 583 | static const u32 vdma_default[] = { 0x80000000, 0x80000000 }; | 582 | static const u32 vdma_default[] = { 0x80000000, 0x80000000 }; |
| 584 | struct iommu *iommu = pbm->iommu; | 583 | struct iommu *iommu = pbm->iommu; |
| @@ -879,8 +878,8 @@ static void pci_sun4v_msi_init(struct pci_pbm_info *pbm) | |||
| 879 | } | 878 | } |
| 880 | #endif /* !(CONFIG_PCI_MSI) */ | 879 | #endif /* !(CONFIG_PCI_MSI) */ |
| 881 | 880 | ||
| 882 | static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm, | 881 | static int pci_sun4v_pbm_init(struct pci_pbm_info *pbm, |
| 883 | struct platform_device *op, u32 devhandle) | 882 | struct platform_device *op, u32 devhandle) |
| 884 | { | 883 | { |
| 885 | struct device_node *dp = op->dev.of_node; | 884 | struct device_node *dp = op->dev.of_node; |
| 886 | int err; | 885 | int err; |
| @@ -919,7 +918,7 @@ static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm, | |||
| 919 | return 0; | 918 | return 0; |
| 920 | } | 919 | } |
| 921 | 920 | ||
| 922 | static int __devinit pci_sun4v_probe(struct platform_device *op) | 921 | static int pci_sun4v_probe(struct platform_device *op) |
| 923 | { | 922 | { |
| 924 | const struct linux_prom64_registers *regs; | 923 | const struct linux_prom64_registers *regs; |
| 925 | static int hvapi_negotiated = 0; | 924 | static int hvapi_negotiated = 0; |
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index 521fdf1b20e5..09f4fdd8d808 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c | |||
| @@ -439,8 +439,7 @@ int pcic_present(void) | |||
| 439 | return pcic0_up; | 439 | return pcic0_up; |
| 440 | } | 440 | } |
| 441 | 441 | ||
| 442 | static int __devinit pdev_to_pnode(struct linux_pbm_info *pbm, | 442 | static int pdev_to_pnode(struct linux_pbm_info *pbm, struct pci_dev *pdev) |
| 443 | struct pci_dev *pdev) | ||
| 444 | { | 443 | { |
| 445 | struct linux_prom_pci_registers regs[PROMREG_MAX]; | 444 | struct linux_prom_pci_registers regs[PROMREG_MAX]; |
| 446 | int err; | 445 | int err; |
| @@ -595,7 +594,7 @@ pcic_fill_irq(struct linux_pcic *pcic, struct pci_dev *dev, int node) | |||
| 595 | /* | 594 | /* |
| 596 | * Normally called from {do_}pci_scan_bus... | 595 | * Normally called from {do_}pci_scan_bus... |
| 597 | */ | 596 | */ |
| 598 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) | 597 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 599 | { | 598 | { |
| 600 | struct pci_dev *dev; | 599 | struct pci_dev *dev; |
| 601 | int i, has_io, has_mem; | 600 | int i, has_io, has_mem; |
diff --git a/arch/sparc/kernel/pmc.c b/arch/sparc/kernel/pmc.c index 0e3202239ff5..dcbb62f63068 100644 --- a/arch/sparc/kernel/pmc.c +++ b/arch/sparc/kernel/pmc.c | |||
| @@ -52,7 +52,7 @@ static void pmc_swift_idle(void) | |||
| 52 | #endif | 52 | #endif |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | static int __devinit pmc_probe(struct platform_device *op) | 55 | static int pmc_probe(struct platform_device *op) |
| 56 | { | 56 | { |
| 57 | regs = of_ioremap(&op->resource[0], 0, | 57 | regs = of_ioremap(&op->resource[0], 0, |
| 58 | resource_size(&op->resource[0]), PMC_OBPNAME); | 58 | resource_size(&op->resource[0]), PMC_OBPNAME); |
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c index 0d39075063b2..4cb23c41553f 100644 --- a/arch/sparc/kernel/power.c +++ b/arch/sparc/kernel/power.c | |||
| @@ -23,7 +23,7 @@ static irqreturn_t power_handler(int irq, void *dev_id) | |||
| 23 | return IRQ_HANDLED; | 23 | return IRQ_HANDLED; |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | static int __devinit has_button_interrupt(unsigned int irq, struct device_node *dp) | 26 | static int has_button_interrupt(unsigned int irq, struct device_node *dp) |
| 27 | { | 27 | { |
| 28 | if (irq == 0xffffffff) | 28 | if (irq == 0xffffffff) |
| 29 | return 0; | 29 | return 0; |
| @@ -33,7 +33,7 @@ static int __devinit has_button_interrupt(unsigned int irq, struct device_node * | |||
| 33 | return 1; | 33 | return 1; |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | static int __devinit power_probe(struct platform_device *op) | 36 | static int power_probe(struct platform_device *op) |
| 37 | { | 37 | { |
| 38 | struct resource *res = &op->resource[0]; | 38 | struct resource *res = &op->resource[0]; |
| 39 | unsigned int irq = op->archdata.irqs[0]; | 39 | unsigned int irq = op->archdata.irqs[0]; |
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index d94b878577b7..537eb66abd06 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
| @@ -1180,7 +1180,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
| 1180 | { | 1180 | { |
| 1181 | } | 1181 | } |
| 1182 | 1182 | ||
| 1183 | void __devinit smp_prepare_boot_cpu(void) | 1183 | void smp_prepare_boot_cpu(void) |
| 1184 | { | 1184 | { |
| 1185 | } | 1185 | } |
| 1186 | 1186 | ||
| @@ -1194,7 +1194,7 @@ void __init smp_setup_processor_id(void) | |||
| 1194 | xcall_deliver_impl = hypervisor_xcall_deliver; | 1194 | xcall_deliver_impl = hypervisor_xcall_deliver; |
| 1195 | } | 1195 | } |
| 1196 | 1196 | ||
| 1197 | void __devinit smp_fill_in_sib_core_maps(void) | 1197 | void smp_fill_in_sib_core_maps(void) |
| 1198 | { | 1198 | { |
| 1199 | unsigned int i; | 1199 | unsigned int i; |
| 1200 | 1200 | ||
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S index 5147f574f125..6ac43c36bbbf 100644 --- a/arch/sparc/kernel/systbls_32.S +++ b/arch/sparc/kernel/systbls_32.S | |||
| @@ -85,4 +85,4 @@ sys_call_table: | |||
| 85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init | 85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init |
| 86 | /*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime | 86 | /*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime |
| 87 | /*335*/ .long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev | 87 | /*335*/ .long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev |
| 88 | /*340*/ .long sys_ni_syscall, sys_kcmp | 88 | /*340*/ .long sys_ni_syscall, sys_kcmp, sys_finit_module |
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index cdbd9b817751..1009ecb92678 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
| @@ -86,7 +86,7 @@ sys_call_table32: | |||
| 86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init | 86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init |
| 87 | /*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime | 87 | /*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime |
| 88 | .word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev | 88 | .word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev |
| 89 | /*340*/ .word sys_kern_features, sys_kcmp | 89 | /*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module |
| 90 | 90 | ||
| 91 | #endif /* CONFIG_COMPAT */ | 91 | #endif /* CONFIG_COMPAT */ |
| 92 | 92 | ||
| @@ -164,4 +164,4 @@ sys_call_table: | |||
| 164 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init | 164 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init |
| 165 | /*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime | 165 | /*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime |
| 166 | .word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev | 166 | .word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev |
| 167 | /*340*/ .word sys_kern_features, sys_kcmp | 167 | /*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module |
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c index 953641549e82..c4c27b0f9063 100644 --- a/arch/sparc/kernel/time_32.c +++ b/arch/sparc/kernel/time_32.c | |||
| @@ -278,7 +278,7 @@ static struct platform_device m48t59_rtc = { | |||
| 278 | }, | 278 | }, |
| 279 | }; | 279 | }; |
| 280 | 280 | ||
| 281 | static int __devinit clock_probe(struct platform_device *op) | 281 | static int clock_probe(struct platform_device *op) |
| 282 | { | 282 | { |
| 283 | struct device_node *dp = op->dev.of_node; | 283 | struct device_node *dp = op->dev.of_node; |
| 284 | const char *model = of_get_property(dp, "model", NULL); | 284 | const char *model = of_get_property(dp, "model", NULL); |
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index e861072b9c52..c3d82b5f54ca 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
| @@ -419,7 +419,7 @@ static struct platform_device rtc_cmos_device = { | |||
| 419 | .num_resources = 1, | 419 | .num_resources = 1, |
| 420 | }; | 420 | }; |
| 421 | 421 | ||
| 422 | static int __devinit rtc_probe(struct platform_device *op) | 422 | static int rtc_probe(struct platform_device *op) |
| 423 | { | 423 | { |
| 424 | struct resource *r; | 424 | struct resource *r; |
| 425 | 425 | ||
| @@ -477,7 +477,7 @@ static struct platform_device rtc_bq4802_device = { | |||
| 477 | .num_resources = 1, | 477 | .num_resources = 1, |
| 478 | }; | 478 | }; |
| 479 | 479 | ||
| 480 | static int __devinit bq4802_probe(struct platform_device *op) | 480 | static int bq4802_probe(struct platform_device *op) |
| 481 | { | 481 | { |
| 482 | 482 | ||
| 483 | printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n", | 483 | printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n", |
| @@ -534,7 +534,7 @@ static struct platform_device m48t59_rtc = { | |||
| 534 | }, | 534 | }, |
| 535 | }; | 535 | }; |
| 536 | 536 | ||
| 537 | static int __devinit mostek_probe(struct platform_device *op) | 537 | static int mostek_probe(struct platform_device *op) |
| 538 | { | 538 | { |
| 539 | struct device_node *dp = op->dev.of_node; | 539 | struct device_node *dp = op->dev.of_node; |
| 540 | 540 | ||
| @@ -746,7 +746,7 @@ void __irq_entry timer_interrupt(int irq, struct pt_regs *regs) | |||
| 746 | set_irq_regs(old_regs); | 746 | set_irq_regs(old_regs); |
| 747 | } | 747 | } |
| 748 | 748 | ||
| 749 | void __devinit setup_sparc64_timer(void) | 749 | void setup_sparc64_timer(void) |
| 750 | { | 750 | { |
| 751 | struct clock_event_device *sevt; | 751 | struct clock_event_device *sevt; |
| 752 | unsigned long pstate; | 752 | unsigned long pstate; |
| @@ -844,7 +844,7 @@ unsigned long long sched_clock(void) | |||
| 844 | >> SPARC64_NSEC_PER_CYC_SHIFT; | 844 | >> SPARC64_NSEC_PER_CYC_SHIFT; |
| 845 | } | 845 | } |
| 846 | 846 | ||
| 847 | int __devinit read_current_timer(unsigned long *timer_val) | 847 | int read_current_timer(unsigned long *timer_val) |
| 848 | { | 848 | { |
| 849 | *timer_val = tick_ops->get_tick(); | 849 | *timer_val = tick_ops->get_tick(); |
| 850 | return 0; | 850 | return 0; |
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 85be1ca539b2..c3b72423c846 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
| @@ -87,8 +87,8 @@ static unsigned long cpu_pgsz_mask; | |||
| 87 | 87 | ||
| 88 | #define MAX_BANKS 32 | 88 | #define MAX_BANKS 32 |
| 89 | 89 | ||
| 90 | static struct linux_prom64_registers pavail[MAX_BANKS] __devinitdata; | 90 | static struct linux_prom64_registers pavail[MAX_BANKS]; |
| 91 | static int pavail_ents __devinitdata; | 91 | static int pavail_ents; |
| 92 | 92 | ||
| 93 | static int cmp_p64(const void *a, const void *b) | 93 | static int cmp_p64(const void *a, const void *b) |
| 94 | { | 94 | { |
| @@ -1931,7 +1931,7 @@ void __init paging_init(void) | |||
| 1931 | printk("Booting Linux...\n"); | 1931 | printk("Booting Linux...\n"); |
| 1932 | } | 1932 | } |
| 1933 | 1933 | ||
| 1934 | int __devinit page_in_phys_avail(unsigned long paddr) | 1934 | int page_in_phys_avail(unsigned long paddr) |
| 1935 | { | 1935 | { |
| 1936 | int i; | 1936 | int i; |
| 1937 | 1937 | ||
diff --git a/arch/tile/include/asm/pci.h b/arch/tile/include/asm/pci.h index 302cdf71ceed..54a924208d3c 100644 --- a/arch/tile/include/asm/pci.h +++ b/arch/tile/include/asm/pci.h | |||
| @@ -188,7 +188,7 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *); | |||
| 188 | int __init tile_pci_init(void); | 188 | int __init tile_pci_init(void); |
| 189 | int __init pcibios_init(void); | 189 | int __init pcibios_init(void); |
| 190 | 190 | ||
| 191 | void __devinit pcibios_fixup_bus(struct pci_bus *bus); | 191 | void pcibios_fixup_bus(struct pci_bus *bus); |
| 192 | 192 | ||
| 193 | #define pci_domain_nr(bus) (((struct pci_controller *)(bus)->sysdata)->index) | 193 | #define pci_domain_nr(bus) (((struct pci_controller *)(bus)->sysdata)->index) |
| 194 | 194 | ||
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index aac1cd586966..67237d34c2e2 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c | |||
| @@ -81,7 +81,7 @@ EXPORT_SYMBOL(pcibios_align_resource); | |||
| 81 | * controller_id is the controller number, config type is 0 or 1 for | 81 | * controller_id is the controller number, config type is 0 or 1 for |
| 82 | * config0 or config1 operations. | 82 | * config0 or config1 operations. |
| 83 | */ | 83 | */ |
| 84 | static int __devinit tile_pcie_open(int controller_id, int config_type) | 84 | static int tile_pcie_open(int controller_id, int config_type) |
| 85 | { | 85 | { |
| 86 | char filename[32]; | 86 | char filename[32]; |
| 87 | int fd; | 87 | int fd; |
| @@ -97,8 +97,7 @@ static int __devinit tile_pcie_open(int controller_id, int config_type) | |||
| 97 | /* | 97 | /* |
| 98 | * Get the IRQ numbers from the HV and set up the handlers for them. | 98 | * Get the IRQ numbers from the HV and set up the handlers for them. |
| 99 | */ | 99 | */ |
| 100 | static int __devinit tile_init_irqs(int controller_id, | 100 | static int tile_init_irqs(int controller_id, struct pci_controller *controller) |
| 101 | struct pci_controller *controller) | ||
| 102 | { | 101 | { |
| 103 | char filename[32]; | 102 | char filename[32]; |
| 104 | int fd; | 103 | int fd; |
| @@ -237,7 +236,7 @@ static int tile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 237 | } | 236 | } |
| 238 | 237 | ||
| 239 | 238 | ||
| 240 | static void __devinit fixup_read_and_payload_sizes(void) | 239 | static void fixup_read_and_payload_sizes(void) |
| 241 | { | 240 | { |
| 242 | struct pci_dev *dev = NULL; | 241 | struct pci_dev *dev = NULL; |
| 243 | int smallest_max_payload = 0x1; /* Tile maxes out at 256 bytes. */ | 242 | int smallest_max_payload = 0x1; /* Tile maxes out at 256 bytes. */ |
| @@ -379,7 +378,7 @@ subsys_initcall(pcibios_init); | |||
| 379 | /* | 378 | /* |
| 380 | * No bus fixups needed. | 379 | * No bus fixups needed. |
| 381 | */ | 380 | */ |
| 382 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) | 381 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 383 | { | 382 | { |
| 384 | /* Nothing needs to be done. */ | 383 | /* Nothing needs to be done. */ |
| 385 | } | 384 | } |
| @@ -458,11 +457,8 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) | |||
| 458 | * specified bus & slot. | 457 | * specified bus & slot. |
| 459 | */ | 458 | */ |
| 460 | 459 | ||
| 461 | static int __devinit tile_cfg_read(struct pci_bus *bus, | 460 | static int tile_cfg_read(struct pci_bus *bus, unsigned int devfn, int offset, |
| 462 | unsigned int devfn, | 461 | int size, u32 *val) |
| 463 | int offset, | ||
| 464 | int size, | ||
| 465 | u32 *val) | ||
| 466 | { | 462 | { |
| 467 | struct pci_controller *controller = bus->sysdata; | 463 | struct pci_controller *controller = bus->sysdata; |
| 468 | int busnum = bus->number & 0xff; | 464 | int busnum = bus->number & 0xff; |
| @@ -504,11 +500,8 @@ static int __devinit tile_cfg_read(struct pci_bus *bus, | |||
| 504 | * See tile_cfg_read() for relevant comments. | 500 | * See tile_cfg_read() for relevant comments. |
| 505 | * Note that "val" is the value to write, not a pointer to that value. | 501 | * Note that "val" is the value to write, not a pointer to that value. |
| 506 | */ | 502 | */ |
| 507 | static int __devinit tile_cfg_write(struct pci_bus *bus, | 503 | static int tile_cfg_write(struct pci_bus *bus, unsigned int devfn, int offset, |
| 508 | unsigned int devfn, | 504 | int size, u32 val) |
| 509 | int offset, | ||
| 510 | int size, | ||
| 511 | u32 val) | ||
| 512 | { | 505 | { |
| 513 | struct pci_controller *controller = bus->sysdata; | 506 | struct pci_controller *controller = bus->sysdata; |
| 514 | int busnum = bus->number & 0xff; | 507 | int busnum = bus->number & 0xff; |
diff --git a/arch/tile/kernel/pci_gx.c b/arch/tile/kernel/pci_gx.c index 94810d4a6332..11425633b2d7 100644 --- a/arch/tile/kernel/pci_gx.c +++ b/arch/tile/kernel/pci_gx.c | |||
| @@ -58,10 +58,10 @@ | |||
| 58 | #define TRACE_CFG_RD(...) | 58 | #define TRACE_CFG_RD(...) |
| 59 | #endif | 59 | #endif |
| 60 | 60 | ||
| 61 | static int __devinitdata pci_probe = 1; | 61 | static int pci_probe = 1; |
| 62 | 62 | ||
| 63 | /* Information on the PCIe RC ports configuration. */ | 63 | /* Information on the PCIe RC ports configuration. */ |
| 64 | static int __devinitdata pcie_rc[TILEGX_NUM_TRIO][TILEGX_TRIO_PCIES]; | 64 | static int pcie_rc[TILEGX_NUM_TRIO][TILEGX_TRIO_PCIES]; |
| 65 | 65 | ||
| 66 | /* | 66 | /* |
| 67 | * On some platforms with one or more Gx endpoint ports, we need to | 67 | * On some platforms with one or more Gx endpoint ports, we need to |
| @@ -72,7 +72,7 @@ static int __devinitdata pcie_rc[TILEGX_NUM_TRIO][TILEGX_TRIO_PCIES]; | |||
| 72 | * the delay in seconds. If the delay is not provided, the value | 72 | * the delay in seconds. If the delay is not provided, the value |
| 73 | * will be DEFAULT_RC_DELAY. | 73 | * will be DEFAULT_RC_DELAY. |
| 74 | */ | 74 | */ |
| 75 | static int __devinitdata rc_delay[TILEGX_NUM_TRIO][TILEGX_TRIO_PCIES]; | 75 | static int rc_delay[TILEGX_NUM_TRIO][TILEGX_TRIO_PCIES]; |
| 76 | 76 | ||
| 77 | /* Default number of seconds that the PCIe RC port probe can be delayed. */ | 77 | /* Default number of seconds that the PCIe RC port probe can be delayed. */ |
| 78 | #define DEFAULT_RC_DELAY 10 | 78 | #define DEFAULT_RC_DELAY 10 |
| @@ -137,7 +137,7 @@ static int tile_irq_cpu(int irq) | |||
| 137 | /* | 137 | /* |
| 138 | * Open a file descriptor to the TRIO shim. | 138 | * Open a file descriptor to the TRIO shim. |
| 139 | */ | 139 | */ |
| 140 | static int __devinit tile_pcie_open(int trio_index) | 140 | static int tile_pcie_open(int trio_index) |
| 141 | { | 141 | { |
| 142 | gxio_trio_context_t *context = &trio_contexts[trio_index]; | 142 | gxio_trio_context_t *context = &trio_contexts[trio_index]; |
| 143 | int ret; | 143 | int ret; |
| @@ -265,7 +265,7 @@ trio_handle_level_irq(unsigned int irq, struct irq_desc *desc) | |||
| 265 | * Create kernel irqs and set up the handlers for the legacy interrupts. | 265 | * Create kernel irqs and set up the handlers for the legacy interrupts. |
| 266 | * Also some minimum initialization for the MSI support. | 266 | * Also some minimum initialization for the MSI support. |
| 267 | */ | 267 | */ |
| 268 | static int __devinit tile_init_irqs(struct pci_controller *controller) | 268 | static int tile_init_irqs(struct pci_controller *controller) |
| 269 | { | 269 | { |
| 270 | int i; | 270 | int i; |
| 271 | int j; | 271 | int j; |
| @@ -459,8 +459,7 @@ static int tile_map_irq(const struct pci_dev *dev, u8 device, u8 pin) | |||
| 459 | } | 459 | } |
| 460 | 460 | ||
| 461 | 461 | ||
| 462 | static void __devinit fixup_read_and_payload_sizes(struct pci_controller * | 462 | static void fixup_read_and_payload_sizes(struct pci_controller *controller) |
| 463 | controller) | ||
| 464 | { | 463 | { |
| 465 | gxio_trio_context_t *trio_context = controller->trio; | 464 | gxio_trio_context_t *trio_context = controller->trio; |
| 466 | struct pci_bus *root_bus = controller->root_bus; | 465 | struct pci_bus *root_bus = controller->root_bus; |
| @@ -541,7 +540,7 @@ static void __devinit fixup_read_and_payload_sizes(struct pci_controller * | |||
| 541 | } | 540 | } |
| 542 | } | 541 | } |
| 543 | 542 | ||
| 544 | static int __devinit setup_pcie_rc_delay(char *str) | 543 | static int setup_pcie_rc_delay(char *str) |
| 545 | { | 544 | { |
| 546 | unsigned long delay = 0; | 545 | unsigned long delay = 0; |
| 547 | unsigned long trio_index; | 546 | unsigned long trio_index; |
| @@ -1016,7 +1015,7 @@ alloc_mem_map_failed: | |||
| 1016 | subsys_initcall(pcibios_init); | 1015 | subsys_initcall(pcibios_init); |
| 1017 | 1016 | ||
| 1018 | /* Note: to be deleted after Linux 3.6 merge. */ | 1017 | /* Note: to be deleted after Linux 3.6 merge. */ |
| 1019 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) | 1018 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 1020 | { | 1019 | { |
| 1021 | } | 1020 | } |
| 1022 | 1021 | ||
| @@ -1024,7 +1023,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) | |||
| 1024 | * This can be called from the generic PCI layer, but doesn't need to | 1023 | * This can be called from the generic PCI layer, but doesn't need to |
| 1025 | * do anything. | 1024 | * do anything. |
| 1026 | */ | 1025 | */ |
| 1027 | char __devinit *pcibios_setup(char *str) | 1026 | char *pcibios_setup(char *str) |
| 1028 | { | 1027 | { |
| 1029 | if (!strcmp(str, "off")) { | 1028 | if (!strcmp(str, "off")) { |
| 1030 | pci_probe = 0; | 1029 | pci_probe = 0; |
| @@ -1143,11 +1142,8 @@ EXPORT_SYMBOL(pci_iounmap); | |||
| 1143 | * specified bus & device. | 1142 | * specified bus & device. |
| 1144 | */ | 1143 | */ |
| 1145 | 1144 | ||
| 1146 | static int __devinit tile_cfg_read(struct pci_bus *bus, | 1145 | static int tile_cfg_read(struct pci_bus *bus, unsigned int devfn, int offset, |
| 1147 | unsigned int devfn, | 1146 | int size, u32 *val) |
| 1148 | int offset, | ||
| 1149 | int size, | ||
| 1150 | u32 *val) | ||
| 1151 | { | 1147 | { |
| 1152 | struct pci_controller *controller = bus->sysdata; | 1148 | struct pci_controller *controller = bus->sysdata; |
| 1153 | gxio_trio_context_t *trio_context = controller->trio; | 1149 | gxio_trio_context_t *trio_context = controller->trio; |
| @@ -1271,11 +1267,8 @@ invalid_device: | |||
| 1271 | * See tile_cfg_read() for relevent comments. | 1267 | * See tile_cfg_read() for relevent comments. |
| 1272 | * Note that "val" is the value to write, not a pointer to that value. | 1268 | * Note that "val" is the value to write, not a pointer to that value. |
| 1273 | */ | 1269 | */ |
| 1274 | static int __devinit tile_cfg_write(struct pci_bus *bus, | 1270 | static int tile_cfg_write(struct pci_bus *bus, unsigned int devfn, int offset, |
| 1275 | unsigned int devfn, | 1271 | int size, u32 val) |
| 1276 | int offset, | ||
| 1277 | int size, | ||
| 1278 | u32 val) | ||
| 1279 | { | 1272 | { |
| 1280 | struct pci_controller *controller = bus->sysdata; | 1273 | struct pci_controller *controller = bus->sysdata; |
| 1281 | gxio_trio_context_t *trio_context = controller->trio; | 1274 | gxio_trio_context_t *trio_context = controller->trio; |
diff --git a/arch/unicore32/kernel/pci.c b/arch/unicore32/kernel/pci.c index 7c4359240b81..ef69c0c82825 100644 --- a/arch/unicore32/kernel/pci.c +++ b/arch/unicore32/kernel/pci.c | |||
| @@ -167,7 +167,7 @@ static inline int pdev_bad_for_parity(struct pci_dev *dev) | |||
| 167 | * pcibios_fixup_bus - Called after each bus is probed, | 167 | * pcibios_fixup_bus - Called after each bus is probed, |
| 168 | * but before its children are examined. | 168 | * but before its children are examined. |
| 169 | */ | 169 | */ |
| 170 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) | 170 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 171 | { | 171 | { |
| 172 | struct pci_dev *dev; | 172 | struct pci_dev *dev; |
| 173 | u16 features = PCI_COMMAND_SERR | 173 | u16 features = PCI_COMMAND_SERR |
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index b1942e222768..18e329ca108e 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c | |||
| @@ -302,7 +302,7 @@ static efi_status_t setup_efi_pci(struct boot_params *params) | |||
| 302 | if (status != EFI_SUCCESS) | 302 | if (status != EFI_SUCCESS) |
| 303 | continue; | 303 | continue; |
| 304 | 304 | ||
| 305 | if (!attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM) | 305 | if (!(attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM)) |
| 306 | continue; | 306 | continue; |
| 307 | 307 | ||
| 308 | if (!pci->romimage || !pci->romsize) | 308 | if (!pci->romimage || !pci->romsize) |
diff --git a/arch/x86/include/asm/parport.h b/arch/x86/include/asm/parport.h index 3c4ffeb467e9..0d2d3b29118f 100644 --- a/arch/x86/include/asm/parport.h +++ b/arch/x86/include/asm/parport.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | #ifndef _ASM_X86_PARPORT_H | 1 | #ifndef _ASM_X86_PARPORT_H |
| 2 | #define _ASM_X86_PARPORT_H | 2 | #define _ASM_X86_PARPORT_H |
| 3 | 3 | ||
| 4 | static int __devinit parport_pc_find_isa_ports(int autoirq, int autodma); | 4 | static int parport_pc_find_isa_ports(int autoirq, int autodma); |
| 5 | static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma) | 5 | static int parport_pc_find_nonpci_ports(int autoirq, int autodma) |
| 6 | { | 6 | { |
| 7 | return parport_pc_find_isa_ports(autoirq, autodma); | 7 | return parport_pc_find_isa_ports(autoirq, autodma); |
| 8 | } | 8 | } |
diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h index 73e8eeff22ee..747e5a38b590 100644 --- a/arch/x86/include/asm/pci_x86.h +++ b/arch/x86/include/asm/pci_x86.h | |||
| @@ -140,11 +140,10 @@ struct pci_mmcfg_region { | |||
| 140 | 140 | ||
| 141 | extern int __init pci_mmcfg_arch_init(void); | 141 | extern int __init pci_mmcfg_arch_init(void); |
| 142 | extern void __init pci_mmcfg_arch_free(void); | 142 | extern void __init pci_mmcfg_arch_free(void); |
| 143 | extern int __devinit pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg); | 143 | extern int pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg); |
| 144 | extern void pci_mmcfg_arch_unmap(struct pci_mmcfg_region *cfg); | 144 | extern void pci_mmcfg_arch_unmap(struct pci_mmcfg_region *cfg); |
| 145 | extern int __devinit pci_mmconfig_insert(struct device *dev, | 145 | extern int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end, |
| 146 | u16 seg, u8 start, | 146 | phys_addr_t addr); |
| 147 | u8 end, phys_addr_t addr); | ||
| 148 | extern int pci_mmconfig_delete(u16 seg, u8 start, u8 end); | 147 | extern int pci_mmconfig_delete(u16 seg, u8 start, u8 end); |
| 149 | extern struct pci_mmcfg_region *pci_mmconfig_lookup(int segment, int bus); | 148 | extern struct pci_mmcfg_region *pci_mmconfig_lookup(int segment, int bus); |
| 150 | 149 | ||
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index 3cf3d97cce3a..b43200dbfe7e 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c | |||
| @@ -2500,7 +2500,7 @@ static bool pcidrv_registered; | |||
| 2500 | /* | 2500 | /* |
| 2501 | * add a pci uncore device | 2501 | * add a pci uncore device |
| 2502 | */ | 2502 | */ |
| 2503 | static int __devinit uncore_pci_add(struct intel_uncore_type *type, struct pci_dev *pdev) | 2503 | static int uncore_pci_add(struct intel_uncore_type *type, struct pci_dev *pdev) |
| 2504 | { | 2504 | { |
| 2505 | struct intel_uncore_pmu *pmu; | 2505 | struct intel_uncore_pmu *pmu; |
| 2506 | struct intel_uncore_box *box; | 2506 | struct intel_uncore_box *box; |
| @@ -2571,8 +2571,8 @@ static void uncore_pci_remove(struct pci_dev *pdev) | |||
| 2571 | kfree(box); | 2571 | kfree(box); |
| 2572 | } | 2572 | } |
| 2573 | 2573 | ||
| 2574 | static int __devinit uncore_pci_probe(struct pci_dev *pdev, | 2574 | static int uncore_pci_probe(struct pci_dev *pdev, |
| 2575 | const struct pci_device_id *id) | 2575 | const struct pci_device_id *id) |
| 2576 | { | 2576 | { |
| 2577 | struct intel_uncore_type *type; | 2577 | struct intel_uncore_type *type; |
| 2578 | 2578 | ||
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 08b973f64032..9c2bd8bd4b4c 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c | |||
| @@ -43,6 +43,7 @@ | |||
| 43 | #include <asm/apicdef.h> | 43 | #include <asm/apicdef.h> |
| 44 | #include <asm/hypervisor.h> | 44 | #include <asm/hypervisor.h> |
| 45 | #include <asm/kvm_guest.h> | 45 | #include <asm/kvm_guest.h> |
| 46 | #include <asm/context_tracking.h> | ||
| 46 | 47 | ||
| 47 | static int kvmapf = 1; | 48 | static int kvmapf = 1; |
| 48 | 49 | ||
| @@ -121,6 +122,8 @@ void kvm_async_pf_task_wait(u32 token) | |||
| 121 | struct kvm_task_sleep_node n, *e; | 122 | struct kvm_task_sleep_node n, *e; |
| 122 | DEFINE_WAIT(wait); | 123 | DEFINE_WAIT(wait); |
| 123 | 124 | ||
| 125 | rcu_irq_enter(); | ||
| 126 | |||
| 124 | spin_lock(&b->lock); | 127 | spin_lock(&b->lock); |
| 125 | e = _find_apf_task(b, token); | 128 | e = _find_apf_task(b, token); |
| 126 | if (e) { | 129 | if (e) { |
| @@ -128,6 +131,8 @@ void kvm_async_pf_task_wait(u32 token) | |||
| 128 | hlist_del(&e->link); | 131 | hlist_del(&e->link); |
| 129 | kfree(e); | 132 | kfree(e); |
| 130 | spin_unlock(&b->lock); | 133 | spin_unlock(&b->lock); |
| 134 | |||
| 135 | rcu_irq_exit(); | ||
| 131 | return; | 136 | return; |
| 132 | } | 137 | } |
| 133 | 138 | ||
| @@ -152,13 +157,16 @@ void kvm_async_pf_task_wait(u32 token) | |||
| 152 | /* | 157 | /* |
| 153 | * We cannot reschedule. So halt. | 158 | * We cannot reschedule. So halt. |
| 154 | */ | 159 | */ |
| 160 | rcu_irq_exit(); | ||
| 155 | native_safe_halt(); | 161 | native_safe_halt(); |
| 162 | rcu_irq_enter(); | ||
| 156 | local_irq_disable(); | 163 | local_irq_disable(); |
| 157 | } | 164 | } |
| 158 | } | 165 | } |
| 159 | if (!n.halted) | 166 | if (!n.halted) |
| 160 | finish_wait(&n.wq, &wait); | 167 | finish_wait(&n.wq, &wait); |
| 161 | 168 | ||
| 169 | rcu_irq_exit(); | ||
| 162 | return; | 170 | return; |
| 163 | } | 171 | } |
| 164 | EXPORT_SYMBOL_GPL(kvm_async_pf_task_wait); | 172 | EXPORT_SYMBOL_GPL(kvm_async_pf_task_wait); |
| @@ -252,10 +260,10 @@ do_async_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
| 252 | break; | 260 | break; |
| 253 | case KVM_PV_REASON_PAGE_NOT_PRESENT: | 261 | case KVM_PV_REASON_PAGE_NOT_PRESENT: |
| 254 | /* page is swapped out by the host. */ | 262 | /* page is swapped out by the host. */ |
| 255 | rcu_irq_enter(); | 263 | exception_enter(regs); |
| 256 | exit_idle(); | 264 | exit_idle(); |
| 257 | kvm_async_pf_task_wait((u32)read_cr2()); | 265 | kvm_async_pf_task_wait((u32)read_cr2()); |
| 258 | rcu_irq_exit(); | 266 | exception_exit(regs); |
| 259 | break; | 267 | break; |
| 260 | case KVM_PV_REASON_PAGE_READY: | 268 | case KVM_PV_REASON_PAGE_READY: |
| 261 | rcu_irq_enter(); | 269 | rcu_irq_enter(); |
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index de2b7ad70273..0f5dec5c80e0 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
| @@ -265,7 +265,7 @@ rootfs_initcall(pci_iommu_init); | |||
| 265 | #ifdef CONFIG_PCI | 265 | #ifdef CONFIG_PCI |
| 266 | /* Many VIA bridges seem to corrupt data for DAC. Disable it here */ | 266 | /* Many VIA bridges seem to corrupt data for DAC. Disable it here */ |
| 267 | 267 | ||
| 268 | static __devinit void via_no_dac(struct pci_dev *dev) | 268 | static void via_no_dac(struct pci_dev *dev) |
| 269 | { | 269 | { |
| 270 | if (forbid_dac == 0) { | 270 | if (forbid_dac == 0) { |
| 271 | dev_info(&dev->dev, "disabling DAC on VIA PCI bridge\n"); | 271 | dev_info(&dev->dev, "disabling DAC on VIA PCI bridge\n"); |
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c index 1b27de563561..26ee48a33dc4 100644 --- a/arch/x86/kernel/quirks.c +++ b/arch/x86/kernel/quirks.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI) | 9 | #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI) |
| 10 | 10 | ||
| 11 | static void __devinit quirk_intel_irqbalance(struct pci_dev *dev) | 11 | static void quirk_intel_irqbalance(struct pci_dev *dev) |
| 12 | { | 12 | { |
| 13 | u8 config; | 13 | u8 config; |
| 14 | u16 word; | 14 | u16 word; |
| @@ -512,7 +512,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, | |||
| 512 | 512 | ||
| 513 | #if defined(CONFIG_PCI) && defined(CONFIG_NUMA) | 513 | #if defined(CONFIG_PCI) && defined(CONFIG_NUMA) |
| 514 | /* Set correct numa_node information for AMD NB functions */ | 514 | /* Set correct numa_node information for AMD NB functions */ |
| 515 | static void __devinit quirk_amd_nb_node(struct pci_dev *dev) | 515 | static void quirk_amd_nb_node(struct pci_dev *dev) |
| 516 | { | 516 | { |
| 517 | struct pci_dev *nb_ht; | 517 | struct pci_dev *nb_ht; |
| 518 | unsigned int devfn; | 518 | unsigned int devfn; |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 23ddd558fbd5..00f6c1472b85 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
| @@ -610,6 +610,83 @@ static __init void reserve_ibft_region(void) | |||
| 610 | 610 | ||
| 611 | static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10; | 611 | static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10; |
| 612 | 612 | ||
| 613 | static bool __init snb_gfx_workaround_needed(void) | ||
| 614 | { | ||
| 615 | #ifdef CONFIG_PCI | ||
| 616 | int i; | ||
| 617 | u16 vendor, devid; | ||
| 618 | static const __initconst u16 snb_ids[] = { | ||
| 619 | 0x0102, | ||
| 620 | 0x0112, | ||
| 621 | 0x0122, | ||
| 622 | 0x0106, | ||
| 623 | 0x0116, | ||
| 624 | 0x0126, | ||
| 625 | 0x010a, | ||
| 626 | }; | ||
| 627 | |||
| 628 | /* Assume no if something weird is going on with PCI */ | ||
| 629 | if (!early_pci_allowed()) | ||
| 630 | return false; | ||
| 631 | |||
| 632 | vendor = read_pci_config_16(0, 2, 0, PCI_VENDOR_ID); | ||
| 633 | if (vendor != 0x8086) | ||
| 634 | return false; | ||
| 635 | |||
| 636 | devid = read_pci_config_16(0, 2, 0, PCI_DEVICE_ID); | ||
| 637 | for (i = 0; i < ARRAY_SIZE(snb_ids); i++) | ||
| 638 | if (devid == snb_ids[i]) | ||
| 639 | return true; | ||
| 640 | #endif | ||
| 641 | |||
| 642 | return false; | ||
| 643 | } | ||
| 644 | |||
| 645 | /* | ||
| 646 | * Sandy Bridge graphics has trouble with certain ranges, exclude | ||
| 647 | * them from allocation. | ||
| 648 | */ | ||
| 649 | static void __init trim_snb_memory(void) | ||
| 650 | { | ||
| 651 | static const __initconst unsigned long bad_pages[] = { | ||
| 652 | 0x20050000, | ||
| 653 | 0x20110000, | ||
| 654 | 0x20130000, | ||
| 655 | 0x20138000, | ||
| 656 | 0x40004000, | ||
| 657 | }; | ||
| 658 | int i; | ||
| 659 | |||
| 660 | if (!snb_gfx_workaround_needed()) | ||
| 661 | return; | ||
| 662 | |||
| 663 | printk(KERN_DEBUG "reserving inaccessible SNB gfx pages\n"); | ||
| 664 | |||
| 665 | /* | ||
| 666 | * Reserve all memory below the 1 MB mark that has not | ||
| 667 | * already been reserved. | ||
| 668 | */ | ||
| 669 | memblock_reserve(0, 1<<20); | ||
| 670 | |||
| 671 | for (i = 0; i < ARRAY_SIZE(bad_pages); i++) { | ||
| 672 | if (memblock_reserve(bad_pages[i], PAGE_SIZE)) | ||
| 673 | printk(KERN_WARNING "failed to reserve 0x%08lx\n", | ||
| 674 | bad_pages[i]); | ||
| 675 | } | ||
| 676 | } | ||
| 677 | |||
| 678 | /* | ||
| 679 | * Here we put platform-specific memory range workarounds, i.e. | ||
| 680 | * memory known to be corrupt or otherwise in need to be reserved on | ||
| 681 | * specific platforms. | ||
| 682 | * | ||
| 683 | * If this gets used more widely it could use a real dispatch mechanism. | ||
| 684 | */ | ||
| 685 | static void __init trim_platform_memory_ranges(void) | ||
| 686 | { | ||
| 687 | trim_snb_memory(); | ||
| 688 | } | ||
| 689 | |||
| 613 | static void __init trim_bios_range(void) | 690 | static void __init trim_bios_range(void) |
| 614 | { | 691 | { |
| 615 | /* | 692 | /* |
| @@ -630,6 +707,7 @@ static void __init trim_bios_range(void) | |||
| 630 | * take them out. | 707 | * take them out. |
| 631 | */ | 708 | */ |
| 632 | e820_remove_range(BIOS_BEGIN, BIOS_END - BIOS_BEGIN, E820_RAM, 1); | 709 | e820_remove_range(BIOS_BEGIN, BIOS_END - BIOS_BEGIN, E820_RAM, 1); |
| 710 | |||
| 633 | sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); | 711 | sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); |
| 634 | } | 712 | } |
| 635 | 713 | ||
| @@ -908,6 +986,8 @@ void __init setup_arch(char **cmdline_p) | |||
| 908 | 986 | ||
| 909 | setup_real_mode(); | 987 | setup_real_mode(); |
| 910 | 988 | ||
| 989 | trim_platform_memory_ranges(); | ||
| 990 | |||
| 911 | init_gbpages(); | 991 | init_gbpages(); |
| 912 | 992 | ||
| 913 | /* max_pfn_mapped is updated here */ | 993 | /* max_pfn_mapped is updated here */ |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 76f54461f7cb..c243b81e3c74 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
| @@ -120,7 +120,7 @@ struct kvm_shared_msrs { | |||
| 120 | }; | 120 | }; |
| 121 | 121 | ||
| 122 | static struct kvm_shared_msrs_global __read_mostly shared_msrs_global; | 122 | static struct kvm_shared_msrs_global __read_mostly shared_msrs_global; |
| 123 | static DEFINE_PER_CPU(struct kvm_shared_msrs, shared_msrs); | 123 | static struct kvm_shared_msrs __percpu *shared_msrs; |
| 124 | 124 | ||
| 125 | struct kvm_stats_debugfs_item debugfs_entries[] = { | 125 | struct kvm_stats_debugfs_item debugfs_entries[] = { |
| 126 | { "pf_fixed", VCPU_STAT(pf_fixed) }, | 126 | { "pf_fixed", VCPU_STAT(pf_fixed) }, |
| @@ -191,10 +191,10 @@ static void kvm_on_user_return(struct user_return_notifier *urn) | |||
| 191 | 191 | ||
| 192 | static void shared_msr_update(unsigned slot, u32 msr) | 192 | static void shared_msr_update(unsigned slot, u32 msr) |
| 193 | { | 193 | { |
| 194 | struct kvm_shared_msrs *smsr; | ||
| 195 | u64 value; | 194 | u64 value; |
| 195 | unsigned int cpu = smp_processor_id(); | ||
| 196 | struct kvm_shared_msrs *smsr = per_cpu_ptr(shared_msrs, cpu); | ||
| 196 | 197 | ||
| 197 | smsr = &__get_cpu_var(shared_msrs); | ||
| 198 | /* only read, and nobody should modify it at this time, | 198 | /* only read, and nobody should modify it at this time, |
| 199 | * so don't need lock */ | 199 | * so don't need lock */ |
| 200 | if (slot >= shared_msrs_global.nr) { | 200 | if (slot >= shared_msrs_global.nr) { |
| @@ -226,7 +226,8 @@ static void kvm_shared_msr_cpu_online(void) | |||
| 226 | 226 | ||
| 227 | void kvm_set_shared_msr(unsigned slot, u64 value, u64 mask) | 227 | void kvm_set_shared_msr(unsigned slot, u64 value, u64 mask) |
| 228 | { | 228 | { |
| 229 | struct kvm_shared_msrs *smsr = &__get_cpu_var(shared_msrs); | 229 | unsigned int cpu = smp_processor_id(); |
| 230 | struct kvm_shared_msrs *smsr = per_cpu_ptr(shared_msrs, cpu); | ||
| 230 | 231 | ||
| 231 | if (((value ^ smsr->values[slot].curr) & mask) == 0) | 232 | if (((value ^ smsr->values[slot].curr) & mask) == 0) |
| 232 | return; | 233 | return; |
| @@ -242,7 +243,8 @@ EXPORT_SYMBOL_GPL(kvm_set_shared_msr); | |||
| 242 | 243 | ||
| 243 | static void drop_user_return_notifiers(void *ignore) | 244 | static void drop_user_return_notifiers(void *ignore) |
| 244 | { | 245 | { |
| 245 | struct kvm_shared_msrs *smsr = &__get_cpu_var(shared_msrs); | 246 | unsigned int cpu = smp_processor_id(); |
| 247 | struct kvm_shared_msrs *smsr = per_cpu_ptr(shared_msrs, cpu); | ||
| 246 | 248 | ||
| 247 | if (smsr->registered) | 249 | if (smsr->registered) |
| 248 | kvm_on_user_return(&smsr->urn); | 250 | kvm_on_user_return(&smsr->urn); |
| @@ -5233,9 +5235,16 @@ int kvm_arch_init(void *opaque) | |||
| 5233 | goto out; | 5235 | goto out; |
| 5234 | } | 5236 | } |
| 5235 | 5237 | ||
| 5238 | r = -ENOMEM; | ||
| 5239 | shared_msrs = alloc_percpu(struct kvm_shared_msrs); | ||
| 5240 | if (!shared_msrs) { | ||
| 5241 | printk(KERN_ERR "kvm: failed to allocate percpu kvm_shared_msrs\n"); | ||
| 5242 | goto out; | ||
| 5243 | } | ||
| 5244 | |||
| 5236 | r = kvm_mmu_module_init(); | 5245 | r = kvm_mmu_module_init(); |
| 5237 | if (r) | 5246 | if (r) |
| 5238 | goto out; | 5247 | goto out_free_percpu; |
| 5239 | 5248 | ||
| 5240 | kvm_set_mmio_spte_mask(); | 5249 | kvm_set_mmio_spte_mask(); |
| 5241 | kvm_init_msr_list(); | 5250 | kvm_init_msr_list(); |
| @@ -5258,6 +5267,8 @@ int kvm_arch_init(void *opaque) | |||
| 5258 | 5267 | ||
| 5259 | return 0; | 5268 | return 0; |
| 5260 | 5269 | ||
| 5270 | out_free_percpu: | ||
| 5271 | free_percpu(shared_msrs); | ||
| 5261 | out: | 5272 | out: |
| 5262 | return r; | 5273 | return r; |
| 5263 | } | 5274 | } |
| @@ -5275,6 +5286,7 @@ void kvm_arch_exit(void) | |||
| 5275 | #endif | 5286 | #endif |
| 5276 | kvm_x86_ops = NULL; | 5287 | kvm_x86_ops = NULL; |
| 5277 | kvm_mmu_module_exit(); | 5288 | kvm_mmu_module_exit(); |
| 5289 | free_percpu(shared_msrs); | ||
| 5278 | } | 5290 | } |
| 5279 | 5291 | ||
| 5280 | int kvm_emulate_halt(struct kvm_vcpu *vcpu) | 5292 | int kvm_emulate_halt(struct kvm_vcpu *vcpu) |
diff --git a/arch/x86/lib/delay.c b/arch/x86/lib/delay.c index e395693abdb1..7c3bee636e2f 100644 --- a/arch/x86/lib/delay.c +++ b/arch/x86/lib/delay.c | |||
| @@ -98,7 +98,7 @@ void use_tsc_delay(void) | |||
| 98 | delay_fn = delay_tsc; | 98 | delay_fn = delay_tsc; |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | int __devinit read_current_timer(unsigned long *timer_val) | 101 | int read_current_timer(unsigned long *timer_val) |
| 102 | { | 102 | { |
| 103 | if (delay_fn == delay_tsc) { | 103 | if (delay_fn == delay_tsc) { |
| 104 | rdtscll(*timer_val); | 104 | rdtscll(*timer_val); |
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 0c01261fe5a8..53ea60458e01 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
| @@ -145,7 +145,7 @@ void __init pci_acpi_crs_quirks(void) | |||
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | #ifdef CONFIG_PCI_MMCONFIG | 147 | #ifdef CONFIG_PCI_MMCONFIG |
| 148 | static int __devinit check_segment(u16 seg, struct device *dev, char *estr) | 148 | static int check_segment(u16 seg, struct device *dev, char *estr) |
| 149 | { | 149 | { |
| 150 | if (seg) { | 150 | if (seg) { |
| 151 | dev_err(dev, | 151 | dev_err(dev, |
| @@ -168,9 +168,8 @@ static int __devinit check_segment(u16 seg, struct device *dev, char *estr) | |||
| 168 | return 0; | 168 | return 0; |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | static int __devinit setup_mcfg_map(struct pci_root_info *info, | 171 | static int setup_mcfg_map(struct pci_root_info *info, u16 seg, u8 start, |
| 172 | u16 seg, u8 start, u8 end, | 172 | u8 end, phys_addr_t addr) |
| 173 | phys_addr_t addr) | ||
| 174 | { | 173 | { |
| 175 | int result; | 174 | int result; |
| 176 | struct device *dev = &info->bridge->dev; | 175 | struct device *dev = &info->bridge->dev; |
| @@ -208,7 +207,7 @@ static void teardown_mcfg_map(struct pci_root_info *info) | |||
| 208 | } | 207 | } |
| 209 | } | 208 | } |
| 210 | #else | 209 | #else |
| 211 | static int __devinit setup_mcfg_map(struct pci_root_info *info, | 210 | static int setup_mcfg_map(struct pci_root_info *info, |
| 212 | u16 seg, u8 start, u8 end, | 211 | u16 seg, u8 start, u8 end, |
| 213 | phys_addr_t addr) | 212 | phys_addr_t addr) |
| 214 | { | 213 | { |
| @@ -474,7 +473,7 @@ probe_pci_root_info(struct pci_root_info *info, struct acpi_device *device, | |||
| 474 | info); | 473 | info); |
| 475 | } | 474 | } |
| 476 | 475 | ||
| 477 | struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_pci_root *root) | 476 | struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) |
| 478 | { | 477 | { |
| 479 | struct acpi_device *device = root->device; | 478 | struct acpi_device *device = root->device; |
| 480 | struct pci_root_info *info = NULL; | 479 | struct pci_root_info *info = NULL; |
diff --git a/arch/x86/pci/bus_numa.c b/arch/x86/pci/bus_numa.c index d37e2fec97e5..c2735feb2508 100644 --- a/arch/x86/pci/bus_numa.c +++ b/arch/x86/pci/bus_numa.c | |||
| @@ -93,8 +93,8 @@ struct pci_root_info __init *alloc_pci_root_info(int bus_min, int bus_max, | |||
| 93 | return info; | 93 | return info; |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | void __devinit update_res(struct pci_root_info *info, resource_size_t start, | 96 | void update_res(struct pci_root_info *info, resource_size_t start, |
| 97 | resource_size_t end, unsigned long flags, int merge) | 97 | resource_size_t end, unsigned long flags, int merge) |
| 98 | { | 98 | { |
| 99 | struct resource *res; | 99 | struct resource *res; |
| 100 | struct pci_root_res *root_res; | 100 | struct pci_root_res *root_res; |
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 412e1286d1fc..ccd0ab3ab899 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
| @@ -81,14 +81,14 @@ struct pci_ops pci_root_ops = { | |||
| 81 | */ | 81 | */ |
| 82 | DEFINE_RAW_SPINLOCK(pci_config_lock); | 82 | DEFINE_RAW_SPINLOCK(pci_config_lock); |
| 83 | 83 | ||
| 84 | static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d) | 84 | static int can_skip_ioresource_align(const struct dmi_system_id *d) |
| 85 | { | 85 | { |
| 86 | pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; | 86 | pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; |
| 87 | printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident); | 87 | printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident); |
| 88 | return 0; | 88 | return 0; |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | static const struct dmi_system_id can_skip_pciprobe_dmi_table[] __devinitconst = { | 91 | static const struct dmi_system_id can_skip_pciprobe_dmi_table[] = { |
| 92 | /* | 92 | /* |
| 93 | * Systems where PCI IO resource ISA alignment can be skipped | 93 | * Systems where PCI IO resource ISA alignment can be skipped |
| 94 | * when the ISA enable bit in the bridge control is not set | 94 | * when the ISA enable bit in the bridge control is not set |
| @@ -125,7 +125,7 @@ void __init dmi_check_skip_isa_align(void) | |||
| 125 | dmi_check_system(can_skip_pciprobe_dmi_table); | 125 | dmi_check_system(can_skip_pciprobe_dmi_table); |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) | 128 | static void pcibios_fixup_device_resources(struct pci_dev *dev) |
| 129 | { | 129 | { |
| 130 | struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE]; | 130 | struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE]; |
| 131 | struct resource *bar_r; | 131 | struct resource *bar_r; |
| @@ -162,7 +162,7 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) | |||
| 162 | * are examined. | 162 | * are examined. |
| 163 | */ | 163 | */ |
| 164 | 164 | ||
| 165 | void __devinit pcibios_fixup_bus(struct pci_bus *b) | 165 | void pcibios_fixup_bus(struct pci_bus *b) |
| 166 | { | 166 | { |
| 167 | struct pci_dev *dev; | 167 | struct pci_dev *dev; |
| 168 | 168 | ||
| @@ -176,7 +176,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *b) | |||
| 176 | * on the kernel command line (which was parsed earlier). | 176 | * on the kernel command line (which was parsed earlier). |
| 177 | */ | 177 | */ |
| 178 | 178 | ||
| 179 | static int __devinit set_bf_sort(const struct dmi_system_id *d) | 179 | static int set_bf_sort(const struct dmi_system_id *d) |
| 180 | { | 180 | { |
| 181 | if (pci_bf_sort == pci_bf_sort_default) { | 181 | if (pci_bf_sort == pci_bf_sort_default) { |
| 182 | pci_bf_sort = pci_dmi_bf; | 182 | pci_bf_sort = pci_dmi_bf; |
| @@ -185,7 +185,7 @@ static int __devinit set_bf_sort(const struct dmi_system_id *d) | |||
| 185 | return 0; | 185 | return 0; |
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | static void __devinit read_dmi_type_b1(const struct dmi_header *dm, | 188 | static void read_dmi_type_b1(const struct dmi_header *dm, |
| 189 | void *private_data) | 189 | void *private_data) |
| 190 | { | 190 | { |
| 191 | u8 *d = (u8 *)dm + 4; | 191 | u8 *d = (u8 *)dm + 4; |
| @@ -207,7 +207,7 @@ static void __devinit read_dmi_type_b1(const struct dmi_header *dm, | |||
| 207 | } | 207 | } |
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | static int __devinit find_sort_method(const struct dmi_system_id *d) | 210 | static int find_sort_method(const struct dmi_system_id *d) |
| 211 | { | 211 | { |
| 212 | dmi_walk(read_dmi_type_b1, NULL); | 212 | dmi_walk(read_dmi_type_b1, NULL); |
| 213 | 213 | ||
| @@ -222,7 +222,7 @@ static int __devinit find_sort_method(const struct dmi_system_id *d) | |||
| 222 | * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus) | 222 | * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus) |
| 223 | */ | 223 | */ |
| 224 | #ifdef __i386__ | 224 | #ifdef __i386__ |
| 225 | static int __devinit assign_all_busses(const struct dmi_system_id *d) | 225 | static int assign_all_busses(const struct dmi_system_id *d) |
| 226 | { | 226 | { |
| 227 | pci_probe |= PCI_ASSIGN_ALL_BUSSES; | 227 | pci_probe |= PCI_ASSIGN_ALL_BUSSES; |
| 228 | printk(KERN_INFO "%s detected: enabling PCI bus# renumbering" | 228 | printk(KERN_INFO "%s detected: enabling PCI bus# renumbering" |
| @@ -231,7 +231,7 @@ static int __devinit assign_all_busses(const struct dmi_system_id *d) | |||
| 231 | } | 231 | } |
| 232 | #endif | 232 | #endif |
| 233 | 233 | ||
| 234 | static int __devinit set_scan_all(const struct dmi_system_id *d) | 234 | static int set_scan_all(const struct dmi_system_id *d) |
| 235 | { | 235 | { |
| 236 | printk(KERN_INFO "PCI: %s detected, enabling pci=pcie_scan_all\n", | 236 | printk(KERN_INFO "PCI: %s detected, enabling pci=pcie_scan_all\n", |
| 237 | d->ident); | 237 | d->ident); |
| @@ -239,7 +239,7 @@ static int __devinit set_scan_all(const struct dmi_system_id *d) | |||
| 239 | return 0; | 239 | return 0; |
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | static const struct dmi_system_id __devinitconst pciprobe_dmi_table[] = { | 242 | static const struct dmi_system_id pciprobe_dmi_table[] = { |
| 243 | #ifdef __i386__ | 243 | #ifdef __i386__ |
| 244 | /* | 244 | /* |
| 245 | * Laptops which need pci=assign-busses to see Cardbus cards | 245 | * Laptops which need pci=assign-busses to see Cardbus cards |
| @@ -446,7 +446,7 @@ void __init dmi_check_pciprobe(void) | |||
| 446 | dmi_check_system(pciprobe_dmi_table); | 446 | dmi_check_system(pciprobe_dmi_table); |
| 447 | } | 447 | } |
| 448 | 448 | ||
| 449 | struct pci_bus * __devinit pcibios_scan_root(int busnum) | 449 | struct pci_bus *pcibios_scan_root(int busnum) |
| 450 | { | 450 | { |
| 451 | struct pci_bus *bus = NULL; | 451 | struct pci_bus *bus = NULL; |
| 452 | 452 | ||
| @@ -665,7 +665,7 @@ int pci_ext_cfg_avail(void) | |||
| 665 | return 0; | 665 | return 0; |
| 666 | } | 666 | } |
| 667 | 667 | ||
| 668 | struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) | 668 | struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) |
| 669 | { | 669 | { |
| 670 | LIST_HEAD(resources); | 670 | LIST_HEAD(resources); |
| 671 | struct pci_bus *bus = NULL; | 671 | struct pci_bus *bus = NULL; |
| @@ -693,7 +693,7 @@ struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, | |||
| 693 | return bus; | 693 | return bus; |
| 694 | } | 694 | } |
| 695 | 695 | ||
| 696 | struct pci_bus * __devinit pci_scan_bus_with_sysdata(int busno) | 696 | struct pci_bus *pci_scan_bus_with_sysdata(int busno) |
| 697 | { | 697 | { |
| 698 | return pci_scan_bus_on_node(busno, &pci_root_ops, -1); | 698 | return pci_scan_bus_on_node(busno, &pci_root_ops, -1); |
| 699 | } | 699 | } |
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index af8a224db216..f5809fa2753e 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | #include <linux/vgaarb.h> | 9 | #include <linux/vgaarb.h> |
| 10 | #include <asm/pci_x86.h> | 10 | #include <asm/pci_x86.h> |
| 11 | 11 | ||
| 12 | static void __devinit pci_fixup_i450nx(struct pci_dev *d) | 12 | static void pci_fixup_i450nx(struct pci_dev *d) |
| 13 | { | 13 | { |
| 14 | /* | 14 | /* |
| 15 | * i450NX -- Find and scan all secondary buses on all PXB's. | 15 | * i450NX -- Find and scan all secondary buses on all PXB's. |
| @@ -34,7 +34,7 @@ static void __devinit pci_fixup_i450nx(struct pci_dev *d) | |||
| 34 | } | 34 | } |
| 35 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx); | 35 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx); |
| 36 | 36 | ||
| 37 | static void __devinit pci_fixup_i450gx(struct pci_dev *d) | 37 | static void pci_fixup_i450gx(struct pci_dev *d) |
| 38 | { | 38 | { |
| 39 | /* | 39 | /* |
| 40 | * i450GX and i450KX -- Find and scan all secondary buses. | 40 | * i450GX and i450KX -- Find and scan all secondary buses. |
| @@ -48,7 +48,7 @@ static void __devinit pci_fixup_i450gx(struct pci_dev *d) | |||
| 48 | } | 48 | } |
| 49 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx); | 49 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx); |
| 50 | 50 | ||
| 51 | static void __devinit pci_fixup_umc_ide(struct pci_dev *d) | 51 | static void pci_fixup_umc_ide(struct pci_dev *d) |
| 52 | { | 52 | { |
| 53 | /* | 53 | /* |
| 54 | * UM8886BF IDE controller sets region type bits incorrectly, | 54 | * UM8886BF IDE controller sets region type bits incorrectly, |
| @@ -62,7 +62,7 @@ static void __devinit pci_fixup_umc_ide(struct pci_dev *d) | |||
| 62 | } | 62 | } |
| 63 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, pci_fixup_umc_ide); | 63 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, pci_fixup_umc_ide); |
| 64 | 64 | ||
| 65 | static void __devinit pci_fixup_ncr53c810(struct pci_dev *d) | 65 | static void pci_fixup_ncr53c810(struct pci_dev *d) |
| 66 | { | 66 | { |
| 67 | /* | 67 | /* |
| 68 | * NCR 53C810 returns class code 0 (at least on some systems). | 68 | * NCR 53C810 returns class code 0 (at least on some systems). |
| @@ -75,7 +75,7 @@ static void __devinit pci_fixup_ncr53c810(struct pci_dev *d) | |||
| 75 | } | 75 | } |
| 76 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, pci_fixup_ncr53c810); | 76 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, pci_fixup_ncr53c810); |
| 77 | 77 | ||
| 78 | static void __devinit pci_fixup_latency(struct pci_dev *d) | 78 | static void pci_fixup_latency(struct pci_dev *d) |
| 79 | { | 79 | { |
| 80 | /* | 80 | /* |
| 81 | * SiS 5597 and 5598 chipsets require latency timer set to | 81 | * SiS 5597 and 5598 chipsets require latency timer set to |
| @@ -87,7 +87,7 @@ static void __devinit pci_fixup_latency(struct pci_dev *d) | |||
| 87 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, pci_fixup_latency); | 87 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, pci_fixup_latency); |
| 88 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5598, pci_fixup_latency); | 88 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5598, pci_fixup_latency); |
| 89 | 89 | ||
| 90 | static void __devinit pci_fixup_piix4_acpi(struct pci_dev *d) | 90 | static void pci_fixup_piix4_acpi(struct pci_dev *d) |
| 91 | { | 91 | { |
| 92 | /* | 92 | /* |
| 93 | * PIIX4 ACPI device: hardwired IRQ9 | 93 | * PIIX4 ACPI device: hardwired IRQ9 |
| @@ -163,7 +163,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_ | |||
| 163 | * system to PCI bus no matter what are their window settings, so they are | 163 | * system to PCI bus no matter what are their window settings, so they are |
| 164 | * "transparent" (or subtractive decoding) from programmers point of view. | 164 | * "transparent" (or subtractive decoding) from programmers point of view. |
| 165 | */ | 165 | */ |
| 166 | static void __devinit pci_fixup_transparent_bridge(struct pci_dev *dev) | 166 | static void pci_fixup_transparent_bridge(struct pci_dev *dev) |
| 167 | { | 167 | { |
| 168 | if ((dev->device & 0xff00) == 0x2400) | 168 | if ((dev->device & 0xff00) == 0x2400) |
| 169 | dev->transparent = 1; | 169 | dev->transparent = 1; |
| @@ -317,7 +317,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MCH_PC1, pcie_r | |||
| 317 | * video device at this point. | 317 | * video device at this point. |
| 318 | */ | 318 | */ |
| 319 | 319 | ||
| 320 | static void __devinit pci_fixup_video(struct pci_dev *pdev) | 320 | static void pci_fixup_video(struct pci_dev *pdev) |
| 321 | { | 321 | { |
| 322 | struct pci_dev *bridge; | 322 | struct pci_dev *bridge; |
| 323 | struct pci_bus *bus; | 323 | struct pci_bus *bus; |
| @@ -357,7 +357,7 @@ DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID, | |||
| 357 | PCI_CLASS_DISPLAY_VGA, 8, pci_fixup_video); | 357 | PCI_CLASS_DISPLAY_VGA, 8, pci_fixup_video); |
| 358 | 358 | ||
| 359 | 359 | ||
| 360 | static const struct dmi_system_id __devinitconst msi_k8t_dmi_table[] = { | 360 | static const struct dmi_system_id msi_k8t_dmi_table[] = { |
| 361 | { | 361 | { |
| 362 | .ident = "MSI-K8T-Neo2Fir", | 362 | .ident = "MSI-K8T-Neo2Fir", |
| 363 | .matches = { | 363 | .matches = { |
| @@ -378,7 +378,7 @@ static const struct dmi_system_id __devinitconst msi_k8t_dmi_table[] = { | |||
| 378 | * The soundcard is only enabled, if the mainborad is identified | 378 | * The soundcard is only enabled, if the mainborad is identified |
| 379 | * via DMI-tables and the soundcard is detected to be off. | 379 | * via DMI-tables and the soundcard is detected to be off. |
| 380 | */ | 380 | */ |
| 381 | static void __devinit pci_fixup_msi_k8t_onboard_sound(struct pci_dev *dev) | 381 | static void pci_fixup_msi_k8t_onboard_sound(struct pci_dev *dev) |
| 382 | { | 382 | { |
| 383 | unsigned char val; | 383 | unsigned char val; |
| 384 | if (!dmi_check_system(msi_k8t_dmi_table)) | 384 | if (!dmi_check_system(msi_k8t_dmi_table)) |
| @@ -414,7 +414,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, | |||
| 414 | */ | 414 | */ |
| 415 | static u16 toshiba_line_size; | 415 | static u16 toshiba_line_size; |
| 416 | 416 | ||
| 417 | static const struct dmi_system_id __devinitconst toshiba_ohci1394_dmi_table[] = { | 417 | static const struct dmi_system_id toshiba_ohci1394_dmi_table[] = { |
| 418 | { | 418 | { |
| 419 | .ident = "Toshiba PS5 based laptop", | 419 | .ident = "Toshiba PS5 based laptop", |
| 420 | .matches = { | 420 | .matches = { |
| @@ -439,7 +439,7 @@ static const struct dmi_system_id __devinitconst toshiba_ohci1394_dmi_table[] = | |||
| 439 | { } | 439 | { } |
| 440 | }; | 440 | }; |
| 441 | 441 | ||
| 442 | static void __devinit pci_pre_fixup_toshiba_ohci1394(struct pci_dev *dev) | 442 | static void pci_pre_fixup_toshiba_ohci1394(struct pci_dev *dev) |
| 443 | { | 443 | { |
| 444 | if (!dmi_check_system(toshiba_ohci1394_dmi_table)) | 444 | if (!dmi_check_system(toshiba_ohci1394_dmi_table)) |
| 445 | return; /* only applies to certain Toshibas (so far) */ | 445 | return; /* only applies to certain Toshibas (so far) */ |
| @@ -450,7 +450,7 @@ static void __devinit pci_pre_fixup_toshiba_ohci1394(struct pci_dev *dev) | |||
| 450 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, 0x8032, | 450 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, 0x8032, |
| 451 | pci_pre_fixup_toshiba_ohci1394); | 451 | pci_pre_fixup_toshiba_ohci1394); |
| 452 | 452 | ||
| 453 | static void __devinit pci_post_fixup_toshiba_ohci1394(struct pci_dev *dev) | 453 | static void pci_post_fixup_toshiba_ohci1394(struct pci_dev *dev) |
| 454 | { | 454 | { |
| 455 | if (!dmi_check_system(toshiba_ohci1394_dmi_table)) | 455 | if (!dmi_check_system(toshiba_ohci1394_dmi_table)) |
| 456 | return; /* only applies to certain Toshibas (so far) */ | 456 | return; /* only applies to certain Toshibas (so far) */ |
| @@ -488,7 +488,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, | |||
| 488 | * Siemens Nixdorf AG FSC Multiprocessor Interrupt Controller: | 488 | * Siemens Nixdorf AG FSC Multiprocessor Interrupt Controller: |
| 489 | * prevent update of the BAR0, which doesn't look like a normal BAR. | 489 | * prevent update of the BAR0, which doesn't look like a normal BAR. |
| 490 | */ | 490 | */ |
| 491 | static void __devinit pci_siemens_interrupt_controller(struct pci_dev *dev) | 491 | static void pci_siemens_interrupt_controller(struct pci_dev *dev) |
| 492 | { | 492 | { |
| 493 | dev->resource[0].flags |= IORESOURCE_PCI_FIXED; | 493 | dev->resource[0].flags |= IORESOURCE_PCI_FIXED; |
| 494 | } | 494 | } |
| @@ -531,7 +531,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATI, 0x4385, sb600_disable_hpet_bar); | |||
| 531 | * | 531 | * |
| 532 | * Match off the LPC and svid/sdid (older kernels lose the bridge subvendor) | 532 | * Match off the LPC and svid/sdid (older kernels lose the bridge subvendor) |
| 533 | */ | 533 | */ |
| 534 | static void __devinit twinhead_reserve_killing_zone(struct pci_dev *dev) | 534 | static void twinhead_reserve_killing_zone(struct pci_dev *dev) |
| 535 | { | 535 | { |
| 536 | if (dev->subsystem_vendor == 0x14FF && dev->subsystem_device == 0xA003) { | 536 | if (dev->subsystem_vendor == 0x14FF && dev->subsystem_device == 0xA003) { |
| 537 | pr_info("Reserving memory on Twinhead H12Y\n"); | 537 | pr_info("Reserving memory on Twinhead H12Y\n"); |
diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c index a1df191129d3..4a2ab9cb3659 100644 --- a/arch/x86/pci/legacy.c +++ b/arch/x86/pci/legacy.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * Discover remaining PCI buses in case there are peer host bridges. | 10 | * Discover remaining PCI buses in case there are peer host bridges. |
| 11 | * We use the number of last PCI bus provided by the PCI BIOS. | 11 | * We use the number of last PCI bus provided by the PCI BIOS. |
| 12 | */ | 12 | */ |
| 13 | static void __devinit pcibios_fixup_peer_bridges(void) | 13 | static void pcibios_fixup_peer_bridges(void) |
| 14 | { | 14 | { |
| 15 | int n; | 15 | int n; |
| 16 | 16 | ||
| @@ -34,7 +34,7 @@ int __init pci_legacy_init(void) | |||
| 34 | return 0; | 34 | return 0; |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | void __devinit pcibios_scan_specific_bus(int busn) | 37 | void pcibios_scan_specific_bus(int busn) |
| 38 | { | 38 | { |
| 39 | int devfn; | 39 | int devfn; |
| 40 | long node; | 40 | long node; |
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 704b9ec043d7..fb29968a7cd5 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c | |||
| @@ -49,7 +49,7 @@ static __init void free_all_mmcfg(void) | |||
| 49 | pci_mmconfig_remove(cfg); | 49 | pci_mmconfig_remove(cfg); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | static __devinit void list_add_sorted(struct pci_mmcfg_region *new) | 52 | static void list_add_sorted(struct pci_mmcfg_region *new) |
| 53 | { | 53 | { |
| 54 | struct pci_mmcfg_region *cfg; | 54 | struct pci_mmcfg_region *cfg; |
| 55 | 55 | ||
| @@ -65,9 +65,8 @@ static __devinit void list_add_sorted(struct pci_mmcfg_region *new) | |||
| 65 | list_add_tail_rcu(&new->list, &pci_mmcfg_list); | 65 | list_add_tail_rcu(&new->list, &pci_mmcfg_list); |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | static __devinit struct pci_mmcfg_region *pci_mmconfig_alloc(int segment, | 68 | static struct pci_mmcfg_region *pci_mmconfig_alloc(int segment, int start, |
| 69 | int start, | 69 | int end, u64 addr) |
| 70 | int end, u64 addr) | ||
| 71 | { | 70 | { |
| 72 | struct pci_mmcfg_region *new; | 71 | struct pci_mmcfg_region *new; |
| 73 | struct resource *res; | 72 | struct resource *res; |
| @@ -371,8 +370,7 @@ static int __init pci_mmcfg_check_hostbridge(void) | |||
| 371 | return !list_empty(&pci_mmcfg_list); | 370 | return !list_empty(&pci_mmcfg_list); |
| 372 | } | 371 | } |
| 373 | 372 | ||
| 374 | static acpi_status __devinit check_mcfg_resource(struct acpi_resource *res, | 373 | static acpi_status check_mcfg_resource(struct acpi_resource *res, void *data) |
| 375 | void *data) | ||
| 376 | { | 374 | { |
| 377 | struct resource *mcfg_res = data; | 375 | struct resource *mcfg_res = data; |
| 378 | struct acpi_resource_address64 address; | 376 | struct acpi_resource_address64 address; |
| @@ -408,8 +406,8 @@ static acpi_status __devinit check_mcfg_resource(struct acpi_resource *res, | |||
| 408 | return AE_OK; | 406 | return AE_OK; |
| 409 | } | 407 | } |
| 410 | 408 | ||
| 411 | static acpi_status __devinit find_mboard_resource(acpi_handle handle, u32 lvl, | 409 | static acpi_status find_mboard_resource(acpi_handle handle, u32 lvl, |
| 412 | void *context, void **rv) | 410 | void *context, void **rv) |
| 413 | { | 411 | { |
| 414 | struct resource *mcfg_res = context; | 412 | struct resource *mcfg_res = context; |
| 415 | 413 | ||
| @@ -422,7 +420,7 @@ static acpi_status __devinit find_mboard_resource(acpi_handle handle, u32 lvl, | |||
| 422 | return AE_OK; | 420 | return AE_OK; |
| 423 | } | 421 | } |
| 424 | 422 | ||
| 425 | static int __devinit is_acpi_reserved(u64 start, u64 end, unsigned not_used) | 423 | static int is_acpi_reserved(u64 start, u64 end, unsigned not_used) |
| 426 | { | 424 | { |
| 427 | struct resource mcfg_res; | 425 | struct resource mcfg_res; |
| 428 | 426 | ||
| @@ -693,9 +691,8 @@ static int __init pci_mmcfg_late_insert_resources(void) | |||
| 693 | late_initcall(pci_mmcfg_late_insert_resources); | 691 | late_initcall(pci_mmcfg_late_insert_resources); |
| 694 | 692 | ||
| 695 | /* Add MMCFG information for host bridges */ | 693 | /* Add MMCFG information for host bridges */ |
| 696 | int __devinit pci_mmconfig_insert(struct device *dev, | 694 | int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end, |
| 697 | u16 seg, u8 start, u8 end, | 695 | phys_addr_t addr) |
| 698 | phys_addr_t addr) | ||
| 699 | { | 696 | { |
| 700 | int rc; | 697 | int rc; |
| 701 | struct resource *tmp = NULL; | 698 | struct resource *tmp = NULL; |
diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c index db63ac23e3d9..5c90975cdf0f 100644 --- a/arch/x86/pci/mmconfig_32.c +++ b/arch/x86/pci/mmconfig_32.c | |||
| @@ -142,7 +142,7 @@ void __init pci_mmcfg_arch_free(void) | |||
| 142 | { | 142 | { |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | int __devinit pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg) | 145 | int pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg) |
| 146 | { | 146 | { |
| 147 | return 0; | 147 | return 0; |
| 148 | } | 148 | } |
diff --git a/arch/x86/pci/mmconfig_64.c b/arch/x86/pci/mmconfig_64.c index d4ebd07c306d..bea52496aea6 100644 --- a/arch/x86/pci/mmconfig_64.c +++ b/arch/x86/pci/mmconfig_64.c | |||
| @@ -95,7 +95,7 @@ const struct pci_raw_ops pci_mmcfg = { | |||
| 95 | .write = pci_mmcfg_write, | 95 | .write = pci_mmcfg_write, |
| 96 | }; | 96 | }; |
| 97 | 97 | ||
| 98 | static void __iomem * __devinit mcfg_ioremap(struct pci_mmcfg_region *cfg) | 98 | static void __iomem *mcfg_ioremap(struct pci_mmcfg_region *cfg) |
| 99 | { | 99 | { |
| 100 | void __iomem *addr; | 100 | void __iomem *addr; |
| 101 | u64 start, size; | 101 | u64 start, size; |
| @@ -133,7 +133,7 @@ void __init pci_mmcfg_arch_free(void) | |||
| 133 | pci_mmcfg_arch_unmap(cfg); | 133 | pci_mmcfg_arch_unmap(cfg); |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | int __devinit pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg) | 136 | int pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg) |
| 137 | { | 137 | { |
| 138 | cfg->virt = mcfg_ioremap(cfg); | 138 | cfg->virt = mcfg_ioremap(cfg); |
| 139 | if (!cfg->virt) { | 139 | if (!cfg->virt) { |
diff --git a/arch/x86/pci/mrst.c b/arch/x86/pci/mrst.c index e14a2ff708b5..6eb18c42a28a 100644 --- a/arch/x86/pci/mrst.c +++ b/arch/x86/pci/mrst.c | |||
| @@ -247,7 +247,7 @@ int __init pci_mrst_init(void) | |||
| 247 | /* Langwell devices are not true pci devices, they are not subject to 10 ms | 247 | /* Langwell devices are not true pci devices, they are not subject to 10 ms |
| 248 | * d3 to d0 delay required by pci spec. | 248 | * d3 to d0 delay required by pci spec. |
| 249 | */ | 249 | */ |
| 250 | static void __devinit pci_d3delay_fixup(struct pci_dev *dev) | 250 | static void pci_d3delay_fixup(struct pci_dev *dev) |
| 251 | { | 251 | { |
| 252 | /* PCI fixups are effectively decided compile time. If we have a dual | 252 | /* PCI fixups are effectively decided compile time. If we have a dual |
| 253 | SoC/non-SoC kernel we don't want to mangle d3 on non SoC devices */ | 253 | SoC/non-SoC kernel we don't want to mangle d3 on non SoC devices */ |
| @@ -262,7 +262,7 @@ static void __devinit pci_d3delay_fixup(struct pci_dev *dev) | |||
| 262 | } | 262 | } |
| 263 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_d3delay_fixup); | 263 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_d3delay_fixup); |
| 264 | 264 | ||
| 265 | static void __devinit mrst_power_off_unused_dev(struct pci_dev *dev) | 265 | static void mrst_power_off_unused_dev(struct pci_dev *dev) |
| 266 | { | 266 | { |
| 267 | pci_set_power_state(dev, PCI_D3hot); | 267 | pci_set_power_state(dev, PCI_D3hot); |
| 268 | } | 268 | } |
| @@ -275,7 +275,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0815, mrst_power_off_unused_dev); | |||
| 275 | /* | 275 | /* |
| 276 | * Langwell devices reside at fixed offsets, don't try to move them. | 276 | * Langwell devices reside at fixed offsets, don't try to move them. |
| 277 | */ | 277 | */ |
| 278 | static void __devinit pci_fixed_bar_fixup(struct pci_dev *dev) | 278 | static void pci_fixed_bar_fixup(struct pci_dev *dev) |
| 279 | { | 279 | { |
| 280 | unsigned long offset; | 280 | unsigned long offset; |
| 281 | u32 size; | 281 | u32 size; |
diff --git a/arch/x86/pci/numaq_32.c b/arch/x86/pci/numaq_32.c index 83e125b95ca6..b96b14c250b6 100644 --- a/arch/x86/pci/numaq_32.c +++ b/arch/x86/pci/numaq_32.c | |||
| @@ -116,7 +116,7 @@ static const struct pci_raw_ops pci_direct_conf1_mq = { | |||
| 116 | }; | 116 | }; |
| 117 | 117 | ||
| 118 | 118 | ||
| 119 | static void __devinit pci_fixup_i450nx(struct pci_dev *d) | 119 | static void pci_fixup_i450nx(struct pci_dev *d) |
| 120 | { | 120 | { |
| 121 | /* | 121 | /* |
| 122 | * i450NX -- Find and scan all secondary buses on all PXB's. | 122 | * i450NX -- Find and scan all secondary buses on all PXB's. |
diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c index da8fe0535ff4..c77b24a8b2da 100644 --- a/arch/x86/pci/pcbios.c +++ b/arch/x86/pci/pcbios.c | |||
| @@ -124,7 +124,7 @@ static struct { | |||
| 124 | 124 | ||
| 125 | static int pci_bios_present; | 125 | static int pci_bios_present; |
| 126 | 126 | ||
| 127 | static int __devinit check_pcibios(void) | 127 | static int check_pcibios(void) |
| 128 | { | 128 | { |
| 129 | u32 signature, eax, ebx, ecx; | 129 | u32 signature, eax, ebx, ecx; |
| 130 | u8 status, major_ver, minor_ver, hw_mech; | 130 | u8 status, major_ver, minor_ver, hw_mech; |
| @@ -312,7 +312,7 @@ static const struct pci_raw_ops pci_bios_access = { | |||
| 312 | * Try to find PCI BIOS. | 312 | * Try to find PCI BIOS. |
| 313 | */ | 313 | */ |
| 314 | 314 | ||
| 315 | static const struct pci_raw_ops * __devinit pci_find_bios(void) | 315 | static const struct pci_raw_ops *pci_find_bios(void) |
| 316 | { | 316 | { |
| 317 | union bios32 *check; | 317 | union bios32 *check; |
| 318 | unsigned char sum; | 318 | unsigned char sum; |
diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c index fd41a9262d65..e31bcd8f2eee 100644 --- a/arch/x86/platform/mrst/mrst.c +++ b/arch/x86/platform/mrst/mrst.c | |||
| @@ -782,7 +782,7 @@ BLOCKING_NOTIFIER_HEAD(intel_scu_notifier); | |||
| 782 | EXPORT_SYMBOL_GPL(intel_scu_notifier); | 782 | EXPORT_SYMBOL_GPL(intel_scu_notifier); |
| 783 | 783 | ||
| 784 | /* Called by IPC driver */ | 784 | /* Called by IPC driver */ |
| 785 | void __devinit intel_scu_devices_create(void) | 785 | void intel_scu_devices_create(void) |
| 786 | { | 786 | { |
| 787 | int i; | 787 | int i; |
| 788 | 788 | ||
diff --git a/arch/x86/platform/olpc/olpc-xo1-pm.c b/arch/x86/platform/olpc/olpc-xo1-pm.c index d75582d1aa55..ff0174dda810 100644 --- a/arch/x86/platform/olpc/olpc-xo1-pm.c +++ b/arch/x86/platform/olpc/olpc-xo1-pm.c | |||
| @@ -121,7 +121,7 @@ static const struct platform_suspend_ops xo1_suspend_ops = { | |||
| 121 | .enter = xo1_power_state_enter, | 121 | .enter = xo1_power_state_enter, |
| 122 | }; | 122 | }; |
| 123 | 123 | ||
| 124 | static int __devinit xo1_pm_probe(struct platform_device *pdev) | 124 | static int xo1_pm_probe(struct platform_device *pdev) |
| 125 | { | 125 | { |
| 126 | struct resource *res; | 126 | struct resource *res; |
| 127 | int err; | 127 | int err; |
| @@ -154,7 +154,7 @@ static int __devinit xo1_pm_probe(struct platform_device *pdev) | |||
| 154 | return 0; | 154 | return 0; |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | static int __devexit xo1_pm_remove(struct platform_device *pdev) | 157 | static int xo1_pm_remove(struct platform_device *pdev) |
| 158 | { | 158 | { |
| 159 | mfd_cell_disable(pdev); | 159 | mfd_cell_disable(pdev); |
| 160 | 160 | ||
| @@ -173,7 +173,7 @@ static struct platform_driver cs5535_pms_driver = { | |||
| 173 | .owner = THIS_MODULE, | 173 | .owner = THIS_MODULE, |
| 174 | }, | 174 | }, |
| 175 | .probe = xo1_pm_probe, | 175 | .probe = xo1_pm_probe, |
| 176 | .remove = __devexit_p(xo1_pm_remove), | 176 | .remove = xo1_pm_remove, |
| 177 | }; | 177 | }; |
| 178 | 178 | ||
| 179 | static struct platform_driver cs5535_acpi_driver = { | 179 | static struct platform_driver cs5535_acpi_driver = { |
| @@ -182,7 +182,7 @@ static struct platform_driver cs5535_acpi_driver = { | |||
| 182 | .owner = THIS_MODULE, | 182 | .owner = THIS_MODULE, |
| 183 | }, | 183 | }, |
| 184 | .probe = xo1_pm_probe, | 184 | .probe = xo1_pm_probe, |
| 185 | .remove = __devexit_p(xo1_pm_remove), | 185 | .remove = xo1_pm_remove, |
| 186 | }; | 186 | }; |
| 187 | 187 | ||
| 188 | static int __init xo1_pm_init(void) | 188 | static int __init xo1_pm_init(void) |
diff --git a/arch/x86/platform/olpc/olpc-xo1-sci.c b/arch/x86/platform/olpc/olpc-xo1-sci.c index 63d4aa40956e..74704be7b1fe 100644 --- a/arch/x86/platform/olpc/olpc-xo1-sci.c +++ b/arch/x86/platform/olpc/olpc-xo1-sci.c | |||
| @@ -309,7 +309,7 @@ static int xo1_sci_resume(struct platform_device *pdev) | |||
| 309 | return 0; | 309 | return 0; |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | static int __devinit setup_sci_interrupt(struct platform_device *pdev) | 312 | static int setup_sci_interrupt(struct platform_device *pdev) |
| 313 | { | 313 | { |
| 314 | u32 lo, hi; | 314 | u32 lo, hi; |
| 315 | u32 sts; | 315 | u32 sts; |
| @@ -351,7 +351,7 @@ static int __devinit setup_sci_interrupt(struct platform_device *pdev) | |||
| 351 | return r; | 351 | return r; |
| 352 | } | 352 | } |
| 353 | 353 | ||
| 354 | static int __devinit setup_ec_sci(void) | 354 | static int setup_ec_sci(void) |
| 355 | { | 355 | { |
| 356 | int r; | 356 | int r; |
| 357 | 357 | ||
| @@ -395,7 +395,7 @@ static void free_ec_sci(void) | |||
| 395 | gpio_free(OLPC_GPIO_ECSCI); | 395 | gpio_free(OLPC_GPIO_ECSCI); |
| 396 | } | 396 | } |
| 397 | 397 | ||
| 398 | static int __devinit setup_lid_events(void) | 398 | static int setup_lid_events(void) |
| 399 | { | 399 | { |
| 400 | int r; | 400 | int r; |
| 401 | 401 | ||
| @@ -432,7 +432,7 @@ static void free_lid_events(void) | |||
| 432 | gpio_free(OLPC_GPIO_LID); | 432 | gpio_free(OLPC_GPIO_LID); |
| 433 | } | 433 | } |
| 434 | 434 | ||
| 435 | static int __devinit setup_power_button(struct platform_device *pdev) | 435 | static int setup_power_button(struct platform_device *pdev) |
| 436 | { | 436 | { |
| 437 | int r; | 437 | int r; |
| 438 | 438 | ||
| @@ -463,7 +463,7 @@ static void free_power_button(void) | |||
| 463 | input_free_device(power_button_idev); | 463 | input_free_device(power_button_idev); |
| 464 | } | 464 | } |
| 465 | 465 | ||
| 466 | static int __devinit setup_ebook_switch(struct platform_device *pdev) | 466 | static int setup_ebook_switch(struct platform_device *pdev) |
| 467 | { | 467 | { |
| 468 | int r; | 468 | int r; |
| 469 | 469 | ||
| @@ -494,7 +494,7 @@ static void free_ebook_switch(void) | |||
| 494 | input_free_device(ebook_switch_idev); | 494 | input_free_device(ebook_switch_idev); |
| 495 | } | 495 | } |
| 496 | 496 | ||
| 497 | static int __devinit setup_lid_switch(struct platform_device *pdev) | 497 | static int setup_lid_switch(struct platform_device *pdev) |
| 498 | { | 498 | { |
| 499 | int r; | 499 | int r; |
| 500 | 500 | ||
| @@ -538,7 +538,7 @@ static void free_lid_switch(void) | |||
| 538 | input_free_device(lid_switch_idev); | 538 | input_free_device(lid_switch_idev); |
| 539 | } | 539 | } |
| 540 | 540 | ||
| 541 | static int __devinit xo1_sci_probe(struct platform_device *pdev) | 541 | static int xo1_sci_probe(struct platform_device *pdev) |
| 542 | { | 542 | { |
| 543 | struct resource *res; | 543 | struct resource *res; |
| 544 | int r; | 544 | int r; |
| @@ -613,7 +613,7 @@ err_ebook: | |||
| 613 | return r; | 613 | return r; |
| 614 | } | 614 | } |
| 615 | 615 | ||
| 616 | static int __devexit xo1_sci_remove(struct platform_device *pdev) | 616 | static int xo1_sci_remove(struct platform_device *pdev) |
| 617 | { | 617 | { |
| 618 | mfd_cell_disable(pdev); | 618 | mfd_cell_disable(pdev); |
| 619 | free_irq(sci_irq, pdev); | 619 | free_irq(sci_irq, pdev); |
| @@ -632,7 +632,7 @@ static struct platform_driver xo1_sci_driver = { | |||
| 632 | .name = "olpc-xo1-sci-acpi", | 632 | .name = "olpc-xo1-sci-acpi", |
| 633 | }, | 633 | }, |
| 634 | .probe = xo1_sci_probe, | 634 | .probe = xo1_sci_probe, |
| 635 | .remove = __devexit_p(xo1_sci_remove), | 635 | .remove = xo1_sci_remove, |
| 636 | .suspend = xo1_sci_suspend, | 636 | .suspend = xo1_sci_suspend, |
| 637 | .resume = xo1_sci_resume, | 637 | .resume = xo1_sci_resume, |
| 638 | }; | 638 | }; |
diff --git a/arch/x86/platform/scx200/scx200_32.c b/arch/x86/platform/scx200/scx200_32.c index 7a9ad30d6c9f..3dc9aee41d91 100644 --- a/arch/x86/platform/scx200/scx200_32.c +++ b/arch/x86/platform/scx200/scx200_32.c | |||
| @@ -35,7 +35,7 @@ static struct pci_device_id scx200_tbl[] = { | |||
| 35 | }; | 35 | }; |
| 36 | MODULE_DEVICE_TABLE(pci,scx200_tbl); | 36 | MODULE_DEVICE_TABLE(pci,scx200_tbl); |
| 37 | 37 | ||
| 38 | static int __devinit scx200_probe(struct pci_dev *, const struct pci_device_id *); | 38 | static int scx200_probe(struct pci_dev *, const struct pci_device_id *); |
| 39 | 39 | ||
| 40 | static struct pci_driver scx200_pci_driver = { | 40 | static struct pci_driver scx200_pci_driver = { |
| 41 | .name = "scx200", | 41 | .name = "scx200", |
| @@ -45,7 +45,7 @@ static struct pci_driver scx200_pci_driver = { | |||
| 45 | 45 | ||
| 46 | static DEFINE_MUTEX(scx200_gpio_config_lock); | 46 | static DEFINE_MUTEX(scx200_gpio_config_lock); |
| 47 | 47 | ||
| 48 | static void __devinit scx200_init_shadow(void) | 48 | static void scx200_init_shadow(void) |
| 49 | { | 49 | { |
| 50 | int bank; | 50 | int bank; |
| 51 | 51 | ||
| @@ -54,7 +54,7 @@ static void __devinit scx200_init_shadow(void) | |||
| 54 | scx200_gpio_shadow[bank] = inl(scx200_gpio_base + 0x10 * bank); | 54 | scx200_gpio_shadow[bank] = inl(scx200_gpio_base + 0x10 * bank); |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | static int __devinit scx200_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 57 | static int scx200_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 58 | { | 58 | { |
| 59 | unsigned base; | 59 | unsigned base; |
| 60 | 60 | ||
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index eb30e5ab4cab..b679bf8478f7 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c | |||
| @@ -226,16 +226,6 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) | |||
| 226 | struct acpi_memory_info *info; | 226 | struct acpi_memory_info *info; |
| 227 | int node; | 227 | int node; |
| 228 | 228 | ||
| 229 | |||
| 230 | /* Get the range from the _CRS */ | ||
| 231 | result = acpi_memory_get_device_resources(mem_device); | ||
| 232 | if (result) { | ||
| 233 | dev_err(&mem_device->device->dev, | ||
| 234 | "get_device_resources failed\n"); | ||
| 235 | mem_device->state = MEMORY_INVALID_STATE; | ||
| 236 | return result; | ||
| 237 | } | ||
| 238 | |||
| 239 | node = acpi_get_node(mem_device->device->handle); | 229 | node = acpi_get_node(mem_device->device->handle); |
| 240 | /* | 230 | /* |
| 241 | * Tell the VM there is more memory here... | 231 | * Tell the VM there is more memory here... |
| @@ -342,14 +332,6 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) | |||
| 342 | break; | 332 | break; |
| 343 | } | 333 | } |
| 344 | 334 | ||
| 345 | if (acpi_memory_check_device(mem_device)) | ||
| 346 | break; | ||
| 347 | |||
| 348 | if (acpi_memory_enable_device(mem_device)) { | ||
| 349 | acpi_handle_err(handle,"Cannot enable memory device\n"); | ||
| 350 | break; | ||
| 351 | } | ||
| 352 | |||
| 353 | ost_code = ACPI_OST_SC_SUCCESS; | 335 | ost_code = ACPI_OST_SC_SUCCESS; |
| 354 | break; | 336 | break; |
| 355 | 337 | ||
diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile index c8bc24bd1f72..bc7a03ded064 100644 --- a/drivers/acpi/acpica/Makefile +++ b/drivers/acpi/acpica/Makefile | |||
| @@ -162,5 +162,5 @@ acpi-y += \ | |||
| 162 | utxferror.o \ | 162 | utxferror.o \ |
| 163 | utxfmutex.o | 163 | utxfmutex.o |
| 164 | 164 | ||
| 165 | acpi-$(ACPI_FUTURE_USAGE) += uttrack.o utcache.o utclib.o | 165 | acpi-$(ACPI_FUTURE_USAGE) += uttrack.o utcache.o |
| 166 | 166 | ||
diff --git a/drivers/acpi/acpica/utclib.c b/drivers/acpi/acpica/utclib.c deleted file mode 100644 index 19ea4755aa73..000000000000 --- a/drivers/acpi/acpica/utclib.c +++ /dev/null | |||
| @@ -1,749 +0,0 @@ | |||
| 1 | /****************************************************************************** | ||
| 2 | * | ||
| 3 | * Module Name: cmclib - Local implementation of C library functions | ||
| 4 | * | ||
| 5 | *****************************************************************************/ | ||
| 6 | |||
| 7 | /* | ||
| 8 | * Copyright (C) 2000 - 2012, Intel Corp. | ||
| 9 | * All rights reserved. | ||
| 10 | * | ||
| 11 | * Redistribution and use in source and binary forms, with or without | ||
| 12 | * modification, are permitted provided that the following conditions | ||
| 13 | * are met: | ||
| 14 | * 1. Redistributions of source code must retain the above copyright | ||
| 15 | * notice, this list of conditions, and the following disclaimer, | ||
| 16 | * without modification. | ||
| 17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | ||
| 18 | * substantially similar to the "NO WARRANTY" disclaimer below | ||
| 19 | * ("Disclaimer") and any redistribution must be conditioned upon | ||
| 20 | * including a substantially similar Disclaimer requirement for further | ||
| 21 | * binary redistribution. | ||
| 22 | * 3. Neither the names of the above-listed copyright holders nor the names | ||
| 23 | * of any contributors may be used to endorse or promote products derived | ||
| 24 | * from this software without specific prior written permission. | ||
| 25 | * | ||
| 26 | * Alternatively, this software may be distributed under the terms of the | ||
| 27 | * GNU General Public License ("GPL") version 2 as published by the Free | ||
| 28 | * Software Foundation. | ||
| 29 | * | ||
| 30 | * NO WARRANTY | ||
| 31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR | ||
| 34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| 35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
| 40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| 41 | * POSSIBILITY OF SUCH DAMAGES. | ||
| 42 | */ | ||
| 43 | |||
| 44 | #include <acpi/acpi.h> | ||
| 45 | #include "accommon.h" | ||
| 46 | |||
| 47 | /* | ||
| 48 | * These implementations of standard C Library routines can optionally be | ||
| 49 | * used if a C library is not available. In general, they are less efficient | ||
| 50 | * than an inline or assembly implementation | ||
| 51 | */ | ||
| 52 | |||
| 53 | #define _COMPONENT ACPI_UTILITIES | ||
| 54 | ACPI_MODULE_NAME("cmclib") | ||
| 55 | |||
| 56 | #ifndef ACPI_USE_SYSTEM_CLIBRARY | ||
| 57 | #define NEGATIVE 1 | ||
| 58 | #define POSITIVE 0 | ||
| 59 | /******************************************************************************* | ||
| 60 | * | ||
| 61 | * FUNCTION: acpi_ut_memcmp (memcmp) | ||
| 62 | * | ||
| 63 | * PARAMETERS: buffer1 - First Buffer | ||
| 64 | * buffer2 - Second Buffer | ||
| 65 | * count - Maximum # of bytes to compare | ||
| 66 | * | ||
| 67 | * RETURN: Index where Buffers mismatched, or 0 if Buffers matched | ||
| 68 | * | ||
| 69 | * DESCRIPTION: Compare two Buffers, with a maximum length | ||
| 70 | * | ||
| 71 | ******************************************************************************/ | ||
| 72 | int acpi_ut_memcmp(const char *buffer1, const char *buffer2, acpi_size count) | ||
| 73 | { | ||
| 74 | |||
| 75 | return ((count == ACPI_SIZE_MAX) ? 0 : ((unsigned char)*buffer1 - | ||
| 76 | (unsigned char)*buffer2)); | ||
| 77 | } | ||
| 78 | |||
| 79 | /******************************************************************************* | ||
| 80 | * | ||
| 81 | * FUNCTION: acpi_ut_memcpy (memcpy) | ||
| 82 | * | ||
| 83 | * PARAMETERS: dest - Target of the copy | ||
| 84 | * src - Source buffer to copy | ||
| 85 | * count - Number of bytes to copy | ||
| 86 | * | ||
| 87 | * RETURN: Dest | ||
| 88 | * | ||
| 89 | * DESCRIPTION: Copy arbitrary bytes of memory | ||
| 90 | * | ||
| 91 | ******************************************************************************/ | ||
| 92 | |||
| 93 | void *acpi_ut_memcpy(void *dest, const void *src, acpi_size count) | ||
| 94 | { | ||
| 95 | char *new = (char *)dest; | ||
| 96 | char *old = (char *)src; | ||
| 97 | |||
| 98 | while (count) { | ||
| 99 | *new = *old; | ||
| 100 | new++; | ||
| 101 | old++; | ||
| 102 | count--; | ||
| 103 | } | ||
| 104 | |||
| 105 | return (dest); | ||
| 106 | } | ||
| 107 | |||
| 108 | /******************************************************************************* | ||
| 109 | * | ||
| 110 | * FUNCTION: acpi_ut_memset (memset) | ||
| 111 | * | ||
| 112 | * PARAMETERS: dest - Buffer to set | ||
| 113 | * value - Value to set each byte of memory | ||
| 114 | * count - Number of bytes to set | ||
| 115 | * | ||
| 116 | * RETURN: Dest | ||
| 117 | * | ||
| 118 | * DESCRIPTION: Initialize a buffer to a known value. | ||
| 119 | * | ||
| 120 | ******************************************************************************/ | ||
| 121 | |||
| 122 | void *acpi_ut_memset(void *dest, u8 value, acpi_size count) | ||
| 123 | { | ||
| 124 | char *new = (char *)dest; | ||
| 125 | |||
| 126 | while (count) { | ||
| 127 | *new = (char)value; | ||
| 128 | new++; | ||
| 129 | count--; | ||
| 130 | } | ||
| 131 | |||
| 132 | return (dest); | ||
| 133 | } | ||
| 134 | |||
| 135 | /******************************************************************************* | ||
| 136 | * | ||
| 137 | * FUNCTION: acpi_ut_strlen (strlen) | ||
| 138 | * | ||
| 139 | * PARAMETERS: string - Null terminated string | ||
| 140 | * | ||
| 141 | * RETURN: Length | ||
| 142 | * | ||
| 143 | * DESCRIPTION: Returns the length of the input string | ||
| 144 | * | ||
| 145 | ******************************************************************************/ | ||
| 146 | |||
| 147 | acpi_size acpi_ut_strlen(const char *string) | ||
| 148 | { | ||
| 149 | u32 length = 0; | ||
| 150 | |||
| 151 | /* Count the string until a null is encountered */ | ||
| 152 | |||
| 153 | while (*string) { | ||
| 154 | length++; | ||
| 155 | string++; | ||
| 156 | } | ||
| 157 | |||
| 158 | return (length); | ||
| 159 | } | ||
| 160 | |||
| 161 | /******************************************************************************* | ||
| 162 | * | ||
| 163 | * FUNCTION: acpi_ut_strcpy (strcpy) | ||
| 164 | * | ||
| 165 | * PARAMETERS: dst_string - Target of the copy | ||
| 166 | * src_string - The source string to copy | ||
| 167 | * | ||
| 168 | * RETURN: dst_string | ||
| 169 | * | ||
| 170 | * DESCRIPTION: Copy a null terminated string | ||
| 171 | * | ||
| 172 | ******************************************************************************/ | ||
| 173 | |||
| 174 | char *acpi_ut_strcpy(char *dst_string, const char *src_string) | ||
| 175 | { | ||
| 176 | char *string = dst_string; | ||
| 177 | |||
| 178 | /* Move bytes brute force */ | ||
| 179 | |||
| 180 | while (*src_string) { | ||
| 181 | *string = *src_string; | ||
| 182 | |||
| 183 | string++; | ||
| 184 | src_string++; | ||
| 185 | } | ||
| 186 | |||
| 187 | /* Null terminate */ | ||
| 188 | |||
| 189 | *string = 0; | ||
| 190 | return (dst_string); | ||
| 191 | } | ||
| 192 | |||
| 193 | /******************************************************************************* | ||
| 194 | * | ||
| 195 | * FUNCTION: acpi_ut_strncpy (strncpy) | ||
| 196 | * | ||
| 197 | * PARAMETERS: dst_string - Target of the copy | ||
| 198 | * src_string - The source string to copy | ||
| 199 | * count - Maximum # of bytes to copy | ||
| 200 | * | ||
| 201 | * RETURN: dst_string | ||
| 202 | * | ||
| 203 | * DESCRIPTION: Copy a null terminated string, with a maximum length | ||
| 204 | * | ||
| 205 | ******************************************************************************/ | ||
| 206 | |||
| 207 | char *acpi_ut_strncpy(char *dst_string, const char *src_string, acpi_size count) | ||
| 208 | { | ||
| 209 | char *string = dst_string; | ||
| 210 | |||
| 211 | /* Copy the string */ | ||
| 212 | |||
| 213 | for (string = dst_string; | ||
| 214 | count && (count--, (*string++ = *src_string++));) {; | ||
| 215 | } | ||
| 216 | |||
| 217 | /* Pad with nulls if necessary */ | ||
| 218 | |||
| 219 | while (count--) { | ||
| 220 | *string = 0; | ||
| 221 | string++; | ||
| 222 | } | ||
| 223 | |||
| 224 | /* Return original pointer */ | ||
| 225 | |||
| 226 | return (dst_string); | ||
| 227 | } | ||
| 228 | |||
| 229 | /******************************************************************************* | ||
| 230 | * | ||
| 231 | * FUNCTION: acpi_ut_strcmp (strcmp) | ||
| 232 | * | ||
| 233 | * PARAMETERS: string1 - First string | ||
| 234 | * string2 - Second string | ||
| 235 | * | ||
| 236 | * RETURN: Index where strings mismatched, or 0 if strings matched | ||
| 237 | * | ||
| 238 | * DESCRIPTION: Compare two null terminated strings | ||
| 239 | * | ||
| 240 | ******************************************************************************/ | ||
| 241 | |||
| 242 | int acpi_ut_strcmp(const char *string1, const char *string2) | ||
| 243 | { | ||
| 244 | |||
| 245 | for (; (*string1 == *string2); string2++) { | ||
| 246 | if (!*string1++) { | ||
| 247 | return (0); | ||
| 248 | } | ||
| 249 | } | ||
| 250 | |||
| 251 | return ((unsigned char)*string1 - (unsigned char)*string2); | ||
| 252 | } | ||
| 253 | |||
| 254 | #ifdef ACPI_FUTURE_IMPLEMENTATION | ||
| 255 | /* Not used at this time */ | ||
| 256 | /******************************************************************************* | ||
| 257 | * | ||
| 258 | * FUNCTION: acpi_ut_strchr (strchr) | ||
| 259 | * | ||
| 260 | * PARAMETERS: string - Search string | ||
| 261 | * ch - character to search for | ||
| 262 | * | ||
| 263 | * RETURN: Ptr to char or NULL if not found | ||
| 264 | * | ||
| 265 | * DESCRIPTION: Search a string for a character | ||
| 266 | * | ||
| 267 | ******************************************************************************/ | ||
| 268 | |||
| 269 | char *acpi_ut_strchr(const char *string, int ch) | ||
| 270 | { | ||
| 271 | |||
| 272 | for (; (*string); string++) { | ||
| 273 | if ((*string) == (char)ch) { | ||
| 274 | return ((char *)string); | ||
| 275 | } | ||
| 276 | } | ||
| 277 | |||
| 278 | return (NULL); | ||
| 279 | } | ||
| 280 | #endif | ||
| 281 | |||
| 282 | /******************************************************************************* | ||
| 283 | * | ||
| 284 | * FUNCTION: acpi_ut_strncmp (strncmp) | ||
| 285 | * | ||
| 286 | * PARAMETERS: string1 - First string | ||
| 287 | * string2 - Second string | ||
| 288 | * count - Maximum # of bytes to compare | ||
| 289 | * | ||
| 290 | * RETURN: Index where strings mismatched, or 0 if strings matched | ||
| 291 | * | ||
| 292 | * DESCRIPTION: Compare two null terminated strings, with a maximum length | ||
| 293 | * | ||
| 294 | ******************************************************************************/ | ||
| 295 | |||
| 296 | int acpi_ut_strncmp(const char *string1, const char *string2, acpi_size count) | ||
| 297 | { | ||
| 298 | |||
| 299 | for (; count-- && (*string1 == *string2); string2++) { | ||
| 300 | if (!*string1++) { | ||
| 301 | return (0); | ||
| 302 | } | ||
| 303 | } | ||
| 304 | |||
| 305 | return ((count == ACPI_SIZE_MAX) ? 0 : ((unsigned char)*string1 - | ||
| 306 | (unsigned char)*string2)); | ||
| 307 | } | ||
| 308 | |||
| 309 | /******************************************************************************* | ||
| 310 | * | ||
| 311 | * FUNCTION: acpi_ut_strcat (Strcat) | ||
| 312 | * | ||
| 313 | * PARAMETERS: dst_string - Target of the copy | ||
| 314 | * src_string - The source string to copy | ||
| 315 | * | ||
| 316 | * RETURN: dst_string | ||
| 317 | * | ||
| 318 | * DESCRIPTION: Append a null terminated string to a null terminated string | ||
| 319 | * | ||
| 320 | ******************************************************************************/ | ||
| 321 | |||
| 322 | char *acpi_ut_strcat(char *dst_string, const char *src_string) | ||
| 323 | { | ||
| 324 | char *string; | ||
| 325 | |||
| 326 | /* Find end of the destination string */ | ||
| 327 | |||
| 328 | for (string = dst_string; *string++;) {; | ||
| 329 | } | ||
| 330 | |||
| 331 | /* Concatenate the string */ | ||
| 332 | |||
| 333 | for (--string; (*string++ = *src_string++);) {; | ||
| 334 | } | ||
| 335 | |||
| 336 | return (dst_string); | ||
| 337 | } | ||
| 338 | |||
| 339 | /******************************************************************************* | ||
| 340 | * | ||
| 341 | * FUNCTION: acpi_ut_strncat (strncat) | ||
| 342 | * | ||
| 343 | * PARAMETERS: dst_string - Target of the copy | ||
| 344 | * src_string - The source string to copy | ||
| 345 | * count - Maximum # of bytes to copy | ||
| 346 | * | ||
| 347 | * RETURN: dst_string | ||
| 348 | * | ||
| 349 | * DESCRIPTION: Append a null terminated string to a null terminated string, | ||
| 350 | * with a maximum count. | ||
| 351 | * | ||
| 352 | ******************************************************************************/ | ||
| 353 | |||
| 354 | char *acpi_ut_strncat(char *dst_string, const char *src_string, acpi_size count) | ||
| 355 | { | ||
| 356 | char *string; | ||
| 357 | |||
| 358 | if (count) { | ||
| 359 | |||
| 360 | /* Find end of the destination string */ | ||
| 361 | |||
| 362 | for (string = dst_string; *string++;) {; | ||
| 363 | } | ||
| 364 | |||
| 365 | /* Concatenate the string */ | ||
| 366 | |||
| 367 | for (--string; (*string++ = *src_string++) && --count;) {; | ||
| 368 | } | ||
| 369 | |||
| 370 | /* Null terminate if necessary */ | ||
| 371 | |||
| 372 | if (!count) { | ||
| 373 | *string = 0; | ||
| 374 | } | ||
| 375 | } | ||
| 376 | |||
| 377 | return (dst_string); | ||
| 378 | } | ||
| 379 | |||
| 380 | /******************************************************************************* | ||
| 381 | * | ||
| 382 | * FUNCTION: acpi_ut_strstr (strstr) | ||
| 383 | * | ||
| 384 | * PARAMETERS: string1 - Target string | ||
| 385 | * string2 - Substring to search for | ||
| 386 | * | ||
| 387 | * RETURN: Where substring match starts, Null if no match found | ||
| 388 | * | ||
| 389 | * DESCRIPTION: Checks if String2 occurs in String1. This is not really a | ||
| 390 | * full implementation of strstr, only sufficient for command | ||
| 391 | * matching | ||
| 392 | * | ||
| 393 | ******************************************************************************/ | ||
| 394 | |||
| 395 | char *acpi_ut_strstr(char *string1, char *string2) | ||
| 396 | { | ||
| 397 | char *string; | ||
| 398 | |||
| 399 | if (acpi_ut_strlen(string2) > acpi_ut_strlen(string1)) { | ||
| 400 | return (NULL); | ||
| 401 | } | ||
| 402 | |||
| 403 | /* Walk entire string, comparing the letters */ | ||
| 404 | |||
| 405 | for (string = string1; *string2;) { | ||
| 406 | if (*string2 != *string) { | ||
| 407 | return (NULL); | ||
| 408 | } | ||
| 409 | |||
| 410 | string2++; | ||
| 411 | string++; | ||
| 412 | } | ||
| 413 | |||
| 414 | return (string1); | ||
| 415 | } | ||
| 416 | |||
| 417 | /******************************************************************************* | ||
| 418 | * | ||
| 419 | * FUNCTION: acpi_ut_strtoul (strtoul) | ||
| 420 | * | ||
| 421 | * PARAMETERS: string - Null terminated string | ||
| 422 | * terminater - Where a pointer to the terminating byte is | ||
| 423 | * returned | ||
| 424 | * base - Radix of the string | ||
| 425 | * | ||
| 426 | * RETURN: Converted value | ||
| 427 | * | ||
| 428 | * DESCRIPTION: Convert a string into a 32-bit unsigned value. | ||
| 429 | * Note: use acpi_ut_strtoul64 for 64-bit integers. | ||
| 430 | * | ||
| 431 | ******************************************************************************/ | ||
| 432 | |||
| 433 | u32 acpi_ut_strtoul(const char *string, char **terminator, u32 base) | ||
| 434 | { | ||
| 435 | u32 converted = 0; | ||
| 436 | u32 index; | ||
| 437 | u32 sign; | ||
| 438 | const char *string_start; | ||
| 439 | u32 return_value = 0; | ||
| 440 | acpi_status status = AE_OK; | ||
| 441 | |||
| 442 | /* | ||
| 443 | * Save the value of the pointer to the buffer's first | ||
| 444 | * character, save the current errno value, and then | ||
| 445 | * skip over any white space in the buffer: | ||
| 446 | */ | ||
| 447 | string_start = string; | ||
| 448 | while (ACPI_IS_SPACE(*string) || *string == '\t') { | ||
| 449 | ++string; | ||
| 450 | } | ||
| 451 | |||
| 452 | /* | ||
| 453 | * The buffer may contain an optional plus or minus sign. | ||
| 454 | * If it does, then skip over it but remember what is was: | ||
| 455 | */ | ||
| 456 | if (*string == '-') { | ||
| 457 | sign = NEGATIVE; | ||
| 458 | ++string; | ||
| 459 | } else if (*string == '+') { | ||
| 460 | ++string; | ||
| 461 | sign = POSITIVE; | ||
| 462 | } else { | ||
| 463 | sign = POSITIVE; | ||
| 464 | } | ||
| 465 | |||
| 466 | /* | ||
| 467 | * If the input parameter Base is zero, then we need to | ||
| 468 | * determine if it is octal, decimal, or hexadecimal: | ||
| 469 | */ | ||
| 470 | if (base == 0) { | ||
| 471 | if (*string == '0') { | ||
| 472 | if (acpi_ut_to_lower(*(++string)) == 'x') { | ||
| 473 | base = 16; | ||
| 474 | ++string; | ||
| 475 | } else { | ||
| 476 | base = 8; | ||
| 477 | } | ||
| 478 | } else { | ||
| 479 | base = 10; | ||
| 480 | } | ||
| 481 | } else if (base < 2 || base > 36) { | ||
| 482 | /* | ||
| 483 | * The specified Base parameter is not in the domain of | ||
| 484 | * this function: | ||
| 485 | */ | ||
| 486 | goto done; | ||
| 487 | } | ||
| 488 | |||
| 489 | /* | ||
| 490 | * For octal and hexadecimal bases, skip over the leading | ||
| 491 | * 0 or 0x, if they are present. | ||
| 492 | */ | ||
| 493 | if (base == 8 && *string == '0') { | ||
| 494 | string++; | ||
| 495 | } | ||
| 496 | |||
| 497 | if (base == 16 && | ||
| 498 | *string == '0' && acpi_ut_to_lower(*(++string)) == 'x') { | ||
| 499 | string++; | ||
| 500 | } | ||
| 501 | |||
| 502 | /* | ||
| 503 | * Main loop: convert the string to an unsigned long: | ||
| 504 | */ | ||
| 505 | while (*string) { | ||
| 506 | if (ACPI_IS_DIGIT(*string)) { | ||
| 507 | index = (u32)((u8)*string - '0'); | ||
| 508 | } else { | ||
| 509 | index = (u32)acpi_ut_to_upper(*string); | ||
| 510 | if (ACPI_IS_UPPER(index)) { | ||
| 511 | index = index - 'A' + 10; | ||
| 512 | } else { | ||
| 513 | goto done; | ||
| 514 | } | ||
| 515 | } | ||
| 516 | |||
| 517 | if (index >= base) { | ||
| 518 | goto done; | ||
| 519 | } | ||
| 520 | |||
| 521 | /* | ||
| 522 | * Check to see if value is out of range: | ||
| 523 | */ | ||
| 524 | |||
| 525 | if (return_value > ((ACPI_UINT32_MAX - (u32)index) / (u32)base)) { | ||
| 526 | status = AE_ERROR; | ||
| 527 | return_value = 0; /* reset */ | ||
| 528 | } else { | ||
| 529 | return_value *= base; | ||
| 530 | return_value += index; | ||
| 531 | converted = 1; | ||
| 532 | } | ||
| 533 | |||
| 534 | ++string; | ||
| 535 | } | ||
| 536 | |||
| 537 | done: | ||
| 538 | /* | ||
| 539 | * If appropriate, update the caller's pointer to the next | ||
| 540 | * unconverted character in the buffer. | ||
| 541 | */ | ||
| 542 | if (terminator) { | ||
| 543 | if (converted == 0 && return_value == 0 && string != NULL) { | ||
| 544 | *terminator = (char *)string_start; | ||
| 545 | } else { | ||
| 546 | *terminator = (char *)string; | ||
| 547 | } | ||
| 548 | } | ||
| 549 | |||
| 550 | if (status == AE_ERROR) { | ||
| 551 | return_value = ACPI_UINT32_MAX; | ||
| 552 | } | ||
| 553 | |||
| 554 | /* | ||
| 555 | * If a minus sign was present, then "the conversion is negated": | ||
| 556 | */ | ||
| 557 | if (sign == NEGATIVE) { | ||
| 558 | return_value = (ACPI_UINT32_MAX - return_value) + 1; | ||
| 559 | } | ||
| 560 | |||
| 561 | return (return_value); | ||
| 562 | } | ||
| 563 | |||
| 564 | /******************************************************************************* | ||
| 565 | * | ||
| 566 | * FUNCTION: acpi_ut_to_upper (TOUPPER) | ||
| 567 | * | ||
| 568 | * PARAMETERS: c - Character to convert | ||
| 569 | * | ||
| 570 | * RETURN: Converted character as an int | ||
| 571 | * | ||
| 572 | * DESCRIPTION: Convert character to uppercase | ||
| 573 | * | ||
| 574 | ******************************************************************************/ | ||
| 575 | |||
| 576 | int acpi_ut_to_upper(int c) | ||
| 577 | { | ||
| 578 | |||
| 579 | return (ACPI_IS_LOWER(c) ? ((c) - 0x20) : (c)); | ||
| 580 | } | ||
| 581 | |||
| 582 | /******************************************************************************* | ||
| 583 | * | ||
| 584 | * FUNCTION: acpi_ut_to_lower (TOLOWER) | ||
| 585 | * | ||
| 586 | * PARAMETERS: c - Character to convert | ||
| 587 | * | ||
| 588 | * RETURN: Converted character as an int | ||
| 589 | * | ||
| 590 | * DESCRIPTION: Convert character to lowercase | ||
| 591 | * | ||
| 592 | ******************************************************************************/ | ||
| 593 | |||
| 594 | int acpi_ut_to_lower(int c) | ||
| 595 | { | ||
| 596 | |||
| 597 | return (ACPI_IS_UPPER(c) ? ((c) + 0x20) : (c)); | ||
| 598 | } | ||
| 599 | |||
| 600 | /******************************************************************************* | ||
| 601 | * | ||
| 602 | * FUNCTION: is* functions | ||
| 603 | * | ||
| 604 | * DESCRIPTION: is* functions use the ctype table below | ||
| 605 | * | ||
| 606 | ******************************************************************************/ | ||
| 607 | |||
| 608 | const u8 _acpi_ctype[257] = { | ||
| 609 | _ACPI_CN, /* 0x00 0 NUL */ | ||
| 610 | _ACPI_CN, /* 0x01 1 SOH */ | ||
| 611 | _ACPI_CN, /* 0x02 2 STX */ | ||
| 612 | _ACPI_CN, /* 0x03 3 ETX */ | ||
| 613 | _ACPI_CN, /* 0x04 4 EOT */ | ||
| 614 | _ACPI_CN, /* 0x05 5 ENQ */ | ||
| 615 | _ACPI_CN, /* 0x06 6 ACK */ | ||
| 616 | _ACPI_CN, /* 0x07 7 BEL */ | ||
| 617 | _ACPI_CN, /* 0x08 8 BS */ | ||
| 618 | _ACPI_CN | _ACPI_SP, /* 0x09 9 TAB */ | ||
| 619 | _ACPI_CN | _ACPI_SP, /* 0x0A 10 LF */ | ||
| 620 | _ACPI_CN | _ACPI_SP, /* 0x0B 11 VT */ | ||
| 621 | _ACPI_CN | _ACPI_SP, /* 0x0C 12 FF */ | ||
| 622 | _ACPI_CN | _ACPI_SP, /* 0x0D 13 CR */ | ||
| 623 | _ACPI_CN, /* 0x0E 14 SO */ | ||
| 624 | _ACPI_CN, /* 0x0F 15 SI */ | ||
| 625 | _ACPI_CN, /* 0x10 16 DLE */ | ||
| 626 | _ACPI_CN, /* 0x11 17 DC1 */ | ||
| 627 | _ACPI_CN, /* 0x12 18 DC2 */ | ||
| 628 | _ACPI_CN, /* 0x13 19 DC3 */ | ||
| 629 | _ACPI_CN, /* 0x14 20 DC4 */ | ||
| 630 | _ACPI_CN, /* 0x15 21 NAK */ | ||
| 631 | _ACPI_CN, /* 0x16 22 SYN */ | ||
| 632 | _ACPI_CN, /* 0x17 23 ETB */ | ||
| 633 | _ACPI_CN, /* 0x18 24 CAN */ | ||
| 634 | _ACPI_CN, /* 0x19 25 EM */ | ||
| 635 | _ACPI_CN, /* 0x1A 26 SUB */ | ||
| 636 | _ACPI_CN, /* 0x1B 27 ESC */ | ||
| 637 | _ACPI_CN, /* 0x1C 28 FS */ | ||
| 638 | _ACPI_CN, /* 0x1D 29 GS */ | ||
| 639 | _ACPI_CN, /* 0x1E 30 RS */ | ||
| 640 | _ACPI_CN, /* 0x1F 31 US */ | ||
| 641 | _ACPI_XS | _ACPI_SP, /* 0x20 32 ' ' */ | ||
| 642 | _ACPI_PU, /* 0x21 33 '!' */ | ||
| 643 | _ACPI_PU, /* 0x22 34 '"' */ | ||
| 644 | _ACPI_PU, /* 0x23 35 '#' */ | ||
| 645 | _ACPI_PU, /* 0x24 36 '$' */ | ||
| 646 | _ACPI_PU, /* 0x25 37 '%' */ | ||
| 647 | _ACPI_PU, /* 0x26 38 '&' */ | ||
| 648 | _ACPI_PU, /* 0x27 39 ''' */ | ||
| 649 | _ACPI_PU, /* 0x28 40 '(' */ | ||
| 650 | _ACPI_PU, /* 0x29 41 ')' */ | ||
| 651 | _ACPI_PU, /* 0x2A 42 '*' */ | ||
| 652 | _ACPI_PU, /* 0x2B 43 '+' */ | ||
| 653 | _ACPI_PU, /* 0x2C 44 ',' */ | ||
| 654 | _ACPI_PU, /* 0x2D 45 '-' */ | ||
| 655 | _ACPI_PU, /* 0x2E 46 '.' */ | ||
| 656 | _ACPI_PU, /* 0x2F 47 '/' */ | ||
| 657 | _ACPI_XD | _ACPI_DI, /* 0x30 48 '0' */ | ||
| 658 | _ACPI_XD | _ACPI_DI, /* 0x31 49 '1' */ | ||
| 659 | _ACPI_XD | _ACPI_DI, /* 0x32 50 '2' */ | ||
| 660 | _ACPI_XD | _ACPI_DI, /* 0x33 51 '3' */ | ||
| 661 | _ACPI_XD | _ACPI_DI, /* 0x34 52 '4' */ | ||
| 662 | _ACPI_XD | _ACPI_DI, /* 0x35 53 '5' */ | ||
| 663 | _ACPI_XD | _ACPI_DI, /* 0x36 54 '6' */ | ||
| 664 | _ACPI_XD | _ACPI_DI, /* 0x37 55 '7' */ | ||
| 665 | _ACPI_XD | _ACPI_DI, /* 0x38 56 '8' */ | ||
| 666 | _ACPI_XD | _ACPI_DI, /* 0x39 57 '9' */ | ||
| 667 | _ACPI_PU, /* 0x3A 58 ':' */ | ||
| 668 | _ACPI_PU, /* 0x3B 59 ';' */ | ||
| 669 | _ACPI_PU, /* 0x3C 60 '<' */ | ||
| 670 | _ACPI_PU, /* 0x3D 61 '=' */ | ||
| 671 | _ACPI_PU, /* 0x3E 62 '>' */ | ||
| 672 | _ACPI_PU, /* 0x3F 63 '?' */ | ||
| 673 | _ACPI_PU, /* 0x40 64 '@' */ | ||
| 674 | _ACPI_XD | _ACPI_UP, /* 0x41 65 'A' */ | ||
| 675 | _ACPI_XD | _ACPI_UP, /* 0x42 66 'B' */ | ||
| 676 | _ACPI_XD | _ACPI_UP, /* 0x43 67 'C' */ | ||
| 677 | _ACPI_XD | _ACPI_UP, /* 0x44 68 'D' */ | ||
| 678 | _ACPI_XD | _ACPI_UP, /* 0x45 69 'E' */ | ||
| 679 | _ACPI_XD | _ACPI_UP, /* 0x46 70 'F' */ | ||
| 680 | _ACPI_UP, /* 0x47 71 'G' */ | ||
| 681 | _ACPI_UP, /* 0x48 72 'H' */ | ||
| 682 | _ACPI_UP, /* 0x49 73 'I' */ | ||
| 683 | _ACPI_UP, /* 0x4A 74 'J' */ | ||
| 684 | _ACPI_UP, /* 0x4B 75 'K' */ | ||
| 685 | _ACPI_UP, /* 0x4C 76 'L' */ | ||
| 686 | _ACPI_UP, /* 0x4D 77 'M' */ | ||
| 687 | _ACPI_UP, /* 0x4E 78 'N' */ | ||
| 688 | _ACPI_UP, /* 0x4F 79 'O' */ | ||
| 689 | _ACPI_UP, /* 0x50 80 'P' */ | ||
| 690 | _ACPI_UP, /* 0x51 81 'Q' */ | ||
| 691 | _ACPI_UP, /* 0x52 82 'R' */ | ||
| 692 | _ACPI_UP, /* 0x53 83 'S' */ | ||
| 693 | _ACPI_UP, /* 0x54 84 'T' */ | ||
| 694 | _ACPI_UP, /* 0x55 85 'U' */ | ||
| 695 | _ACPI_UP, /* 0x56 86 'V' */ | ||
| 696 | _ACPI_UP, /* 0x57 87 'W' */ | ||
| 697 | _ACPI_UP, /* 0x58 88 'X' */ | ||
| 698 | _ACPI_UP, /* 0x59 89 'Y' */ | ||
| 699 | _ACPI_UP, /* 0x5A 90 'Z' */ | ||
| 700 | _ACPI_PU, /* 0x5B 91 '[' */ | ||
| 701 | _ACPI_PU, /* 0x5C 92 '\' */ | ||
| 702 | _ACPI_PU, /* 0x5D 93 ']' */ | ||
| 703 | _ACPI_PU, /* 0x5E 94 '^' */ | ||
| 704 | _ACPI_PU, /* 0x5F 95 '_' */ | ||
| 705 | _ACPI_PU, /* 0x60 96 '`' */ | ||
| 706 | _ACPI_XD | _ACPI_LO, /* 0x61 97 'a' */ | ||
| 707 | _ACPI_XD | _ACPI_LO, /* 0x62 98 'b' */ | ||
| 708 | _ACPI_XD | _ACPI_LO, /* 0x63 99 'c' */ | ||
| 709 | _ACPI_XD | _ACPI_LO, /* 0x64 100 'd' */ | ||
| 710 | _ACPI_XD | _ACPI_LO, /* 0x65 101 'e' */ | ||
| 711 | _ACPI_XD | _ACPI_LO, /* 0x66 102 'f' */ | ||
| 712 | _ACPI_LO, /* 0x67 103 'g' */ | ||
| 713 | _ACPI_LO, /* 0x68 104 'h' */ | ||
| 714 | _ACPI_LO, /* 0x69 105 'i' */ | ||
| 715 | _ACPI_LO, /* 0x6A 106 'j' */ | ||
| 716 | _ACPI_LO, /* 0x6B 107 'k' */ | ||
| 717 | _ACPI_LO, /* 0x6C 108 'l' */ | ||
| 718 | _ACPI_LO, /* 0x6D 109 'm' */ | ||
| 719 | _ACPI_LO, /* 0x6E 110 'n' */ | ||
| 720 | _ACPI_LO, /* 0x6F 111 'o' */ | ||
| 721 | _ACPI_LO, /* 0x70 112 'p' */ | ||
| 722 | _ACPI_LO, /* 0x71 113 'q' */ | ||
| 723 | _ACPI_LO, /* 0x72 114 'r' */ | ||
| 724 | _ACPI_LO, /* 0x73 115 's' */ | ||
| 725 | _ACPI_LO, /* 0x74 116 't' */ | ||
| 726 | _ACPI_LO, /* 0x75 117 'u' */ | ||
| 727 | _ACPI_LO, /* 0x76 118 'v' */ | ||
| 728 | _ACPI_LO, /* 0x77 119 'w' */ | ||
| 729 | _ACPI_LO, /* 0x78 120 'x' */ | ||
| 730 | _ACPI_LO, /* 0x79 121 'y' */ | ||
| 731 | _ACPI_LO, /* 0x7A 122 'z' */ | ||
| 732 | _ACPI_PU, /* 0x7B 123 '{' */ | ||
| 733 | _ACPI_PU, /* 0x7C 124 '|' */ | ||
| 734 | _ACPI_PU, /* 0x7D 125 '}' */ | ||
| 735 | _ACPI_PU, /* 0x7E 126 '~' */ | ||
| 736 | _ACPI_CN, /* 0x7F 127 DEL */ | ||
| 737 | |||
| 738 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 to 0x8F */ | ||
| 739 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 to 0x9F */ | ||
| 740 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xA0 to 0xAF */ | ||
| 741 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xB0 to 0xBF */ | ||
| 742 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xC0 to 0xCF */ | ||
| 743 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xD0 to 0xDF */ | ||
| 744 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xE0 to 0xEF */ | ||
| 745 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xF0 to 0xFF */ | ||
| 746 | 0 /* 0x100 */ | ||
| 747 | }; | ||
| 748 | |||
| 749 | #endif /* ACPI_USE_SYSTEM_CLIBRARY */ | ||
diff --git a/drivers/acpi/apei/erst-dbg.c b/drivers/acpi/apei/erst-dbg.c index 903549df809b..04ab5c9d3ced 100644 --- a/drivers/acpi/apei/erst-dbg.c +++ b/drivers/acpi/apei/erst-dbg.c | |||
| @@ -111,8 +111,17 @@ retry_next: | |||
| 111 | if (rc) | 111 | if (rc) |
| 112 | goto out; | 112 | goto out; |
| 113 | /* no more record */ | 113 | /* no more record */ |
| 114 | if (id == APEI_ERST_INVALID_RECORD_ID) | 114 | if (id == APEI_ERST_INVALID_RECORD_ID) { |
| 115 | /* | ||
| 116 | * If the persistent store is empty initially, the function | ||
| 117 | * 'erst_read' below will return "-ENOENT" value. This causes | ||
| 118 | * 'retry_next' label is entered again. The returned value | ||
| 119 | * should be zero indicating the read operation is EOF. | ||
| 120 | */ | ||
| 121 | len = 0; | ||
| 122 | |||
| 115 | goto out; | 123 | goto out; |
| 124 | } | ||
| 116 | retry: | 125 | retry: |
| 117 | rc = len = erst_read(id, erst_dbg_buf, erst_dbg_buf_len); | 126 | rc = len = erst_read(id, erst_dbg_buf, erst_dbg_buf_len); |
| 118 | /* The record may be cleared by others, try read next record */ | 127 | /* The record may be cleared by others, try read next record */ |
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index f09dc987cf17..c6ff606c6d5b 100644 --- a/drivers/acpi/device_pm.c +++ b/drivers/acpi/device_pm.c | |||
| @@ -358,8 +358,7 @@ static struct acpi_device *acpi_dev_pm_get_node(struct device *dev) | |||
| 358 | acpi_handle handle = DEVICE_ACPI_HANDLE(dev); | 358 | acpi_handle handle = DEVICE_ACPI_HANDLE(dev); |
| 359 | struct acpi_device *adev; | 359 | struct acpi_device *adev; |
| 360 | 360 | ||
| 361 | return handle && ACPI_SUCCESS(acpi_bus_get_device(handle, &adev)) ? | 361 | return handle && !acpi_bus_get_device(handle, &adev) ? adev : NULL; |
| 362 | adev : NULL; | ||
| 363 | } | 362 | } |
| 364 | 363 | ||
| 365 | /** | 364 | /** |
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 01551840d236..35da18113216 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c | |||
| @@ -18,9 +18,14 @@ | |||
| 18 | 18 | ||
| 19 | #define ACPI_GLUE_DEBUG 0 | 19 | #define ACPI_GLUE_DEBUG 0 |
| 20 | #if ACPI_GLUE_DEBUG | 20 | #if ACPI_GLUE_DEBUG |
| 21 | #define DBG(x...) printk(PREFIX x) | 21 | #define DBG(fmt, ...) \ |
| 22 | printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__) | ||
| 22 | #else | 23 | #else |
| 23 | #define DBG(x...) do { } while(0) | 24 | #define DBG(fmt, ...) \ |
| 25 | do { \ | ||
| 26 | if (0) \ | ||
| 27 | printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__); \ | ||
| 28 | } while (0) | ||
| 24 | #endif | 29 | #endif |
| 25 | static LIST_HEAD(bus_type_list); | 30 | static LIST_HEAD(bus_type_list); |
| 26 | static DECLARE_RWSEM(bus_type_sem); | 31 | static DECLARE_RWSEM(bus_type_sem); |
| @@ -292,7 +297,7 @@ static int acpi_platform_notify(struct device *dev) | |||
| 292 | if (!ret) { | 297 | if (!ret) { |
| 293 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 298 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
| 294 | 299 | ||
| 295 | acpi_get_name(dev->acpi_handle, ACPI_FULL_PATHNAME, &buffer); | 300 | acpi_get_name(ACPI_HANDLE(dev), ACPI_FULL_PATHNAME, &buffer); |
| 296 | DBG("Device %s -> %s\n", dev_name(dev), (char *)buffer.pointer); | 301 | DBG("Device %s -> %s\n", dev_name(dev), (char *)buffer.pointer); |
| 297 | kfree(buffer.pointer); | 302 | kfree(buffer.pointer); |
| 298 | } else | 303 | } else |
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 7db61b8fa11f..6e7b9d523812 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c | |||
| @@ -445,11 +445,8 @@ int acpi_power_resource_register_device(struct device *dev, acpi_handle handle) | |||
| 445 | return -ENODEV; | 445 | return -ENODEV; |
| 446 | 446 | ||
| 447 | ret = acpi_bus_get_device(handle, &acpi_dev); | 447 | ret = acpi_bus_get_device(handle, &acpi_dev); |
| 448 | if (ret) | 448 | if (ret || !acpi_dev->power.flags.power_resources) |
| 449 | goto no_power_resource; | 449 | return -ENODEV; |
| 450 | |||
| 451 | if (!acpi_dev->power.flags.power_resources) | ||
| 452 | goto no_power_resource; | ||
| 453 | 450 | ||
| 454 | powered_device = kzalloc(sizeof(*powered_device), GFP_KERNEL); | 451 | powered_device = kzalloc(sizeof(*powered_device), GFP_KERNEL); |
| 455 | if (!powered_device) | 452 | if (!powered_device) |
| @@ -471,10 +468,6 @@ int acpi_power_resource_register_device(struct device *dev, acpi_handle handle) | |||
| 471 | } | 468 | } |
| 472 | 469 | ||
| 473 | return ret; | 470 | return ret; |
| 474 | |||
| 475 | no_power_resource: | ||
| 476 | printk(KERN_DEBUG PREFIX "Invalid Power Resource to register!\n"); | ||
| 477 | return -ENODEV; | ||
| 478 | } | 471 | } |
| 479 | EXPORT_SYMBOL_GPL(acpi_power_resource_register_device); | 472 | EXPORT_SYMBOL_GPL(acpi_power_resource_register_device); |
| 480 | 473 | ||
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 53502d1bbf26..c88be6c37c30 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
| @@ -1346,7 +1346,7 @@ static void acpi_device_set_id(struct acpi_device *device) | |||
| 1346 | acpi_add_id(device, ACPI_DOCK_HID); | 1346 | acpi_add_id(device, ACPI_DOCK_HID); |
| 1347 | else if (!acpi_ibm_smbus_match(device)) | 1347 | else if (!acpi_ibm_smbus_match(device)) |
| 1348 | acpi_add_id(device, ACPI_SMBUS_IBM_HID); | 1348 | acpi_add_id(device, ACPI_SMBUS_IBM_HID); |
| 1349 | else if (!acpi_device_hid(device) && | 1349 | else if (list_empty(&device->pnp.ids) && |
| 1350 | ACPI_IS_ROOT_DEVICE(device->parent)) { | 1350 | ACPI_IS_ROOT_DEVICE(device->parent)) { |
| 1351 | acpi_add_id(device, ACPI_BUS_HID); /* \_SB, LNXSYBUS */ | 1351 | acpi_add_id(device, ACPI_BUS_HID); /* \_SB, LNXSYBUS */ |
| 1352 | strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME); | 1352 | strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME); |
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index a2fc56d2e681..cdbad3a454a0 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c | |||
| @@ -45,7 +45,6 @@ static int amba_match(struct device *dev, struct device_driver *drv) | |||
| 45 | return amba_lookup(pcdrv->id_table, pcdev) != NULL; | 45 | return amba_lookup(pcdrv->id_table, pcdev) != NULL; |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | #ifdef CONFIG_HOTPLUG | ||
| 49 | static int amba_uevent(struct device *dev, struct kobj_uevent_env *env) | 48 | static int amba_uevent(struct device *dev, struct kobj_uevent_env *env) |
| 50 | { | 49 | { |
| 51 | struct amba_device *pcdev = to_amba_device(dev); | 50 | struct amba_device *pcdev = to_amba_device(dev); |
| @@ -58,9 +57,6 @@ static int amba_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
| 58 | retval = add_uevent_var(env, "MODALIAS=amba:d%08X", pcdev->periphid); | 57 | retval = add_uevent_var(env, "MODALIAS=amba:d%08X", pcdev->periphid); |
| 59 | return retval; | 58 | return retval; |
| 60 | } | 59 | } |
| 61 | #else | ||
| 62 | #define amba_uevent NULL | ||
| 63 | #endif | ||
| 64 | 60 | ||
| 65 | #define amba_attr_func(name,fmt,arg...) \ | 61 | #define amba_attr_func(name,fmt,arg...) \ |
| 66 | static ssize_t name##_show(struct device *_dev, \ | 62 | static ssize_t name##_show(struct device *_dev, \ |
diff --git a/drivers/amba/tegra-ahb.c b/drivers/amba/tegra-ahb.c index 0576a7dd32a5..536c166f4253 100644 --- a/drivers/amba/tegra-ahb.c +++ b/drivers/amba/tegra-ahb.c | |||
| @@ -243,7 +243,7 @@ static void tegra_ahb_gizmo_init(struct tegra_ahb *ahb) | |||
| 243 | gizmo_writel(ahb, val, AHB_MEM_PREFETCH_CFG4); | 243 | gizmo_writel(ahb, val, AHB_MEM_PREFETCH_CFG4); |
| 244 | } | 244 | } |
| 245 | 245 | ||
| 246 | static int __devinit tegra_ahb_probe(struct platform_device *pdev) | 246 | static int tegra_ahb_probe(struct platform_device *pdev) |
| 247 | { | 247 | { |
| 248 | struct resource *res; | 248 | struct resource *res; |
| 249 | struct tegra_ahb *ahb; | 249 | struct tegra_ahb *ahb; |
| @@ -267,7 +267,7 @@ static int __devinit tegra_ahb_probe(struct platform_device *pdev) | |||
| 267 | return 0; | 267 | return 0; |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | static const struct of_device_id tegra_ahb_of_match[] __devinitconst = { | 270 | static const struct of_device_id tegra_ahb_of_match[] = { |
| 271 | { .compatible = "nvidia,tegra30-ahb", }, | 271 | { .compatible = "nvidia,tegra30-ahb", }, |
| 272 | { .compatible = "nvidia,tegra20-ahb", }, | 272 | { .compatible = "nvidia,tegra20-ahb", }, |
| 273 | {}, | 273 | {}, |
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index 1cc467bdb63d..7a8a2841fe64 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c | |||
| @@ -86,7 +86,7 @@ static struct scsi_host_template ahci_platform_sht = { | |||
| 86 | AHCI_SHT("ahci_platform"), | 86 | AHCI_SHT("ahci_platform"), |
| 87 | }; | 87 | }; |
| 88 | 88 | ||
| 89 | static int __devinit ahci_probe(struct platform_device *pdev) | 89 | static int ahci_probe(struct platform_device *pdev) |
| 90 | { | 90 | { |
| 91 | struct device *dev = &pdev->dev; | 91 | struct device *dev = &pdev->dev; |
| 92 | struct ahci_platform_data *pdata = dev_get_platdata(dev); | 92 | struct ahci_platform_data *pdata = dev_get_platdata(dev); |
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index acffcf0b3ad3..174eca609b42 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
| @@ -1270,7 +1270,7 @@ static int piix_disable_ahci(struct pci_dev *pdev) | |||
| 1270 | * they are found return an error code so we can turn off DMA | 1270 | * they are found return an error code so we can turn off DMA |
| 1271 | */ | 1271 | */ |
| 1272 | 1272 | ||
| 1273 | static int __devinit piix_check_450nx_errata(struct pci_dev *ata_dev) | 1273 | static int piix_check_450nx_errata(struct pci_dev *ata_dev) |
| 1274 | { | 1274 | { |
| 1275 | struct pci_dev *pdev = NULL; | 1275 | struct pci_dev *pdev = NULL; |
| 1276 | u16 cfg; | 1276 | u16 cfg; |
| @@ -1296,8 +1296,8 @@ static int __devinit piix_check_450nx_errata(struct pci_dev *ata_dev) | |||
| 1296 | return no_piix_dma; | 1296 | return no_piix_dma; |
| 1297 | } | 1297 | } |
| 1298 | 1298 | ||
| 1299 | static void __devinit piix_init_pcs(struct ata_host *host, | 1299 | static void piix_init_pcs(struct ata_host *host, |
| 1300 | const struct piix_map_db *map_db) | 1300 | const struct piix_map_db *map_db) |
| 1301 | { | 1301 | { |
| 1302 | struct pci_dev *pdev = to_pci_dev(host->dev); | 1302 | struct pci_dev *pdev = to_pci_dev(host->dev); |
| 1303 | u16 pcs, new_pcs; | 1303 | u16 pcs, new_pcs; |
| @@ -1313,9 +1313,9 @@ static void __devinit piix_init_pcs(struct ata_host *host, | |||
| 1313 | } | 1313 | } |
| 1314 | } | 1314 | } |
| 1315 | 1315 | ||
| 1316 | static const int *__devinit piix_init_sata_map(struct pci_dev *pdev, | 1316 | static const int *piix_init_sata_map(struct pci_dev *pdev, |
| 1317 | struct ata_port_info *pinfo, | 1317 | struct ata_port_info *pinfo, |
| 1318 | const struct piix_map_db *map_db) | 1318 | const struct piix_map_db *map_db) |
| 1319 | { | 1319 | { |
| 1320 | const int *map; | 1320 | const int *map; |
| 1321 | int i, invalid_map = 0; | 1321 | int i, invalid_map = 0; |
| @@ -1392,7 +1392,7 @@ static bool piix_no_sidpr(struct ata_host *host) | |||
| 1392 | return false; | 1392 | return false; |
| 1393 | } | 1393 | } |
| 1394 | 1394 | ||
| 1395 | static int __devinit piix_init_sidpr(struct ata_host *host) | 1395 | static int piix_init_sidpr(struct ata_host *host) |
| 1396 | { | 1396 | { |
| 1397 | struct pci_dev *pdev = to_pci_dev(host->dev); | 1397 | struct pci_dev *pdev = to_pci_dev(host->dev); |
| 1398 | struct piix_host_priv *hpriv = host->private_data; | 1398 | struct piix_host_priv *hpriv = host->private_data; |
| @@ -1595,8 +1595,7 @@ static void piix_ignore_devices_quirk(struct ata_host *host) | |||
| 1595 | * Zero on success, or -ERRNO value. | 1595 | * Zero on success, or -ERRNO value. |
| 1596 | */ | 1596 | */ |
| 1597 | 1597 | ||
| 1598 | static int __devinit piix_init_one(struct pci_dev *pdev, | 1598 | static int piix_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 1599 | const struct pci_device_id *ent) | ||
| 1600 | { | 1599 | { |
| 1601 | struct device *dev = &pdev->dev; | 1600 | struct device *dev = &pdev->dev; |
| 1602 | struct ata_port_info port_info[2]; | 1601 | struct ata_port_info port_info[2]; |
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c index 9764e80f9320..405022d302c3 100644 --- a/drivers/ata/pata_arasan_cf.c +++ b/drivers/ata/pata_arasan_cf.c | |||
| @@ -791,7 +791,7 @@ static struct ata_port_operations arasan_cf_ops = { | |||
| 791 | .set_dmamode = arasan_cf_set_dmamode, | 791 | .set_dmamode = arasan_cf_set_dmamode, |
| 792 | }; | 792 | }; |
| 793 | 793 | ||
| 794 | static int __devinit arasan_cf_probe(struct platform_device *pdev) | 794 | static int arasan_cf_probe(struct platform_device *pdev) |
| 795 | { | 795 | { |
| 796 | struct arasan_cf_dev *acdev; | 796 | struct arasan_cf_dev *acdev; |
| 797 | struct arasan_cf_pdata *pdata = dev_get_platdata(&pdev->dev); | 797 | struct arasan_cf_pdata *pdata = dev_get_platdata(&pdev->dev); |
| @@ -905,7 +905,7 @@ free_clk: | |||
| 905 | return ret; | 905 | return ret; |
| 906 | } | 906 | } |
| 907 | 907 | ||
| 908 | static int __devexit arasan_cf_remove(struct platform_device *pdev) | 908 | static int arasan_cf_remove(struct platform_device *pdev) |
| 909 | { | 909 | { |
| 910 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | 910 | struct ata_host *host = dev_get_drvdata(&pdev->dev); |
| 911 | struct arasan_cf_dev *acdev = host->ports[0]->private_data; | 911 | struct arasan_cf_dev *acdev = host->ports[0]->private_data; |
| @@ -955,7 +955,7 @@ MODULE_DEVICE_TABLE(of, arasan_cf_id_table); | |||
| 955 | 955 | ||
| 956 | static struct platform_driver arasan_cf_driver = { | 956 | static struct platform_driver arasan_cf_driver = { |
| 957 | .probe = arasan_cf_probe, | 957 | .probe = arasan_cf_probe, |
| 958 | .remove = __devexit_p(arasan_cf_remove), | 958 | .remove = arasan_cf_remove, |
| 959 | .driver = { | 959 | .driver = { |
| 960 | .name = DRIVER_NAME, | 960 | .name = DRIVER_NAME, |
| 961 | .owner = THIS_MODULE, | 961 | .owner = THIS_MODULE, |
diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c index 2a96bb2c53ee..033f3f4c20ad 100644 --- a/drivers/ata/pata_at91.c +++ b/drivers/ata/pata_at91.c | |||
| @@ -313,7 +313,7 @@ static struct ata_port_operations pata_at91_port_ops = { | |||
| 313 | .cable_detect = ata_cable_40wire, | 313 | .cable_detect = ata_cable_40wire, |
| 314 | }; | 314 | }; |
| 315 | 315 | ||
| 316 | static int __devinit pata_at91_probe(struct platform_device *pdev) | 316 | static int pata_at91_probe(struct platform_device *pdev) |
| 317 | { | 317 | { |
| 318 | struct at91_cf_data *board = pdev->dev.platform_data; | 318 | struct at91_cf_data *board = pdev->dev.platform_data; |
| 319 | struct device *dev = &pdev->dev; | 319 | struct device *dev = &pdev->dev; |
| @@ -420,7 +420,7 @@ err_put: | |||
| 420 | return ret; | 420 | return ret; |
| 421 | } | 421 | } |
| 422 | 422 | ||
| 423 | static int __devexit pata_at91_remove(struct platform_device *pdev) | 423 | static int pata_at91_remove(struct platform_device *pdev) |
| 424 | { | 424 | { |
| 425 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | 425 | struct ata_host *host = dev_get_drvdata(&pdev->dev); |
| 426 | struct at91_ide_info *info; | 426 | struct at91_ide_info *info; |
| @@ -441,7 +441,7 @@ static int __devexit pata_at91_remove(struct platform_device *pdev) | |||
| 441 | 441 | ||
| 442 | static struct platform_driver pata_at91_driver = { | 442 | static struct platform_driver pata_at91_driver = { |
| 443 | .probe = pata_at91_probe, | 443 | .probe = pata_at91_probe, |
| 444 | .remove = __devexit_p(pata_at91_remove), | 444 | .remove = pata_at91_remove, |
| 445 | .driver = { | 445 | .driver = { |
| 446 | .name = DRV_NAME, | 446 | .name = DRV_NAME, |
| 447 | .owner = THIS_MODULE, | 447 | .owner = THIS_MODULE, |
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c index 1e65842e2ca7..8d43510c6bec 100644 --- a/drivers/ata/pata_bf54x.c +++ b/drivers/ata/pata_bf54x.c | |||
| @@ -1538,7 +1538,7 @@ static unsigned short atapi_io_port[] = { | |||
| 1538 | * - IRQ (IORESOURCE_IRQ) | 1538 | * - IRQ (IORESOURCE_IRQ) |
| 1539 | * | 1539 | * |
| 1540 | */ | 1540 | */ |
| 1541 | static int __devinit bfin_atapi_probe(struct platform_device *pdev) | 1541 | static int bfin_atapi_probe(struct platform_device *pdev) |
| 1542 | { | 1542 | { |
| 1543 | int board_idx = 0; | 1543 | int board_idx = 0; |
| 1544 | struct resource *res; | 1544 | struct resource *res; |
| @@ -1608,7 +1608,7 @@ static int __devinit bfin_atapi_probe(struct platform_device *pdev) | |||
| 1608 | * A bfin atapi device has been unplugged. Perform the needed | 1608 | * A bfin atapi device has been unplugged. Perform the needed |
| 1609 | * cleanup. Also called on module unload for any active devices. | 1609 | * cleanup. Also called on module unload for any active devices. |
| 1610 | */ | 1610 | */ |
| 1611 | static int __devexit bfin_atapi_remove(struct platform_device *pdev) | 1611 | static int bfin_atapi_remove(struct platform_device *pdev) |
| 1612 | { | 1612 | { |
| 1613 | struct device *dev = &pdev->dev; | 1613 | struct device *dev = &pdev->dev; |
| 1614 | struct ata_host *host = dev_get_drvdata(dev); | 1614 | struct ata_host *host = dev_get_drvdata(dev); |
| @@ -1654,7 +1654,7 @@ static int bfin_atapi_resume(struct platform_device *pdev) | |||
| 1654 | 1654 | ||
| 1655 | static struct platform_driver bfin_atapi_driver = { | 1655 | static struct platform_driver bfin_atapi_driver = { |
| 1656 | .probe = bfin_atapi_probe, | 1656 | .probe = bfin_atapi_probe, |
| 1657 | .remove = __devexit_p(bfin_atapi_remove), | 1657 | .remove = bfin_atapi_remove, |
| 1658 | .suspend = bfin_atapi_suspend, | 1658 | .suspend = bfin_atapi_suspend, |
| 1659 | .resume = bfin_atapi_resume, | 1659 | .resume = bfin_atapi_resume, |
| 1660 | .driver = { | 1660 | .driver = { |
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c index de74d804f031..bfcf377e8f77 100644 --- a/drivers/ata/pata_cs5520.c +++ b/drivers/ata/pata_cs5520.c | |||
| @@ -115,7 +115,7 @@ static struct ata_port_operations cs5520_port_ops = { | |||
| 115 | .set_piomode = cs5520_set_piomode, | 115 | .set_piomode = cs5520_set_piomode, |
| 116 | }; | 116 | }; |
| 117 | 117 | ||
| 118 | static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | 118 | static int cs5520_init_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 119 | { | 119 | { |
| 120 | static const unsigned int cmd_port[] = { 0x1F0, 0x170 }; | 120 | static const unsigned int cmd_port[] = { 0x1F0, 0x170 }; |
| 121 | static const unsigned int ctl_port[] = { 0x3F6, 0x376 }; | 121 | static const unsigned int ctl_port[] = { 0x3F6, 0x376 }; |
diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c index 3982cef91f3c..556222f04731 100644 --- a/drivers/ata/pata_ep93xx.c +++ b/drivers/ata/pata_ep93xx.c | |||
| @@ -910,7 +910,7 @@ static struct ata_port_operations ep93xx_pata_port_ops = { | |||
| 910 | .port_start = ep93xx_pata_port_start, | 910 | .port_start = ep93xx_pata_port_start, |
| 911 | }; | 911 | }; |
| 912 | 912 | ||
| 913 | static int __devinit ep93xx_pata_probe(struct platform_device *pdev) | 913 | static int ep93xx_pata_probe(struct platform_device *pdev) |
| 914 | { | 914 | { |
| 915 | struct ep93xx_pata_data *drv_data; | 915 | struct ep93xx_pata_data *drv_data; |
| 916 | struct ata_host *host; | 916 | struct ata_host *host; |
| @@ -1011,7 +1011,7 @@ err_rel_gpio: | |||
| 1011 | return err; | 1011 | return err; |
| 1012 | } | 1012 | } |
| 1013 | 1013 | ||
| 1014 | static int __devexit ep93xx_pata_remove(struct platform_device *pdev) | 1014 | static int ep93xx_pata_remove(struct platform_device *pdev) |
| 1015 | { | 1015 | { |
| 1016 | struct ata_host *host = platform_get_drvdata(pdev); | 1016 | struct ata_host *host = platform_get_drvdata(pdev); |
| 1017 | struct ep93xx_pata_data *drv_data = host->private_data; | 1017 | struct ep93xx_pata_data *drv_data = host->private_data; |
| @@ -1029,7 +1029,7 @@ static struct platform_driver ep93xx_pata_platform_driver = { | |||
| 1029 | .owner = THIS_MODULE, | 1029 | .owner = THIS_MODULE, |
| 1030 | }, | 1030 | }, |
| 1031 | .probe = ep93xx_pata_probe, | 1031 | .probe = ep93xx_pata_probe, |
| 1032 | .remove = __devexit_p(ep93xx_pata_remove), | 1032 | .remove = ep93xx_pata_remove, |
| 1033 | }; | 1033 | }; |
| 1034 | 1034 | ||
| 1035 | module_platform_driver(ep93xx_pata_platform_driver); | 1035 | module_platform_driver(ep93xx_pata_platform_driver); |
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c index 52e7e7b8c74f..d7c732042a4f 100644 --- a/drivers/ata/pata_icside.c +++ b/drivers/ata/pata_icside.c | |||
| @@ -337,10 +337,9 @@ static struct ata_port_operations pata_icside_port_ops = { | |||
| 337 | .port_start = ATA_OP_NULL, /* don't need PRD table */ | 337 | .port_start = ATA_OP_NULL, /* don't need PRD table */ |
| 338 | }; | 338 | }; |
| 339 | 339 | ||
| 340 | static void __devinit | 340 | static void pata_icside_setup_ioaddr(struct ata_port *ap, void __iomem *base, |
| 341 | pata_icside_setup_ioaddr(struct ata_port *ap, void __iomem *base, | 341 | struct pata_icside_info *info, |
| 342 | struct pata_icside_info *info, | 342 | const struct portinfo *port) |
| 343 | const struct portinfo *port) | ||
| 344 | { | 343 | { |
| 345 | struct ata_ioports *ioaddr = &ap->ioaddr; | 344 | struct ata_ioports *ioaddr = &ap->ioaddr; |
| 346 | void __iomem *cmd = base + port->dataoffset; | 345 | void __iomem *cmd = base + port->dataoffset; |
| @@ -368,7 +367,7 @@ pata_icside_setup_ioaddr(struct ata_port *ap, void __iomem *base, | |||
| 368 | ata_port_desc(ap, "iocbase 0x%lx", info->raw_ioc_base); | 367 | ata_port_desc(ap, "iocbase 0x%lx", info->raw_ioc_base); |
| 369 | } | 368 | } |
| 370 | 369 | ||
| 371 | static int __devinit pata_icside_register_v5(struct pata_icside_info *info) | 370 | static int pata_icside_register_v5(struct pata_icside_info *info) |
| 372 | { | 371 | { |
| 373 | struct pata_icside_state *state = info->state; | 372 | struct pata_icside_state *state = info->state; |
| 374 | void __iomem *base; | 373 | void __iomem *base; |
| @@ -391,7 +390,7 @@ static int __devinit pata_icside_register_v5(struct pata_icside_info *info) | |||
| 391 | return 0; | 390 | return 0; |
| 392 | } | 391 | } |
| 393 | 392 | ||
| 394 | static int __devinit pata_icside_register_v6(struct pata_icside_info *info) | 393 | static int pata_icside_register_v6(struct pata_icside_info *info) |
| 395 | { | 394 | { |
| 396 | struct pata_icside_state *state = info->state; | 395 | struct pata_icside_state *state = info->state; |
| 397 | struct expansion_card *ec = info->ec; | 396 | struct expansion_card *ec = info->ec; |
| @@ -434,7 +433,7 @@ static int __devinit pata_icside_register_v6(struct pata_icside_info *info) | |||
| 434 | return icside_dma_init(info); | 433 | return icside_dma_init(info); |
| 435 | } | 434 | } |
| 436 | 435 | ||
| 437 | static int __devinit pata_icside_add_ports(struct pata_icside_info *info) | 436 | static int pata_icside_add_ports(struct pata_icside_info *info) |
| 438 | { | 437 | { |
| 439 | struct expansion_card *ec = info->ec; | 438 | struct expansion_card *ec = info->ec; |
| 440 | struct ata_host *host; | 439 | struct ata_host *host; |
| @@ -474,8 +473,8 @@ static int __devinit pata_icside_add_ports(struct pata_icside_info *info) | |||
| 474 | &pata_icside_sht); | 473 | &pata_icside_sht); |
| 475 | } | 474 | } |
| 476 | 475 | ||
| 477 | static int __devinit | 476 | static int pata_icside_probe(struct expansion_card *ec, |
| 478 | pata_icside_probe(struct expansion_card *ec, const struct ecard_id *id) | 477 | const struct ecard_id *id) |
| 479 | { | 478 | { |
| 480 | struct pata_icside_state *state; | 479 | struct pata_icside_state *state; |
| 481 | struct pata_icside_info info; | 480 | struct pata_icside_info info; |
| @@ -575,7 +574,7 @@ static void pata_icside_shutdown(struct expansion_card *ec) | |||
| 575 | } | 574 | } |
| 576 | } | 575 | } |
| 577 | 576 | ||
| 578 | static void __devexit pata_icside_remove(struct expansion_card *ec) | 577 | static void pata_icside_remove(struct expansion_card *ec) |
| 579 | { | 578 | { |
| 580 | struct ata_host *host = ecard_get_drvdata(ec); | 579 | struct ata_host *host = ecard_get_drvdata(ec); |
| 581 | struct pata_icside_state *state = host->private_data; | 580 | struct pata_icside_state *state = host->private_data; |
| @@ -602,7 +601,7 @@ static const struct ecard_id pata_icside_ids[] = { | |||
| 602 | 601 | ||
| 603 | static struct ecard_driver pata_icside_driver = { | 602 | static struct ecard_driver pata_icside_driver = { |
| 604 | .probe = pata_icside_probe, | 603 | .probe = pata_icside_probe, |
| 605 | .remove = __devexit_p(pata_icside_remove), | 604 | .remove = pata_icside_remove, |
| 606 | .shutdown = pata_icside_shutdown, | 605 | .shutdown = pata_icside_shutdown, |
| 607 | .id_table = pata_icside_ids, | 606 | .id_table = pata_icside_ids, |
| 608 | .drv = { | 607 | .drv = { |
diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c index 7d40b526ef11..40849445a9dc 100644 --- a/drivers/ata/pata_imx.c +++ b/drivers/ata/pata_imx.c | |||
| @@ -91,7 +91,7 @@ static void pata_imx_setup_port(struct ata_ioports *ioaddr) | |||
| 91 | ioaddr->command_addr = ioaddr->cmd_addr + (ATA_REG_CMD << 2); | 91 | ioaddr->command_addr = ioaddr->cmd_addr + (ATA_REG_CMD << 2); |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | static int __devinit pata_imx_probe(struct platform_device *pdev) | 94 | static int pata_imx_probe(struct platform_device *pdev) |
| 95 | { | 95 | { |
| 96 | struct ata_host *host; | 96 | struct ata_host *host; |
| 97 | struct ata_port *ap; | 97 | struct ata_port *ap; |
| @@ -167,7 +167,7 @@ free_priv: | |||
| 167 | return -ENOMEM; | 167 | return -ENOMEM; |
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | static int __devexit pata_imx_remove(struct platform_device *pdev) | 170 | static int pata_imx_remove(struct platform_device *pdev) |
| 171 | { | 171 | { |
| 172 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | 172 | struct ata_host *host = dev_get_drvdata(&pdev->dev); |
| 173 | struct pata_imx_priv *priv = host->private_data; | 173 | struct pata_imx_priv *priv = host->private_data; |
| @@ -225,7 +225,7 @@ static const struct dev_pm_ops pata_imx_pm_ops = { | |||
| 225 | 225 | ||
| 226 | static struct platform_driver pata_imx_driver = { | 226 | static struct platform_driver pata_imx_driver = { |
| 227 | .probe = pata_imx_probe, | 227 | .probe = pata_imx_probe, |
| 228 | .remove = __devexit_p(pata_imx_remove), | 228 | .remove = pata_imx_remove, |
| 229 | .driver = { | 229 | .driver = { |
| 230 | .name = DRV_NAME, | 230 | .name = DRV_NAME, |
| 231 | .owner = THIS_MODULE, | 231 | .owner = THIS_MODULE, |
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c index 0566e67b5e12..dcc6b243e525 100644 --- a/drivers/ata/pata_ixp4xx_cf.c +++ b/drivers/ata/pata_ixp4xx_cf.c | |||
| @@ -137,7 +137,7 @@ static void ixp4xx_setup_port(struct ata_port *ap, | |||
| 137 | ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", raw_cmd, raw_ctl); | 137 | ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", raw_cmd, raw_ctl); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | static __devinit int ixp4xx_pata_probe(struct platform_device *pdev) | 140 | static int ixp4xx_pata_probe(struct platform_device *pdev) |
| 141 | { | 141 | { |
| 142 | unsigned int irq; | 142 | unsigned int irq; |
| 143 | struct resource *cs0, *cs1; | 143 | struct resource *cs0, *cs1; |
diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c index b057e3fa44bc..e5725edcf515 100644 --- a/drivers/ata/pata_macio.c +++ b/drivers/ata/pata_macio.c | |||
| @@ -935,7 +935,7 @@ static struct ata_port_operations pata_macio_ops = { | |||
| 935 | .sff_irq_clear = pata_macio_irq_clear, | 935 | .sff_irq_clear = pata_macio_irq_clear, |
| 936 | }; | 936 | }; |
| 937 | 937 | ||
| 938 | static void __devinit pata_macio_invariants(struct pata_macio_priv *priv) | 938 | static void pata_macio_invariants(struct pata_macio_priv *priv) |
| 939 | { | 939 | { |
| 940 | const int *bidp; | 940 | const int *bidp; |
| 941 | 941 | ||
| @@ -976,9 +976,8 @@ static void __devinit pata_macio_invariants(struct pata_macio_priv *priv) | |||
| 976 | priv->aapl_bus_id = 1; | 976 | priv->aapl_bus_id = 1; |
| 977 | } | 977 | } |
| 978 | 978 | ||
| 979 | static void __devinit pata_macio_setup_ios(struct ata_ioports *ioaddr, | 979 | static void pata_macio_setup_ios(struct ata_ioports *ioaddr, |
| 980 | void __iomem * base, | 980 | void __iomem * base, void __iomem * dma) |
| 981 | void __iomem * dma) | ||
| 982 | { | 981 | { |
| 983 | /* cmd_addr is the base of regs for that port */ | 982 | /* cmd_addr is the base of regs for that port */ |
| 984 | ioaddr->cmd_addr = base; | 983 | ioaddr->cmd_addr = base; |
| @@ -999,8 +998,8 @@ static void __devinit pata_macio_setup_ios(struct ata_ioports *ioaddr, | |||
| 999 | ioaddr->bmdma_addr = dma; | 998 | ioaddr->bmdma_addr = dma; |
| 1000 | } | 999 | } |
| 1001 | 1000 | ||
| 1002 | static void __devinit pmac_macio_calc_timing_masks(struct pata_macio_priv *priv, | 1001 | static void pmac_macio_calc_timing_masks(struct pata_macio_priv *priv, |
| 1003 | struct ata_port_info *pinfo) | 1002 | struct ata_port_info *pinfo) |
| 1004 | { | 1003 | { |
| 1005 | int i = 0; | 1004 | int i = 0; |
| 1006 | 1005 | ||
| @@ -1027,11 +1026,11 @@ static void __devinit pmac_macio_calc_timing_masks(struct pata_macio_priv *priv, | |||
| 1027 | pinfo->pio_mask, pinfo->mwdma_mask, pinfo->udma_mask); | 1026 | pinfo->pio_mask, pinfo->mwdma_mask, pinfo->udma_mask); |
| 1028 | } | 1027 | } |
| 1029 | 1028 | ||
| 1030 | static int __devinit pata_macio_common_init(struct pata_macio_priv *priv, | 1029 | static int pata_macio_common_init(struct pata_macio_priv *priv, |
| 1031 | resource_size_t tfregs, | 1030 | resource_size_t tfregs, |
| 1032 | resource_size_t dmaregs, | 1031 | resource_size_t dmaregs, |
| 1033 | resource_size_t fcregs, | 1032 | resource_size_t fcregs, |
| 1034 | unsigned long irq) | 1033 | unsigned long irq) |
| 1035 | { | 1034 | { |
| 1036 | struct ata_port_info pinfo; | 1035 | struct ata_port_info pinfo; |
| 1037 | const struct ata_port_info *ppi[] = { &pinfo, NULL }; | 1036 | const struct ata_port_info *ppi[] = { &pinfo, NULL }; |
| @@ -1113,8 +1112,8 @@ static int __devinit pata_macio_common_init(struct pata_macio_priv *priv, | |||
| 1113 | &pata_macio_sht); | 1112 | &pata_macio_sht); |
| 1114 | } | 1113 | } |
| 1115 | 1114 | ||
| 1116 | static int __devinit pata_macio_attach(struct macio_dev *mdev, | 1115 | static int pata_macio_attach(struct macio_dev *mdev, |
| 1117 | const struct of_device_id *match) | 1116 | const struct of_device_id *match) |
| 1118 | { | 1117 | { |
| 1119 | struct pata_macio_priv *priv; | 1118 | struct pata_macio_priv *priv; |
| 1120 | resource_size_t tfregs, dmaregs = 0; | 1119 | resource_size_t tfregs, dmaregs = 0; |
| @@ -1190,7 +1189,7 @@ static int __devinit pata_macio_attach(struct macio_dev *mdev, | |||
| 1190 | return rc; | 1189 | return rc; |
| 1191 | } | 1190 | } |
| 1192 | 1191 | ||
| 1193 | static int __devexit pata_macio_detach(struct macio_dev *mdev) | 1192 | static int pata_macio_detach(struct macio_dev *mdev) |
| 1194 | { | 1193 | { |
| 1195 | struct ata_host *host = macio_get_drvdata(mdev); | 1194 | struct ata_host *host = macio_get_drvdata(mdev); |
| 1196 | struct pata_macio_priv *priv = host->private_data; | 1195 | struct pata_macio_priv *priv = host->private_data; |
| @@ -1257,8 +1256,8 @@ static void pata_macio_mb_event(struct macio_dev* mdev, int mb_state) | |||
| 1257 | #endif /* CONFIG_PMAC_MEDIABAY */ | 1256 | #endif /* CONFIG_PMAC_MEDIABAY */ |
| 1258 | 1257 | ||
| 1259 | 1258 | ||
| 1260 | static int __devinit pata_macio_pci_attach(struct pci_dev *pdev, | 1259 | static int pata_macio_pci_attach(struct pci_dev *pdev, |
| 1261 | const struct pci_device_id *id) | 1260 | const struct pci_device_id *id) |
| 1262 | { | 1261 | { |
| 1263 | struct pata_macio_priv *priv; | 1262 | struct pata_macio_priv *priv; |
| 1264 | struct device_node *np; | 1263 | struct device_node *np; |
| @@ -1310,7 +1309,7 @@ static int __devinit pata_macio_pci_attach(struct pci_dev *pdev, | |||
| 1310 | return 0; | 1309 | return 0; |
| 1311 | } | 1310 | } |
| 1312 | 1311 | ||
| 1313 | static void __devexit pata_macio_pci_detach(struct pci_dev *pdev) | 1312 | static void pata_macio_pci_detach(struct pci_dev *pdev) |
| 1314 | { | 1313 | { |
| 1315 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | 1314 | struct ata_host *host = dev_get_drvdata(&pdev->dev); |
| 1316 | 1315 | ||
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c index ec67f54dc56f..652f57e83484 100644 --- a/drivers/ata/pata_mpc52xx.c +++ b/drivers/ata/pata_mpc52xx.c | |||
| @@ -621,9 +621,10 @@ static struct ata_port_operations mpc52xx_ata_port_ops = { | |||
| 621 | .qc_prep = ata_noop_qc_prep, | 621 | .qc_prep = ata_noop_qc_prep, |
| 622 | }; | 622 | }; |
| 623 | 623 | ||
| 624 | static int __devinit | 624 | static int mpc52xx_ata_init_one(struct device *dev, |
| 625 | mpc52xx_ata_init_one(struct device *dev, struct mpc52xx_ata_priv *priv, | 625 | struct mpc52xx_ata_priv *priv, |
| 626 | unsigned long raw_ata_regs, int mwdma_mask, int udma_mask) | 626 | unsigned long raw_ata_regs, |
| 627 | int mwdma_mask, int udma_mask) | ||
| 627 | { | 628 | { |
| 628 | struct ata_host *host; | 629 | struct ata_host *host; |
| 629 | struct ata_port *ap; | 630 | struct ata_port *ap; |
| @@ -667,8 +668,7 @@ mpc52xx_ata_init_one(struct device *dev, struct mpc52xx_ata_priv *priv, | |||
| 667 | /* OF Platform driver */ | 668 | /* OF Platform driver */ |
| 668 | /* ======================================================================== */ | 669 | /* ======================================================================== */ |
| 669 | 670 | ||
| 670 | static int __devinit | 671 | static int mpc52xx_ata_probe(struct platform_device *op) |
| 671 | mpc52xx_ata_probe(struct platform_device *op) | ||
| 672 | { | 672 | { |
| 673 | unsigned int ipb_freq; | 673 | unsigned int ipb_freq; |
| 674 | struct resource res_mem; | 674 | struct resource res_mem; |
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c index 4e1194b4c271..ff2e57f3b597 100644 --- a/drivers/ata/pata_octeon_cf.c +++ b/drivers/ata/pata_octeon_cf.c | |||
| @@ -840,7 +840,7 @@ static struct ata_port_operations octeon_cf_ops = { | |||
| 840 | .dev_config = octeon_cf_dev_config, | 840 | .dev_config = octeon_cf_dev_config, |
| 841 | }; | 841 | }; |
| 842 | 842 | ||
| 843 | static int __devinit octeon_cf_probe(struct platform_device *pdev) | 843 | static int octeon_cf_probe(struct platform_device *pdev) |
| 844 | { | 844 | { |
| 845 | struct resource *res_cs0, *res_cs1; | 845 | struct resource *res_cs0, *res_cs1; |
| 846 | 846 | ||
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c index e5b234c370fa..a7e95a54c782 100644 --- a/drivers/ata/pata_of_platform.c +++ b/drivers/ata/pata_of_platform.c | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | #include <linux/ata_platform.h> | 16 | #include <linux/ata_platform.h> |
| 17 | #include <linux/libata.h> | 17 | #include <linux/libata.h> |
| 18 | 18 | ||
| 19 | static int __devinit pata_of_platform_probe(struct platform_device *ofdev) | 19 | static int pata_of_platform_probe(struct platform_device *ofdev) |
| 20 | { | 20 | { |
| 21 | int ret; | 21 | int ret; |
| 22 | struct device_node *dn = ofdev->dev.of_node; | 22 | struct device_node *dn = ofdev->dev.of_node; |
diff --git a/drivers/ata/pata_palmld.c b/drivers/ata/pata_palmld.c index f9f79fc04a8f..df2bb7504fc8 100644 --- a/drivers/ata/pata_palmld.c +++ b/drivers/ata/pata_palmld.c | |||
| @@ -48,7 +48,7 @@ static struct ata_port_operations palmld_port_ops = { | |||
| 48 | .cable_detect = ata_cable_40wire, | 48 | .cable_detect = ata_cable_40wire, |
| 49 | }; | 49 | }; |
| 50 | 50 | ||
| 51 | static __devinit int palmld_pata_probe(struct platform_device *pdev) | 51 | static int palmld_pata_probe(struct platform_device *pdev) |
| 52 | { | 52 | { |
| 53 | struct ata_host *host; | 53 | struct ata_host *host; |
| 54 | struct ata_port *ap; | 54 | struct ata_port *ap; |
| @@ -109,7 +109,7 @@ err1: | |||
| 109 | return ret; | 109 | return ret; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | static __devexit int palmld_pata_remove(struct platform_device *dev) | 112 | static int palmld_pata_remove(struct platform_device *dev) |
| 113 | { | 113 | { |
| 114 | ata_platform_remove_one(dev); | 114 | ata_platform_remove_one(dev); |
| 115 | 115 | ||
| @@ -127,7 +127,7 @@ static struct platform_driver palmld_pata_platform_driver = { | |||
| 127 | .owner = THIS_MODULE, | 127 | .owner = THIS_MODULE, |
| 128 | }, | 128 | }, |
| 129 | .probe = palmld_pata_probe, | 129 | .probe = palmld_pata_probe, |
| 130 | .remove = __devexit_p(palmld_pata_remove), | 130 | .remove = palmld_pata_remove, |
| 131 | }; | 131 | }; |
| 132 | 132 | ||
| 133 | module_platform_driver(palmld_pata_platform_driver); | 133 | module_platform_driver(palmld_pata_platform_driver); |
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c index c9399c8688c5..3f94a886bb35 100644 --- a/drivers/ata/pata_pdc2027x.c +++ b/drivers/ata/pata_pdc2027x.c | |||
| @@ -700,7 +700,8 @@ static void pdc_ata_setup_port(struct ata_ioports *port, void __iomem *base) | |||
| 700 | * @pdev: instance of pci_dev found | 700 | * @pdev: instance of pci_dev found |
| 701 | * @ent: matching entry in the id_tbl[] | 701 | * @ent: matching entry in the id_tbl[] |
| 702 | */ | 702 | */ |
| 703 | static int __devinit pdc2027x_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | 703 | static int pdc2027x_init_one(struct pci_dev *pdev, |
| 704 | const struct pci_device_id *ent) | ||
| 704 | { | 705 | { |
| 705 | static const unsigned long cmd_offset[] = { 0x17c0, 0x15c0 }; | 706 | static const unsigned long cmd_offset[] = { 0x17c0, 0x15c0 }; |
| 706 | static const unsigned long bmdma_offset[] = { 0x1000, 0x1008 }; | 707 | static const unsigned long bmdma_offset[] = { 0x1000, 0x1008 }; |
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c index f4372d0c7ce6..71e093767f4e 100644 --- a/drivers/ata/pata_platform.c +++ b/drivers/ata/pata_platform.c | |||
| @@ -98,12 +98,9 @@ static void pata_platform_setup_port(struct ata_ioports *ioaddr, | |||
| 98 | * | 98 | * |
| 99 | * If no IRQ resource is present, PIO polling mode is used instead. | 99 | * If no IRQ resource is present, PIO polling mode is used instead. |
| 100 | */ | 100 | */ |
| 101 | int __devinit __pata_platform_probe(struct device *dev, | 101 | int __pata_platform_probe(struct device *dev, struct resource *io_res, |
| 102 | struct resource *io_res, | 102 | struct resource *ctl_res, struct resource *irq_res, |
| 103 | struct resource *ctl_res, | 103 | unsigned int ioport_shift, int __pio_mask) |
| 104 | struct resource *irq_res, | ||
| 105 | unsigned int ioport_shift, | ||
| 106 | int __pio_mask) | ||
| 107 | { | 104 | { |
| 108 | struct ata_host *host; | 105 | struct ata_host *host; |
| 109 | struct ata_port *ap; | 106 | struct ata_port *ap; |
| @@ -178,7 +175,7 @@ int __devinit __pata_platform_probe(struct device *dev, | |||
| 178 | } | 175 | } |
| 179 | EXPORT_SYMBOL_GPL(__pata_platform_probe); | 176 | EXPORT_SYMBOL_GPL(__pata_platform_probe); |
| 180 | 177 | ||
| 181 | static int __devinit pata_platform_probe(struct platform_device *pdev) | 178 | static int pata_platform_probe(struct platform_device *pdev) |
| 182 | { | 179 | { |
| 183 | struct resource *io_res; | 180 | struct resource *io_res; |
| 184 | struct resource *ctl_res; | 181 | struct resource *ctl_res; |
diff --git a/drivers/ata/pata_pxa.c b/drivers/ata/pata_pxa.c index 4b8ba559fe24..b0ac9e0c5e01 100644 --- a/drivers/ata/pata_pxa.c +++ b/drivers/ata/pata_pxa.c | |||
| @@ -229,7 +229,7 @@ static void pxa_ata_dma_irq(int dma, void *port) | |||
| 229 | complete(&pd->dma_done); | 229 | complete(&pd->dma_done); |
| 230 | } | 230 | } |
| 231 | 231 | ||
| 232 | static int __devinit pxa_ata_probe(struct platform_device *pdev) | 232 | static int pxa_ata_probe(struct platform_device *pdev) |
| 233 | { | 233 | { |
| 234 | struct ata_host *host; | 234 | struct ata_host *host; |
| 235 | struct ata_port *ap; | 235 | struct ata_port *ap; |
| @@ -369,7 +369,7 @@ static int __devinit pxa_ata_probe(struct platform_device *pdev) | |||
| 369 | return ret; | 369 | return ret; |
| 370 | } | 370 | } |
| 371 | 371 | ||
| 372 | static int __devexit pxa_ata_remove(struct platform_device *pdev) | 372 | static int pxa_ata_remove(struct platform_device *pdev) |
| 373 | { | 373 | { |
| 374 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | 374 | struct ata_host *host = dev_get_drvdata(&pdev->dev); |
| 375 | struct pata_pxa_data *data = host->ports[0]->private_data; | 375 | struct pata_pxa_data *data = host->ports[0]->private_data; |
| @@ -383,7 +383,7 @@ static int __devexit pxa_ata_remove(struct platform_device *pdev) | |||
| 383 | 383 | ||
| 384 | static struct platform_driver pxa_ata_driver = { | 384 | static struct platform_driver pxa_ata_driver = { |
| 385 | .probe = pxa_ata_probe, | 385 | .probe = pxa_ata_probe, |
| 386 | .remove = __devexit_p(pxa_ata_remove), | 386 | .remove = pxa_ata_remove, |
| 387 | .driver = { | 387 | .driver = { |
| 388 | .name = DRV_NAME, | 388 | .name = DRV_NAME, |
| 389 | .owner = THIS_MODULE, | 389 | .owner = THIS_MODULE, |
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c index 9417101bd5ca..3c5eb8fa6bd1 100644 --- a/drivers/ata/pata_rb532_cf.c +++ b/drivers/ata/pata_rb532_cf.c | |||
| @@ -102,7 +102,7 @@ static void rb532_pata_setup_ports(struct ata_host *ah) | |||
| 102 | ap->ioaddr.error_addr = info->iobase + RB500_CF_REG_ERR; | 102 | ap->ioaddr.error_addr = info->iobase + RB500_CF_REG_ERR; |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | static __devinit int rb532_pata_driver_probe(struct platform_device *pdev) | 105 | static int rb532_pata_driver_probe(struct platform_device *pdev) |
| 106 | { | 106 | { |
| 107 | int irq; | 107 | int irq; |
| 108 | int gpio; | 108 | int gpio; |
| @@ -177,7 +177,7 @@ err_free_gpio: | |||
| 177 | return ret; | 177 | return ret; |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | static __devexit int rb532_pata_driver_remove(struct platform_device *pdev) | 180 | static int rb532_pata_driver_remove(struct platform_device *pdev) |
| 181 | { | 181 | { |
| 182 | struct ata_host *ah = platform_get_drvdata(pdev); | 182 | struct ata_host *ah = platform_get_drvdata(pdev); |
| 183 | struct rb532_cf_info *info = ah->private_data; | 183 | struct rb532_cf_info *info = ah->private_data; |
| @@ -190,7 +190,7 @@ static __devexit int rb532_pata_driver_remove(struct platform_device *pdev) | |||
| 190 | 190 | ||
| 191 | static struct platform_driver rb532_pata_platform_driver = { | 191 | static struct platform_driver rb532_pata_platform_driver = { |
| 192 | .probe = rb532_pata_driver_probe, | 192 | .probe = rb532_pata_driver_probe, |
| 193 | .remove = __devexit_p(rb532_pata_driver_remove), | 193 | .remove = rb532_pata_driver_remove, |
| 194 | .driver = { | 194 | .driver = { |
| 195 | .name = DRV_NAME, | 195 | .name = DRV_NAME, |
| 196 | .owner = THIS_MODULE, | 196 | .owner = THIS_MODULE, |
diff --git a/drivers/ata/pata_rdc.c b/drivers/ata/pata_rdc.c index e71f998dd90d..6a8665574fee 100644 --- a/drivers/ata/pata_rdc.c +++ b/drivers/ata/pata_rdc.c | |||
| @@ -321,8 +321,7 @@ static struct scsi_host_template rdc_sht = { | |||
| 321 | * Zero on success, or -ERRNO value. | 321 | * Zero on success, or -ERRNO value. |
| 322 | */ | 322 | */ |
| 323 | 323 | ||
| 324 | static int __devinit rdc_init_one(struct pci_dev *pdev, | 324 | static int rdc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 325 | const struct pci_device_id *ent) | ||
| 326 | { | 325 | { |
| 327 | struct device *dev = &pdev->dev; | 326 | struct device *dev = &pdev->dev; |
| 328 | struct ata_port_info port_info[2]; | 327 | struct ata_port_info port_info[2]; |
diff --git a/drivers/ata/pata_sch.c b/drivers/ata/pata_sch.c index db0d18cf1c2a..d3830c45a369 100644 --- a/drivers/ata/pata_sch.c +++ b/drivers/ata/pata_sch.c | |||
| @@ -169,8 +169,7 @@ static void sch_set_dmamode(struct ata_port *ap, struct ata_device *adev) | |||
| 169 | * Zero on success, or -ERRNO value. | 169 | * Zero on success, or -ERRNO value. |
| 170 | */ | 170 | */ |
| 171 | 171 | ||
| 172 | static int __devinit sch_init_one(struct pci_dev *pdev, | 172 | static int sch_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 173 | const struct pci_device_id *ent) | ||
| 174 | { | 173 | { |
| 175 | const struct ata_port_info *ppi[] = { &sch_port_info, NULL }; | 174 | const struct ata_port_info *ppi[] = { &sch_port_info, NULL }; |
| 176 | 175 | ||
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index 5cfdf94823d0..64c5f0d0f812 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c | |||
| @@ -323,8 +323,7 @@ static u8 sil680_init_chip(struct pci_dev *pdev, int *try_mmio) | |||
| 323 | return tmpbyte & 0x30; | 323 | return tmpbyte & 0x30; |
| 324 | } | 324 | } |
| 325 | 325 | ||
| 326 | static int __devinit sil680_init_one(struct pci_dev *pdev, | 326 | static int sil680_init_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 327 | const struct pci_device_id *id) | ||
| 328 | { | 327 | { |
| 329 | static const struct ata_port_info info = { | 328 | static const struct ata_port_info info = { |
| 330 | .flags = ATA_FLAG_SLAVE_POSS, | 329 | .flags = ATA_FLAG_SLAVE_POSS, |
diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c index dc7d78eecb19..5dba77ccaa0b 100644 --- a/drivers/ata/sata_highbank.c +++ b/drivers/ata/sata_highbank.c | |||
| @@ -260,7 +260,7 @@ static const struct of_device_id ahci_of_match[] = { | |||
| 260 | }; | 260 | }; |
| 261 | MODULE_DEVICE_TABLE(of, ahci_of_match); | 261 | MODULE_DEVICE_TABLE(of, ahci_of_match); |
| 262 | 262 | ||
| 263 | static int __devinit ahci_highbank_probe(struct platform_device *pdev) | 263 | static int ahci_highbank_probe(struct platform_device *pdev) |
| 264 | { | 264 | { |
| 265 | struct device *dev = &pdev->dev; | 265 | struct device *dev = &pdev->dev; |
| 266 | struct ahci_host_priv *hpriv; | 266 | struct ahci_host_priv *hpriv; |
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 68f4fb54d627..35c6b6d09c27 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
| @@ -4148,7 +4148,7 @@ err: | |||
| 4148 | * A platform bus SATA device has been unplugged. Perform the needed | 4148 | * A platform bus SATA device has been unplugged. Perform the needed |
| 4149 | * cleanup. Also called on module unload for any active devices. | 4149 | * cleanup. Also called on module unload for any active devices. |
| 4150 | */ | 4150 | */ |
| 4151 | static int __devexit mv_platform_remove(struct platform_device *pdev) | 4151 | static int mv_platform_remove(struct platform_device *pdev) |
| 4152 | { | 4152 | { |
| 4153 | struct ata_host *host = platform_get_drvdata(pdev); | 4153 | struct ata_host *host = platform_get_drvdata(pdev); |
| 4154 | #if defined(CONFIG_HAVE_CLK) | 4154 | #if defined(CONFIG_HAVE_CLK) |
| @@ -4215,7 +4215,7 @@ static int mv_platform_resume(struct platform_device *pdev) | |||
| 4215 | #endif | 4215 | #endif |
| 4216 | 4216 | ||
| 4217 | #ifdef CONFIG_OF | 4217 | #ifdef CONFIG_OF |
| 4218 | static struct of_device_id mv_sata_dt_ids[] __devinitdata = { | 4218 | static struct of_device_id mv_sata_dt_ids[] = { |
| 4219 | { .compatible = "marvell,orion-sata", }, | 4219 | { .compatible = "marvell,orion-sata", }, |
| 4220 | {}, | 4220 | {}, |
| 4221 | }; | 4221 | }; |
| @@ -4224,7 +4224,7 @@ MODULE_DEVICE_TABLE(of, mv_sata_dt_ids); | |||
| 4224 | 4224 | ||
| 4225 | static struct platform_driver mv_platform_driver = { | 4225 | static struct platform_driver mv_platform_driver = { |
| 4226 | .probe = mv_platform_probe, | 4226 | .probe = mv_platform_probe, |
| 4227 | .remove = __devexit_p(mv_platform_remove), | 4227 | .remove = mv_platform_remove, |
| 4228 | .suspend = mv_platform_suspend, | 4228 | .suspend = mv_platform_suspend, |
| 4229 | .resume = mv_platform_resume, | 4229 | .resume = mv_platform_resume, |
| 4230 | .driver = { | 4230 | .driver = { |
| @@ -4429,7 +4429,7 @@ static int mv_pci_device_resume(struct pci_dev *pdev) | |||
| 4429 | #endif | 4429 | #endif |
| 4430 | 4430 | ||
| 4431 | static int mv_platform_probe(struct platform_device *pdev); | 4431 | static int mv_platform_probe(struct platform_device *pdev); |
| 4432 | static int __devexit mv_platform_remove(struct platform_device *pdev); | 4432 | static int mv_platform_remove(struct platform_device *pdev); |
| 4433 | 4433 | ||
| 4434 | static int __init mv_init(void) | 4434 | static int __init mv_init(void) |
| 4435 | { | 4435 | { |
diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c index e8cf88ba145d..44f304b3de63 100644 --- a/drivers/ata/sata_vsc.c +++ b/drivers/ata/sata_vsc.c | |||
| @@ -312,8 +312,7 @@ static struct ata_port_operations vsc_sata_ops = { | |||
| 312 | .scr_write = vsc_sata_scr_write, | 312 | .scr_write = vsc_sata_scr_write, |
| 313 | }; | 313 | }; |
| 314 | 314 | ||
| 315 | static void __devinit vsc_sata_setup_port(struct ata_ioports *port, | 315 | static void vsc_sata_setup_port(struct ata_ioports *port, void __iomem *base) |
| 316 | void __iomem *base) | ||
| 317 | { | 316 | { |
| 318 | port->cmd_addr = base + VSC_SATA_TF_CMD_OFFSET; | 317 | port->cmd_addr = base + VSC_SATA_TF_CMD_OFFSET; |
| 319 | port->data_addr = base + VSC_SATA_TF_DATA_OFFSET; | 318 | port->data_addr = base + VSC_SATA_TF_DATA_OFFSET; |
| @@ -335,8 +334,8 @@ static void __devinit vsc_sata_setup_port(struct ata_ioports *port, | |||
| 335 | } | 334 | } |
| 336 | 335 | ||
| 337 | 336 | ||
| 338 | static int __devinit vsc_sata_init_one(struct pci_dev *pdev, | 337 | static int vsc_sata_init_one(struct pci_dev *pdev, |
| 339 | const struct pci_device_id *ent) | 338 | const struct pci_device_id *ent) |
| 340 | { | 339 | { |
| 341 | static const struct ata_port_info pi = { | 340 | static const struct ata_port_info pi = { |
| 342 | .flags = ATA_FLAG_SATA, | 341 | .flags = ATA_FLAG_SATA, |
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index ff7bb8a42ed6..77a7480dc4d1 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c | |||
| @@ -1507,9 +1507,9 @@ static void do_housekeeping (unsigned long arg) { | |||
| 1507 | 1507 | ||
| 1508 | /********** creation of communication queues **********/ | 1508 | /********** creation of communication queues **********/ |
| 1509 | 1509 | ||
| 1510 | static int __devinit create_queues (amb_dev * dev, unsigned int cmds, | 1510 | static int create_queues(amb_dev *dev, unsigned int cmds, unsigned int txs, |
| 1511 | unsigned int txs, unsigned int * rxs, | 1511 | unsigned int *rxs, unsigned int *rx_buffer_sizes) |
| 1512 | unsigned int * rx_buffer_sizes) { | 1512 | { |
| 1513 | unsigned char pool; | 1513 | unsigned char pool; |
| 1514 | size_t total = 0; | 1514 | size_t total = 0; |
| 1515 | void * memory; | 1515 | void * memory; |
| @@ -1737,8 +1737,9 @@ static int decode_loader_result (loader_command cmd, u32 result) | |||
| 1737 | return res; | 1737 | return res; |
| 1738 | } | 1738 | } |
| 1739 | 1739 | ||
| 1740 | static int __devinit do_loader_command (volatile loader_block * lb, | 1740 | static int do_loader_command(volatile loader_block *lb, const amb_dev *dev, |
| 1741 | const amb_dev * dev, loader_command cmd) { | 1741 | loader_command cmd) |
| 1742 | { | ||
| 1742 | 1743 | ||
| 1743 | unsigned long timeout; | 1744 | unsigned long timeout; |
| 1744 | 1745 | ||
| @@ -1793,8 +1794,9 @@ static int __devinit do_loader_command (volatile loader_block * lb, | |||
| 1793 | 1794 | ||
| 1794 | /* loader: determine loader version */ | 1795 | /* loader: determine loader version */ |
| 1795 | 1796 | ||
| 1796 | static int __devinit get_loader_version (loader_block * lb, | 1797 | static int get_loader_version(loader_block *lb, const amb_dev *dev, |
| 1797 | const amb_dev * dev, u32 * version) { | 1798 | u32 *version) |
| 1799 | { | ||
| 1798 | int res; | 1800 | int res; |
| 1799 | 1801 | ||
| 1800 | PRINTD (DBG_FLOW|DBG_LOAD, "get_loader_version"); | 1802 | PRINTD (DBG_FLOW|DBG_LOAD, "get_loader_version"); |
| @@ -1809,9 +1811,9 @@ static int __devinit get_loader_version (loader_block * lb, | |||
| 1809 | 1811 | ||
| 1810 | /* loader: write memory data blocks */ | 1812 | /* loader: write memory data blocks */ |
| 1811 | 1813 | ||
| 1812 | static int __devinit loader_write (loader_block* lb, | 1814 | static int loader_write(loader_block *lb, const amb_dev *dev, |
| 1813 | const amb_dev *dev, | 1815 | const struct ihex_binrec *rec) |
| 1814 | const struct ihex_binrec *rec) { | 1816 | { |
| 1815 | transfer_block * tb = &lb->payload.transfer; | 1817 | transfer_block * tb = &lb->payload.transfer; |
| 1816 | 1818 | ||
| 1817 | PRINTD (DBG_FLOW|DBG_LOAD, "loader_write"); | 1819 | PRINTD (DBG_FLOW|DBG_LOAD, "loader_write"); |
| @@ -1824,9 +1826,9 @@ static int __devinit loader_write (loader_block* lb, | |||
| 1824 | 1826 | ||
| 1825 | /* loader: verify memory data blocks */ | 1827 | /* loader: verify memory data blocks */ |
| 1826 | 1828 | ||
| 1827 | static int __devinit loader_verify (loader_block * lb, | 1829 | static int loader_verify(loader_block *lb, const amb_dev *dev, |
| 1828 | const amb_dev *dev, | 1830 | const struct ihex_binrec *rec) |
| 1829 | const struct ihex_binrec *rec) { | 1831 | { |
| 1830 | transfer_block * tb = &lb->payload.transfer; | 1832 | transfer_block * tb = &lb->payload.transfer; |
| 1831 | int res; | 1833 | int res; |
| 1832 | 1834 | ||
| @@ -1842,8 +1844,8 @@ static int __devinit loader_verify (loader_block * lb, | |||
| 1842 | 1844 | ||
| 1843 | /* loader: start microcode */ | 1845 | /* loader: start microcode */ |
| 1844 | 1846 | ||
| 1845 | static int __devinit loader_start (loader_block * lb, | 1847 | static int loader_start(loader_block *lb, const amb_dev *dev, u32 address) |
| 1846 | const amb_dev * dev, u32 address) { | 1848 | { |
| 1847 | PRINTD (DBG_FLOW|DBG_LOAD, "loader_start"); | 1849 | PRINTD (DBG_FLOW|DBG_LOAD, "loader_start"); |
| 1848 | 1850 | ||
| 1849 | lb->payload.start = cpu_to_be32 (address); | 1851 | lb->payload.start = cpu_to_be32 (address); |
| @@ -1918,7 +1920,8 @@ static int amb_reset (amb_dev * dev, int diags) { | |||
| 1918 | 1920 | ||
| 1919 | /********** transfer and start the microcode **********/ | 1921 | /********** transfer and start the microcode **********/ |
| 1920 | 1922 | ||
| 1921 | static int __devinit ucode_init (loader_block * lb, amb_dev * dev) { | 1923 | static int ucode_init(loader_block *lb, amb_dev *dev) |
| 1924 | { | ||
| 1922 | const struct firmware *fw; | 1925 | const struct firmware *fw; |
| 1923 | unsigned long start_address; | 1926 | unsigned long start_address; |
| 1924 | const struct ihex_binrec *rec; | 1927 | const struct ihex_binrec *rec; |
| @@ -1980,7 +1983,8 @@ static inline __be32 bus_addr(void * addr) { | |||
| 1980 | return cpu_to_be32 (virt_to_bus (addr)); | 1983 | return cpu_to_be32 (virt_to_bus (addr)); |
| 1981 | } | 1984 | } |
| 1982 | 1985 | ||
| 1983 | static int __devinit amb_talk (amb_dev * dev) { | 1986 | static int amb_talk(amb_dev *dev) |
| 1987 | { | ||
| 1984 | adap_talk_block a; | 1988 | adap_talk_block a; |
| 1985 | unsigned char pool; | 1989 | unsigned char pool; |
| 1986 | unsigned long timeout; | 1990 | unsigned long timeout; |
| @@ -2027,7 +2031,8 @@ static int __devinit amb_talk (amb_dev * dev) { | |||
| 2027 | } | 2031 | } |
| 2028 | 2032 | ||
| 2029 | // get microcode version | 2033 | // get microcode version |
| 2030 | static void __devinit amb_ucode_version (amb_dev * dev) { | 2034 | static void amb_ucode_version(amb_dev *dev) |
| 2035 | { | ||
| 2031 | u32 major; | 2036 | u32 major; |
| 2032 | u32 minor; | 2037 | u32 minor; |
| 2033 | command cmd; | 2038 | command cmd; |
| @@ -2042,7 +2047,8 @@ static void __devinit amb_ucode_version (amb_dev * dev) { | |||
| 2042 | } | 2047 | } |
| 2043 | 2048 | ||
| 2044 | // get end station address | 2049 | // get end station address |
| 2045 | static void __devinit amb_esi (amb_dev * dev, u8 * esi) { | 2050 | static void amb_esi(amb_dev *dev, u8 *esi) |
| 2051 | { | ||
| 2046 | u32 lower4; | 2052 | u32 lower4; |
| 2047 | u16 upper2; | 2053 | u16 upper2; |
| 2048 | command cmd; | 2054 | command cmd; |
| @@ -2088,7 +2094,7 @@ static void fixup_plx_window (amb_dev *dev, loader_block *lb) | |||
| 2088 | return; | 2094 | return; |
| 2089 | } | 2095 | } |
| 2090 | 2096 | ||
| 2091 | static int __devinit amb_init (amb_dev * dev) | 2097 | static int amb_init(amb_dev *dev) |
| 2092 | { | 2098 | { |
| 2093 | loader_block lb; | 2099 | loader_block lb; |
| 2094 | 2100 | ||
| @@ -2184,7 +2190,8 @@ static void setup_pci_dev(struct pci_dev *pci_dev) | |||
| 2184 | } | 2190 | } |
| 2185 | } | 2191 | } |
| 2186 | 2192 | ||
| 2187 | static int __devinit amb_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) | 2193 | static int amb_probe(struct pci_dev *pci_dev, |
| 2194 | const struct pci_device_id *pci_ent) | ||
| 2188 | { | 2195 | { |
| 2189 | amb_dev * dev; | 2196 | amb_dev * dev; |
| 2190 | int err; | 2197 | int err; |
| @@ -2285,7 +2292,7 @@ out_disable: | |||
| 2285 | } | 2292 | } |
| 2286 | 2293 | ||
| 2287 | 2294 | ||
| 2288 | static void __devexit amb_remove_one(struct pci_dev *pci_dev) | 2295 | static void amb_remove_one(struct pci_dev *pci_dev) |
| 2289 | { | 2296 | { |
| 2290 | struct amb_dev *dev; | 2297 | struct amb_dev *dev; |
| 2291 | 2298 | ||
| @@ -2379,7 +2386,7 @@ MODULE_DEVICE_TABLE(pci, amb_pci_tbl); | |||
| 2379 | static struct pci_driver amb_driver = { | 2386 | static struct pci_driver amb_driver = { |
| 2380 | .name = "amb", | 2387 | .name = "amb", |
| 2381 | .probe = amb_probe, | 2388 | .probe = amb_probe, |
| 2382 | .remove = __devexit_p(amb_remove_one), | 2389 | .remove = amb_remove_one, |
| 2383 | .id_table = amb_pci_tbl, | 2390 | .id_table = amb_pci_tbl, |
| 2384 | }; | 2391 | }; |
| 2385 | 2392 | ||
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c index 81e44f7b0ab6..c1eb6fa8ac35 100644 --- a/drivers/atm/eni.c +++ b/drivers/atm/eni.c | |||
| @@ -1567,7 +1567,7 @@ tx_complete++; | |||
| 1567 | /*--------------------------------- entries ---------------------------------*/ | 1567 | /*--------------------------------- entries ---------------------------------*/ |
| 1568 | 1568 | ||
| 1569 | 1569 | ||
| 1570 | static char * const media_name[] __devinitconst = { | 1570 | static char * const media_name[] = { |
| 1571 | "MMF", "SMF", "MMF", "03?", /* 0- 3 */ | 1571 | "MMF", "SMF", "MMF", "03?", /* 0- 3 */ |
| 1572 | "UTP", "05?", "06?", "07?", /* 4- 7 */ | 1572 | "UTP", "05?", "06?", "07?", /* 4- 7 */ |
| 1573 | "TAXI","09?", "10?", "11?", /* 8-11 */ | 1573 | "TAXI","09?", "10?", "11?", /* 8-11 */ |
| @@ -1591,7 +1591,7 @@ static char * const media_name[] __devinitconst = { | |||
| 1591 | } }) | 1591 | } }) |
| 1592 | 1592 | ||
| 1593 | 1593 | ||
| 1594 | static int __devinit get_esi_asic(struct atm_dev *dev) | 1594 | static int get_esi_asic(struct atm_dev *dev) |
| 1595 | { | 1595 | { |
| 1596 | struct eni_dev *eni_dev; | 1596 | struct eni_dev *eni_dev; |
| 1597 | unsigned char tonga; | 1597 | unsigned char tonga; |
| @@ -1683,7 +1683,7 @@ static int __devinit get_esi_asic(struct atm_dev *dev) | |||
| 1683 | #undef GET_SEPROM | 1683 | #undef GET_SEPROM |
| 1684 | 1684 | ||
| 1685 | 1685 | ||
| 1686 | static int __devinit get_esi_fpga(struct atm_dev *dev, void __iomem *base) | 1686 | static int get_esi_fpga(struct atm_dev *dev, void __iomem *base) |
| 1687 | { | 1687 | { |
| 1688 | void __iomem *mac_base; | 1688 | void __iomem *mac_base; |
| 1689 | int i; | 1689 | int i; |
| @@ -1694,7 +1694,7 @@ static int __devinit get_esi_fpga(struct atm_dev *dev, void __iomem *base) | |||
| 1694 | } | 1694 | } |
| 1695 | 1695 | ||
| 1696 | 1696 | ||
| 1697 | static int __devinit eni_do_init(struct atm_dev *dev) | 1697 | static int eni_do_init(struct atm_dev *dev) |
| 1698 | { | 1698 | { |
| 1699 | struct midway_eprom __iomem *eprom; | 1699 | struct midway_eprom __iomem *eprom; |
| 1700 | struct eni_dev *eni_dev; | 1700 | struct eni_dev *eni_dev; |
| @@ -1797,7 +1797,7 @@ static void eni_do_release(struct atm_dev *dev) | |||
| 1797 | iounmap(ed->ioaddr); | 1797 | iounmap(ed->ioaddr); |
| 1798 | } | 1798 | } |
| 1799 | 1799 | ||
| 1800 | static int __devinit eni_start(struct atm_dev *dev) | 1800 | static int eni_start(struct atm_dev *dev) |
| 1801 | { | 1801 | { |
| 1802 | struct eni_dev *eni_dev; | 1802 | struct eni_dev *eni_dev; |
| 1803 | 1803 | ||
| @@ -2226,8 +2226,8 @@ static const struct atmdev_ops ops = { | |||
| 2226 | }; | 2226 | }; |
| 2227 | 2227 | ||
| 2228 | 2228 | ||
| 2229 | static int __devinit eni_init_one(struct pci_dev *pci_dev, | 2229 | static int eni_init_one(struct pci_dev *pci_dev, |
| 2230 | const struct pci_device_id *ent) | 2230 | const struct pci_device_id *ent) |
| 2231 | { | 2231 | { |
| 2232 | struct atm_dev *dev; | 2232 | struct atm_dev *dev; |
| 2233 | struct eni_dev *eni_dev; | 2233 | struct eni_dev *eni_dev; |
| @@ -2292,7 +2292,7 @@ static struct pci_device_id eni_pci_tbl[] = { | |||
| 2292 | MODULE_DEVICE_TABLE(pci,eni_pci_tbl); | 2292 | MODULE_DEVICE_TABLE(pci,eni_pci_tbl); |
| 2293 | 2293 | ||
| 2294 | 2294 | ||
| 2295 | static void __devexit eni_remove_one(struct pci_dev *pdev) | 2295 | static void eni_remove_one(struct pci_dev *pdev) |
| 2296 | { | 2296 | { |
| 2297 | struct atm_dev *dev = pci_get_drvdata(pdev); | 2297 | struct atm_dev *dev = pci_get_drvdata(pdev); |
| 2298 | struct eni_dev *ed = ENI_DEV(dev); | 2298 | struct eni_dev *ed = ENI_DEV(dev); |
| @@ -2310,7 +2310,7 @@ static struct pci_driver eni_driver = { | |||
| 2310 | .name = DEV_LABEL, | 2310 | .name = DEV_LABEL, |
| 2311 | .id_table = eni_pci_tbl, | 2311 | .id_table = eni_pci_tbl, |
| 2312 | .probe = eni_init_one, | 2312 | .probe = eni_init_one, |
| 2313 | .remove = __devexit_p(eni_remove_one), | 2313 | .remove = eni_remove_one, |
| 2314 | }; | 2314 | }; |
| 2315 | 2315 | ||
| 2316 | 2316 | ||
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 86fed1b91695..b41c9481b67b 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c | |||
| @@ -252,7 +252,7 @@ struct reginit_item { | |||
| 252 | }; | 252 | }; |
| 253 | 253 | ||
| 254 | 254 | ||
| 255 | static struct reginit_item PHY_NTC_INIT[] __devinitdata = { | 255 | static struct reginit_item PHY_NTC_INIT[] = { |
| 256 | { PHY_CLEARALL, 0x40 }, | 256 | { PHY_CLEARALL, 0x40 }, |
| 257 | { 0x12, 0x0001 }, | 257 | { 0x12, 0x0001 }, |
| 258 | { 0x13, 0x7605 }, | 258 | { 0x13, 0x7605 }, |
| @@ -1295,7 +1295,7 @@ static const struct atmdev_ops ops = { | |||
| 1295 | }; | 1295 | }; |
| 1296 | 1296 | ||
| 1297 | 1297 | ||
| 1298 | static void __devinit undocumented_pci_fix (struct pci_dev *pdev) | 1298 | static void undocumented_pci_fix(struct pci_dev *pdev) |
| 1299 | { | 1299 | { |
| 1300 | u32 tint; | 1300 | u32 tint; |
| 1301 | 1301 | ||
| @@ -1319,13 +1319,13 @@ static void __devinit undocumented_pci_fix (struct pci_dev *pdev) | |||
| 1319 | * PHY routines * | 1319 | * PHY routines * |
| 1320 | **************************************************************************/ | 1320 | **************************************************************************/ |
| 1321 | 1321 | ||
| 1322 | static void __devinit write_phy (struct fs_dev *dev, int regnum, int val) | 1322 | static void write_phy(struct fs_dev *dev, int regnum, int val) |
| 1323 | { | 1323 | { |
| 1324 | submit_command (dev, &dev->hp_txq, QE_CMD_PRP_WR | QE_CMD_IMM_INQ, | 1324 | submit_command (dev, &dev->hp_txq, QE_CMD_PRP_WR | QE_CMD_IMM_INQ, |
| 1325 | regnum, val, 0); | 1325 | regnum, val, 0); |
| 1326 | } | 1326 | } |
| 1327 | 1327 | ||
| 1328 | static int __devinit init_phy (struct fs_dev *dev, struct reginit_item *reginit) | 1328 | static int init_phy(struct fs_dev *dev, struct reginit_item *reginit) |
| 1329 | { | 1329 | { |
| 1330 | int i; | 1330 | int i; |
| 1331 | 1331 | ||
| @@ -1381,7 +1381,7 @@ static void reset_chip (struct fs_dev *dev) | |||
| 1381 | } | 1381 | } |
| 1382 | } | 1382 | } |
| 1383 | 1383 | ||
| 1384 | static void __devinit *aligned_kmalloc (int size, gfp_t flags, int alignment) | 1384 | static void *aligned_kmalloc(int size, gfp_t flags, int alignment) |
| 1385 | { | 1385 | { |
| 1386 | void *t; | 1386 | void *t; |
| 1387 | 1387 | ||
| @@ -1398,8 +1398,8 @@ static void __devinit *aligned_kmalloc (int size, gfp_t flags, int alignment) | |||
| 1398 | return NULL; | 1398 | return NULL; |
| 1399 | } | 1399 | } |
| 1400 | 1400 | ||
| 1401 | static int __devinit init_q (struct fs_dev *dev, | 1401 | static int init_q(struct fs_dev *dev, struct queue *txq, int queue, |
| 1402 | struct queue *txq, int queue, int nentries, int is_rq) | 1402 | int nentries, int is_rq) |
| 1403 | { | 1403 | { |
| 1404 | int sz = nentries * sizeof (struct FS_QENTRY); | 1404 | int sz = nentries * sizeof (struct FS_QENTRY); |
| 1405 | struct FS_QENTRY *p; | 1405 | struct FS_QENTRY *p; |
| @@ -1434,8 +1434,8 @@ static int __devinit init_q (struct fs_dev *dev, | |||
| 1434 | } | 1434 | } |
| 1435 | 1435 | ||
| 1436 | 1436 | ||
| 1437 | static int __devinit init_fp (struct fs_dev *dev, | 1437 | static int init_fp(struct fs_dev *dev, struct freepool *fp, int queue, |
| 1438 | struct freepool *fp, int queue, int bufsize, int nr_buffers) | 1438 | int bufsize, int nr_buffers) |
| 1439 | { | 1439 | { |
| 1440 | func_enter (); | 1440 | func_enter (); |
| 1441 | 1441 | ||
| @@ -1528,7 +1528,7 @@ static void top_off_fp (struct fs_dev *dev, struct freepool *fp, | |||
| 1528 | fs_dprintk (FS_DEBUG_QUEUE, "Added %d entries. \n", n); | 1528 | fs_dprintk (FS_DEBUG_QUEUE, "Added %d entries. \n", n); |
| 1529 | } | 1529 | } |
| 1530 | 1530 | ||
| 1531 | static void __devexit free_queue (struct fs_dev *dev, struct queue *txq) | 1531 | static void free_queue(struct fs_dev *dev, struct queue *txq) |
| 1532 | { | 1532 | { |
| 1533 | func_enter (); | 1533 | func_enter (); |
| 1534 | 1534 | ||
| @@ -1544,7 +1544,7 @@ static void __devexit free_queue (struct fs_dev *dev, struct queue *txq) | |||
| 1544 | func_exit (); | 1544 | func_exit (); |
| 1545 | } | 1545 | } |
| 1546 | 1546 | ||
| 1547 | static void __devexit free_freepool (struct fs_dev *dev, struct freepool *fp) | 1547 | static void free_freepool(struct fs_dev *dev, struct freepool *fp) |
| 1548 | { | 1548 | { |
| 1549 | func_enter (); | 1549 | func_enter (); |
| 1550 | 1550 | ||
| @@ -1662,7 +1662,7 @@ static void fs_poll (unsigned long data) | |||
| 1662 | } | 1662 | } |
| 1663 | #endif | 1663 | #endif |
| 1664 | 1664 | ||
| 1665 | static int __devinit fs_init (struct fs_dev *dev) | 1665 | static int fs_init(struct fs_dev *dev) |
| 1666 | { | 1666 | { |
| 1667 | struct pci_dev *pci_dev; | 1667 | struct pci_dev *pci_dev; |
| 1668 | int isr, to; | 1668 | int isr, to; |
| @@ -1897,8 +1897,8 @@ unmap: | |||
| 1897 | return 1; | 1897 | return 1; |
| 1898 | } | 1898 | } |
| 1899 | 1899 | ||
| 1900 | static int __devinit firestream_init_one (struct pci_dev *pci_dev, | 1900 | static int firestream_init_one(struct pci_dev *pci_dev, |
| 1901 | const struct pci_device_id *ent) | 1901 | const struct pci_device_id *ent) |
| 1902 | { | 1902 | { |
| 1903 | struct atm_dev *atm_dev; | 1903 | struct atm_dev *atm_dev; |
| 1904 | struct fs_dev *fs_dev; | 1904 | struct fs_dev *fs_dev; |
| @@ -1934,7 +1934,7 @@ static int __devinit firestream_init_one (struct pci_dev *pci_dev, | |||
| 1934 | return -ENODEV; | 1934 | return -ENODEV; |
| 1935 | } | 1935 | } |
| 1936 | 1936 | ||
| 1937 | static void __devexit firestream_remove_one (struct pci_dev *pdev) | 1937 | static void firestream_remove_one(struct pci_dev *pdev) |
| 1938 | { | 1938 | { |
| 1939 | int i; | 1939 | int i; |
| 1940 | struct fs_dev *dev, *nxtdev; | 1940 | struct fs_dev *dev, *nxtdev; |
| @@ -2038,7 +2038,7 @@ static struct pci_driver firestream_driver = { | |||
| 2038 | .name = "firestream", | 2038 | .name = "firestream", |
| 2039 | .id_table = firestream_pci_tbl, | 2039 | .id_table = firestream_pci_tbl, |
| 2040 | .probe = firestream_init_one, | 2040 | .probe = firestream_init_one, |
| 2041 | .remove = __devexit_p(firestream_remove_one), | 2041 | .remove = firestream_remove_one, |
| 2042 | }; | 2042 | }; |
| 2043 | 2043 | ||
| 2044 | static int __init firestream_init_module (void) | 2044 | static int __init firestream_init_module (void) |
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 361f5aee3be1..204814e88e46 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
| @@ -527,8 +527,7 @@ fore200e_pca_reset(struct fore200e* fore200e) | |||
| 527 | } | 527 | } |
| 528 | 528 | ||
| 529 | 529 | ||
| 530 | static int __devinit | 530 | static int fore200e_pca_map(struct fore200e* fore200e) |
| 531 | fore200e_pca_map(struct fore200e* fore200e) | ||
| 532 | { | 531 | { |
| 533 | DPRINTK(2, "device %s being mapped in memory\n", fore200e->name); | 532 | DPRINTK(2, "device %s being mapped in memory\n", fore200e->name); |
| 534 | 533 | ||
| @@ -561,8 +560,7 @@ fore200e_pca_unmap(struct fore200e* fore200e) | |||
| 561 | } | 560 | } |
| 562 | 561 | ||
| 563 | 562 | ||
| 564 | static int __devinit | 563 | static int fore200e_pca_configure(struct fore200e *fore200e) |
| 565 | fore200e_pca_configure(struct fore200e* fore200e) | ||
| 566 | { | 564 | { |
| 567 | struct pci_dev* pci_dev = (struct pci_dev*)fore200e->bus_dev; | 565 | struct pci_dev* pci_dev = (struct pci_dev*)fore200e->bus_dev; |
| 568 | u8 master_ctrl, latency; | 566 | u8 master_ctrl, latency; |
| @@ -2028,8 +2026,7 @@ fore200e_change_qos(struct atm_vcc* vcc,struct atm_qos* qos, int flags) | |||
| 2028 | } | 2026 | } |
| 2029 | 2027 | ||
| 2030 | 2028 | ||
| 2031 | static int __devinit | 2029 | static int fore200e_irq_request(struct fore200e *fore200e) |
| 2032 | fore200e_irq_request(struct fore200e* fore200e) | ||
| 2033 | { | 2030 | { |
| 2034 | if (request_irq(fore200e->irq, fore200e_interrupt, IRQF_SHARED, fore200e->name, fore200e->atm_dev) < 0) { | 2031 | if (request_irq(fore200e->irq, fore200e_interrupt, IRQF_SHARED, fore200e->name, fore200e->atm_dev) < 0) { |
| 2035 | 2032 | ||
| @@ -2051,8 +2048,7 @@ fore200e_irq_request(struct fore200e* fore200e) | |||
| 2051 | } | 2048 | } |
| 2052 | 2049 | ||
| 2053 | 2050 | ||
| 2054 | static int __devinit | 2051 | static int fore200e_get_esi(struct fore200e *fore200e) |
| 2055 | fore200e_get_esi(struct fore200e* fore200e) | ||
| 2056 | { | 2052 | { |
| 2057 | struct prom_data* prom = kzalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA); | 2053 | struct prom_data* prom = kzalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA); |
| 2058 | int ok, i; | 2054 | int ok, i; |
| @@ -2081,8 +2077,7 @@ fore200e_get_esi(struct fore200e* fore200e) | |||
| 2081 | } | 2077 | } |
| 2082 | 2078 | ||
| 2083 | 2079 | ||
| 2084 | static int __devinit | 2080 | static int fore200e_alloc_rx_buf(struct fore200e *fore200e) |
| 2085 | fore200e_alloc_rx_buf(struct fore200e* fore200e) | ||
| 2086 | { | 2081 | { |
| 2087 | int scheme, magn, nbr, size, i; | 2082 | int scheme, magn, nbr, size, i; |
| 2088 | 2083 | ||
| @@ -2146,8 +2141,7 @@ fore200e_alloc_rx_buf(struct fore200e* fore200e) | |||
| 2146 | } | 2141 | } |
| 2147 | 2142 | ||
| 2148 | 2143 | ||
| 2149 | static int __devinit | 2144 | static int fore200e_init_bs_queue(struct fore200e *fore200e) |
| 2150 | fore200e_init_bs_queue(struct fore200e* fore200e) | ||
| 2151 | { | 2145 | { |
| 2152 | int scheme, magn, i; | 2146 | int scheme, magn, i; |
| 2153 | 2147 | ||
| @@ -2209,8 +2203,7 @@ fore200e_init_bs_queue(struct fore200e* fore200e) | |||
| 2209 | } | 2203 | } |
| 2210 | 2204 | ||
| 2211 | 2205 | ||
| 2212 | static int __devinit | 2206 | static int fore200e_init_rx_queue(struct fore200e *fore200e) |
| 2213 | fore200e_init_rx_queue(struct fore200e* fore200e) | ||
| 2214 | { | 2207 | { |
| 2215 | struct host_rxq* rxq = &fore200e->host_rxq; | 2208 | struct host_rxq* rxq = &fore200e->host_rxq; |
| 2216 | struct cp_rxq_entry __iomem * cp_entry; | 2209 | struct cp_rxq_entry __iomem * cp_entry; |
| @@ -2269,8 +2262,7 @@ fore200e_init_rx_queue(struct fore200e* fore200e) | |||
| 2269 | } | 2262 | } |
| 2270 | 2263 | ||
| 2271 | 2264 | ||
| 2272 | static int __devinit | 2265 | static int fore200e_init_tx_queue(struct fore200e *fore200e) |
| 2273 | fore200e_init_tx_queue(struct fore200e* fore200e) | ||
| 2274 | { | 2266 | { |
| 2275 | struct host_txq* txq = &fore200e->host_txq; | 2267 | struct host_txq* txq = &fore200e->host_txq; |
| 2276 | struct cp_txq_entry __iomem * cp_entry; | 2268 | struct cp_txq_entry __iomem * cp_entry; |
| @@ -2332,8 +2324,7 @@ fore200e_init_tx_queue(struct fore200e* fore200e) | |||
| 2332 | } | 2324 | } |
| 2333 | 2325 | ||
| 2334 | 2326 | ||
| 2335 | static int __devinit | 2327 | static int fore200e_init_cmd_queue(struct fore200e *fore200e) |
| 2336 | fore200e_init_cmd_queue(struct fore200e* fore200e) | ||
| 2337 | { | 2328 | { |
| 2338 | struct host_cmdq* cmdq = &fore200e->host_cmdq; | 2329 | struct host_cmdq* cmdq = &fore200e->host_cmdq; |
| 2339 | struct cp_cmdq_entry __iomem * cp_entry; | 2330 | struct cp_cmdq_entry __iomem * cp_entry; |
| @@ -2374,10 +2365,10 @@ fore200e_init_cmd_queue(struct fore200e* fore200e) | |||
| 2374 | } | 2365 | } |
| 2375 | 2366 | ||
| 2376 | 2367 | ||
| 2377 | static void __devinit | 2368 | static void fore200e_param_bs_queue(struct fore200e *fore200e, |
| 2378 | fore200e_param_bs_queue(struct fore200e* fore200e, | 2369 | enum buffer_scheme scheme, |
| 2379 | enum buffer_scheme scheme, enum buffer_magn magn, | 2370 | enum buffer_magn magn, int queue_length, |
| 2380 | int queue_length, int pool_size, int supply_blksize) | 2371 | int pool_size, int supply_blksize) |
| 2381 | { | 2372 | { |
| 2382 | struct bs_spec __iomem * bs_spec = &fore200e->cp_queues->init.bs_spec[ scheme ][ magn ]; | 2373 | struct bs_spec __iomem * bs_spec = &fore200e->cp_queues->init.bs_spec[ scheme ][ magn ]; |
| 2383 | 2374 | ||
| @@ -2388,8 +2379,7 @@ fore200e_param_bs_queue(struct fore200e* fore200e, | |||
| 2388 | } | 2379 | } |
| 2389 | 2380 | ||
| 2390 | 2381 | ||
| 2391 | static int __devinit | 2382 | static int fore200e_initialize(struct fore200e *fore200e) |
| 2392 | fore200e_initialize(struct fore200e* fore200e) | ||
| 2393 | { | 2383 | { |
| 2394 | struct cp_queues __iomem * cpq; | 2384 | struct cp_queues __iomem * cpq; |
| 2395 | int ok, scheme, magn; | 2385 | int ok, scheme, magn; |
| @@ -2440,8 +2430,7 @@ fore200e_initialize(struct fore200e* fore200e) | |||
| 2440 | } | 2430 | } |
| 2441 | 2431 | ||
| 2442 | 2432 | ||
| 2443 | static void __devinit | 2433 | static void fore200e_monitor_putc(struct fore200e *fore200e, char c) |
| 2444 | fore200e_monitor_putc(struct fore200e* fore200e, char c) | ||
| 2445 | { | 2434 | { |
| 2446 | struct cp_monitor __iomem * monitor = fore200e->cp_monitor; | 2435 | struct cp_monitor __iomem * monitor = fore200e->cp_monitor; |
| 2447 | 2436 | ||
| @@ -2452,8 +2441,7 @@ fore200e_monitor_putc(struct fore200e* fore200e, char c) | |||
| 2452 | } | 2441 | } |
| 2453 | 2442 | ||
| 2454 | 2443 | ||
| 2455 | static int __devinit | 2444 | static int fore200e_monitor_getc(struct fore200e *fore200e) |
| 2456 | fore200e_monitor_getc(struct fore200e* fore200e) | ||
| 2457 | { | 2445 | { |
| 2458 | struct cp_monitor __iomem * monitor = fore200e->cp_monitor; | 2446 | struct cp_monitor __iomem * monitor = fore200e->cp_monitor; |
| 2459 | unsigned long timeout = jiffies + msecs_to_jiffies(50); | 2447 | unsigned long timeout = jiffies + msecs_to_jiffies(50); |
| @@ -2477,8 +2465,7 @@ fore200e_monitor_getc(struct fore200e* fore200e) | |||
| 2477 | } | 2465 | } |
| 2478 | 2466 | ||
| 2479 | 2467 | ||
| 2480 | static void __devinit | 2468 | static void fore200e_monitor_puts(struct fore200e *fore200e, char *str) |
| 2481 | fore200e_monitor_puts(struct fore200e* fore200e, char* str) | ||
| 2482 | { | 2469 | { |
| 2483 | while (*str) { | 2470 | while (*str) { |
| 2484 | 2471 | ||
| @@ -2497,8 +2484,7 @@ fore200e_monitor_puts(struct fore200e* fore200e, char* str) | |||
| 2497 | #define FW_EXT "_ecd.bin2" | 2484 | #define FW_EXT "_ecd.bin2" |
| 2498 | #endif | 2485 | #endif |
| 2499 | 2486 | ||
| 2500 | static int __devinit | 2487 | static int fore200e_load_and_start_fw(struct fore200e *fore200e) |
| 2501 | fore200e_load_and_start_fw(struct fore200e* fore200e) | ||
| 2502 | { | 2488 | { |
| 2503 | const struct firmware *firmware; | 2489 | const struct firmware *firmware; |
| 2504 | struct device *device; | 2490 | struct device *device; |
| @@ -2566,8 +2552,7 @@ release: | |||
| 2566 | } | 2552 | } |
| 2567 | 2553 | ||
| 2568 | 2554 | ||
| 2569 | static int __devinit | 2555 | static int fore200e_register(struct fore200e *fore200e, struct device *parent) |
| 2570 | fore200e_register(struct fore200e* fore200e, struct device *parent) | ||
| 2571 | { | 2556 | { |
| 2572 | struct atm_dev* atm_dev; | 2557 | struct atm_dev* atm_dev; |
| 2573 | 2558 | ||
| @@ -2593,8 +2578,7 @@ fore200e_register(struct fore200e* fore200e, struct device *parent) | |||
| 2593 | } | 2578 | } |
| 2594 | 2579 | ||
| 2595 | 2580 | ||
| 2596 | static int __devinit | 2581 | static int fore200e_init(struct fore200e *fore200e, struct device *parent) |
| 2597 | fore200e_init(struct fore200e* fore200e, struct device *parent) | ||
| 2598 | { | 2582 | { |
| 2599 | if (fore200e_register(fore200e, parent) < 0) | 2583 | if (fore200e_register(fore200e, parent) < 0) |
| 2600 | return -ENODEV; | 2584 | return -ENODEV; |
| @@ -2644,7 +2628,7 @@ fore200e_init(struct fore200e* fore200e, struct device *parent) | |||
| 2644 | 2628 | ||
| 2645 | #ifdef CONFIG_SBUS | 2629 | #ifdef CONFIG_SBUS |
| 2646 | static const struct of_device_id fore200e_sba_match[]; | 2630 | static const struct of_device_id fore200e_sba_match[]; |
| 2647 | static int __devinit fore200e_sba_probe(struct platform_device *op) | 2631 | static int fore200e_sba_probe(struct platform_device *op) |
| 2648 | { | 2632 | { |
| 2649 | const struct of_device_id *match; | 2633 | const struct of_device_id *match; |
| 2650 | const struct fore200e_bus *bus; | 2634 | const struct fore200e_bus *bus; |
| @@ -2681,7 +2665,7 @@ static int __devinit fore200e_sba_probe(struct platform_device *op) | |||
| 2681 | return 0; | 2665 | return 0; |
| 2682 | } | 2666 | } |
| 2683 | 2667 | ||
| 2684 | static int __devexit fore200e_sba_remove(struct platform_device *op) | 2668 | static int fore200e_sba_remove(struct platform_device *op) |
| 2685 | { | 2669 | { |
| 2686 | struct fore200e *fore200e = dev_get_drvdata(&op->dev); | 2670 | struct fore200e *fore200e = dev_get_drvdata(&op->dev); |
| 2687 | 2671 | ||
| @@ -2707,13 +2691,13 @@ static struct platform_driver fore200e_sba_driver = { | |||
| 2707 | .of_match_table = fore200e_sba_match, | 2691 | .of_match_table = fore200e_sba_match, |
| 2708 | }, | 2692 | }, |
| 2709 | .probe = fore200e_sba_probe, | 2693 | .probe = fore200e_sba_probe, |
| 2710 | .remove = __devexit_p(fore200e_sba_remove), | 2694 | .remove = fore200e_sba_remove, |
| 2711 | }; | 2695 | }; |
| 2712 | #endif | 2696 | #endif |
| 2713 | 2697 | ||
| 2714 | #ifdef CONFIG_PCI | 2698 | #ifdef CONFIG_PCI |
| 2715 | static int __devinit | 2699 | static int fore200e_pca_detect(struct pci_dev *pci_dev, |
| 2716 | fore200e_pca_detect(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) | 2700 | const struct pci_device_id *pci_ent) |
| 2717 | { | 2701 | { |
| 2718 | const struct fore200e_bus* bus = (struct fore200e_bus*) pci_ent->driver_data; | 2702 | const struct fore200e_bus* bus = (struct fore200e_bus*) pci_ent->driver_data; |
| 2719 | struct fore200e* fore200e; | 2703 | struct fore200e* fore200e; |
| @@ -2766,7 +2750,7 @@ out_disable: | |||
| 2766 | } | 2750 | } |
| 2767 | 2751 | ||
| 2768 | 2752 | ||
| 2769 | static void __devexit fore200e_pca_remove_one(struct pci_dev *pci_dev) | 2753 | static void fore200e_pca_remove_one(struct pci_dev *pci_dev) |
| 2770 | { | 2754 | { |
| 2771 | struct fore200e *fore200e; | 2755 | struct fore200e *fore200e; |
| 2772 | 2756 | ||
| @@ -2789,7 +2773,7 @@ MODULE_DEVICE_TABLE(pci, fore200e_pca_tbl); | |||
| 2789 | static struct pci_driver fore200e_pca_driver = { | 2773 | static struct pci_driver fore200e_pca_driver = { |
| 2790 | .name = "fore_200e", | 2774 | .name = "fore_200e", |
| 2791 | .probe = fore200e_pca_detect, | 2775 | .probe = fore200e_pca_detect, |
| 2792 | .remove = __devexit_p(fore200e_pca_remove_one), | 2776 | .remove = fore200e_pca_remove_one, |
| 2793 | .id_table = fore200e_pca_tbl, | 2777 | .id_table = fore200e_pca_tbl, |
| 2794 | }; | 2778 | }; |
| 2795 | #endif | 2779 | #endif |
diff --git a/drivers/atm/he.c b/drivers/atm/he.c index b182c2f7d777..72b6960fa95f 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c | |||
| @@ -349,8 +349,8 @@ __find_vcc(struct he_dev *he_dev, unsigned cid) | |||
| 349 | return NULL; | 349 | return NULL; |
| 350 | } | 350 | } |
| 351 | 351 | ||
| 352 | static int __devinit | 352 | static int he_init_one(struct pci_dev *pci_dev, |
| 353 | he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) | 353 | const struct pci_device_id *pci_ent) |
| 354 | { | 354 | { |
| 355 | struct atm_dev *atm_dev = NULL; | 355 | struct atm_dev *atm_dev = NULL; |
| 356 | struct he_dev *he_dev = NULL; | 356 | struct he_dev *he_dev = NULL; |
| @@ -406,8 +406,7 @@ init_one_failure: | |||
| 406 | return err; | 406 | return err; |
| 407 | } | 407 | } |
| 408 | 408 | ||
| 409 | static void __devexit | 409 | static void he_remove_one(struct pci_dev *pci_dev) |
| 410 | he_remove_one (struct pci_dev *pci_dev) | ||
| 411 | { | 410 | { |
| 412 | struct atm_dev *atm_dev; | 411 | struct atm_dev *atm_dev; |
| 413 | struct he_dev *he_dev; | 412 | struct he_dev *he_dev; |
| @@ -445,8 +444,7 @@ rate_to_atmf(unsigned rate) /* cps to atm forum format */ | |||
| 445 | return (NONZERO | (exp << 9) | (rate & 0x1ff)); | 444 | return (NONZERO | (exp << 9) | (rate & 0x1ff)); |
| 446 | } | 445 | } |
| 447 | 446 | ||
| 448 | static void __devinit | 447 | static void he_init_rx_lbfp0(struct he_dev *he_dev) |
| 449 | he_init_rx_lbfp0(struct he_dev *he_dev) | ||
| 450 | { | 448 | { |
| 451 | unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count; | 449 | unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count; |
| 452 | unsigned lbufs_per_row = he_dev->cells_per_row / he_dev->cells_per_lbuf; | 450 | unsigned lbufs_per_row = he_dev->cells_per_row / he_dev->cells_per_lbuf; |
| @@ -476,8 +474,7 @@ he_init_rx_lbfp0(struct he_dev *he_dev) | |||
| 476 | he_writel(he_dev, he_dev->r0_numbuffs, RLBF0_C); | 474 | he_writel(he_dev, he_dev->r0_numbuffs, RLBF0_C); |
| 477 | } | 475 | } |
| 478 | 476 | ||
| 479 | static void __devinit | 477 | static void he_init_rx_lbfp1(struct he_dev *he_dev) |
| 480 | he_init_rx_lbfp1(struct he_dev *he_dev) | ||
| 481 | { | 478 | { |
| 482 | unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count; | 479 | unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count; |
| 483 | unsigned lbufs_per_row = he_dev->cells_per_row / he_dev->cells_per_lbuf; | 480 | unsigned lbufs_per_row = he_dev->cells_per_row / he_dev->cells_per_lbuf; |
| @@ -507,8 +504,7 @@ he_init_rx_lbfp1(struct he_dev *he_dev) | |||
| 507 | he_writel(he_dev, he_dev->r1_numbuffs, RLBF1_C); | 504 | he_writel(he_dev, he_dev->r1_numbuffs, RLBF1_C); |
| 508 | } | 505 | } |
| 509 | 506 | ||
| 510 | static void __devinit | 507 | static void he_init_tx_lbfp(struct he_dev *he_dev) |
| 511 | he_init_tx_lbfp(struct he_dev *he_dev) | ||
| 512 | { | 508 | { |
| 513 | unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count; | 509 | unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count; |
| 514 | unsigned lbufs_per_row = he_dev->cells_per_row / he_dev->cells_per_lbuf; | 510 | unsigned lbufs_per_row = he_dev->cells_per_row / he_dev->cells_per_lbuf; |
| @@ -537,8 +533,7 @@ he_init_tx_lbfp(struct he_dev *he_dev) | |||
| 537 | he_writel(he_dev, lbufd_index - 1, TLBF_T); | 533 | he_writel(he_dev, lbufd_index - 1, TLBF_T); |
| 538 | } | 534 | } |
| 539 | 535 | ||
| 540 | static int __devinit | 536 | static int he_init_tpdrq(struct he_dev *he_dev) |
| 541 | he_init_tpdrq(struct he_dev *he_dev) | ||
| 542 | { | 537 | { |
| 543 | he_dev->tpdrq_base = pci_alloc_consistent(he_dev->pci_dev, | 538 | he_dev->tpdrq_base = pci_alloc_consistent(he_dev->pci_dev, |
| 544 | CONFIG_TPDRQ_SIZE * sizeof(struct he_tpdrq), &he_dev->tpdrq_phys); | 539 | CONFIG_TPDRQ_SIZE * sizeof(struct he_tpdrq), &he_dev->tpdrq_phys); |
| @@ -559,8 +554,7 @@ he_init_tpdrq(struct he_dev *he_dev) | |||
| 559 | return 0; | 554 | return 0; |
| 560 | } | 555 | } |
| 561 | 556 | ||
| 562 | static void __devinit | 557 | static void he_init_cs_block(struct he_dev *he_dev) |
| 563 | he_init_cs_block(struct he_dev *he_dev) | ||
| 564 | { | 558 | { |
| 565 | unsigned clock, rate, delta; | 559 | unsigned clock, rate, delta; |
| 566 | int reg; | 560 | int reg; |
| @@ -655,8 +649,7 @@ he_init_cs_block(struct he_dev *he_dev) | |||
| 655 | 649 | ||
| 656 | } | 650 | } |
| 657 | 651 | ||
| 658 | static int __devinit | 652 | static int he_init_cs_block_rcm(struct he_dev *he_dev) |
| 659 | he_init_cs_block_rcm(struct he_dev *he_dev) | ||
| 660 | { | 653 | { |
| 661 | unsigned (*rategrid)[16][16]; | 654 | unsigned (*rategrid)[16][16]; |
| 662 | unsigned rate, delta; | 655 | unsigned rate, delta; |
| @@ -776,8 +769,7 @@ he_init_cs_block_rcm(struct he_dev *he_dev) | |||
| 776 | return 0; | 769 | return 0; |
| 777 | } | 770 | } |
| 778 | 771 | ||
| 779 | static int __devinit | 772 | static int he_init_group(struct he_dev *he_dev, int group) |
| 780 | he_init_group(struct he_dev *he_dev, int group) | ||
| 781 | { | 773 | { |
| 782 | struct he_buff *heb, *next; | 774 | struct he_buff *heb, *next; |
| 783 | dma_addr_t mapping; | 775 | dma_addr_t mapping; |
| @@ -915,8 +907,7 @@ out_free_rbpl_table: | |||
| 915 | return -ENOMEM; | 907 | return -ENOMEM; |
| 916 | } | 908 | } |
| 917 | 909 | ||
| 918 | static int __devinit | 910 | static int he_init_irq(struct he_dev *he_dev) |
| 919 | he_init_irq(struct he_dev *he_dev) | ||
| 920 | { | 911 | { |
| 921 | int i; | 912 | int i; |
| 922 | 913 | ||
| @@ -978,8 +969,7 @@ he_init_irq(struct he_dev *he_dev) | |||
| 978 | return 0; | 969 | return 0; |
| 979 | } | 970 | } |
| 980 | 971 | ||
| 981 | static int __devinit | 972 | static int he_start(struct atm_dev *dev) |
| 982 | he_start(struct atm_dev *dev) | ||
| 983 | { | 973 | { |
| 984 | struct he_dev *he_dev; | 974 | struct he_dev *he_dev; |
| 985 | struct pci_dev *pci_dev; | 975 | struct pci_dev *pci_dev; |
| @@ -2879,7 +2869,7 @@ MODULE_DEVICE_TABLE(pci, he_pci_tbl); | |||
| 2879 | static struct pci_driver he_driver = { | 2869 | static struct pci_driver he_driver = { |
| 2880 | .name = "he", | 2870 | .name = "he", |
| 2881 | .probe = he_init_one, | 2871 | .probe = he_init_one, |
| 2882 | .remove = __devexit_p(he_remove_one), | 2872 | .remove = he_remove_one, |
| 2883 | .id_table = he_pci_tbl, | 2873 | .id_table = he_pci_tbl, |
| 2884 | }; | 2874 | }; |
| 2885 | 2875 | ||
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index 7d01c2a75256..1dc0519333f2 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c | |||
| @@ -1789,7 +1789,7 @@ static void CLOCK_IT (const hrz_dev *dev, u32 ctrl) | |||
| 1789 | WRITE_IT_WAIT(dev, ctrl | SEEPROM_SK); | 1789 | WRITE_IT_WAIT(dev, ctrl | SEEPROM_SK); |
| 1790 | } | 1790 | } |
| 1791 | 1791 | ||
| 1792 | static u16 __devinit read_bia (const hrz_dev * dev, u16 addr) | 1792 | static u16 read_bia(const hrz_dev *dev, u16 addr) |
| 1793 | { | 1793 | { |
| 1794 | u32 ctrl = rd_regl (dev, CONTROL_0_REG); | 1794 | u32 ctrl = rd_regl (dev, CONTROL_0_REG); |
| 1795 | 1795 | ||
| @@ -1845,7 +1845,8 @@ static u16 __devinit read_bia (const hrz_dev * dev, u16 addr) | |||
| 1845 | 1845 | ||
| 1846 | /********** initialise a card **********/ | 1846 | /********** initialise a card **********/ |
| 1847 | 1847 | ||
| 1848 | static int __devinit hrz_init (hrz_dev * dev) { | 1848 | static int hrz_init(hrz_dev *dev) |
| 1849 | { | ||
| 1849 | int onefivefive; | 1850 | int onefivefive; |
| 1850 | 1851 | ||
| 1851 | u16 chan; | 1852 | u16 chan; |
| @@ -2681,7 +2682,8 @@ static const struct atmdev_ops hrz_ops = { | |||
| 2681 | .owner = THIS_MODULE, | 2682 | .owner = THIS_MODULE, |
| 2682 | }; | 2683 | }; |
| 2683 | 2684 | ||
| 2684 | static int __devinit hrz_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) | 2685 | static int hrz_probe(struct pci_dev *pci_dev, |
| 2686 | const struct pci_device_id *pci_ent) | ||
| 2685 | { | 2687 | { |
| 2686 | hrz_dev * dev; | 2688 | hrz_dev * dev; |
| 2687 | int err = 0; | 2689 | int err = 0; |
| @@ -2836,7 +2838,7 @@ out_disable: | |||
| 2836 | goto out; | 2838 | goto out; |
| 2837 | } | 2839 | } |
| 2838 | 2840 | ||
| 2839 | static void __devexit hrz_remove_one(struct pci_dev *pci_dev) | 2841 | static void hrz_remove_one(struct pci_dev *pci_dev) |
| 2840 | { | 2842 | { |
| 2841 | hrz_dev *dev; | 2843 | hrz_dev *dev; |
| 2842 | 2844 | ||
| @@ -2901,7 +2903,7 @@ MODULE_DEVICE_TABLE(pci, hrz_pci_tbl); | |||
| 2901 | static struct pci_driver hrz_driver = { | 2903 | static struct pci_driver hrz_driver = { |
| 2902 | .name = "horizon", | 2904 | .name = "horizon", |
| 2903 | .probe = hrz_probe, | 2905 | .probe = hrz_probe, |
| 2904 | .remove = __devexit_p(hrz_remove_one), | 2906 | .remove = hrz_remove_one, |
| 2905 | .id_table = hrz_pci_tbl, | 2907 | .id_table = hrz_pci_tbl, |
| 2906 | }; | 2908 | }; |
| 2907 | 2909 | ||
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index 8974bd2b961e..272f00927761 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c | |||
| @@ -3109,8 +3109,7 @@ deinit_card(struct idt77252_dev *card) | |||
| 3109 | } | 3109 | } |
| 3110 | 3110 | ||
| 3111 | 3111 | ||
| 3112 | static void __devinit | 3112 | static void init_sram(struct idt77252_dev *card) |
| 3113 | init_sram(struct idt77252_dev *card) | ||
| 3114 | { | 3113 | { |
| 3115 | int i; | 3114 | int i; |
| 3116 | 3115 | ||
| @@ -3257,8 +3256,7 @@ init_sram(struct idt77252_dev *card) | |||
| 3257 | IPRINTK("%s: SRAM initialization complete.\n", card->name); | 3256 | IPRINTK("%s: SRAM initialization complete.\n", card->name); |
| 3258 | } | 3257 | } |
| 3259 | 3258 | ||
| 3260 | static int __devinit | 3259 | static int init_card(struct atm_dev *dev) |
| 3261 | init_card(struct atm_dev *dev) | ||
| 3262 | { | 3260 | { |
| 3263 | struct idt77252_dev *card = dev->dev_data; | 3261 | struct idt77252_dev *card = dev->dev_data; |
| 3264 | struct pci_dev *pcidev = card->pcidev; | 3262 | struct pci_dev *pcidev = card->pcidev; |
| @@ -3537,8 +3535,7 @@ init_card(struct atm_dev *dev) | |||
| 3537 | /*****************************************************************************/ | 3535 | /*****************************************************************************/ |
| 3538 | 3536 | ||
| 3539 | 3537 | ||
| 3540 | static int __devinit | 3538 | static int idt77252_preset(struct idt77252_dev *card) |
| 3541 | idt77252_preset(struct idt77252_dev *card) | ||
| 3542 | { | 3539 | { |
| 3543 | u16 pci_command; | 3540 | u16 pci_command; |
| 3544 | 3541 | ||
| @@ -3579,8 +3576,7 @@ idt77252_preset(struct idt77252_dev *card) | |||
| 3579 | } | 3576 | } |
| 3580 | 3577 | ||
| 3581 | 3578 | ||
| 3582 | static unsigned long __devinit | 3579 | static unsigned long probe_sram(struct idt77252_dev *card) |
| 3583 | probe_sram(struct idt77252_dev *card) | ||
| 3584 | { | 3580 | { |
| 3585 | u32 data, addr; | 3581 | u32 data, addr; |
| 3586 | 3582 | ||
| @@ -3601,8 +3597,8 @@ probe_sram(struct idt77252_dev *card) | |||
| 3601 | return addr * sizeof(u32); | 3597 | return addr * sizeof(u32); |
| 3602 | } | 3598 | } |
| 3603 | 3599 | ||
| 3604 | static int __devinit | 3600 | static int idt77252_init_one(struct pci_dev *pcidev, |
| 3605 | idt77252_init_one(struct pci_dev *pcidev, const struct pci_device_id *id) | 3601 | const struct pci_device_id *id) |
| 3606 | { | 3602 | { |
| 3607 | static struct idt77252_dev **last = &idt77252_chain; | 3603 | static struct idt77252_dev **last = &idt77252_chain; |
| 3608 | static int index = 0; | 3604 | static int index = 0; |
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index 96cce6d53195..4217f29a85e0 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c | |||
| @@ -2299,7 +2299,7 @@ static int reset_sar(struct atm_dev *dev) | |||
| 2299 | } | 2299 | } |
| 2300 | 2300 | ||
| 2301 | 2301 | ||
| 2302 | static int __devinit ia_init(struct atm_dev *dev) | 2302 | static int ia_init(struct atm_dev *dev) |
| 2303 | { | 2303 | { |
| 2304 | IADEV *iadev; | 2304 | IADEV *iadev; |
| 2305 | unsigned long real_base; | 2305 | unsigned long real_base; |
| @@ -2492,7 +2492,7 @@ static void ia_free_rx(IADEV *iadev) | |||
| 2492 | iadev->rx_dle_dma); | 2492 | iadev->rx_dle_dma); |
| 2493 | } | 2493 | } |
| 2494 | 2494 | ||
| 2495 | static int __devinit ia_start(struct atm_dev *dev) | 2495 | static int ia_start(struct atm_dev *dev) |
| 2496 | { | 2496 | { |
| 2497 | IADEV *iadev; | 2497 | IADEV *iadev; |
| 2498 | int error; | 2498 | int error; |
| @@ -3168,8 +3168,7 @@ static const struct atmdev_ops ops = { | |||
| 3168 | .owner = THIS_MODULE, | 3168 | .owner = THIS_MODULE, |
| 3169 | }; | 3169 | }; |
| 3170 | 3170 | ||
| 3171 | static int __devinit ia_init_one(struct pci_dev *pdev, | 3171 | static int ia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 3172 | const struct pci_device_id *ent) | ||
| 3173 | { | 3172 | { |
| 3174 | struct atm_dev *dev; | 3173 | struct atm_dev *dev; |
| 3175 | IADEV *iadev; | 3174 | IADEV *iadev; |
| @@ -3229,7 +3228,7 @@ err_out: | |||
| 3229 | return ret; | 3228 | return ret; |
| 3230 | } | 3229 | } |
| 3231 | 3230 | ||
| 3232 | static void __devexit ia_remove_one(struct pci_dev *pdev) | 3231 | static void ia_remove_one(struct pci_dev *pdev) |
| 3233 | { | 3232 | { |
| 3234 | struct atm_dev *dev = pci_get_drvdata(pdev); | 3233 | struct atm_dev *dev = pci_get_drvdata(pdev); |
| 3235 | IADEV *iadev = INPH_IA_DEV(dev); | 3234 | IADEV *iadev = INPH_IA_DEV(dev); |
| @@ -3270,7 +3269,7 @@ static struct pci_driver ia_driver = { | |||
| 3270 | .name = DEV_LABEL, | 3269 | .name = DEV_LABEL, |
| 3271 | .id_table = ia_pci_tbl, | 3270 | .id_table = ia_pci_tbl, |
| 3272 | .probe = ia_init_one, | 3271 | .probe = ia_init_one, |
| 3273 | .remove = __devexit_p(ia_remove_one), | 3272 | .remove = ia_remove_one, |
| 3274 | }; | 3273 | }; |
| 3275 | 3274 | ||
| 3276 | static int __init ia_module_init(void) | 3275 | static int __init ia_module_init(void) |
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c index 68c758871812..fa7d701933ba 100644 --- a/drivers/atm/lanai.c +++ b/drivers/atm/lanai.c | |||
| @@ -551,8 +551,8 @@ static inline void sram_write(const struct lanai_dev *lanai, | |||
| 551 | writel(val, sram_addr(lanai, offset)); | 551 | writel(val, sram_addr(lanai, offset)); |
| 552 | } | 552 | } |
| 553 | 553 | ||
| 554 | static int __devinit sram_test_word(const struct lanai_dev *lanai, | 554 | static int sram_test_word(const struct lanai_dev *lanai, int offset, |
| 555 | int offset, u32 pattern) | 555 | u32 pattern) |
| 556 | { | 556 | { |
| 557 | u32 readback; | 557 | u32 readback; |
| 558 | sram_write(lanai, pattern, offset); | 558 | sram_write(lanai, pattern, offset); |
| @@ -566,7 +566,7 @@ static int __devinit sram_test_word(const struct lanai_dev *lanai, | |||
| 566 | return -EIO; | 566 | return -EIO; |
| 567 | } | 567 | } |
| 568 | 568 | ||
| 569 | static int __devinit sram_test_pass(const struct lanai_dev *lanai, u32 pattern) | 569 | static int sram_test_pass(const struct lanai_dev *lanai, u32 pattern) |
| 570 | { | 570 | { |
| 571 | int offset, result = 0; | 571 | int offset, result = 0; |
| 572 | for (offset = 0; offset < SRAM_BYTES && result == 0; offset += 4) | 572 | for (offset = 0; offset < SRAM_BYTES && result == 0; offset += 4) |
| @@ -574,7 +574,7 @@ static int __devinit sram_test_pass(const struct lanai_dev *lanai, u32 pattern) | |||
| 574 | return result; | 574 | return result; |
| 575 | } | 575 | } |
| 576 | 576 | ||
| 577 | static int __devinit sram_test_and_clear(const struct lanai_dev *lanai) | 577 | static int sram_test_and_clear(const struct lanai_dev *lanai) |
| 578 | { | 578 | { |
| 579 | #ifdef FULL_MEMORY_TEST | 579 | #ifdef FULL_MEMORY_TEST |
| 580 | int result; | 580 | int result; |
| @@ -860,7 +860,7 @@ static inline void aal0_buffer_free(struct lanai_dev *lanai) | |||
| 860 | #ifndef READ_EEPROM | 860 | #ifndef READ_EEPROM |
| 861 | 861 | ||
| 862 | /* Stub functions to use if EEPROM reading is disabled */ | 862 | /* Stub functions to use if EEPROM reading is disabled */ |
| 863 | static int __devinit eeprom_read(struct lanai_dev *lanai) | 863 | static int eeprom_read(struct lanai_dev *lanai) |
| 864 | { | 864 | { |
| 865 | printk(KERN_INFO DEV_LABEL "(itf %d): *NOT* reading EEPROM\n", | 865 | printk(KERN_INFO DEV_LABEL "(itf %d): *NOT* reading EEPROM\n", |
| 866 | lanai->number); | 866 | lanai->number); |
| @@ -868,7 +868,7 @@ static int __devinit eeprom_read(struct lanai_dev *lanai) | |||
| 868 | return 0; | 868 | return 0; |
| 869 | } | 869 | } |
| 870 | 870 | ||
| 871 | static int __devinit eeprom_validate(struct lanai_dev *lanai) | 871 | static int eeprom_validate(struct lanai_dev *lanai) |
| 872 | { | 872 | { |
| 873 | lanai->serialno = 0; | 873 | lanai->serialno = 0; |
| 874 | lanai->magicno = EEPROM_MAGIC_VALUE; | 874 | lanai->magicno = EEPROM_MAGIC_VALUE; |
| @@ -877,7 +877,7 @@ static int __devinit eeprom_validate(struct lanai_dev *lanai) | |||
| 877 | 877 | ||
| 878 | #else /* READ_EEPROM */ | 878 | #else /* READ_EEPROM */ |
| 879 | 879 | ||
| 880 | static int __devinit eeprom_read(struct lanai_dev *lanai) | 880 | static int eeprom_read(struct lanai_dev *lanai) |
| 881 | { | 881 | { |
| 882 | int i, address; | 882 | int i, address; |
| 883 | u8 data; | 883 | u8 data; |
| @@ -953,7 +953,7 @@ static inline u32 eeprom_be4(const struct lanai_dev *lanai, int address) | |||
| 953 | } | 953 | } |
| 954 | 954 | ||
| 955 | /* Checksum/validate EEPROM contents */ | 955 | /* Checksum/validate EEPROM contents */ |
| 956 | static int __devinit eeprom_validate(struct lanai_dev *lanai) | 956 | static int eeprom_validate(struct lanai_dev *lanai) |
| 957 | { | 957 | { |
| 958 | int i, s; | 958 | int i, s; |
| 959 | u32 v; | 959 | u32 v; |
| @@ -1448,7 +1448,7 @@ static void vcc_rx_aal0(struct lanai_dev *lanai) | |||
| 1448 | #include <linux/vmalloc.h> | 1448 | #include <linux/vmalloc.h> |
| 1449 | #endif | 1449 | #endif |
| 1450 | 1450 | ||
| 1451 | static int __devinit vcc_table_allocate(struct lanai_dev *lanai) | 1451 | static int vcc_table_allocate(struct lanai_dev *lanai) |
| 1452 | { | 1452 | { |
| 1453 | #ifdef VCCTABLE_GETFREEPAGE | 1453 | #ifdef VCCTABLE_GETFREEPAGE |
| 1454 | APRINTK((lanai->num_vci) * sizeof(struct lanai_vcc *) <= PAGE_SIZE, | 1454 | APRINTK((lanai->num_vci) * sizeof(struct lanai_vcc *) <= PAGE_SIZE, |
| @@ -1588,7 +1588,7 @@ static void lanai_reset(struct lanai_dev *lanai) | |||
| 1588 | /* | 1588 | /* |
| 1589 | * Allocate service buffer and tell card about it | 1589 | * Allocate service buffer and tell card about it |
| 1590 | */ | 1590 | */ |
| 1591 | static int __devinit service_buffer_allocate(struct lanai_dev *lanai) | 1591 | static int service_buffer_allocate(struct lanai_dev *lanai) |
| 1592 | { | 1592 | { |
| 1593 | lanai_buf_allocate(&lanai->service, SERVICE_ENTRIES * 4, 8, | 1593 | lanai_buf_allocate(&lanai->service, SERVICE_ENTRIES * 4, 8, |
| 1594 | lanai->pci); | 1594 | lanai->pci); |
| @@ -1942,7 +1942,7 @@ static int check_board_id_and_rev(const char *name, u32 val, int *revp) | |||
| 1942 | 1942 | ||
| 1943 | /* -------------------- PCI INITIALIZATION/SHUTDOWN: */ | 1943 | /* -------------------- PCI INITIALIZATION/SHUTDOWN: */ |
| 1944 | 1944 | ||
| 1945 | static int __devinit lanai_pci_start(struct lanai_dev *lanai) | 1945 | static int lanai_pci_start(struct lanai_dev *lanai) |
| 1946 | { | 1946 | { |
| 1947 | struct pci_dev *pci = lanai->pci; | 1947 | struct pci_dev *pci = lanai->pci; |
| 1948 | int result; | 1948 | int result; |
| @@ -2123,7 +2123,7 @@ static inline void lanai_cbr_shutdown(struct lanai_dev *lanai) | |||
| 2123 | /* -------------------- OPERATIONS: */ | 2123 | /* -------------------- OPERATIONS: */ |
| 2124 | 2124 | ||
| 2125 | /* setup a newly detected device */ | 2125 | /* setup a newly detected device */ |
| 2126 | static int __devinit lanai_dev_open(struct atm_dev *atmdev) | 2126 | static int lanai_dev_open(struct atm_dev *atmdev) |
| 2127 | { | 2127 | { |
| 2128 | struct lanai_dev *lanai = (struct lanai_dev *) atmdev->dev_data; | 2128 | struct lanai_dev *lanai = (struct lanai_dev *) atmdev->dev_data; |
| 2129 | unsigned long raw_base; | 2129 | unsigned long raw_base; |
| @@ -2566,8 +2566,8 @@ static const struct atmdev_ops ops = { | |||
| 2566 | }; | 2566 | }; |
| 2567 | 2567 | ||
| 2568 | /* initialize one probed card */ | 2568 | /* initialize one probed card */ |
| 2569 | static int __devinit lanai_init_one(struct pci_dev *pci, | 2569 | static int lanai_init_one(struct pci_dev *pci, |
| 2570 | const struct pci_device_id *ident) | 2570 | const struct pci_device_id *ident) |
| 2571 | { | 2571 | { |
| 2572 | struct lanai_dev *lanai; | 2572 | struct lanai_dev *lanai; |
| 2573 | struct atm_dev *atmdev; | 2573 | struct atm_dev *atmdev; |
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index 1c70c45fa044..ed1d2b7f923b 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c | |||
| @@ -121,8 +121,8 @@ | |||
| 121 | static u32 ns_read_sram(ns_dev * card, u32 sram_address); | 121 | static u32 ns_read_sram(ns_dev * card, u32 sram_address); |
| 122 | static void ns_write_sram(ns_dev * card, u32 sram_address, u32 * value, | 122 | static void ns_write_sram(ns_dev * card, u32 sram_address, u32 * value, |
| 123 | int count); | 123 | int count); |
| 124 | static int __devinit ns_init_card(int i, struct pci_dev *pcidev); | 124 | static int ns_init_card(int i, struct pci_dev *pcidev); |
| 125 | static void __devinit ns_init_card_error(ns_dev * card, int error); | 125 | static void ns_init_card_error(ns_dev * card, int error); |
| 126 | static scq_info *get_scq(ns_dev *card, int size, u32 scd); | 126 | static scq_info *get_scq(ns_dev *card, int size, u32 scd); |
| 127 | static void free_scq(ns_dev *card, scq_info * scq, struct atm_vcc *vcc); | 127 | static void free_scq(ns_dev *card, scq_info * scq, struct atm_vcc *vcc); |
| 128 | static void push_rxbufs(ns_dev *, struct sk_buff *); | 128 | static void push_rxbufs(ns_dev *, struct sk_buff *); |
| @@ -180,8 +180,8 @@ MODULE_LICENSE("GPL"); | |||
| 180 | 180 | ||
| 181 | /* Functions */ | 181 | /* Functions */ |
| 182 | 182 | ||
| 183 | static int __devinit nicstar_init_one(struct pci_dev *pcidev, | 183 | static int nicstar_init_one(struct pci_dev *pcidev, |
| 184 | const struct pci_device_id *ent) | 184 | const struct pci_device_id *ent) |
| 185 | { | 185 | { |
| 186 | static int index = -1; | 186 | static int index = -1; |
| 187 | unsigned int error; | 187 | unsigned int error; |
| @@ -200,7 +200,7 @@ err_out: | |||
| 200 | return -ENODEV; | 200 | return -ENODEV; |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | static void __devexit nicstar_remove_one(struct pci_dev *pcidev) | 203 | static void nicstar_remove_one(struct pci_dev *pcidev) |
| 204 | { | 204 | { |
| 205 | int i, j; | 205 | int i, j; |
| 206 | ns_dev *card = pci_get_drvdata(pcidev); | 206 | ns_dev *card = pci_get_drvdata(pcidev); |
| @@ -262,7 +262,7 @@ static void __devexit nicstar_remove_one(struct pci_dev *pcidev) | |||
| 262 | kfree(card); | 262 | kfree(card); |
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | static struct pci_device_id nicstar_pci_tbl[] __devinitdata = { | 265 | static struct pci_device_id nicstar_pci_tbl[] = { |
| 266 | { PCI_VDEVICE(IDT, PCI_DEVICE_ID_IDT_IDT77201), 0 }, | 266 | { PCI_VDEVICE(IDT, PCI_DEVICE_ID_IDT_IDT77201), 0 }, |
| 267 | {0,} /* terminate list */ | 267 | {0,} /* terminate list */ |
| 268 | }; | 268 | }; |
| @@ -273,7 +273,7 @@ static struct pci_driver nicstar_driver = { | |||
| 273 | .name = "nicstar", | 273 | .name = "nicstar", |
| 274 | .id_table = nicstar_pci_tbl, | 274 | .id_table = nicstar_pci_tbl, |
| 275 | .probe = nicstar_init_one, | 275 | .probe = nicstar_init_one, |
| 276 | .remove = __devexit_p(nicstar_remove_one), | 276 | .remove = nicstar_remove_one, |
| 277 | }; | 277 | }; |
| 278 | 278 | ||
| 279 | static int __init nicstar_init(void) | 279 | static int __init nicstar_init(void) |
| @@ -351,7 +351,7 @@ static void ns_write_sram(ns_dev * card, u32 sram_address, u32 * value, | |||
| 351 | spin_unlock_irqrestore(&card->res_lock, flags); | 351 | spin_unlock_irqrestore(&card->res_lock, flags); |
| 352 | } | 352 | } |
| 353 | 353 | ||
| 354 | static int __devinit ns_init_card(int i, struct pci_dev *pcidev) | 354 | static int ns_init_card(int i, struct pci_dev *pcidev) |
| 355 | { | 355 | { |
| 356 | int j; | 356 | int j; |
| 357 | struct ns_dev *card = NULL; | 357 | struct ns_dev *card = NULL; |
| @@ -821,7 +821,7 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev) | |||
| 821 | return error; | 821 | return error; |
| 822 | } | 822 | } |
| 823 | 823 | ||
| 824 | static void __devinit ns_init_card_error(ns_dev * card, int error) | 824 | static void ns_init_card_error(ns_dev *card, int error) |
| 825 | { | 825 | { |
| 826 | if (error >= 17) { | 826 | if (error >= 17) { |
| 827 | writel(0x00000000, card->membase + CFG); | 827 | writel(0x00000000, card->membase + CFG); |
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c index d47db401027f..0474a89170b9 100644 --- a/drivers/atm/solos-pci.c +++ b/drivers/atm/solos-pci.c | |||
| @@ -1462,7 +1462,7 @@ static void fpga_remove(struct pci_dev *dev) | |||
| 1462 | kfree(card); | 1462 | kfree(card); |
| 1463 | } | 1463 | } |
| 1464 | 1464 | ||
| 1465 | static struct pci_device_id fpga_pci_tbl[] __devinitdata = { | 1465 | static struct pci_device_id fpga_pci_tbl[] = { |
| 1466 | { 0x10ee, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 1466 | { 0x10ee, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
| 1467 | { 0, } | 1467 | { 0, } |
| 1468 | }; | 1468 | }; |
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c index abe4e20b0766..969c3c29000c 100644 --- a/drivers/atm/zatm.c +++ b/drivers/atm/zatm.c | |||
| @@ -1094,8 +1094,8 @@ static irqreturn_t zatm_int(int irq,void *dev_id) | |||
| 1094 | /*----------------------------- (E)EPROM access -----------------------------*/ | 1094 | /*----------------------------- (E)EPROM access -----------------------------*/ |
| 1095 | 1095 | ||
| 1096 | 1096 | ||
| 1097 | static void __devinit eprom_set(struct zatm_dev *zatm_dev,unsigned long value, | 1097 | static void eprom_set(struct zatm_dev *zatm_dev, unsigned long value, |
| 1098 | unsigned short cmd) | 1098 | unsigned short cmd) |
| 1099 | { | 1099 | { |
| 1100 | int error; | 1100 | int error; |
| 1101 | 1101 | ||
| @@ -1105,8 +1105,7 @@ static void __devinit eprom_set(struct zatm_dev *zatm_dev,unsigned long value, | |||
| 1105 | } | 1105 | } |
| 1106 | 1106 | ||
| 1107 | 1107 | ||
| 1108 | static unsigned long __devinit eprom_get(struct zatm_dev *zatm_dev, | 1108 | static unsigned long eprom_get(struct zatm_dev *zatm_dev, unsigned short cmd) |
| 1109 | unsigned short cmd) | ||
| 1110 | { | 1109 | { |
| 1111 | unsigned int value; | 1110 | unsigned int value; |
| 1112 | int error; | 1111 | int error; |
| @@ -1118,8 +1117,8 @@ static unsigned long __devinit eprom_get(struct zatm_dev *zatm_dev, | |||
| 1118 | } | 1117 | } |
| 1119 | 1118 | ||
| 1120 | 1119 | ||
| 1121 | static void __devinit eprom_put_bits(struct zatm_dev *zatm_dev, | 1120 | static void eprom_put_bits(struct zatm_dev *zatm_dev, unsigned long data, |
| 1122 | unsigned long data,int bits,unsigned short cmd) | 1121 | int bits, unsigned short cmd) |
| 1123 | { | 1122 | { |
| 1124 | unsigned long value; | 1123 | unsigned long value; |
| 1125 | int i; | 1124 | int i; |
| @@ -1133,8 +1132,8 @@ static void __devinit eprom_put_bits(struct zatm_dev *zatm_dev, | |||
| 1133 | } | 1132 | } |
| 1134 | 1133 | ||
| 1135 | 1134 | ||
| 1136 | static void __devinit eprom_get_byte(struct zatm_dev *zatm_dev, | 1135 | static void eprom_get_byte(struct zatm_dev *zatm_dev, unsigned char *byte, |
| 1137 | unsigned char *byte,unsigned short cmd) | 1136 | unsigned short cmd) |
| 1138 | { | 1137 | { |
| 1139 | int i; | 1138 | int i; |
| 1140 | 1139 | ||
| @@ -1149,8 +1148,8 @@ static void __devinit eprom_get_byte(struct zatm_dev *zatm_dev, | |||
| 1149 | } | 1148 | } |
| 1150 | 1149 | ||
| 1151 | 1150 | ||
| 1152 | static unsigned char __devinit eprom_try_esi(struct atm_dev *dev, | 1151 | static unsigned char eprom_try_esi(struct atm_dev *dev, unsigned short cmd, |
| 1153 | unsigned short cmd,int offset,int swap) | 1152 | int offset, int swap) |
| 1154 | { | 1153 | { |
| 1155 | unsigned char buf[ZEPROM_SIZE]; | 1154 | unsigned char buf[ZEPROM_SIZE]; |
| 1156 | struct zatm_dev *zatm_dev; | 1155 | struct zatm_dev *zatm_dev; |
| @@ -1170,7 +1169,7 @@ static unsigned char __devinit eprom_try_esi(struct atm_dev *dev, | |||
| 1170 | } | 1169 | } |
| 1171 | 1170 | ||
| 1172 | 1171 | ||
| 1173 | static void __devinit eprom_get_esi(struct atm_dev *dev) | 1172 | static void eprom_get_esi(struct atm_dev *dev) |
| 1174 | { | 1173 | { |
| 1175 | if (eprom_try_esi(dev,ZEPROM_V1_REG,ZEPROM_V1_ESI_OFF,1)) return; | 1174 | if (eprom_try_esi(dev,ZEPROM_V1_REG,ZEPROM_V1_ESI_OFF,1)) return; |
| 1176 | (void) eprom_try_esi(dev,ZEPROM_V2_REG,ZEPROM_V2_ESI_OFF,0); | 1175 | (void) eprom_try_esi(dev,ZEPROM_V2_REG,ZEPROM_V2_ESI_OFF,0); |
| @@ -1180,7 +1179,7 @@ static void __devinit eprom_get_esi(struct atm_dev *dev) | |||
| 1180 | /*--------------------------------- entries ---------------------------------*/ | 1179 | /*--------------------------------- entries ---------------------------------*/ |
| 1181 | 1180 | ||
| 1182 | 1181 | ||
| 1183 | static int __devinit zatm_init(struct atm_dev *dev) | 1182 | static int zatm_init(struct atm_dev *dev) |
| 1184 | { | 1183 | { |
| 1185 | struct zatm_dev *zatm_dev; | 1184 | struct zatm_dev *zatm_dev; |
| 1186 | struct pci_dev *pci_dev; | 1185 | struct pci_dev *pci_dev; |
| @@ -1257,7 +1256,7 @@ static int __devinit zatm_init(struct atm_dev *dev) | |||
| 1257 | } | 1256 | } |
| 1258 | 1257 | ||
| 1259 | 1258 | ||
| 1260 | static int __devinit zatm_start(struct atm_dev *dev) | 1259 | static int zatm_start(struct atm_dev *dev) |
| 1261 | { | 1260 | { |
| 1262 | struct zatm_dev *zatm_dev = ZATM_DEV(dev); | 1261 | struct zatm_dev *zatm_dev = ZATM_DEV(dev); |
| 1263 | struct pci_dev *pdev = zatm_dev->pci_dev; | 1262 | struct pci_dev *pdev = zatm_dev->pci_dev; |
| @@ -1584,8 +1583,8 @@ static const struct atmdev_ops ops = { | |||
| 1584 | .change_qos = zatm_change_qos, | 1583 | .change_qos = zatm_change_qos, |
| 1585 | }; | 1584 | }; |
| 1586 | 1585 | ||
| 1587 | static int __devinit zatm_init_one(struct pci_dev *pci_dev, | 1586 | static int zatm_init_one(struct pci_dev *pci_dev, |
| 1588 | const struct pci_device_id *ent) | 1587 | const struct pci_device_id *ent) |
| 1589 | { | 1588 | { |
| 1590 | struct atm_dev *dev; | 1589 | struct atm_dev *dev; |
| 1591 | struct zatm_dev *zatm_dev; | 1590 | struct zatm_dev *zatm_dev; |
| @@ -1636,7 +1635,7 @@ out_free: | |||
| 1636 | 1635 | ||
| 1637 | MODULE_LICENSE("GPL"); | 1636 | MODULE_LICENSE("GPL"); |
| 1638 | 1637 | ||
| 1639 | static struct pci_device_id zatm_pci_tbl[] __devinitdata = { | 1638 | static struct pci_device_id zatm_pci_tbl[] = { |
| 1640 | { PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1221), ZATM_COPPER }, | 1639 | { PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1221), ZATM_COPPER }, |
| 1641 | { PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1225), 0 }, | 1640 | { PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1225), 0 }, |
| 1642 | { 0, } | 1641 | { 0, } |
diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c index 5ad3bad2b0a5..d585735430dd 100644 --- a/drivers/auxdisplay/cfag12864bfb.c +++ b/drivers/auxdisplay/cfag12864bfb.c | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | 37 | ||
| 38 | #define CFAG12864BFB_NAME "cfag12864bfb" | 38 | #define CFAG12864BFB_NAME "cfag12864bfb" |
| 39 | 39 | ||
| 40 | static struct fb_fix_screeninfo cfag12864bfb_fix __devinitdata = { | 40 | static struct fb_fix_screeninfo cfag12864bfb_fix = { |
| 41 | .id = "cfag12864b", | 41 | .id = "cfag12864b", |
| 42 | .type = FB_TYPE_PACKED_PIXELS, | 42 | .type = FB_TYPE_PACKED_PIXELS, |
| 43 | .visual = FB_VISUAL_MONO10, | 43 | .visual = FB_VISUAL_MONO10, |
| @@ -48,7 +48,7 @@ static struct fb_fix_screeninfo cfag12864bfb_fix __devinitdata = { | |||
| 48 | .accel = FB_ACCEL_NONE, | 48 | .accel = FB_ACCEL_NONE, |
| 49 | }; | 49 | }; |
| 50 | 50 | ||
| 51 | static struct fb_var_screeninfo cfag12864bfb_var __devinitdata = { | 51 | static struct fb_var_screeninfo cfag12864bfb_var = { |
| 52 | .xres = CFAG12864B_WIDTH, | 52 | .xres = CFAG12864B_WIDTH, |
| 53 | .yres = CFAG12864B_HEIGHT, | 53 | .yres = CFAG12864B_HEIGHT, |
| 54 | .xres_virtual = CFAG12864B_WIDTH, | 54 | .xres_virtual = CFAG12864B_WIDTH, |
| @@ -80,7 +80,7 @@ static struct fb_ops cfag12864bfb_ops = { | |||
| 80 | .fb_mmap = cfag12864bfb_mmap, | 80 | .fb_mmap = cfag12864bfb_mmap, |
| 81 | }; | 81 | }; |
| 82 | 82 | ||
| 83 | static int __devinit cfag12864bfb_probe(struct platform_device *device) | 83 | static int cfag12864bfb_probe(struct platform_device *device) |
| 84 | { | 84 | { |
| 85 | int ret = -EINVAL; | 85 | int ret = -EINVAL; |
| 86 | struct fb_info *info = framebuffer_alloc(0, &device->dev); | 86 | struct fb_info *info = framebuffer_alloc(0, &device->dev); |
| @@ -114,7 +114,7 @@ none: | |||
| 114 | return ret; | 114 | return ret; |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | static int __devexit cfag12864bfb_remove(struct platform_device *device) | 117 | static int cfag12864bfb_remove(struct platform_device *device) |
| 118 | { | 118 | { |
| 119 | struct fb_info *info = platform_get_drvdata(device); | 119 | struct fb_info *info = platform_get_drvdata(device); |
| 120 | 120 | ||
| @@ -128,7 +128,7 @@ static int __devexit cfag12864bfb_remove(struct platform_device *device) | |||
| 128 | 128 | ||
| 129 | static struct platform_driver cfag12864bfb_driver = { | 129 | static struct platform_driver cfag12864bfb_driver = { |
| 130 | .probe = cfag12864bfb_probe, | 130 | .probe = cfag12864bfb_probe, |
| 131 | .remove = __devexit_p(cfag12864bfb_remove), | 131 | .remove = cfag12864bfb_remove, |
| 132 | .driver = { | 132 | .driver = { |
| 133 | .name = CFAG12864BFB_NAME, | 133 | .name = CFAG12864BFB_NAME, |
| 134 | }, | 134 | }, |
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 63452943abd1..fb10728f6372 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c | |||
| @@ -224,7 +224,7 @@ static void cpu_device_release(struct device *dev) | |||
| 224 | * by the cpu device. | 224 | * by the cpu device. |
| 225 | * | 225 | * |
| 226 | * Never copy this way of doing things, or you too will be made fun of | 226 | * Never copy this way of doing things, or you too will be made fun of |
| 227 | * on the linux-kerenl list, you have been warned. | 227 | * on the linux-kernel list, you have been warned. |
| 228 | */ | 228 | */ |
| 229 | } | 229 | } |
| 230 | 230 | ||
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index d81460309182..b392b353be39 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c | |||
| @@ -305,7 +305,7 @@ static bool fw_read_file_contents(struct file *file, struct firmware_buf *fw_buf | |||
| 305 | char *buf; | 305 | char *buf; |
| 306 | 306 | ||
| 307 | size = fw_file_size(file); | 307 | size = fw_file_size(file); |
| 308 | if (size < 0) | 308 | if (size <= 0) |
| 309 | return false; | 309 | return false; |
| 310 | buf = vmalloc(size); | 310 | buf = vmalloc(size); |
| 311 | if (!buf) | 311 | if (!buf) |
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index a3c1404c7933..2b7f77d3fcb0 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
| @@ -513,6 +513,8 @@ static int device_resume_early(struct device *dev, pm_message_t state) | |||
| 513 | 513 | ||
| 514 | Out: | 514 | Out: |
| 515 | TRACE_RESUME(error); | 515 | TRACE_RESUME(error); |
| 516 | |||
| 517 | pm_runtime_enable(dev); | ||
| 516 | return error; | 518 | return error; |
| 517 | } | 519 | } |
| 518 | 520 | ||
| @@ -589,8 +591,6 @@ static int device_resume(struct device *dev, pm_message_t state, bool async) | |||
| 589 | if (!dev->power.is_suspended) | 591 | if (!dev->power.is_suspended) |
| 590 | goto Unlock; | 592 | goto Unlock; |
| 591 | 593 | ||
| 592 | pm_runtime_enable(dev); | ||
| 593 | |||
| 594 | if (dev->pm_domain) { | 594 | if (dev->pm_domain) { |
| 595 | info = "power domain "; | 595 | info = "power domain "; |
| 596 | callback = pm_op(&dev->pm_domain->ops, state); | 596 | callback = pm_op(&dev->pm_domain->ops, state); |
| @@ -930,6 +930,8 @@ static int device_suspend_late(struct device *dev, pm_message_t state) | |||
| 930 | pm_callback_t callback = NULL; | 930 | pm_callback_t callback = NULL; |
| 931 | char *info = NULL; | 931 | char *info = NULL; |
| 932 | 932 | ||
| 933 | __pm_runtime_disable(dev, false); | ||
| 934 | |||
| 933 | if (dev->power.syscore) | 935 | if (dev->power.syscore) |
| 934 | return 0; | 936 | return 0; |
| 935 | 937 | ||
| @@ -1133,11 +1135,8 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async) | |||
| 1133 | 1135 | ||
| 1134 | Complete: | 1136 | Complete: |
| 1135 | complete_all(&dev->power.completion); | 1137 | complete_all(&dev->power.completion); |
| 1136 | |||
| 1137 | if (error) | 1138 | if (error) |
| 1138 | async_error = error; | 1139 | async_error = error; |
| 1139 | else if (dev->power.is_suspended) | ||
| 1140 | __pm_runtime_disable(dev, false); | ||
| 1141 | 1140 | ||
| 1142 | return error; | 1141 | return error; |
| 1143 | } | 1142 | } |
diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c index ff46387f5308..d21349544ce5 100644 --- a/drivers/base/power/qos.c +++ b/drivers/base/power/qos.c | |||
| @@ -542,19 +542,19 @@ int dev_pm_qos_add_ancestor_request(struct device *dev, | |||
| 542 | struct dev_pm_qos_request *req, s32 value) | 542 | struct dev_pm_qos_request *req, s32 value) |
| 543 | { | 543 | { |
| 544 | struct device *ancestor = dev->parent; | 544 | struct device *ancestor = dev->parent; |
| 545 | int error = -ENODEV; | 545 | int ret = -ENODEV; |
| 546 | 546 | ||
| 547 | while (ancestor && !ancestor->power.ignore_children) | 547 | while (ancestor && !ancestor->power.ignore_children) |
| 548 | ancestor = ancestor->parent; | 548 | ancestor = ancestor->parent; |
| 549 | 549 | ||
| 550 | if (ancestor) | 550 | if (ancestor) |
| 551 | error = dev_pm_qos_add_request(ancestor, req, | 551 | ret = dev_pm_qos_add_request(ancestor, req, |
| 552 | DEV_PM_QOS_LATENCY, value); | 552 | DEV_PM_QOS_LATENCY, value); |
| 553 | 553 | ||
| 554 | if (error < 0) | 554 | if (ret < 0) |
| 555 | req->dev = NULL; | 555 | req->dev = NULL; |
| 556 | 556 | ||
| 557 | return error; | 557 | return ret; |
| 558 | } | 558 | } |
| 559 | EXPORT_SYMBOL_GPL(dev_pm_qos_add_ancestor_request); | 559 | EXPORT_SYMBOL_GPL(dev_pm_qos_add_ancestor_request); |
| 560 | 560 | ||
diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c index 07aad786f817..46a213a596e2 100644 --- a/drivers/base/regmap/regmap-debugfs.c +++ b/drivers/base/regmap/regmap-debugfs.c | |||
| @@ -56,6 +56,19 @@ static const struct file_operations regmap_name_fops = { | |||
| 56 | .llseek = default_llseek, | 56 | .llseek = default_llseek, |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | static void regmap_debugfs_free_dump_cache(struct regmap *map) | ||
| 60 | { | ||
| 61 | struct regmap_debugfs_off_cache *c; | ||
| 62 | |||
| 63 | while (!list_empty(&map->debugfs_off_cache)) { | ||
| 64 | c = list_first_entry(&map->debugfs_off_cache, | ||
| 65 | struct regmap_debugfs_off_cache, | ||
| 66 | list); | ||
| 67 | list_del(&c->list); | ||
| 68 | kfree(c); | ||
| 69 | } | ||
| 70 | } | ||
| 71 | |||
| 59 | /* | 72 | /* |
| 60 | * Work out where the start offset maps into register numbers, bearing | 73 | * Work out where the start offset maps into register numbers, bearing |
| 61 | * in mind that we suppress hidden registers. | 74 | * in mind that we suppress hidden registers. |
| @@ -91,8 +104,10 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map, | |||
| 91 | /* No cache entry? Start a new one */ | 104 | /* No cache entry? Start a new one */ |
| 92 | if (!c) { | 105 | if (!c) { |
| 93 | c = kzalloc(sizeof(*c), GFP_KERNEL); | 106 | c = kzalloc(sizeof(*c), GFP_KERNEL); |
| 94 | if (!c) | 107 | if (!c) { |
| 95 | break; | 108 | regmap_debugfs_free_dump_cache(map); |
| 109 | return base; | ||
| 110 | } | ||
| 96 | c->min = p; | 111 | c->min = p; |
| 97 | c->base_reg = i; | 112 | c->base_reg = i; |
| 98 | } | 113 | } |
| @@ -101,14 +116,34 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map, | |||
| 101 | } | 116 | } |
| 102 | } | 117 | } |
| 103 | 118 | ||
| 119 | /* Close the last entry off if we didn't scan beyond it */ | ||
| 120 | if (c) { | ||
| 121 | c->max = p - 1; | ||
| 122 | list_add_tail(&c->list, | ||
| 123 | &map->debugfs_off_cache); | ||
| 124 | } else { | ||
| 125 | return base; | ||
| 126 | } | ||
| 127 | |||
| 128 | /* | ||
| 129 | * This should never happen; we return above if we fail to | ||
| 130 | * allocate and we should never be in this code if there are | ||
| 131 | * no registers at all. | ||
| 132 | */ | ||
| 133 | if (list_empty(&map->debugfs_off_cache)) { | ||
| 134 | WARN_ON(list_empty(&map->debugfs_off_cache)); | ||
| 135 | return base; | ||
| 136 | } | ||
| 137 | |||
| 104 | /* Find the relevant block */ | 138 | /* Find the relevant block */ |
| 105 | list_for_each_entry(c, &map->debugfs_off_cache, list) { | 139 | list_for_each_entry(c, &map->debugfs_off_cache, list) { |
| 106 | if (*pos >= c->min && *pos <= c->max) { | 140 | if (from >= c->min && from <= c->max) { |
| 107 | *pos = c->min; | 141 | *pos = c->min; |
| 108 | return c->base_reg; | 142 | return c->base_reg; |
| 109 | } | 143 | } |
| 110 | 144 | ||
| 111 | ret = c->max; | 145 | *pos = c->min; |
| 146 | ret = c->base_reg; | ||
| 112 | } | 147 | } |
| 113 | 148 | ||
| 114 | return ret; | 149 | return ret; |
| @@ -387,16 +422,8 @@ void regmap_debugfs_init(struct regmap *map, const char *name) | |||
| 387 | 422 | ||
| 388 | void regmap_debugfs_exit(struct regmap *map) | 423 | void regmap_debugfs_exit(struct regmap *map) |
| 389 | { | 424 | { |
| 390 | struct regmap_debugfs_off_cache *c; | ||
| 391 | |||
| 392 | debugfs_remove_recursive(map->debugfs); | 425 | debugfs_remove_recursive(map->debugfs); |
| 393 | while (!list_empty(&map->debugfs_off_cache)) { | 426 | regmap_debugfs_free_dump_cache(map); |
| 394 | c = list_first_entry(&map->debugfs_off_cache, | ||
| 395 | struct regmap_debugfs_off_cache, | ||
| 396 | list); | ||
| 397 | list_del(&c->list); | ||
| 398 | kfree(c); | ||
| 399 | } | ||
| 400 | kfree(map->debugfs_name); | 427 | kfree(map->debugfs_name); |
| 401 | } | 428 | } |
| 402 | 429 | ||
diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig index d7b56a88c9f4..8b4221cfd118 100644 --- a/drivers/bcma/Kconfig +++ b/drivers/bcma/Kconfig | |||
| @@ -67,8 +67,7 @@ config BCMA_DRIVER_GMAC_CMN | |||
| 67 | 67 | ||
| 68 | config BCMA_DRIVER_GPIO | 68 | config BCMA_DRIVER_GPIO |
| 69 | bool "BCMA GPIO driver" | 69 | bool "BCMA GPIO driver" |
| 70 | depends on BCMA | 70 | depends on BCMA && GPIOLIB |
| 71 | select GPIOLIB | ||
| 72 | help | 71 | help |
| 73 | Driver to provide access to the GPIO pins of the bcma bus. | 72 | Driver to provide access to the GPIO pins of the bcma bus. |
| 74 | 73 | ||
diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h index 4a2d72ec6d43..19e3fbfd5757 100644 --- a/drivers/bcma/bcma_private.h +++ b/drivers/bcma/bcma_private.h | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | struct bcma_bus; | 22 | struct bcma_bus; |
| 23 | 23 | ||
| 24 | /* main.c */ | 24 | /* main.c */ |
| 25 | int __devinit bcma_bus_register(struct bcma_bus *bus); | 25 | int bcma_bus_register(struct bcma_bus *bus); |
| 26 | void bcma_bus_unregister(struct bcma_bus *bus); | 26 | void bcma_bus_unregister(struct bcma_bus *bus); |
| 27 | int __init bcma_bus_early_register(struct bcma_bus *bus, | 27 | int __init bcma_bus_early_register(struct bcma_bus *bus, |
| 28 | struct bcma_device *core_cc, | 28 | struct bcma_device *core_cc, |
| @@ -87,8 +87,8 @@ u32 bcma_pcie_read(struct bcma_drv_pci *pc, u32 address); | |||
| 87 | extern int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc); | 87 | extern int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc); |
| 88 | 88 | ||
| 89 | #ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE | 89 | #ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE |
| 90 | bool __devinit bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc); | 90 | bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc); |
| 91 | void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc); | 91 | void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc); |
| 92 | #endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */ | 92 | #endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */ |
| 93 | 93 | ||
| 94 | #ifdef CONFIG_BCMA_DRIVER_GPIO | 94 | #ifdef CONFIG_BCMA_DRIVER_GPIO |
diff --git a/drivers/bcma/driver_chipcommon_sflash.c b/drivers/bcma/driver_chipcommon_sflash.c index 63e688393825..1e694db4532d 100644 --- a/drivers/bcma/driver_chipcommon_sflash.c +++ b/drivers/bcma/driver_chipcommon_sflash.c | |||
| @@ -35,7 +35,7 @@ static struct bcma_sflash_tbl_e bcma_sflash_st_tbl[] = { | |||
| 35 | { "M25P40", 0x12, 0x10000, 8, }, | 35 | { "M25P40", 0x12, 0x10000, 8, }, |
| 36 | 36 | ||
| 37 | { "M25P16", 0x14, 0x10000, 32, }, | 37 | { "M25P16", 0x14, 0x10000, 32, }, |
| 38 | { "M25P32", 0x14, 0x10000, 64, }, | 38 | { "M25P32", 0x15, 0x10000, 64, }, |
| 39 | { "M25P64", 0x16, 0x10000, 128, }, | 39 | { "M25P64", 0x16, 0x10000, 128, }, |
| 40 | { "M25FL128", 0x17, 0x10000, 256, }, | 40 | { "M25FL128", 0x17, 0x10000, 256, }, |
| 41 | { 0 }, | 41 | { 0 }, |
diff --git a/drivers/bcma/driver_gmac_cmn.c b/drivers/bcma/driver_gmac_cmn.c index 834225f65e8f..dcb137926d31 100644 --- a/drivers/bcma/driver_gmac_cmn.c +++ b/drivers/bcma/driver_gmac_cmn.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #include "bcma_private.h" | 8 | #include "bcma_private.h" |
| 9 | #include <linux/bcma/bcma.h> | 9 | #include <linux/bcma/bcma.h> |
| 10 | 10 | ||
| 11 | void __devinit bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) | 11 | void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) |
| 12 | { | 12 | { |
| 13 | mutex_init(&gc->phy_mutex); | 13 | mutex_init(&gc->phy_mutex); |
| 14 | } | 14 | } |
diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c index c39ee6d45850..cf7a476a519f 100644 --- a/drivers/bcma/driver_pci.c +++ b/drivers/bcma/driver_pci.c | |||
| @@ -207,14 +207,14 @@ static void bcma_core_pci_config_fixup(struct bcma_drv_pci *pc) | |||
| 207 | * Init. | 207 | * Init. |
| 208 | **************************************************/ | 208 | **************************************************/ |
| 209 | 209 | ||
| 210 | static void __devinit bcma_core_pci_clientmode_init(struct bcma_drv_pci *pc) | 210 | static void bcma_core_pci_clientmode_init(struct bcma_drv_pci *pc) |
| 211 | { | 211 | { |
| 212 | bcma_core_pci_fixcfg(pc); | 212 | bcma_core_pci_fixcfg(pc); |
| 213 | bcma_pcicore_serdes_workaround(pc); | 213 | bcma_pcicore_serdes_workaround(pc); |
| 214 | bcma_core_pci_config_fixup(pc); | 214 | bcma_core_pci_config_fixup(pc); |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | void __devinit bcma_core_pci_init(struct bcma_drv_pci *pc) | 217 | void bcma_core_pci_init(struct bcma_drv_pci *pc) |
| 218 | { | 218 | { |
| 219 | if (pc->setup_done) | 219 | if (pc->setup_done) |
| 220 | return; | 220 | return; |
diff --git a/drivers/bcma/driver_pci_host.c b/drivers/bcma/driver_pci_host.c index e6b5c89469dc..af0c9fabee54 100644 --- a/drivers/bcma/driver_pci_host.c +++ b/drivers/bcma/driver_pci_host.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | #define BCMA_PCI_SLOT_MAX 16 | 24 | #define BCMA_PCI_SLOT_MAX 16 |
| 25 | #define PCI_CONFIG_SPACE_SIZE 256 | 25 | #define PCI_CONFIG_SPACE_SIZE 256 |
| 26 | 26 | ||
| 27 | bool __devinit bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc) | 27 | bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc) |
| 28 | { | 28 | { |
| 29 | struct bcma_bus *bus = pc->core->bus; | 29 | struct bcma_bus *bus = pc->core->bus; |
| 30 | u16 chipid_top; | 30 | u16 chipid_top; |
| @@ -264,10 +264,9 @@ static int bcma_core_pci_hostmode_write_config(struct pci_bus *bus, | |||
| 264 | } | 264 | } |
| 265 | 265 | ||
| 266 | /* return cap_offset if requested capability exists in the PCI config space */ | 266 | /* return cap_offset if requested capability exists in the PCI config space */ |
| 267 | static u8 __devinit bcma_find_pci_capability(struct bcma_drv_pci *pc, | 267 | static u8 bcma_find_pci_capability(struct bcma_drv_pci *pc, unsigned int dev, |
| 268 | unsigned int dev, | 268 | unsigned int func, u8 req_cap_id, |
| 269 | unsigned int func, u8 req_cap_id, | 269 | unsigned char *buf, u32 *buflen) |
| 270 | unsigned char *buf, u32 *buflen) | ||
| 271 | { | 270 | { |
| 272 | u8 cap_id; | 271 | u8 cap_id; |
| 273 | u8 cap_ptr = 0; | 272 | u8 cap_ptr = 0; |
| @@ -334,7 +333,7 @@ static u8 __devinit bcma_find_pci_capability(struct bcma_drv_pci *pc, | |||
| 334 | * Retry Status (CRS) Completion Status to software then | 333 | * Retry Status (CRS) Completion Status to software then |
| 335 | * enable the feature. | 334 | * enable the feature. |
| 336 | */ | 335 | */ |
| 337 | static void __devinit bcma_core_pci_enable_crs(struct bcma_drv_pci *pc) | 336 | static void bcma_core_pci_enable_crs(struct bcma_drv_pci *pc) |
| 338 | { | 337 | { |
| 339 | struct bcma_bus *bus = pc->core->bus; | 338 | struct bcma_bus *bus = pc->core->bus; |
| 340 | u8 cap_ptr, root_ctrl, root_cap, dev; | 339 | u8 cap_ptr, root_ctrl, root_cap, dev; |
| @@ -381,7 +380,7 @@ static void __devinit bcma_core_pci_enable_crs(struct bcma_drv_pci *pc) | |||
| 381 | } | 380 | } |
| 382 | } | 381 | } |
| 383 | 382 | ||
| 384 | void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc) | 383 | void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc) |
| 385 | { | 384 | { |
| 386 | struct bcma_bus *bus = pc->core->bus; | 385 | struct bcma_bus *bus = pc->core->bus; |
| 387 | struct bcma_drv_pci_host *pc_host; | 386 | struct bcma_drv_pci_host *pc_host; |
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c index 98fdc3e014e7..fbf2759e7e4e 100644 --- a/drivers/bcma/host_pci.c +++ b/drivers/bcma/host_pci.c | |||
| @@ -155,8 +155,8 @@ static const struct bcma_host_ops bcma_host_pci_ops = { | |||
| 155 | .awrite32 = bcma_host_pci_awrite32, | 155 | .awrite32 = bcma_host_pci_awrite32, |
| 156 | }; | 156 | }; |
| 157 | 157 | ||
| 158 | static int __devinit bcma_host_pci_probe(struct pci_dev *dev, | 158 | static int bcma_host_pci_probe(struct pci_dev *dev, |
| 159 | const struct pci_device_id *id) | 159 | const struct pci_device_id *id) |
| 160 | { | 160 | { |
| 161 | struct bcma_bus *bus; | 161 | struct bcma_bus *bus; |
| 162 | int err = -ENOMEM; | 162 | int err = -ENOMEM; |
| @@ -226,7 +226,7 @@ err_kfree_bus: | |||
| 226 | return err; | 226 | return err; |
| 227 | } | 227 | } |
| 228 | 228 | ||
| 229 | static void __devexit bcma_host_pci_remove(struct pci_dev *dev) | 229 | static void bcma_host_pci_remove(struct pci_dev *dev) |
| 230 | { | 230 | { |
| 231 | struct bcma_bus *bus = pci_get_drvdata(dev); | 231 | struct bcma_bus *bus = pci_get_drvdata(dev); |
| 232 | 232 | ||
| @@ -284,7 +284,7 @@ static struct pci_driver bcma_pci_bridge_driver = { | |||
| 284 | .name = "bcma-pci-bridge", | 284 | .name = "bcma-pci-bridge", |
| 285 | .id_table = bcma_pci_bridge_tbl, | 285 | .id_table = bcma_pci_bridge_tbl, |
| 286 | .probe = bcma_host_pci_probe, | 286 | .probe = bcma_host_pci_probe, |
| 287 | .remove = __devexit_p(bcma_host_pci_remove), | 287 | .remove = bcma_host_pci_remove, |
| 288 | .driver.pm = BCMA_PM_OPS, | 288 | .driver.pm = BCMA_PM_OPS, |
| 289 | }; | 289 | }; |
| 290 | 290 | ||
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index 53ba20ca17e0..4a92f647b58b 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c | |||
| @@ -192,7 +192,7 @@ static void bcma_unregister_cores(struct bcma_bus *bus) | |||
| 192 | platform_device_unregister(bus->drv_cc.watchdog); | 192 | platform_device_unregister(bus->drv_cc.watchdog); |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | int __devinit bcma_bus_register(struct bcma_bus *bus) | 195 | int bcma_bus_register(struct bcma_bus *bus) |
| 196 | { | 196 | { |
| 197 | int err; | 197 | int err; |
| 198 | struct bcma_device *core; | 198 | struct bcma_device *core; |
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 6526157edafc..ade58bc8f3c4 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
| @@ -181,8 +181,8 @@ static void cciss_geometry_inquiry(ctlr_info_t *h, int logvol, | |||
| 181 | sector_t total_size, | 181 | sector_t total_size, |
| 182 | unsigned int block_size, InquiryData_struct *inq_buff, | 182 | unsigned int block_size, InquiryData_struct *inq_buff, |
| 183 | drive_info_struct *drv); | 183 | drive_info_struct *drv); |
| 184 | static void __devinit cciss_interrupt_mode(ctlr_info_t *); | 184 | static void cciss_interrupt_mode(ctlr_info_t *); |
| 185 | static int __devinit cciss_enter_simple_mode(struct ctlr_info *h); | 185 | static int cciss_enter_simple_mode(struct ctlr_info *h); |
| 186 | static void start_io(ctlr_info_t *h); | 186 | static void start_io(ctlr_info_t *h); |
| 187 | static int sendcmd_withirq(ctlr_info_t *h, __u8 cmd, void *buff, size_t size, | 187 | static int sendcmd_withirq(ctlr_info_t *h, __u8 cmd, void *buff, size_t size, |
| 188 | __u8 page_code, unsigned char scsi3addr[], | 188 | __u8 page_code, unsigned char scsi3addr[], |
| @@ -199,14 +199,13 @@ static void cciss_device_release(struct device *dev); | |||
| 199 | static void cciss_free_gendisk(ctlr_info_t *h, int drv_index); | 199 | static void cciss_free_gendisk(ctlr_info_t *h, int drv_index); |
| 200 | static void cciss_free_drive_info(ctlr_info_t *h, int drv_index); | 200 | static void cciss_free_drive_info(ctlr_info_t *h, int drv_index); |
| 201 | static inline u32 next_command(ctlr_info_t *h); | 201 | static inline u32 next_command(ctlr_info_t *h); |
| 202 | static int __devinit cciss_find_cfg_addrs(struct pci_dev *pdev, | 202 | static int cciss_find_cfg_addrs(struct pci_dev *pdev, void __iomem *vaddr, |
| 203 | void __iomem *vaddr, u32 *cfg_base_addr, u64 *cfg_base_addr_index, | 203 | u32 *cfg_base_addr, u64 *cfg_base_addr_index, |
| 204 | u64 *cfg_offset); | 204 | u64 *cfg_offset); |
| 205 | static int __devinit cciss_pci_find_memory_BAR(struct pci_dev *pdev, | 205 | static int cciss_pci_find_memory_BAR(struct pci_dev *pdev, |
| 206 | unsigned long *memory_bar); | 206 | unsigned long *memory_bar); |
| 207 | static inline u32 cciss_tag_discard_error_bits(ctlr_info_t *h, u32 tag); | 207 | static inline u32 cciss_tag_discard_error_bits(ctlr_info_t *h, u32 tag); |
| 208 | static __devinit int write_driver_ver_to_cfgtable( | 208 | static int write_driver_ver_to_cfgtable(CfgTable_struct __iomem *cfgtable); |
| 209 | CfgTable_struct __iomem *cfgtable); | ||
| 210 | 209 | ||
| 211 | /* performant mode helper functions */ | 210 | /* performant mode helper functions */ |
| 212 | static void calc_bucket_map(int *bucket, int num_buckets, int nsgs, | 211 | static void calc_bucket_map(int *bucket, int num_buckets, int nsgs, |
| @@ -550,7 +549,7 @@ static const struct file_operations cciss_proc_fops = { | |||
| 550 | .write = cciss_proc_write, | 549 | .write = cciss_proc_write, |
| 551 | }; | 550 | }; |
| 552 | 551 | ||
| 553 | static void __devinit cciss_procinit(ctlr_info_t *h) | 552 | static void cciss_procinit(ctlr_info_t *h) |
| 554 | { | 553 | { |
| 555 | struct proc_dir_entry *pde; | 554 | struct proc_dir_entry *pde; |
| 556 | 555 | ||
| @@ -2663,8 +2662,8 @@ static int fill_cmd(ctlr_info_t *h, CommandList_struct *c, __u8 cmd, void *buff, | |||
| 2663 | return status; | 2662 | return status; |
| 2664 | } | 2663 | } |
| 2665 | 2664 | ||
| 2666 | static int __devinit cciss_send_reset(ctlr_info_t *h, unsigned char *scsi3addr, | 2665 | static int cciss_send_reset(ctlr_info_t *h, unsigned char *scsi3addr, |
| 2667 | u8 reset_type) | 2666 | u8 reset_type) |
| 2668 | { | 2667 | { |
| 2669 | CommandList_struct *c; | 2668 | CommandList_struct *c; |
| 2670 | int return_status; | 2669 | int return_status; |
| @@ -3919,7 +3918,7 @@ static void calc_bucket_map(int bucket[], int num_buckets, | |||
| 3919 | } | 3918 | } |
| 3920 | } | 3919 | } |
| 3921 | 3920 | ||
| 3922 | static void __devinit cciss_wait_for_mode_change_ack(ctlr_info_t *h) | 3921 | static void cciss_wait_for_mode_change_ack(ctlr_info_t *h) |
| 3923 | { | 3922 | { |
| 3924 | int i; | 3923 | int i; |
| 3925 | 3924 | ||
| @@ -3933,8 +3932,7 @@ static void __devinit cciss_wait_for_mode_change_ack(ctlr_info_t *h) | |||
| 3933 | } | 3932 | } |
| 3934 | } | 3933 | } |
| 3935 | 3934 | ||
| 3936 | static __devinit void cciss_enter_performant_mode(ctlr_info_t *h, | 3935 | static void cciss_enter_performant_mode(ctlr_info_t *h, u32 use_short_tags) |
| 3937 | u32 use_short_tags) | ||
| 3938 | { | 3936 | { |
| 3939 | /* This is a bit complicated. There are 8 registers on | 3937 | /* This is a bit complicated. There are 8 registers on |
| 3940 | * the controller which we write to to tell it 8 different | 3938 | * the controller which we write to to tell it 8 different |
| @@ -4000,7 +3998,7 @@ static __devinit void cciss_enter_performant_mode(ctlr_info_t *h, | |||
| 4000 | " performant mode\n"); | 3998 | " performant mode\n"); |
| 4001 | } | 3999 | } |
| 4002 | 4000 | ||
| 4003 | static void __devinit cciss_put_controller_into_performant_mode(ctlr_info_t *h) | 4001 | static void cciss_put_controller_into_performant_mode(ctlr_info_t *h) |
| 4004 | { | 4002 | { |
| 4005 | __u32 trans_support; | 4003 | __u32 trans_support; |
| 4006 | 4004 | ||
| @@ -4062,7 +4060,7 @@ clean_up: | |||
| 4062 | * controllers that are capable. If not, we use IO-APIC mode. | 4060 | * controllers that are capable. If not, we use IO-APIC mode. |
| 4063 | */ | 4061 | */ |
| 4064 | 4062 | ||
| 4065 | static void __devinit cciss_interrupt_mode(ctlr_info_t *h) | 4063 | static void cciss_interrupt_mode(ctlr_info_t *h) |
| 4066 | { | 4064 | { |
| 4067 | #ifdef CONFIG_PCI_MSI | 4065 | #ifdef CONFIG_PCI_MSI |
| 4068 | int err; | 4066 | int err; |
| @@ -4108,7 +4106,7 @@ default_int_mode: | |||
| 4108 | return; | 4106 | return; |
| 4109 | } | 4107 | } |
| 4110 | 4108 | ||
| 4111 | static int __devinit cciss_lookup_board_id(struct pci_dev *pdev, u32 *board_id) | 4109 | static int cciss_lookup_board_id(struct pci_dev *pdev, u32 *board_id) |
| 4112 | { | 4110 | { |
| 4113 | int i; | 4111 | int i; |
| 4114 | u32 subsystem_vendor_id, subsystem_device_id; | 4112 | u32 subsystem_vendor_id, subsystem_device_id; |
| @@ -4134,8 +4132,8 @@ static inline bool cciss_board_disabled(ctlr_info_t *h) | |||
| 4134 | return ((command & PCI_COMMAND_MEMORY) == 0); | 4132 | return ((command & PCI_COMMAND_MEMORY) == 0); |
| 4135 | } | 4133 | } |
| 4136 | 4134 | ||
| 4137 | static int __devinit cciss_pci_find_memory_BAR(struct pci_dev *pdev, | 4135 | static int cciss_pci_find_memory_BAR(struct pci_dev *pdev, |
| 4138 | unsigned long *memory_bar) | 4136 | unsigned long *memory_bar) |
| 4139 | { | 4137 | { |
| 4140 | int i; | 4138 | int i; |
| 4141 | 4139 | ||
| @@ -4151,8 +4149,8 @@ static int __devinit cciss_pci_find_memory_BAR(struct pci_dev *pdev, | |||
| 4151 | return -ENODEV; | 4149 | return -ENODEV; |
| 4152 | } | 4150 | } |
| 4153 | 4151 | ||
| 4154 | static int __devinit cciss_wait_for_board_state(struct pci_dev *pdev, | 4152 | static int cciss_wait_for_board_state(struct pci_dev *pdev, |
| 4155 | void __iomem *vaddr, int wait_for_ready) | 4153 | void __iomem *vaddr, int wait_for_ready) |
| 4156 | #define BOARD_READY 1 | 4154 | #define BOARD_READY 1 |
| 4157 | #define BOARD_NOT_READY 0 | 4155 | #define BOARD_NOT_READY 0 |
| 4158 | { | 4156 | { |
| @@ -4179,9 +4177,9 @@ static int __devinit cciss_wait_for_board_state(struct pci_dev *pdev, | |||
| 4179 | return -ENODEV; | 4177 | return -ENODEV; |
| 4180 | } | 4178 | } |
| 4181 | 4179 | ||
| 4182 | static int __devinit cciss_find_cfg_addrs(struct pci_dev *pdev, | 4180 | static int cciss_find_cfg_addrs(struct pci_dev *pdev, void __iomem *vaddr, |
| 4183 | void __iomem *vaddr, u32 *cfg_base_addr, u64 *cfg_base_addr_index, | 4181 | u32 *cfg_base_addr, u64 *cfg_base_addr_index, |
| 4184 | u64 *cfg_offset) | 4182 | u64 *cfg_offset) |
| 4185 | { | 4183 | { |
| 4186 | *cfg_base_addr = readl(vaddr + SA5_CTCFG_OFFSET); | 4184 | *cfg_base_addr = readl(vaddr + SA5_CTCFG_OFFSET); |
| 4187 | *cfg_offset = readl(vaddr + SA5_CTMEM_OFFSET); | 4185 | *cfg_offset = readl(vaddr + SA5_CTMEM_OFFSET); |
| @@ -4195,7 +4193,7 @@ static int __devinit cciss_find_cfg_addrs(struct pci_dev *pdev, | |||
| 4195 | return 0; | 4193 | return 0; |
| 4196 | } | 4194 | } |
| 4197 | 4195 | ||
| 4198 | static int __devinit cciss_find_cfgtables(ctlr_info_t *h) | 4196 | static int cciss_find_cfgtables(ctlr_info_t *h) |
| 4199 | { | 4197 | { |
| 4200 | u64 cfg_offset; | 4198 | u64 cfg_offset; |
| 4201 | u32 cfg_base_addr; | 4199 | u32 cfg_base_addr; |
| @@ -4224,7 +4222,7 @@ static int __devinit cciss_find_cfgtables(ctlr_info_t *h) | |||
| 4224 | return 0; | 4222 | return 0; |
| 4225 | } | 4223 | } |
| 4226 | 4224 | ||
| 4227 | static void __devinit cciss_get_max_perf_mode_cmds(struct ctlr_info *h) | 4225 | static void cciss_get_max_perf_mode_cmds(struct ctlr_info *h) |
| 4228 | { | 4226 | { |
| 4229 | h->max_commands = readl(&(h->cfgtable->MaxPerformantModeCommands)); | 4227 | h->max_commands = readl(&(h->cfgtable->MaxPerformantModeCommands)); |
| 4230 | 4228 | ||
| @@ -4245,7 +4243,7 @@ static void __devinit cciss_get_max_perf_mode_cmds(struct ctlr_info *h) | |||
| 4245 | * max commands, max SG elements without chaining, and with chaining, | 4243 | * max commands, max SG elements without chaining, and with chaining, |
| 4246 | * SG chain block size, etc. | 4244 | * SG chain block size, etc. |
| 4247 | */ | 4245 | */ |
| 4248 | static void __devinit cciss_find_board_params(ctlr_info_t *h) | 4246 | static void cciss_find_board_params(ctlr_info_t *h) |
| 4249 | { | 4247 | { |
| 4250 | cciss_get_max_perf_mode_cmds(h); | 4248 | cciss_get_max_perf_mode_cmds(h); |
| 4251 | h->nr_cmds = h->max_commands - 4 - cciss_tape_cmds; | 4249 | h->nr_cmds = h->max_commands - 4 - cciss_tape_cmds; |
| @@ -4304,7 +4302,7 @@ static inline void cciss_p600_dma_prefetch_quirk(ctlr_info_t *h) | |||
| 4304 | pci_write_config_dword(h->pdev, PCI_COMMAND_PARITY, dma_refetch); | 4302 | pci_write_config_dword(h->pdev, PCI_COMMAND_PARITY, dma_refetch); |
| 4305 | } | 4303 | } |
| 4306 | 4304 | ||
| 4307 | static int __devinit cciss_pci_init(ctlr_info_t *h) | 4305 | static int cciss_pci_init(ctlr_info_t *h) |
| 4308 | { | 4306 | { |
| 4309 | int prod_index, err; | 4307 | int prod_index, err; |
| 4310 | 4308 | ||
| @@ -4424,7 +4422,8 @@ static void free_hba(ctlr_info_t *h) | |||
| 4424 | } | 4422 | } |
| 4425 | 4423 | ||
| 4426 | /* Send a message CDB to the firmware. */ | 4424 | /* Send a message CDB to the firmware. */ |
| 4427 | static __devinit int cciss_message(struct pci_dev *pdev, unsigned char opcode, unsigned char type) | 4425 | static int cciss_message(struct pci_dev *pdev, unsigned char opcode, |
| 4426 | unsigned char type) | ||
| 4428 | { | 4427 | { |
| 4429 | typedef struct { | 4428 | typedef struct { |
| 4430 | CommandListHeader_struct CommandHeader; | 4429 | CommandListHeader_struct CommandHeader; |
| @@ -4571,14 +4570,13 @@ static int cciss_controller_hard_reset(struct pci_dev *pdev, | |||
| 4571 | return 0; | 4570 | return 0; |
| 4572 | } | 4571 | } |
| 4573 | 4572 | ||
| 4574 | static __devinit void init_driver_version(char *driver_version, int len) | 4573 | static void init_driver_version(char *driver_version, int len) |
| 4575 | { | 4574 | { |
| 4576 | memset(driver_version, 0, len); | 4575 | memset(driver_version, 0, len); |
| 4577 | strncpy(driver_version, "cciss " DRIVER_NAME, len - 1); | 4576 | strncpy(driver_version, "cciss " DRIVER_NAME, len - 1); |
| 4578 | } | 4577 | } |
| 4579 | 4578 | ||
| 4580 | static __devinit int write_driver_ver_to_cfgtable( | 4579 | static int write_driver_ver_to_cfgtable(CfgTable_struct __iomem *cfgtable) |
| 4581 | CfgTable_struct __iomem *cfgtable) | ||
| 4582 | { | 4580 | { |
| 4583 | char *driver_version; | 4581 | char *driver_version; |
| 4584 | int i, size = sizeof(cfgtable->driver_version); | 4582 | int i, size = sizeof(cfgtable->driver_version); |
| @@ -4594,8 +4592,8 @@ static __devinit int write_driver_ver_to_cfgtable( | |||
| 4594 | return 0; | 4592 | return 0; |
| 4595 | } | 4593 | } |
| 4596 | 4594 | ||
| 4597 | static __devinit void read_driver_ver_from_cfgtable( | 4595 | static void read_driver_ver_from_cfgtable(CfgTable_struct __iomem *cfgtable, |
| 4598 | CfgTable_struct __iomem *cfgtable, unsigned char *driver_ver) | 4596 | unsigned char *driver_ver) |
| 4599 | { | 4597 | { |
| 4600 | int i; | 4598 | int i; |
| 4601 | 4599 | ||
| @@ -4603,8 +4601,7 @@ static __devinit void read_driver_ver_from_cfgtable( | |||
| 4603 | driver_ver[i] = readb(&cfgtable->driver_version[i]); | 4601 | driver_ver[i] = readb(&cfgtable->driver_version[i]); |
| 4604 | } | 4602 | } |
| 4605 | 4603 | ||
| 4606 | static __devinit int controller_reset_failed( | 4604 | static int controller_reset_failed(CfgTable_struct __iomem *cfgtable) |
| 4607 | CfgTable_struct __iomem *cfgtable) | ||
| 4608 | { | 4605 | { |
| 4609 | 4606 | ||
| 4610 | char *driver_ver, *old_driver_ver; | 4607 | char *driver_ver, *old_driver_ver; |
| @@ -4627,7 +4624,7 @@ static __devinit int controller_reset_failed( | |||
| 4627 | 4624 | ||
| 4628 | /* This does a hard reset of the controller using PCI power management | 4625 | /* This does a hard reset of the controller using PCI power management |
| 4629 | * states or using the doorbell register. */ | 4626 | * states or using the doorbell register. */ |
| 4630 | static __devinit int cciss_kdump_hard_reset_controller(struct pci_dev *pdev) | 4627 | static int cciss_kdump_hard_reset_controller(struct pci_dev *pdev) |
| 4631 | { | 4628 | { |
| 4632 | u64 cfg_offset; | 4629 | u64 cfg_offset; |
| 4633 | u32 cfg_base_addr; | 4630 | u32 cfg_base_addr; |
| @@ -4772,7 +4769,7 @@ unmap_vaddr: | |||
| 4772 | return rc; | 4769 | return rc; |
| 4773 | } | 4770 | } |
| 4774 | 4771 | ||
| 4775 | static __devinit int cciss_init_reset_devices(struct pci_dev *pdev) | 4772 | static int cciss_init_reset_devices(struct pci_dev *pdev) |
| 4776 | { | 4773 | { |
| 4777 | int rc, i; | 4774 | int rc, i; |
| 4778 | 4775 | ||
| @@ -4806,7 +4803,7 @@ static __devinit int cciss_init_reset_devices(struct pci_dev *pdev) | |||
| 4806 | return 0; | 4803 | return 0; |
| 4807 | } | 4804 | } |
| 4808 | 4805 | ||
| 4809 | static __devinit int cciss_allocate_cmd_pool(ctlr_info_t *h) | 4806 | static int cciss_allocate_cmd_pool(ctlr_info_t *h) |
| 4810 | { | 4807 | { |
| 4811 | h->cmd_pool_bits = kmalloc(BITS_TO_LONGS(h->nr_cmds) * | 4808 | h->cmd_pool_bits = kmalloc(BITS_TO_LONGS(h->nr_cmds) * |
| 4812 | sizeof(unsigned long), GFP_KERNEL); | 4809 | sizeof(unsigned long), GFP_KERNEL); |
| @@ -4825,7 +4822,7 @@ static __devinit int cciss_allocate_cmd_pool(ctlr_info_t *h) | |||
| 4825 | return 0; | 4822 | return 0; |
| 4826 | } | 4823 | } |
| 4827 | 4824 | ||
| 4828 | static __devinit int cciss_allocate_scatterlists(ctlr_info_t *h) | 4825 | static int cciss_allocate_scatterlists(ctlr_info_t *h) |
| 4829 | { | 4826 | { |
| 4830 | int i; | 4827 | int i; |
| 4831 | 4828 | ||
| @@ -4893,7 +4890,7 @@ static int cciss_request_irq(ctlr_info_t *h, | |||
| 4893 | return -1; | 4890 | return -1; |
| 4894 | } | 4891 | } |
| 4895 | 4892 | ||
| 4896 | static int __devinit cciss_kdump_soft_reset(ctlr_info_t *h) | 4893 | static int cciss_kdump_soft_reset(ctlr_info_t *h) |
| 4897 | { | 4894 | { |
| 4898 | if (cciss_send_reset(h, CTLR_LUNID, CCISS_RESET_TYPE_CONTROLLER)) { | 4895 | if (cciss_send_reset(h, CTLR_LUNID, CCISS_RESET_TYPE_CONTROLLER)) { |
| 4899 | dev_warn(&h->pdev->dev, "Resetting array controller failed.\n"); | 4896 | dev_warn(&h->pdev->dev, "Resetting array controller failed.\n"); |
| @@ -4952,8 +4949,7 @@ static void cciss_undo_allocations_after_kdump_soft_reset(ctlr_info_t *h) | |||
| 4952 | * stealing all these major device numbers. | 4949 | * stealing all these major device numbers. |
| 4953 | * returns the number of block devices registered. | 4950 | * returns the number of block devices registered. |
| 4954 | */ | 4951 | */ |
| 4955 | static int __devinit cciss_init_one(struct pci_dev *pdev, | 4952 | static int cciss_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 4956 | const struct pci_device_id *ent) | ||
| 4957 | { | 4953 | { |
| 4958 | int i; | 4954 | int i; |
| 4959 | int j = 0; | 4955 | int j = 0; |
| @@ -5207,7 +5203,7 @@ static void cciss_shutdown(struct pci_dev *pdev) | |||
| 5207 | free_irq(h->intr[h->intr_mode], h); | 5203 | free_irq(h->intr[h->intr_mode], h); |
| 5208 | } | 5204 | } |
| 5209 | 5205 | ||
| 5210 | static int __devinit cciss_enter_simple_mode(struct ctlr_info *h) | 5206 | static int cciss_enter_simple_mode(struct ctlr_info *h) |
| 5211 | { | 5207 | { |
| 5212 | u32 trans_support; | 5208 | u32 trans_support; |
| 5213 | 5209 | ||
| @@ -5229,7 +5225,7 @@ static int __devinit cciss_enter_simple_mode(struct ctlr_info *h) | |||
| 5229 | } | 5225 | } |
| 5230 | 5226 | ||
| 5231 | 5227 | ||
| 5232 | static void __devexit cciss_remove_one(struct pci_dev *pdev) | 5228 | static void cciss_remove_one(struct pci_dev *pdev) |
| 5233 | { | 5229 | { |
| 5234 | ctlr_info_t *h; | 5230 | ctlr_info_t *h; |
| 5235 | int i, j; | 5231 | int i, j; |
| @@ -5308,7 +5304,7 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev) | |||
| 5308 | static struct pci_driver cciss_pci_driver = { | 5304 | static struct pci_driver cciss_pci_driver = { |
| 5309 | .name = "cciss", | 5305 | .name = "cciss", |
| 5310 | .probe = cciss_init_one, | 5306 | .probe = cciss_init_one, |
| 5311 | .remove = __devexit_p(cciss_remove_one), | 5307 | .remove = cciss_remove_one, |
| 5312 | .id_table = cciss_pci_device_id, /* id_table */ | 5308 | .id_table = cciss_pci_device_id, /* id_table */ |
| 5313 | .shutdown = cciss_shutdown, | 5309 | .shutdown = cciss_shutdown, |
| 5314 | }; | 5310 | }; |
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index 9125bbeacd4d..3f087133a25a 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c | |||
| @@ -320,7 +320,7 @@ static void release_io_mem(ctlr_info_t *c) | |||
| 320 | c->io_mem_length = 0; | 320 | c->io_mem_length = 0; |
| 321 | } | 321 | } |
| 322 | 322 | ||
| 323 | static void __devexit cpqarray_remove_one(int i) | 323 | static void cpqarray_remove_one(int i) |
| 324 | { | 324 | { |
| 325 | int j; | 325 | int j; |
| 326 | char buff[4]; | 326 | char buff[4]; |
| @@ -352,7 +352,7 @@ static void __devexit cpqarray_remove_one(int i) | |||
| 352 | free_hba(i); | 352 | free_hba(i); |
| 353 | } | 353 | } |
| 354 | 354 | ||
| 355 | static void __devexit cpqarray_remove_one_pci (struct pci_dev *pdev) | 355 | static void cpqarray_remove_one_pci(struct pci_dev *pdev) |
| 356 | { | 356 | { |
| 357 | int i; | 357 | int i; |
| 358 | ctlr_info_t *tmp_ptr; | 358 | ctlr_info_t *tmp_ptr; |
| @@ -377,7 +377,7 @@ static void __devexit cpqarray_remove_one_pci (struct pci_dev *pdev) | |||
| 377 | /* removing an instance that was not removed automatically.. | 377 | /* removing an instance that was not removed automatically.. |
| 378 | * must be an eisa card. | 378 | * must be an eisa card. |
| 379 | */ | 379 | */ |
| 380 | static void __devexit cpqarray_remove_one_eisa (int i) | 380 | static void cpqarray_remove_one_eisa(int i) |
| 381 | { | 381 | { |
| 382 | if (hba[i] == NULL) { | 382 | if (hba[i] == NULL) { |
| 383 | printk(KERN_ERR "cpqarray: controller %d appears to have" | 383 | printk(KERN_ERR "cpqarray: controller %d appears to have" |
| @@ -388,7 +388,7 @@ static void __devexit cpqarray_remove_one_eisa (int i) | |||
| 388 | } | 388 | } |
| 389 | 389 | ||
| 390 | /* pdev is NULL for eisa */ | 390 | /* pdev is NULL for eisa */ |
| 391 | static int __devinit cpqarray_register_ctlr( int i, struct pci_dev *pdev) | 391 | static int cpqarray_register_ctlr(int i, struct pci_dev *pdev) |
| 392 | { | 392 | { |
| 393 | struct request_queue *q; | 393 | struct request_queue *q; |
| 394 | int j; | 394 | int j; |
| @@ -505,8 +505,8 @@ Enomem4: | |||
| 505 | return -1; | 505 | return -1; |
| 506 | } | 506 | } |
| 507 | 507 | ||
| 508 | static int __devinit cpqarray_init_one( struct pci_dev *pdev, | 508 | static int cpqarray_init_one(struct pci_dev *pdev, |
| 509 | const struct pci_device_id *ent) | 509 | const struct pci_device_id *ent) |
| 510 | { | 510 | { |
| 511 | int i; | 511 | int i; |
| 512 | 512 | ||
| @@ -536,7 +536,7 @@ static int __devinit cpqarray_init_one( struct pci_dev *pdev, | |||
| 536 | static struct pci_driver cpqarray_pci_driver = { | 536 | static struct pci_driver cpqarray_pci_driver = { |
| 537 | .name = "cpqarray", | 537 | .name = "cpqarray", |
| 538 | .probe = cpqarray_init_one, | 538 | .probe = cpqarray_init_one, |
| 539 | .remove = __devexit_p(cpqarray_remove_one_pci), | 539 | .remove = cpqarray_remove_one_pci, |
| 540 | .id_table = cpqarray_pci_device_id, | 540 | .id_table = cpqarray_pci_device_id, |
| 541 | }; | 541 | }; |
| 542 | 542 | ||
| @@ -742,7 +742,7 @@ __setup("smart2=", cpqarray_setup); | |||
| 742 | /* | 742 | /* |
| 743 | * Find an EISA controller's signature. Set up an hba if we find it. | 743 | * Find an EISA controller's signature. Set up an hba if we find it. |
| 744 | */ | 744 | */ |
| 745 | static int __devinit cpqarray_eisa_detect(void) | 745 | static int cpqarray_eisa_detect(void) |
| 746 | { | 746 | { |
| 747 | int i=0, j; | 747 | int i=0, j; |
| 748 | __u32 board_id; | 748 | __u32 board_id; |
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c index 931769e133e5..07fb2dfaae13 100644 --- a/drivers/block/nvme.c +++ b/drivers/block/nvme.c | |||
| @@ -975,8 +975,8 @@ static int queue_request_irq(struct nvme_dev *dev, struct nvme_queue *nvmeq, | |||
| 975 | IRQF_DISABLED | IRQF_SHARED, name, nvmeq); | 975 | IRQF_DISABLED | IRQF_SHARED, name, nvmeq); |
| 976 | } | 976 | } |
| 977 | 977 | ||
| 978 | static __devinit struct nvme_queue *nvme_create_queue(struct nvme_dev *dev, | 978 | static struct nvme_queue *nvme_create_queue(struct nvme_dev *dev, int qid, |
| 979 | int qid, int cq_size, int vector) | 979 | int cq_size, int vector) |
| 980 | { | 980 | { |
| 981 | int result; | 981 | int result; |
| 982 | struct nvme_queue *nvmeq = nvme_alloc_queue(dev, qid, cq_size, vector); | 982 | struct nvme_queue *nvmeq = nvme_alloc_queue(dev, qid, cq_size, vector); |
| @@ -1011,7 +1011,7 @@ static __devinit struct nvme_queue *nvme_create_queue(struct nvme_dev *dev, | |||
| 1011 | return ERR_PTR(result); | 1011 | return ERR_PTR(result); |
| 1012 | } | 1012 | } |
| 1013 | 1013 | ||
| 1014 | static int __devinit nvme_configure_admin_queue(struct nvme_dev *dev) | 1014 | static int nvme_configure_admin_queue(struct nvme_dev *dev) |
| 1015 | { | 1015 | { |
| 1016 | int result = 0; | 1016 | int result = 0; |
| 1017 | u32 aqa; | 1017 | u32 aqa; |
| @@ -1408,7 +1408,7 @@ static int set_queue_count(struct nvme_dev *dev, int count) | |||
| 1408 | return min(result & 0xffff, result >> 16) + 1; | 1408 | return min(result & 0xffff, result >> 16) + 1; |
| 1409 | } | 1409 | } |
| 1410 | 1410 | ||
| 1411 | static int __devinit nvme_setup_io_queues(struct nvme_dev *dev) | 1411 | static int nvme_setup_io_queues(struct nvme_dev *dev) |
| 1412 | { | 1412 | { |
| 1413 | int result, cpu, i, nr_io_queues, db_bar_size, q_depth; | 1413 | int result, cpu, i, nr_io_queues, db_bar_size, q_depth; |
| 1414 | 1414 | ||
| @@ -1481,7 +1481,7 @@ static void nvme_free_queues(struct nvme_dev *dev) | |||
| 1481 | nvme_free_queue(dev, i); | 1481 | nvme_free_queue(dev, i); |
| 1482 | } | 1482 | } |
| 1483 | 1483 | ||
| 1484 | static int __devinit nvme_dev_add(struct nvme_dev *dev) | 1484 | static int nvme_dev_add(struct nvme_dev *dev) |
| 1485 | { | 1485 | { |
| 1486 | int res, nn, i; | 1486 | int res, nn, i; |
| 1487 | struct nvme_ns *ns, *next; | 1487 | struct nvme_ns *ns, *next; |
| @@ -1619,8 +1619,7 @@ static void nvme_release_instance(struct nvme_dev *dev) | |||
| 1619 | spin_unlock(&dev_list_lock); | 1619 | spin_unlock(&dev_list_lock); |
| 1620 | } | 1620 | } |
| 1621 | 1621 | ||
| 1622 | static int __devinit nvme_probe(struct pci_dev *pdev, | 1622 | static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 1623 | const struct pci_device_id *id) | ||
| 1624 | { | 1623 | { |
| 1625 | int bars, result = -ENOMEM; | 1624 | int bars, result = -ENOMEM; |
| 1626 | struct nvme_dev *dev; | 1625 | struct nvme_dev *dev; |
| @@ -1702,7 +1701,7 @@ static int __devinit nvme_probe(struct pci_dev *pdev, | |||
| 1702 | return result; | 1701 | return result; |
| 1703 | } | 1702 | } |
| 1704 | 1703 | ||
| 1705 | static void __devexit nvme_remove(struct pci_dev *pdev) | 1704 | static void nvme_remove(struct pci_dev *pdev) |
| 1706 | { | 1705 | { |
| 1707 | struct nvme_dev *dev = pci_get_drvdata(pdev); | 1706 | struct nvme_dev *dev = pci_get_drvdata(pdev); |
| 1708 | nvme_dev_remove(dev); | 1707 | nvme_dev_remove(dev); |
| @@ -1747,7 +1746,7 @@ static struct pci_driver nvme_driver = { | |||
| 1747 | .name = "nvme", | 1746 | .name = "nvme", |
| 1748 | .id_table = nvme_id_table, | 1747 | .id_table = nvme_id_table, |
| 1749 | .probe = nvme_probe, | 1748 | .probe = nvme_probe, |
| 1750 | .remove = __devexit_p(nvme_remove), | 1749 | .remove = nvme_remove, |
| 1751 | .suspend = nvme_suspend, | 1750 | .suspend = nvme_suspend, |
| 1752 | .resume = nvme_resume, | 1751 | .resume = nvme_resume, |
| 1753 | .err_handler = &nvme_err_handler, | 1752 | .err_handler = &nvme_err_handler, |
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c index da0abc1838c1..d754a88d7585 100644 --- a/drivers/block/ps3disk.c +++ b/drivers/block/ps3disk.c | |||
| @@ -401,7 +401,7 @@ static unsigned long ps3disk_mask; | |||
| 401 | 401 | ||
| 402 | static DEFINE_MUTEX(ps3disk_mask_mutex); | 402 | static DEFINE_MUTEX(ps3disk_mask_mutex); |
| 403 | 403 | ||
| 404 | static int __devinit ps3disk_probe(struct ps3_system_bus_device *_dev) | 404 | static int ps3disk_probe(struct ps3_system_bus_device *_dev) |
| 405 | { | 405 | { |
| 406 | struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core); | 406 | struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core); |
| 407 | struct ps3disk_private *priv; | 407 | struct ps3disk_private *priv; |
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index f58cdcfb305f..75e112d66006 100644 --- a/drivers/block/ps3vram.c +++ b/drivers/block/ps3vram.c | |||
| @@ -536,7 +536,7 @@ static const struct file_operations ps3vram_proc_fops = { | |||
| 536 | .release = single_release, | 536 | .release = single_release, |
| 537 | }; | 537 | }; |
| 538 | 538 | ||
| 539 | static void __devinit ps3vram_proc_init(struct ps3_system_bus_device *dev) | 539 | static void ps3vram_proc_init(struct ps3_system_bus_device *dev) |
| 540 | { | 540 | { |
| 541 | struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev); | 541 | struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev); |
| 542 | struct proc_dir_entry *pde; | 542 | struct proc_dir_entry *pde; |
| @@ -618,7 +618,7 @@ static void ps3vram_make_request(struct request_queue *q, struct bio *bio) | |||
| 618 | } while (bio); | 618 | } while (bio); |
| 619 | } | 619 | } |
| 620 | 620 | ||
| 621 | static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev) | 621 | static int ps3vram_probe(struct ps3_system_bus_device *dev) |
| 622 | { | 622 | { |
| 623 | struct ps3vram_priv *priv; | 623 | struct ps3vram_priv *priv; |
| 624 | int error, status; | 624 | int error, status; |
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c index 9dcf76a10bb6..564156a8e572 100644 --- a/drivers/block/sunvdc.c +++ b/drivers/block/sunvdc.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | #define DRV_MODULE_VERSION "1.0" | 25 | #define DRV_MODULE_VERSION "1.0" |
| 26 | #define DRV_MODULE_RELDATE "June 25, 2007" | 26 | #define DRV_MODULE_RELDATE "June 25, 2007" |
| 27 | 27 | ||
| 28 | static char version[] __devinitdata = | 28 | static char version[] = |
| 29 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; | 29 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; |
| 30 | MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); | 30 | MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); |
| 31 | MODULE_DESCRIPTION("Sun LDOM virtual disk client driver"); | 31 | MODULE_DESCRIPTION("Sun LDOM virtual disk client driver"); |
| @@ -592,7 +592,7 @@ static int generic_request(struct vdc_port *port, u8 op, void *buf, int len) | |||
| 592 | return err; | 592 | return err; |
| 593 | } | 593 | } |
| 594 | 594 | ||
| 595 | static int __devinit vdc_alloc_tx_ring(struct vdc_port *port) | 595 | static int vdc_alloc_tx_ring(struct vdc_port *port) |
| 596 | { | 596 | { |
| 597 | struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; | 597 | struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; |
| 598 | unsigned long len, entry_size; | 598 | unsigned long len, entry_size; |
| @@ -725,7 +725,7 @@ static struct vio_driver_ops vdc_vio_ops = { | |||
| 725 | .handshake_complete = vdc_handshake_complete, | 725 | .handshake_complete = vdc_handshake_complete, |
| 726 | }; | 726 | }; |
| 727 | 727 | ||
| 728 | static void __devinit print_version(void) | 728 | static void print_version(void) |
| 729 | { | 729 | { |
| 730 | static int version_printed; | 730 | static int version_printed; |
| 731 | 731 | ||
| @@ -733,8 +733,7 @@ static void __devinit print_version(void) | |||
| 733 | printk(KERN_INFO "%s", version); | 733 | printk(KERN_INFO "%s", version); |
| 734 | } | 734 | } |
| 735 | 735 | ||
| 736 | static int __devinit vdc_port_probe(struct vio_dev *vdev, | 736 | static int vdc_port_probe(struct vio_dev *vdev, const struct vio_device_id *id) |
| 737 | const struct vio_device_id *id) | ||
| 738 | { | 737 | { |
| 739 | struct mdesc_handle *hp; | 738 | struct mdesc_handle *hp; |
| 740 | struct vdc_port *port; | 739 | struct vdc_port *port; |
diff --git a/drivers/block/swim.c b/drivers/block/swim.c index 6d5a914b9619..765fa2b3d337 100644 --- a/drivers/block/swim.c +++ b/drivers/block/swim.c | |||
| @@ -788,8 +788,7 @@ static struct kobject *floppy_find(dev_t dev, int *part, void *data) | |||
| 788 | return get_disk(swd->unit[drive].disk); | 788 | return get_disk(swd->unit[drive].disk); |
| 789 | } | 789 | } |
| 790 | 790 | ||
| 791 | static int __devinit swim_add_floppy(struct swim_priv *swd, | 791 | static int swim_add_floppy(struct swim_priv *swd, enum drive_location location) |
| 792 | enum drive_location location) | ||
| 793 | { | 792 | { |
| 794 | struct floppy_state *fs = &swd->unit[swd->floppy_count]; | 793 | struct floppy_state *fs = &swd->unit[swd->floppy_count]; |
| 795 | struct swim __iomem *base = swd->base; | 794 | struct swim __iomem *base = swd->base; |
| @@ -812,7 +811,7 @@ static int __devinit swim_add_floppy(struct swim_priv *swd, | |||
| 812 | return 0; | 811 | return 0; |
| 813 | } | 812 | } |
| 814 | 813 | ||
| 815 | static int __devinit swim_floppy_init(struct swim_priv *swd) | 814 | static int swim_floppy_init(struct swim_priv *swd) |
| 816 | { | 815 | { |
| 817 | int err; | 816 | int err; |
| 818 | int drive; | 817 | int drive; |
| @@ -875,7 +874,7 @@ exit_put_disks: | |||
| 875 | return err; | 874 | return err; |
| 876 | } | 875 | } |
| 877 | 876 | ||
| 878 | static int __devinit swim_probe(struct platform_device *dev) | 877 | static int swim_probe(struct platform_device *dev) |
| 879 | { | 878 | { |
| 880 | struct resource *res; | 879 | struct resource *res; |
| 881 | struct swim __iomem *swim_base; | 880 | struct swim __iomem *swim_base; |
| @@ -936,7 +935,7 @@ out: | |||
| 936 | return ret; | 935 | return ret; |
| 937 | } | 936 | } |
| 938 | 937 | ||
| 939 | static int __devexit swim_remove(struct platform_device *dev) | 938 | static int swim_remove(struct platform_device *dev) |
| 940 | { | 939 | { |
| 941 | struct swim_priv *swd = platform_get_drvdata(dev); | 940 | struct swim_priv *swd = platform_get_drvdata(dev); |
| 942 | int drive; | 941 | int drive; |
| @@ -972,7 +971,7 @@ static int __devexit swim_remove(struct platform_device *dev) | |||
| 972 | 971 | ||
| 973 | static struct platform_driver swim_driver = { | 972 | static struct platform_driver swim_driver = { |
| 974 | .probe = swim_probe, | 973 | .probe = swim_probe, |
| 975 | .remove = __devexit_p(swim_remove), | 974 | .remove = swim_remove, |
| 976 | .driver = { | 975 | .driver = { |
| 977 | .name = CARDNAME, | 976 | .name = CARDNAME, |
| 978 | .owner = THIS_MODULE, | 977 | .owner = THIS_MODULE, |
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c index 89ddab127e33..57763c54363a 100644 --- a/drivers/block/swim3.c +++ b/drivers/block/swim3.c | |||
| @@ -1194,7 +1194,8 @@ static int swim3_add_device(struct macio_dev *mdev, int index) | |||
| 1194 | return rc; | 1194 | return rc; |
| 1195 | } | 1195 | } |
| 1196 | 1196 | ||
| 1197 | static int __devinit swim3_attach(struct macio_dev *mdev, const struct of_device_id *match) | 1197 | static int swim3_attach(struct macio_dev *mdev, |
| 1198 | const struct of_device_id *match) | ||
| 1198 | { | 1199 | { |
| 1199 | struct gendisk *disk; | 1200 | struct gendisk *disk; |
| 1200 | int index, rc; | 1201 | int index, rc; |
diff --git a/drivers/block/umem.c b/drivers/block/umem.c index eb0d8216f557..ad70868f8a96 100644 --- a/drivers/block/umem.c +++ b/drivers/block/umem.c | |||
| @@ -789,8 +789,7 @@ static const struct block_device_operations mm_fops = { | |||
| 789 | .revalidate_disk = mm_revalidate, | 789 | .revalidate_disk = mm_revalidate, |
| 790 | }; | 790 | }; |
| 791 | 791 | ||
| 792 | static int __devinit mm_pci_probe(struct pci_dev *dev, | 792 | static int mm_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) |
| 793 | const struct pci_device_id *id) | ||
| 794 | { | 793 | { |
| 795 | int ret = -ENODEV; | 794 | int ret = -ENODEV; |
| 796 | struct cardinfo *card = &cards[num_cards]; | 795 | struct cardinfo *card = &cards[num_cards]; |
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 0bdde8fba397..9d8409c02082 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
| @@ -696,7 +696,7 @@ static const struct device_attribute dev_attr_cache_type_rw = | |||
| 696 | __ATTR(cache_type, S_IRUGO|S_IWUSR, | 696 | __ATTR(cache_type, S_IRUGO|S_IWUSR, |
| 697 | virtblk_cache_type_show, virtblk_cache_type_store); | 697 | virtblk_cache_type_show, virtblk_cache_type_store); |
| 698 | 698 | ||
| 699 | static int __devinit virtblk_probe(struct virtio_device *vdev) | 699 | static int virtblk_probe(struct virtio_device *vdev) |
| 700 | { | 700 | { |
| 701 | struct virtio_blk *vblk; | 701 | struct virtio_blk *vblk; |
| 702 | struct request_queue *q; | 702 | struct request_queue *q; |
| @@ -885,7 +885,7 @@ out: | |||
| 885 | return err; | 885 | return err; |
| 886 | } | 886 | } |
| 887 | 887 | ||
| 888 | static void __devexit virtblk_remove(struct virtio_device *vdev) | 888 | static void virtblk_remove(struct virtio_device *vdev) |
| 889 | { | 889 | { |
| 890 | struct virtio_blk *vblk = vdev->priv; | 890 | struct virtio_blk *vblk = vdev->priv; |
| 891 | int index = vblk->index; | 891 | int index = vblk->index; |
| @@ -961,19 +961,14 @@ static unsigned int features[] = { | |||
| 961 | VIRTIO_BLK_F_WCE, VIRTIO_BLK_F_TOPOLOGY, VIRTIO_BLK_F_CONFIG_WCE | 961 | VIRTIO_BLK_F_WCE, VIRTIO_BLK_F_TOPOLOGY, VIRTIO_BLK_F_CONFIG_WCE |
| 962 | }; | 962 | }; |
| 963 | 963 | ||
| 964 | /* | 964 | static struct virtio_driver virtio_blk = { |
| 965 | * virtio_blk causes spurious section mismatch warning by | ||
| 966 | * simultaneously referring to a __devinit and a __devexit function. | ||
| 967 | * Use __refdata to avoid this warning. | ||
| 968 | */ | ||
| 969 | static struct virtio_driver __refdata virtio_blk = { | ||
| 970 | .feature_table = features, | 965 | .feature_table = features, |
| 971 | .feature_table_size = ARRAY_SIZE(features), | 966 | .feature_table_size = ARRAY_SIZE(features), |
| 972 | .driver.name = KBUILD_MODNAME, | 967 | .driver.name = KBUILD_MODNAME, |
| 973 | .driver.owner = THIS_MODULE, | 968 | .driver.owner = THIS_MODULE, |
| 974 | .id_table = id_table, | 969 | .id_table = id_table, |
| 975 | .probe = virtblk_probe, | 970 | .probe = virtblk_probe, |
| 976 | .remove = __devexit_p(virtblk_remove), | 971 | .remove = virtblk_remove, |
| 977 | .config_changed = virtblk_config_changed, | 972 | .config_changed = virtblk_config_changed, |
| 978 | #ifdef CONFIG_PM | 973 | #ifdef CONFIG_PM |
| 979 | .freeze = virtblk_freeze, | 974 | .freeze = virtblk_freeze, |
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c index 1a17e338735e..1f38643173ca 100644 --- a/drivers/block/xsysace.c +++ b/drivers/block/xsysace.c | |||
| @@ -961,7 +961,7 @@ static const struct block_device_operations ace_fops = { | |||
| 961 | /* -------------------------------------------------------------------- | 961 | /* -------------------------------------------------------------------- |
| 962 | * SystemACE device setup/teardown code | 962 | * SystemACE device setup/teardown code |
| 963 | */ | 963 | */ |
| 964 | static int __devinit ace_setup(struct ace_device *ace) | 964 | static int ace_setup(struct ace_device *ace) |
| 965 | { | 965 | { |
| 966 | u16 version; | 966 | u16 version; |
| 967 | u16 val; | 967 | u16 val; |
| @@ -1074,7 +1074,7 @@ err_ioremap: | |||
| 1074 | return -ENOMEM; | 1074 | return -ENOMEM; |
| 1075 | } | 1075 | } |
| 1076 | 1076 | ||
| 1077 | static void __devexit ace_teardown(struct ace_device *ace) | 1077 | static void ace_teardown(struct ace_device *ace) |
| 1078 | { | 1078 | { |
| 1079 | if (ace->gd) { | 1079 | if (ace->gd) { |
| 1080 | del_gendisk(ace->gd); | 1080 | del_gendisk(ace->gd); |
| @@ -1092,9 +1092,8 @@ static void __devexit ace_teardown(struct ace_device *ace) | |||
| 1092 | iounmap(ace->baseaddr); | 1092 | iounmap(ace->baseaddr); |
| 1093 | } | 1093 | } |
| 1094 | 1094 | ||
| 1095 | static int __devinit | 1095 | static int ace_alloc(struct device *dev, int id, resource_size_t physaddr, |
| 1096 | ace_alloc(struct device *dev, int id, resource_size_t physaddr, | 1096 | int irq, int bus_width) |
| 1097 | int irq, int bus_width) | ||
| 1098 | { | 1097 | { |
| 1099 | struct ace_device *ace; | 1098 | struct ace_device *ace; |
| 1100 | int rc; | 1099 | int rc; |
| @@ -1135,7 +1134,7 @@ err_noreg: | |||
| 1135 | return rc; | 1134 | return rc; |
| 1136 | } | 1135 | } |
| 1137 | 1136 | ||
| 1138 | static void __devexit ace_free(struct device *dev) | 1137 | static void ace_free(struct device *dev) |
| 1139 | { | 1138 | { |
| 1140 | struct ace_device *ace = dev_get_drvdata(dev); | 1139 | struct ace_device *ace = dev_get_drvdata(dev); |
| 1141 | dev_dbg(dev, "ace_free(%p)\n", dev); | 1140 | dev_dbg(dev, "ace_free(%p)\n", dev); |
| @@ -1151,7 +1150,7 @@ static void __devexit ace_free(struct device *dev) | |||
| 1151 | * Platform Bus Support | 1150 | * Platform Bus Support |
| 1152 | */ | 1151 | */ |
| 1153 | 1152 | ||
| 1154 | static int __devinit ace_probe(struct platform_device *dev) | 1153 | static int ace_probe(struct platform_device *dev) |
| 1155 | { | 1154 | { |
| 1156 | resource_size_t physaddr = 0; | 1155 | resource_size_t physaddr = 0; |
| 1157 | int bus_width = ACE_BUS_WIDTH_16; /* FIXME: should not be hard coded */ | 1156 | int bus_width = ACE_BUS_WIDTH_16; /* FIXME: should not be hard coded */ |
| @@ -1182,7 +1181,7 @@ static int __devinit ace_probe(struct platform_device *dev) | |||
| 1182 | /* | 1181 | /* |
| 1183 | * Platform bus remove() method | 1182 | * Platform bus remove() method |
| 1184 | */ | 1183 | */ |
| 1185 | static int __devexit ace_remove(struct platform_device *dev) | 1184 | static int ace_remove(struct platform_device *dev) |
| 1186 | { | 1185 | { |
| 1187 | ace_free(&dev->dev); | 1186 | ace_free(&dev->dev); |
| 1188 | return 0; | 1187 | return 0; |
| @@ -1190,7 +1189,7 @@ static int __devexit ace_remove(struct platform_device *dev) | |||
| 1190 | 1189 | ||
| 1191 | #if defined(CONFIG_OF) | 1190 | #if defined(CONFIG_OF) |
| 1192 | /* Match table for of_platform binding */ | 1191 | /* Match table for of_platform binding */ |
| 1193 | static const struct of_device_id ace_of_match[] __devinitconst = { | 1192 | static const struct of_device_id ace_of_match[] = { |
| 1194 | { .compatible = "xlnx,opb-sysace-1.00.b", }, | 1193 | { .compatible = "xlnx,opb-sysace-1.00.b", }, |
| 1195 | { .compatible = "xlnx,opb-sysace-1.00.c", }, | 1194 | { .compatible = "xlnx,opb-sysace-1.00.c", }, |
| 1196 | { .compatible = "xlnx,xps-sysace-1.00.a", }, | 1195 | { .compatible = "xlnx,xps-sysace-1.00.a", }, |
| @@ -1204,7 +1203,7 @@ MODULE_DEVICE_TABLE(of, ace_of_match); | |||
| 1204 | 1203 | ||
| 1205 | static struct platform_driver ace_platform_driver = { | 1204 | static struct platform_driver ace_platform_driver = { |
| 1206 | .probe = ace_probe, | 1205 | .probe = ace_probe, |
| 1207 | .remove = __devexit_p(ace_remove), | 1206 | .remove = ace_remove, |
| 1208 | .driver = { | 1207 | .driver = { |
| 1209 | .owner = THIS_MODULE, | 1208 | .owner = THIS_MODULE, |
| 1210 | .name = "xsysace", | 1209 | .name = "xsysace", |
diff --git a/drivers/bus/omap-ocp2scp.c b/drivers/bus/omap-ocp2scp.c index 0c48b0e05ed6..fe7191663bbd 100644 --- a/drivers/bus/omap-ocp2scp.c +++ b/drivers/bus/omap-ocp2scp.c | |||
| @@ -52,7 +52,7 @@ static int ocp2scp_remove_devices(struct device *dev, void *c) | |||
| 52 | return 0; | 52 | return 0; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | static int __devinit omap_ocp2scp_probe(struct platform_device *pdev) | 55 | static int omap_ocp2scp_probe(struct platform_device *pdev) |
| 56 | { | 56 | { |
| 57 | int ret; | 57 | int ret; |
| 58 | unsigned res_cnt, i; | 58 | unsigned res_cnt, i; |
| @@ -116,7 +116,7 @@ err0: | |||
| 116 | return ret; | 116 | return ret; |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | static int __devexit omap_ocp2scp_remove(struct platform_device *pdev) | 119 | static int omap_ocp2scp_remove(struct platform_device *pdev) |
| 120 | { | 120 | { |
| 121 | pm_runtime_disable(&pdev->dev); | 121 | pm_runtime_disable(&pdev->dev); |
| 122 | device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices); | 122 | device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices); |
| @@ -134,7 +134,7 @@ MODULE_DEVICE_TABLE(of, omap_ocp2scp_id_table); | |||
| 134 | 134 | ||
| 135 | static struct platform_driver omap_ocp2scp_driver = { | 135 | static struct platform_driver omap_ocp2scp_driver = { |
| 136 | .probe = omap_ocp2scp_probe, | 136 | .probe = omap_ocp2scp_probe, |
| 137 | .remove = __devexit_p(omap_ocp2scp_remove), | 137 | .remove = omap_ocp2scp_remove, |
| 138 | .driver = { | 138 | .driver = { |
| 139 | .name = "omap-ocp2scp", | 139 | .name = "omap-ocp2scp", |
| 140 | .owner = THIS_MODULE, | 140 | .owner = THIS_MODULE, |
diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c index ab911a33f8a8..feeecae623f6 100644 --- a/drivers/bus/omap_l3_noc.c +++ b/drivers/bus/omap_l3_noc.c | |||
| @@ -128,7 +128,7 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3) | |||
| 128 | return IRQ_HANDLED; | 128 | return IRQ_HANDLED; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | static int __devinit omap4_l3_probe(struct platform_device *pdev) | 131 | static int omap4_l3_probe(struct platform_device *pdev) |
| 132 | { | 132 | { |
| 133 | static struct omap4_l3 *l3; | 133 | static struct omap4_l3 *l3; |
| 134 | struct resource *res; | 134 | struct resource *res; |
| @@ -219,7 +219,7 @@ err0: | |||
| 219 | return ret; | 219 | return ret; |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | static int __devexit omap4_l3_remove(struct platform_device *pdev) | 222 | static int omap4_l3_remove(struct platform_device *pdev) |
| 223 | { | 223 | { |
| 224 | struct omap4_l3 *l3 = platform_get_drvdata(pdev); | 224 | struct omap4_l3 *l3 = platform_get_drvdata(pdev); |
| 225 | 225 | ||
| @@ -245,7 +245,7 @@ MODULE_DEVICE_TABLE(of, l3_noc_match); | |||
| 245 | 245 | ||
| 246 | static struct platform_driver omap4_l3_driver = { | 246 | static struct platform_driver omap4_l3_driver = { |
| 247 | .probe = omap4_l3_probe, | 247 | .probe = omap4_l3_probe, |
| 248 | .remove = __devexit_p(omap4_l3_remove), | 248 | .remove = omap4_l3_remove, |
| 249 | .driver = { | 249 | .driver = { |
| 250 | .name = "omap_l3_noc", | 250 | .name = "omap_l3_noc", |
| 251 | .owner = THIS_MODULE, | 251 | .owner = THIS_MODULE, |
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c index 75d485afe56c..d59cdcb8fe39 100644 --- a/drivers/cdrom/gdrom.c +++ b/drivers/cdrom/gdrom.c | |||
| @@ -557,7 +557,7 @@ static irqreturn_t gdrom_dma_interrupt(int irq, void *dev_id) | |||
| 557 | return IRQ_HANDLED; | 557 | return IRQ_HANDLED; |
| 558 | } | 558 | } |
| 559 | 559 | ||
| 560 | static int __devinit gdrom_set_interrupt_handlers(void) | 560 | static int gdrom_set_interrupt_handlers(void) |
| 561 | { | 561 | { |
| 562 | int err; | 562 | int err; |
| 563 | 563 | ||
| @@ -681,7 +681,7 @@ static void gdrom_request(struct request_queue *rq) | |||
| 681 | } | 681 | } |
| 682 | 682 | ||
| 683 | /* Print string identifying GD ROM device */ | 683 | /* Print string identifying GD ROM device */ |
| 684 | static int __devinit gdrom_outputversion(void) | 684 | static int gdrom_outputversion(void) |
| 685 | { | 685 | { |
| 686 | struct gdrom_id *id; | 686 | struct gdrom_id *id; |
| 687 | char *model_name, *manuf_name, *firmw_ver; | 687 | char *model_name, *manuf_name, *firmw_ver; |
| @@ -715,7 +715,7 @@ free_id: | |||
| 715 | } | 715 | } |
| 716 | 716 | ||
| 717 | /* set the default mode for DMA transfer */ | 717 | /* set the default mode for DMA transfer */ |
| 718 | static int __devinit gdrom_init_dma_mode(void) | 718 | static int gdrom_init_dma_mode(void) |
| 719 | { | 719 | { |
| 720 | __raw_writeb(0x13, GDROM_ERROR_REG); | 720 | __raw_writeb(0x13, GDROM_ERROR_REG); |
| 721 | __raw_writeb(0x22, GDROM_INTSEC_REG); | 721 | __raw_writeb(0x22, GDROM_INTSEC_REG); |
| @@ -736,7 +736,7 @@ static int __devinit gdrom_init_dma_mode(void) | |||
| 736 | return 0; | 736 | return 0; |
| 737 | } | 737 | } |
| 738 | 738 | ||
| 739 | static void __devinit probe_gdrom_setupcd(void) | 739 | static void probe_gdrom_setupcd(void) |
| 740 | { | 740 | { |
| 741 | gd.cd_info->ops = &gdrom_ops; | 741 | gd.cd_info->ops = &gdrom_ops; |
| 742 | gd.cd_info->capacity = 1; | 742 | gd.cd_info->capacity = 1; |
| @@ -745,7 +745,7 @@ static void __devinit probe_gdrom_setupcd(void) | |||
| 745 | CDC_SELECT_DISC; | 745 | CDC_SELECT_DISC; |
| 746 | } | 746 | } |
| 747 | 747 | ||
| 748 | static void __devinit probe_gdrom_setupdisk(void) | 748 | static void probe_gdrom_setupdisk(void) |
| 749 | { | 749 | { |
| 750 | gd.disk->major = gdrom_major; | 750 | gd.disk->major = gdrom_major; |
| 751 | gd.disk->first_minor = 1; | 751 | gd.disk->first_minor = 1; |
| @@ -753,7 +753,7 @@ static void __devinit probe_gdrom_setupdisk(void) | |||
| 753 | strcpy(gd.disk->disk_name, GDROM_DEV_NAME); | 753 | strcpy(gd.disk->disk_name, GDROM_DEV_NAME); |
| 754 | } | 754 | } |
| 755 | 755 | ||
| 756 | static int __devinit probe_gdrom_setupqueue(void) | 756 | static int probe_gdrom_setupqueue(void) |
| 757 | { | 757 | { |
| 758 | blk_queue_logical_block_size(gd.gdrom_rq, GDROM_HARD_SECTOR); | 758 | blk_queue_logical_block_size(gd.gdrom_rq, GDROM_HARD_SECTOR); |
| 759 | /* using DMA so memory will need to be contiguous */ | 759 | /* using DMA so memory will need to be contiguous */ |
| @@ -768,7 +768,7 @@ static int __devinit probe_gdrom_setupqueue(void) | |||
| 768 | * register this as a block device and as compliant with the | 768 | * register this as a block device and as compliant with the |
| 769 | * universal CD Rom driver interface | 769 | * universal CD Rom driver interface |
| 770 | */ | 770 | */ |
| 771 | static int __devinit probe_gdrom(struct platform_device *devptr) | 771 | static int probe_gdrom(struct platform_device *devptr) |
| 772 | { | 772 | { |
| 773 | int err; | 773 | int err; |
| 774 | /* Start the device */ | 774 | /* Start the device */ |
| @@ -838,7 +838,7 @@ probe_fail_no_mem: | |||
| 838 | return err; | 838 | return err; |
| 839 | } | 839 | } |
| 840 | 840 | ||
| 841 | static int __devexit remove_gdrom(struct platform_device *devptr) | 841 | static int remove_gdrom(struct platform_device *devptr) |
| 842 | { | 842 | { |
| 843 | flush_work(&work); | 843 | flush_work(&work); |
| 844 | blk_cleanup_queue(gd.gdrom_rq); | 844 | blk_cleanup_queue(gd.gdrom_rq); |
| @@ -854,7 +854,7 @@ static int __devexit remove_gdrom(struct platform_device *devptr) | |||
| 854 | 854 | ||
| 855 | static struct platform_driver gdrom_driver = { | 855 | static struct platform_driver gdrom_driver = { |
| 856 | .probe = probe_gdrom, | 856 | .probe = probe_gdrom, |
| 857 | .remove = __devexit_p(remove_gdrom), | 857 | .remove = remove_gdrom, |
| 858 | .driver = { | 858 | .driver = { |
| 859 | .name = GDROM_DEV_NAME, | 859 | .name = GDROM_DEV_NAME, |
| 860 | }, | 860 | }, |
diff --git a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c index 478493543b32..443cd6751ca2 100644 --- a/drivers/char/agp/ali-agp.c +++ b/drivers/char/agp/ali-agp.c | |||
| @@ -299,8 +299,7 @@ static struct agp_device_ids ali_agp_device_ids[] = | |||
| 299 | { }, /* dummy final entry, always present */ | 299 | { }, /* dummy final entry, always present */ |
| 300 | }; | 300 | }; |
| 301 | 301 | ||
| 302 | static int __devinit agp_ali_probe(struct pci_dev *pdev, | 302 | static int agp_ali_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 303 | const struct pci_device_id *ent) | ||
| 304 | { | 303 | { |
| 305 | struct agp_device_ids *devs = ali_agp_device_ids; | 304 | struct agp_device_ids *devs = ali_agp_device_ids; |
| 306 | struct agp_bridge_data *bridge; | 305 | struct agp_bridge_data *bridge; |
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c index 1b2101160e98..779f0ab845a9 100644 --- a/drivers/char/agp/amd-k7-agp.c +++ b/drivers/char/agp/amd-k7-agp.c | |||
| @@ -405,8 +405,8 @@ static struct agp_device_ids amd_agp_device_ids[] = | |||
| 405 | { }, /* dummy final entry, always present */ | 405 | { }, /* dummy final entry, always present */ |
| 406 | }; | 406 | }; |
| 407 | 407 | ||
| 408 | static int __devinit agp_amdk7_probe(struct pci_dev *pdev, | 408 | static int agp_amdk7_probe(struct pci_dev *pdev, |
| 409 | const struct pci_device_id *ent) | 409 | const struct pci_device_id *ent) |
| 410 | { | 410 | { |
| 411 | struct agp_bridge_data *bridge; | 411 | struct agp_bridge_data *bridge; |
| 412 | u8 cap_ptr; | 412 | u8 cap_ptr; |
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 061d46209b1a..d79d692d05b8 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
| @@ -240,7 +240,7 @@ static const struct agp_bridge_driver amd_8151_driver = { | |||
| 240 | }; | 240 | }; |
| 241 | 241 | ||
| 242 | /* Some basic sanity checks for the aperture. */ | 242 | /* Some basic sanity checks for the aperture. */ |
| 243 | static int __devinit agp_aperture_valid(u64 aper, u32 size) | 243 | static int agp_aperture_valid(u64 aper, u32 size) |
| 244 | { | 244 | { |
| 245 | if (!aperture_valid(aper, size, 32*1024*1024)) | 245 | if (!aperture_valid(aper, size, 32*1024*1024)) |
| 246 | return 0; | 246 | return 0; |
| @@ -267,8 +267,7 @@ static int __devinit agp_aperture_valid(u64 aper, u32 size) | |||
| 267 | * to allocate that much memory. But at least error out cleanly instead of | 267 | * to allocate that much memory. But at least error out cleanly instead of |
| 268 | * crashing. | 268 | * crashing. |
| 269 | */ | 269 | */ |
| 270 | static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, | 270 | static int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, u16 cap) |
| 271 | u16 cap) | ||
| 272 | { | 271 | { |
| 273 | u32 aper_low, aper_hi; | 272 | u32 aper_low, aper_hi; |
| 274 | u64 aper, nb_aper; | 273 | u64 aper, nb_aper; |
| @@ -326,7 +325,7 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, | |||
| 326 | return 0; | 325 | return 0; |
| 327 | } | 326 | } |
| 328 | 327 | ||
| 329 | static __devinit int cache_nbs(struct pci_dev *pdev, u32 cap_ptr) | 328 | static int cache_nbs(struct pci_dev *pdev, u32 cap_ptr) |
| 330 | { | 329 | { |
| 331 | int i; | 330 | int i; |
| 332 | 331 | ||
| @@ -352,7 +351,7 @@ static __devinit int cache_nbs(struct pci_dev *pdev, u32 cap_ptr) | |||
| 352 | } | 351 | } |
| 353 | 352 | ||
| 354 | /* Handle AMD 8151 quirks */ | 353 | /* Handle AMD 8151 quirks */ |
| 355 | static void __devinit amd8151_init(struct pci_dev *pdev, struct agp_bridge_data *bridge) | 354 | static void amd8151_init(struct pci_dev *pdev, struct agp_bridge_data *bridge) |
| 356 | { | 355 | { |
| 357 | char *revstring; | 356 | char *revstring; |
| 358 | 357 | ||
| @@ -390,7 +389,7 @@ static const struct aper_size_info_32 uli_sizes[7] = | |||
| 390 | {8, 2048, 1, 4}, | 389 | {8, 2048, 1, 4}, |
| 391 | {4, 1024, 0, 3} | 390 | {4, 1024, 0, 3} |
| 392 | }; | 391 | }; |
| 393 | static int __devinit uli_agp_init(struct pci_dev *pdev) | 392 | static int uli_agp_init(struct pci_dev *pdev) |
| 394 | { | 393 | { |
| 395 | u32 httfea,baseaddr,enuscr; | 394 | u32 httfea,baseaddr,enuscr; |
| 396 | struct pci_dev *dev1; | 395 | struct pci_dev *dev1; |
| @@ -513,8 +512,8 @@ put: | |||
| 513 | return ret; | 512 | return ret; |
| 514 | } | 513 | } |
| 515 | 514 | ||
| 516 | static int __devinit agp_amd64_probe(struct pci_dev *pdev, | 515 | static int agp_amd64_probe(struct pci_dev *pdev, |
| 517 | const struct pci_device_id *ent) | 516 | const struct pci_device_id *ent) |
| 518 | { | 517 | { |
| 519 | struct agp_bridge_data *bridge; | 518 | struct agp_bridge_data *bridge; |
| 520 | u8 cap_ptr; | 519 | u8 cap_ptr; |
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c index ed0433576e74..0628d7b65c71 100644 --- a/drivers/char/agp/ati-agp.c +++ b/drivers/char/agp/ati-agp.c | |||
| @@ -490,8 +490,7 @@ static struct agp_device_ids ati_agp_device_ids[] = | |||
| 490 | { }, /* dummy final entry, always present */ | 490 | { }, /* dummy final entry, always present */ |
| 491 | }; | 491 | }; |
| 492 | 492 | ||
| 493 | static int __devinit agp_ati_probe(struct pci_dev *pdev, | 493 | static int agp_ati_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 494 | const struct pci_device_id *ent) | ||
| 495 | { | 494 | { |
| 496 | struct agp_device_ids *devs = ati_agp_device_ids; | 495 | struct agp_device_ids *devs = ati_agp_device_ids; |
| 497 | struct agp_bridge_data *bridge; | 496 | struct agp_bridge_data *bridge; |
diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c index 55f3e33a309f..6974d5032053 100644 --- a/drivers/char/agp/efficeon-agp.c +++ b/drivers/char/agp/efficeon-agp.c | |||
| @@ -343,8 +343,8 @@ static const struct agp_bridge_driver efficeon_driver = { | |||
| 343 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, | 343 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, |
| 344 | }; | 344 | }; |
| 345 | 345 | ||
| 346 | static int __devinit agp_efficeon_probe(struct pci_dev *pdev, | 346 | static int agp_efficeon_probe(struct pci_dev *pdev, |
| 347 | const struct pci_device_id *ent) | 347 | const struct pci_device_id *ent) |
| 348 | { | 348 | { |
| 349 | struct agp_bridge_data *bridge; | 349 | struct agp_bridge_data *bridge; |
| 350 | u8 cap_ptr; | 350 | u8 cap_ptr; |
diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c index d328b662e50d..15b240ea4848 100644 --- a/drivers/char/agp/i460-agp.c +++ b/drivers/char/agp/i460-agp.c | |||
| @@ -587,8 +587,8 @@ const struct agp_bridge_driver intel_i460_driver = { | |||
| 587 | .cant_use_aperture = true, | 587 | .cant_use_aperture = true, |
| 588 | }; | 588 | }; |
| 589 | 589 | ||
| 590 | static int __devinit agp_intel_i460_probe(struct pci_dev *pdev, | 590 | static int agp_intel_i460_probe(struct pci_dev *pdev, |
| 591 | const struct pci_device_id *ent) | 591 | const struct pci_device_id *ent) |
| 592 | { | 592 | { |
| 593 | struct agp_bridge_data *bridge; | 593 | struct agp_bridge_data *bridge; |
| 594 | u8 cap_ptr; | 594 | u8 cap_ptr; |
| @@ -637,7 +637,7 @@ static struct pci_driver agp_intel_i460_pci_driver = { | |||
| 637 | .name = "agpgart-intel-i460", | 637 | .name = "agpgart-intel-i460", |
| 638 | .id_table = agp_intel_i460_pci_table, | 638 | .id_table = agp_intel_i460_pci_table, |
| 639 | .probe = agp_intel_i460_probe, | 639 | .probe = agp_intel_i460_probe, |
| 640 | .remove = __devexit_p(agp_intel_i460_remove), | 640 | .remove = agp_intel_i460_remove, |
| 641 | }; | 641 | }; |
| 642 | 642 | ||
| 643 | static int __init agp_intel_i460_init(void) | 643 | static int __init agp_intel_i460_init(void) |
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index f3a8f52b5a00..a426ee1f57a6 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
| @@ -732,8 +732,8 @@ static const struct intel_agp_driver_description { | |||
| 732 | { 0, NULL, NULL } | 732 | { 0, NULL, NULL } |
| 733 | }; | 733 | }; |
| 734 | 734 | ||
| 735 | static int __devinit agp_intel_probe(struct pci_dev *pdev, | 735 | static int agp_intel_probe(struct pci_dev *pdev, |
| 736 | const struct pci_device_id *ent) | 736 | const struct pci_device_id *ent) |
| 737 | { | 737 | { |
| 738 | struct agp_bridge_data *bridge; | 738 | struct agp_bridge_data *bridge; |
| 739 | u8 cap_ptr = 0; | 739 | u8 cap_ptr = 0; |
| @@ -912,7 +912,7 @@ static struct pci_driver agp_intel_pci_driver = { | |||
| 912 | .name = "agpgart-intel", | 912 | .name = "agpgart-intel", |
| 913 | .id_table = agp_intel_pci_table, | 913 | .id_table = agp_intel_pci_table, |
| 914 | .probe = agp_intel_probe, | 914 | .probe = agp_intel_probe, |
| 915 | .remove = __devexit_p(agp_intel_remove), | 915 | .remove = agp_intel_remove, |
| 916 | #ifdef CONFIG_PM | 916 | #ifdef CONFIG_PM |
| 917 | .resume = agp_intel_resume, | 917 | .resume = agp_intel_resume, |
| 918 | #endif | 918 | #endif |
diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c index 66e0868000f4..62be3ec0da4b 100644 --- a/drivers/char/agp/nvidia-agp.c +++ b/drivers/char/agp/nvidia-agp.c | |||
| @@ -332,8 +332,8 @@ static const struct agp_bridge_driver nvidia_driver = { | |||
| 332 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, | 332 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, |
| 333 | }; | 333 | }; |
| 334 | 334 | ||
| 335 | static int __devinit agp_nvidia_probe(struct pci_dev *pdev, | 335 | static int agp_nvidia_probe(struct pci_dev *pdev, |
| 336 | const struct pci_device_id *ent) | 336 | const struct pci_device_id *ent) |
| 337 | { | 337 | { |
| 338 | struct agp_bridge_data *bridge; | 338 | struct agp_bridge_data *bridge; |
| 339 | u8 cap_ptr; | 339 | u8 cap_ptr; |
diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c index a18791d7718a..05b8d0241bde 100644 --- a/drivers/char/agp/sgi-agp.c +++ b/drivers/char/agp/sgi-agp.c | |||
| @@ -270,7 +270,7 @@ const struct agp_bridge_driver sgi_tioca_driver = { | |||
| 270 | .num_aperture_sizes = 1, | 270 | .num_aperture_sizes = 1, |
| 271 | }; | 271 | }; |
| 272 | 272 | ||
| 273 | static int __devinit agp_sgi_init(void) | 273 | static int agp_sgi_init(void) |
| 274 | { | 274 | { |
| 275 | unsigned int j; | 275 | unsigned int j; |
| 276 | struct tioca_kernel *info; | 276 | struct tioca_kernel *info; |
diff --git a/drivers/char/agp/sis-agp.c b/drivers/char/agp/sis-agp.c index 93d1d31f9d0c..79c838c434bc 100644 --- a/drivers/char/agp/sis-agp.c +++ b/drivers/char/agp/sis-agp.c | |||
| @@ -154,7 +154,7 @@ static int sis_broken_chipsets[] = { | |||
| 154 | 0 // terminator | 154 | 0 // terminator |
| 155 | }; | 155 | }; |
| 156 | 156 | ||
| 157 | static void __devinit sis_get_driver(struct agp_bridge_data *bridge) | 157 | static void sis_get_driver(struct agp_bridge_data *bridge) |
| 158 | { | 158 | { |
| 159 | int i; | 159 | int i; |
| 160 | 160 | ||
| @@ -180,8 +180,7 @@ static void __devinit sis_get_driver(struct agp_bridge_data *bridge) | |||
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | 182 | ||
| 183 | static int __devinit agp_sis_probe(struct pci_dev *pdev, | 183 | static int agp_sis_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 184 | const struct pci_device_id *ent) | ||
| 185 | { | 184 | { |
| 186 | struct agp_bridge_data *bridge; | 185 | struct agp_bridge_data *bridge; |
| 187 | u8 cap_ptr; | 186 | u8 cap_ptr; |
diff --git a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c index 26020fb8d7a9..9b163b49d976 100644 --- a/drivers/char/agp/sworks-agp.c +++ b/drivers/char/agp/sworks-agp.c | |||
| @@ -445,8 +445,8 @@ static const struct agp_bridge_driver sworks_driver = { | |||
| 445 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, | 445 | .agp_type_to_mask_type = agp_generic_type_to_mask_type, |
| 446 | }; | 446 | }; |
| 447 | 447 | ||
| 448 | static int __devinit agp_serverworks_probe(struct pci_dev *pdev, | 448 | static int agp_serverworks_probe(struct pci_dev *pdev, |
| 449 | const struct pci_device_id *ent) | 449 | const struct pci_device_id *ent) |
| 450 | { | 450 | { |
| 451 | struct agp_bridge_data *bridge; | 451 | struct agp_bridge_data *bridge; |
| 452 | struct pci_dev *bridge_dev; | 452 | struct pci_dev *bridge_dev; |
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c index 011967ad3eed..a56ee9bedd11 100644 --- a/drivers/char/agp/uninorth-agp.c +++ b/drivers/char/agp/uninorth-agp.c | |||
| @@ -592,8 +592,8 @@ static struct agp_device_ids uninorth_agp_device_ids[] = { | |||
| 592 | }, | 592 | }, |
| 593 | }; | 593 | }; |
| 594 | 594 | ||
| 595 | static int __devinit agp_uninorth_probe(struct pci_dev *pdev, | 595 | static int agp_uninorth_probe(struct pci_dev *pdev, |
| 596 | const struct pci_device_id *ent) | 596 | const struct pci_device_id *ent) |
| 597 | { | 597 | { |
| 598 | struct agp_device_ids *devs = uninorth_agp_device_ids; | 598 | struct agp_device_ids *devs = uninorth_agp_device_ids; |
| 599 | struct agp_bridge_data *bridge; | 599 | struct agp_bridge_data *bridge; |
diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c index 6818595bb863..74d3aa3773bf 100644 --- a/drivers/char/agp/via-agp.c +++ b/drivers/char/agp/via-agp.c | |||
| @@ -438,8 +438,7 @@ static void check_via_agp3 (struct agp_bridge_data *bridge) | |||
| 438 | } | 438 | } |
| 439 | 439 | ||
| 440 | 440 | ||
| 441 | static int __devinit agp_via_probe(struct pci_dev *pdev, | 441 | static int agp_via_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 442 | const struct pci_device_id *ent) | ||
| 443 | { | 442 | { |
| 444 | struct agp_device_ids *devs = via_agp_device_ids; | 443 | struct agp_device_ids *devs = via_agp_device_ids; |
| 445 | struct agp_bridge_data *bridge; | 444 | struct agp_bridge_data *bridge; |
diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c index 5a4a6e70478b..7c73d4aca36b 100644 --- a/drivers/char/hw_random/atmel-rng.c +++ b/drivers/char/hw_random/atmel-rng.c | |||
| @@ -138,7 +138,7 @@ static const struct dev_pm_ops atmel_trng_pm_ops = { | |||
| 138 | 138 | ||
| 139 | static struct platform_driver atmel_trng_driver = { | 139 | static struct platform_driver atmel_trng_driver = { |
| 140 | .probe = atmel_trng_probe, | 140 | .probe = atmel_trng_probe, |
| 141 | .remove = __devexit_p(atmel_trng_remove), | 141 | .remove = atmel_trng_remove, |
| 142 | .driver = { | 142 | .driver = { |
| 143 | .name = "atmel-trng", | 143 | .name = "atmel-trng", |
| 144 | .owner = THIS_MODULE, | 144 | .owner = THIS_MODULE, |
diff --git a/drivers/char/hw_random/bcm63xx-rng.c b/drivers/char/hw_random/bcm63xx-rng.c index ae95bcb18d4a..f343b7d0dfa1 100644 --- a/drivers/char/hw_random/bcm63xx-rng.c +++ b/drivers/char/hw_random/bcm63xx-rng.c | |||
| @@ -61,7 +61,7 @@ static int bcm63xx_rng_data_read(struct hwrng *rng, u32 *data) | |||
| 61 | return 4; | 61 | return 4; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | static int __devinit bcm63xx_rng_probe(struct platform_device *pdev) | 64 | static int bcm63xx_rng_probe(struct platform_device *pdev) |
| 65 | { | 65 | { |
| 66 | struct resource *r; | 66 | struct resource *r; |
| 67 | struct clk *clk; | 67 | struct clk *clk; |
| @@ -161,7 +161,7 @@ static int bcm63xx_rng_remove(struct platform_device *pdev) | |||
| 161 | 161 | ||
| 162 | static struct platform_driver bcm63xx_rng_driver = { | 162 | static struct platform_driver bcm63xx_rng_driver = { |
| 163 | .probe = bcm63xx_rng_probe, | 163 | .probe = bcm63xx_rng_probe, |
| 164 | .remove = __devexit_p(bcm63xx_rng_remove), | 164 | .remove = bcm63xx_rng_remove, |
| 165 | .driver = { | 165 | .driver = { |
| 166 | .name = "bcm63xx-rng", | 166 | .name = "bcm63xx-rng", |
| 167 | .owner = THIS_MODULE, | 167 | .owner = THIS_MODULE, |
diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c index bdc852ea7632..48bbfeca4b5d 100644 --- a/drivers/char/hw_random/exynos-rng.c +++ b/drivers/char/hw_random/exynos-rng.c | |||
| @@ -101,7 +101,7 @@ static int exynos_read(struct hwrng *rng, void *buf, | |||
| 101 | return 4; | 101 | return 4; |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | static int __devinit exynos_rng_probe(struct platform_device *pdev) | 104 | static int exynos_rng_probe(struct platform_device *pdev) |
| 105 | { | 105 | { |
| 106 | struct exynos_rng *exynos_rng; | 106 | struct exynos_rng *exynos_rng; |
| 107 | 107 | ||
| @@ -172,7 +172,7 @@ static struct platform_driver exynos_rng_driver = { | |||
| 172 | .pm = &exynos_rng_pm_ops, | 172 | .pm = &exynos_rng_pm_ops, |
| 173 | }, | 173 | }, |
| 174 | .probe = exynos_rng_probe, | 174 | .probe = exynos_rng_probe, |
| 175 | .remove = __devexit_p(exynos_rng_remove), | 175 | .remove = exynos_rng_remove, |
| 176 | }; | 176 | }; |
| 177 | 177 | ||
| 178 | module_platform_driver(exynos_rng_driver); | 178 | module_platform_driver(exynos_rng_driver); |
diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c index d68a72a08b51..20b962e1d832 100644 --- a/drivers/char/hw_random/n2-drv.c +++ b/drivers/char/hw_random/n2-drv.c | |||
| @@ -611,7 +611,7 @@ static void n2rng_work(struct work_struct *work) | |||
| 611 | schedule_delayed_work(&np->work, HZ * 2); | 611 | schedule_delayed_work(&np->work, HZ * 2); |
| 612 | } | 612 | } |
| 613 | 613 | ||
| 614 | static void __devinit n2rng_driver_version(void) | 614 | static void n2rng_driver_version(void) |
| 615 | { | 615 | { |
| 616 | static int n2rng_version_printed; | 616 | static int n2rng_version_printed; |
| 617 | 617 | ||
| @@ -620,7 +620,7 @@ static void __devinit n2rng_driver_version(void) | |||
| 620 | } | 620 | } |
| 621 | 621 | ||
| 622 | static const struct of_device_id n2rng_match[]; | 622 | static const struct of_device_id n2rng_match[]; |
| 623 | static int __devinit n2rng_probe(struct platform_device *op) | 623 | static int n2rng_probe(struct platform_device *op) |
| 624 | { | 624 | { |
| 625 | const struct of_device_id *match; | 625 | const struct of_device_id *match; |
| 626 | int multi_capable; | 626 | int multi_capable; |
| @@ -767,7 +767,7 @@ static struct platform_driver n2rng_driver = { | |||
| 767 | .of_match_table = n2rng_match, | 767 | .of_match_table = n2rng_match, |
| 768 | }, | 768 | }, |
| 769 | .probe = n2rng_probe, | 769 | .probe = n2rng_probe, |
| 770 | .remove = __devexit_p(n2rng_remove), | 770 | .remove = n2rng_remove, |
| 771 | }; | 771 | }; |
| 772 | 772 | ||
| 773 | module_platform_driver(n2rng_driver); | 773 | module_platform_driver(n2rng_driver); |
diff --git a/drivers/char/hw_random/octeon-rng.c b/drivers/char/hw_random/octeon-rng.c index 5c34c092af71..1eada566ca70 100644 --- a/drivers/char/hw_random/octeon-rng.c +++ b/drivers/char/hw_random/octeon-rng.c | |||
| @@ -56,7 +56,7 @@ static int octeon_rng_data_read(struct hwrng *rng, u32 *data) | |||
| 56 | return sizeof(u32); | 56 | return sizeof(u32); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | static int __devinit octeon_rng_probe(struct platform_device *pdev) | 59 | static int octeon_rng_probe(struct platform_device *pdev) |
| 60 | { | 60 | { |
| 61 | struct resource *res_ports; | 61 | struct resource *res_ports; |
| 62 | struct resource *res_result; | 62 | struct resource *res_result; |
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c index 45e467dcc8c8..d8c54e253761 100644 --- a/drivers/char/hw_random/omap-rng.c +++ b/drivers/char/hw_random/omap-rng.c | |||
| @@ -104,7 +104,7 @@ static struct hwrng omap_rng_ops = { | |||
| 104 | .data_read = omap_rng_data_read, | 104 | .data_read = omap_rng_data_read, |
| 105 | }; | 105 | }; |
| 106 | 106 | ||
| 107 | static int __devinit omap_rng_probe(struct platform_device *pdev) | 107 | static int omap_rng_probe(struct platform_device *pdev) |
| 108 | { | 108 | { |
| 109 | struct omap_rng_private_data *priv; | 109 | struct omap_rng_private_data *priv; |
| 110 | int ret; | 110 | int ret; |
diff --git a/drivers/char/hw_random/pasemi-rng.c b/drivers/char/hw_random/pasemi-rng.c index a1f70407cc9e..c6df5b29af08 100644 --- a/drivers/char/hw_random/pasemi-rng.c +++ b/drivers/char/hw_random/pasemi-rng.c | |||
| @@ -94,7 +94,7 @@ static struct hwrng pasemi_rng = { | |||
| 94 | .data_read = pasemi_rng_data_read, | 94 | .data_read = pasemi_rng_data_read, |
| 95 | }; | 95 | }; |
| 96 | 96 | ||
| 97 | static int __devinit rng_probe(struct platform_device *ofdev) | 97 | static int rng_probe(struct platform_device *ofdev) |
| 98 | { | 98 | { |
| 99 | void __iomem *rng_regs; | 99 | void __iomem *rng_regs; |
| 100 | struct device_node *rng_np = ofdev->dev.of_node; | 100 | struct device_node *rng_np = ofdev->dev.of_node; |
diff --git a/drivers/char/hw_random/picoxcell-rng.c b/drivers/char/hw_random/picoxcell-rng.c index d4b24c1dd48e..973b95113edf 100644 --- a/drivers/char/hw_random/picoxcell-rng.c +++ b/drivers/char/hw_random/picoxcell-rng.c | |||
| @@ -181,7 +181,7 @@ static const struct dev_pm_ops picoxcell_trng_pm_ops = { | |||
| 181 | 181 | ||
| 182 | static struct platform_driver picoxcell_trng_driver = { | 182 | static struct platform_driver picoxcell_trng_driver = { |
| 183 | .probe = picoxcell_trng_probe, | 183 | .probe = picoxcell_trng_probe, |
| 184 | .remove = __devexit_p(picoxcell_trng_remove), | 184 | .remove = picoxcell_trng_remove, |
| 185 | .driver = { | 185 | .driver = { |
| 186 | .name = "picoxcell-trng", | 186 | .name = "picoxcell-trng", |
| 187 | .owner = THIS_MODULE, | 187 | .owner = THIS_MODULE, |
diff --git a/drivers/char/hw_random/ppc4xx-rng.c b/drivers/char/hw_random/ppc4xx-rng.c index af6506a69cd9..732c330805fd 100644 --- a/drivers/char/hw_random/ppc4xx-rng.c +++ b/drivers/char/hw_random/ppc4xx-rng.c | |||
| @@ -90,7 +90,7 @@ static struct hwrng ppc4xx_rng = { | |||
| 90 | .data_read = ppc4xx_rng_data_read, | 90 | .data_read = ppc4xx_rng_data_read, |
| 91 | }; | 91 | }; |
| 92 | 92 | ||
| 93 | static int __devinit ppc4xx_rng_probe(struct platform_device *dev) | 93 | static int ppc4xx_rng_probe(struct platform_device *dev) |
| 94 | { | 94 | { |
| 95 | void __iomem *rng_regs; | 95 | void __iomem *rng_regs; |
| 96 | int err = 0; | 96 | int err = 0; |
diff --git a/drivers/char/hw_random/timeriomem-rng.c b/drivers/char/hw_random/timeriomem-rng.c index 3a1abc9417e4..849db199c02c 100644 --- a/drivers/char/hw_random/timeriomem-rng.c +++ b/drivers/char/hw_random/timeriomem-rng.c | |||
| @@ -88,7 +88,7 @@ static struct hwrng timeriomem_rng_ops = { | |||
| 88 | .priv = 0, | 88 | .priv = 0, |
| 89 | }; | 89 | }; |
| 90 | 90 | ||
| 91 | static int __devinit timeriomem_rng_probe(struct platform_device *pdev) | 91 | static int timeriomem_rng_probe(struct platform_device *pdev) |
| 92 | { | 92 | { |
| 93 | struct resource *res; | 93 | struct resource *res; |
| 94 | int ret; | 94 | int ret; |
| @@ -146,7 +146,7 @@ static struct platform_driver timeriomem_rng_driver = { | |||
| 146 | .owner = THIS_MODULE, | 146 | .owner = THIS_MODULE, |
| 147 | }, | 147 | }, |
| 148 | .probe = timeriomem_rng_probe, | 148 | .probe = timeriomem_rng_probe, |
| 149 | .remove = __devexit_p(timeriomem_rng_remove), | 149 | .remove = timeriomem_rng_remove, |
| 150 | }; | 150 | }; |
| 151 | 151 | ||
| 152 | module_platform_driver(timeriomem_rng_driver); | 152 | module_platform_driver(timeriomem_rng_driver); |
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c index 621f595f1a98..b65c10395959 100644 --- a/drivers/char/hw_random/virtio-rng.c +++ b/drivers/char/hw_random/virtio-rng.c | |||
| @@ -147,7 +147,7 @@ static struct virtio_driver virtio_rng_driver = { | |||
| 147 | .driver.owner = THIS_MODULE, | 147 | .driver.owner = THIS_MODULE, |
| 148 | .id_table = id_table, | 148 | .id_table = id_table, |
| 149 | .probe = virtrng_probe, | 149 | .probe = virtrng_probe, |
| 150 | .remove = __devexit_p(virtrng_remove), | 150 | .remove = virtrng_remove, |
| 151 | #ifdef CONFIG_PM | 151 | #ifdef CONFIG_PM |
| 152 | .freeze = virtrng_freeze, | 152 | .freeze = virtrng_freeze, |
| 153 | .restore = virtrng_restore, | 153 | .restore = virtrng_restore, |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index cfdfecd5bc76..1c7fdcd22a98 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
| @@ -2243,7 +2243,7 @@ static const struct pnp_device_id pnp_dev_table[] = { | |||
| 2243 | static struct pnp_driver ipmi_pnp_driver = { | 2243 | static struct pnp_driver ipmi_pnp_driver = { |
| 2244 | .name = DEVICE_NAME, | 2244 | .name = DEVICE_NAME, |
| 2245 | .probe = ipmi_pnp_probe, | 2245 | .probe = ipmi_pnp_probe, |
| 2246 | .remove = __devexit_p(ipmi_pnp_remove), | 2246 | .remove = ipmi_pnp_remove, |
| 2247 | .id_table = pnp_dev_table, | 2247 | .id_table = pnp_dev_table, |
| 2248 | }; | 2248 | }; |
| 2249 | #endif | 2249 | #endif |
| @@ -2546,7 +2546,7 @@ static struct pci_driver ipmi_pci_driver = { | |||
| 2546 | .name = DEVICE_NAME, | 2546 | .name = DEVICE_NAME, |
| 2547 | .id_table = ipmi_pci_devices, | 2547 | .id_table = ipmi_pci_devices, |
| 2548 | .probe = ipmi_pci_probe, | 2548 | .probe = ipmi_pci_probe, |
| 2549 | .remove = __devexit_p(ipmi_pci_remove), | 2549 | .remove = ipmi_pci_remove, |
| 2550 | }; | 2550 | }; |
| 2551 | #endif /* CONFIG_PCI */ | 2551 | #endif /* CONFIG_PCI */ |
| 2552 | 2552 | ||
| @@ -2661,7 +2661,7 @@ static struct platform_driver ipmi_driver = { | |||
| 2661 | .of_match_table = ipmi_match, | 2661 | .of_match_table = ipmi_match, |
| 2662 | }, | 2662 | }, |
| 2663 | .probe = ipmi_probe, | 2663 | .probe = ipmi_probe, |
| 2664 | .remove = __devexit_p(ipmi_remove), | 2664 | .remove = ipmi_remove, |
| 2665 | }; | 2665 | }; |
| 2666 | 2666 | ||
| 2667 | static int wait_for_msg_done(struct smi_info *smi_info) | 2667 | static int wait_for_msg_done(struct smi_info *smi_info) |
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index c594cb16c37b..684b0d53764f 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c | |||
| @@ -2186,11 +2186,7 @@ static struct virtio_driver virtio_console = { | |||
| 2186 | #endif | 2186 | #endif |
| 2187 | }; | 2187 | }; |
| 2188 | 2188 | ||
| 2189 | /* | 2189 | static struct virtio_driver virtio_rproc_serial = { |
| 2190 | * virtio_rproc_serial refers to __devinit function which causes | ||
| 2191 | * section mismatch warnings. So use __refdata to silence warnings. | ||
| 2192 | */ | ||
| 2193 | static struct virtio_driver __refdata virtio_rproc_serial = { | ||
| 2194 | .feature_table = rproc_serial_features, | 2190 | .feature_table = rproc_serial_features, |
| 2195 | .feature_table_size = ARRAY_SIZE(rproc_serial_features), | 2191 | .feature_table_size = ARRAY_SIZE(rproc_serial_features), |
| 2196 | .driver.name = "virtio_rproc_serial", | 2192 | .driver.name = "virtio_rproc_serial", |
diff --git a/drivers/clk/clk-twl6040.c b/drivers/clk/clk-twl6040.c index bc1e713e7b9c..3af729b1b89d 100644 --- a/drivers/clk/clk-twl6040.c +++ b/drivers/clk/clk-twl6040.c | |||
| @@ -78,7 +78,7 @@ static struct clk_init_data wm831x_clkout_init = { | |||
| 78 | .flags = CLK_IS_ROOT, | 78 | .flags = CLK_IS_ROOT, |
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | static int __devinit twl6040_clk_probe(struct platform_device *pdev) | 81 | static int twl6040_clk_probe(struct platform_device *pdev) |
| 82 | { | 82 | { |
| 83 | struct twl6040 *twl6040 = dev_get_drvdata(pdev->dev.parent); | 83 | struct twl6040 *twl6040 = dev_get_drvdata(pdev->dev.parent); |
| 84 | struct twl6040_clk *clkdata; | 84 | struct twl6040_clk *clkdata; |
| @@ -100,7 +100,7 @@ static int __devinit twl6040_clk_probe(struct platform_device *pdev) | |||
| 100 | return 0; | 100 | return 0; |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | static int __devexit twl6040_clk_remove(struct platform_device *pdev) | 103 | static int twl6040_clk_remove(struct platform_device *pdev) |
| 104 | { | 104 | { |
| 105 | struct twl6040_clk *clkdata = dev_get_drvdata(&pdev->dev); | 105 | struct twl6040_clk *clkdata = dev_get_drvdata(&pdev->dev); |
| 106 | 106 | ||
| @@ -115,7 +115,7 @@ static struct platform_driver twl6040_clk_driver = { | |||
| 115 | .owner = THIS_MODULE, | 115 | .owner = THIS_MODULE, |
| 116 | }, | 116 | }, |
| 117 | .probe = twl6040_clk_probe, | 117 | .probe = twl6040_clk_probe, |
| 118 | .remove = __devexit_p(twl6040_clk_remove), | 118 | .remove = twl6040_clk_remove, |
| 119 | }; | 119 | }; |
| 120 | 120 | ||
| 121 | module_platform_driver(twl6040_clk_driver); | 121 | module_platform_driver(twl6040_clk_driver); |
diff --git a/drivers/clk/mvebu/clk-gating-ctrl.c b/drivers/clk/mvebu/clk-gating-ctrl.c index c6d3c263b070..8fa5408b6c7d 100644 --- a/drivers/clk/mvebu/clk-gating-ctrl.c +++ b/drivers/clk/mvebu/clk-gating-ctrl.c | |||
| @@ -32,7 +32,7 @@ struct mvebu_soc_descr { | |||
| 32 | 32 | ||
| 33 | #define to_clk_gate(_hw) container_of(_hw, struct clk_gate, hw) | 33 | #define to_clk_gate(_hw) container_of(_hw, struct clk_gate, hw) |
| 34 | 34 | ||
| 35 | static struct clk __init *mvebu_clk_gating_get_src( | 35 | static struct clk *mvebu_clk_gating_get_src( |
| 36 | struct of_phandle_args *clkspec, void *data) | 36 | struct of_phandle_args *clkspec, void *data) |
| 37 | { | 37 | { |
| 38 | struct mvebu_gating_ctrl *ctrl = (struct mvebu_gating_ctrl *)data; | 38 | struct mvebu_gating_ctrl *ctrl = (struct mvebu_gating_ctrl *)data; |
diff --git a/drivers/clk/ux500/abx500-clk.c b/drivers/clk/ux500/abx500-clk.c index e27c52317ffe..9f7400d74fa7 100644 --- a/drivers/clk/ux500/abx500-clk.c +++ b/drivers/clk/ux500/abx500-clk.c | |||
| @@ -34,7 +34,7 @@ static int ab9540_reg_clks(struct device *dev) | |||
| 34 | return 0; | 34 | return 0; |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | static int __devinit abx500_clk_probe(struct platform_device *pdev) | 37 | static int abx500_clk_probe(struct platform_device *pdev) |
| 38 | { | 38 | { |
| 39 | struct ab8500 *parent = dev_get_drvdata(pdev->dev.parent); | 39 | struct ab8500 *parent = dev_get_drvdata(pdev->dev.parent); |
| 40 | int ret; | 40 | int ret; |
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c index 5d1b9268bcaf..6efe4d1ab3aa 100644 --- a/drivers/clocksource/acpi_pm.c +++ b/drivers/clocksource/acpi_pm.c | |||
| @@ -73,7 +73,7 @@ static struct clocksource clocksource_acpi_pm = { | |||
| 73 | 73 | ||
| 74 | 74 | ||
| 75 | #ifdef CONFIG_PCI | 75 | #ifdef CONFIG_PCI |
| 76 | static int __devinitdata acpi_pm_good; | 76 | static int acpi_pm_good; |
| 77 | static int __init acpi_pm_good_setup(char *__str) | 77 | static int __init acpi_pm_good_setup(char *__str) |
| 78 | { | 78 | { |
| 79 | acpi_pm_good = 1; | 79 | acpi_pm_good = 1; |
| @@ -102,7 +102,7 @@ static inline void acpi_pm_need_workaround(void) | |||
| 102 | * incorrect when read). As a result, the ACPI free running count up | 102 | * incorrect when read). As a result, the ACPI free running count up |
| 103 | * timer specification is violated due to erroneous reads. | 103 | * timer specification is violated due to erroneous reads. |
| 104 | */ | 104 | */ |
| 105 | static void __devinit acpi_pm_check_blacklist(struct pci_dev *dev) | 105 | static void acpi_pm_check_blacklist(struct pci_dev *dev) |
| 106 | { | 106 | { |
| 107 | if (acpi_pm_good) | 107 | if (acpi_pm_good) |
| 108 | return; | 108 | return; |
| @@ -120,7 +120,7 @@ static void __devinit acpi_pm_check_blacklist(struct pci_dev *dev) | |||
| 120 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, | 120 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, |
| 121 | acpi_pm_check_blacklist); | 121 | acpi_pm_check_blacklist); |
| 122 | 122 | ||
| 123 | static void __devinit acpi_pm_check_graylist(struct pci_dev *dev) | 123 | static void acpi_pm_check_graylist(struct pci_dev *dev) |
| 124 | { | 124 | { |
| 125 | if (acpi_pm_good) | 125 | if (acpi_pm_good) |
| 126 | return; | 126 | return; |
diff --git a/drivers/clocksource/em_sti.c b/drivers/clocksource/em_sti.c index 372051d1bba8..e6a553cb73e8 100644 --- a/drivers/clocksource/em_sti.c +++ b/drivers/clocksource/em_sti.c | |||
| @@ -311,7 +311,7 @@ static void em_sti_register_clockevent(struct em_sti_priv *p) | |||
| 311 | clockevents_config_and_register(ced, 1, 2, 0xffffffff); | 311 | clockevents_config_and_register(ced, 1, 2, 0xffffffff); |
| 312 | } | 312 | } |
| 313 | 313 | ||
| 314 | static int __devinit em_sti_probe(struct platform_device *pdev) | 314 | static int em_sti_probe(struct platform_device *pdev) |
| 315 | { | 315 | { |
| 316 | struct em_sti_priv *p; | 316 | struct em_sti_priv *p; |
| 317 | struct resource *res; | 317 | struct resource *res; |
| @@ -379,12 +379,12 @@ err0: | |||
| 379 | return ret; | 379 | return ret; |
| 380 | } | 380 | } |
| 381 | 381 | ||
| 382 | static int __devexit em_sti_remove(struct platform_device *pdev) | 382 | static int em_sti_remove(struct platform_device *pdev) |
| 383 | { | 383 | { |
| 384 | return -EBUSY; /* cannot unregister clockevent and clocksource */ | 384 | return -EBUSY; /* cannot unregister clockevent and clocksource */ |
| 385 | } | 385 | } |
| 386 | 386 | ||
| 387 | static const struct of_device_id em_sti_dt_ids[] __devinitconst = { | 387 | static const struct of_device_id em_sti_dt_ids[] = { |
| 388 | { .compatible = "renesas,em-sti", }, | 388 | { .compatible = "renesas,em-sti", }, |
| 389 | {}, | 389 | {}, |
| 390 | }; | 390 | }; |
| @@ -392,7 +392,7 @@ MODULE_DEVICE_TABLE(of, em_sti_dt_ids); | |||
| 392 | 392 | ||
| 393 | static struct platform_driver em_sti_device_driver = { | 393 | static struct platform_driver em_sti_device_driver = { |
| 394 | .probe = em_sti_probe, | 394 | .probe = em_sti_probe, |
| 395 | .remove = __devexit_p(em_sti_remove), | 395 | .remove = em_sti_remove, |
| 396 | .driver = { | 396 | .driver = { |
| 397 | .name = "em_sti", | 397 | .name = "em_sti", |
| 398 | .of_match_table = em_sti_dt_ids, | 398 | .of_match_table = em_sti_dt_ids, |
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index a5f7829f2799..488c14cc8dbf 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c | |||
| @@ -726,7 +726,7 @@ err0: | |||
| 726 | return ret; | 726 | return ret; |
| 727 | } | 727 | } |
| 728 | 728 | ||
| 729 | static int __devinit sh_cmt_probe(struct platform_device *pdev) | 729 | static int sh_cmt_probe(struct platform_device *pdev) |
| 730 | { | 730 | { |
| 731 | struct sh_cmt_priv *p = platform_get_drvdata(pdev); | 731 | struct sh_cmt_priv *p = platform_get_drvdata(pdev); |
| 732 | struct sh_timer_config *cfg = pdev->dev.platform_data; | 732 | struct sh_timer_config *cfg = pdev->dev.platform_data; |
| @@ -767,14 +767,14 @@ static int __devinit sh_cmt_probe(struct platform_device *pdev) | |||
| 767 | return 0; | 767 | return 0; |
| 768 | } | 768 | } |
| 769 | 769 | ||
| 770 | static int __devexit sh_cmt_remove(struct platform_device *pdev) | 770 | static int sh_cmt_remove(struct platform_device *pdev) |
| 771 | { | 771 | { |
| 772 | return -EBUSY; /* cannot unregister clockevent and clocksource */ | 772 | return -EBUSY; /* cannot unregister clockevent and clocksource */ |
| 773 | } | 773 | } |
| 774 | 774 | ||
| 775 | static struct platform_driver sh_cmt_device_driver = { | 775 | static struct platform_driver sh_cmt_device_driver = { |
| 776 | .probe = sh_cmt_probe, | 776 | .probe = sh_cmt_probe, |
| 777 | .remove = __devexit_p(sh_cmt_remove), | 777 | .remove = sh_cmt_remove, |
| 778 | .driver = { | 778 | .driver = { |
| 779 | .name = "sh_cmt", | 779 | .name = "sh_cmt", |
| 780 | } | 780 | } |
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c index c5eea858054a..83943e27cfac 100644 --- a/drivers/clocksource/sh_mtu2.c +++ b/drivers/clocksource/sh_mtu2.c | |||
| @@ -321,7 +321,7 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev) | |||
| 321 | return ret; | 321 | return ret; |
| 322 | } | 322 | } |
| 323 | 323 | ||
| 324 | static int __devinit sh_mtu2_probe(struct platform_device *pdev) | 324 | static int sh_mtu2_probe(struct platform_device *pdev) |
| 325 | { | 325 | { |
| 326 | struct sh_mtu2_priv *p = platform_get_drvdata(pdev); | 326 | struct sh_mtu2_priv *p = platform_get_drvdata(pdev); |
| 327 | struct sh_timer_config *cfg = pdev->dev.platform_data; | 327 | struct sh_timer_config *cfg = pdev->dev.platform_data; |
| @@ -362,14 +362,14 @@ static int __devinit sh_mtu2_probe(struct platform_device *pdev) | |||
| 362 | return 0; | 362 | return 0; |
| 363 | } | 363 | } |
| 364 | 364 | ||
| 365 | static int __devexit sh_mtu2_remove(struct platform_device *pdev) | 365 | static int sh_mtu2_remove(struct platform_device *pdev) |
| 366 | { | 366 | { |
| 367 | return -EBUSY; /* cannot unregister clockevent */ | 367 | return -EBUSY; /* cannot unregister clockevent */ |
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | static struct platform_driver sh_mtu2_device_driver = { | 370 | static struct platform_driver sh_mtu2_device_driver = { |
| 371 | .probe = sh_mtu2_probe, | 371 | .probe = sh_mtu2_probe, |
| 372 | .remove = __devexit_p(sh_mtu2_remove), | 372 | .remove = sh_mtu2_remove, |
| 373 | .driver = { | 373 | .driver = { |
| 374 | .name = "sh_mtu2", | 374 | .name = "sh_mtu2", |
| 375 | } | 375 | } |
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c index 0cc4add88279..b4502edce2a1 100644 --- a/drivers/clocksource/sh_tmu.c +++ b/drivers/clocksource/sh_tmu.c | |||
| @@ -484,7 +484,7 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev) | |||
| 484 | return ret; | 484 | return ret; |
| 485 | } | 485 | } |
| 486 | 486 | ||
| 487 | static int __devinit sh_tmu_probe(struct platform_device *pdev) | 487 | static int sh_tmu_probe(struct platform_device *pdev) |
| 488 | { | 488 | { |
| 489 | struct sh_tmu_priv *p = platform_get_drvdata(pdev); | 489 | struct sh_tmu_priv *p = platform_get_drvdata(pdev); |
| 490 | struct sh_timer_config *cfg = pdev->dev.platform_data; | 490 | struct sh_timer_config *cfg = pdev->dev.platform_data; |
| @@ -525,14 +525,14 @@ static int __devinit sh_tmu_probe(struct platform_device *pdev) | |||
| 525 | return 0; | 525 | return 0; |
| 526 | } | 526 | } |
| 527 | 527 | ||
| 528 | static int __devexit sh_tmu_remove(struct platform_device *pdev) | 528 | static int sh_tmu_remove(struct platform_device *pdev) |
| 529 | { | 529 | { |
| 530 | return -EBUSY; /* cannot unregister clockevent and clocksource */ | 530 | return -EBUSY; /* cannot unregister clockevent and clocksource */ |
| 531 | } | 531 | } |
| 532 | 532 | ||
| 533 | static struct platform_driver sh_tmu_device_driver = { | 533 | static struct platform_driver sh_tmu_device_driver = { |
| 534 | .probe = sh_tmu_probe, | 534 | .probe = sh_tmu_probe, |
| 535 | .remove = __devexit_p(sh_tmu_remove), | 535 | .remove = sh_tmu_remove, |
| 536 | .driver = { | 536 | .driver = { |
| 537 | .name = "sh_tmu", | 537 | .name = "sh_tmu", |
| 538 | } | 538 | } |
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index 965b7811e04f..7b695913cb30 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c | |||
| @@ -256,7 +256,7 @@ static struct cn_dev cdev = { | |||
| 256 | .input = cn_rx_skb, | 256 | .input = cn_rx_skb, |
| 257 | }; | 257 | }; |
| 258 | 258 | ||
| 259 | static int __devinit cn_init(void) | 259 | static int cn_init(void) |
| 260 | { | 260 | { |
| 261 | struct cn_dev *dev = &cdev; | 261 | struct cn_dev *dev = &cdev; |
| 262 | struct netlink_kernel_cfg cfg = { | 262 | struct netlink_kernel_cfg cfg = { |
| @@ -281,7 +281,7 @@ static int __devinit cn_init(void) | |||
| 281 | return 0; | 281 | return 0; |
| 282 | } | 282 | } |
| 283 | 283 | ||
| 284 | static void __devexit cn_fini(void) | 284 | static void cn_fini(void) |
| 285 | { | 285 | { |
| 286 | struct cn_dev *dev = &cdev; | 286 | struct cn_dev *dev = &cdev; |
| 287 | 287 | ||
diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig index ea512f47b789..e0a899f25e37 100644 --- a/drivers/cpufreq/Kconfig +++ b/drivers/cpufreq/Kconfig | |||
| @@ -20,6 +20,9 @@ if CPU_FREQ | |||
| 20 | config CPU_FREQ_TABLE | 20 | config CPU_FREQ_TABLE |
| 21 | tristate | 21 | tristate |
| 22 | 22 | ||
| 23 | config CPU_FREQ_GOV_COMMON | ||
| 24 | bool | ||
| 25 | |||
| 23 | config CPU_FREQ_STAT | 26 | config CPU_FREQ_STAT |
| 24 | tristate "CPU frequency translation statistics" | 27 | tristate "CPU frequency translation statistics" |
| 25 | select CPU_FREQ_TABLE | 28 | select CPU_FREQ_TABLE |
| @@ -141,6 +144,7 @@ config CPU_FREQ_GOV_USERSPACE | |||
| 141 | config CPU_FREQ_GOV_ONDEMAND | 144 | config CPU_FREQ_GOV_ONDEMAND |
| 142 | tristate "'ondemand' cpufreq policy governor" | 145 | tristate "'ondemand' cpufreq policy governor" |
| 143 | select CPU_FREQ_TABLE | 146 | select CPU_FREQ_TABLE |
| 147 | select CPU_FREQ_GOV_COMMON | ||
| 144 | help | 148 | help |
| 145 | 'ondemand' - This driver adds a dynamic cpufreq policy governor. | 149 | 'ondemand' - This driver adds a dynamic cpufreq policy governor. |
| 146 | The governor does a periodic polling and | 150 | The governor does a periodic polling and |
| @@ -159,6 +163,7 @@ config CPU_FREQ_GOV_ONDEMAND | |||
| 159 | config CPU_FREQ_GOV_CONSERVATIVE | 163 | config CPU_FREQ_GOV_CONSERVATIVE |
| 160 | tristate "'conservative' cpufreq governor" | 164 | tristate "'conservative' cpufreq governor" |
| 161 | depends on CPU_FREQ | 165 | depends on CPU_FREQ |
| 166 | select CPU_FREQ_GOV_COMMON | ||
| 162 | help | 167 | help |
| 163 | 'conservative' - this driver is rather similar to the 'ondemand' | 168 | 'conservative' - this driver is rather similar to the 'ondemand' |
| 164 | governor both in its source code and its purpose, the difference is | 169 | governor both in its source code and its purpose, the difference is |
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index 1f254ec087c1..fadc4d496e2f 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile | |||
| @@ -7,8 +7,9 @@ obj-$(CONFIG_CPU_FREQ_STAT) += cpufreq_stats.o | |||
| 7 | obj-$(CONFIG_CPU_FREQ_GOV_PERFORMANCE) += cpufreq_performance.o | 7 | obj-$(CONFIG_CPU_FREQ_GOV_PERFORMANCE) += cpufreq_performance.o |
| 8 | obj-$(CONFIG_CPU_FREQ_GOV_POWERSAVE) += cpufreq_powersave.o | 8 | obj-$(CONFIG_CPU_FREQ_GOV_POWERSAVE) += cpufreq_powersave.o |
| 9 | obj-$(CONFIG_CPU_FREQ_GOV_USERSPACE) += cpufreq_userspace.o | 9 | obj-$(CONFIG_CPU_FREQ_GOV_USERSPACE) += cpufreq_userspace.o |
| 10 | obj-$(CONFIG_CPU_FREQ_GOV_ONDEMAND) += cpufreq_ondemand.o cpufreq_governor.o | 10 | obj-$(CONFIG_CPU_FREQ_GOV_ONDEMAND) += cpufreq_ondemand.o |
| 11 | obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE) += cpufreq_conservative.o cpufreq_governor.o | 11 | obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE) += cpufreq_conservative.o |
| 12 | obj-$(CONFIG_CPU_FREQ_GOV_COMMON) += cpufreq_governor.o | ||
| 12 | 13 | ||
| 13 | # CPUfreq cross-arch helpers | 14 | # CPUfreq cross-arch helpers |
| 14 | obj-$(CONFIG_CPU_FREQ_TABLE) += freq_table.o | 15 | obj-$(CONFIG_CPU_FREQ_TABLE) += freq_table.o |
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index e40e50809644..9d7732b81044 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c | |||
| @@ -364,18 +364,21 @@ static int __init cpufreq_stats_init(void) | |||
| 364 | if (ret) | 364 | if (ret) |
| 365 | return ret; | 365 | return ret; |
| 366 | 366 | ||
| 367 | register_hotcpu_notifier(&cpufreq_stat_cpu_notifier); | ||
| 368 | for_each_online_cpu(cpu) | ||
| 369 | cpufreq_update_policy(cpu); | ||
| 370 | |||
| 367 | ret = cpufreq_register_notifier(¬ifier_trans_block, | 371 | ret = cpufreq_register_notifier(¬ifier_trans_block, |
| 368 | CPUFREQ_TRANSITION_NOTIFIER); | 372 | CPUFREQ_TRANSITION_NOTIFIER); |
| 369 | if (ret) { | 373 | if (ret) { |
| 370 | cpufreq_unregister_notifier(¬ifier_policy_block, | 374 | cpufreq_unregister_notifier(¬ifier_policy_block, |
| 371 | CPUFREQ_POLICY_NOTIFIER); | 375 | CPUFREQ_POLICY_NOTIFIER); |
| 376 | unregister_hotcpu_notifier(&cpufreq_stat_cpu_notifier); | ||
| 377 | for_each_online_cpu(cpu) | ||
| 378 | cpufreq_stats_free_table(cpu); | ||
| 372 | return ret; | 379 | return ret; |
| 373 | } | 380 | } |
| 374 | 381 | ||
| 375 | register_hotcpu_notifier(&cpufreq_stat_cpu_notifier); | ||
| 376 | for_each_online_cpu(cpu) { | ||
| 377 | cpufreq_update_policy(cpu); | ||
| 378 | } | ||
| 379 | return 0; | 382 | return 0; |
| 380 | } | 383 | } |
| 381 | static void __exit cpufreq_stats_exit(void) | 384 | static void __exit cpufreq_stats_exit(void) |
diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c index f1fa500ac105..1180d536d1eb 100644 --- a/drivers/cpufreq/longhaul.c +++ b/drivers/cpufreq/longhaul.c | |||
| @@ -77,7 +77,7 @@ static unsigned int longhaul_index; | |||
| 77 | static int scale_voltage; | 77 | static int scale_voltage; |
| 78 | static int disable_acpi_c3; | 78 | static int disable_acpi_c3; |
| 79 | static int revid_errata; | 79 | static int revid_errata; |
| 80 | 80 | static int enable; | |
| 81 | 81 | ||
| 82 | /* Clock ratios multiplied by 10 */ | 82 | /* Clock ratios multiplied by 10 */ |
| 83 | static int mults[32]; | 83 | static int mults[32]; |
| @@ -965,6 +965,10 @@ static int __init longhaul_init(void) | |||
| 965 | if (!x86_match_cpu(longhaul_id)) | 965 | if (!x86_match_cpu(longhaul_id)) |
| 966 | return -ENODEV; | 966 | return -ENODEV; |
| 967 | 967 | ||
| 968 | if (!enable) { | ||
| 969 | printk(KERN_ERR PFX "Option \"enable\" not set. Aborting.\n"); | ||
| 970 | return -ENODEV; | ||
| 971 | } | ||
| 968 | #ifdef CONFIG_SMP | 972 | #ifdef CONFIG_SMP |
| 969 | if (num_online_cpus() > 1) { | 973 | if (num_online_cpus() > 1) { |
| 970 | printk(KERN_ERR PFX "More than 1 CPU detected, " | 974 | printk(KERN_ERR PFX "More than 1 CPU detected, " |
| @@ -1021,6 +1025,10 @@ MODULE_PARM_DESC(scale_voltage, "Scale voltage of processor"); | |||
| 1021 | * such. */ | 1025 | * such. */ |
| 1022 | module_param(revid_errata, int, 0644); | 1026 | module_param(revid_errata, int, 0644); |
| 1023 | MODULE_PARM_DESC(revid_errata, "Ignore CPU Revision ID"); | 1027 | MODULE_PARM_DESC(revid_errata, "Ignore CPU Revision ID"); |
| 1028 | /* By default driver is disabled to prevent incompatible | ||
| 1029 | * system freeze. */ | ||
| 1030 | module_param(enable, int, 0644); | ||
| 1031 | MODULE_PARM_DESC(enable, "Enable driver"); | ||
| 1024 | 1032 | ||
| 1025 | MODULE_AUTHOR("Dave Jones <davej@redhat.com>"); | 1033 | MODULE_AUTHOR("Dave Jones <davej@redhat.com>"); |
| 1026 | MODULE_DESCRIPTION("Longhaul driver for VIA Cyrix processors."); | 1034 | MODULE_DESCRIPTION("Longhaul driver for VIA Cyrix processors."); |
diff --git a/drivers/cpuidle/coupled.c b/drivers/cpuidle/coupled.c index 3265844839bf..2a297f86dbad 100644 --- a/drivers/cpuidle/coupled.c +++ b/drivers/cpuidle/coupled.c | |||
| @@ -209,7 +209,7 @@ inline int cpuidle_coupled_set_not_ready(struct cpuidle_coupled *coupled) | |||
| 209 | int all; | 209 | int all; |
| 210 | int ret; | 210 | int ret; |
| 211 | 211 | ||
| 212 | all = coupled->online_count || (coupled->online_count << WAITING_BITS); | 212 | all = coupled->online_count | (coupled->online_count << WAITING_BITS); |
| 213 | ret = atomic_add_unless(&coupled->ready_waiting_counts, | 213 | ret = atomic_add_unless(&coupled->ready_waiting_counts, |
| 214 | -MAX_WAITING_CPUS, all); | 214 | -MAX_WAITING_CPUS, all); |
| 215 | 215 | ||
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 8df53dd8dbe1..e1f6860e069c 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
| @@ -69,24 +69,15 @@ int cpuidle_play_dead(void) | |||
| 69 | { | 69 | { |
| 70 | struct cpuidle_device *dev = __this_cpu_read(cpuidle_devices); | 70 | struct cpuidle_device *dev = __this_cpu_read(cpuidle_devices); |
| 71 | struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); | 71 | struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); |
| 72 | int i, dead_state = -1; | 72 | int i; |
| 73 | int power_usage = -1; | ||
| 74 | 73 | ||
| 75 | if (!drv) | 74 | if (!drv) |
| 76 | return -ENODEV; | 75 | return -ENODEV; |
| 77 | 76 | ||
| 78 | /* Find lowest-power state that supports long-term idle */ | 77 | /* Find lowest-power state that supports long-term idle */ |
| 79 | for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++) { | 78 | for (i = drv->state_count - 1; i >= CPUIDLE_DRIVER_STATE_START; i--) |
| 80 | struct cpuidle_state *s = &drv->states[i]; | 79 | if (drv->states[i].enter_dead) |
| 81 | 80 | return drv->states[i].enter_dead(dev, i); | |
| 82 | if (s->power_usage < power_usage && s->enter_dead) { | ||
| 83 | power_usage = s->power_usage; | ||
| 84 | dead_state = i; | ||
| 85 | } | ||
| 86 | } | ||
| 87 | |||
| 88 | if (dead_state != -1) | ||
| 89 | return drv->states[dead_state].enter_dead(dev, dead_state); | ||
| 90 | 81 | ||
| 91 | return -ENODEV; | 82 | return -ENODEV; |
| 92 | } | 83 | } |
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c index 3af841fb397a..422c7b69ba7c 100644 --- a/drivers/cpuidle/driver.c +++ b/drivers/cpuidle/driver.c | |||
| @@ -19,34 +19,9 @@ DEFINE_SPINLOCK(cpuidle_driver_lock); | |||
| 19 | static void __cpuidle_set_cpu_driver(struct cpuidle_driver *drv, int cpu); | 19 | static void __cpuidle_set_cpu_driver(struct cpuidle_driver *drv, int cpu); |
| 20 | static struct cpuidle_driver * __cpuidle_get_cpu_driver(int cpu); | 20 | static struct cpuidle_driver * __cpuidle_get_cpu_driver(int cpu); |
| 21 | 21 | ||
| 22 | static void set_power_states(struct cpuidle_driver *drv) | ||
| 23 | { | ||
| 24 | int i; | ||
| 25 | |||
| 26 | /* | ||
| 27 | * cpuidle driver should set the drv->power_specified bit | ||
| 28 | * before registering if the driver provides | ||
| 29 | * power_usage numbers. | ||
| 30 | * | ||
| 31 | * If power_specified is not set, | ||
| 32 | * we fill in power_usage with decreasing values as the | ||
| 33 | * cpuidle code has an implicit assumption that state Cn | ||
| 34 | * uses less power than C(n-1). | ||
| 35 | * | ||
| 36 | * With CONFIG_ARCH_HAS_CPU_RELAX, C0 is already assigned | ||
| 37 | * an power value of -1. So we use -2, -3, etc, for other | ||
| 38 | * c-states. | ||
| 39 | */ | ||
| 40 | for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++) | ||
| 41 | drv->states[i].power_usage = -1 - i; | ||
| 42 | } | ||
| 43 | |||
| 44 | static void __cpuidle_driver_init(struct cpuidle_driver *drv) | 22 | static void __cpuidle_driver_init(struct cpuidle_driver *drv) |
| 45 | { | 23 | { |
| 46 | drv->refcnt = 0; | 24 | drv->refcnt = 0; |
| 47 | |||
| 48 | if (!drv->power_specified) | ||
| 49 | set_power_states(drv); | ||
| 50 | } | 25 | } |
| 51 | 26 | ||
| 52 | static int __cpuidle_register_driver(struct cpuidle_driver *drv, int cpu) | 27 | static int __cpuidle_register_driver(struct cpuidle_driver *drv, int cpu) |
| @@ -235,16 +210,10 @@ EXPORT_SYMBOL_GPL(cpuidle_get_driver); | |||
| 235 | */ | 210 | */ |
| 236 | struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev) | 211 | struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev) |
| 237 | { | 212 | { |
| 238 | struct cpuidle_driver *drv; | ||
| 239 | |||
| 240 | if (!dev) | 213 | if (!dev) |
| 241 | return NULL; | 214 | return NULL; |
| 242 | 215 | ||
| 243 | spin_lock(&cpuidle_driver_lock); | 216 | return __cpuidle_get_cpu_driver(dev->cpu); |
| 244 | drv = __cpuidle_get_cpu_driver(dev->cpu); | ||
| 245 | spin_unlock(&cpuidle_driver_lock); | ||
| 246 | |||
| 247 | return drv; | ||
| 248 | } | 217 | } |
| 249 | EXPORT_SYMBOL_GPL(cpuidle_get_cpu_driver); | 218 | EXPORT_SYMBOL_GPL(cpuidle_get_cpu_driver); |
| 250 | 219 | ||
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index bd40b943b6db..fe343a06b7da 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c | |||
| @@ -312,7 +312,6 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) | |||
| 312 | { | 312 | { |
| 313 | struct menu_device *data = &__get_cpu_var(menu_devices); | 313 | struct menu_device *data = &__get_cpu_var(menu_devices); |
| 314 | int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY); | 314 | int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY); |
| 315 | int power_usage = -1; | ||
| 316 | int i; | 315 | int i; |
| 317 | int multiplier; | 316 | int multiplier; |
| 318 | struct timespec t; | 317 | struct timespec t; |
| @@ -383,11 +382,8 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) | |||
| 383 | if (s->exit_latency * multiplier > data->predicted_us) | 382 | if (s->exit_latency * multiplier > data->predicted_us) |
| 384 | continue; | 383 | continue; |
| 385 | 384 | ||
| 386 | if (s->power_usage < power_usage) { | 385 | data->last_state_idx = i; |
| 387 | power_usage = s->power_usage; | 386 | data->exit_us = s->exit_latency; |
| 388 | data->last_state_idx = i; | ||
| 389 | data->exit_us = s->exit_latency; | ||
| 390 | } | ||
| 391 | } | 387 | } |
| 392 | 388 | ||
| 393 | /* not deepest C-state chosen for low predicted residency */ | 389 | /* not deepest C-state chosen for low predicted residency */ |
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index 340942946106..428754af6236 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle/sysfs.c | |||
| @@ -374,7 +374,7 @@ static int cpuidle_add_state_sysfs(struct cpuidle_device *device) | |||
| 374 | struct cpuidle_driver *drv = cpuidle_get_cpu_driver(device); | 374 | struct cpuidle_driver *drv = cpuidle_get_cpu_driver(device); |
| 375 | 375 | ||
| 376 | /* state statistics */ | 376 | /* state statistics */ |
| 377 | for (i = 0; i < drv->state_count; i++) { | 377 | for (i = 0; i < device->state_count; i++) { |
| 378 | kobj = kzalloc(sizeof(struct cpuidle_state_kobj), GFP_KERNEL); | 378 | kobj = kzalloc(sizeof(struct cpuidle_state_kobj), GFP_KERNEL); |
| 379 | if (!kobj) | 379 | if (!kobj) |
| 380 | goto error_state; | 380 | goto error_state; |
diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index 8061336e07e7..c9d9d5c16f94 100644 --- a/drivers/crypto/atmel-aes.c +++ b/drivers/crypto/atmel-aes.c | |||
| @@ -1036,7 +1036,7 @@ err_aes_algs: | |||
| 1036 | return err; | 1036 | return err; |
| 1037 | } | 1037 | } |
| 1038 | 1038 | ||
| 1039 | static int __devinit atmel_aes_probe(struct platform_device *pdev) | 1039 | static int atmel_aes_probe(struct platform_device *pdev) |
| 1040 | { | 1040 | { |
| 1041 | struct atmel_aes_dev *aes_dd; | 1041 | struct atmel_aes_dev *aes_dd; |
| 1042 | struct aes_platform_data *pdata; | 1042 | struct aes_platform_data *pdata; |
| @@ -1152,7 +1152,7 @@ aes_dd_err: | |||
| 1152 | return err; | 1152 | return err; |
| 1153 | } | 1153 | } |
| 1154 | 1154 | ||
| 1155 | static int __devexit atmel_aes_remove(struct platform_device *pdev) | 1155 | static int atmel_aes_remove(struct platform_device *pdev) |
| 1156 | { | 1156 | { |
| 1157 | static struct atmel_aes_dev *aes_dd; | 1157 | static struct atmel_aes_dev *aes_dd; |
| 1158 | 1158 | ||
| @@ -1185,7 +1185,7 @@ static int __devexit atmel_aes_remove(struct platform_device *pdev) | |||
| 1185 | 1185 | ||
| 1186 | static struct platform_driver atmel_aes_driver = { | 1186 | static struct platform_driver atmel_aes_driver = { |
| 1187 | .probe = atmel_aes_probe, | 1187 | .probe = atmel_aes_probe, |
| 1188 | .remove = __devexit_p(atmel_aes_remove), | 1188 | .remove = atmel_aes_remove, |
| 1189 | .driver = { | 1189 | .driver = { |
| 1190 | .name = "atmel_aes", | 1190 | .name = "atmel_aes", |
| 1191 | .owner = THIS_MODULE, | 1191 | .owner = THIS_MODULE, |
diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c index bcdf55fdc623..4918e9424d31 100644 --- a/drivers/crypto/atmel-sha.c +++ b/drivers/crypto/atmel-sha.c | |||
| @@ -964,7 +964,7 @@ err_sha_algs: | |||
| 964 | return err; | 964 | return err; |
| 965 | } | 965 | } |
| 966 | 966 | ||
| 967 | static int __devinit atmel_sha_probe(struct platform_device *pdev) | 967 | static int atmel_sha_probe(struct platform_device *pdev) |
| 968 | { | 968 | { |
| 969 | struct atmel_sha_dev *sha_dd; | 969 | struct atmel_sha_dev *sha_dd; |
| 970 | struct device *dev = &pdev->dev; | 970 | struct device *dev = &pdev->dev; |
| @@ -1063,7 +1063,7 @@ sha_dd_err: | |||
| 1063 | return err; | 1063 | return err; |
| 1064 | } | 1064 | } |
| 1065 | 1065 | ||
| 1066 | static int __devexit atmel_sha_remove(struct platform_device *pdev) | 1066 | static int atmel_sha_remove(struct platform_device *pdev) |
| 1067 | { | 1067 | { |
| 1068 | static struct atmel_sha_dev *sha_dd; | 1068 | static struct atmel_sha_dev *sha_dd; |
| 1069 | 1069 | ||
| @@ -1093,7 +1093,7 @@ static int __devexit atmel_sha_remove(struct platform_device *pdev) | |||
| 1093 | 1093 | ||
| 1094 | static struct platform_driver atmel_sha_driver = { | 1094 | static struct platform_driver atmel_sha_driver = { |
| 1095 | .probe = atmel_sha_probe, | 1095 | .probe = atmel_sha_probe, |
| 1096 | .remove = __devexit_p(atmel_sha_remove), | 1096 | .remove = atmel_sha_remove, |
| 1097 | .driver = { | 1097 | .driver = { |
| 1098 | .name = "atmel_sha", | 1098 | .name = "atmel_sha", |
| 1099 | .owner = THIS_MODULE, | 1099 | .owner = THIS_MODULE, |
diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c index 7495f98c7221..7c73fbb17538 100644 --- a/drivers/crypto/atmel-tdes.c +++ b/drivers/crypto/atmel-tdes.c | |||
| @@ -1053,7 +1053,7 @@ err_tdes_algs: | |||
| 1053 | return err; | 1053 | return err; |
| 1054 | } | 1054 | } |
| 1055 | 1055 | ||
| 1056 | static int __devinit atmel_tdes_probe(struct platform_device *pdev) | 1056 | static int atmel_tdes_probe(struct platform_device *pdev) |
| 1057 | { | 1057 | { |
| 1058 | struct atmel_tdes_dev *tdes_dd; | 1058 | struct atmel_tdes_dev *tdes_dd; |
| 1059 | struct device *dev = &pdev->dev; | 1059 | struct device *dev = &pdev->dev; |
| @@ -1162,7 +1162,7 @@ tdes_dd_err: | |||
| 1162 | return err; | 1162 | return err; |
| 1163 | } | 1163 | } |
| 1164 | 1164 | ||
| 1165 | static int __devexit atmel_tdes_remove(struct platform_device *pdev) | 1165 | static int atmel_tdes_remove(struct platform_device *pdev) |
| 1166 | { | 1166 | { |
| 1167 | static struct atmel_tdes_dev *tdes_dd; | 1167 | static struct atmel_tdes_dev *tdes_dd; |
| 1168 | 1168 | ||
| @@ -1195,7 +1195,7 @@ static int __devexit atmel_tdes_remove(struct platform_device *pdev) | |||
| 1195 | 1195 | ||
| 1196 | static struct platform_driver atmel_tdes_driver = { | 1196 | static struct platform_driver atmel_tdes_driver = { |
| 1197 | .probe = atmel_tdes_probe, | 1197 | .probe = atmel_tdes_probe, |
| 1198 | .remove = __devexit_p(atmel_tdes_remove), | 1198 | .remove = atmel_tdes_remove, |
| 1199 | .driver = { | 1199 | .driver = { |
| 1200 | .name = "atmel_tdes", | 1200 | .name = "atmel_tdes", |
| 1201 | .owner = THIS_MODULE, | 1201 | .owner = THIS_MODULE, |
diff --git a/drivers/crypto/bfin_crc.c b/drivers/crypto/bfin_crc.c index 5398580b4313..a22f1a9f895f 100644 --- a/drivers/crypto/bfin_crc.c +++ b/drivers/crypto/bfin_crc.c | |||
| @@ -586,7 +586,7 @@ static int bfin_crypto_crc_suspend(struct platform_device *pdev, pm_message_t st | |||
| 586 | * bfin_crypto_crc_probe - Initialize module | 586 | * bfin_crypto_crc_probe - Initialize module |
| 587 | * | 587 | * |
| 588 | */ | 588 | */ |
| 589 | static int __devinit bfin_crypto_crc_probe(struct platform_device *pdev) | 589 | static int bfin_crypto_crc_probe(struct platform_device *pdev) |
| 590 | { | 590 | { |
| 591 | struct device *dev = &pdev->dev; | 591 | struct device *dev = &pdev->dev; |
| 592 | struct resource *res; | 592 | struct resource *res; |
| @@ -707,7 +707,7 @@ out_error_free_mem: | |||
| 707 | * bfin_crypto_crc_remove - Initialize module | 707 | * bfin_crypto_crc_remove - Initialize module |
| 708 | * | 708 | * |
| 709 | */ | 709 | */ |
| 710 | static int __devexit bfin_crypto_crc_remove(struct platform_device *pdev) | 710 | static int bfin_crypto_crc_remove(struct platform_device *pdev) |
| 711 | { | 711 | { |
| 712 | struct bfin_crypto_crc *crc = platform_get_drvdata(pdev); | 712 | struct bfin_crypto_crc *crc = platform_get_drvdata(pdev); |
| 713 | 713 | ||
| @@ -731,7 +731,7 @@ static int __devexit bfin_crypto_crc_remove(struct platform_device *pdev) | |||
| 731 | 731 | ||
| 732 | static struct platform_driver bfin_crypto_crc_driver = { | 732 | static struct platform_driver bfin_crypto_crc_driver = { |
| 733 | .probe = bfin_crypto_crc_probe, | 733 | .probe = bfin_crypto_crc_probe, |
| 734 | .remove = __devexit_p(bfin_crypto_crc_remove), | 734 | .remove = bfin_crypto_crc_remove, |
| 735 | .suspend = bfin_crypto_crc_suspend, | 735 | .suspend = bfin_crypto_crc_suspend, |
| 736 | .resume = bfin_crypto_crc_resume, | 736 | .resume = bfin_crypto_crc_resume, |
| 737 | .driver = { | 737 | .driver = { |
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index bf20dd891705..1c56f63524f2 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c | |||
| @@ -420,7 +420,7 @@ static struct platform_driver caam_driver = { | |||
| 420 | .of_match_table = caam_match, | 420 | .of_match_table = caam_match, |
| 421 | }, | 421 | }, |
| 422 | .probe = caam_probe, | 422 | .probe = caam_probe, |
| 423 | .remove = __devexit_p(caam_remove), | 423 | .remove = caam_remove, |
| 424 | }; | 424 | }; |
| 425 | 425 | ||
| 426 | module_platform_driver(caam_driver); | 426 | module_platform_driver(caam_driver); |
diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c index 51f196d77f21..0c9ff4971724 100644 --- a/drivers/crypto/geode-aes.c +++ b/drivers/crypto/geode-aes.c | |||
| @@ -498,8 +498,7 @@ static struct crypto_alg geode_ecb_alg = { | |||
| 498 | } | 498 | } |
| 499 | }; | 499 | }; |
| 500 | 500 | ||
| 501 | static void __devexit | 501 | static void geode_aes_remove(struct pci_dev *dev) |
| 502 | geode_aes_remove(struct pci_dev *dev) | ||
| 503 | { | 502 | { |
| 504 | crypto_unregister_alg(&geode_alg); | 503 | crypto_unregister_alg(&geode_alg); |
| 505 | crypto_unregister_alg(&geode_ecb_alg); | 504 | crypto_unregister_alg(&geode_ecb_alg); |
| @@ -513,8 +512,7 @@ geode_aes_remove(struct pci_dev *dev) | |||
| 513 | } | 512 | } |
| 514 | 513 | ||
| 515 | 514 | ||
| 516 | static int __devinit | 515 | static int geode_aes_probe(struct pci_dev *dev, const struct pci_device_id *id) |
| 517 | geode_aes_probe(struct pci_dev *dev, const struct pci_device_id *id) | ||
| 518 | { | 516 | { |
| 519 | int ret; | 517 | int ret; |
| 520 | ret = pci_enable_device(dev); | 518 | ret = pci_enable_device(dev); |
| @@ -582,7 +580,7 @@ static struct pci_driver geode_aes_driver = { | |||
| 582 | .name = "Geode LX AES", | 580 | .name = "Geode LX AES", |
| 583 | .id_table = geode_aes_tbl, | 581 | .id_table = geode_aes_tbl, |
| 584 | .probe = geode_aes_probe, | 582 | .probe = geode_aes_probe, |
| 585 | .remove = __devexit_p(geode_aes_remove) | 583 | .remove = geode_aes_remove, |
| 586 | }; | 584 | }; |
| 587 | 585 | ||
| 588 | module_pci_driver(geode_aes_driver); | 586 | module_pci_driver(geode_aes_driver); |
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c index fda32968a66b..ebf130e894b5 100644 --- a/drivers/crypto/hifn_795x.c +++ b/drivers/crypto/hifn_795x.c | |||
| @@ -2561,7 +2561,7 @@ static void hifn_tasklet_callback(unsigned long data) | |||
| 2561 | hifn_process_queue(dev); | 2561 | hifn_process_queue(dev); |
| 2562 | } | 2562 | } |
| 2563 | 2563 | ||
| 2564 | static int __devinit hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id) | 2564 | static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 2565 | { | 2565 | { |
| 2566 | int err, i; | 2566 | int err, i; |
| 2567 | struct hifn_device *dev; | 2567 | struct hifn_device *dev; |
| @@ -2696,7 +2696,7 @@ err_out_disable_pci_device: | |||
| 2696 | return err; | 2696 | return err; |
| 2697 | } | 2697 | } |
| 2698 | 2698 | ||
| 2699 | static void __devexit hifn_remove(struct pci_dev *pdev) | 2699 | static void hifn_remove(struct pci_dev *pdev) |
| 2700 | { | 2700 | { |
| 2701 | int i; | 2701 | int i; |
| 2702 | struct hifn_device *dev; | 2702 | struct hifn_device *dev; |
| @@ -2740,7 +2740,7 @@ static struct pci_driver hifn_pci_driver = { | |||
| 2740 | .name = "hifn795x", | 2740 | .name = "hifn795x", |
| 2741 | .id_table = hifn_pci_tbl, | 2741 | .id_table = hifn_pci_tbl, |
| 2742 | .probe = hifn_probe, | 2742 | .probe = hifn_probe, |
| 2743 | .remove = __devexit_p(hifn_remove), | 2743 | .remove = hifn_remove, |
| 2744 | }; | 2744 | }; |
| 2745 | 2745 | ||
| 2746 | static int __init hifn_init(void) | 2746 | static int __init hifn_init(void) |
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c index 24ccae453e79..ce6290e5471a 100644 --- a/drivers/crypto/mv_cesa.c +++ b/drivers/crypto/mv_cesa.c | |||
| @@ -1184,7 +1184,7 @@ MODULE_DEVICE_TABLE(of, mv_cesa_of_match_table); | |||
| 1184 | 1184 | ||
| 1185 | static struct platform_driver marvell_crypto = { | 1185 | static struct platform_driver marvell_crypto = { |
| 1186 | .probe = mv_probe, | 1186 | .probe = mv_probe, |
| 1187 | .remove = __devexit_p(mv_remove), | 1187 | .remove = mv_remove, |
| 1188 | .driver = { | 1188 | .driver = { |
| 1189 | .owner = THIS_MODULE, | 1189 | .owner = THIS_MODULE, |
| 1190 | .name = "mv_crypto", | 1190 | .name = "mv_crypto", |
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c index aab257403b4a..e1f0ab413c3b 100644 --- a/drivers/crypto/n2_core.c +++ b/drivers/crypto/n2_core.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | #define DRV_MODULE_VERSION "0.2" | 34 | #define DRV_MODULE_VERSION "0.2" |
| 35 | #define DRV_MODULE_RELDATE "July 28, 2011" | 35 | #define DRV_MODULE_RELDATE "July 28, 2011" |
| 36 | 36 | ||
| 37 | static char version[] __devinitdata = | 37 | static char version[] = |
| 38 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; | 38 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; |
| 39 | 39 | ||
| 40 | MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); | 40 | MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); |
| @@ -1388,7 +1388,7 @@ static int n2_cipher_cra_init(struct crypto_tfm *tfm) | |||
| 1388 | return 0; | 1388 | return 0; |
| 1389 | } | 1389 | } |
| 1390 | 1390 | ||
| 1391 | static int __devinit __n2_register_one_cipher(const struct n2_cipher_tmpl *tmpl) | 1391 | static int __n2_register_one_cipher(const struct n2_cipher_tmpl *tmpl) |
| 1392 | { | 1392 | { |
| 1393 | struct n2_cipher_alg *p = kzalloc(sizeof(*p), GFP_KERNEL); | 1393 | struct n2_cipher_alg *p = kzalloc(sizeof(*p), GFP_KERNEL); |
| 1394 | struct crypto_alg *alg; | 1394 | struct crypto_alg *alg; |
| @@ -1424,7 +1424,7 @@ static int __devinit __n2_register_one_cipher(const struct n2_cipher_tmpl *tmpl) | |||
| 1424 | return err; | 1424 | return err; |
| 1425 | } | 1425 | } |
| 1426 | 1426 | ||
| 1427 | static int __devinit __n2_register_one_hmac(struct n2_ahash_alg *n2ahash) | 1427 | static int __n2_register_one_hmac(struct n2_ahash_alg *n2ahash) |
| 1428 | { | 1428 | { |
| 1429 | struct n2_hmac_alg *p = kzalloc(sizeof(*p), GFP_KERNEL); | 1429 | struct n2_hmac_alg *p = kzalloc(sizeof(*p), GFP_KERNEL); |
| 1430 | struct ahash_alg *ahash; | 1430 | struct ahash_alg *ahash; |
| @@ -1462,7 +1462,7 @@ static int __devinit __n2_register_one_hmac(struct n2_ahash_alg *n2ahash) | |||
| 1462 | return err; | 1462 | return err; |
| 1463 | } | 1463 | } |
| 1464 | 1464 | ||
| 1465 | static int __devinit __n2_register_one_ahash(const struct n2_hash_tmpl *tmpl) | 1465 | static int __n2_register_one_ahash(const struct n2_hash_tmpl *tmpl) |
| 1466 | { | 1466 | { |
| 1467 | struct n2_ahash_alg *p = kzalloc(sizeof(*p), GFP_KERNEL); | 1467 | struct n2_ahash_alg *p = kzalloc(sizeof(*p), GFP_KERNEL); |
| 1468 | struct hash_alg_common *halg; | 1468 | struct hash_alg_common *halg; |
| @@ -1517,7 +1517,7 @@ static int __devinit __n2_register_one_ahash(const struct n2_hash_tmpl *tmpl) | |||
| 1517 | return err; | 1517 | return err; |
| 1518 | } | 1518 | } |
| 1519 | 1519 | ||
| 1520 | static int __devinit n2_register_algs(void) | 1520 | static int n2_register_algs(void) |
| 1521 | { | 1521 | { |
| 1522 | int i, err = 0; | 1522 | int i, err = 0; |
| 1523 | 1523 | ||
| @@ -1545,7 +1545,7 @@ out: | |||
| 1545 | return err; | 1545 | return err; |
| 1546 | } | 1546 | } |
| 1547 | 1547 | ||
| 1548 | static void __devexit n2_unregister_algs(void) | 1548 | static void n2_unregister_algs(void) |
| 1549 | { | 1549 | { |
| 1550 | mutex_lock(&spu_lock); | 1550 | mutex_lock(&spu_lock); |
| 1551 | if (!--algs_registered) | 1551 | if (!--algs_registered) |
| @@ -1822,8 +1822,8 @@ static int spu_mdesc_scan(struct mdesc_handle *mdesc, struct platform_device *de | |||
| 1822 | return err; | 1822 | return err; |
| 1823 | } | 1823 | } |
| 1824 | 1824 | ||
| 1825 | static int __devinit get_irq_props(struct mdesc_handle *mdesc, u64 node, | 1825 | static int get_irq_props(struct mdesc_handle *mdesc, u64 node, |
| 1826 | struct spu_mdesc_info *ip) | 1826 | struct spu_mdesc_info *ip) |
| 1827 | { | 1827 | { |
| 1828 | const u64 *ino; | 1828 | const u64 *ino; |
| 1829 | int ino_len; | 1829 | int ino_len; |
| @@ -1851,10 +1851,10 @@ static int __devinit get_irq_props(struct mdesc_handle *mdesc, u64 node, | |||
| 1851 | return 0; | 1851 | return 0; |
| 1852 | } | 1852 | } |
| 1853 | 1853 | ||
| 1854 | static int __devinit grab_mdesc_irq_props(struct mdesc_handle *mdesc, | 1854 | static int grab_mdesc_irq_props(struct mdesc_handle *mdesc, |
| 1855 | struct platform_device *dev, | 1855 | struct platform_device *dev, |
| 1856 | struct spu_mdesc_info *ip, | 1856 | struct spu_mdesc_info *ip, |
| 1857 | const char *node_name) | 1857 | const char *node_name) |
| 1858 | { | 1858 | { |
| 1859 | const unsigned int *reg; | 1859 | const unsigned int *reg; |
| 1860 | u64 node; | 1860 | u64 node; |
| @@ -1883,7 +1883,7 @@ static int __devinit grab_mdesc_irq_props(struct mdesc_handle *mdesc, | |||
| 1883 | static unsigned long n2_spu_hvapi_major; | 1883 | static unsigned long n2_spu_hvapi_major; |
| 1884 | static unsigned long n2_spu_hvapi_minor; | 1884 | static unsigned long n2_spu_hvapi_minor; |
| 1885 | 1885 | ||
| 1886 | static int __devinit n2_spu_hvapi_register(void) | 1886 | static int n2_spu_hvapi_register(void) |
| 1887 | { | 1887 | { |
| 1888 | int err; | 1888 | int err; |
| 1889 | 1889 | ||
| @@ -1909,7 +1909,7 @@ static void n2_spu_hvapi_unregister(void) | |||
| 1909 | 1909 | ||
| 1910 | static int global_ref; | 1910 | static int global_ref; |
| 1911 | 1911 | ||
| 1912 | static int __devinit grab_global_resources(void) | 1912 | static int grab_global_resources(void) |
| 1913 | { | 1913 | { |
| 1914 | int err = 0; | 1914 | int err = 0; |
| 1915 | 1915 | ||
| @@ -1973,7 +1973,7 @@ static void release_global_resources(void) | |||
| 1973 | mutex_unlock(&spu_lock); | 1973 | mutex_unlock(&spu_lock); |
| 1974 | } | 1974 | } |
| 1975 | 1975 | ||
| 1976 | static struct n2_crypto * __devinit alloc_n2cp(void) | 1976 | static struct n2_crypto *alloc_n2cp(void) |
| 1977 | { | 1977 | { |
| 1978 | struct n2_crypto *np = kzalloc(sizeof(struct n2_crypto), GFP_KERNEL); | 1978 | struct n2_crypto *np = kzalloc(sizeof(struct n2_crypto), GFP_KERNEL); |
| 1979 | 1979 | ||
| @@ -1993,7 +1993,7 @@ static void free_n2cp(struct n2_crypto *np) | |||
| 1993 | kfree(np); | 1993 | kfree(np); |
| 1994 | } | 1994 | } |
| 1995 | 1995 | ||
| 1996 | static void __devinit n2_spu_driver_version(void) | 1996 | static void n2_spu_driver_version(void) |
| 1997 | { | 1997 | { |
| 1998 | static int n2_spu_version_printed; | 1998 | static int n2_spu_version_printed; |
| 1999 | 1999 | ||
| @@ -2001,7 +2001,7 @@ static void __devinit n2_spu_driver_version(void) | |||
| 2001 | pr_info("%s", version); | 2001 | pr_info("%s", version); |
| 2002 | } | 2002 | } |
| 2003 | 2003 | ||
| 2004 | static int __devinit n2_crypto_probe(struct platform_device *dev) | 2004 | static int n2_crypto_probe(struct platform_device *dev) |
| 2005 | { | 2005 | { |
| 2006 | struct mdesc_handle *mdesc; | 2006 | struct mdesc_handle *mdesc; |
| 2007 | const char *full_name; | 2007 | const char *full_name; |
| @@ -2077,7 +2077,7 @@ out_free_n2cp: | |||
| 2077 | return err; | 2077 | return err; |
| 2078 | } | 2078 | } |
| 2079 | 2079 | ||
| 2080 | static int __devexit n2_crypto_remove(struct platform_device *dev) | 2080 | static int n2_crypto_remove(struct platform_device *dev) |
| 2081 | { | 2081 | { |
| 2082 | struct n2_crypto *np = dev_get_drvdata(&dev->dev); | 2082 | struct n2_crypto *np = dev_get_drvdata(&dev->dev); |
| 2083 | 2083 | ||
| @@ -2092,7 +2092,7 @@ static int __devexit n2_crypto_remove(struct platform_device *dev) | |||
| 2092 | return 0; | 2092 | return 0; |
| 2093 | } | 2093 | } |
| 2094 | 2094 | ||
| 2095 | static struct n2_mau * __devinit alloc_ncp(void) | 2095 | static struct n2_mau *alloc_ncp(void) |
| 2096 | { | 2096 | { |
| 2097 | struct n2_mau *mp = kzalloc(sizeof(struct n2_mau), GFP_KERNEL); | 2097 | struct n2_mau *mp = kzalloc(sizeof(struct n2_mau), GFP_KERNEL); |
| 2098 | 2098 | ||
| @@ -2112,7 +2112,7 @@ static void free_ncp(struct n2_mau *mp) | |||
| 2112 | kfree(mp); | 2112 | kfree(mp); |
| 2113 | } | 2113 | } |
| 2114 | 2114 | ||
| 2115 | static int __devinit n2_mau_probe(struct platform_device *dev) | 2115 | static int n2_mau_probe(struct platform_device *dev) |
| 2116 | { | 2116 | { |
| 2117 | struct mdesc_handle *mdesc; | 2117 | struct mdesc_handle *mdesc; |
| 2118 | const char *full_name; | 2118 | const char *full_name; |
| @@ -2179,7 +2179,7 @@ out_free_ncp: | |||
| 2179 | return err; | 2179 | return err; |
| 2180 | } | 2180 | } |
| 2181 | 2181 | ||
| 2182 | static int __devexit n2_mau_remove(struct platform_device *dev) | 2182 | static int n2_mau_remove(struct platform_device *dev) |
| 2183 | { | 2183 | { |
| 2184 | struct n2_mau *mp = dev_get_drvdata(&dev->dev); | 2184 | struct n2_mau *mp = dev_get_drvdata(&dev->dev); |
| 2185 | 2185 | ||
| @@ -2217,7 +2217,7 @@ static struct platform_driver n2_crypto_driver = { | |||
| 2217 | .of_match_table = n2_crypto_match, | 2217 | .of_match_table = n2_crypto_match, |
| 2218 | }, | 2218 | }, |
| 2219 | .probe = n2_crypto_probe, | 2219 | .probe = n2_crypto_probe, |
| 2220 | .remove = __devexit_p(n2_crypto_remove), | 2220 | .remove = n2_crypto_remove, |
| 2221 | }; | 2221 | }; |
| 2222 | 2222 | ||
| 2223 | static struct of_device_id n2_mau_match[] = { | 2223 | static struct of_device_id n2_mau_match[] = { |
| @@ -2245,7 +2245,7 @@ static struct platform_driver n2_mau_driver = { | |||
| 2245 | .of_match_table = n2_mau_match, | 2245 | .of_match_table = n2_mau_match, |
| 2246 | }, | 2246 | }, |
| 2247 | .probe = n2_mau_probe, | 2247 | .probe = n2_mau_probe, |
| 2248 | .remove = __devexit_p(n2_mau_remove), | 2248 | .remove = n2_mau_remove, |
| 2249 | }; | 2249 | }; |
| 2250 | 2250 | ||
| 2251 | static int __init n2_init(void) | 2251 | static int __init n2_init(void) |
diff --git a/drivers/crypto/nx/nx.c b/drivers/crypto/nx/nx.c index f7a8a16aa7d3..c767f232e693 100644 --- a/drivers/crypto/nx/nx.c +++ b/drivers/crypto/nx/nx.c | |||
| @@ -634,8 +634,7 @@ void nx_crypto_ctx_exit(struct crypto_tfm *tfm) | |||
| 634 | nx_ctx->out_sg = NULL; | 634 | nx_ctx->out_sg = NULL; |
| 635 | } | 635 | } |
| 636 | 636 | ||
| 637 | static int __devinit nx_probe(struct vio_dev *viodev, | 637 | static int nx_probe(struct vio_dev *viodev, const struct vio_device_id *id) |
| 638 | const struct vio_device_id *id) | ||
| 639 | { | 638 | { |
| 640 | dev_dbg(&viodev->dev, "driver probed: %s resource id: 0x%x\n", | 639 | dev_dbg(&viodev->dev, "driver probed: %s resource id: 0x%x\n", |
| 641 | viodev->name, viodev->resource_id); | 640 | viodev->name, viodev->resource_id); |
| @@ -653,7 +652,7 @@ static int __devinit nx_probe(struct vio_dev *viodev, | |||
| 653 | return nx_register_algs(); | 652 | return nx_register_algs(); |
| 654 | } | 653 | } |
| 655 | 654 | ||
| 656 | static int __devexit nx_remove(struct vio_dev *viodev) | 655 | static int nx_remove(struct vio_dev *viodev) |
| 657 | { | 656 | { |
| 658 | dev_dbg(&viodev->dev, "entering nx_remove for UA 0x%x\n", | 657 | dev_dbg(&viodev->dev, "entering nx_remove for UA 0x%x\n", |
| 659 | viodev->unit_address); | 658 | viodev->unit_address); |
| @@ -689,7 +688,7 @@ static void __exit nx_fini(void) | |||
| 689 | vio_unregister_driver(&nx_driver.viodriver); | 688 | vio_unregister_driver(&nx_driver.viodriver); |
| 690 | } | 689 | } |
| 691 | 690 | ||
| 692 | static struct vio_device_id nx_crypto_driver_ids[] __devinitdata = { | 691 | static struct vio_device_id nx_crypto_driver_ids[] = { |
| 693 | { "ibm,sym-encryption-v1", "ibm,sym-encryption" }, | 692 | { "ibm,sym-encryption-v1", "ibm,sym-encryption" }, |
| 694 | { "", "" } | 693 | { "", "" } |
| 695 | }; | 694 | }; |
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index 1d75e6f95a58..90d34adc2a66 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c | |||
| @@ -1137,7 +1137,7 @@ static void omap_sham_dma_cleanup(struct omap_sham_dev *dd) | |||
| 1137 | } | 1137 | } |
| 1138 | } | 1138 | } |
| 1139 | 1139 | ||
| 1140 | static int __devinit omap_sham_probe(struct platform_device *pdev) | 1140 | static int omap_sham_probe(struct platform_device *pdev) |
| 1141 | { | 1141 | { |
| 1142 | struct omap_sham_dev *dd; | 1142 | struct omap_sham_dev *dd; |
| 1143 | struct device *dev = &pdev->dev; | 1143 | struct device *dev = &pdev->dev; |
| @@ -1250,7 +1250,7 @@ data_err: | |||
| 1250 | return err; | 1250 | return err; |
| 1251 | } | 1251 | } |
| 1252 | 1252 | ||
| 1253 | static int __devexit omap_sham_remove(struct platform_device *pdev) | 1253 | static int omap_sham_remove(struct platform_device *pdev) |
| 1254 | { | 1254 | { |
| 1255 | static struct omap_sham_dev *dd; | 1255 | static struct omap_sham_dev *dd; |
| 1256 | int i; | 1256 | int i; |
diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c index c983f869d2b7..2096d4685a9e 100644 --- a/drivers/crypto/picoxcell_crypto.c +++ b/drivers/crypto/picoxcell_crypto.c | |||
| @@ -1708,7 +1708,7 @@ static bool spacc_is_compatible(struct platform_device *pdev, | |||
| 1708 | return false; | 1708 | return false; |
| 1709 | } | 1709 | } |
| 1710 | 1710 | ||
| 1711 | static int __devinit spacc_probe(struct platform_device *pdev) | 1711 | static int spacc_probe(struct platform_device *pdev) |
| 1712 | { | 1712 | { |
| 1713 | int i, err, ret = -EINVAL; | 1713 | int i, err, ret = -EINVAL; |
| 1714 | struct resource *mem, *irq; | 1714 | struct resource *mem, *irq; |
| @@ -1841,7 +1841,7 @@ static int __devinit spacc_probe(struct platform_device *pdev) | |||
| 1841 | return ret; | 1841 | return ret; |
| 1842 | } | 1842 | } |
| 1843 | 1843 | ||
| 1844 | static int __devexit spacc_remove(struct platform_device *pdev) | 1844 | static int spacc_remove(struct platform_device *pdev) |
| 1845 | { | 1845 | { |
| 1846 | struct spacc_alg *alg, *next; | 1846 | struct spacc_alg *alg, *next; |
| 1847 | struct spacc_engine *engine = platform_get_drvdata(pdev); | 1847 | struct spacc_engine *engine = platform_get_drvdata(pdev); |
| @@ -1868,7 +1868,7 @@ static const struct platform_device_id spacc_id_table[] = { | |||
| 1868 | 1868 | ||
| 1869 | static struct platform_driver spacc_driver = { | 1869 | static struct platform_driver spacc_driver = { |
| 1870 | .probe = spacc_probe, | 1870 | .probe = spacc_probe, |
| 1871 | .remove = __devexit_p(spacc_remove), | 1871 | .remove = spacc_remove, |
| 1872 | .driver = { | 1872 | .driver = { |
| 1873 | .name = "picochip,spacc", | 1873 | .name = "picochip,spacc", |
| 1874 | #ifdef CONFIG_PM | 1874 | #ifdef CONFIG_PM |
diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c index eb32fd8cad14..85ea7525fa36 100644 --- a/drivers/crypto/tegra-aes.c +++ b/drivers/crypto/tegra-aes.c | |||
| @@ -1047,7 +1047,7 @@ out: | |||
| 1047 | return err; | 1047 | return err; |
| 1048 | } | 1048 | } |
| 1049 | 1049 | ||
| 1050 | static int __devexit tegra_aes_remove(struct platform_device *pdev) | 1050 | static int tegra_aes_remove(struct platform_device *pdev) |
| 1051 | { | 1051 | { |
| 1052 | struct device *dev = &pdev->dev; | 1052 | struct device *dev = &pdev->dev; |
| 1053 | struct tegra_aes_dev *dd = platform_get_drvdata(pdev); | 1053 | struct tegra_aes_dev *dd = platform_get_drvdata(pdev); |
| @@ -1074,7 +1074,7 @@ static int __devexit tegra_aes_remove(struct platform_device *pdev) | |||
| 1074 | return 0; | 1074 | return 0; |
| 1075 | } | 1075 | } |
| 1076 | 1076 | ||
| 1077 | static struct of_device_id tegra_aes_of_match[] __devinitdata = { | 1077 | static struct of_device_id tegra_aes_of_match[] = { |
| 1078 | { .compatible = "nvidia,tegra20-aes", }, | 1078 | { .compatible = "nvidia,tegra20-aes", }, |
| 1079 | { .compatible = "nvidia,tegra30-aes", }, | 1079 | { .compatible = "nvidia,tegra30-aes", }, |
| 1080 | { }, | 1080 | { }, |
| @@ -1082,7 +1082,7 @@ static struct of_device_id tegra_aes_of_match[] __devinitdata = { | |||
| 1082 | 1082 | ||
| 1083 | static struct platform_driver tegra_aes_driver = { | 1083 | static struct platform_driver tegra_aes_driver = { |
| 1084 | .probe = tegra_aes_probe, | 1084 | .probe = tegra_aes_probe, |
| 1085 | .remove = __devexit_p(tegra_aes_remove), | 1085 | .remove = tegra_aes_remove, |
| 1086 | .driver = { | 1086 | .driver = { |
| 1087 | .name = "tegra-aes", | 1087 | .name = "tegra-aes", |
| 1088 | .owner = THIS_MODULE, | 1088 | .owner = THIS_MODULE, |
diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c index 741837208716..80c745e83082 100644 --- a/drivers/devfreq/exynos4_bus.c +++ b/drivers/devfreq/exynos4_bus.c | |||
| @@ -980,7 +980,7 @@ unlock: | |||
| 980 | return NOTIFY_DONE; | 980 | return NOTIFY_DONE; |
| 981 | } | 981 | } |
| 982 | 982 | ||
| 983 | static __devinit int exynos4_busfreq_probe(struct platform_device *pdev) | 983 | static int exynos4_busfreq_probe(struct platform_device *pdev) |
| 984 | { | 984 | { |
| 985 | struct busfreq_data *data; | 985 | struct busfreq_data *data; |
| 986 | struct opp *opp; | 986 | struct opp *opp; |
| @@ -1056,7 +1056,7 @@ static __devinit int exynos4_busfreq_probe(struct platform_device *pdev) | |||
| 1056 | return 0; | 1056 | return 0; |
| 1057 | } | 1057 | } |
| 1058 | 1058 | ||
| 1059 | static __devexit int exynos4_busfreq_remove(struct platform_device *pdev) | 1059 | static int exynos4_busfreq_remove(struct platform_device *pdev) |
| 1060 | { | 1060 | { |
| 1061 | struct busfreq_data *data = platform_get_drvdata(pdev); | 1061 | struct busfreq_data *data = platform_get_drvdata(pdev); |
| 1062 | 1062 | ||
| @@ -1087,7 +1087,7 @@ static const struct platform_device_id exynos4_busfreq_id[] = { | |||
| 1087 | 1087 | ||
| 1088 | static struct platform_driver exynos4_busfreq_driver = { | 1088 | static struct platform_driver exynos4_busfreq_driver = { |
| 1089 | .probe = exynos4_busfreq_probe, | 1089 | .probe = exynos4_busfreq_probe, |
| 1090 | .remove = __devexit_p(exynos4_busfreq_remove), | 1090 | .remove = exynos4_busfreq_remove, |
| 1091 | .id_table = exynos4_busfreq_id, | 1091 | .id_table = exynos4_busfreq_id, |
| 1092 | .driver = { | 1092 | .driver = { |
| 1093 | .name = "exynos4-busfreq", | 1093 | .name = "exynos4-busfreq", |
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index 8f0b111af4de..3e8ba02ba292 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) | |||
| 1634 | return 0; | 1634 | return 0; |
| 1635 | } | 1635 | } |
| 1636 | 1636 | ||
| 1637 | static int __devexit dw_remove(struct platform_device *pdev) | 1637 | static int dw_remove(struct platform_device *pdev) |
| 1638 | { | 1638 | { |
| 1639 | struct dw_dma *dw = platform_get_drvdata(pdev); | 1639 | struct dw_dma *dw = platform_get_drvdata(pdev); |
| 1640 | struct dw_dma_chan *dwc, *_dwc; | 1640 | struct dw_dma_chan *dwc, *_dwc; |
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 232b4583ae93..f424298f1ac5 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c | |||
| @@ -585,7 +585,7 @@ err_reg1: | |||
| 585 | return ret; | 585 | return ret; |
| 586 | } | 586 | } |
| 587 | 587 | ||
| 588 | static int __devexit edma_remove(struct platform_device *pdev) | 588 | static int edma_remove(struct platform_device *pdev) |
| 589 | { | 589 | { |
| 590 | struct device *dev = &pdev->dev; | 590 | struct device *dev = &pdev->dev; |
| 591 | struct edma_cc *ecc = dev_get_drvdata(dev); | 591 | 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 bc764afacd9b..a0de82e21a7c 100644 --- a/drivers/dma/intel_mid_dma.c +++ b/drivers/dma/intel_mid_dma.c | |||
| @@ -1308,7 +1308,7 @@ err_enable_device: | |||
| 1308 | * Free up all resources and data | 1308 | * Free up all resources and data |
| 1309 | * Call shutdown_dma to complete contoller and chan cleanup | 1309 | * Call shutdown_dma to complete contoller and chan cleanup |
| 1310 | */ | 1310 | */ |
| 1311 | static void __devexit intel_mid_dma_remove(struct pci_dev *pdev) | 1311 | static void intel_mid_dma_remove(struct pci_dev *pdev) |
| 1312 | { | 1312 | { |
| 1313 | struct middma_device *device = pci_get_drvdata(pdev); | 1313 | struct middma_device *device = pci_get_drvdata(pdev); |
| 1314 | 1314 | ||
diff --git a/drivers/dma/ioat/dca.c b/drivers/dma/ioat/dca.c index d6668071bd0d..9b041858d10d 100644 --- a/drivers/dma/ioat/dca.c +++ b/drivers/dma/ioat/dca.c | |||
| @@ -242,8 +242,7 @@ static struct dca_ops ioat_dca_ops = { | |||
| 242 | }; | 242 | }; |
| 243 | 243 | ||
| 244 | 244 | ||
| 245 | struct dca_provider * __devinit | 245 | struct dca_provider *ioat_dca_init(struct pci_dev *pdev, void __iomem *iobase) |
| 246 | ioat_dca_init(struct pci_dev *pdev, void __iomem *iobase) | ||
| 247 | { | 246 | { |
| 248 | struct dca_provider *dca; | 247 | struct dca_provider *dca; |
| 249 | struct ioat_dca_priv *ioatdca; | 248 | struct ioat_dca_priv *ioatdca; |
| @@ -408,8 +407,7 @@ static int ioat2_dca_count_dca_slots(void __iomem *iobase, u16 dca_offset) | |||
| 408 | return slots; | 407 | return slots; |
| 409 | } | 408 | } |
| 410 | 409 | ||
| 411 | struct dca_provider * __devinit | 410 | struct dca_provider *ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase) |
| 412 | ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase) | ||
| 413 | { | 411 | { |
| 414 | struct dca_provider *dca; | 412 | struct dca_provider *dca; |
| 415 | struct ioat_dca_priv *ioatdca; | 413 | struct ioat_dca_priv *ioatdca; |
| @@ -621,8 +619,7 @@ static inline int dca3_tag_map_invalid(u8 *tag_map) | |||
| 621 | (tag_map[4] == DCA_TAG_MAP_VALID)); | 619 | (tag_map[4] == DCA_TAG_MAP_VALID)); |
| 622 | } | 620 | } |
| 623 | 621 | ||
| 624 | struct dca_provider * __devinit | 622 | struct dca_provider *ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase) |
| 625 | ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase) | ||
| 626 | { | 623 | { |
| 627 | struct dca_provider *dca; | 624 | struct dca_provider *dca; |
| 628 | struct ioat_dca_priv *ioatdca; | 625 | struct ioat_dca_priv *ioatdca; |
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index 73b2b65cb1de..1a68a8ba87e6 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) | |||
| 782 | */ | 782 | */ |
| 783 | #define IOAT_TEST_SIZE 2000 | 783 | #define IOAT_TEST_SIZE 2000 |
| 784 | 784 | ||
| 785 | static void __devinit ioat_dma_test_callback(void *dma_async_param) | 785 | static void ioat_dma_test_callback(void *dma_async_param) |
| 786 | { | 786 | { |
| 787 | struct completion *cmp = dma_async_param; | 787 | struct completion *cmp = dma_async_param; |
| 788 | 788 | ||
| @@ -793,7 +793,7 @@ static void __devinit ioat_dma_test_callback(void *dma_async_param) | |||
| 793 | * ioat_dma_self_test - Perform a IOAT transaction to verify the HW works. | 793 | * ioat_dma_self_test - Perform a IOAT transaction to verify the HW works. |
| 794 | * @device: device to be tested | 794 | * @device: device to be tested |
| 795 | */ | 795 | */ |
| 796 | int __devinit ioat_dma_self_test(struct ioatdma_device *device) | 796 | int ioat_dma_self_test(struct ioatdma_device *device) |
| 797 | { | 797 | { |
| 798 | int i; | 798 | int i; |
| 799 | u8 *src; | 799 | u8 *src; |
| @@ -994,7 +994,7 @@ static void ioat_disable_interrupts(struct ioatdma_device *device) | |||
| 994 | writeb(0, device->reg_base + IOAT_INTRCTRL_OFFSET); | 994 | writeb(0, device->reg_base + IOAT_INTRCTRL_OFFSET); |
| 995 | } | 995 | } |
| 996 | 996 | ||
| 997 | int __devinit ioat_probe(struct ioatdma_device *device) | 997 | int ioat_probe(struct ioatdma_device *device) |
| 998 | { | 998 | { |
| 999 | int err = -ENODEV; | 999 | int err = -ENODEV; |
| 1000 | struct dma_device *dma = &device->common; | 1000 | struct dma_device *dma = &device->common; |
| @@ -1049,7 +1049,7 @@ err_dma_pool: | |||
| 1049 | return err; | 1049 | return err; |
| 1050 | } | 1050 | } |
| 1051 | 1051 | ||
| 1052 | int __devinit ioat_register(struct ioatdma_device *device) | 1052 | int ioat_register(struct ioatdma_device *device) |
| 1053 | { | 1053 | { |
| 1054 | int err = dma_async_device_register(&device->common); | 1054 | int err = dma_async_device_register(&device->common); |
| 1055 | 1055 | ||
| @@ -1183,7 +1183,7 @@ void ioat_kobject_del(struct ioatdma_device *device) | |||
| 1183 | } | 1183 | } |
| 1184 | } | 1184 | } |
| 1185 | 1185 | ||
| 1186 | int __devinit ioat1_dma_probe(struct ioatdma_device *device, int dca) | 1186 | int ioat1_dma_probe(struct ioatdma_device *device, int dca) |
| 1187 | { | 1187 | { |
| 1188 | struct pci_dev *pdev = device->pdev; | 1188 | struct pci_dev *pdev = device->pdev; |
| 1189 | struct dma_device *dma; | 1189 | struct dma_device *dma; |
| @@ -1216,7 +1216,7 @@ int __devinit ioat1_dma_probe(struct ioatdma_device *device, int dca) | |||
| 1216 | return err; | 1216 | return err; |
| 1217 | } | 1217 | } |
| 1218 | 1218 | ||
| 1219 | void __devexit ioat_dma_remove(struct ioatdma_device *device) | 1219 | void ioat_dma_remove(struct ioatdma_device *device) |
| 1220 | { | 1220 | { |
| 1221 | struct dma_device *dma = &device->common; | 1221 | struct dma_device *dma = &device->common; |
| 1222 | 1222 | ||
diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h index 5e8fe01ba69d..087935f1565f 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, | |||
| 303 | pci_unmap_page(pdev, addr, len, direction); | 303 | pci_unmap_page(pdev, addr, len, direction); |
| 304 | } | 304 | } |
| 305 | 305 | ||
| 306 | int __devinit ioat_probe(struct ioatdma_device *device); | 306 | int ioat_probe(struct ioatdma_device *device); |
| 307 | int __devinit ioat_register(struct ioatdma_device *device); | 307 | int ioat_register(struct ioatdma_device *device); |
| 308 | int __devinit ioat1_dma_probe(struct ioatdma_device *dev, int dca); | 308 | int ioat1_dma_probe(struct ioatdma_device *dev, int dca); |
| 309 | int __devinit ioat_dma_self_test(struct ioatdma_device *device); | 309 | int ioat_dma_self_test(struct ioatdma_device *device); |
| 310 | void __devexit ioat_dma_remove(struct ioatdma_device *device); | 310 | void ioat_dma_remove(struct ioatdma_device *device); |
| 311 | struct dca_provider * __devinit ioat_dca_init(struct pci_dev *pdev, | 311 | struct dca_provider *ioat_dca_init(struct pci_dev *pdev, void __iomem *iobase); |
| 312 | void __iomem *iobase); | ||
| 313 | dma_addr_t ioat_get_current_completion(struct ioat_chan_common *chan); | 312 | dma_addr_t ioat_get_current_completion(struct ioat_chan_common *chan); |
| 314 | void ioat_init_channel(struct ioatdma_device *device, | 313 | void ioat_init_channel(struct ioatdma_device *device, |
| 315 | struct ioat_chan_common *chan, int idx); | 314 | struct ioat_chan_common *chan, int idx); |
diff --git a/drivers/dma/ioat/dma_v2.c b/drivers/dma/ioat/dma_v2.c index b9d667851445..82d4e306c32e 100644 --- a/drivers/dma/ioat/dma_v2.c +++ b/drivers/dma/ioat/dma_v2.c | |||
| @@ -862,7 +862,7 @@ struct kobj_type ioat2_ktype = { | |||
| 862 | .default_attrs = ioat2_attrs, | 862 | .default_attrs = ioat2_attrs, |
| 863 | }; | 863 | }; |
| 864 | 864 | ||
| 865 | int __devinit ioat2_dma_probe(struct ioatdma_device *device, int dca) | 865 | int ioat2_dma_probe(struct ioatdma_device *device, int dca) |
| 866 | { | 866 | { |
| 867 | struct pci_dev *pdev = device->pdev; | 867 | struct pci_dev *pdev = device->pdev; |
| 868 | struct dma_device *dma; | 868 | struct dma_device *dma; |
diff --git a/drivers/dma/ioat/dma_v2.h b/drivers/dma/ioat/dma_v2.h index be2a55b95c23..e100f644e344 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) | |||
| 155 | chan->reg_base + IOAT2_CHAINADDR_OFFSET_HIGH); | 155 | chan->reg_base + IOAT2_CHAINADDR_OFFSET_HIGH); |
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | int __devinit ioat2_dma_probe(struct ioatdma_device *dev, int dca); | 158 | int ioat2_dma_probe(struct ioatdma_device *dev, int dca); |
| 159 | int __devinit ioat3_dma_probe(struct ioatdma_device *dev, int dca); | 159 | int ioat3_dma_probe(struct ioatdma_device *dev, int dca); |
| 160 | struct dca_provider * __devinit ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase); | 160 | struct dca_provider *ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase); |
| 161 | struct dca_provider * __devinit ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase); | 161 | struct dca_provider *ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase); |
| 162 | int ioat2_check_space_lock(struct ioat2_dma_chan *ioat, int num_descs); | 162 | int ioat2_check_space_lock(struct ioat2_dma_chan *ioat, int num_descs); |
| 163 | int ioat2_enumerate_channels(struct ioatdma_device *device); | 163 | int ioat2_enumerate_channels(struct ioatdma_device *device); |
| 164 | struct dma_async_tx_descriptor * | 164 | struct dma_async_tx_descriptor * |
diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c index f7f1dc62c15c..e5fc944de1f0 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) | |||
| 836 | return &desc->txd; | 836 | return &desc->txd; |
| 837 | } | 837 | } |
| 838 | 838 | ||
| 839 | static void __devinit ioat3_dma_test_callback(void *dma_async_param) | 839 | static void ioat3_dma_test_callback(void *dma_async_param) |
| 840 | { | 840 | { |
| 841 | struct completion *cmp = dma_async_param; | 841 | struct completion *cmp = dma_async_param; |
| 842 | 842 | ||
| @@ -844,7 +844,7 @@ static void __devinit ioat3_dma_test_callback(void *dma_async_param) | |||
| 844 | } | 844 | } |
| 845 | 845 | ||
| 846 | #define IOAT_NUM_SRC_TEST 6 /* must be <= 8 */ | 846 | #define IOAT_NUM_SRC_TEST 6 /* must be <= 8 */ |
| 847 | static int __devinit ioat_xor_val_self_test(struct ioatdma_device *device) | 847 | static int ioat_xor_val_self_test(struct ioatdma_device *device) |
| 848 | { | 848 | { |
| 849 | int i, src_idx; | 849 | int i, src_idx; |
| 850 | struct page *dest; | 850 | struct page *dest; |
| @@ -1096,7 +1096,7 @@ out: | |||
| 1096 | return err; | 1096 | return err; |
| 1097 | } | 1097 | } |
| 1098 | 1098 | ||
| 1099 | static int __devinit ioat3_dma_self_test(struct ioatdma_device *device) | 1099 | static int ioat3_dma_self_test(struct ioatdma_device *device) |
| 1100 | { | 1100 | { |
| 1101 | int rc = ioat_dma_self_test(device); | 1101 | int rc = ioat_dma_self_test(device); |
| 1102 | 1102 | ||
| @@ -1187,7 +1187,7 @@ static bool is_snb_ioat(struct pci_dev *pdev) | |||
| 1187 | } | 1187 | } |
| 1188 | } | 1188 | } |
| 1189 | 1189 | ||
| 1190 | int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca) | 1190 | int ioat3_dma_probe(struct ioatdma_device *device, int dca) |
| 1191 | { | 1191 | { |
| 1192 | struct pci_dev *pdev = device->pdev; | 1192 | struct pci_dev *pdev = device->pdev; |
| 1193 | int dca_en = system_has_dca_enabled(pdev); | 1193 | int dca_en = system_has_dca_enabled(pdev); |
diff --git a/drivers/dma/ioat/pci.c b/drivers/dma/ioat/pci.c index bfa9a3536e09..4f686c527ab6 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[] = { | |||
| 109 | }; | 109 | }; |
| 110 | MODULE_DEVICE_TABLE(pci, ioat_pci_tbl); | 110 | MODULE_DEVICE_TABLE(pci, ioat_pci_tbl); |
| 111 | 111 | ||
| 112 | static int __devinit ioat_pci_probe(struct pci_dev *pdev, | 112 | static int ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id); |
| 113 | const struct pci_device_id *id); | 113 | static void ioat_remove(struct pci_dev *pdev); |
| 114 | static void __devexit ioat_remove(struct pci_dev *pdev); | ||
| 115 | 114 | ||
| 116 | static int ioat_dca_enabled = 1; | 115 | static int ioat_dca_enabled = 1; |
| 117 | module_param(ioat_dca_enabled, int, 0644); | 116 | module_param(ioat_dca_enabled, int, 0644); |
| @@ -141,7 +140,7 @@ alloc_ioatdma(struct pci_dev *pdev, void __iomem *iobase) | |||
| 141 | return d; | 140 | return d; |
| 142 | } | 141 | } |
| 143 | 142 | ||
| 144 | static int __devinit ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | 143 | static int ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 145 | { | 144 | { |
| 146 | void __iomem * const *iomap; | 145 | void __iomem * const *iomap; |
| 147 | struct device *dev = &pdev->dev; | 146 | struct device *dev = &pdev->dev; |
| @@ -195,7 +194,7 @@ static int __devinit ioat_pci_probe(struct pci_dev *pdev, const struct pci_devic | |||
| 195 | return 0; | 194 | return 0; |
| 196 | } | 195 | } |
| 197 | 196 | ||
| 198 | static void __devexit ioat_remove(struct pci_dev *pdev) | 197 | static void ioat_remove(struct pci_dev *pdev) |
| 199 | { | 198 | { |
| 200 | struct ioatdma_device *device = pci_get_drvdata(pdev); | 199 | struct ioatdma_device *device = pci_get_drvdata(pdev); |
| 201 | 200 | ||
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index 9072e173b860..eacb8be99812 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c | |||
| @@ -1406,7 +1406,7 @@ out: | |||
| 1406 | } | 1406 | } |
| 1407 | #endif | 1407 | #endif |
| 1408 | 1408 | ||
| 1409 | static int __devexit iop_adma_remove(struct platform_device *dev) | 1409 | static int iop_adma_remove(struct platform_device *dev) |
| 1410 | { | 1410 | { |
| 1411 | struct iop_adma_device *device = platform_get_drvdata(dev); | 1411 | struct iop_adma_device *device = platform_get_drvdata(dev); |
| 1412 | struct dma_chan *chan, *_chan; | 1412 | struct dma_chan *chan, *_chan; |
diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c index 13bdf4a7e1ec..c6d98c00f05c 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) | |||
| 712 | } | 712 | } |
| 713 | } | 713 | } |
| 714 | 714 | ||
| 715 | static int __devexit mmp_pdma_remove(struct platform_device *op) | 715 | static int mmp_pdma_remove(struct platform_device *op) |
| 716 | { | 716 | { |
| 717 | struct mmp_pdma_device *pdev = platform_get_drvdata(op); | 717 | struct mmp_pdma_device *pdev = platform_get_drvdata(op); |
| 718 | 718 | ||
diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c index 323821c0c095..a9f1cd56689c 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) | |||
| 467 | mmp_tdma_enable_chan(tdmac); | 467 | mmp_tdma_enable_chan(tdmac); |
| 468 | } | 468 | } |
| 469 | 469 | ||
| 470 | static int __devexit mmp_tdma_remove(struct platform_device *pdev) | 470 | static int mmp_tdma_remove(struct platform_device *pdev) |
| 471 | { | 471 | { |
| 472 | struct mmp_tdma_device *tdev = platform_get_drvdata(pdev); | 472 | struct mmp_tdma_device *tdev = platform_get_drvdata(pdev); |
| 473 | 473 | ||
diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c index 2cd024a91d40..2d956732aa3d 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) | |||
| 799 | return retval; | 799 | return retval; |
| 800 | } | 800 | } |
| 801 | 801 | ||
| 802 | static int __devexit mpc_dma_remove(struct platform_device *op) | 802 | static int mpc_dma_remove(struct platform_device *op) |
| 803 | { | 803 | { |
| 804 | struct device *dev = &op->dev; | 804 | struct device *dev = &op->dev; |
| 805 | struct mpc_dma *mdma = dev_get_drvdata(dev); | 805 | struct mpc_dma *mdma = dev_get_drvdata(dev); |
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index ac71f555dd72..e17fad03cb80 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c | |||
| @@ -1361,13 +1361,16 @@ static int mv_xor_probe(struct platform_device *pdev) | |||
| 1361 | err_channel_add: | 1361 | err_channel_add: |
| 1362 | for (i = 0; i < MV_XOR_MAX_CHANNELS; i++) | 1362 | for (i = 0; i < MV_XOR_MAX_CHANNELS; i++) |
| 1363 | if (xordev->channels[i]) { | 1363 | if (xordev->channels[i]) { |
| 1364 | mv_xor_channel_remove(xordev->channels[i]); | ||
| 1364 | if (pdev->dev.of_node) | 1365 | if (pdev->dev.of_node) |
| 1365 | irq_dispose_mapping(xordev->channels[i]->irq); | 1366 | irq_dispose_mapping(xordev->channels[i]->irq); |
| 1366 | mv_xor_channel_remove(xordev->channels[i]); | ||
| 1367 | } | 1367 | } |
| 1368 | 1368 | ||
| 1369 | clk_disable_unprepare(xordev->clk); | 1369 | if (!IS_ERR(xordev->clk)) { |
| 1370 | clk_put(xordev->clk); | 1370 | clk_disable_unprepare(xordev->clk); |
| 1371 | clk_put(xordev->clk); | ||
| 1372 | } | ||
| 1373 | |||
| 1371 | return ret; | 1374 | return ret; |
| 1372 | } | 1375 | } |
| 1373 | 1376 | ||
diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c index eca1c4ddf039..3f2617255ef2 100644 --- a/drivers/dma/pch_dma.c +++ b/drivers/dma/pch_dma.c | |||
| @@ -961,7 +961,7 @@ err_free_mem: | |||
| 961 | return err; | 961 | return err; |
| 962 | } | 962 | } |
| 963 | 963 | ||
| 964 | static void __devexit pch_dma_remove(struct pci_dev *pdev) | 964 | static void pch_dma_remove(struct pci_dev *pdev) |
| 965 | { | 965 | { |
| 966 | struct pch_dma *pd = pci_get_drvdata(pdev); | 966 | struct pch_dma *pd = pci_get_drvdata(pdev); |
| 967 | struct pch_dma_chan *pd_chan; | 967 | struct pch_dma_chan *pd_chan; |
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 95555f37ea6d..80680eee0171 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c | |||
| @@ -2988,7 +2988,7 @@ probe_err1: | |||
| 2988 | return ret; | 2988 | return ret; |
| 2989 | } | 2989 | } |
| 2990 | 2990 | ||
| 2991 | static int __devexit pl330_remove(struct amba_device *adev) | 2991 | static int pl330_remove(struct amba_device *adev) |
| 2992 | { | 2992 | { |
| 2993 | struct dma_pl330_dmac *pdmac = amba_get_drvdata(adev); | 2993 | struct dma_pl330_dmac *pdmac = amba_get_drvdata(adev); |
| 2994 | struct dma_pl330_chan *pch, *_p; | 2994 | struct dma_pl330_chan *pch, *_p; |
diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c index b94afc339e7f..5d3d95569a1e 100644 --- a/drivers/dma/ppc4xx/adma.c +++ b/drivers/dma/ppc4xx/adma.c | |||
| @@ -4592,7 +4592,7 @@ out: | |||
| 4592 | /** | 4592 | /** |
| 4593 | * ppc440spe_adma_remove - remove the asynch device | 4593 | * ppc440spe_adma_remove - remove the asynch device |
| 4594 | */ | 4594 | */ |
| 4595 | static int __devexit ppc440spe_adma_remove(struct platform_device *ofdev) | 4595 | static int ppc440spe_adma_remove(struct platform_device *ofdev) |
| 4596 | { | 4596 | { |
| 4597 | struct ppc440spe_adma_device *adev = dev_get_drvdata(&ofdev->dev); | 4597 | struct ppc440spe_adma_device *adev = dev_get_drvdata(&ofdev->dev); |
| 4598 | struct device_node *np = ofdev->dev.of_node; | 4598 | struct device_node *np = ofdev->dev.of_node; |
| @@ -4905,7 +4905,7 @@ out_free: | |||
| 4905 | return ret; | 4905 | return ret; |
| 4906 | } | 4906 | } |
| 4907 | 4907 | ||
| 4908 | static const struct of_device_id ppc440spe_adma_of_match[] __devinitconst = { | 4908 | static const struct of_device_id ppc440spe_adma_of_match[] = { |
| 4909 | { .compatible = "ibm,dma-440spe", }, | 4909 | { .compatible = "ibm,dma-440spe", }, |
| 4910 | { .compatible = "amcc,xor-accelerator", }, | 4910 | { .compatible = "amcc,xor-accelerator", }, |
| 4911 | {}, | 4911 | {}, |
diff --git a/drivers/dma/sa11x0-dma.c b/drivers/dma/sa11x0-dma.c index 2ad628df8223..461a91ab70bb 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) | |||
| 967 | return ret; | 967 | return ret; |
| 968 | } | 968 | } |
| 969 | 969 | ||
| 970 | static int __devexit sa11x0_dma_remove(struct platform_device *pdev) | 970 | static int sa11x0_dma_remove(struct platform_device *pdev) |
| 971 | { | 971 | { |
| 972 | struct sa11x0_dma_dev *d = platform_get_drvdata(pdev); | 972 | struct sa11x0_dma_dev *d = platform_get_drvdata(pdev); |
| 973 | unsigned pch; | 973 | unsigned pch; |
diff --git a/drivers/dma/sh/shdma.c b/drivers/dma/sh/shdma.c index 8201bb4e0cd7..3315e4be9b85 100644 --- a/drivers/dma/sh/shdma.c +++ b/drivers/dma/sh/shdma.c | |||
| @@ -880,7 +880,7 @@ ermrdmars: | |||
| 880 | return err; | 880 | return err; |
| 881 | } | 881 | } |
| 882 | 882 | ||
| 883 | static int __devexit sh_dmae_remove(struct platform_device *pdev) | 883 | static int sh_dmae_remove(struct platform_device *pdev) |
| 884 | { | 884 | { |
| 885 | struct sh_dmae_device *shdev = platform_get_drvdata(pdev); | 885 | struct sh_dmae_device *shdev = platform_get_drvdata(pdev); |
| 886 | struct dma_device *dma_dev = &shdev->shdma_dev.dma_dev; | 886 | 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 c3de6edb9651..94674a96c646 100644 --- a/drivers/dma/sirf-dma.c +++ b/drivers/dma/sirf-dma.c | |||
| @@ -655,7 +655,7 @@ irq_dispose: | |||
| 655 | return ret; | 655 | return ret; |
| 656 | } | 656 | } |
| 657 | 657 | ||
| 658 | static int __devexit sirfsoc_dma_remove(struct platform_device *op) | 658 | static int sirfsoc_dma_remove(struct platform_device *op) |
| 659 | { | 659 | { |
| 660 | struct device *dev = &op->dev; | 660 | struct device *dev = &op->dev; |
| 661 | struct sirfsoc_dma *sdma = dev_get_drvdata(dev); | 661 | 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 efdfffa13349..c39e61bc8172 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 = { | |||
| 1184 | .max_dma_count = 1024UL * 64, | 1184 | .max_dma_count = 1024UL * 64, |
| 1185 | }; | 1185 | }; |
| 1186 | 1186 | ||
| 1187 | static const struct of_device_id tegra_dma_of_match[] __devinitconst = { | 1187 | static const struct of_device_id tegra_dma_of_match[] = { |
| 1188 | { | 1188 | { |
| 1189 | .compatible = "nvidia,tegra30-apbdma", | 1189 | .compatible = "nvidia,tegra30-apbdma", |
| 1190 | .data = &tegra30_dma_chip_data, | 1190 | .data = &tegra30_dma_chip_data, |
| @@ -1360,7 +1360,7 @@ err_pm_disable: | |||
| 1360 | return ret; | 1360 | return ret; |
| 1361 | } | 1361 | } |
| 1362 | 1362 | ||
| 1363 | static int __devexit tegra_dma_remove(struct platform_device *pdev) | 1363 | static int tegra_dma_remove(struct platform_device *pdev) |
| 1364 | { | 1364 | { |
| 1365 | struct tegra_dma *tdma = platform_get_drvdata(pdev); | 1365 | struct tegra_dma *tdma = platform_get_drvdata(pdev); |
| 1366 | int i; | 1366 | int i; |
| @@ -1403,7 +1403,7 @@ static int tegra_dma_runtime_resume(struct device *dev) | |||
| 1403 | return 0; | 1403 | return 0; |
| 1404 | } | 1404 | } |
| 1405 | 1405 | ||
| 1406 | static const struct dev_pm_ops tegra_dma_dev_pm_ops __devinitconst = { | 1406 | static const struct dev_pm_ops tegra_dma_dev_pm_ops = { |
| 1407 | #ifdef CONFIG_PM_RUNTIME | 1407 | #ifdef CONFIG_PM_RUNTIME |
| 1408 | .runtime_suspend = tegra_dma_runtime_suspend, | 1408 | .runtime_suspend = tegra_dma_runtime_suspend, |
| 1409 | .runtime_resume = tegra_dma_runtime_resume, | 1409 | .runtime_resume = tegra_dma_runtime_resume, |
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c index 98cf51e1544c..952f823901a6 100644 --- a/drivers/dma/timb_dma.c +++ b/drivers/dma/timb_dma.c | |||
| @@ -798,7 +798,7 @@ err_release_region: | |||
| 798 | 798 | ||
| 799 | } | 799 | } |
| 800 | 800 | ||
| 801 | static int __devexit td_remove(struct platform_device *pdev) | 801 | static int td_remove(struct platform_device *pdev) |
| 802 | { | 802 | { |
| 803 | struct timb_dma *td = platform_get_drvdata(pdev); | 803 | struct timb_dma *td = platform_get_drvdata(pdev); |
| 804 | struct resource *iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 804 | struct resource *iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index 4c6c876d9dc3..66719925970f 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig | |||
| @@ -4,6 +4,9 @@ | |||
| 4 | # Licensed and distributed under the GPL | 4 | # Licensed and distributed under the GPL |
| 5 | # | 5 | # |
| 6 | 6 | ||
| 7 | config EDAC_SUPPORT | ||
| 8 | bool | ||
| 9 | |||
| 7 | menuconfig EDAC | 10 | menuconfig EDAC |
| 8 | bool "EDAC (Error Detection And Correction) reporting" | 11 | bool "EDAC (Error Detection And Correction) reporting" |
| 9 | depends on HAS_IOMEM | 12 | depends on HAS_IOMEM |
| @@ -27,13 +30,8 @@ menuconfig EDAC | |||
| 27 | There is also a mailing list for the EDAC project, which can | 30 | There is also a mailing list for the EDAC project, which can |
| 28 | be found via the sourceforge page. | 31 | be found via the sourceforge page. |
| 29 | 32 | ||
| 30 | config EDAC_SUPPORT | ||
| 31 | bool | ||
| 32 | |||
| 33 | if EDAC | 33 | if EDAC |
| 34 | 34 | ||
| 35 | comment "Reporting subsystems" | ||
| 36 | |||
| 37 | config EDAC_LEGACY_SYSFS | 35 | config EDAC_LEGACY_SYSFS |
| 38 | bool "EDAC legacy sysfs" | 36 | bool "EDAC legacy sysfs" |
| 39 | default y | 37 | default y |
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index f74a684269ff..ad8bf2aa629d 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c | |||
| @@ -2563,8 +2563,8 @@ err_ret: | |||
| 2563 | return ret; | 2563 | return ret; |
| 2564 | } | 2564 | } |
| 2565 | 2565 | ||
| 2566 | static int __devinit amd64_probe_one_instance(struct pci_dev *pdev, | 2566 | static int amd64_probe_one_instance(struct pci_dev *pdev, |
| 2567 | const struct pci_device_id *mc_type) | 2567 | const struct pci_device_id *mc_type) |
| 2568 | { | 2568 | { |
| 2569 | u8 nid = get_node_id(pdev); | 2569 | u8 nid = get_node_id(pdev); |
| 2570 | struct pci_dev *F3 = node_to_amd_nb(nid)->misc; | 2570 | struct pci_dev *F3 = node_to_amd_nb(nid)->misc; |
| @@ -2612,7 +2612,7 @@ err_out: | |||
| 2612 | return ret; | 2612 | return ret; |
| 2613 | } | 2613 | } |
| 2614 | 2614 | ||
| 2615 | static void __devexit amd64_remove_one_instance(struct pci_dev *pdev) | 2615 | static void amd64_remove_one_instance(struct pci_dev *pdev) |
| 2616 | { | 2616 | { |
| 2617 | struct mem_ctl_info *mci; | 2617 | struct mem_ctl_info *mci; |
| 2618 | struct amd64_pvt *pvt; | 2618 | struct amd64_pvt *pvt; |
| @@ -2686,7 +2686,7 @@ MODULE_DEVICE_TABLE(pci, amd64_pci_table); | |||
| 2686 | static struct pci_driver amd64_pci_driver = { | 2686 | static struct pci_driver amd64_pci_driver = { |
| 2687 | .name = EDAC_MOD_STR, | 2687 | .name = EDAC_MOD_STR, |
| 2688 | .probe = amd64_probe_one_instance, | 2688 | .probe = amd64_probe_one_instance, |
| 2689 | .remove = __devexit_p(amd64_remove_one_instance), | 2689 | .remove = amd64_remove_one_instance, |
| 2690 | .id_table = amd64_pci_table, | 2690 | .id_table = amd64_pci_table, |
| 2691 | }; | 2691 | }; |
| 2692 | 2692 | ||
diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c index 29eeb68a200c..96e3ee3460a5 100644 --- a/drivers/edac/amd76x_edac.c +++ b/drivers/edac/amd76x_edac.c | |||
| @@ -301,8 +301,8 @@ fail: | |||
| 301 | } | 301 | } |
| 302 | 302 | ||
| 303 | /* returns count (>= 0), or negative on error */ | 303 | /* returns count (>= 0), or negative on error */ |
| 304 | static int __devinit amd76x_init_one(struct pci_dev *pdev, | 304 | static int amd76x_init_one(struct pci_dev *pdev, |
| 305 | const struct pci_device_id *ent) | 305 | const struct pci_device_id *ent) |
| 306 | { | 306 | { |
| 307 | edac_dbg(0, "\n"); | 307 | edac_dbg(0, "\n"); |
| 308 | 308 | ||
| @@ -318,7 +318,7 @@ static int __devinit amd76x_init_one(struct pci_dev *pdev, | |||
| 318 | * structure for the device then delete the mci and free the | 318 | * structure for the device then delete the mci and free the |
| 319 | * resources. | 319 | * resources. |
| 320 | */ | 320 | */ |
| 321 | static void __devexit amd76x_remove_one(struct pci_dev *pdev) | 321 | static void amd76x_remove_one(struct pci_dev *pdev) |
| 322 | { | 322 | { |
| 323 | struct mem_ctl_info *mci; | 323 | struct mem_ctl_info *mci; |
| 324 | 324 | ||
| @@ -350,7 +350,7 @@ MODULE_DEVICE_TABLE(pci, amd76x_pci_tbl); | |||
| 350 | static struct pci_driver amd76x_driver = { | 350 | static struct pci_driver amd76x_driver = { |
| 351 | .name = EDAC_MOD_STR, | 351 | .name = EDAC_MOD_STR, |
| 352 | .probe = amd76x_init_one, | 352 | .probe = amd76x_init_one, |
| 353 | .remove = __devexit_p(amd76x_remove_one), | 353 | .remove = amd76x_remove_one, |
| 354 | .id_table = amd76x_pci_tbl, | 354 | .id_table = amd76x_pci_tbl, |
| 355 | }; | 355 | }; |
| 356 | 356 | ||
diff --git a/drivers/edac/cell_edac.c b/drivers/edac/cell_edac.c index a1bbd8edd257..c2eaf334b90b 100644 --- a/drivers/edac/cell_edac.c +++ b/drivers/edac/cell_edac.c | |||
| @@ -124,7 +124,7 @@ static void cell_edac_check(struct mem_ctl_info *mci) | |||
| 124 | } | 124 | } |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | static void __devinit cell_edac_init_csrows(struct mem_ctl_info *mci) | 127 | static void cell_edac_init_csrows(struct mem_ctl_info *mci) |
| 128 | { | 128 | { |
| 129 | struct csrow_info *csrow = mci->csrows[0]; | 129 | struct csrow_info *csrow = mci->csrows[0]; |
| 130 | struct dimm_info *dimm; | 130 | struct dimm_info *dimm; |
| @@ -164,7 +164,7 @@ static void __devinit cell_edac_init_csrows(struct mem_ctl_info *mci) | |||
| 164 | } | 164 | } |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | static int __devinit cell_edac_probe(struct platform_device *pdev) | 167 | static int cell_edac_probe(struct platform_device *pdev) |
| 168 | { | 168 | { |
| 169 | struct cbe_mic_tm_regs __iomem *regs; | 169 | struct cbe_mic_tm_regs __iomem *regs; |
| 170 | struct mem_ctl_info *mci; | 170 | struct mem_ctl_info *mci; |
| @@ -233,7 +233,7 @@ static int __devinit cell_edac_probe(struct platform_device *pdev) | |||
| 233 | return 0; | 233 | return 0; |
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | static int __devexit cell_edac_remove(struct platform_device *pdev) | 236 | static int cell_edac_remove(struct platform_device *pdev) |
| 237 | { | 237 | { |
| 238 | struct mem_ctl_info *mci = edac_mc_del_mc(&pdev->dev); | 238 | struct mem_ctl_info *mci = edac_mc_del_mc(&pdev->dev); |
| 239 | if (mci) | 239 | if (mci) |
| @@ -247,7 +247,7 @@ static struct platform_driver cell_edac_driver = { | |||
| 247 | .owner = THIS_MODULE, | 247 | .owner = THIS_MODULE, |
| 248 | }, | 248 | }, |
| 249 | .probe = cell_edac_probe, | 249 | .probe = cell_edac_probe, |
| 250 | .remove = __devexit_p(cell_edac_remove), | 250 | .remove = cell_edac_remove, |
| 251 | }; | 251 | }; |
| 252 | 252 | ||
| 253 | static int __init cell_edac_init(void) | 253 | static int __init cell_edac_init(void) |
diff --git a/drivers/edac/cpc925_edac.c b/drivers/edac/cpc925_edac.c index c2ef13495873..7f3c57113ba1 100644 --- a/drivers/edac/cpc925_edac.c +++ b/drivers/edac/cpc925_edac.c | |||
| @@ -932,7 +932,7 @@ static int cpc925_mc_get_channels(void __iomem *vbase) | |||
| 932 | return dual; | 932 | return dual; |
| 933 | } | 933 | } |
| 934 | 934 | ||
| 935 | static int __devinit cpc925_probe(struct platform_device *pdev) | 935 | static int cpc925_probe(struct platform_device *pdev) |
| 936 | { | 936 | { |
| 937 | static int edac_mc_idx; | 937 | static int edac_mc_idx; |
| 938 | struct mem_ctl_info *mci; | 938 | struct mem_ctl_info *mci; |
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c index a5ed6b795fd4..644fec54681f 100644 --- a/drivers/edac/e752x_edac.c +++ b/drivers/edac/e752x_edac.c | |||
| @@ -1390,8 +1390,7 @@ fail: | |||
| 1390 | } | 1390 | } |
| 1391 | 1391 | ||
| 1392 | /* returns count (>= 0), or negative on error */ | 1392 | /* returns count (>= 0), or negative on error */ |
| 1393 | static int __devinit e752x_init_one(struct pci_dev *pdev, | 1393 | static int e752x_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 1394 | const struct pci_device_id *ent) | ||
| 1395 | { | 1394 | { |
| 1396 | edac_dbg(0, "\n"); | 1395 | edac_dbg(0, "\n"); |
| 1397 | 1396 | ||
| @@ -1402,7 +1401,7 @@ static int __devinit e752x_init_one(struct pci_dev *pdev, | |||
| 1402 | return e752x_probe1(pdev, ent->driver_data); | 1401 | return e752x_probe1(pdev, ent->driver_data); |
| 1403 | } | 1402 | } |
| 1404 | 1403 | ||
| 1405 | static void __devexit e752x_remove_one(struct pci_dev *pdev) | 1404 | static void e752x_remove_one(struct pci_dev *pdev) |
| 1406 | { | 1405 | { |
| 1407 | struct mem_ctl_info *mci; | 1406 | struct mem_ctl_info *mci; |
| 1408 | struct e752x_pvt *pvt; | 1407 | struct e752x_pvt *pvt; |
| @@ -1445,7 +1444,7 @@ MODULE_DEVICE_TABLE(pci, e752x_pci_tbl); | |||
| 1445 | static struct pci_driver e752x_driver = { | 1444 | static struct pci_driver e752x_driver = { |
| 1446 | .name = EDAC_MOD_STR, | 1445 | .name = EDAC_MOD_STR, |
| 1447 | .probe = e752x_init_one, | 1446 | .probe = e752x_init_one, |
| 1448 | .remove = __devexit_p(e752x_remove_one), | 1447 | .remove = e752x_remove_one, |
| 1449 | .id_table = e752x_pci_tbl, | 1448 | .id_table = e752x_pci_tbl, |
| 1450 | }; | 1449 | }; |
| 1451 | 1450 | ||
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c index 9ff57f361a43..1c4056a50383 100644 --- a/drivers/edac/e7xxx_edac.c +++ b/drivers/edac/e7xxx_edac.c | |||
| @@ -528,8 +528,7 @@ fail0: | |||
| 528 | } | 528 | } |
| 529 | 529 | ||
| 530 | /* returns count (>= 0), or negative on error */ | 530 | /* returns count (>= 0), or negative on error */ |
| 531 | static int __devinit e7xxx_init_one(struct pci_dev *pdev, | 531 | static int e7xxx_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 532 | const struct pci_device_id *ent) | ||
| 533 | { | 532 | { |
| 534 | edac_dbg(0, "\n"); | 533 | edac_dbg(0, "\n"); |
| 535 | 534 | ||
| @@ -538,7 +537,7 @@ static int __devinit e7xxx_init_one(struct pci_dev *pdev, | |||
| 538 | -EIO : e7xxx_probe1(pdev, ent->driver_data); | 537 | -EIO : e7xxx_probe1(pdev, ent->driver_data); |
| 539 | } | 538 | } |
| 540 | 539 | ||
| 541 | static void __devexit e7xxx_remove_one(struct pci_dev *pdev) | 540 | static void e7xxx_remove_one(struct pci_dev *pdev) |
| 542 | { | 541 | { |
| 543 | struct mem_ctl_info *mci; | 542 | struct mem_ctl_info *mci; |
| 544 | struct e7xxx_pvt *pvt; | 543 | struct e7xxx_pvt *pvt; |
| @@ -579,7 +578,7 @@ MODULE_DEVICE_TABLE(pci, e7xxx_pci_tbl); | |||
| 579 | static struct pci_driver e7xxx_driver = { | 578 | static struct pci_driver e7xxx_driver = { |
| 580 | .name = EDAC_MOD_STR, | 579 | .name = EDAC_MOD_STR, |
| 581 | .probe = e7xxx_init_one, | 580 | .probe = e7xxx_init_one, |
| 582 | .remove = __devexit_p(e7xxx_remove_one), | 581 | .remove = e7xxx_remove_one, |
| 583 | .id_table = e7xxx_pci_tbl, | 582 | .id_table = e7xxx_pci_tbl, |
| 584 | }; | 583 | }; |
| 585 | 584 | ||
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index de2df92f9c77..0ca1ca71157f 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c | |||
| @@ -472,8 +472,7 @@ static void edac_delete_csrow_objects(struct mem_ctl_info *mci) | |||
| 472 | device_remove_file(&csrow->dev, | 472 | device_remove_file(&csrow->dev, |
| 473 | dynamic_csrow_ce_count_attr[chan]); | 473 | dynamic_csrow_ce_count_attr[chan]); |
| 474 | } | 474 | } |
| 475 | put_device(&mci->csrows[i]->dev); | 475 | device_unregister(&mci->csrows[i]->dev); |
| 476 | device_del(&mci->csrows[i]->dev); | ||
| 477 | } | 476 | } |
| 478 | } | 477 | } |
| 479 | #endif | 478 | #endif |
| @@ -1055,11 +1054,9 @@ fail: | |||
| 1055 | struct dimm_info *dimm = mci->dimms[i]; | 1054 | struct dimm_info *dimm = mci->dimms[i]; |
| 1056 | if (dimm->nr_pages == 0) | 1055 | if (dimm->nr_pages == 0) |
| 1057 | continue; | 1056 | continue; |
| 1058 | put_device(&dimm->dev); | 1057 | device_unregister(&dimm->dev); |
| 1059 | device_del(&dimm->dev); | ||
| 1060 | } | 1058 | } |
| 1061 | put_device(&mci->dev); | 1059 | device_unregister(&mci->dev); |
| 1062 | device_del(&mci->dev); | ||
| 1063 | bus_unregister(&mci->bus); | 1060 | bus_unregister(&mci->bus); |
| 1064 | kfree(mci->bus.name); | 1061 | kfree(mci->bus.name); |
| 1065 | return err; | 1062 | return err; |
| @@ -1086,16 +1083,14 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) | |||
| 1086 | if (dimm->nr_pages == 0) | 1083 | if (dimm->nr_pages == 0) |
| 1087 | continue; | 1084 | continue; |
| 1088 | edac_dbg(0, "removing device %s\n", dev_name(&dimm->dev)); | 1085 | edac_dbg(0, "removing device %s\n", dev_name(&dimm->dev)); |
| 1089 | put_device(&dimm->dev); | 1086 | device_unregister(&dimm->dev); |
| 1090 | device_del(&dimm->dev); | ||
| 1091 | } | 1087 | } |
| 1092 | } | 1088 | } |
| 1093 | 1089 | ||
| 1094 | void edac_unregister_sysfs(struct mem_ctl_info *mci) | 1090 | void edac_unregister_sysfs(struct mem_ctl_info *mci) |
| 1095 | { | 1091 | { |
| 1096 | edac_dbg(1, "Unregistering device %s\n", dev_name(&mci->dev)); | 1092 | edac_dbg(1, "Unregistering device %s\n", dev_name(&mci->dev)); |
| 1097 | put_device(&mci->dev); | 1093 | device_unregister(&mci->dev); |
| 1098 | device_del(&mci->dev); | ||
| 1099 | bus_unregister(&mci->bus); | 1094 | bus_unregister(&mci->bus); |
| 1100 | kfree(mci->bus.name); | 1095 | kfree(mci->bus.name); |
| 1101 | } | 1096 | } |
| @@ -1159,8 +1154,6 @@ int __init edac_mc_sysfs_init(void) | |||
| 1159 | 1154 | ||
| 1160 | void __exit edac_mc_sysfs_exit(void) | 1155 | void __exit edac_mc_sysfs_exit(void) |
| 1161 | { | 1156 | { |
| 1162 | put_device(mci_pdev); | 1157 | device_unregister(mci_pdev); |
| 1163 | device_del(mci_pdev); | ||
| 1164 | edac_put_sysfs_subsys(); | 1158 | edac_put_sysfs_subsys(); |
| 1165 | kfree(mci_pdev); | ||
| 1166 | } | 1159 | } |
diff --git a/drivers/edac/highbank_l2_edac.c b/drivers/edac/highbank_l2_edac.c index e599b00c05a8..c2bd8c6a4349 100644 --- a/drivers/edac/highbank_l2_edac.c +++ b/drivers/edac/highbank_l2_edac.c | |||
| @@ -50,7 +50,7 @@ static irqreturn_t highbank_l2_err_handler(int irq, void *dev_id) | |||
| 50 | return IRQ_HANDLED; | 50 | return IRQ_HANDLED; |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | static int __devinit highbank_l2_err_probe(struct platform_device *pdev) | 53 | static int highbank_l2_err_probe(struct platform_device *pdev) |
| 54 | { | 54 | { |
| 55 | struct edac_device_ctl_info *dci; | 55 | struct edac_device_ctl_info *dci; |
| 56 | struct hb_l2_drvdata *drvdata; | 56 | struct hb_l2_drvdata *drvdata; |
diff --git a/drivers/edac/highbank_mc_edac.c b/drivers/edac/highbank_mc_edac.c index 7ea4cc2e8bd2..4695dd2d71fd 100644 --- a/drivers/edac/highbank_mc_edac.c +++ b/drivers/edac/highbank_mc_edac.c | |||
| @@ -119,7 +119,7 @@ static const struct file_operations highbank_mc_debug_inject_fops = { | |||
| 119 | .llseek = generic_file_llseek, | 119 | .llseek = generic_file_llseek, |
| 120 | }; | 120 | }; |
| 121 | 121 | ||
| 122 | static void __devinit highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci) | 122 | static void highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci) |
| 123 | { | 123 | { |
| 124 | if (mci->debugfs) | 124 | if (mci->debugfs) |
| 125 | debugfs_create_file("inject_ctrl", S_IWUSR, mci->debugfs, mci, | 125 | debugfs_create_file("inject_ctrl", S_IWUSR, mci->debugfs, mci, |
| @@ -127,11 +127,11 @@ static void __devinit highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci) | |||
| 127 | ; | 127 | ; |
| 128 | } | 128 | } |
| 129 | #else | 129 | #else |
| 130 | static void __devinit highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci) | 130 | static void highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci) |
| 131 | {} | 131 | {} |
| 132 | #endif | 132 | #endif |
| 133 | 133 | ||
| 134 | static int __devinit highbank_mc_probe(struct platform_device *pdev) | 134 | static int highbank_mc_probe(struct platform_device *pdev) |
| 135 | { | 135 | { |
| 136 | struct edac_mc_layer layers[2]; | 136 | struct edac_mc_layer layers[2]; |
| 137 | struct mem_ctl_info *mci; | 137 | struct mem_ctl_info *mci; |
diff --git a/drivers/edac/i3000_edac.c b/drivers/edac/i3000_edac.c index d3d19cc4e9a1..694efcbf19c0 100644 --- a/drivers/edac/i3000_edac.c +++ b/drivers/edac/i3000_edac.c | |||
| @@ -455,8 +455,7 @@ fail: | |||
| 455 | } | 455 | } |
| 456 | 456 | ||
| 457 | /* returns count (>= 0), or negative on error */ | 457 | /* returns count (>= 0), or negative on error */ |
| 458 | static int __devinit i3000_init_one(struct pci_dev *pdev, | 458 | static int i3000_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 459 | const struct pci_device_id *ent) | ||
| 460 | { | 459 | { |
| 461 | int rc; | 460 | int rc; |
| 462 | 461 | ||
| @@ -472,7 +471,7 @@ static int __devinit i3000_init_one(struct pci_dev *pdev, | |||
| 472 | return rc; | 471 | return rc; |
| 473 | } | 472 | } |
| 474 | 473 | ||
| 475 | static void __devexit i3000_remove_one(struct pci_dev *pdev) | 474 | static void i3000_remove_one(struct pci_dev *pdev) |
| 476 | { | 475 | { |
| 477 | struct mem_ctl_info *mci; | 476 | struct mem_ctl_info *mci; |
| 478 | 477 | ||
| @@ -502,7 +501,7 @@ MODULE_DEVICE_TABLE(pci, i3000_pci_tbl); | |||
| 502 | static struct pci_driver i3000_driver = { | 501 | static struct pci_driver i3000_driver = { |
| 503 | .name = EDAC_MOD_STR, | 502 | .name = EDAC_MOD_STR, |
| 504 | .probe = i3000_init_one, | 503 | .probe = i3000_init_one, |
| 505 | .remove = __devexit_p(i3000_remove_one), | 504 | .remove = i3000_remove_one, |
| 506 | .id_table = i3000_pci_tbl, | 505 | .id_table = i3000_pci_tbl, |
| 507 | }; | 506 | }; |
| 508 | 507 | ||
diff --git a/drivers/edac/i3200_edac.c b/drivers/edac/i3200_edac.c index b6653a6fc5d5..4e8337602e78 100644 --- a/drivers/edac/i3200_edac.c +++ b/drivers/edac/i3200_edac.c | |||
| @@ -419,8 +419,7 @@ fail: | |||
| 419 | return rc; | 419 | return rc; |
| 420 | } | 420 | } |
| 421 | 421 | ||
| 422 | static int __devinit i3200_init_one(struct pci_dev *pdev, | 422 | static int i3200_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 423 | const struct pci_device_id *ent) | ||
| 424 | { | 423 | { |
| 425 | int rc; | 424 | int rc; |
| 426 | 425 | ||
| @@ -436,7 +435,7 @@ static int __devinit i3200_init_one(struct pci_dev *pdev, | |||
| 436 | return rc; | 435 | return rc; |
| 437 | } | 436 | } |
| 438 | 437 | ||
| 439 | static void __devexit i3200_remove_one(struct pci_dev *pdev) | 438 | static void i3200_remove_one(struct pci_dev *pdev) |
| 440 | { | 439 | { |
| 441 | struct mem_ctl_info *mci; | 440 | struct mem_ctl_info *mci; |
| 442 | struct i3200_priv *priv; | 441 | struct i3200_priv *priv; |
| @@ -467,7 +466,7 @@ MODULE_DEVICE_TABLE(pci, i3200_pci_tbl); | |||
| 467 | static struct pci_driver i3200_driver = { | 466 | static struct pci_driver i3200_driver = { |
| 468 | .name = EDAC_MOD_STR, | 467 | .name = EDAC_MOD_STR, |
| 469 | .probe = i3200_init_one, | 468 | .probe = i3200_init_one, |
| 470 | .remove = __devexit_p(i3200_remove_one), | 469 | .remove = i3200_remove_one, |
| 471 | .id_table = i3200_pci_tbl, | 470 | .id_table = i3200_pci_tbl, |
| 472 | }; | 471 | }; |
| 473 | 472 | ||
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c index 6a49dd00b81b..63b2194e8c20 100644 --- a/drivers/edac/i5000_edac.c +++ b/drivers/edac/i5000_edac.c | |||
| @@ -1489,8 +1489,7 @@ fail0: | |||
| 1489 | * negative on error | 1489 | * negative on error |
| 1490 | * count (>= 0) | 1490 | * count (>= 0) |
| 1491 | */ | 1491 | */ |
| 1492 | static int __devinit i5000_init_one(struct pci_dev *pdev, | 1492 | static int i5000_init_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 1493 | const struct pci_device_id *id) | ||
| 1494 | { | 1493 | { |
| 1495 | int rc; | 1494 | int rc; |
| 1496 | 1495 | ||
| @@ -1509,7 +1508,7 @@ static int __devinit i5000_init_one(struct pci_dev *pdev, | |||
| 1509 | * i5000_remove_one destructor for one instance of device | 1508 | * i5000_remove_one destructor for one instance of device |
| 1510 | * | 1509 | * |
| 1511 | */ | 1510 | */ |
| 1512 | static void __devexit i5000_remove_one(struct pci_dev *pdev) | 1511 | static void i5000_remove_one(struct pci_dev *pdev) |
| 1513 | { | 1512 | { |
| 1514 | struct mem_ctl_info *mci; | 1513 | struct mem_ctl_info *mci; |
| 1515 | 1514 | ||
| @@ -1547,7 +1546,7 @@ MODULE_DEVICE_TABLE(pci, i5000_pci_tbl); | |||
| 1547 | static struct pci_driver i5000_driver = { | 1546 | static struct pci_driver i5000_driver = { |
| 1548 | .name = KBUILD_BASENAME, | 1547 | .name = KBUILD_BASENAME, |
| 1549 | .probe = i5000_init_one, | 1548 | .probe = i5000_init_one, |
| 1550 | .remove = __devexit_p(i5000_remove_one), | 1549 | .remove = i5000_remove_one, |
| 1551 | .id_table = i5000_pci_tbl, | 1550 | .id_table = i5000_pci_tbl, |
| 1552 | }; | 1551 | }; |
| 1553 | 1552 | ||
diff --git a/drivers/edac/i5100_edac.c b/drivers/edac/i5100_edac.c index c4b5e5f868e8..d6955b2cc99f 100644 --- a/drivers/edac/i5100_edac.c +++ b/drivers/edac/i5100_edac.c | |||
| @@ -638,8 +638,7 @@ static struct pci_dev *pci_get_device_func(unsigned vendor, | |||
| 638 | return ret; | 638 | return ret; |
| 639 | } | 639 | } |
| 640 | 640 | ||
| 641 | static unsigned long __devinit i5100_npages(struct mem_ctl_info *mci, | 641 | static unsigned long i5100_npages(struct mem_ctl_info *mci, int csrow) |
| 642 | int csrow) | ||
| 643 | { | 642 | { |
| 644 | struct i5100_priv *priv = mci->pvt_info; | 643 | struct i5100_priv *priv = mci->pvt_info; |
| 645 | const unsigned chan_rank = i5100_csrow_to_rank(mci, csrow); | 644 | const unsigned chan_rank = i5100_csrow_to_rank(mci, csrow); |
| @@ -660,7 +659,7 @@ static unsigned long __devinit i5100_npages(struct mem_ctl_info *mci, | |||
| 660 | ((unsigned long long) (1ULL << addr_lines) / PAGE_SIZE); | 659 | ((unsigned long long) (1ULL << addr_lines) / PAGE_SIZE); |
| 661 | } | 660 | } |
| 662 | 661 | ||
| 663 | static void __devinit i5100_init_mtr(struct mem_ctl_info *mci) | 662 | static void i5100_init_mtr(struct mem_ctl_info *mci) |
| 664 | { | 663 | { |
| 665 | struct i5100_priv *priv = mci->pvt_info; | 664 | struct i5100_priv *priv = mci->pvt_info; |
| 666 | struct pci_dev *mms[2] = { priv->ch0mm, priv->ch1mm }; | 665 | struct pci_dev *mms[2] = { priv->ch0mm, priv->ch1mm }; |
| @@ -732,7 +731,7 @@ static int i5100_read_spd_byte(const struct mem_ctl_info *mci, | |||
| 732 | * o not the only way to may chip selects to dimm slots | 731 | * o not the only way to may chip selects to dimm slots |
| 733 | * o investigate if there is some way to obtain this map from the bios | 732 | * o investigate if there is some way to obtain this map from the bios |
| 734 | */ | 733 | */ |
| 735 | static void __devinit i5100_init_dimm_csmap(struct mem_ctl_info *mci) | 734 | static void i5100_init_dimm_csmap(struct mem_ctl_info *mci) |
| 736 | { | 735 | { |
| 737 | struct i5100_priv *priv = mci->pvt_info; | 736 | struct i5100_priv *priv = mci->pvt_info; |
| 738 | int i; | 737 | int i; |
| @@ -762,8 +761,8 @@ static void __devinit i5100_init_dimm_csmap(struct mem_ctl_info *mci) | |||
| 762 | } | 761 | } |
| 763 | } | 762 | } |
| 764 | 763 | ||
| 765 | static void __devinit i5100_init_dimm_layout(struct pci_dev *pdev, | 764 | static void i5100_init_dimm_layout(struct pci_dev *pdev, |
| 766 | struct mem_ctl_info *mci) | 765 | struct mem_ctl_info *mci) |
| 767 | { | 766 | { |
| 768 | struct i5100_priv *priv = mci->pvt_info; | 767 | struct i5100_priv *priv = mci->pvt_info; |
| 769 | int i; | 768 | int i; |
| @@ -784,8 +783,8 @@ static void __devinit i5100_init_dimm_layout(struct pci_dev *pdev, | |||
| 784 | i5100_init_dimm_csmap(mci); | 783 | i5100_init_dimm_csmap(mci); |
| 785 | } | 784 | } |
| 786 | 785 | ||
| 787 | static void __devinit i5100_init_interleaving(struct pci_dev *pdev, | 786 | static void i5100_init_interleaving(struct pci_dev *pdev, |
| 788 | struct mem_ctl_info *mci) | 787 | struct mem_ctl_info *mci) |
| 789 | { | 788 | { |
| 790 | u16 w; | 789 | u16 w; |
| 791 | u32 dw; | 790 | u32 dw; |
| @@ -830,7 +829,7 @@ static void __devinit i5100_init_interleaving(struct pci_dev *pdev, | |||
| 830 | i5100_init_mtr(mci); | 829 | i5100_init_mtr(mci); |
| 831 | } | 830 | } |
| 832 | 831 | ||
| 833 | static void __devinit i5100_init_csrows(struct mem_ctl_info *mci) | 832 | static void i5100_init_csrows(struct mem_ctl_info *mci) |
| 834 | { | 833 | { |
| 835 | int i; | 834 | int i; |
| 836 | struct i5100_priv *priv = mci->pvt_info; | 835 | struct i5100_priv *priv = mci->pvt_info; |
| @@ -864,8 +863,7 @@ static void __devinit i5100_init_csrows(struct mem_ctl_info *mci) | |||
| 864 | } | 863 | } |
| 865 | } | 864 | } |
| 866 | 865 | ||
| 867 | static int __devinit i5100_init_one(struct pci_dev *pdev, | 866 | static int i5100_init_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 868 | const struct pci_device_id *id) | ||
| 869 | { | 867 | { |
| 870 | int rc; | 868 | int rc; |
| 871 | struct mem_ctl_info *mci; | 869 | struct mem_ctl_info *mci; |
| @@ -1020,7 +1018,7 @@ bail: | |||
| 1020 | return ret; | 1018 | return ret; |
| 1021 | } | 1019 | } |
| 1022 | 1020 | ||
| 1023 | static void __devexit i5100_remove_one(struct pci_dev *pdev) | 1021 | static void i5100_remove_one(struct pci_dev *pdev) |
| 1024 | { | 1022 | { |
| 1025 | struct mem_ctl_info *mci; | 1023 | struct mem_ctl_info *mci; |
| 1026 | struct i5100_priv *priv; | 1024 | struct i5100_priv *priv; |
| @@ -1054,7 +1052,7 @@ MODULE_DEVICE_TABLE(pci, i5100_pci_tbl); | |||
| 1054 | static struct pci_driver i5100_driver = { | 1052 | static struct pci_driver i5100_driver = { |
| 1055 | .name = KBUILD_BASENAME, | 1053 | .name = KBUILD_BASENAME, |
| 1056 | .probe = i5100_init_one, | 1054 | .probe = i5100_init_one, |
| 1057 | .remove = __devexit_p(i5100_remove_one), | 1055 | .remove = i5100_remove_one, |
| 1058 | .id_table = i5100_pci_tbl, | 1056 | .id_table = i5100_pci_tbl, |
| 1059 | }; | 1057 | }; |
| 1060 | 1058 | ||
diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c index 277246998b80..0a05bbceb08f 100644 --- a/drivers/edac/i5400_edac.c +++ b/drivers/edac/i5400_edac.c | |||
| @@ -1373,8 +1373,7 @@ fail0: | |||
| 1373 | * negative on error | 1373 | * negative on error |
| 1374 | * count (>= 0) | 1374 | * count (>= 0) |
| 1375 | */ | 1375 | */ |
| 1376 | static int __devinit i5400_init_one(struct pci_dev *pdev, | 1376 | static int i5400_init_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 1377 | const struct pci_device_id *id) | ||
| 1378 | { | 1377 | { |
| 1379 | int rc; | 1378 | int rc; |
| 1380 | 1379 | ||
| @@ -1393,7 +1392,7 @@ static int __devinit i5400_init_one(struct pci_dev *pdev, | |||
| 1393 | * i5400_remove_one destructor for one instance of device | 1392 | * i5400_remove_one destructor for one instance of device |
| 1394 | * | 1393 | * |
| 1395 | */ | 1394 | */ |
| 1396 | static void __devexit i5400_remove_one(struct pci_dev *pdev) | 1395 | static void i5400_remove_one(struct pci_dev *pdev) |
| 1397 | { | 1396 | { |
| 1398 | struct mem_ctl_info *mci; | 1397 | struct mem_ctl_info *mci; |
| 1399 | 1398 | ||
| @@ -1431,7 +1430,7 @@ MODULE_DEVICE_TABLE(pci, i5400_pci_tbl); | |||
| 1431 | static struct pci_driver i5400_driver = { | 1430 | static struct pci_driver i5400_driver = { |
| 1432 | .name = "i5400_edac", | 1431 | .name = "i5400_edac", |
| 1433 | .probe = i5400_init_one, | 1432 | .probe = i5400_init_one, |
| 1434 | .remove = __devexit_p(i5400_remove_one), | 1433 | .remove = i5400_remove_one, |
| 1435 | .id_table = i5400_pci_tbl, | 1434 | .id_table = i5400_pci_tbl, |
| 1436 | }; | 1435 | }; |
| 1437 | 1436 | ||
diff --git a/drivers/edac/i7300_edac.c b/drivers/edac/i7300_edac.c index 9d669cd43618..087c27bc5d42 100644 --- a/drivers/edac/i7300_edac.c +++ b/drivers/edac/i7300_edac.c | |||
| @@ -923,7 +923,7 @@ static void i7300_put_devices(struct mem_ctl_info *mci) | |||
| 923 | * Device 21 function 0: PCI_DEVICE_ID_INTEL_I7300_MCH_FB0 | 923 | * Device 21 function 0: PCI_DEVICE_ID_INTEL_I7300_MCH_FB0 |
| 924 | * Device 22 function 0: PCI_DEVICE_ID_INTEL_I7300_MCH_FB1 | 924 | * Device 22 function 0: PCI_DEVICE_ID_INTEL_I7300_MCH_FB1 |
| 925 | */ | 925 | */ |
| 926 | static int __devinit i7300_get_devices(struct mem_ctl_info *mci) | 926 | static int i7300_get_devices(struct mem_ctl_info *mci) |
| 927 | { | 927 | { |
| 928 | struct i7300_pvt *pvt; | 928 | struct i7300_pvt *pvt; |
| 929 | struct pci_dev *pdev; | 929 | struct pci_dev *pdev; |
| @@ -1008,8 +1008,7 @@ error: | |||
| 1008 | * @pdev: struct pci_dev pointer | 1008 | * @pdev: struct pci_dev pointer |
| 1009 | * @id: struct pci_device_id pointer - currently unused | 1009 | * @id: struct pci_device_id pointer - currently unused |
| 1010 | */ | 1010 | */ |
| 1011 | static int __devinit i7300_init_one(struct pci_dev *pdev, | 1011 | static int i7300_init_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 1012 | const struct pci_device_id *id) | ||
| 1013 | { | 1012 | { |
| 1014 | struct mem_ctl_info *mci; | 1013 | struct mem_ctl_info *mci; |
| 1015 | struct edac_mc_layer layers[3]; | 1014 | struct edac_mc_layer layers[3]; |
| @@ -1122,7 +1121,7 @@ fail0: | |||
| 1122 | * i7300_remove_one() - Remove the driver | 1121 | * i7300_remove_one() - Remove the driver |
| 1123 | * @pdev: struct pci_dev pointer | 1122 | * @pdev: struct pci_dev pointer |
| 1124 | */ | 1123 | */ |
| 1125 | static void __devexit i7300_remove_one(struct pci_dev *pdev) | 1124 | static void i7300_remove_one(struct pci_dev *pdev) |
| 1126 | { | 1125 | { |
| 1127 | struct mem_ctl_info *mci; | 1126 | struct mem_ctl_info *mci; |
| 1128 | char *tmp; | 1127 | char *tmp; |
| @@ -1163,7 +1162,7 @@ MODULE_DEVICE_TABLE(pci, i7300_pci_tbl); | |||
| 1163 | static struct pci_driver i7300_driver = { | 1162 | static struct pci_driver i7300_driver = { |
| 1164 | .name = "i7300_edac", | 1163 | .name = "i7300_edac", |
| 1165 | .probe = i7300_init_one, | 1164 | .probe = i7300_init_one, |
| 1166 | .remove = __devexit_p(i7300_remove_one), | 1165 | .remove = i7300_remove_one, |
| 1167 | .id_table = i7300_pci_tbl, | 1166 | .id_table = i7300_pci_tbl, |
| 1168 | }; | 1167 | }; |
| 1169 | 1168 | ||
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index 10c8c00d6469..e213d030b0dd 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c | |||
| @@ -2305,8 +2305,7 @@ fail0: | |||
| 2305 | * < 0 for error code | 2305 | * < 0 for error code |
| 2306 | */ | 2306 | */ |
| 2307 | 2307 | ||
| 2308 | static int __devinit i7core_probe(struct pci_dev *pdev, | 2308 | static int i7core_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 2309 | const struct pci_device_id *id) | ||
| 2310 | { | 2309 | { |
| 2311 | int rc, count = 0; | 2310 | int rc, count = 0; |
| 2312 | struct i7core_dev *i7core_dev; | 2311 | struct i7core_dev *i7core_dev; |
| @@ -2368,7 +2367,7 @@ fail0: | |||
| 2368 | * i7core_remove destructor for one instance of device | 2367 | * i7core_remove destructor for one instance of device |
| 2369 | * | 2368 | * |
| 2370 | */ | 2369 | */ |
| 2371 | static void __devexit i7core_remove(struct pci_dev *pdev) | 2370 | static void i7core_remove(struct pci_dev *pdev) |
| 2372 | { | 2371 | { |
| 2373 | struct i7core_dev *i7core_dev; | 2372 | struct i7core_dev *i7core_dev; |
| 2374 | 2373 | ||
| @@ -2409,7 +2408,7 @@ MODULE_DEVICE_TABLE(pci, i7core_pci_tbl); | |||
| 2409 | static struct pci_driver i7core_driver = { | 2408 | static struct pci_driver i7core_driver = { |
| 2410 | .name = "i7core_edac", | 2409 | .name = "i7core_edac", |
| 2411 | .probe = i7core_probe, | 2410 | .probe = i7core_probe, |
| 2412 | .remove = __devexit_p(i7core_remove), | 2411 | .remove = i7core_remove, |
| 2413 | .id_table = i7core_pci_tbl, | 2412 | .id_table = i7core_pci_tbl, |
| 2414 | }; | 2413 | }; |
| 2415 | 2414 | ||
diff --git a/drivers/edac/i82443bxgx_edac.c b/drivers/edac/i82443bxgx_edac.c index 90f303db5d1d..57fdb77903ba 100644 --- a/drivers/edac/i82443bxgx_edac.c +++ b/drivers/edac/i82443bxgx_edac.c | |||
| @@ -353,8 +353,8 @@ fail: | |||
| 353 | EXPORT_SYMBOL_GPL(i82443bxgx_edacmc_probe1); | 353 | EXPORT_SYMBOL_GPL(i82443bxgx_edacmc_probe1); |
| 354 | 354 | ||
| 355 | /* returns count (>= 0), or negative on error */ | 355 | /* returns count (>= 0), or negative on error */ |
| 356 | static int __devinit i82443bxgx_edacmc_init_one(struct pci_dev *pdev, | 356 | static int i82443bxgx_edacmc_init_one(struct pci_dev *pdev, |
| 357 | const struct pci_device_id *ent) | 357 | const struct pci_device_id *ent) |
| 358 | { | 358 | { |
| 359 | int rc; | 359 | int rc; |
| 360 | 360 | ||
| @@ -369,7 +369,7 @@ static int __devinit i82443bxgx_edacmc_init_one(struct pci_dev *pdev, | |||
| 369 | return rc; | 369 | return rc; |
| 370 | } | 370 | } |
| 371 | 371 | ||
| 372 | static void __devexit i82443bxgx_edacmc_remove_one(struct pci_dev *pdev) | 372 | static void i82443bxgx_edacmc_remove_one(struct pci_dev *pdev) |
| 373 | { | 373 | { |
| 374 | struct mem_ctl_info *mci; | 374 | struct mem_ctl_info *mci; |
| 375 | 375 | ||
| @@ -399,7 +399,7 @@ MODULE_DEVICE_TABLE(pci, i82443bxgx_pci_tbl); | |||
| 399 | static struct pci_driver i82443bxgx_edacmc_driver = { | 399 | static struct pci_driver i82443bxgx_edacmc_driver = { |
| 400 | .name = EDAC_MOD_STR, | 400 | .name = EDAC_MOD_STR, |
| 401 | .probe = i82443bxgx_edacmc_init_one, | 401 | .probe = i82443bxgx_edacmc_init_one, |
| 402 | .remove = __devexit_p(i82443bxgx_edacmc_remove_one), | 402 | .remove = i82443bxgx_edacmc_remove_one, |
| 403 | .id_table = i82443bxgx_pci_tbl, | 403 | .id_table = i82443bxgx_pci_tbl, |
| 404 | }; | 404 | }; |
| 405 | 405 | ||
diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c index 1faa74971513..3e3e431c8301 100644 --- a/drivers/edac/i82860_edac.c +++ b/drivers/edac/i82860_edac.c | |||
| @@ -254,8 +254,8 @@ fail: | |||
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | /* returns count (>= 0), or negative on error */ | 256 | /* returns count (>= 0), or negative on error */ |
| 257 | static int __devinit i82860_init_one(struct pci_dev *pdev, | 257 | static int i82860_init_one(struct pci_dev *pdev, |
| 258 | const struct pci_device_id *ent) | 258 | const struct pci_device_id *ent) |
| 259 | { | 259 | { |
| 260 | int rc; | 260 | int rc; |
| 261 | 261 | ||
| @@ -273,7 +273,7 @@ static int __devinit i82860_init_one(struct pci_dev *pdev, | |||
| 273 | return rc; | 273 | return rc; |
| 274 | } | 274 | } |
| 275 | 275 | ||
| 276 | static void __devexit i82860_remove_one(struct pci_dev *pdev) | 276 | static void i82860_remove_one(struct pci_dev *pdev) |
| 277 | { | 277 | { |
| 278 | struct mem_ctl_info *mci; | 278 | struct mem_ctl_info *mci; |
| 279 | 279 | ||
| @@ -302,7 +302,7 @@ MODULE_DEVICE_TABLE(pci, i82860_pci_tbl); | |||
| 302 | static struct pci_driver i82860_driver = { | 302 | static struct pci_driver i82860_driver = { |
| 303 | .name = EDAC_MOD_STR, | 303 | .name = EDAC_MOD_STR, |
| 304 | .probe = i82860_init_one, | 304 | .probe = i82860_init_one, |
| 305 | .remove = __devexit_p(i82860_remove_one), | 305 | .remove = i82860_remove_one, |
| 306 | .id_table = i82860_pci_tbl, | 306 | .id_table = i82860_pci_tbl, |
| 307 | }; | 307 | }; |
| 308 | 308 | ||
diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c index 3e416b1a6b53..2f8535fc451e 100644 --- a/drivers/edac/i82875p_edac.c +++ b/drivers/edac/i82875p_edac.c | |||
| @@ -479,8 +479,8 @@ fail0: | |||
| 479 | } | 479 | } |
| 480 | 480 | ||
| 481 | /* returns count (>= 0), or negative on error */ | 481 | /* returns count (>= 0), or negative on error */ |
| 482 | static int __devinit i82875p_init_one(struct pci_dev *pdev, | 482 | static int i82875p_init_one(struct pci_dev *pdev, |
| 483 | const struct pci_device_id *ent) | 483 | const struct pci_device_id *ent) |
| 484 | { | 484 | { |
| 485 | int rc; | 485 | int rc; |
| 486 | 486 | ||
| @@ -498,7 +498,7 @@ static int __devinit i82875p_init_one(struct pci_dev *pdev, | |||
| 498 | return rc; | 498 | return rc; |
| 499 | } | 499 | } |
| 500 | 500 | ||
| 501 | static void __devexit i82875p_remove_one(struct pci_dev *pdev) | 501 | static void i82875p_remove_one(struct pci_dev *pdev) |
| 502 | { | 502 | { |
| 503 | struct mem_ctl_info *mci; | 503 | struct mem_ctl_info *mci; |
| 504 | struct i82875p_pvt *pvt = NULL; | 504 | struct i82875p_pvt *pvt = NULL; |
| @@ -541,7 +541,7 @@ MODULE_DEVICE_TABLE(pci, i82875p_pci_tbl); | |||
| 541 | static struct pci_driver i82875p_driver = { | 541 | static struct pci_driver i82875p_driver = { |
| 542 | .name = EDAC_MOD_STR, | 542 | .name = EDAC_MOD_STR, |
| 543 | .probe = i82875p_init_one, | 543 | .probe = i82875p_init_one, |
| 544 | .remove = __devexit_p(i82875p_remove_one), | 544 | .remove = i82875p_remove_one, |
| 545 | .id_table = i82875p_pci_tbl, | 545 | .id_table = i82875p_pci_tbl, |
| 546 | }; | 546 | }; |
| 547 | 547 | ||
diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c index a98020409fa9..0c8d4b0eaa32 100644 --- a/drivers/edac/i82975x_edac.c +++ b/drivers/edac/i82975x_edac.c | |||
| @@ -592,8 +592,8 @@ fail0: | |||
| 592 | } | 592 | } |
| 593 | 593 | ||
| 594 | /* returns count (>= 0), or negative on error */ | 594 | /* returns count (>= 0), or negative on error */ |
| 595 | static int __devinit i82975x_init_one(struct pci_dev *pdev, | 595 | static int i82975x_init_one(struct pci_dev *pdev, |
| 596 | const struct pci_device_id *ent) | 596 | const struct pci_device_id *ent) |
| 597 | { | 597 | { |
| 598 | int rc; | 598 | int rc; |
| 599 | 599 | ||
| @@ -610,7 +610,7 @@ static int __devinit i82975x_init_one(struct pci_dev *pdev, | |||
| 610 | return rc; | 610 | return rc; |
| 611 | } | 611 | } |
| 612 | 612 | ||
| 613 | static void __devexit i82975x_remove_one(struct pci_dev *pdev) | 613 | static void i82975x_remove_one(struct pci_dev *pdev) |
| 614 | { | 614 | { |
| 615 | struct mem_ctl_info *mci; | 615 | struct mem_ctl_info *mci; |
| 616 | struct i82975x_pvt *pvt; | 616 | struct i82975x_pvt *pvt; |
| @@ -643,7 +643,7 @@ MODULE_DEVICE_TABLE(pci, i82975x_pci_tbl); | |||
| 643 | static struct pci_driver i82975x_driver = { | 643 | static struct pci_driver i82975x_driver = { |
| 644 | .name = EDAC_MOD_STR, | 644 | .name = EDAC_MOD_STR, |
| 645 | .probe = i82975x_init_one, | 645 | .probe = i82975x_init_one, |
| 646 | .remove = __devexit_p(i82975x_remove_one), | 646 | .remove = i82975x_remove_one, |
| 647 | .id_table = i82975x_pci_tbl, | 647 | .id_table = i82975x_pci_tbl, |
| 648 | }; | 648 | }; |
| 649 | 649 | ||
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c index 4fe66fa183ec..42a840d530a5 100644 --- a/drivers/edac/mpc85xx_edac.c +++ b/drivers/edac/mpc85xx_edac.c | |||
| @@ -212,7 +212,7 @@ static irqreturn_t mpc85xx_pci_isr(int irq, void *dev_id) | |||
| 212 | return IRQ_HANDLED; | 212 | return IRQ_HANDLED; |
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | int __devinit mpc85xx_pci_err_probe(struct platform_device *op) | 215 | int mpc85xx_pci_err_probe(struct platform_device *op) |
| 216 | { | 216 | { |
| 217 | struct edac_pci_ctl_info *pci; | 217 | struct edac_pci_ctl_info *pci; |
| 218 | struct mpc85xx_pci_pdata *pdata; | 218 | struct mpc85xx_pci_pdata *pdata; |
| @@ -504,7 +504,7 @@ static irqreturn_t mpc85xx_l2_isr(int irq, void *dev_id) | |||
| 504 | return IRQ_HANDLED; | 504 | return IRQ_HANDLED; |
| 505 | } | 505 | } |
| 506 | 506 | ||
| 507 | static int __devinit mpc85xx_l2_err_probe(struct platform_device *op) | 507 | static int mpc85xx_l2_err_probe(struct platform_device *op) |
| 508 | { | 508 | { |
| 509 | struct edac_device_ctl_info *edac_dev; | 509 | struct edac_device_ctl_info *edac_dev; |
| 510 | struct mpc85xx_l2_pdata *pdata; | 510 | struct mpc85xx_l2_pdata *pdata; |
| @@ -885,7 +885,7 @@ static irqreturn_t mpc85xx_mc_isr(int irq, void *dev_id) | |||
| 885 | return IRQ_HANDLED; | 885 | return IRQ_HANDLED; |
| 886 | } | 886 | } |
| 887 | 887 | ||
| 888 | static void __devinit mpc85xx_init_csrows(struct mem_ctl_info *mci) | 888 | static void mpc85xx_init_csrows(struct mem_ctl_info *mci) |
| 889 | { | 889 | { |
| 890 | struct mpc85xx_mc_pdata *pdata = mci->pvt_info; | 890 | struct mpc85xx_mc_pdata *pdata = mci->pvt_info; |
| 891 | struct csrow_info *csrow; | 891 | struct csrow_info *csrow; |
| @@ -964,7 +964,7 @@ static void __devinit mpc85xx_init_csrows(struct mem_ctl_info *mci) | |||
| 964 | } | 964 | } |
| 965 | } | 965 | } |
| 966 | 966 | ||
| 967 | static int __devinit mpc85xx_mc_err_probe(struct platform_device *op) | 967 | static int mpc85xx_mc_err_probe(struct platform_device *op) |
| 968 | { | 968 | { |
| 969 | struct mem_ctl_info *mci; | 969 | struct mem_ctl_info *mci; |
| 970 | struct edac_mc_layer layers[2]; | 970 | struct edac_mc_layer layers[2]; |
diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv64x60_edac.c index 2b315c2edc3c..542fad70e360 100644 --- a/drivers/edac/mv64x60_edac.c +++ b/drivers/edac/mv64x60_edac.c | |||
| @@ -100,7 +100,7 @@ static int __init mv64x60_pci_fixup(struct platform_device *pdev) | |||
| 100 | return 0; | 100 | return 0; |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | static int __devinit mv64x60_pci_err_probe(struct platform_device *pdev) | 103 | static int mv64x60_pci_err_probe(struct platform_device *pdev) |
| 104 | { | 104 | { |
| 105 | struct edac_pci_ctl_info *pci; | 105 | struct edac_pci_ctl_info *pci; |
| 106 | struct mv64x60_pci_pdata *pdata; | 106 | struct mv64x60_pci_pdata *pdata; |
| @@ -221,7 +221,7 @@ static int mv64x60_pci_err_remove(struct platform_device *pdev) | |||
| 221 | 221 | ||
| 222 | static struct platform_driver mv64x60_pci_err_driver = { | 222 | static struct platform_driver mv64x60_pci_err_driver = { |
| 223 | .probe = mv64x60_pci_err_probe, | 223 | .probe = mv64x60_pci_err_probe, |
| 224 | .remove = __devexit_p(mv64x60_pci_err_remove), | 224 | .remove = mv64x60_pci_err_remove, |
| 225 | .driver = { | 225 | .driver = { |
| 226 | .name = "mv64x60_pci_err", | 226 | .name = "mv64x60_pci_err", |
| 227 | } | 227 | } |
| @@ -271,7 +271,7 @@ static irqreturn_t mv64x60_sram_isr(int irq, void *dev_id) | |||
| 271 | return IRQ_HANDLED; | 271 | return IRQ_HANDLED; |
| 272 | } | 272 | } |
| 273 | 273 | ||
| 274 | static int __devinit mv64x60_sram_err_probe(struct platform_device *pdev) | 274 | static int mv64x60_sram_err_probe(struct platform_device *pdev) |
| 275 | { | 275 | { |
| 276 | struct edac_device_ctl_info *edac_dev; | 276 | struct edac_device_ctl_info *edac_dev; |
| 277 | struct mv64x60_sram_pdata *pdata; | 277 | struct mv64x60_sram_pdata *pdata; |
| @@ -439,7 +439,7 @@ static irqreturn_t mv64x60_cpu_isr(int irq, void *dev_id) | |||
| 439 | return IRQ_HANDLED; | 439 | return IRQ_HANDLED; |
| 440 | } | 440 | } |
| 441 | 441 | ||
| 442 | static int __devinit mv64x60_cpu_err_probe(struct platform_device *pdev) | 442 | static int mv64x60_cpu_err_probe(struct platform_device *pdev) |
| 443 | { | 443 | { |
| 444 | struct edac_device_ctl_info *edac_dev; | 444 | struct edac_device_ctl_info *edac_dev; |
| 445 | struct resource *r; | 445 | struct resource *r; |
| @@ -697,7 +697,7 @@ static void mv64x60_init_csrows(struct mem_ctl_info *mci, | |||
| 697 | dimm->edac_mode = EDAC_SECDED; | 697 | dimm->edac_mode = EDAC_SECDED; |
| 698 | } | 698 | } |
| 699 | 699 | ||
| 700 | static int __devinit mv64x60_mc_err_probe(struct platform_device *pdev) | 700 | static int mv64x60_mc_err_probe(struct platform_device *pdev) |
| 701 | { | 701 | { |
| 702 | struct mem_ctl_info *mci; | 702 | struct mem_ctl_info *mci; |
| 703 | struct edac_mc_layer layers[2]; | 703 | struct edac_mc_layer layers[2]; |
diff --git a/drivers/edac/octeon_edac-l2c.c b/drivers/edac/octeon_edac-l2c.c index 40fde6a51ed6..7e98084d3645 100644 --- a/drivers/edac/octeon_edac-l2c.c +++ b/drivers/edac/octeon_edac-l2c.c | |||
| @@ -131,7 +131,7 @@ static void octeon_l2c_poll_oct2(struct edac_device_ctl_info *l2c) | |||
| 131 | _octeon_l2c_poll_oct2(l2c, i); | 131 | _octeon_l2c_poll_oct2(l2c, i); |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | static int __devinit octeon_l2c_probe(struct platform_device *pdev) | 134 | static int octeon_l2c_probe(struct platform_device *pdev) |
| 135 | { | 135 | { |
| 136 | struct edac_device_ctl_info *l2c; | 136 | struct edac_device_ctl_info *l2c; |
| 137 | 137 | ||
diff --git a/drivers/edac/octeon_edac-lmc.c b/drivers/edac/octeon_edac-lmc.c index 33bca766e37d..93412d6b3af1 100644 --- a/drivers/edac/octeon_edac-lmc.c +++ b/drivers/edac/octeon_edac-lmc.c | |||
| @@ -86,7 +86,7 @@ static void octeon_lmc_edac_poll_o2(struct mem_ctl_info *mci) | |||
| 86 | cvmx_write_csr(CVMX_LMCX_INT(mci->mc_idx), int_reg.u64); | 86 | cvmx_write_csr(CVMX_LMCX_INT(mci->mc_idx), int_reg.u64); |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | static int __devinit octeon_lmc_edac_probe(struct platform_device *pdev) | 89 | static int octeon_lmc_edac_probe(struct platform_device *pdev) |
| 90 | { | 90 | { |
| 91 | struct mem_ctl_info *mci; | 91 | struct mem_ctl_info *mci; |
| 92 | struct edac_mc_layer layers[1]; | 92 | struct edac_mc_layer layers[1]; |
diff --git a/drivers/edac/octeon_edac-pc.c b/drivers/edac/octeon_edac-pc.c index 14a5e57f2b32..0f83c33a7d1f 100644 --- a/drivers/edac/octeon_edac-pc.c +++ b/drivers/edac/octeon_edac-pc.c | |||
| @@ -82,7 +82,7 @@ static int co_cache_error_event(struct notifier_block *this, | |||
| 82 | return NOTIFY_STOP; | 82 | return NOTIFY_STOP; |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | static int __devinit co_cache_error_probe(struct platform_device *pdev) | 85 | static int co_cache_error_probe(struct platform_device *pdev) |
| 86 | { | 86 | { |
| 87 | struct co_cache_error *p = devm_kzalloc(&pdev->dev, sizeof(*p), | 87 | struct co_cache_error *p = devm_kzalloc(&pdev->dev, sizeof(*p), |
| 88 | GFP_KERNEL); | 88 | GFP_KERNEL); |
diff --git a/drivers/edac/octeon_edac-pci.c b/drivers/edac/octeon_edac-pci.c index 758c1ef5fc9e..9ca73cec74e7 100644 --- a/drivers/edac/octeon_edac-pci.c +++ b/drivers/edac/octeon_edac-pci.c | |||
| @@ -58,7 +58,7 @@ static void octeon_pci_poll(struct edac_pci_ctl_info *pci) | |||
| 58 | } | 58 | } |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | static int __devinit octeon_pci_probe(struct platform_device *pdev) | 61 | static int octeon_pci_probe(struct platform_device *pdev) |
| 62 | { | 62 | { |
| 63 | struct edac_pci_ctl_info *pci; | 63 | struct edac_pci_ctl_info *pci; |
| 64 | int res = 0; | 64 | int res = 0; |
diff --git a/drivers/edac/pasemi_edac.c b/drivers/edac/pasemi_edac.c index 2d35b78ada3c..9c971b575530 100644 --- a/drivers/edac/pasemi_edac.c +++ b/drivers/edac/pasemi_edac.c | |||
| @@ -188,8 +188,8 @@ static int pasemi_edac_init_csrows(struct mem_ctl_info *mci, | |||
| 188 | return 0; | 188 | return 0; |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | static int __devinit pasemi_edac_probe(struct pci_dev *pdev, | 191 | static int pasemi_edac_probe(struct pci_dev *pdev, |
| 192 | const struct pci_device_id *ent) | 192 | const struct pci_device_id *ent) |
| 193 | { | 193 | { |
| 194 | struct mem_ctl_info *mci = NULL; | 194 | struct mem_ctl_info *mci = NULL; |
| 195 | struct edac_mc_layer layers[2]; | 195 | struct edac_mc_layer layers[2]; |
| @@ -266,7 +266,7 @@ fail: | |||
| 266 | return -ENODEV; | 266 | return -ENODEV; |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | static void __devexit pasemi_edac_remove(struct pci_dev *pdev) | 269 | static void pasemi_edac_remove(struct pci_dev *pdev) |
| 270 | { | 270 | { |
| 271 | struct mem_ctl_info *mci = edac_mc_del_mc(&pdev->dev); | 271 | struct mem_ctl_info *mci = edac_mc_del_mc(&pdev->dev); |
| 272 | 272 | ||
| @@ -287,7 +287,7 @@ MODULE_DEVICE_TABLE(pci, pasemi_edac_pci_tbl); | |||
| 287 | static struct pci_driver pasemi_edac_driver = { | 287 | static struct pci_driver pasemi_edac_driver = { |
| 288 | .name = MODULE_NAME, | 288 | .name = MODULE_NAME, |
| 289 | .probe = pasemi_edac_probe, | 289 | .probe = pasemi_edac_probe, |
| 290 | .remove = __devexit_p(pasemi_edac_remove), | 290 | .remove = pasemi_edac_remove, |
| 291 | .id_table = pasemi_edac_pci_tbl, | 291 | .id_table = pasemi_edac_pci_tbl, |
| 292 | }; | 292 | }; |
| 293 | 293 | ||
diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c index bf0957635991..ef6b7e08f485 100644 --- a/drivers/edac/ppc4xx_edac.c +++ b/drivers/edac/ppc4xx_edac.c | |||
| @@ -838,8 +838,7 @@ ppc4xx_edac_isr(int irq, void *dev_id) | |||
| 838 | * | 838 | * |
| 839 | * Returns a device type width enumeration. | 839 | * Returns a device type width enumeration. |
| 840 | */ | 840 | */ |
| 841 | static enum dev_type __devinit | 841 | static enum dev_type ppc4xx_edac_get_dtype(u32 mcopt1) |
| 842 | ppc4xx_edac_get_dtype(u32 mcopt1) | ||
| 843 | { | 842 | { |
| 844 | switch (mcopt1 & SDRAM_MCOPT1_WDTH_MASK) { | 843 | switch (mcopt1 & SDRAM_MCOPT1_WDTH_MASK) { |
| 845 | case SDRAM_MCOPT1_WDTH_16: | 844 | case SDRAM_MCOPT1_WDTH_16: |
| @@ -862,8 +861,7 @@ ppc4xx_edac_get_dtype(u32 mcopt1) | |||
| 862 | * | 861 | * |
| 863 | * Returns a memory type enumeration. | 862 | * Returns a memory type enumeration. |
| 864 | */ | 863 | */ |
| 865 | static enum mem_type __devinit | 864 | static enum mem_type ppc4xx_edac_get_mtype(u32 mcopt1) |
| 866 | ppc4xx_edac_get_mtype(u32 mcopt1) | ||
| 867 | { | 865 | { |
| 868 | bool rden = ((mcopt1 & SDRAM_MCOPT1_RDEN_MASK) == SDRAM_MCOPT1_RDEN); | 866 | bool rden = ((mcopt1 & SDRAM_MCOPT1_RDEN_MASK) == SDRAM_MCOPT1_RDEN); |
| 869 | 867 | ||
| @@ -893,8 +891,7 @@ ppc4xx_edac_get_mtype(u32 mcopt1) | |||
| 893 | * Returns 0 if OK; otherwise, -EINVAL if the memory bank size | 891 | * Returns 0 if OK; otherwise, -EINVAL if the memory bank size |
| 894 | * configuration cannot be determined. | 892 | * configuration cannot be determined. |
| 895 | */ | 893 | */ |
| 896 | static int __devinit | 894 | static int ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1) |
| 897 | ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1) | ||
| 898 | { | 895 | { |
| 899 | const struct ppc4xx_edac_pdata *pdata = mci->pvt_info; | 896 | const struct ppc4xx_edac_pdata *pdata = mci->pvt_info; |
| 900 | int status = 0; | 897 | int status = 0; |
| @@ -1011,11 +1008,9 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1) | |||
| 1011 | * | 1008 | * |
| 1012 | * Returns 0 if OK; otherwise, < 0 on error. | 1009 | * Returns 0 if OK; otherwise, < 0 on error. |
| 1013 | */ | 1010 | */ |
| 1014 | static int __devinit | 1011 | static int ppc4xx_edac_mc_init(struct mem_ctl_info *mci, |
| 1015 | ppc4xx_edac_mc_init(struct mem_ctl_info *mci, | 1012 | struct platform_device *op, |
| 1016 | struct platform_device *op, | 1013 | const dcr_host_t *dcr_host, u32 mcopt1) |
| 1017 | const dcr_host_t *dcr_host, | ||
| 1018 | u32 mcopt1) | ||
| 1019 | { | 1014 | { |
| 1020 | int status = 0; | 1015 | int status = 0; |
| 1021 | const u32 memcheck = (mcopt1 & SDRAM_MCOPT1_MCHK_MASK); | 1016 | const u32 memcheck = (mcopt1 & SDRAM_MCOPT1_MCHK_MASK); |
| @@ -1105,8 +1100,8 @@ ppc4xx_edac_mc_init(struct mem_ctl_info *mci, | |||
| 1105 | * Returns 0 if OK; otherwise, -ENODEV if the interrupts could not be | 1100 | * Returns 0 if OK; otherwise, -ENODEV if the interrupts could not be |
| 1106 | * mapped and assigned. | 1101 | * mapped and assigned. |
| 1107 | */ | 1102 | */ |
| 1108 | static int __devinit | 1103 | static int ppc4xx_edac_register_irq(struct platform_device *op, |
| 1109 | ppc4xx_edac_register_irq(struct platform_device *op, struct mem_ctl_info *mci) | 1104 | struct mem_ctl_info *mci) |
| 1110 | { | 1105 | { |
| 1111 | int status = 0; | 1106 | int status = 0; |
| 1112 | int ded_irq, sec_irq; | 1107 | int ded_irq, sec_irq; |
| @@ -1183,8 +1178,8 @@ ppc4xx_edac_register_irq(struct platform_device *op, struct mem_ctl_info *mci) | |||
| 1183 | * Returns 0 if the DCRs were successfully mapped; otherwise, < 0 on | 1178 | * Returns 0 if the DCRs were successfully mapped; otherwise, < 0 on |
| 1184 | * error. | 1179 | * error. |
| 1185 | */ | 1180 | */ |
| 1186 | static int __devinit | 1181 | static int ppc4xx_edac_map_dcrs(const struct device_node *np, |
| 1187 | ppc4xx_edac_map_dcrs(const struct device_node *np, dcr_host_t *dcr_host) | 1182 | dcr_host_t *dcr_host) |
| 1188 | { | 1183 | { |
| 1189 | unsigned int dcr_base, dcr_len; | 1184 | unsigned int dcr_base, dcr_len; |
| 1190 | 1185 | ||
| @@ -1232,7 +1227,7 @@ ppc4xx_edac_map_dcrs(const struct device_node *np, dcr_host_t *dcr_host) | |||
| 1232 | * Returns 0 if the controller instance was successfully bound to the | 1227 | * Returns 0 if the controller instance was successfully bound to the |
| 1233 | * driver; otherwise, < 0 on error. | 1228 | * driver; otherwise, < 0 on error. |
| 1234 | */ | 1229 | */ |
| 1235 | static int __devinit ppc4xx_edac_probe(struct platform_device *op) | 1230 | static int ppc4xx_edac_probe(struct platform_device *op) |
| 1236 | { | 1231 | { |
| 1237 | int status = 0; | 1232 | int status = 0; |
| 1238 | u32 mcopt1, memcheck; | 1233 | u32 mcopt1, memcheck; |
diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c index f854debd5533..2fd6a5490905 100644 --- a/drivers/edac/r82600_edac.c +++ b/drivers/edac/r82600_edac.c | |||
| @@ -359,8 +359,8 @@ fail: | |||
| 359 | } | 359 | } |
| 360 | 360 | ||
| 361 | /* returns count (>= 0), or negative on error */ | 361 | /* returns count (>= 0), or negative on error */ |
| 362 | static int __devinit r82600_init_one(struct pci_dev *pdev, | 362 | static int r82600_init_one(struct pci_dev *pdev, |
| 363 | const struct pci_device_id *ent) | 363 | const struct pci_device_id *ent) |
| 364 | { | 364 | { |
| 365 | edac_dbg(0, "\n"); | 365 | edac_dbg(0, "\n"); |
| 366 | 366 | ||
| @@ -368,7 +368,7 @@ static int __devinit r82600_init_one(struct pci_dev *pdev, | |||
| 368 | return r82600_probe1(pdev, ent->driver_data); | 368 | return r82600_probe1(pdev, ent->driver_data); |
| 369 | } | 369 | } |
| 370 | 370 | ||
| 371 | static void __devexit r82600_remove_one(struct pci_dev *pdev) | 371 | static void r82600_remove_one(struct pci_dev *pdev) |
| 372 | { | 372 | { |
| 373 | struct mem_ctl_info *mci; | 373 | struct mem_ctl_info *mci; |
| 374 | 374 | ||
| @@ -397,7 +397,7 @@ MODULE_DEVICE_TABLE(pci, r82600_pci_tbl); | |||
| 397 | static struct pci_driver r82600_driver = { | 397 | static struct pci_driver r82600_driver = { |
| 398 | .name = EDAC_MOD_STR, | 398 | .name = EDAC_MOD_STR, |
| 399 | .probe = r82600_init_one, | 399 | .probe = r82600_init_one, |
| 400 | .remove = __devexit_p(r82600_remove_one), | 400 | .remove = r82600_remove_one, |
| 401 | .id_table = r82600_pci_tbl, | 401 | .id_table = r82600_pci_tbl, |
| 402 | }; | 402 | }; |
| 403 | 403 | ||
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c index 5715b7c2c517..da7e2986e3d5 100644 --- a/drivers/edac/sb_edac.c +++ b/drivers/edac/sb_edac.c | |||
| @@ -1692,8 +1692,7 @@ fail0: | |||
| 1692 | * < 0 for error code | 1692 | * < 0 for error code |
| 1693 | */ | 1693 | */ |
| 1694 | 1694 | ||
| 1695 | static int __devinit sbridge_probe(struct pci_dev *pdev, | 1695 | static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 1696 | const struct pci_device_id *id) | ||
| 1697 | { | 1696 | { |
| 1698 | int rc; | 1697 | int rc; |
| 1699 | u8 mc, num_mc = 0; | 1698 | u8 mc, num_mc = 0; |
| @@ -1744,7 +1743,7 @@ fail0: | |||
| 1744 | * sbridge_remove destructor for one instance of device | 1743 | * sbridge_remove destructor for one instance of device |
| 1745 | * | 1744 | * |
| 1746 | */ | 1745 | */ |
| 1747 | static void __devexit sbridge_remove(struct pci_dev *pdev) | 1746 | static void sbridge_remove(struct pci_dev *pdev) |
| 1748 | { | 1747 | { |
| 1749 | struct sbridge_dev *sbridge_dev; | 1748 | struct sbridge_dev *sbridge_dev; |
| 1750 | 1749 | ||
| @@ -1785,7 +1784,7 @@ MODULE_DEVICE_TABLE(pci, sbridge_pci_tbl); | |||
| 1785 | static struct pci_driver sbridge_driver = { | 1784 | static struct pci_driver sbridge_driver = { |
| 1786 | .name = "sbridge_edac", | 1785 | .name = "sbridge_edac", |
| 1787 | .probe = sbridge_probe, | 1786 | .probe = sbridge_probe, |
| 1788 | .remove = __devexit_p(sbridge_remove), | 1787 | .remove = sbridge_remove, |
| 1789 | .id_table = sbridge_pci_tbl, | 1788 | .id_table = sbridge_pci_tbl, |
| 1790 | }; | 1789 | }; |
| 1791 | 1790 | ||
diff --git a/drivers/edac/tile_edac.c b/drivers/edac/tile_edac.c index 1e904b7b79a0..a0820536b7d9 100644 --- a/drivers/edac/tile_edac.c +++ b/drivers/edac/tile_edac.c | |||
| @@ -82,7 +82,7 @@ static void tile_edac_check(struct mem_ctl_info *mci) | |||
| 82 | * Initialize the 'csrows' table within the mci control structure with the | 82 | * Initialize the 'csrows' table within the mci control structure with the |
| 83 | * addressing of memory. | 83 | * addressing of memory. |
| 84 | */ | 84 | */ |
| 85 | static int __devinit tile_edac_init_csrows(struct mem_ctl_info *mci) | 85 | static int tile_edac_init_csrows(struct mem_ctl_info *mci) |
| 86 | { | 86 | { |
| 87 | struct csrow_info *csrow = mci->csrows[0]; | 87 | struct csrow_info *csrow = mci->csrows[0]; |
| 88 | struct tile_edac_priv *priv = mci->pvt_info; | 88 | struct tile_edac_priv *priv = mci->pvt_info; |
| @@ -120,7 +120,7 @@ static int __devinit tile_edac_init_csrows(struct mem_ctl_info *mci) | |||
| 120 | return 0; | 120 | return 0; |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | static int __devinit tile_edac_mc_probe(struct platform_device *pdev) | 123 | static int tile_edac_mc_probe(struct platform_device *pdev) |
| 124 | { | 124 | { |
| 125 | char hv_file[32]; | 125 | char hv_file[32]; |
| 126 | int hv_devhdl; | 126 | int hv_devhdl; |
| @@ -186,7 +186,7 @@ static int __devinit tile_edac_mc_probe(struct platform_device *pdev) | |||
| 186 | return 0; | 186 | return 0; |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | static int __devexit tile_edac_mc_remove(struct platform_device *pdev) | 189 | static int tile_edac_mc_remove(struct platform_device *pdev) |
| 190 | { | 190 | { |
| 191 | struct mem_ctl_info *mci = platform_get_drvdata(pdev); | 191 | struct mem_ctl_info *mci = platform_get_drvdata(pdev); |
| 192 | 192 | ||
| @@ -202,7 +202,7 @@ static struct platform_driver tile_edac_mc_driver = { | |||
| 202 | .owner = THIS_MODULE, | 202 | .owner = THIS_MODULE, |
| 203 | }, | 203 | }, |
| 204 | .probe = tile_edac_mc_probe, | 204 | .probe = tile_edac_mc_probe, |
| 205 | .remove = __devexit_p(tile_edac_mc_remove), | 205 | .remove = tile_edac_mc_remove, |
| 206 | }; | 206 | }; |
| 207 | 207 | ||
| 208 | /* | 208 | /* |
diff --git a/drivers/edac/x38_edac.c b/drivers/edac/x38_edac.c index 08a992693e62..c9db24d95caa 100644 --- a/drivers/edac/x38_edac.c +++ b/drivers/edac/x38_edac.c | |||
| @@ -418,8 +418,7 @@ fail: | |||
| 418 | return rc; | 418 | return rc; |
| 419 | } | 419 | } |
| 420 | 420 | ||
| 421 | static int __devinit x38_init_one(struct pci_dev *pdev, | 421 | static int x38_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 422 | const struct pci_device_id *ent) | ||
| 423 | { | 422 | { |
| 424 | int rc; | 423 | int rc; |
| 425 | 424 | ||
| @@ -435,7 +434,7 @@ static int __devinit x38_init_one(struct pci_dev *pdev, | |||
| 435 | return rc; | 434 | return rc; |
| 436 | } | 435 | } |
| 437 | 436 | ||
| 438 | static void __devexit x38_remove_one(struct pci_dev *pdev) | 437 | static void x38_remove_one(struct pci_dev *pdev) |
| 439 | { | 438 | { |
| 440 | struct mem_ctl_info *mci; | 439 | struct mem_ctl_info *mci; |
| 441 | 440 | ||
| @@ -464,7 +463,7 @@ MODULE_DEVICE_TABLE(pci, x38_pci_tbl); | |||
| 464 | static struct pci_driver x38_driver = { | 463 | static struct pci_driver x38_driver = { |
| 465 | .name = EDAC_MOD_STR, | 464 | .name = EDAC_MOD_STR, |
| 466 | .probe = x38_init_one, | 465 | .probe = x38_init_one, |
| 467 | .remove = __devexit_p(x38_remove_one), | 466 | .remove = x38_remove_one, |
| 468 | .id_table = x38_pci_tbl, | 467 | .id_table = x38_pci_tbl, |
| 469 | }; | 468 | }; |
| 470 | 469 | ||
diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c index ea5ac2dc1233..8e77c02edb24 100644 --- a/drivers/firmware/dcdbas.c +++ b/drivers/firmware/dcdbas.c | |||
| @@ -537,7 +537,7 @@ static struct attribute_group dcdbas_attr_group = { | |||
| 537 | .attrs = dcdbas_dev_attrs, | 537 | .attrs = dcdbas_dev_attrs, |
| 538 | }; | 538 | }; |
| 539 | 539 | ||
| 540 | static int __devinit dcdbas_probe(struct platform_device *dev) | 540 | static int dcdbas_probe(struct platform_device *dev) |
| 541 | { | 541 | { |
| 542 | int i, error; | 542 | int i, error; |
| 543 | 543 | ||
| @@ -575,7 +575,7 @@ static int __devinit dcdbas_probe(struct platform_device *dev) | |||
| 575 | return 0; | 575 | return 0; |
| 576 | } | 576 | } |
| 577 | 577 | ||
| 578 | static int __devexit dcdbas_remove(struct platform_device *dev) | 578 | static int dcdbas_remove(struct platform_device *dev) |
| 579 | { | 579 | { |
| 580 | int i; | 580 | int i; |
| 581 | 581 | ||
| @@ -593,7 +593,7 @@ static struct platform_driver dcdbas_driver = { | |||
| 593 | .owner = THIS_MODULE, | 593 | .owner = THIS_MODULE, |
| 594 | }, | 594 | }, |
| 595 | .probe = dcdbas_probe, | 595 | .probe = dcdbas_probe, |
| 596 | .remove = __devexit_p(dcdbas_remove), | 596 | .remove = dcdbas_remove, |
| 597 | }; | 597 | }; |
| 598 | 598 | ||
| 599 | /** | 599 | /** |
diff --git a/drivers/gpio/gpio-da9055.c b/drivers/gpio/gpio-da9055.c index 55d83c7d9c7f..fd6dfe382f13 100644 --- a/drivers/gpio/gpio-da9055.c +++ b/drivers/gpio/gpio-da9055.c | |||
| @@ -126,7 +126,7 @@ static int da9055_gpio_to_irq(struct gpio_chip *gc, u32 offset) | |||
| 126 | DA9055_IRQ_GPI0 + offset); | 126 | DA9055_IRQ_GPI0 + offset); |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | static struct gpio_chip reference_gp __devinitdata = { | 129 | static struct gpio_chip reference_gp = { |
| 130 | .label = "da9055-gpio", | 130 | .label = "da9055-gpio", |
| 131 | .owner = THIS_MODULE, | 131 | .owner = THIS_MODULE, |
| 132 | .get = da9055_gpio_get, | 132 | .get = da9055_gpio_get, |
| @@ -139,7 +139,7 @@ static struct gpio_chip reference_gp __devinitdata = { | |||
| 139 | .base = -1, | 139 | .base = -1, |
| 140 | }; | 140 | }; |
| 141 | 141 | ||
| 142 | static int __devinit da9055_gpio_probe(struct platform_device *pdev) | 142 | static int da9055_gpio_probe(struct platform_device *pdev) |
| 143 | { | 143 | { |
| 144 | struct da9055_gpio *gpio; | 144 | struct da9055_gpio *gpio; |
| 145 | struct da9055_pdata *pdata; | 145 | struct da9055_pdata *pdata; |
| @@ -170,7 +170,7 @@ err_mem: | |||
| 170 | return ret; | 170 | return ret; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | static int __devexit da9055_gpio_remove(struct platform_device *pdev) | 173 | static int da9055_gpio_remove(struct platform_device *pdev) |
| 174 | { | 174 | { |
| 175 | struct da9055_gpio *gpio = platform_get_drvdata(pdev); | 175 | struct da9055_gpio *gpio = platform_get_drvdata(pdev); |
| 176 | 176 | ||
| @@ -179,7 +179,7 @@ static int __devexit da9055_gpio_remove(struct platform_device *pdev) | |||
| 179 | 179 | ||
| 180 | static struct platform_driver da9055_gpio_driver = { | 180 | static struct platform_driver da9055_gpio_driver = { |
| 181 | .probe = da9055_gpio_probe, | 181 | .probe = da9055_gpio_probe, |
| 182 | .remove = __devexit_p(da9055_gpio_remove), | 182 | .remove = da9055_gpio_remove, |
| 183 | .driver = { | 183 | .driver = { |
| 184 | .name = "da9055-gpio", | 184 | .name = "da9055-gpio", |
| 185 | .owner = THIS_MODULE, | 185 | .owner = THIS_MODULE, |
diff --git a/drivers/gpio/gpio-ts5500.c b/drivers/gpio/gpio-ts5500.c index 0634ceea3c24..cc53cab8df2a 100644 --- a/drivers/gpio/gpio-ts5500.c +++ b/drivers/gpio/gpio-ts5500.c | |||
| @@ -319,7 +319,7 @@ static void ts5500_disable_irq(struct ts5500_priv *priv) | |||
| 319 | spin_unlock_irqrestore(&priv->lock, flags); | 319 | spin_unlock_irqrestore(&priv->lock, flags); |
| 320 | } | 320 | } |
| 321 | 321 | ||
| 322 | static int __devinit ts5500_dio_probe(struct platform_device *pdev) | 322 | static int ts5500_dio_probe(struct platform_device *pdev) |
| 323 | { | 323 | { |
| 324 | enum ts5500_blocks block = platform_get_device_id(pdev)->driver_data; | 324 | enum ts5500_blocks block = platform_get_device_id(pdev)->driver_data; |
| 325 | struct ts5500_dio_platform_data *pdata = pdev->dev.platform_data; | 325 | struct ts5500_dio_platform_data *pdata = pdev->dev.platform_data; |
| @@ -432,7 +432,7 @@ cleanup: | |||
| 432 | return ret; | 432 | return ret; |
| 433 | } | 433 | } |
| 434 | 434 | ||
| 435 | static int __devexit ts5500_dio_remove(struct platform_device *pdev) | 435 | static int ts5500_dio_remove(struct platform_device *pdev) |
| 436 | { | 436 | { |
| 437 | struct ts5500_priv *priv = platform_get_drvdata(pdev); | 437 | struct ts5500_priv *priv = platform_get_drvdata(pdev); |
| 438 | 438 | ||
| @@ -455,7 +455,7 @@ static struct platform_driver ts5500_dio_driver = { | |||
| 455 | .owner = THIS_MODULE, | 455 | .owner = THIS_MODULE, |
| 456 | }, | 456 | }, |
| 457 | .probe = ts5500_dio_probe, | 457 | .probe = ts5500_dio_probe, |
| 458 | .remove = __devexit_p(ts5500_dio_remove), | 458 | .remove = ts5500_dio_remove, |
| 459 | .id_table = ts5500_dio_ids, | 459 | .id_table = ts5500_dio_ids, |
| 460 | }; | 460 | }; |
| 461 | 461 | ||
diff --git a/drivers/gpio/gpio-viperboard.c b/drivers/gpio/gpio-viperboard.c index 13772996cf24..59d72391de26 100644 --- a/drivers/gpio/gpio-viperboard.c +++ b/drivers/gpio/gpio-viperboard.c | |||
| @@ -400,7 +400,7 @@ static int vprbrd_gpiob_direction_output(struct gpio_chip *chip, | |||
| 400 | 400 | ||
| 401 | /* ----- end of gpio b chip ---------------------------------------------- */ | 401 | /* ----- end of gpio b chip ---------------------------------------------- */ |
| 402 | 402 | ||
| 403 | static int __devinit vprbrd_gpio_probe(struct platform_device *pdev) | 403 | static int vprbrd_gpio_probe(struct platform_device *pdev) |
| 404 | { | 404 | { |
| 405 | struct vprbrd *vb = dev_get_drvdata(pdev->dev.parent); | 405 | struct vprbrd *vb = dev_get_drvdata(pdev->dev.parent); |
| 406 | struct vprbrd_gpio *vb_gpio; | 406 | struct vprbrd_gpio *vb_gpio; |
| @@ -456,7 +456,7 @@ err_gpioa: | |||
| 456 | return ret; | 456 | return ret; |
| 457 | } | 457 | } |
| 458 | 458 | ||
| 459 | static int __devexit vprbrd_gpio_remove(struct platform_device *pdev) | 459 | static int vprbrd_gpio_remove(struct platform_device *pdev) |
| 460 | { | 460 | { |
| 461 | struct vprbrd_gpio *vb_gpio = platform_get_drvdata(pdev); | 461 | struct vprbrd_gpio *vb_gpio = platform_get_drvdata(pdev); |
| 462 | int ret; | 462 | int ret; |
| @@ -472,7 +472,7 @@ static struct platform_driver vprbrd_gpio_driver = { | |||
| 472 | .driver.name = "viperboard-gpio", | 472 | .driver.name = "viperboard-gpio", |
| 473 | .driver.owner = THIS_MODULE, | 473 | .driver.owner = THIS_MODULE, |
| 474 | .probe = vprbrd_gpio_probe, | 474 | .probe = vprbrd_gpio_probe, |
| 475 | .remove = __devexit_p(vprbrd_gpio_remove), | 475 | .remove = vprbrd_gpio_remove, |
| 476 | }; | 476 | }; |
| 477 | 477 | ||
| 478 | static int __init vprbrd_gpio_init(void) | 478 | static int __init vprbrd_gpio_init(void) |
diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c index 31123b6a0be5..2d2c2f8d6dc6 100644 --- a/drivers/gpu/drm/ast/ast_drv.c +++ b/drivers/gpu/drm/ast/ast_drv.c | |||
| @@ -60,8 +60,7 @@ static DEFINE_PCI_DEVICE_TABLE(pciidlist) = { | |||
| 60 | 60 | ||
| 61 | MODULE_DEVICE_TABLE(pci, pciidlist); | 61 | MODULE_DEVICE_TABLE(pci, pciidlist); |
| 62 | 62 | ||
| 63 | static int __devinit | 63 | static int ast_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 64 | ast_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | ||
| 65 | { | 64 | { |
| 66 | return drm_get_pci_dev(pdev, ent, &driver); | 65 | return drm_get_pci_dev(pdev, ent, &driver); |
| 67 | } | 66 | } |
diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.c b/drivers/gpu/drm/cirrus/cirrus_drv.c index dcd1a8c029eb..8ecb601152ef 100644 --- a/drivers/gpu/drm/cirrus/cirrus_drv.c +++ b/drivers/gpu/drm/cirrus/cirrus_drv.c | |||
| @@ -56,8 +56,8 @@ static int cirrus_kick_out_firmware_fb(struct pci_dev *pdev) | |||
| 56 | return 0; | 56 | return 0; |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | static int __devinit | 59 | static int cirrus_pci_probe(struct pci_dev *pdev, |
| 60 | cirrus_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 60 | const struct pci_device_id *ent) |
| 61 | { | 61 | { |
| 62 | int ret; | 62 | int ret; |
| 63 | 63 | ||
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index 2bf9670ba29b..2aa331499f81 100644 --- a/drivers/gpu/drm/drm_mm.c +++ b/drivers/gpu/drm/drm_mm.c | |||
| @@ -221,11 +221,13 @@ static void drm_mm_insert_helper_range(struct drm_mm_node *hole_node, | |||
| 221 | 221 | ||
| 222 | BUG_ON(!hole_node->hole_follows || node->allocated); | 222 | BUG_ON(!hole_node->hole_follows || node->allocated); |
| 223 | 223 | ||
| 224 | if (mm->color_adjust) | ||
| 225 | mm->color_adjust(hole_node, color, &adj_start, &adj_end); | ||
| 226 | |||
| 227 | if (adj_start < start) | 224 | if (adj_start < start) |
| 228 | adj_start = start; | 225 | adj_start = start; |
| 226 | if (adj_end > end) | ||
| 227 | adj_end = end; | ||
| 228 | |||
| 229 | if (mm->color_adjust) | ||
| 230 | mm->color_adjust(hole_node, color, &adj_start, &adj_end); | ||
| 229 | 231 | ||
| 230 | if (alignment) { | 232 | if (alignment) { |
| 231 | unsigned tmp = adj_start % alignment; | 233 | unsigned tmp = adj_start % alignment; |
| @@ -506,7 +508,7 @@ void drm_mm_init_scan(struct drm_mm *mm, | |||
| 506 | mm->scan_size = size; | 508 | mm->scan_size = size; |
| 507 | mm->scanned_blocks = 0; | 509 | mm->scanned_blocks = 0; |
| 508 | mm->scan_hit_start = 0; | 510 | mm->scan_hit_start = 0; |
| 509 | mm->scan_hit_size = 0; | 511 | mm->scan_hit_end = 0; |
| 510 | mm->scan_check_range = 0; | 512 | mm->scan_check_range = 0; |
| 511 | mm->prev_scanned_node = NULL; | 513 | mm->prev_scanned_node = NULL; |
| 512 | } | 514 | } |
| @@ -533,7 +535,7 @@ void drm_mm_init_scan_with_range(struct drm_mm *mm, | |||
| 533 | mm->scan_size = size; | 535 | mm->scan_size = size; |
| 534 | mm->scanned_blocks = 0; | 536 | mm->scanned_blocks = 0; |
| 535 | mm->scan_hit_start = 0; | 537 | mm->scan_hit_start = 0; |
| 536 | mm->scan_hit_size = 0; | 538 | mm->scan_hit_end = 0; |
| 537 | mm->scan_start = start; | 539 | mm->scan_start = start; |
| 538 | mm->scan_end = end; | 540 | mm->scan_end = end; |
| 539 | mm->scan_check_range = 1; | 541 | mm->scan_check_range = 1; |
| @@ -552,8 +554,7 @@ int drm_mm_scan_add_block(struct drm_mm_node *node) | |||
| 552 | struct drm_mm *mm = node->mm; | 554 | struct drm_mm *mm = node->mm; |
| 553 | struct drm_mm_node *prev_node; | 555 | struct drm_mm_node *prev_node; |
| 554 | unsigned long hole_start, hole_end; | 556 | unsigned long hole_start, hole_end; |
| 555 | unsigned long adj_start; | 557 | unsigned long adj_start, adj_end; |
| 556 | unsigned long adj_end; | ||
| 557 | 558 | ||
| 558 | mm->scanned_blocks++; | 559 | mm->scanned_blocks++; |
| 559 | 560 | ||
| @@ -570,14 +571,8 @@ int drm_mm_scan_add_block(struct drm_mm_node *node) | |||
| 570 | node->node_list.next = &mm->prev_scanned_node->node_list; | 571 | node->node_list.next = &mm->prev_scanned_node->node_list; |
| 571 | mm->prev_scanned_node = node; | 572 | mm->prev_scanned_node = node; |
| 572 | 573 | ||
| 573 | hole_start = drm_mm_hole_node_start(prev_node); | 574 | adj_start = hole_start = drm_mm_hole_node_start(prev_node); |
| 574 | hole_end = drm_mm_hole_node_end(prev_node); | 575 | adj_end = hole_end = drm_mm_hole_node_end(prev_node); |
| 575 | |||
| 576 | adj_start = hole_start; | ||
| 577 | adj_end = hole_end; | ||
| 578 | |||
| 579 | if (mm->color_adjust) | ||
| 580 | mm->color_adjust(prev_node, mm->scan_color, &adj_start, &adj_end); | ||
| 581 | 576 | ||
| 582 | if (mm->scan_check_range) { | 577 | if (mm->scan_check_range) { |
| 583 | if (adj_start < mm->scan_start) | 578 | if (adj_start < mm->scan_start) |
| @@ -586,11 +581,14 @@ int drm_mm_scan_add_block(struct drm_mm_node *node) | |||
| 586 | adj_end = mm->scan_end; | 581 | adj_end = mm->scan_end; |
| 587 | } | 582 | } |
| 588 | 583 | ||
| 584 | if (mm->color_adjust) | ||
| 585 | mm->color_adjust(prev_node, mm->scan_color, | ||
| 586 | &adj_start, &adj_end); | ||
| 587 | |||
| 589 | if (check_free_hole(adj_start, adj_end, | 588 | if (check_free_hole(adj_start, adj_end, |
| 590 | mm->scan_size, mm->scan_alignment)) { | 589 | mm->scan_size, mm->scan_alignment)) { |
| 591 | mm->scan_hit_start = hole_start; | 590 | mm->scan_hit_start = hole_start; |
| 592 | mm->scan_hit_size = hole_end; | 591 | mm->scan_hit_end = hole_end; |
| 593 | |||
| 594 | return 1; | 592 | return 1; |
| 595 | } | 593 | } |
| 596 | 594 | ||
| @@ -626,19 +624,10 @@ int drm_mm_scan_remove_block(struct drm_mm_node *node) | |||
| 626 | node_list); | 624 | node_list); |
| 627 | 625 | ||
| 628 | prev_node->hole_follows = node->scanned_preceeds_hole; | 626 | prev_node->hole_follows = node->scanned_preceeds_hole; |
| 629 | INIT_LIST_HEAD(&node->node_list); | ||
| 630 | list_add(&node->node_list, &prev_node->node_list); | 627 | list_add(&node->node_list, &prev_node->node_list); |
| 631 | 628 | ||
| 632 | /* Only need to check for containement because start&size for the | 629 | return (drm_mm_hole_node_end(node) > mm->scan_hit_start && |
| 633 | * complete resulting free block (not just the desired part) is | 630 | node->start < mm->scan_hit_end); |
| 634 | * stored. */ | ||
| 635 | if (node->start >= mm->scan_hit_start && | ||
| 636 | node->start + node->size | ||
| 637 | <= mm->scan_hit_start + mm->scan_hit_size) { | ||
| 638 | return 1; | ||
| 639 | } | ||
| 640 | |||
| 641 | return 0; | ||
| 642 | } | 631 | } |
| 643 | EXPORT_SYMBOL(drm_mm_scan_remove_block); | 632 | EXPORT_SYMBOL(drm_mm_scan_remove_block); |
| 644 | 633 | ||
diff --git a/drivers/gpu/drm/exynos/exynos_ddc.c b/drivers/gpu/drm/exynos/exynos_ddc.c index bef43e0342a6..4e9b5ba8edff 100644 --- a/drivers/gpu/drm/exynos/exynos_ddc.c +++ b/drivers/gpu/drm/exynos/exynos_ddc.c | |||
| @@ -66,6 +66,6 @@ struct i2c_driver ddc_driver = { | |||
| 66 | }, | 66 | }, |
| 67 | .id_table = ddc_idtable, | 67 | .id_table = ddc_idtable, |
| 68 | .probe = s5p_ddc_probe, | 68 | .probe = s5p_ddc_probe, |
| 69 | .remove = __devexit_p(s5p_ddc_remove), | 69 | .remove = s5p_ddc_remove, |
| 70 | .command = NULL, | 70 | .command = NULL, |
| 71 | }; | 71 | }; |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_buf.c b/drivers/gpu/drm/exynos/exynos_drm_buf.c index 9601bad47a2e..57affae9568b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_buf.c +++ b/drivers/gpu/drm/exynos/exynos_drm_buf.c | |||
| @@ -3,24 +3,10 @@ | |||
| 3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | 3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. |
| 4 | * Author: Inki Dae <inki.dae@samsung.com> | 4 | * Author: Inki Dae <inki.dae@samsung.com> |
| 5 | * | 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * copy of this software and associated documentation files (the "Software"), | 7 | * under the terms of the GNU General Public License as published by the |
| 8 | * to deal in the Software without restriction, including without limitation | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 9 | * option) any later version. |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 11 | * Software is furnished to do so, subject to the following conditions: | ||
| 12 | * | ||
| 13 | * The above copyright notice and this permission notice (including the next | ||
| 14 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 15 | * Software. | ||
| 16 | * | ||
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 20 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 23 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 24 | */ | 10 | */ |
| 25 | 11 | ||
| 26 | #include <drm/drmP.h> | 12 | #include <drm/drmP.h> |
| @@ -29,6 +15,7 @@ | |||
| 29 | #include "exynos_drm_drv.h" | 15 | #include "exynos_drm_drv.h" |
| 30 | #include "exynos_drm_gem.h" | 16 | #include "exynos_drm_gem.h" |
| 31 | #include "exynos_drm_buf.h" | 17 | #include "exynos_drm_buf.h" |
| 18 | #include "exynos_drm_iommu.h" | ||
| 32 | 19 | ||
| 33 | static int lowlevel_buffer_allocate(struct drm_device *dev, | 20 | static int lowlevel_buffer_allocate(struct drm_device *dev, |
| 34 | unsigned int flags, struct exynos_drm_gem_buf *buf) | 21 | unsigned int flags, struct exynos_drm_gem_buf *buf) |
| @@ -51,7 +38,7 @@ static int lowlevel_buffer_allocate(struct drm_device *dev, | |||
| 51 | * region will be allocated else physically contiguous | 38 | * region will be allocated else physically contiguous |
| 52 | * as possible. | 39 | * as possible. |
| 53 | */ | 40 | */ |
| 54 | if (flags & EXYNOS_BO_CONTIG) | 41 | if (!(flags & EXYNOS_BO_NONCONTIG)) |
| 55 | dma_set_attr(DMA_ATTR_FORCE_CONTIGUOUS, &buf->dma_attrs); | 42 | dma_set_attr(DMA_ATTR_FORCE_CONTIGUOUS, &buf->dma_attrs); |
| 56 | 43 | ||
| 57 | /* | 44 | /* |
| @@ -66,14 +53,45 @@ static int lowlevel_buffer_allocate(struct drm_device *dev, | |||
| 66 | dma_set_attr(attr, &buf->dma_attrs); | 53 | dma_set_attr(attr, &buf->dma_attrs); |
| 67 | dma_set_attr(DMA_ATTR_NO_KERNEL_MAPPING, &buf->dma_attrs); | 54 | dma_set_attr(DMA_ATTR_NO_KERNEL_MAPPING, &buf->dma_attrs); |
| 68 | 55 | ||
| 69 | buf->pages = dma_alloc_attrs(dev->dev, buf->size, | 56 | nr_pages = buf->size >> PAGE_SHIFT; |
| 70 | &buf->dma_addr, GFP_KERNEL, &buf->dma_attrs); | 57 | |
| 71 | if (!buf->pages) { | 58 | if (!is_drm_iommu_supported(dev)) { |
| 72 | DRM_ERROR("failed to allocate buffer.\n"); | 59 | dma_addr_t start_addr; |
| 73 | return -ENOMEM; | 60 | unsigned int i = 0; |
| 61 | |||
| 62 | buf->pages = kzalloc(sizeof(struct page) * nr_pages, | ||
| 63 | GFP_KERNEL); | ||
| 64 | if (!buf->pages) { | ||
| 65 | DRM_ERROR("failed to allocate pages.\n"); | ||
| 66 | return -ENOMEM; | ||
| 67 | } | ||
| 68 | |||
| 69 | buf->kvaddr = dma_alloc_attrs(dev->dev, buf->size, | ||
| 70 | &buf->dma_addr, GFP_KERNEL, | ||
| 71 | &buf->dma_attrs); | ||
| 72 | if (!buf->kvaddr) { | ||
| 73 | DRM_ERROR("failed to allocate buffer.\n"); | ||
| 74 | kfree(buf->pages); | ||
| 75 | return -ENOMEM; | ||
| 76 | } | ||
| 77 | |||
| 78 | start_addr = buf->dma_addr; | ||
| 79 | while (i < nr_pages) { | ||
| 80 | buf->pages[i] = phys_to_page(start_addr); | ||
| 81 | start_addr += PAGE_SIZE; | ||
| 82 | i++; | ||
| 83 | } | ||
| 84 | } else { | ||
| 85 | |||
| 86 | buf->pages = dma_alloc_attrs(dev->dev, buf->size, | ||
| 87 | &buf->dma_addr, GFP_KERNEL, | ||
| 88 | &buf->dma_attrs); | ||
| 89 | if (!buf->pages) { | ||
| 90 | DRM_ERROR("failed to allocate buffer.\n"); | ||
| 91 | return -ENOMEM; | ||
| 92 | } | ||
| 74 | } | 93 | } |
| 75 | 94 | ||
| 76 | nr_pages = buf->size >> PAGE_SHIFT; | ||
| 77 | buf->sgt = drm_prime_pages_to_sg(buf->pages, nr_pages); | 95 | buf->sgt = drm_prime_pages_to_sg(buf->pages, nr_pages); |
| 78 | if (!buf->sgt) { | 96 | if (!buf->sgt) { |
| 79 | DRM_ERROR("failed to get sg table.\n"); | 97 | DRM_ERROR("failed to get sg table.\n"); |
| @@ -92,6 +110,9 @@ err_free_attrs: | |||
| 92 | (dma_addr_t)buf->dma_addr, &buf->dma_attrs); | 110 | (dma_addr_t)buf->dma_addr, &buf->dma_attrs); |
| 93 | buf->dma_addr = (dma_addr_t)NULL; | 111 | buf->dma_addr = (dma_addr_t)NULL; |
| 94 | 112 | ||
| 113 | if (!is_drm_iommu_supported(dev)) | ||
| 114 | kfree(buf->pages); | ||
| 115 | |||
| 95 | return ret; | 116 | return ret; |
| 96 | } | 117 | } |
| 97 | 118 | ||
| @@ -114,8 +135,14 @@ static void lowlevel_buffer_deallocate(struct drm_device *dev, | |||
| 114 | kfree(buf->sgt); | 135 | kfree(buf->sgt); |
| 115 | buf->sgt = NULL; | 136 | buf->sgt = NULL; |
| 116 | 137 | ||
| 117 | dma_free_attrs(dev->dev, buf->size, buf->pages, | 138 | if (!is_drm_iommu_supported(dev)) { |
| 139 | dma_free_attrs(dev->dev, buf->size, buf->kvaddr, | ||
| 118 | (dma_addr_t)buf->dma_addr, &buf->dma_attrs); | 140 | (dma_addr_t)buf->dma_addr, &buf->dma_attrs); |
| 141 | kfree(buf->pages); | ||
| 142 | } else | ||
| 143 | dma_free_attrs(dev->dev, buf->size, buf->pages, | ||
| 144 | (dma_addr_t)buf->dma_addr, &buf->dma_attrs); | ||
| 145 | |||
| 119 | buf->dma_addr = (dma_addr_t)NULL; | 146 | buf->dma_addr = (dma_addr_t)NULL; |
| 120 | } | 147 | } |
| 121 | 148 | ||
diff --git a/drivers/gpu/drm/exynos/exynos_drm_buf.h b/drivers/gpu/drm/exynos/exynos_drm_buf.h index 25cf16285033..a6412f19673c 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_buf.h +++ b/drivers/gpu/drm/exynos/exynos_drm_buf.h | |||
| @@ -3,24 +3,10 @@ | |||
| 3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | 3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. |
| 4 | * Author: Inki Dae <inki.dae@samsung.com> | 4 | * Author: Inki Dae <inki.dae@samsung.com> |
| 5 | * | 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * copy of this software and associated documentation files (the "Software"), | 7 | * under the terms of the GNU General Public License as published by the |
| 8 | * to deal in the Software without restriction, including without limitation | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 9 | * option) any later version. |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 11 | * Software is furnished to do so, subject to the following conditions: | ||
| 12 | * | ||
| 13 | * The above copyright notice and this permission notice (including the next | ||
| 14 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 15 | * Software. | ||
| 16 | * | ||
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 20 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 23 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 24 | */ | 10 | */ |
| 25 | 11 | ||
| 26 | #ifndef _EXYNOS_DRM_BUF_H_ | 12 | #ifndef _EXYNOS_DRM_BUF_H_ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.c b/drivers/gpu/drm/exynos/exynos_drm_connector.c index 0f68a2872673..ab37437bad8a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_connector.c +++ b/drivers/gpu/drm/exynos/exynos_drm_connector.c | |||
| @@ -5,24 +5,10 @@ | |||
| 5 | * Joonyoung Shim <jy0922.shim@samsung.com> | 5 | * Joonyoung Shim <jy0922.shim@samsung.com> |
| 6 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 6 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 7 | * | 7 | * |
| 8 | * Permission is hereby granted, free of charge, to any person obtaining a | 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * copy of this software and associated documentation files (the "Software"), | 9 | * under the terms of the GNU General Public License as published by the |
| 10 | * to deal in the Software without restriction, including without limitation | 10 | * Free Software Foundation; either version 2 of the License, or (at your |
| 11 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 11 | * option) any later version. |
| 12 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 13 | * Software is furnished to do so, subject to the following conditions: | ||
| 14 | * | ||
| 15 | * The above copyright notice and this permission notice (including the next | ||
| 16 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 17 | * Software. | ||
| 18 | * | ||
| 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 22 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 23 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 24 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 25 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 26 | */ | 12 | */ |
| 27 | 13 | ||
| 28 | #include <drm/drmP.h> | 14 | #include <drm/drmP.h> |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.h b/drivers/gpu/drm/exynos/exynos_drm_connector.h index 22f6cc442c3d..547c6b590357 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_connector.h +++ b/drivers/gpu/drm/exynos/exynos_drm_connector.h | |||
| @@ -5,24 +5,10 @@ | |||
| 5 | * Joonyoung Shim <jy0922.shim@samsung.com> | 5 | * Joonyoung Shim <jy0922.shim@samsung.com> |
| 6 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 6 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 7 | * | 7 | * |
| 8 | * Permission is hereby granted, free of charge, to any person obtaining a | 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * copy of this software and associated documentation files (the "Software"), | 9 | * under the terms of the GNU General Public License as published by the |
| 10 | * to deal in the Software without restriction, including without limitation | 10 | * Free Software Foundation; either version 2 of the License, or (at your |
| 11 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 11 | * option) any later version. |
| 12 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 13 | * Software is furnished to do so, subject to the following conditions: | ||
| 14 | * | ||
| 15 | * The above copyright notice and this permission notice (including the next | ||
| 16 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 17 | * Software. | ||
| 18 | * | ||
| 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 22 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 23 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 24 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 25 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 26 | */ | 12 | */ |
| 27 | 13 | ||
| 28 | #ifndef _EXYNOS_DRM_CONNECTOR_H_ | 14 | #ifndef _EXYNOS_DRM_CONNECTOR_H_ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_core.c b/drivers/gpu/drm/exynos/exynos_drm_core.c index 94026ad76a77..4667c9f67acd 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_core.c +++ b/drivers/gpu/drm/exynos/exynos_drm_core.c | |||
| @@ -6,24 +6,10 @@ | |||
| 6 | * Joonyoung Shim <jy0922.shim@samsung.com> | 6 | * Joonyoung Shim <jy0922.shim@samsung.com> |
| 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 8 | * | 8 | * |
| 9 | * Permission is hereby granted, free of charge, to any person obtaining a | 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * copy of this software and associated documentation files (the "Software"), | 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * to deal in the Software without restriction, including without limitation | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
| 12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 12 | * option) any later version. |
| 13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 14 | * Software is furnished to do so, subject to the following conditions: | ||
| 15 | * | ||
| 16 | * The above copyright notice and this permission notice (including the next | ||
| 17 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 18 | * Software. | ||
| 19 | * | ||
| 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 23 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 24 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 25 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 26 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 27 | */ | 13 | */ |
| 28 | 14 | ||
| 29 | #include <drm/drmP.h> | 15 | #include <drm/drmP.h> |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index 2efa4b031d73..e8894bc9e6d5 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c | |||
| @@ -6,24 +6,10 @@ | |||
| 6 | * Joonyoung Shim <jy0922.shim@samsung.com> | 6 | * Joonyoung Shim <jy0922.shim@samsung.com> |
| 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 8 | * | 8 | * |
| 9 | * Permission is hereby granted, free of charge, to any person obtaining a | 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * copy of this software and associated documentation files (the "Software"), | 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * to deal in the Software without restriction, including without limitation | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
| 12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 12 | * option) any later version. |
| 13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 14 | * Software is furnished to do so, subject to the following conditions: | ||
| 15 | * | ||
| 16 | * The above copyright notice and this permission notice (including the next | ||
| 17 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 18 | * Software. | ||
| 19 | * | ||
| 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 23 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 24 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 25 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 26 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 27 | */ | 13 | */ |
| 28 | 14 | ||
| 29 | #include <drm/drmP.h> | 15 | #include <drm/drmP.h> |
| @@ -407,3 +393,33 @@ void exynos_drm_crtc_disable_vblank(struct drm_device *dev, int crtc) | |||
| 407 | exynos_drm_fn_encoder(private->crtc[crtc], &crtc, | 393 | exynos_drm_fn_encoder(private->crtc[crtc], &crtc, |
| 408 | exynos_drm_disable_vblank); | 394 | exynos_drm_disable_vblank); |
| 409 | } | 395 | } |
| 396 | |||
| 397 | void exynos_drm_crtc_finish_pageflip(struct drm_device *dev, int crtc) | ||
| 398 | { | ||
| 399 | struct exynos_drm_private *dev_priv = dev->dev_private; | ||
| 400 | struct drm_pending_vblank_event *e, *t; | ||
| 401 | struct timeval now; | ||
| 402 | unsigned long flags; | ||
| 403 | |||
| 404 | DRM_DEBUG_KMS("%s\n", __FILE__); | ||
| 405 | |||
| 406 | spin_lock_irqsave(&dev->event_lock, flags); | ||
| 407 | |||
| 408 | list_for_each_entry_safe(e, t, &dev_priv->pageflip_event_list, | ||
| 409 | base.link) { | ||
| 410 | /* if event's pipe isn't same as crtc then ignore it. */ | ||
| 411 | if (crtc != e->pipe) | ||
| 412 | continue; | ||
| 413 | |||
| 414 | do_gettimeofday(&now); | ||
| 415 | e->event.sequence = 0; | ||
| 416 | e->event.tv_sec = now.tv_sec; | ||
| 417 | e->event.tv_usec = now.tv_usec; | ||
| 418 | |||
| 419 | list_move_tail(&e->base.link, &e->base.file_priv->event_list); | ||
| 420 | wake_up_interruptible(&e->base.file_priv->event_wait); | ||
| 421 | drm_vblank_put(dev, crtc); | ||
| 422 | } | ||
| 423 | |||
| 424 | spin_unlock_irqrestore(&dev->event_lock, flags); | ||
| 425 | } | ||
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.h b/drivers/gpu/drm/exynos/exynos_drm_crtc.h index 6bae8d8c250e..3e197e6ae7d9 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.h +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.h | |||
| @@ -6,24 +6,10 @@ | |||
| 6 | * Joonyoung Shim <jy0922.shim@samsung.com> | 6 | * Joonyoung Shim <jy0922.shim@samsung.com> |
| 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 8 | * | 8 | * |
| 9 | * Permission is hereby granted, free of charge, to any person obtaining a | 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * copy of this software and associated documentation files (the "Software"), | 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * to deal in the Software without restriction, including without limitation | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
| 12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 12 | * option) any later version. |
| 13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 14 | * Software is furnished to do so, subject to the following conditions: | ||
| 15 | * | ||
| 16 | * The above copyright notice and this permission notice (including the next | ||
| 17 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 18 | * Software. | ||
| 19 | * | ||
| 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 23 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 24 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 25 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 26 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 27 | */ | 13 | */ |
| 28 | 14 | ||
| 29 | #ifndef _EXYNOS_DRM_CRTC_H_ | 15 | #ifndef _EXYNOS_DRM_CRTC_H_ |
| @@ -32,5 +18,6 @@ | |||
| 32 | int exynos_drm_crtc_create(struct drm_device *dev, unsigned int nr); | 18 | int exynos_drm_crtc_create(struct drm_device *dev, unsigned int nr); |
| 33 | int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int crtc); | 19 | int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int crtc); |
| 34 | void exynos_drm_crtc_disable_vblank(struct drm_device *dev, int crtc); | 20 | void exynos_drm_crtc_disable_vblank(struct drm_device *dev, int crtc); |
| 21 | void exynos_drm_crtc_finish_pageflip(struct drm_device *dev, int crtc); | ||
| 35 | 22 | ||
| 36 | #endif | 23 | #endif |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c index 61d5a8402eb8..9df97714b6c0 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | |||
| @@ -3,24 +3,10 @@ | |||
| 3 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | 3 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. |
| 4 | * Author: Inki Dae <inki.dae@samsung.com> | 4 | * Author: Inki Dae <inki.dae@samsung.com> |
| 5 | * | 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * copy of this software and associated documentation files (the "Software"), | 7 | * under the terms of the GNU General Public License as published by the |
| 8 | * to deal in the Software without restriction, including without limitation | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 9 | * option) any later version. |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 11 | * Software is furnished to do so, subject to the following conditions: | ||
| 12 | * | ||
| 13 | * The above copyright notice and this permission notice (including the next | ||
| 14 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 15 | * Software. | ||
| 16 | * | ||
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 20 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 23 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 24 | */ | 10 | */ |
| 25 | 11 | ||
| 26 | #include <drm/drmP.h> | 12 | #include <drm/drmP.h> |
| @@ -222,7 +208,7 @@ struct dma_buf *exynos_dmabuf_prime_export(struct drm_device *drm_dev, | |||
| 222 | struct exynos_drm_gem_obj *exynos_gem_obj = to_exynos_gem_obj(obj); | 208 | struct exynos_drm_gem_obj *exynos_gem_obj = to_exynos_gem_obj(obj); |
| 223 | 209 | ||
| 224 | return dma_buf_export(exynos_gem_obj, &exynos_dmabuf_ops, | 210 | return dma_buf_export(exynos_gem_obj, &exynos_dmabuf_ops, |
| 225 | exynos_gem_obj->base.size, 0600); | 211 | exynos_gem_obj->base.size, flags); |
| 226 | } | 212 | } |
| 227 | 213 | ||
| 228 | struct drm_gem_object *exynos_dmabuf_prime_import(struct drm_device *drm_dev, | 214 | struct drm_gem_object *exynos_dmabuf_prime_import(struct drm_device *drm_dev, |
| @@ -246,7 +232,12 @@ struct drm_gem_object *exynos_dmabuf_prime_import(struct drm_device *drm_dev, | |||
| 246 | 232 | ||
| 247 | /* is it from our device? */ | 233 | /* is it from our device? */ |
| 248 | if (obj->dev == drm_dev) { | 234 | if (obj->dev == drm_dev) { |
| 235 | /* | ||
| 236 | * Importing dmabuf exported from out own gem increases | ||
| 237 | * refcount on gem itself instead of f_count of dmabuf. | ||
| 238 | */ | ||
| 249 | drm_gem_object_reference(obj); | 239 | drm_gem_object_reference(obj); |
| 240 | dma_buf_put(dma_buf); | ||
| 250 | return obj; | 241 | return obj; |
| 251 | } | 242 | } |
| 252 | } | 243 | } |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.h b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.h index 662a8f98ccdb..49acfafb4fdb 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.h +++ b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.h | |||
| @@ -3,24 +3,10 @@ | |||
| 3 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | 3 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. |
| 4 | * Author: Inki Dae <inki.dae@samsung.com> | 4 | * Author: Inki Dae <inki.dae@samsung.com> |
| 5 | * | 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * copy of this software and associated documentation files (the "Software"), | 7 | * under the terms of the GNU General Public License as published by the |
| 8 | * to deal in the Software without restriction, including without limitation | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 9 | * option) any later version. |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 11 | * Software is furnished to do so, subject to the following conditions: | ||
| 12 | * | ||
| 13 | * The above copyright notice and this permission notice (including the next | ||
| 14 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 15 | * Software. | ||
| 16 | * | ||
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 20 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 23 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 24 | */ | 10 | */ |
| 25 | 11 | ||
| 26 | #ifndef _EXYNOS_DRM_DMABUF_H_ | 12 | #ifndef _EXYNOS_DRM_DMABUF_H_ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index e0a8e8024b01..3da5c2d214d8 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c | |||
| @@ -5,24 +5,10 @@ | |||
| 5 | * Joonyoung Shim <jy0922.shim@samsung.com> | 5 | * Joonyoung Shim <jy0922.shim@samsung.com> |
| 6 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 6 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 7 | * | 7 | * |
| 8 | * Permission is hereby granted, free of charge, to any person obtaining a | 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * copy of this software and associated documentation files (the "Software"), | 9 | * under the terms of the GNU General Public License as published by the |
| 10 | * to deal in the Software without restriction, including without limitation | 10 | * Free Software Foundation; either version 2 of the License, or (at your |
| 11 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 11 | * option) any later version. |
| 12 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 13 | * Software is furnished to do so, subject to the following conditions: | ||
| 14 | * | ||
| 15 | * The above copyright notice and this permission notice (including the next | ||
| 16 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 17 | * Software. | ||
| 18 | * | ||
| 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 22 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 23 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 24 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 25 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 26 | */ | 12 | */ |
| 27 | 13 | ||
| 28 | #include <drm/drmP.h> | 14 | #include <drm/drmP.h> |
| @@ -325,7 +311,7 @@ static int exynos_drm_platform_remove(struct platform_device *pdev) | |||
| 325 | 311 | ||
| 326 | static struct platform_driver exynos_drm_platform_driver = { | 312 | static struct platform_driver exynos_drm_platform_driver = { |
| 327 | .probe = exynos_drm_platform_probe, | 313 | .probe = exynos_drm_platform_probe, |
| 328 | .remove = __devexit_p(exynos_drm_platform_remove), | 314 | .remove = exynos_drm_platform_remove, |
| 329 | .driver = { | 315 | .driver = { |
| 330 | .owner = THIS_MODULE, | 316 | .owner = THIS_MODULE, |
| 331 | .name = "exynos-drm", | 317 | .name = "exynos-drm", |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index f5a97745bf93..b9e51bc09e81 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h | |||
| @@ -6,24 +6,10 @@ | |||
| 6 | * Joonyoung Shim <jy0922.shim@samsung.com> | 6 | * Joonyoung Shim <jy0922.shim@samsung.com> |
| 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 8 | * | 8 | * |
| 9 | * Permission is hereby granted, free of charge, to any person obtaining a | 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * copy of this software and associated documentation files (the "Software"), | 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * to deal in the Software without restriction, including without limitation | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
| 12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 12 | * option) any later version. |
| 13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 14 | * Software is furnished to do so, subject to the following conditions: | ||
| 15 | * | ||
| 16 | * The above copyright notice and this permission notice (including the next | ||
| 17 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 18 | * Software. | ||
| 19 | * | ||
| 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 23 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 24 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 25 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 26 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 27 | */ | 13 | */ |
| 28 | 14 | ||
| 29 | #ifndef _EXYNOS_DRM_DRV_H_ | 15 | #ifndef _EXYNOS_DRM_DRV_H_ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c index 301485215a70..c63721f64aec 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c | |||
| @@ -6,24 +6,10 @@ | |||
| 6 | * Joonyoung Shim <jy0922.shim@samsung.com> | 6 | * Joonyoung Shim <jy0922.shim@samsung.com> |
| 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 8 | * | 8 | * |
| 9 | * Permission is hereby granted, free of charge, to any person obtaining a | 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * copy of this software and associated documentation files (the "Software"), | 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * to deal in the Software without restriction, including without limitation | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
| 12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 12 | * option) any later version. |
| 13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 14 | * Software is furnished to do so, subject to the following conditions: | ||
| 15 | * | ||
| 16 | * The above copyright notice and this permission notice (including the next | ||
| 17 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 18 | * Software. | ||
| 19 | * | ||
| 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 23 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 24 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 25 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 26 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 27 | */ | 13 | */ |
| 28 | 14 | ||
| 29 | #include <drm/drmP.h> | 15 | #include <drm/drmP.h> |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.h b/drivers/gpu/drm/exynos/exynos_drm_encoder.h index 88bb25a2a917..89e2fb0770af 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.h +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.h | |||
| @@ -5,24 +5,10 @@ | |||
| 5 | * Joonyoung Shim <jy0922.shim@samsung.com> | 5 | * Joonyoung Shim <jy0922.shim@samsung.com> |
| 6 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 6 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 7 | * | 7 | * |
| 8 | * Permission is hereby granted, free of charge, to any person obtaining a | 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * copy of this software and associated documentation files (the "Software"), | 9 | * under the terms of the GNU General Public License as published by the |
| 10 | * to deal in the Software without restriction, including without limitation | 10 | * Free Software Foundation; either version 2 of the License, or (at your |
| 11 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 11 | * option) any later version. |
| 12 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 13 | * Software is furnished to do so, subject to the following conditions: | ||
| 14 | * | ||
| 15 | * The above copyright notice and this permission notice (including the next | ||
| 16 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 17 | * Software. | ||
| 18 | * | ||
| 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 22 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 23 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 24 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 25 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 26 | */ | 12 | */ |
| 27 | 13 | ||
| 28 | #ifndef _EXYNOS_DRM_ENCODER_H_ | 14 | #ifndef _EXYNOS_DRM_ENCODER_H_ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c index 5426cc5a5e8d..294c0513f587 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fb.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c | |||
| @@ -6,24 +6,10 @@ | |||
| 6 | * Joonyoung Shim <jy0922.shim@samsung.com> | 6 | * Joonyoung Shim <jy0922.shim@samsung.com> |
| 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 8 | * | 8 | * |
| 9 | * Permission is hereby granted, free of charge, to any person obtaining a | 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * copy of this software and associated documentation files (the "Software"), | 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * to deal in the Software without restriction, including without limitation | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
| 12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 12 | * option) any later version. |
| 13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 14 | * Software is furnished to do so, subject to the following conditions: | ||
| 15 | * | ||
| 16 | * The above copyright notice and this permission notice (including the next | ||
| 17 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 18 | * Software. | ||
| 19 | * | ||
| 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 23 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 24 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 25 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 26 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 27 | */ | 13 | */ |
| 28 | 14 | ||
| 29 | #include <drm/drmP.h> | 15 | #include <drm/drmP.h> |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.h b/drivers/gpu/drm/exynos/exynos_drm_fb.h index 96262e54f76d..517471b37566 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fb.h +++ b/drivers/gpu/drm/exynos/exynos_drm_fb.h | |||
| @@ -5,24 +5,10 @@ | |||
| 5 | * Joonyoung Shim <jy0922.shim@samsung.com> | 5 | * Joonyoung Shim <jy0922.shim@samsung.com> |
| 6 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 6 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 7 | * | 7 | * |
| 8 | * Permission is hereby granted, free of charge, to any person obtaining a | 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * copy of this software and associated documentation files (the "Software"), | 9 | * under the terms of the GNU General Public License as published by the |
| 10 | * to deal in the Software without restriction, including without limitation | 10 | * Free Software Foundation; either version 2 of the License, or (at your |
| 11 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 11 | * option) any later version. |
| 12 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 13 | * Software is furnished to do so, subject to the following conditions: | ||
| 14 | * | ||
| 15 | * The above copyright notice and this permission notice (including the next | ||
| 16 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 17 | * Software. | ||
| 18 | * | ||
| 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 22 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 23 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 24 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 25 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 26 | */ | 12 | */ |
| 27 | 13 | ||
| 28 | #ifndef _EXYNOS_DRM_FB_H_ | 14 | #ifndef _EXYNOS_DRM_FB_H_ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index f433eb7533a9..71f867340a88 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c | |||
| @@ -6,24 +6,10 @@ | |||
| 6 | * Joonyoung Shim <jy0922.shim@samsung.com> | 6 | * Joonyoung Shim <jy0922.shim@samsung.com> |
| 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 8 | * | 8 | * |
| 9 | * Permission is hereby granted, free of charge, to any person obtaining a | 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * copy of this software and associated documentation files (the "Software"), | 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * to deal in the Software without restriction, including without limitation | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
| 12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 12 | * option) any later version. |
| 13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 14 | * Software is furnished to do so, subject to the following conditions: | ||
| 15 | * | ||
| 16 | * The above copyright notice and this permission notice (including the next | ||
| 17 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 18 | * Software. | ||
| 19 | * | ||
| 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 23 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 24 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 25 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 26 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 27 | */ | 13 | */ |
| 28 | 14 | ||
| 29 | #include <drm/drmP.h> | 15 | #include <drm/drmP.h> |
| @@ -34,6 +20,7 @@ | |||
| 34 | #include "exynos_drm_drv.h" | 20 | #include "exynos_drm_drv.h" |
| 35 | #include "exynos_drm_fb.h" | 21 | #include "exynos_drm_fb.h" |
| 36 | #include "exynos_drm_gem.h" | 22 | #include "exynos_drm_gem.h" |
| 23 | #include "exynos_drm_iommu.h" | ||
| 37 | 24 | ||
| 38 | #define MAX_CONNECTOR 4 | 25 | #define MAX_CONNECTOR 4 |
| 39 | #define PREFERRED_BPP 32 | 26 | #define PREFERRED_BPP 32 |
| @@ -111,9 +98,18 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper, | |||
| 111 | 98 | ||
| 112 | /* map pages with kernel virtual space. */ | 99 | /* map pages with kernel virtual space. */ |
| 113 | if (!buffer->kvaddr) { | 100 | if (!buffer->kvaddr) { |
| 114 | unsigned int nr_pages = buffer->size >> PAGE_SHIFT; | 101 | if (is_drm_iommu_supported(dev)) { |
| 115 | buffer->kvaddr = vmap(buffer->pages, nr_pages, VM_MAP, | 102 | unsigned int nr_pages = buffer->size >> PAGE_SHIFT; |
| 103 | |||
| 104 | buffer->kvaddr = vmap(buffer->pages, nr_pages, VM_MAP, | ||
| 116 | pgprot_writecombine(PAGE_KERNEL)); | 105 | pgprot_writecombine(PAGE_KERNEL)); |
| 106 | } else { | ||
| 107 | phys_addr_t dma_addr = buffer->dma_addr; | ||
| 108 | if (dma_addr) | ||
| 109 | buffer->kvaddr = phys_to_virt(dma_addr); | ||
| 110 | else | ||
| 111 | buffer->kvaddr = (void __iomem *)NULL; | ||
| 112 | } | ||
| 117 | if (!buffer->kvaddr) { | 113 | if (!buffer->kvaddr) { |
| 118 | DRM_ERROR("failed to map pages to kernel space.\n"); | 114 | DRM_ERROR("failed to map pages to kernel space.\n"); |
| 119 | return -EIO; | 115 | return -EIO; |
| @@ -128,8 +124,12 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper, | |||
| 128 | 124 | ||
| 129 | dev->mode_config.fb_base = (resource_size_t)buffer->dma_addr; | 125 | dev->mode_config.fb_base = (resource_size_t)buffer->dma_addr; |
| 130 | fbi->screen_base = buffer->kvaddr + offset; | 126 | fbi->screen_base = buffer->kvaddr + offset; |
| 131 | fbi->fix.smem_start = (unsigned long) | 127 | if (is_drm_iommu_supported(dev)) |
| 128 | fbi->fix.smem_start = (unsigned long) | ||
| 132 | (page_to_phys(sg_page(buffer->sgt->sgl)) + offset); | 129 | (page_to_phys(sg_page(buffer->sgt->sgl)) + offset); |
| 130 | else | ||
| 131 | fbi->fix.smem_start = (unsigned long)buffer->dma_addr; | ||
| 132 | |||
| 133 | fbi->screen_size = size; | 133 | fbi->screen_size = size; |
| 134 | fbi->fix.smem_len = size; | 134 | fbi->fix.smem_len = size; |
| 135 | 135 | ||
| @@ -320,7 +320,7 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev, | |||
| 320 | struct exynos_drm_gem_obj *exynos_gem_obj = exynos_fbd->exynos_gem_obj; | 320 | struct exynos_drm_gem_obj *exynos_gem_obj = exynos_fbd->exynos_gem_obj; |
| 321 | struct drm_framebuffer *fb; | 321 | struct drm_framebuffer *fb; |
| 322 | 322 | ||
| 323 | if (exynos_gem_obj->buffer->kvaddr) | 323 | if (is_drm_iommu_supported(dev) && exynos_gem_obj->buffer->kvaddr) |
| 324 | vunmap(exynos_gem_obj->buffer->kvaddr); | 324 | vunmap(exynos_gem_obj->buffer->kvaddr); |
| 325 | 325 | ||
| 326 | /* release drm framebuffer and real buffer */ | 326 | /* release drm framebuffer and real buffer */ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.h b/drivers/gpu/drm/exynos/exynos_drm_fbdev.h index ccfce8a1a451..e16d7f0ae192 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.h +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.h | |||
| @@ -6,24 +6,10 @@ | |||
| 6 | * Joonyoung Shim <jy0922.shim@samsung.com> | 6 | * Joonyoung Shim <jy0922.shim@samsung.com> |
| 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 8 | * | 8 | * |
| 9 | * Permission is hereby granted, free of charge, to any person obtaining a | 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * copy of this software and associated documentation files (the "Software"), | 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * to deal in the Software without restriction, including without limitation | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
| 12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 12 | * option) any later version. |
| 13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 14 | * Software is furnished to do so, subject to the following conditions: | ||
| 15 | * | ||
| 16 | * The above copyright notice and this permission notice (including the next | ||
| 17 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 18 | * Software. | ||
| 19 | * | ||
| 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 23 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 24 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 25 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 26 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 27 | */ | 13 | */ |
| 28 | 14 | ||
| 29 | #ifndef _EXYNOS_DRM_FBDEV_H_ | 15 | #ifndef _EXYNOS_DRM_FBDEV_H_ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c index 61ea24296b52..67a83e69544b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | #include "exynos_drm_fimc.h" | 25 | #include "exynos_drm_fimc.h" |
| 26 | 26 | ||
| 27 | /* | 27 | /* |
| 28 | * FIMC is stand for Fully Interactive Mobile Camera and | 28 | * FIMC stands for Fully Interactive Mobile Camera and |
| 29 | * supports image scaler/rotator and input/output DMA operations. | 29 | * supports image scaler/rotator and input/output DMA operations. |
| 30 | * input DMA reads image data from the memory. | 30 | * input DMA reads image data from the memory. |
| 31 | * output DMA writes image data to memory. | 31 | * output DMA writes image data to memory. |
| @@ -163,19 +163,29 @@ struct fimc_context { | |||
| 163 | bool suspended; | 163 | bool suspended; |
| 164 | }; | 164 | }; |
| 165 | 165 | ||
| 166 | static void fimc_sw_reset(struct fimc_context *ctx, bool pattern) | 166 | static void fimc_sw_reset(struct fimc_context *ctx) |
| 167 | { | 167 | { |
| 168 | u32 cfg; | 168 | u32 cfg; |
| 169 | 169 | ||
| 170 | DRM_DEBUG_KMS("%s:pattern[%d]\n", __func__, pattern); | 170 | DRM_DEBUG_KMS("%s\n", __func__); |
| 171 | |||
| 172 | /* stop dma operation */ | ||
| 173 | cfg = fimc_read(EXYNOS_CISTATUS); | ||
| 174 | if (EXYNOS_CISTATUS_GET_ENVID_STATUS(cfg)) { | ||
| 175 | cfg = fimc_read(EXYNOS_MSCTRL); | ||
| 176 | cfg &= ~EXYNOS_MSCTRL_ENVID; | ||
| 177 | fimc_write(cfg, EXYNOS_MSCTRL); | ||
| 178 | } | ||
| 171 | 179 | ||
| 172 | cfg = fimc_read(EXYNOS_CISRCFMT); | 180 | cfg = fimc_read(EXYNOS_CISRCFMT); |
| 173 | cfg |= EXYNOS_CISRCFMT_ITU601_8BIT; | 181 | cfg |= EXYNOS_CISRCFMT_ITU601_8BIT; |
| 174 | if (pattern) | ||
| 175 | cfg |= EXYNOS_CIGCTRL_TESTPATTERN_COLOR_BAR; | ||
| 176 | |||
| 177 | fimc_write(cfg, EXYNOS_CISRCFMT); | 182 | fimc_write(cfg, EXYNOS_CISRCFMT); |
| 178 | 183 | ||
| 184 | /* disable image capture */ | ||
| 185 | cfg = fimc_read(EXYNOS_CIIMGCPT); | ||
| 186 | cfg &= ~(EXYNOS_CIIMGCPT_IMGCPTEN_SC | EXYNOS_CIIMGCPT_IMGCPTEN); | ||
| 187 | fimc_write(cfg, EXYNOS_CIIMGCPT); | ||
| 188 | |||
| 179 | /* s/w reset */ | 189 | /* s/w reset */ |
| 180 | cfg = fimc_read(EXYNOS_CIGCTRL); | 190 | cfg = fimc_read(EXYNOS_CIGCTRL); |
| 181 | cfg |= (EXYNOS_CIGCTRL_SWRST); | 191 | cfg |= (EXYNOS_CIGCTRL_SWRST); |
| @@ -695,7 +705,7 @@ static int fimc_src_set_addr(struct device *dev, | |||
| 695 | { | 705 | { |
| 696 | struct fimc_context *ctx = get_fimc_context(dev); | 706 | struct fimc_context *ctx = get_fimc_context(dev); |
| 697 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; | 707 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; |
| 698 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; | 708 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node; |
| 699 | struct drm_exynos_ipp_property *property; | 709 | struct drm_exynos_ipp_property *property; |
| 700 | struct drm_exynos_ipp_config *config; | 710 | struct drm_exynos_ipp_config *config; |
| 701 | 711 | ||
| @@ -705,10 +715,6 @@ static int fimc_src_set_addr(struct device *dev, | |||
| 705 | } | 715 | } |
| 706 | 716 | ||
| 707 | property = &c_node->property; | 717 | property = &c_node->property; |
| 708 | if (!property) { | ||
| 709 | DRM_ERROR("failed to get property.\n"); | ||
| 710 | return -EINVAL; | ||
| 711 | } | ||
| 712 | 718 | ||
| 713 | DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, | 719 | DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, |
| 714 | property->prop_id, buf_id, buf_type); | 720 | property->prop_id, buf_id, buf_type); |
| @@ -1206,7 +1212,7 @@ static int fimc_dst_set_buf_seq(struct fimc_context *ctx, u32 buf_id, | |||
| 1206 | } | 1212 | } |
| 1207 | 1213 | ||
| 1208 | /* sequence id */ | 1214 | /* sequence id */ |
| 1209 | cfg &= (~mask); | 1215 | cfg &= ~mask; |
| 1210 | cfg |= (enable << buf_id); | 1216 | cfg |= (enable << buf_id); |
| 1211 | fimc_write(cfg, EXYNOS_CIFCNTSEQ); | 1217 | fimc_write(cfg, EXYNOS_CIFCNTSEQ); |
| 1212 | 1218 | ||
| @@ -1231,7 +1237,7 @@ static int fimc_dst_set_addr(struct device *dev, | |||
| 1231 | { | 1237 | { |
| 1232 | struct fimc_context *ctx = get_fimc_context(dev); | 1238 | struct fimc_context *ctx = get_fimc_context(dev); |
| 1233 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; | 1239 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; |
| 1234 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; | 1240 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node; |
| 1235 | struct drm_exynos_ipp_property *property; | 1241 | struct drm_exynos_ipp_property *property; |
| 1236 | struct drm_exynos_ipp_config *config; | 1242 | struct drm_exynos_ipp_config *config; |
| 1237 | 1243 | ||
| @@ -1241,10 +1247,6 @@ static int fimc_dst_set_addr(struct device *dev, | |||
| 1241 | } | 1247 | } |
| 1242 | 1248 | ||
| 1243 | property = &c_node->property; | 1249 | property = &c_node->property; |
| 1244 | if (!property) { | ||
| 1245 | DRM_ERROR("failed to get property.\n"); | ||
| 1246 | return -EINVAL; | ||
| 1247 | } | ||
| 1248 | 1250 | ||
| 1249 | DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, | 1251 | DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, |
| 1250 | property->prop_id, buf_id, buf_type); | 1252 | property->prop_id, buf_id, buf_type); |
| @@ -1317,7 +1319,7 @@ static irqreturn_t fimc_irq_handler(int irq, void *dev_id) | |||
| 1317 | { | 1319 | { |
| 1318 | struct fimc_context *ctx = dev_id; | 1320 | struct fimc_context *ctx = dev_id; |
| 1319 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; | 1321 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; |
| 1320 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; | 1322 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node; |
| 1321 | struct drm_exynos_ipp_event_work *event_work = | 1323 | struct drm_exynos_ipp_event_work *event_work = |
| 1322 | c_node->event_work; | 1324 | c_node->event_work; |
| 1323 | int buf_id; | 1325 | int buf_id; |
| @@ -1395,6 +1397,7 @@ static inline bool fimc_check_drm_flip(enum drm_exynos_flip flip) | |||
| 1395 | case EXYNOS_DRM_FLIP_NONE: | 1397 | case EXYNOS_DRM_FLIP_NONE: |
| 1396 | case EXYNOS_DRM_FLIP_VERTICAL: | 1398 | case EXYNOS_DRM_FLIP_VERTICAL: |
| 1397 | case EXYNOS_DRM_FLIP_HORIZONTAL: | 1399 | case EXYNOS_DRM_FLIP_HORIZONTAL: |
| 1400 | case EXYNOS_DRM_FLIP_BOTH: | ||
| 1398 | return true; | 1401 | return true; |
| 1399 | default: | 1402 | default: |
| 1400 | DRM_DEBUG_KMS("%s:invalid flip\n", __func__); | 1403 | DRM_DEBUG_KMS("%s:invalid flip\n", __func__); |
| @@ -1543,7 +1546,7 @@ static int fimc_ippdrv_reset(struct device *dev) | |||
| 1543 | DRM_DEBUG_KMS("%s\n", __func__); | 1546 | DRM_DEBUG_KMS("%s\n", __func__); |
| 1544 | 1547 | ||
| 1545 | /* reset h/w block */ | 1548 | /* reset h/w block */ |
| 1546 | fimc_sw_reset(ctx, false); | 1549 | fimc_sw_reset(ctx); |
| 1547 | 1550 | ||
| 1548 | /* reset scaler capability */ | 1551 | /* reset scaler capability */ |
| 1549 | memset(&ctx->sc, 0x0, sizeof(ctx->sc)); | 1552 | memset(&ctx->sc, 0x0, sizeof(ctx->sc)); |
| @@ -1557,7 +1560,7 @@ static int fimc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd) | |||
| 1557 | { | 1560 | { |
| 1558 | struct fimc_context *ctx = get_fimc_context(dev); | 1561 | struct fimc_context *ctx = get_fimc_context(dev); |
| 1559 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; | 1562 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; |
| 1560 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; | 1563 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node; |
| 1561 | struct drm_exynos_ipp_property *property; | 1564 | struct drm_exynos_ipp_property *property; |
| 1562 | struct drm_exynos_ipp_config *config; | 1565 | struct drm_exynos_ipp_config *config; |
| 1563 | struct drm_exynos_pos img_pos[EXYNOS_DRM_OPS_MAX]; | 1566 | struct drm_exynos_pos img_pos[EXYNOS_DRM_OPS_MAX]; |
| @@ -1573,10 +1576,6 @@ static int fimc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd) | |||
| 1573 | } | 1576 | } |
| 1574 | 1577 | ||
| 1575 | property = &c_node->property; | 1578 | property = &c_node->property; |
| 1576 | if (!property) { | ||
| 1577 | DRM_ERROR("failed to get property.\n"); | ||
| 1578 | return -EINVAL; | ||
| 1579 | } | ||
| 1580 | 1579 | ||
| 1581 | fimc_handle_irq(ctx, true, false, true); | 1580 | fimc_handle_irq(ctx, true, false, true); |
| 1582 | 1581 | ||
| @@ -1714,7 +1713,7 @@ static void fimc_ippdrv_stop(struct device *dev, enum drm_exynos_ipp_cmd cmd) | |||
| 1714 | fimc_write(cfg, EXYNOS_CIGCTRL); | 1713 | fimc_write(cfg, EXYNOS_CIGCTRL); |
| 1715 | } | 1714 | } |
| 1716 | 1715 | ||
| 1717 | static int __devinit fimc_probe(struct platform_device *pdev) | 1716 | static int fimc_probe(struct platform_device *pdev) |
| 1718 | { | 1717 | { |
| 1719 | struct device *dev = &pdev->dev; | 1718 | struct device *dev = &pdev->dev; |
| 1720 | struct fimc_context *ctx; | 1719 | struct fimc_context *ctx; |
| @@ -1739,93 +1738,64 @@ static int __devinit fimc_probe(struct platform_device *pdev) | |||
| 1739 | platform_get_device_id(pdev)->driver_data; | 1738 | platform_get_device_id(pdev)->driver_data; |
| 1740 | 1739 | ||
| 1741 | /* clock control */ | 1740 | /* clock control */ |
| 1742 | ctx->sclk_fimc_clk = clk_get(dev, "sclk_fimc"); | 1741 | ctx->sclk_fimc_clk = devm_clk_get(dev, "sclk_fimc"); |
| 1743 | if (IS_ERR(ctx->sclk_fimc_clk)) { | 1742 | if (IS_ERR(ctx->sclk_fimc_clk)) { |
| 1744 | dev_err(dev, "failed to get src fimc clock.\n"); | 1743 | dev_err(dev, "failed to get src fimc clock.\n"); |
| 1745 | ret = PTR_ERR(ctx->sclk_fimc_clk); | 1744 | return PTR_ERR(ctx->sclk_fimc_clk); |
| 1746 | goto err_ctx; | ||
| 1747 | } | 1745 | } |
| 1748 | clk_enable(ctx->sclk_fimc_clk); | 1746 | clk_enable(ctx->sclk_fimc_clk); |
| 1749 | 1747 | ||
| 1750 | ctx->fimc_clk = clk_get(dev, "fimc"); | 1748 | ctx->fimc_clk = devm_clk_get(dev, "fimc"); |
| 1751 | if (IS_ERR(ctx->fimc_clk)) { | 1749 | if (IS_ERR(ctx->fimc_clk)) { |
| 1752 | dev_err(dev, "failed to get fimc clock.\n"); | 1750 | dev_err(dev, "failed to get fimc clock.\n"); |
| 1753 | ret = PTR_ERR(ctx->fimc_clk); | ||
| 1754 | clk_disable(ctx->sclk_fimc_clk); | 1751 | clk_disable(ctx->sclk_fimc_clk); |
| 1755 | clk_put(ctx->sclk_fimc_clk); | 1752 | return PTR_ERR(ctx->fimc_clk); |
| 1756 | goto err_ctx; | ||
| 1757 | } | 1753 | } |
| 1758 | 1754 | ||
| 1759 | ctx->wb_clk = clk_get(dev, "pxl_async0"); | 1755 | ctx->wb_clk = devm_clk_get(dev, "pxl_async0"); |
| 1760 | if (IS_ERR(ctx->wb_clk)) { | 1756 | if (IS_ERR(ctx->wb_clk)) { |
| 1761 | dev_err(dev, "failed to get writeback a clock.\n"); | 1757 | dev_err(dev, "failed to get writeback a clock.\n"); |
| 1762 | ret = PTR_ERR(ctx->wb_clk); | ||
| 1763 | clk_disable(ctx->sclk_fimc_clk); | 1758 | clk_disable(ctx->sclk_fimc_clk); |
| 1764 | clk_put(ctx->sclk_fimc_clk); | 1759 | return PTR_ERR(ctx->wb_clk); |
| 1765 | clk_put(ctx->fimc_clk); | ||
| 1766 | goto err_ctx; | ||
| 1767 | } | 1760 | } |
| 1768 | 1761 | ||
| 1769 | ctx->wb_b_clk = clk_get(dev, "pxl_async1"); | 1762 | ctx->wb_b_clk = devm_clk_get(dev, "pxl_async1"); |
| 1770 | if (IS_ERR(ctx->wb_b_clk)) { | 1763 | if (IS_ERR(ctx->wb_b_clk)) { |
| 1771 | dev_err(dev, "failed to get writeback b clock.\n"); | 1764 | dev_err(dev, "failed to get writeback b clock.\n"); |
| 1772 | ret = PTR_ERR(ctx->wb_b_clk); | ||
| 1773 | clk_disable(ctx->sclk_fimc_clk); | 1765 | clk_disable(ctx->sclk_fimc_clk); |
| 1774 | clk_put(ctx->sclk_fimc_clk); | 1766 | return PTR_ERR(ctx->wb_b_clk); |
| 1775 | clk_put(ctx->fimc_clk); | ||
| 1776 | clk_put(ctx->wb_clk); | ||
| 1777 | goto err_ctx; | ||
| 1778 | } | 1767 | } |
| 1779 | 1768 | ||
| 1780 | parent_clk = clk_get(dev, ddata->parent_clk); | 1769 | parent_clk = devm_clk_get(dev, ddata->parent_clk); |
| 1781 | 1770 | ||
| 1782 | if (IS_ERR(parent_clk)) { | 1771 | if (IS_ERR(parent_clk)) { |
| 1783 | dev_err(dev, "failed to get parent clock.\n"); | 1772 | dev_err(dev, "failed to get parent clock.\n"); |
| 1784 | ret = PTR_ERR(parent_clk); | ||
| 1785 | clk_disable(ctx->sclk_fimc_clk); | 1773 | clk_disable(ctx->sclk_fimc_clk); |
| 1786 | clk_put(ctx->sclk_fimc_clk); | 1774 | return PTR_ERR(parent_clk); |
| 1787 | clk_put(ctx->fimc_clk); | ||
| 1788 | clk_put(ctx->wb_clk); | ||
| 1789 | clk_put(ctx->wb_b_clk); | ||
| 1790 | goto err_ctx; | ||
| 1791 | } | 1775 | } |
| 1792 | 1776 | ||
| 1793 | if (clk_set_parent(ctx->sclk_fimc_clk, parent_clk)) { | 1777 | if (clk_set_parent(ctx->sclk_fimc_clk, parent_clk)) { |
| 1794 | dev_err(dev, "failed to set parent.\n"); | 1778 | dev_err(dev, "failed to set parent.\n"); |
| 1795 | ret = -EINVAL; | ||
| 1796 | clk_put(parent_clk); | ||
| 1797 | clk_disable(ctx->sclk_fimc_clk); | 1779 | clk_disable(ctx->sclk_fimc_clk); |
| 1798 | clk_put(ctx->sclk_fimc_clk); | 1780 | return -EINVAL; |
| 1799 | clk_put(ctx->fimc_clk); | ||
| 1800 | clk_put(ctx->wb_clk); | ||
| 1801 | clk_put(ctx->wb_b_clk); | ||
| 1802 | goto err_ctx; | ||
| 1803 | } | 1781 | } |
| 1804 | 1782 | ||
| 1805 | clk_put(parent_clk); | 1783 | devm_clk_put(dev, parent_clk); |
| 1806 | clk_set_rate(ctx->sclk_fimc_clk, pdata->clk_rate); | 1784 | clk_set_rate(ctx->sclk_fimc_clk, pdata->clk_rate); |
| 1807 | 1785 | ||
| 1808 | /* resource memory */ | 1786 | /* resource memory */ |
| 1809 | ctx->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1787 | ctx->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 1810 | if (!ctx->regs_res) { | ||
| 1811 | dev_err(dev, "failed to find registers.\n"); | ||
| 1812 | ret = -ENOENT; | ||
| 1813 | goto err_clk; | ||
| 1814 | } | ||
| 1815 | |||
| 1816 | ctx->regs = devm_request_and_ioremap(dev, ctx->regs_res); | 1788 | ctx->regs = devm_request_and_ioremap(dev, ctx->regs_res); |
| 1817 | if (!ctx->regs) { | 1789 | if (!ctx->regs) { |
| 1818 | dev_err(dev, "failed to map registers.\n"); | 1790 | dev_err(dev, "failed to map registers.\n"); |
| 1819 | ret = -ENXIO; | 1791 | return -ENXIO; |
| 1820 | goto err_clk; | ||
| 1821 | } | 1792 | } |
| 1822 | 1793 | ||
| 1823 | /* resource irq */ | 1794 | /* resource irq */ |
| 1824 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 1795 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
| 1825 | if (!res) { | 1796 | if (!res) { |
| 1826 | dev_err(dev, "failed to request irq resource.\n"); | 1797 | dev_err(dev, "failed to request irq resource.\n"); |
| 1827 | ret = -ENOENT; | 1798 | return -ENOENT; |
| 1828 | goto err_get_regs; | ||
| 1829 | } | 1799 | } |
| 1830 | 1800 | ||
| 1831 | ctx->irq = res->start; | 1801 | ctx->irq = res->start; |
| @@ -1833,7 +1803,7 @@ static int __devinit fimc_probe(struct platform_device *pdev) | |||
| 1833 | IRQF_ONESHOT, "drm_fimc", ctx); | 1803 | IRQF_ONESHOT, "drm_fimc", ctx); |
| 1834 | if (ret < 0) { | 1804 | if (ret < 0) { |
| 1835 | dev_err(dev, "failed to request irq.\n"); | 1805 | dev_err(dev, "failed to request irq.\n"); |
| 1836 | goto err_get_regs; | 1806 | return ret; |
| 1837 | } | 1807 | } |
| 1838 | 1808 | ||
| 1839 | /* context initailization */ | 1809 | /* context initailization */ |
| @@ -1879,19 +1849,11 @@ err_ippdrv_register: | |||
| 1879 | pm_runtime_disable(dev); | 1849 | pm_runtime_disable(dev); |
| 1880 | err_get_irq: | 1850 | err_get_irq: |
| 1881 | free_irq(ctx->irq, ctx); | 1851 | free_irq(ctx->irq, ctx); |
| 1882 | err_get_regs: | 1852 | |
| 1883 | devm_iounmap(dev, ctx->regs); | ||
| 1884 | err_clk: | ||
| 1885 | clk_put(ctx->sclk_fimc_clk); | ||
| 1886 | clk_put(ctx->fimc_clk); | ||
| 1887 | clk_put(ctx->wb_clk); | ||
| 1888 | clk_put(ctx->wb_b_clk); | ||
| 1889 | err_ctx: | ||
| 1890 | devm_kfree(dev, ctx); | ||
| 1891 | return ret; | 1853 | return ret; |
| 1892 | } | 1854 | } |
| 1893 | 1855 | ||
| 1894 | static int __devexit fimc_remove(struct platform_device *pdev) | 1856 | static int fimc_remove(struct platform_device *pdev) |
| 1895 | { | 1857 | { |
| 1896 | struct device *dev = &pdev->dev; | 1858 | struct device *dev = &pdev->dev; |
| 1897 | struct fimc_context *ctx = get_fimc_context(dev); | 1859 | struct fimc_context *ctx = get_fimc_context(dev); |
| @@ -1905,14 +1867,6 @@ static int __devexit fimc_remove(struct platform_device *pdev) | |||
| 1905 | pm_runtime_disable(dev); | 1867 | pm_runtime_disable(dev); |
| 1906 | 1868 | ||
| 1907 | free_irq(ctx->irq, ctx); | 1869 | free_irq(ctx->irq, ctx); |
| 1908 | devm_iounmap(dev, ctx->regs); | ||
| 1909 | |||
| 1910 | clk_put(ctx->sclk_fimc_clk); | ||
| 1911 | clk_put(ctx->fimc_clk); | ||
| 1912 | clk_put(ctx->wb_clk); | ||
| 1913 | clk_put(ctx->wb_b_clk); | ||
| 1914 | |||
| 1915 | devm_kfree(dev, ctx); | ||
| 1916 | 1870 | ||
| 1917 | return 0; | 1871 | return 0; |
| 1918 | } | 1872 | } |
| @@ -1990,7 +1944,7 @@ static const struct dev_pm_ops fimc_pm_ops = { | |||
| 1990 | 1944 | ||
| 1991 | struct platform_driver fimc_driver = { | 1945 | struct platform_driver fimc_driver = { |
| 1992 | .probe = fimc_probe, | 1946 | .probe = fimc_probe, |
| 1993 | .remove = __devexit_p(fimc_remove), | 1947 | .remove = fimc_remove, |
| 1994 | .id_table = fimc_driver_ids, | 1948 | .id_table = fimc_driver_ids, |
| 1995 | .driver = { | 1949 | .driver = { |
| 1996 | .name = "exynos-drm-fimc", | 1950 | .name = "exynos-drm-fimc", |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.h b/drivers/gpu/drm/exynos/exynos_drm_fimc.h index dc970fa0d888..127a424c5fdf 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimc.h +++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.h | |||
| @@ -6,24 +6,10 @@ | |||
| 6 | * Jinyoung Jeon <jy0.jeon@samsung.com> | 6 | * Jinyoung Jeon <jy0.jeon@samsung.com> |
| 7 | * Sangmin Lee <lsmin.lee@samsung.com> | 7 | * Sangmin Lee <lsmin.lee@samsung.com> |
| 8 | * | 8 | * |
| 9 | * Permission is hereby granted, free of charge, to any person obtaining a | 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * copy of this software and associated documentation files (the "Software"), | 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * to deal in the Software without restriction, including without limitation | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
| 12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 12 | * option) any later version. |
| 13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 14 | * Software is furnished to do so, subject to the following conditions: | ||
| 15 | * | ||
| 16 | * The above copyright notice and this permission notice (including the next | ||
| 17 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 18 | * Software. | ||
| 19 | * | ||
| 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 23 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 24 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 25 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 26 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 27 | */ | 13 | */ |
| 28 | 14 | ||
| 29 | #ifndef _EXYNOS_DRM_FIMC_H_ | 15 | #ifndef _EXYNOS_DRM_FIMC_H_ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index bf0d9baca2bc..9537761931ee 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c | |||
| @@ -663,34 +663,6 @@ static struct exynos_drm_manager fimd_manager = { | |||
| 663 | .display_ops = &fimd_display_ops, | 663 | .display_ops = &fimd_display_ops, |
| 664 | }; | 664 | }; |
| 665 | 665 | ||
| 666 | static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc) | ||
| 667 | { | ||
| 668 | struct exynos_drm_private *dev_priv = drm_dev->dev_private; | ||
| 669 | struct drm_pending_vblank_event *e, *t; | ||
| 670 | struct timeval now; | ||
| 671 | unsigned long flags; | ||
| 672 | |||
| 673 | spin_lock_irqsave(&drm_dev->event_lock, flags); | ||
| 674 | |||
| 675 | list_for_each_entry_safe(e, t, &dev_priv->pageflip_event_list, | ||
| 676 | base.link) { | ||
| 677 | /* if event's pipe isn't same as crtc then ignore it. */ | ||
| 678 | if (crtc != e->pipe) | ||
| 679 | continue; | ||
| 680 | |||
| 681 | do_gettimeofday(&now); | ||
| 682 | e->event.sequence = 0; | ||
| 683 | e->event.tv_sec = now.tv_sec; | ||
| 684 | e->event.tv_usec = now.tv_usec; | ||
| 685 | |||
| 686 | list_move_tail(&e->base.link, &e->base.file_priv->event_list); | ||
| 687 | wake_up_interruptible(&e->base.file_priv->event_wait); | ||
| 688 | drm_vblank_put(drm_dev, crtc); | ||
| 689 | } | ||
| 690 | |||
| 691 | spin_unlock_irqrestore(&drm_dev->event_lock, flags); | ||
| 692 | } | ||
| 693 | |||
| 694 | static irqreturn_t fimd_irq_handler(int irq, void *dev_id) | 666 | static irqreturn_t fimd_irq_handler(int irq, void *dev_id) |
| 695 | { | 667 | { |
| 696 | struct fimd_context *ctx = (struct fimd_context *)dev_id; | 668 | struct fimd_context *ctx = (struct fimd_context *)dev_id; |
| @@ -710,7 +682,7 @@ static irqreturn_t fimd_irq_handler(int irq, void *dev_id) | |||
| 710 | goto out; | 682 | goto out; |
| 711 | 683 | ||
| 712 | drm_handle_vblank(drm_dev, manager->pipe); | 684 | drm_handle_vblank(drm_dev, manager->pipe); |
| 713 | fimd_finish_pageflip(drm_dev, manager->pipe); | 685 | exynos_drm_crtc_finish_pageflip(drm_dev, manager->pipe); |
| 714 | 686 | ||
| 715 | /* set wait vsync event to zero and wake up queue. */ | 687 | /* set wait vsync event to zero and wake up queue. */ |
| 716 | if (atomic_read(&ctx->wait_vsync_event)) { | 688 | if (atomic_read(&ctx->wait_vsync_event)) { |
| @@ -898,7 +870,7 @@ static int fimd_activate(struct fimd_context *ctx, bool enable) | |||
| 898 | return 0; | 870 | return 0; |
| 899 | } | 871 | } |
| 900 | 872 | ||
| 901 | static int __devinit fimd_probe(struct platform_device *pdev) | 873 | static int fimd_probe(struct platform_device *pdev) |
| 902 | { | 874 | { |
| 903 | struct device *dev = &pdev->dev; | 875 | struct device *dev = &pdev->dev; |
| 904 | struct fimd_context *ctx; | 876 | struct fimd_context *ctx; |
| @@ -997,7 +969,7 @@ static int __devinit fimd_probe(struct platform_device *pdev) | |||
| 997 | return 0; | 969 | return 0; |
| 998 | } | 970 | } |
| 999 | 971 | ||
| 1000 | static int __devexit fimd_remove(struct platform_device *pdev) | 972 | static int fimd_remove(struct platform_device *pdev) |
| 1001 | { | 973 | { |
| 1002 | struct device *dev = &pdev->dev; | 974 | struct device *dev = &pdev->dev; |
| 1003 | struct fimd_context *ctx = platform_get_drvdata(pdev); | 975 | struct fimd_context *ctx = platform_get_drvdata(pdev); |
| @@ -1046,7 +1018,7 @@ static int fimd_resume(struct device *dev) | |||
| 1046 | * of pm runtime would still be 1 so in this case, fimd driver | 1018 | * of pm runtime would still be 1 so in this case, fimd driver |
| 1047 | * should be on directly not drawing on pm runtime interface. | 1019 | * should be on directly not drawing on pm runtime interface. |
| 1048 | */ | 1020 | */ |
| 1049 | if (pm_runtime_suspended(dev)) { | 1021 | if (!pm_runtime_suspended(dev)) { |
| 1050 | int ret; | 1022 | int ret; |
| 1051 | 1023 | ||
| 1052 | ret = fimd_activate(ctx, true); | 1024 | ret = fimd_activate(ctx, true); |
| @@ -1105,7 +1077,7 @@ static const struct dev_pm_ops fimd_pm_ops = { | |||
| 1105 | 1077 | ||
| 1106 | struct platform_driver fimd_driver = { | 1078 | struct platform_driver fimd_driver = { |
| 1107 | .probe = fimd_probe, | 1079 | .probe = fimd_probe, |
| 1108 | .remove = __devexit_p(fimd_remove), | 1080 | .remove = fimd_remove, |
| 1109 | .id_table = fimd_driver_ids, | 1081 | .id_table = fimd_driver_ids, |
| 1110 | .driver = { | 1082 | .driver = { |
| 1111 | .name = "exynos4-fb", | 1083 | .name = "exynos4-fb", |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index 6ffa0763c078..36c3905536a6 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c | |||
| @@ -1090,7 +1090,7 @@ static void g2d_close(struct drm_device *drm_dev, struct device *dev, | |||
| 1090 | kfree(file_priv->g2d_priv); | 1090 | kfree(file_priv->g2d_priv); |
| 1091 | } | 1091 | } |
| 1092 | 1092 | ||
| 1093 | static int __devinit g2d_probe(struct platform_device *pdev) | 1093 | static int g2d_probe(struct platform_device *pdev) |
| 1094 | { | 1094 | { |
| 1095 | struct device *dev = &pdev->dev; | 1095 | struct device *dev = &pdev->dev; |
| 1096 | struct resource *res; | 1096 | struct resource *res; |
| @@ -1188,7 +1188,7 @@ err_destroy_slab: | |||
| 1188 | return ret; | 1188 | return ret; |
| 1189 | } | 1189 | } |
| 1190 | 1190 | ||
| 1191 | static int __devexit g2d_remove(struct platform_device *pdev) | 1191 | static int g2d_remove(struct platform_device *pdev) |
| 1192 | { | 1192 | { |
| 1193 | struct g2d_data *g2d = platform_get_drvdata(pdev); | 1193 | struct g2d_data *g2d = platform_get_drvdata(pdev); |
| 1194 | 1194 | ||
| @@ -1242,7 +1242,7 @@ static SIMPLE_DEV_PM_OPS(g2d_pm_ops, g2d_suspend, g2d_resume); | |||
| 1242 | 1242 | ||
| 1243 | struct platform_driver g2d_driver = { | 1243 | struct platform_driver g2d_driver = { |
| 1244 | .probe = g2d_probe, | 1244 | .probe = g2d_probe, |
| 1245 | .remove = __devexit_p(g2d_remove), | 1245 | .remove = g2d_remove, |
| 1246 | .driver = { | 1246 | .driver = { |
| 1247 | .name = "s5p-g2d", | 1247 | .name = "s5p-g2d", |
| 1248 | .owner = THIS_MODULE, | 1248 | .owner = THIS_MODULE, |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c index d48183e7e056..473180776528 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c | |||
| @@ -3,24 +3,10 @@ | |||
| 3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | 3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. |
| 4 | * Author: Inki Dae <inki.dae@samsung.com> | 4 | * Author: Inki Dae <inki.dae@samsung.com> |
| 5 | * | 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * copy of this software and associated documentation files (the "Software"), | 7 | * under the terms of the GNU General Public License as published by the |
| 8 | * to deal in the Software without restriction, including without limitation | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 9 | * option) any later version. |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 11 | * Software is furnished to do so, subject to the following conditions: | ||
| 12 | * | ||
| 13 | * The above copyright notice and this permission notice (including the next | ||
| 14 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 15 | * Software. | ||
| 16 | * | ||
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 20 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 23 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 24 | */ | 10 | */ |
| 25 | 11 | ||
| 26 | #include <drm/drmP.h> | 12 | #include <drm/drmP.h> |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.h b/drivers/gpu/drm/exynos/exynos_drm_gem.h index f11f2afd5bfc..35ebac47dc2b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.h +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.h | |||
| @@ -3,24 +3,10 @@ | |||
| 3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | 3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. |
| 4 | * Authoer: Inki Dae <inki.dae@samsung.com> | 4 | * Authoer: Inki Dae <inki.dae@samsung.com> |
| 5 | * | 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * copy of this software and associated documentation files (the "Software"), | 7 | * under the terms of the GNU General Public License as published by the |
| 8 | * to deal in the Software without restriction, including without limitation | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 9 | * option) any later version. |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 11 | * Software is furnished to do so, subject to the following conditions: | ||
| 12 | * | ||
| 13 | * The above copyright notice and this permission notice (including the next | ||
| 14 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 15 | * Software. | ||
| 16 | * | ||
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 20 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 23 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 24 | */ | 10 | */ |
| 25 | 11 | ||
| 26 | #ifndef _EXYNOS_DRM_GEM_H_ | 12 | #ifndef _EXYNOS_DRM_GEM_H_ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c index 5639353d47b9..8140753ec9c8 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | #include "exynos_drm_gsc.h" | 25 | #include "exynos_drm_gsc.h" |
| 26 | 26 | ||
| 27 | /* | 27 | /* |
| 28 | * GSC is stand for General SCaler and | 28 | * GSC stands for General SCaler and |
| 29 | * supports image scaler/rotator and input/output DMA operations. | 29 | * supports image scaler/rotator and input/output DMA operations. |
| 30 | * input DMA reads image data from the memory. | 30 | * input DMA reads image data from the memory. |
| 31 | * output DMA writes image data to memory. | 31 | * output DMA writes image data to memory. |
| @@ -711,7 +711,7 @@ static int gsc_src_set_addr(struct device *dev, | |||
| 711 | { | 711 | { |
| 712 | struct gsc_context *ctx = get_gsc_context(dev); | 712 | struct gsc_context *ctx = get_gsc_context(dev); |
| 713 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; | 713 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; |
| 714 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; | 714 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node; |
| 715 | struct drm_exynos_ipp_property *property; | 715 | struct drm_exynos_ipp_property *property; |
| 716 | 716 | ||
| 717 | if (!c_node) { | 717 | if (!c_node) { |
| @@ -720,10 +720,6 @@ static int gsc_src_set_addr(struct device *dev, | |||
| 720 | } | 720 | } |
| 721 | 721 | ||
| 722 | property = &c_node->property; | 722 | property = &c_node->property; |
| 723 | if (!property) { | ||
| 724 | DRM_ERROR("failed to get property.\n"); | ||
| 725 | return -EFAULT; | ||
| 726 | } | ||
| 727 | 723 | ||
| 728 | DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, | 724 | DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, |
| 729 | property->prop_id, buf_id, buf_type); | 725 | property->prop_id, buf_id, buf_type); |
| @@ -1171,7 +1167,7 @@ static int gsc_dst_set_addr(struct device *dev, | |||
| 1171 | { | 1167 | { |
| 1172 | struct gsc_context *ctx = get_gsc_context(dev); | 1168 | struct gsc_context *ctx = get_gsc_context(dev); |
| 1173 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; | 1169 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; |
| 1174 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; | 1170 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node; |
| 1175 | struct drm_exynos_ipp_property *property; | 1171 | struct drm_exynos_ipp_property *property; |
| 1176 | 1172 | ||
| 1177 | if (!c_node) { | 1173 | if (!c_node) { |
| @@ -1180,10 +1176,6 @@ static int gsc_dst_set_addr(struct device *dev, | |||
| 1180 | } | 1176 | } |
| 1181 | 1177 | ||
| 1182 | property = &c_node->property; | 1178 | property = &c_node->property; |
| 1183 | if (!property) { | ||
| 1184 | DRM_ERROR("failed to get property.\n"); | ||
| 1185 | return -EFAULT; | ||
| 1186 | } | ||
| 1187 | 1179 | ||
| 1188 | DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, | 1180 | DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, |
| 1189 | property->prop_id, buf_id, buf_type); | 1181 | property->prop_id, buf_id, buf_type); |
| @@ -1312,7 +1304,7 @@ static irqreturn_t gsc_irq_handler(int irq, void *dev_id) | |||
| 1312 | { | 1304 | { |
| 1313 | struct gsc_context *ctx = dev_id; | 1305 | struct gsc_context *ctx = dev_id; |
| 1314 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; | 1306 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; |
| 1315 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; | 1307 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node; |
| 1316 | struct drm_exynos_ipp_event_work *event_work = | 1308 | struct drm_exynos_ipp_event_work *event_work = |
| 1317 | c_node->event_work; | 1309 | c_node->event_work; |
| 1318 | u32 status; | 1310 | u32 status; |
| @@ -1399,7 +1391,7 @@ static inline bool gsc_check_drm_flip(enum drm_exynos_flip flip) | |||
| 1399 | case EXYNOS_DRM_FLIP_NONE: | 1391 | case EXYNOS_DRM_FLIP_NONE: |
| 1400 | case EXYNOS_DRM_FLIP_VERTICAL: | 1392 | case EXYNOS_DRM_FLIP_VERTICAL: |
| 1401 | case EXYNOS_DRM_FLIP_HORIZONTAL: | 1393 | case EXYNOS_DRM_FLIP_HORIZONTAL: |
| 1402 | case EXYNOS_DRM_FLIP_VERTICAL | EXYNOS_DRM_FLIP_HORIZONTAL: | 1394 | case EXYNOS_DRM_FLIP_BOTH: |
| 1403 | return true; | 1395 | return true; |
| 1404 | default: | 1396 | default: |
| 1405 | DRM_DEBUG_KMS("%s:invalid flip\n", __func__); | 1397 | DRM_DEBUG_KMS("%s:invalid flip\n", __func__); |
| @@ -1549,7 +1541,7 @@ static int gsc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd) | |||
| 1549 | { | 1541 | { |
| 1550 | struct gsc_context *ctx = get_gsc_context(dev); | 1542 | struct gsc_context *ctx = get_gsc_context(dev); |
| 1551 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; | 1543 | struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; |
| 1552 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; | 1544 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node; |
| 1553 | struct drm_exynos_ipp_property *property; | 1545 | struct drm_exynos_ipp_property *property; |
| 1554 | struct drm_exynos_ipp_config *config; | 1546 | struct drm_exynos_ipp_config *config; |
| 1555 | struct drm_exynos_pos img_pos[EXYNOS_DRM_OPS_MAX]; | 1547 | struct drm_exynos_pos img_pos[EXYNOS_DRM_OPS_MAX]; |
| @@ -1565,10 +1557,6 @@ static int gsc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd) | |||
| 1565 | } | 1557 | } |
| 1566 | 1558 | ||
| 1567 | property = &c_node->property; | 1559 | property = &c_node->property; |
| 1568 | if (!property) { | ||
| 1569 | DRM_ERROR("failed to get property.\n"); | ||
| 1570 | return -EINVAL; | ||
| 1571 | } | ||
| 1572 | 1560 | ||
| 1573 | gsc_handle_irq(ctx, true, false, true); | 1561 | gsc_handle_irq(ctx, true, false, true); |
| 1574 | 1562 | ||
| @@ -1604,7 +1592,7 @@ static int gsc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd) | |||
| 1604 | exynos_drm_ippnb_send_event(IPP_SET_WRITEBACK, (void *)&set_wb); | 1592 | exynos_drm_ippnb_send_event(IPP_SET_WRITEBACK, (void *)&set_wb); |
| 1605 | 1593 | ||
| 1606 | /* src local path */ | 1594 | /* src local path */ |
| 1607 | cfg = readl(GSC_IN_CON); | 1595 | cfg = gsc_read(GSC_IN_CON); |
| 1608 | cfg &= ~(GSC_IN_PATH_MASK | GSC_IN_LOCAL_SEL_MASK); | 1596 | cfg &= ~(GSC_IN_PATH_MASK | GSC_IN_LOCAL_SEL_MASK); |
| 1609 | cfg |= (GSC_IN_PATH_LOCAL | GSC_IN_LOCAL_FIMD_WB); | 1597 | cfg |= (GSC_IN_PATH_LOCAL | GSC_IN_LOCAL_FIMD_WB); |
| 1610 | gsc_write(cfg, GSC_IN_CON); | 1598 | gsc_write(cfg, GSC_IN_CON); |
| @@ -1683,7 +1671,7 @@ static void gsc_ippdrv_stop(struct device *dev, enum drm_exynos_ipp_cmd cmd) | |||
| 1683 | gsc_write(cfg, GSC_ENABLE); | 1671 | gsc_write(cfg, GSC_ENABLE); |
| 1684 | } | 1672 | } |
| 1685 | 1673 | ||
| 1686 | static int __devinit gsc_probe(struct platform_device *pdev) | 1674 | static int gsc_probe(struct platform_device *pdev) |
| 1687 | { | 1675 | { |
| 1688 | struct device *dev = &pdev->dev; | 1676 | struct device *dev = &pdev->dev; |
| 1689 | struct gsc_context *ctx; | 1677 | struct gsc_context *ctx; |
| @@ -1696,34 +1684,25 @@ static int __devinit gsc_probe(struct platform_device *pdev) | |||
| 1696 | return -ENOMEM; | 1684 | return -ENOMEM; |
| 1697 | 1685 | ||
| 1698 | /* clock control */ | 1686 | /* clock control */ |
| 1699 | ctx->gsc_clk = clk_get(dev, "gscl"); | 1687 | ctx->gsc_clk = devm_clk_get(dev, "gscl"); |
| 1700 | if (IS_ERR(ctx->gsc_clk)) { | 1688 | if (IS_ERR(ctx->gsc_clk)) { |
| 1701 | dev_err(dev, "failed to get gsc clock.\n"); | 1689 | dev_err(dev, "failed to get gsc clock.\n"); |
| 1702 | ret = PTR_ERR(ctx->gsc_clk); | 1690 | return PTR_ERR(ctx->gsc_clk); |
| 1703 | goto err_ctx; | ||
| 1704 | } | 1691 | } |
| 1705 | 1692 | ||
| 1706 | /* resource memory */ | 1693 | /* resource memory */ |
| 1707 | ctx->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1694 | ctx->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 1708 | if (!ctx->regs_res) { | ||
| 1709 | dev_err(dev, "failed to find registers.\n"); | ||
| 1710 | ret = -ENOENT; | ||
| 1711 | goto err_clk; | ||
| 1712 | } | ||
| 1713 | |||
| 1714 | ctx->regs = devm_request_and_ioremap(dev, ctx->regs_res); | 1695 | ctx->regs = devm_request_and_ioremap(dev, ctx->regs_res); |
| 1715 | if (!ctx->regs) { | 1696 | if (!ctx->regs) { |
| 1716 | dev_err(dev, "failed to map registers.\n"); | 1697 | dev_err(dev, "failed to map registers.\n"); |
| 1717 | ret = -ENXIO; | 1698 | return -ENXIO; |
| 1718 | goto err_clk; | ||
| 1719 | } | 1699 | } |
| 1720 | 1700 | ||
| 1721 | /* resource irq */ | 1701 | /* resource irq */ |
| 1722 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 1702 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
| 1723 | if (!res) { | 1703 | if (!res) { |
| 1724 | dev_err(dev, "failed to request irq resource.\n"); | 1704 | dev_err(dev, "failed to request irq resource.\n"); |
| 1725 | ret = -ENOENT; | 1705 | return -ENOENT; |
| 1726 | goto err_get_regs; | ||
| 1727 | } | 1706 | } |
| 1728 | 1707 | ||
| 1729 | ctx->irq = res->start; | 1708 | ctx->irq = res->start; |
| @@ -1731,7 +1710,7 @@ static int __devinit gsc_probe(struct platform_device *pdev) | |||
| 1731 | IRQF_ONESHOT, "drm_gsc", ctx); | 1710 | IRQF_ONESHOT, "drm_gsc", ctx); |
| 1732 | if (ret < 0) { | 1711 | if (ret < 0) { |
| 1733 | dev_err(dev, "failed to request irq.\n"); | 1712 | dev_err(dev, "failed to request irq.\n"); |
| 1734 | goto err_get_regs; | 1713 | return ret; |
| 1735 | } | 1714 | } |
| 1736 | 1715 | ||
| 1737 | /* context initailization */ | 1716 | /* context initailization */ |
| @@ -1775,16 +1754,10 @@ err_ippdrv_register: | |||
| 1775 | pm_runtime_disable(dev); | 1754 | pm_runtime_disable(dev); |
| 1776 | err_get_irq: | 1755 | err_get_irq: |
| 1777 | free_irq(ctx->irq, ctx); | 1756 | free_irq(ctx->irq, ctx); |
| 1778 | err_get_regs: | ||
| 1779 | devm_iounmap(dev, ctx->regs); | ||
| 1780 | err_clk: | ||
| 1781 | clk_put(ctx->gsc_clk); | ||
| 1782 | err_ctx: | ||
| 1783 | devm_kfree(dev, ctx); | ||
| 1784 | return ret; | 1757 | return ret; |
| 1785 | } | 1758 | } |
| 1786 | 1759 | ||
| 1787 | static int __devexit gsc_remove(struct platform_device *pdev) | 1760 | static int gsc_remove(struct platform_device *pdev) |
| 1788 | { | 1761 | { |
| 1789 | struct device *dev = &pdev->dev; | 1762 | struct device *dev = &pdev->dev; |
| 1790 | struct gsc_context *ctx = get_gsc_context(dev); | 1763 | struct gsc_context *ctx = get_gsc_context(dev); |
| @@ -1798,11 +1771,6 @@ static int __devexit gsc_remove(struct platform_device *pdev) | |||
| 1798 | pm_runtime_disable(dev); | 1771 | pm_runtime_disable(dev); |
| 1799 | 1772 | ||
| 1800 | free_irq(ctx->irq, ctx); | 1773 | free_irq(ctx->irq, ctx); |
| 1801 | devm_iounmap(dev, ctx->regs); | ||
| 1802 | |||
| 1803 | clk_put(ctx->gsc_clk); | ||
| 1804 | |||
| 1805 | devm_kfree(dev, ctx); | ||
| 1806 | 1774 | ||
| 1807 | return 0; | 1775 | return 0; |
| 1808 | } | 1776 | } |
| @@ -1860,7 +1828,7 @@ static const struct dev_pm_ops gsc_pm_ops = { | |||
| 1860 | 1828 | ||
| 1861 | struct platform_driver gsc_driver = { | 1829 | struct platform_driver gsc_driver = { |
| 1862 | .probe = gsc_probe, | 1830 | .probe = gsc_probe, |
| 1863 | .remove = __devexit_p(gsc_remove), | 1831 | .remove = gsc_remove, |
| 1864 | .driver = { | 1832 | .driver = { |
| 1865 | .name = "exynos-drm-gsc", | 1833 | .name = "exynos-drm-gsc", |
| 1866 | .owner = THIS_MODULE, | 1834 | .owner = THIS_MODULE, |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.h b/drivers/gpu/drm/exynos/exynos_drm_gsc.h index b3c3bc618c0f..29ec1c5efcf2 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gsc.h +++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.h | |||
| @@ -6,24 +6,10 @@ | |||
| 6 | * Jinyoung Jeon <jy0.jeon@samsung.com> | 6 | * Jinyoung Jeon <jy0.jeon@samsung.com> |
| 7 | * Sangmin Lee <lsmin.lee@samsung.com> | 7 | * Sangmin Lee <lsmin.lee@samsung.com> |
| 8 | * | 8 | * |
| 9 | * Permission is hereby granted, free of charge, to any person obtaining a | 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * copy of this software and associated documentation files (the "Software"), | 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * to deal in the Software without restriction, including without limitation | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
| 12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 12 | * option) any later version. |
| 13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 14 | * Software is furnished to do so, subject to the following conditions: | ||
| 15 | * | ||
| 16 | * The above copyright notice and this permission notice (including the next | ||
| 17 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 18 | * Software. | ||
| 19 | * | ||
| 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 23 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 24 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 25 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 26 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 27 | */ | 13 | */ |
| 28 | 14 | ||
| 29 | #ifndef _EXYNOS_DRM_GSC_H_ | 15 | #ifndef _EXYNOS_DRM_GSC_H_ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c index 55793c46e3c2..850e9950b7da 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c | |||
| @@ -385,7 +385,7 @@ static void hdmi_subdrv_remove(struct drm_device *drm_dev, struct device *dev) | |||
| 385 | mixer_ops->iommu_on(ctx->mixer_ctx->ctx, false); | 385 | mixer_ops->iommu_on(ctx->mixer_ctx->ctx, false); |
| 386 | } | 386 | } |
| 387 | 387 | ||
| 388 | static int __devinit exynos_drm_hdmi_probe(struct platform_device *pdev) | 388 | static int exynos_drm_hdmi_probe(struct platform_device *pdev) |
| 389 | { | 389 | { |
| 390 | struct device *dev = &pdev->dev; | 390 | struct device *dev = &pdev->dev; |
| 391 | struct exynos_drm_subdrv *subdrv; | 391 | struct exynos_drm_subdrv *subdrv; |
| @@ -413,7 +413,7 @@ static int __devinit exynos_drm_hdmi_probe(struct platform_device *pdev) | |||
| 413 | return 0; | 413 | return 0; |
| 414 | } | 414 | } |
| 415 | 415 | ||
| 416 | static int __devexit exynos_drm_hdmi_remove(struct platform_device *pdev) | 416 | static int exynos_drm_hdmi_remove(struct platform_device *pdev) |
| 417 | { | 417 | { |
| 418 | struct drm_hdmi_context *ctx = platform_get_drvdata(pdev); | 418 | struct drm_hdmi_context *ctx = platform_get_drvdata(pdev); |
| 419 | 419 | ||
| @@ -426,7 +426,7 @@ static int __devexit exynos_drm_hdmi_remove(struct platform_device *pdev) | |||
| 426 | 426 | ||
| 427 | struct platform_driver exynos_drm_common_hdmi_driver = { | 427 | struct platform_driver exynos_drm_common_hdmi_driver = { |
| 428 | .probe = exynos_drm_hdmi_probe, | 428 | .probe = exynos_drm_hdmi_probe, |
| 429 | .remove = __devexit_p(exynos_drm_hdmi_remove), | 429 | .remove = exynos_drm_hdmi_remove, |
| 430 | .driver = { | 430 | .driver = { |
| 431 | .name = "exynos-drm-hdmi", | 431 | .name = "exynos-drm-hdmi", |
| 432 | .owner = THIS_MODULE, | 432 | .owner = THIS_MODULE, |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.h b/drivers/gpu/drm/exynos/exynos_drm_hdmi.h index fcc3093ec8fe..784a7e9a766c 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.h +++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.h | |||
| @@ -3,24 +3,10 @@ | |||
| 3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | 3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. |
| 4 | * Authoer: Inki Dae <inki.dae@samsung.com> | 4 | * Authoer: Inki Dae <inki.dae@samsung.com> |
| 5 | * | 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * copy of this software and associated documentation files (the "Software"), | 7 | * under the terms of the GNU General Public License as published by the |
| 8 | * to deal in the Software without restriction, including without limitation | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 9 | * option) any later version. |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 11 | * Software is furnished to do so, subject to the following conditions: | ||
| 12 | * | ||
| 13 | * The above copyright notice and this permission notice (including the next | ||
| 14 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 15 | * Software. | ||
| 16 | * | ||
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 20 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 23 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 24 | */ | 10 | */ |
| 25 | 11 | ||
| 26 | #ifndef _EXYNOS_DRM_HDMI_H_ | 12 | #ifndef _EXYNOS_DRM_HDMI_H_ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_iommu.c b/drivers/gpu/drm/exynos/exynos_drm_iommu.c index 2482b7f96341..3799d5c2b5df 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_iommu.c +++ b/drivers/gpu/drm/exynos/exynos_drm_iommu.c | |||
| @@ -3,24 +3,10 @@ | |||
| 3 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | 3 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. |
| 4 | * Author: Inki Dae <inki.dae@samsung.com> | 4 | * Author: Inki Dae <inki.dae@samsung.com> |
| 5 | * | 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * copy of this software and associated documentation files (the "Software"), | 7 | * under the terms of the GNU General Public License as published by the |
| 8 | * to deal in the Software without restriction, including without limitation | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 9 | * option) any later version. |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 11 | * Software is furnished to do so, subject to the following conditions: | ||
| 12 | * | ||
| 13 | * The above copyright notice and this permission notice (including the next | ||
| 14 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 15 | * Software. | ||
| 16 | * | ||
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 20 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 23 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 24 | */ | 10 | */ |
| 25 | 11 | ||
| 26 | #include <drmP.h> | 12 | #include <drmP.h> |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_iommu.h b/drivers/gpu/drm/exynos/exynos_drm_iommu.h index 18a0ca190b98..53b7deea8ab7 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_iommu.h +++ b/drivers/gpu/drm/exynos/exynos_drm_iommu.h | |||
| @@ -3,24 +3,10 @@ | |||
| 3 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | 3 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. |
| 4 | * Authoer: Inki Dae <inki.dae@samsung.com> | 4 | * Authoer: Inki Dae <inki.dae@samsung.com> |
| 5 | * | 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * copy of this software and associated documentation files (the "Software"), | 7 | * under the terms of the GNU General Public License as published by the |
| 8 | * to deal in the Software without restriction, including without limitation | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 9 | * option) any later version. |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 11 | * Software is furnished to do so, subject to the following conditions: | ||
| 12 | * | ||
| 13 | * The above copyright notice and this permission notice (including the next | ||
| 14 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 15 | * Software. | ||
| 16 | * | ||
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 20 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 23 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 24 | */ | 10 | */ |
| 25 | 11 | ||
| 26 | #ifndef _EXYNOS_DRM_IOMMU_H_ | 12 | #ifndef _EXYNOS_DRM_IOMMU_H_ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c index 49eebe948ed2..0bda96454a02 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | #include "exynos_drm_iommu.h" | 27 | #include "exynos_drm_iommu.h" |
| 28 | 28 | ||
| 29 | /* | 29 | /* |
| 30 | * IPP is stand for Image Post Processing and | 30 | * IPP stands for Image Post Processing and |
| 31 | * supports image scaler/rotator and input/output DMA operations. | 31 | * supports image scaler/rotator and input/output DMA operations. |
| 32 | * using FIMC, GSC, Rotator, so on. | 32 | * using FIMC, GSC, Rotator, so on. |
| 33 | * IPP is integration device driver of same attribute h/w | 33 | * IPP is integration device driver of same attribute h/w |
| @@ -1292,7 +1292,7 @@ static int ipp_start_property(struct exynos_drm_ippdrv *ippdrv, | |||
| 1292 | DRM_DEBUG_KMS("%s:prop_id[%d]\n", __func__, property->prop_id); | 1292 | DRM_DEBUG_KMS("%s:prop_id[%d]\n", __func__, property->prop_id); |
| 1293 | 1293 | ||
| 1294 | /* store command info in ippdrv */ | 1294 | /* store command info in ippdrv */ |
| 1295 | ippdrv->cmd = c_node; | 1295 | ippdrv->c_node = c_node; |
| 1296 | 1296 | ||
| 1297 | if (!ipp_check_mem_list(c_node)) { | 1297 | if (!ipp_check_mem_list(c_node)) { |
| 1298 | DRM_DEBUG_KMS("%s:empty memory.\n", __func__); | 1298 | DRM_DEBUG_KMS("%s:empty memory.\n", __func__); |
| @@ -1303,7 +1303,7 @@ static int ipp_start_property(struct exynos_drm_ippdrv *ippdrv, | |||
| 1303 | ret = ipp_set_property(ippdrv, property); | 1303 | ret = ipp_set_property(ippdrv, property); |
| 1304 | if (ret) { | 1304 | if (ret) { |
| 1305 | DRM_ERROR("failed to set property.\n"); | 1305 | DRM_ERROR("failed to set property.\n"); |
| 1306 | ippdrv->cmd = NULL; | 1306 | ippdrv->c_node = NULL; |
| 1307 | return ret; | 1307 | return ret; |
| 1308 | } | 1308 | } |
| 1309 | 1309 | ||
| @@ -1487,11 +1487,6 @@ void ipp_sched_cmd(struct work_struct *work) | |||
| 1487 | mutex_lock(&c_node->cmd_lock); | 1487 | mutex_lock(&c_node->cmd_lock); |
| 1488 | 1488 | ||
| 1489 | property = &c_node->property; | 1489 | property = &c_node->property; |
| 1490 | if (!property) { | ||
| 1491 | DRM_ERROR("failed to get property:prop_id[%d]\n", | ||
| 1492 | c_node->property.prop_id); | ||
| 1493 | goto err_unlock; | ||
| 1494 | } | ||
| 1495 | 1490 | ||
| 1496 | switch (cmd_work->ctrl) { | 1491 | switch (cmd_work->ctrl) { |
| 1497 | case IPP_CTRL_PLAY: | 1492 | case IPP_CTRL_PLAY: |
| @@ -1704,7 +1699,7 @@ void ipp_sched_event(struct work_struct *work) | |||
| 1704 | return; | 1699 | return; |
| 1705 | } | 1700 | } |
| 1706 | 1701 | ||
| 1707 | c_node = ippdrv->cmd; | 1702 | c_node = ippdrv->c_node; |
| 1708 | if (!c_node) { | 1703 | if (!c_node) { |
| 1709 | DRM_ERROR("failed to get command node.\n"); | 1704 | DRM_ERROR("failed to get command node.\n"); |
| 1710 | return; | 1705 | return; |
| @@ -1888,14 +1883,14 @@ err_clear: | |||
| 1888 | return; | 1883 | return; |
| 1889 | } | 1884 | } |
| 1890 | 1885 | ||
| 1891 | static int __devinit ipp_probe(struct platform_device *pdev) | 1886 | static int ipp_probe(struct platform_device *pdev) |
| 1892 | { | 1887 | { |
| 1893 | struct device *dev = &pdev->dev; | 1888 | struct device *dev = &pdev->dev; |
| 1894 | struct ipp_context *ctx; | 1889 | struct ipp_context *ctx; |
| 1895 | struct exynos_drm_subdrv *subdrv; | 1890 | struct exynos_drm_subdrv *subdrv; |
| 1896 | int ret; | 1891 | int ret; |
| 1897 | 1892 | ||
| 1898 | ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); | 1893 | ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); |
| 1899 | if (!ctx) | 1894 | if (!ctx) |
| 1900 | return -ENOMEM; | 1895 | return -ENOMEM; |
| 1901 | 1896 | ||
| @@ -1916,8 +1911,7 @@ static int __devinit ipp_probe(struct platform_device *pdev) | |||
| 1916 | ctx->event_workq = create_singlethread_workqueue("ipp_event"); | 1911 | ctx->event_workq = create_singlethread_workqueue("ipp_event"); |
| 1917 | if (!ctx->event_workq) { | 1912 | if (!ctx->event_workq) { |
| 1918 | dev_err(dev, "failed to create event workqueue\n"); | 1913 | dev_err(dev, "failed to create event workqueue\n"); |
| 1919 | ret = -EINVAL; | 1914 | return -EINVAL; |
| 1920 | goto err_clear; | ||
| 1921 | } | 1915 | } |
| 1922 | 1916 | ||
| 1923 | /* | 1917 | /* |
| @@ -1958,12 +1952,10 @@ err_cmd_workq: | |||
| 1958 | destroy_workqueue(ctx->cmd_workq); | 1952 | destroy_workqueue(ctx->cmd_workq); |
| 1959 | err_event_workq: | 1953 | err_event_workq: |
| 1960 | destroy_workqueue(ctx->event_workq); | 1954 | destroy_workqueue(ctx->event_workq); |
| 1961 | err_clear: | ||
| 1962 | kfree(ctx); | ||
| 1963 | return ret; | 1955 | return ret; |
| 1964 | } | 1956 | } |
| 1965 | 1957 | ||
| 1966 | static int __devexit ipp_remove(struct platform_device *pdev) | 1958 | static int ipp_remove(struct platform_device *pdev) |
| 1967 | { | 1959 | { |
| 1968 | struct ipp_context *ctx = platform_get_drvdata(pdev); | 1960 | struct ipp_context *ctx = platform_get_drvdata(pdev); |
| 1969 | 1961 | ||
| @@ -1985,8 +1977,6 @@ static int __devexit ipp_remove(struct platform_device *pdev) | |||
| 1985 | destroy_workqueue(ctx->cmd_workq); | 1977 | destroy_workqueue(ctx->cmd_workq); |
| 1986 | destroy_workqueue(ctx->event_workq); | 1978 | destroy_workqueue(ctx->event_workq); |
| 1987 | 1979 | ||
| 1988 | kfree(ctx); | ||
| 1989 | |||
| 1990 | return 0; | 1980 | return 0; |
| 1991 | } | 1981 | } |
| 1992 | 1982 | ||
| @@ -2050,7 +2040,7 @@ static const struct dev_pm_ops ipp_pm_ops = { | |||
| 2050 | 2040 | ||
| 2051 | struct platform_driver ipp_driver = { | 2041 | struct platform_driver ipp_driver = { |
| 2052 | .probe = ipp_probe, | 2042 | .probe = ipp_probe, |
| 2053 | .remove = __devexit_p(ipp_remove), | 2043 | .remove = ipp_remove, |
| 2054 | .driver = { | 2044 | .driver = { |
| 2055 | .name = "exynos-drm-ipp", | 2045 | .name = "exynos-drm-ipp", |
| 2056 | .owner = THIS_MODULE, | 2046 | .owner = THIS_MODULE, |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.h b/drivers/gpu/drm/exynos/exynos_drm_ipp.h index 28ffac95386c..4cadbea7dbde 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.h +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.h | |||
| @@ -6,24 +6,10 @@ | |||
| 6 | * Jinyoung Jeon <jy0.jeon@samsung.com> | 6 | * Jinyoung Jeon <jy0.jeon@samsung.com> |
| 7 | * Sangmin Lee <lsmin.lee@samsung.com> | 7 | * Sangmin Lee <lsmin.lee@samsung.com> |
| 8 | * | 8 | * |
| 9 | * Permission is hereby granted, free of charge, to any person obtaining a | 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * copy of this software and associated documentation files (the "Software"), | 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * to deal in the Software without restriction, including without limitation | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
| 12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 12 | * option) any later version. |
| 13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 14 | * Software is furnished to do so, subject to the following conditions: | ||
| 15 | * | ||
| 16 | * The above copyright notice and this permission notice (including the next | ||
| 17 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 18 | * Software. | ||
| 19 | * | ||
| 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 23 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 24 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 25 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 26 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 27 | */ | 13 | */ |
| 28 | 14 | ||
| 29 | #ifndef _EXYNOS_DRM_IPP_H_ | 15 | #ifndef _EXYNOS_DRM_IPP_H_ |
| @@ -160,7 +146,7 @@ struct exynos_drm_ipp_ops { | |||
| 160 | * @dedicated: dedicated ipp device. | 146 | * @dedicated: dedicated ipp device. |
| 161 | * @ops: source, destination operations. | 147 | * @ops: source, destination operations. |
| 162 | * @event_workq: event work queue. | 148 | * @event_workq: event work queue. |
| 163 | * @cmd: current command information. | 149 | * @c_node: current command information. |
| 164 | * @cmd_list: list head for command information. | 150 | * @cmd_list: list head for command information. |
| 165 | * @prop_list: property informations of current ipp driver. | 151 | * @prop_list: property informations of current ipp driver. |
| 166 | * @check_property: check property about format, size, buffer. | 152 | * @check_property: check property about format, size, buffer. |
| @@ -178,7 +164,7 @@ struct exynos_drm_ippdrv { | |||
| 178 | bool dedicated; | 164 | bool dedicated; |
| 179 | struct exynos_drm_ipp_ops *ops[EXYNOS_DRM_OPS_MAX]; | 165 | struct exynos_drm_ipp_ops *ops[EXYNOS_DRM_OPS_MAX]; |
| 180 | struct workqueue_struct *event_workq; | 166 | struct workqueue_struct *event_workq; |
| 181 | struct drm_exynos_ipp_cmd_node *cmd; | 167 | struct drm_exynos_ipp_cmd_node *c_node; |
| 182 | struct list_head cmd_list; | 168 | struct list_head cmd_list; |
| 183 | struct drm_exynos_ipp_prop_list *prop_list; | 169 | struct drm_exynos_ipp_prop_list *prop_list; |
| 184 | 170 | ||
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c index 1c2366083c70..e9e83ef688f0 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c +++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c | |||
| @@ -139,7 +139,7 @@ static irqreturn_t rotator_irq_handler(int irq, void *arg) | |||
| 139 | { | 139 | { |
| 140 | struct rot_context *rot = arg; | 140 | struct rot_context *rot = arg; |
| 141 | struct exynos_drm_ippdrv *ippdrv = &rot->ippdrv; | 141 | struct exynos_drm_ippdrv *ippdrv = &rot->ippdrv; |
| 142 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd; | 142 | struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node; |
| 143 | struct drm_exynos_ipp_event_work *event_work = c_node->event_work; | 143 | struct drm_exynos_ipp_event_work *event_work = c_node->event_work; |
| 144 | enum rot_irq_status irq_status; | 144 | enum rot_irq_status irq_status; |
| 145 | u32 val; | 145 | u32 val; |
| @@ -513,6 +513,7 @@ static inline bool rotator_check_drm_flip(enum drm_exynos_flip flip) | |||
| 513 | case EXYNOS_DRM_FLIP_NONE: | 513 | case EXYNOS_DRM_FLIP_NONE: |
| 514 | case EXYNOS_DRM_FLIP_VERTICAL: | 514 | case EXYNOS_DRM_FLIP_VERTICAL: |
| 515 | case EXYNOS_DRM_FLIP_HORIZONTAL: | 515 | case EXYNOS_DRM_FLIP_HORIZONTAL: |
| 516 | case EXYNOS_DRM_FLIP_BOTH: | ||
| 516 | return true; | 517 | return true; |
| 517 | default: | 518 | default: |
| 518 | DRM_DEBUG_KMS("%s:invalid flip\n", __func__); | 519 | DRM_DEBUG_KMS("%s:invalid flip\n", __func__); |
| @@ -638,7 +639,7 @@ static int rotator_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd) | |||
| 638 | return 0; | 639 | return 0; |
| 639 | } | 640 | } |
| 640 | 641 | ||
| 641 | static int __devinit rotator_probe(struct platform_device *pdev) | 642 | static int rotator_probe(struct platform_device *pdev) |
| 642 | { | 643 | { |
| 643 | struct device *dev = &pdev->dev; | 644 | struct device *dev = &pdev->dev; |
| 644 | struct rot_context *rot; | 645 | struct rot_context *rot; |
| @@ -655,34 +656,26 @@ static int __devinit rotator_probe(struct platform_device *pdev) | |||
| 655 | platform_get_device_id(pdev)->driver_data; | 656 | platform_get_device_id(pdev)->driver_data; |
| 656 | 657 | ||
| 657 | rot->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 658 | rot->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 658 | if (!rot->regs_res) { | ||
| 659 | dev_err(dev, "failed to find registers\n"); | ||
| 660 | ret = -ENOENT; | ||
| 661 | goto err_get_resource; | ||
| 662 | } | ||
| 663 | |||
| 664 | rot->regs = devm_request_and_ioremap(dev, rot->regs_res); | 659 | rot->regs = devm_request_and_ioremap(dev, rot->regs_res); |
| 665 | if (!rot->regs) { | 660 | if (!rot->regs) { |
| 666 | dev_err(dev, "failed to map register\n"); | 661 | dev_err(dev, "failed to map register\n"); |
| 667 | ret = -ENXIO; | 662 | return -ENXIO; |
| 668 | goto err_get_resource; | ||
| 669 | } | 663 | } |
| 670 | 664 | ||
| 671 | rot->irq = platform_get_irq(pdev, 0); | 665 | rot->irq = platform_get_irq(pdev, 0); |
| 672 | if (rot->irq < 0) { | 666 | if (rot->irq < 0) { |
| 673 | dev_err(dev, "failed to get irq\n"); | 667 | dev_err(dev, "failed to get irq\n"); |
| 674 | ret = rot->irq; | 668 | return rot->irq; |
| 675 | goto err_get_irq; | ||
| 676 | } | 669 | } |
| 677 | 670 | ||
| 678 | ret = request_threaded_irq(rot->irq, NULL, rotator_irq_handler, | 671 | ret = request_threaded_irq(rot->irq, NULL, rotator_irq_handler, |
| 679 | IRQF_ONESHOT, "drm_rotator", rot); | 672 | IRQF_ONESHOT, "drm_rotator", rot); |
| 680 | if (ret < 0) { | 673 | if (ret < 0) { |
| 681 | dev_err(dev, "failed to request irq\n"); | 674 | dev_err(dev, "failed to request irq\n"); |
| 682 | goto err_get_irq; | 675 | return ret; |
| 683 | } | 676 | } |
| 684 | 677 | ||
| 685 | rot->clock = clk_get(dev, "rotator"); | 678 | rot->clock = devm_clk_get(dev, "rotator"); |
| 686 | if (IS_ERR_OR_NULL(rot->clock)) { | 679 | if (IS_ERR_OR_NULL(rot->clock)) { |
| 687 | dev_err(dev, "failed to get clock\n"); | 680 | dev_err(dev, "failed to get clock\n"); |
| 688 | ret = PTR_ERR(rot->clock); | 681 | ret = PTR_ERR(rot->clock); |
| @@ -720,17 +713,12 @@ static int __devinit rotator_probe(struct platform_device *pdev) | |||
| 720 | err_ippdrv_register: | 713 | err_ippdrv_register: |
| 721 | devm_kfree(dev, ippdrv->prop_list); | 714 | devm_kfree(dev, ippdrv->prop_list); |
| 722 | pm_runtime_disable(dev); | 715 | pm_runtime_disable(dev); |
| 723 | clk_put(rot->clock); | ||
| 724 | err_clk_get: | 716 | err_clk_get: |
| 725 | free_irq(rot->irq, rot); | 717 | free_irq(rot->irq, rot); |
| 726 | err_get_irq: | ||
| 727 | devm_iounmap(dev, rot->regs); | ||
| 728 | err_get_resource: | ||
| 729 | devm_kfree(dev, rot); | ||
| 730 | return ret; | 718 | return ret; |
| 731 | } | 719 | } |
| 732 | 720 | ||
| 733 | static int __devexit rotator_remove(struct platform_device *pdev) | 721 | static int rotator_remove(struct platform_device *pdev) |
| 734 | { | 722 | { |
| 735 | struct device *dev = &pdev->dev; | 723 | struct device *dev = &pdev->dev; |
| 736 | struct rot_context *rot = dev_get_drvdata(dev); | 724 | struct rot_context *rot = dev_get_drvdata(dev); |
| @@ -740,12 +728,8 @@ static int __devexit rotator_remove(struct platform_device *pdev) | |||
| 740 | exynos_drm_ippdrv_unregister(ippdrv); | 728 | exynos_drm_ippdrv_unregister(ippdrv); |
| 741 | 729 | ||
| 742 | pm_runtime_disable(dev); | 730 | pm_runtime_disable(dev); |
| 743 | clk_put(rot->clock); | ||
| 744 | 731 | ||
| 745 | free_irq(rot->irq, rot); | 732 | free_irq(rot->irq, rot); |
| 746 | devm_iounmap(dev, rot->regs); | ||
| 747 | |||
| 748 | devm_kfree(dev, rot); | ||
| 749 | 733 | ||
| 750 | return 0; | 734 | return 0; |
| 751 | } | 735 | } |
| @@ -845,7 +829,7 @@ static const struct dev_pm_ops rotator_pm_ops = { | |||
| 845 | 829 | ||
| 846 | struct platform_driver rotator_driver = { | 830 | struct platform_driver rotator_driver = { |
| 847 | .probe = rotator_probe, | 831 | .probe = rotator_probe, |
| 848 | .remove = __devexit_p(rotator_remove), | 832 | .remove = rotator_remove, |
| 849 | .id_table = rotator_driver_ids, | 833 | .id_table = rotator_driver_ids, |
| 850 | .driver = { | 834 | .driver = { |
| 851 | .name = "exynos-rot", | 835 | .name = "exynos-rot", |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.h b/drivers/gpu/drm/exynos/exynos_drm_rotator.h index a2d7a14a52b6..71a0b4c0c1e8 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_rotator.h +++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.h | |||
| @@ -5,24 +5,10 @@ | |||
| 5 | * YoungJun Cho <yj44.cho@samsung.com> | 5 | * YoungJun Cho <yj44.cho@samsung.com> |
| 6 | * Eunchul Kim <chulspro.kim@samsung.com> | 6 | * Eunchul Kim <chulspro.kim@samsung.com> |
| 7 | * | 7 | * |
| 8 | * Permission is hereby granted, free of charge, to any person obtaining a | 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * copy of this software and associated documentation files (the "Software"), | 9 | * under the terms of the GNU General Public License as published by the |
| 10 | * to deal in the Software without restriction, including without limitation | 10 | * Free Software Foundation; either version 2 of the License, or (at your |
| 11 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 11 | * option) any later version. |
| 12 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 13 | * Software is furnished to do so, subject to the following conditions: | ||
| 14 | * | ||
| 15 | * The above copyright notice and this permission notice (including the next | ||
| 16 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 17 | * Software. | ||
| 18 | * | ||
| 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 22 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 23 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 24 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 25 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 26 | */ | 12 | */ |
| 27 | 13 | ||
| 28 | #ifndef _EXYNOS_DRM_ROTATOR_H_ | 14 | #ifndef _EXYNOS_DRM_ROTATOR_H_ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index 99bfc38dfaa2..d0ca3c4e06c6 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c | |||
| @@ -372,34 +372,6 @@ static struct exynos_drm_manager vidi_manager = { | |||
| 372 | .display_ops = &vidi_display_ops, | 372 | .display_ops = &vidi_display_ops, |
| 373 | }; | 373 | }; |
| 374 | 374 | ||
| 375 | static void vidi_finish_pageflip(struct drm_device *drm_dev, int crtc) | ||
| 376 | { | ||
| 377 | struct exynos_drm_private *dev_priv = drm_dev->dev_private; | ||
| 378 | struct drm_pending_vblank_event *e, *t; | ||
| 379 | struct timeval now; | ||
| 380 | unsigned long flags; | ||
| 381 | |||
| 382 | spin_lock_irqsave(&drm_dev->event_lock, flags); | ||
| 383 | |||
| 384 | list_for_each_entry_safe(e, t, &dev_priv->pageflip_event_list, | ||
| 385 | base.link) { | ||
| 386 | /* if event's pipe isn't same as crtc then ignore it. */ | ||
| 387 | if (crtc != e->pipe) | ||
| 388 | continue; | ||
| 389 | |||
| 390 | do_gettimeofday(&now); | ||
| 391 | e->event.sequence = 0; | ||
| 392 | e->event.tv_sec = now.tv_sec; | ||
| 393 | e->event.tv_usec = now.tv_usec; | ||
| 394 | |||
| 395 | list_move_tail(&e->base.link, &e->base.file_priv->event_list); | ||
| 396 | wake_up_interruptible(&e->base.file_priv->event_wait); | ||
| 397 | drm_vblank_put(drm_dev, crtc); | ||
| 398 | } | ||
| 399 | |||
| 400 | spin_unlock_irqrestore(&drm_dev->event_lock, flags); | ||
| 401 | } | ||
| 402 | |||
| 403 | static void vidi_fake_vblank_handler(struct work_struct *work) | 375 | static void vidi_fake_vblank_handler(struct work_struct *work) |
| 404 | { | 376 | { |
| 405 | struct vidi_context *ctx = container_of(work, struct vidi_context, | 377 | struct vidi_context *ctx = container_of(work, struct vidi_context, |
| @@ -424,7 +396,7 @@ static void vidi_fake_vblank_handler(struct work_struct *work) | |||
| 424 | 396 | ||
| 425 | mutex_unlock(&ctx->lock); | 397 | mutex_unlock(&ctx->lock); |
| 426 | 398 | ||
| 427 | vidi_finish_pageflip(subdrv->drm_dev, manager->pipe); | 399 | exynos_drm_crtc_finish_pageflip(subdrv->drm_dev, manager->pipe); |
| 428 | } | 400 | } |
| 429 | 401 | ||
| 430 | static int vidi_subdrv_probe(struct drm_device *drm_dev, struct device *dev) | 402 | static int vidi_subdrv_probe(struct drm_device *drm_dev, struct device *dev) |
| @@ -609,7 +581,7 @@ int vidi_connection_ioctl(struct drm_device *drm_dev, void *data, | |||
| 609 | return 0; | 581 | return 0; |
| 610 | } | 582 | } |
| 611 | 583 | ||
| 612 | static int __devinit vidi_probe(struct platform_device *pdev) | 584 | static int vidi_probe(struct platform_device *pdev) |
| 613 | { | 585 | { |
| 614 | struct device *dev = &pdev->dev; | 586 | struct device *dev = &pdev->dev; |
| 615 | struct vidi_context *ctx; | 587 | struct vidi_context *ctx; |
| @@ -645,7 +617,7 @@ static int __devinit vidi_probe(struct platform_device *pdev) | |||
| 645 | return 0; | 617 | return 0; |
| 646 | } | 618 | } |
| 647 | 619 | ||
| 648 | static int __devexit vidi_remove(struct platform_device *pdev) | 620 | static int vidi_remove(struct platform_device *pdev) |
| 649 | { | 621 | { |
| 650 | struct vidi_context *ctx = platform_get_drvdata(pdev); | 622 | struct vidi_context *ctx = platform_get_drvdata(pdev); |
| 651 | 623 | ||
| @@ -683,7 +655,7 @@ static const struct dev_pm_ops vidi_pm_ops = { | |||
| 683 | 655 | ||
| 684 | struct platform_driver vidi_driver = { | 656 | struct platform_driver vidi_driver = { |
| 685 | .probe = vidi_probe, | 657 | .probe = vidi_probe, |
| 686 | .remove = __devexit_p(vidi_remove), | 658 | .remove = vidi_remove, |
| 687 | .driver = { | 659 | .driver = { |
| 688 | .name = "exynos-drm-vidi", | 660 | .name = "exynos-drm-vidi", |
| 689 | .owner = THIS_MODULE, | 661 | .owner = THIS_MODULE, |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.h b/drivers/gpu/drm/exynos/exynos_drm_vidi.h index a4babe4e65d7..1e5fdaa36ccc 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.h +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.h | |||
| @@ -3,24 +3,10 @@ | |||
| 3 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | 3 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. |
| 4 | * Author: Inki Dae <inki.dae@samsung.com> | 4 | * Author: Inki Dae <inki.dae@samsung.com> |
| 5 | * | 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * copy of this software and associated documentation files (the "Software"), | 7 | * under the terms of the GNU General Public License as published by the |
| 8 | * to deal in the Software without restriction, including without limitation | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 9 | * option) any later version. |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 11 | * Software is furnished to do so, subject to the following conditions: | ||
| 12 | * | ||
| 13 | * The above copyright notice and this permission notice (including the next | ||
| 14 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 15 | * Software. | ||
| 16 | * | ||
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 20 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 23 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 24 | */ | 10 | */ |
| 25 | 11 | ||
| 26 | #ifndef _EXYNOS_DRM_VIDI_H_ | 12 | #ifndef _EXYNOS_DRM_VIDI_H_ |
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 2c46b6c0b82c..41ff79d8ac8e 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c | |||
| @@ -2305,7 +2305,7 @@ static irqreturn_t hdmi_internal_irq_thread(int irq, void *arg) | |||
| 2305 | return IRQ_HANDLED; | 2305 | return IRQ_HANDLED; |
| 2306 | } | 2306 | } |
| 2307 | 2307 | ||
| 2308 | static int __devinit hdmi_resources_init(struct hdmi_context *hdata) | 2308 | static int hdmi_resources_init(struct hdmi_context *hdata) |
| 2309 | { | 2309 | { |
| 2310 | struct device *dev = hdata->dev; | 2310 | struct device *dev = hdata->dev; |
| 2311 | struct hdmi_resources *res = &hdata->res; | 2311 | struct hdmi_resources *res = &hdata->res; |
| @@ -2451,7 +2451,7 @@ static struct of_device_id hdmi_match_types[] = { | |||
| 2451 | }; | 2451 | }; |
| 2452 | #endif | 2452 | #endif |
| 2453 | 2453 | ||
| 2454 | static int __devinit hdmi_probe(struct platform_device *pdev) | 2454 | static int hdmi_probe(struct platform_device *pdev) |
| 2455 | { | 2455 | { |
| 2456 | struct device *dev = &pdev->dev; | 2456 | struct device *dev = &pdev->dev; |
| 2457 | struct exynos_drm_hdmi_context *drm_hdmi_ctx; | 2457 | struct exynos_drm_hdmi_context *drm_hdmi_ctx; |
| @@ -2607,7 +2607,7 @@ err_ddc: | |||
| 2607 | return ret; | 2607 | return ret; |
| 2608 | } | 2608 | } |
| 2609 | 2609 | ||
| 2610 | static int __devexit hdmi_remove(struct platform_device *pdev) | 2610 | static int hdmi_remove(struct platform_device *pdev) |
| 2611 | { | 2611 | { |
| 2612 | struct device *dev = &pdev->dev; | 2612 | struct device *dev = &pdev->dev; |
| 2613 | struct exynos_drm_hdmi_context *ctx = platform_get_drvdata(pdev); | 2613 | struct exynos_drm_hdmi_context *ctx = platform_get_drvdata(pdev); |
| @@ -2708,7 +2708,7 @@ static const struct dev_pm_ops hdmi_pm_ops = { | |||
| 2708 | 2708 | ||
| 2709 | struct platform_driver hdmi_driver = { | 2709 | struct platform_driver hdmi_driver = { |
| 2710 | .probe = hdmi_probe, | 2710 | .probe = hdmi_probe, |
| 2711 | .remove = __devexit_p(hdmi_remove), | 2711 | .remove = hdmi_remove, |
| 2712 | .id_table = hdmi_driver_types, | 2712 | .id_table = hdmi_driver_types, |
| 2713 | .driver = { | 2713 | .driver = { |
| 2714 | .name = "exynos-hdmi", | 2714 | .name = "exynos-hdmi", |
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.h b/drivers/gpu/drm/exynos/exynos_hdmi.h index 1c3b6d8f1fe7..0ddf3957de15 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.h +++ b/drivers/gpu/drm/exynos/exynos_hdmi.h | |||
| @@ -5,24 +5,10 @@ | |||
| 5 | * Inki Dae <inki.dae@samsung.com> | 5 | * Inki Dae <inki.dae@samsung.com> |
| 6 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 6 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 7 | * | 7 | * |
| 8 | * Permission is hereby granted, free of charge, to any person obtaining a | 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * copy of this software and associated documentation files (the "Software"), | 9 | * under the terms of the GNU General Public License as published by the |
| 10 | * to deal in the Software without restriction, including without limitation | 10 | * Free Software Foundation; either version 2 of the License, or (at your |
| 11 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 11 | * option) any later version. |
| 12 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 13 | * Software is furnished to do so, subject to the following conditions: | ||
| 14 | * | ||
| 15 | * The above copyright notice and this permission notice (including the next | ||
| 16 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 17 | * Software. | ||
| 18 | * | ||
| 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 22 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 23 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 24 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 25 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 26 | */ | 12 | */ |
| 27 | 13 | ||
| 28 | #ifndef _EXYNOS_HDMI_H_ | 14 | #ifndef _EXYNOS_HDMI_H_ |
diff --git a/drivers/gpu/drm/exynos/exynos_hdmiphy.c b/drivers/gpu/drm/exynos/exynos_hdmiphy.c index 6206056f4a33..ea49d132ecf6 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmiphy.c +++ b/drivers/gpu/drm/exynos/exynos_hdmiphy.c | |||
| @@ -64,7 +64,7 @@ struct i2c_driver hdmiphy_driver = { | |||
| 64 | }, | 64 | }, |
| 65 | .id_table = hdmiphy_id, | 65 | .id_table = hdmiphy_id, |
| 66 | .probe = hdmiphy_probe, | 66 | .probe = hdmiphy_probe, |
| 67 | .remove = __devexit_p(hdmiphy_remove), | 67 | .remove = hdmiphy_remove, |
| 68 | .command = NULL, | 68 | .command = NULL, |
| 69 | }; | 69 | }; |
| 70 | EXPORT_SYMBOL(hdmiphy_driver); | 70 | EXPORT_SYMBOL(hdmiphy_driver); |
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 21db89530fc7..c187ea33b748 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <drm/exynos_drm.h> | 35 | #include <drm/exynos_drm.h> |
| 36 | 36 | ||
| 37 | #include "exynos_drm_drv.h" | 37 | #include "exynos_drm_drv.h" |
| 38 | #include "exynos_drm_crtc.h" | ||
| 38 | #include "exynos_drm_hdmi.h" | 39 | #include "exynos_drm_hdmi.h" |
| 39 | #include "exynos_drm_iommu.h" | 40 | #include "exynos_drm_iommu.h" |
| 40 | 41 | ||
| @@ -949,35 +950,6 @@ static struct exynos_mixer_ops mixer_ops = { | |||
| 949 | .win_disable = mixer_win_disable, | 950 | .win_disable = mixer_win_disable, |
| 950 | }; | 951 | }; |
| 951 | 952 | ||
| 952 | /* for pageflip event */ | ||
| 953 | static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc) | ||
| 954 | { | ||
| 955 | struct exynos_drm_private *dev_priv = drm_dev->dev_private; | ||
| 956 | struct drm_pending_vblank_event *e, *t; | ||
| 957 | struct timeval now; | ||
| 958 | unsigned long flags; | ||
| 959 | |||
| 960 | spin_lock_irqsave(&drm_dev->event_lock, flags); | ||
| 961 | |||
| 962 | list_for_each_entry_safe(e, t, &dev_priv->pageflip_event_list, | ||
| 963 | base.link) { | ||
| 964 | /* if event's pipe isn't same as crtc then ignore it. */ | ||
| 965 | if (crtc != e->pipe) | ||
| 966 | continue; | ||
| 967 | |||
| 968 | do_gettimeofday(&now); | ||
| 969 | e->event.sequence = 0; | ||
| 970 | e->event.tv_sec = now.tv_sec; | ||
| 971 | e->event.tv_usec = now.tv_usec; | ||
| 972 | |||
| 973 | list_move_tail(&e->base.link, &e->base.file_priv->event_list); | ||
| 974 | wake_up_interruptible(&e->base.file_priv->event_wait); | ||
| 975 | drm_vblank_put(drm_dev, crtc); | ||
| 976 | } | ||
| 977 | |||
| 978 | spin_unlock_irqrestore(&drm_dev->event_lock, flags); | ||
| 979 | } | ||
| 980 | |||
| 981 | static irqreturn_t mixer_irq_handler(int irq, void *arg) | 953 | static irqreturn_t mixer_irq_handler(int irq, void *arg) |
| 982 | { | 954 | { |
| 983 | struct exynos_drm_hdmi_context *drm_hdmi_ctx = arg; | 955 | struct exynos_drm_hdmi_context *drm_hdmi_ctx = arg; |
| @@ -1006,7 +978,8 @@ static irqreturn_t mixer_irq_handler(int irq, void *arg) | |||
| 1006 | } | 978 | } |
| 1007 | 979 | ||
| 1008 | drm_handle_vblank(drm_hdmi_ctx->drm_dev, ctx->pipe); | 980 | drm_handle_vblank(drm_hdmi_ctx->drm_dev, ctx->pipe); |
| 1009 | mixer_finish_pageflip(drm_hdmi_ctx->drm_dev, ctx->pipe); | 981 | exynos_drm_crtc_finish_pageflip(drm_hdmi_ctx->drm_dev, |
| 982 | ctx->pipe); | ||
| 1010 | 983 | ||
| 1011 | /* set wait vsync event to zero and wake up queue. */ | 984 | /* set wait vsync event to zero and wake up queue. */ |
| 1012 | if (atomic_read(&ctx->wait_vsync_event)) { | 985 | if (atomic_read(&ctx->wait_vsync_event)) { |
| @@ -1029,8 +1002,8 @@ out: | |||
| 1029 | return IRQ_HANDLED; | 1002 | return IRQ_HANDLED; |
| 1030 | } | 1003 | } |
| 1031 | 1004 | ||
| 1032 | static int __devinit mixer_resources_init(struct exynos_drm_hdmi_context *ctx, | 1005 | static int mixer_resources_init(struct exynos_drm_hdmi_context *ctx, |
| 1033 | struct platform_device *pdev) | 1006 | struct platform_device *pdev) |
| 1034 | { | 1007 | { |
| 1035 | struct mixer_context *mixer_ctx = ctx->ctx; | 1008 | struct mixer_context *mixer_ctx = ctx->ctx; |
| 1036 | struct device *dev = &pdev->dev; | 1009 | struct device *dev = &pdev->dev; |
| @@ -1081,8 +1054,8 @@ static int __devinit mixer_resources_init(struct exynos_drm_hdmi_context *ctx, | |||
| 1081 | return 0; | 1054 | return 0; |
| 1082 | } | 1055 | } |
| 1083 | 1056 | ||
| 1084 | static int __devinit vp_resources_init(struct exynos_drm_hdmi_context *ctx, | 1057 | static int vp_resources_init(struct exynos_drm_hdmi_context *ctx, |
| 1085 | struct platform_device *pdev) | 1058 | struct platform_device *pdev) |
| 1086 | { | 1059 | { |
| 1087 | struct mixer_context *mixer_ctx = ctx->ctx; | 1060 | struct mixer_context *mixer_ctx = ctx->ctx; |
| 1088 | struct device *dev = &pdev->dev; | 1061 | struct device *dev = &pdev->dev; |
| @@ -1155,7 +1128,7 @@ static struct of_device_id mixer_match_types[] = { | |||
| 1155 | } | 1128 | } |
| 1156 | }; | 1129 | }; |
| 1157 | 1130 | ||
| 1158 | static int __devinit mixer_probe(struct platform_device *pdev) | 1131 | static int mixer_probe(struct platform_device *pdev) |
| 1159 | { | 1132 | { |
| 1160 | struct device *dev = &pdev->dev; | 1133 | struct device *dev = &pdev->dev; |
| 1161 | struct exynos_drm_hdmi_context *drm_hdmi_ctx; | 1134 | struct exynos_drm_hdmi_context *drm_hdmi_ctx; |
| @@ -1316,6 +1289,6 @@ struct platform_driver mixer_driver = { | |||
| 1316 | .of_match_table = mixer_match_types, | 1289 | .of_match_table = mixer_match_types, |
| 1317 | }, | 1290 | }, |
| 1318 | .probe = mixer_probe, | 1291 | .probe = mixer_probe, |
| 1319 | .remove = __devexit_p(mixer_remove), | 1292 | .remove = mixer_remove, |
| 1320 | .id_table = mixer_driver_types, | 1293 | .id_table = mixer_driver_types, |
| 1321 | }; | 1294 | }; |
diff --git a/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c b/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c index 4a07ab596174..771ff66711af 100644 --- a/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c +++ b/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c | |||
| @@ -700,7 +700,7 @@ static struct i2c_driver tc35876x_bridge_i2c_driver = { | |||
| 700 | }, | 700 | }, |
| 701 | .id_table = tc35876x_bridge_id, | 701 | .id_table = tc35876x_bridge_id, |
| 702 | .probe = tc35876x_bridge_probe, | 702 | .probe = tc35876x_bridge_probe, |
| 703 | .remove = __devexit_p(tc35876x_bridge_remove), | 703 | .remove = tc35876x_bridge_remove, |
| 704 | }; | 704 | }; |
| 705 | 705 | ||
| 706 | /* LCD panel I2C */ | 706 | /* LCD panel I2C */ |
| @@ -741,7 +741,7 @@ static struct i2c_driver cmi_lcd_i2c_driver = { | |||
| 741 | }, | 741 | }, |
| 742 | .id_table = cmi_lcd_i2c_id, | 742 | .id_table = cmi_lcd_i2c_id, |
| 743 | .probe = cmi_lcd_i2c_probe, | 743 | .probe = cmi_lcd_i2c_probe, |
| 744 | .remove = __devexit_p(cmi_lcd_i2c_remove), | 744 | .remove = cmi_lcd_i2c_remove, |
| 745 | }; | 745 | }; |
| 746 | 746 | ||
| 747 | /* HACK to create I2C device while it's not created by platform code */ | 747 | /* HACK to create I2C device while it's not created by platform code */ |
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 530db83ef320..117265840b1f 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c | |||
| @@ -877,8 +877,7 @@ int i915_reset(struct drm_device *dev) | |||
| 877 | return 0; | 877 | return 0; |
| 878 | } | 878 | } |
| 879 | 879 | ||
| 880 | static int __devinit | 880 | static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 881 | i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | ||
| 882 | { | 881 | { |
| 883 | struct intel_device_info *intel_info = | 882 | struct intel_device_info *intel_info = |
| 884 | (struct intel_device_info *) ent->driver_data; | 883 | (struct intel_device_info *) ent->driver_data; |
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index da3c82e301b1..8febea6daa08 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
| @@ -1717,7 +1717,8 @@ i915_gem_object_put_pages(struct drm_i915_gem_object *obj) | |||
| 1717 | } | 1717 | } |
| 1718 | 1718 | ||
| 1719 | static long | 1719 | static long |
| 1720 | i915_gem_purge(struct drm_i915_private *dev_priv, long target) | 1720 | __i915_gem_shrink(struct drm_i915_private *dev_priv, long target, |
| 1721 | bool purgeable_only) | ||
| 1721 | { | 1722 | { |
| 1722 | struct drm_i915_gem_object *obj, *next; | 1723 | struct drm_i915_gem_object *obj, *next; |
| 1723 | long count = 0; | 1724 | long count = 0; |
| @@ -1725,7 +1726,7 @@ i915_gem_purge(struct drm_i915_private *dev_priv, long target) | |||
| 1725 | list_for_each_entry_safe(obj, next, | 1726 | list_for_each_entry_safe(obj, next, |
| 1726 | &dev_priv->mm.unbound_list, | 1727 | &dev_priv->mm.unbound_list, |
| 1727 | gtt_list) { | 1728 | gtt_list) { |
| 1728 | if (i915_gem_object_is_purgeable(obj) && | 1729 | if ((i915_gem_object_is_purgeable(obj) || !purgeable_only) && |
| 1729 | i915_gem_object_put_pages(obj) == 0) { | 1730 | i915_gem_object_put_pages(obj) == 0) { |
| 1730 | count += obj->base.size >> PAGE_SHIFT; | 1731 | count += obj->base.size >> PAGE_SHIFT; |
| 1731 | if (count >= target) | 1732 | if (count >= target) |
| @@ -1736,7 +1737,7 @@ i915_gem_purge(struct drm_i915_private *dev_priv, long target) | |||
| 1736 | list_for_each_entry_safe(obj, next, | 1737 | list_for_each_entry_safe(obj, next, |
| 1737 | &dev_priv->mm.inactive_list, | 1738 | &dev_priv->mm.inactive_list, |
| 1738 | mm_list) { | 1739 | mm_list) { |
| 1739 | if (i915_gem_object_is_purgeable(obj) && | 1740 | if ((i915_gem_object_is_purgeable(obj) || !purgeable_only) && |
| 1740 | i915_gem_object_unbind(obj) == 0 && | 1741 | i915_gem_object_unbind(obj) == 0 && |
| 1741 | i915_gem_object_put_pages(obj) == 0) { | 1742 | i915_gem_object_put_pages(obj) == 0) { |
| 1742 | count += obj->base.size >> PAGE_SHIFT; | 1743 | count += obj->base.size >> PAGE_SHIFT; |
| @@ -1748,6 +1749,12 @@ i915_gem_purge(struct drm_i915_private *dev_priv, long target) | |||
| 1748 | return count; | 1749 | return count; |
| 1749 | } | 1750 | } |
| 1750 | 1751 | ||
| 1752 | static long | ||
| 1753 | i915_gem_purge(struct drm_i915_private *dev_priv, long target) | ||
| 1754 | { | ||
| 1755 | return __i915_gem_shrink(dev_priv, target, true); | ||
| 1756 | } | ||
| 1757 | |||
| 1751 | static void | 1758 | static void |
| 1752 | i915_gem_shrink_all(struct drm_i915_private *dev_priv) | 1759 | i915_gem_shrink_all(struct drm_i915_private *dev_priv) |
| 1753 | { | 1760 | { |
| @@ -3522,14 +3529,15 @@ i915_gem_pin_ioctl(struct drm_device *dev, void *data, | |||
| 3522 | goto out; | 3529 | goto out; |
| 3523 | } | 3530 | } |
| 3524 | 3531 | ||
| 3525 | obj->user_pin_count++; | 3532 | if (obj->user_pin_count == 0) { |
| 3526 | obj->pin_filp = file; | ||
| 3527 | if (obj->user_pin_count == 1) { | ||
| 3528 | ret = i915_gem_object_pin(obj, args->alignment, true, false); | 3533 | ret = i915_gem_object_pin(obj, args->alignment, true, false); |
| 3529 | if (ret) | 3534 | if (ret) |
| 3530 | goto out; | 3535 | goto out; |
| 3531 | } | 3536 | } |
| 3532 | 3537 | ||
| 3538 | obj->user_pin_count++; | ||
| 3539 | obj->pin_filp = file; | ||
| 3540 | |||
| 3533 | /* XXX - flush the CPU caches for pinned objects | 3541 | /* XXX - flush the CPU caches for pinned objects |
| 3534 | * as the X server doesn't manage domains yet | 3542 | * as the X server doesn't manage domains yet |
| 3535 | */ | 3543 | */ |
| @@ -4395,6 +4403,9 @@ i915_gem_inactive_shrink(struct shrinker *shrinker, struct shrink_control *sc) | |||
| 4395 | if (nr_to_scan) { | 4403 | if (nr_to_scan) { |
| 4396 | nr_to_scan -= i915_gem_purge(dev_priv, nr_to_scan); | 4404 | nr_to_scan -= i915_gem_purge(dev_priv, nr_to_scan); |
| 4397 | if (nr_to_scan > 0) | 4405 | if (nr_to_scan > 0) |
| 4406 | nr_to_scan -= __i915_gem_shrink(dev_priv, nr_to_scan, | ||
| 4407 | false); | ||
| 4408 | if (nr_to_scan > 0) | ||
| 4398 | i915_gem_shrink_all(dev_priv); | 4409 | i915_gem_shrink_all(dev_priv); |
| 4399 | } | 4410 | } |
| 4400 | 4411 | ||
| @@ -4402,7 +4413,7 @@ i915_gem_inactive_shrink(struct shrinker *shrinker, struct shrink_control *sc) | |||
| 4402 | list_for_each_entry(obj, &dev_priv->mm.unbound_list, gtt_list) | 4413 | list_for_each_entry(obj, &dev_priv->mm.unbound_list, gtt_list) |
| 4403 | if (obj->pages_pin_count == 0) | 4414 | if (obj->pages_pin_count == 0) |
| 4404 | cnt += obj->base.size >> PAGE_SHIFT; | 4415 | cnt += obj->base.size >> PAGE_SHIFT; |
| 4405 | list_for_each_entry(obj, &dev_priv->mm.bound_list, gtt_list) | 4416 | list_for_each_entry(obj, &dev_priv->mm.inactive_list, gtt_list) |
| 4406 | if (obj->pin_count == 0 && obj->pages_pin_count == 0) | 4417 | if (obj->pin_count == 0 && obj->pages_pin_count == 0) |
| 4407 | cnt += obj->base.size >> PAGE_SHIFT; | 4418 | cnt += obj->base.size >> PAGE_SHIFT; |
| 4408 | 4419 | ||
diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/i915_gem_dmabuf.c index 7be4241e8242..abeaafef6d7e 100644 --- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c +++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c | |||
| @@ -266,7 +266,12 @@ struct drm_gem_object *i915_gem_prime_import(struct drm_device *dev, | |||
| 266 | obj = dma_buf->priv; | 266 | obj = dma_buf->priv; |
| 267 | /* is it from our device? */ | 267 | /* is it from our device? */ |
| 268 | if (obj->base.dev == dev) { | 268 | if (obj->base.dev == dev) { |
| 269 | /* | ||
| 270 | * Importing dmabuf exported from out own gem increases | ||
| 271 | * refcount on gem itself instead of f_count of dmabuf. | ||
| 272 | */ | ||
| 269 | drm_gem_object_reference(&obj->base); | 273 | drm_gem_object_reference(&obj->base); |
| 274 | dma_buf_put(dma_buf); | ||
| 270 | return &obj->base; | 275 | return &obj->base; |
| 271 | } | 276 | } |
| 272 | } | 277 | } |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index a9fb046b94a1..da1ad9c80bb5 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
| @@ -8598,19 +8598,30 @@ int intel_framebuffer_init(struct drm_device *dev, | |||
| 8598 | { | 8598 | { |
| 8599 | int ret; | 8599 | int ret; |
| 8600 | 8600 | ||
| 8601 | if (obj->tiling_mode == I915_TILING_Y) | 8601 | if (obj->tiling_mode == I915_TILING_Y) { |
| 8602 | DRM_DEBUG("hardware does not support tiling Y\n"); | ||
| 8602 | return -EINVAL; | 8603 | return -EINVAL; |
| 8604 | } | ||
| 8603 | 8605 | ||
| 8604 | if (mode_cmd->pitches[0] & 63) | 8606 | if (mode_cmd->pitches[0] & 63) { |
| 8607 | DRM_DEBUG("pitch (%d) must be at least 64 byte aligned\n", | ||
| 8608 | mode_cmd->pitches[0]); | ||
| 8605 | return -EINVAL; | 8609 | return -EINVAL; |
| 8610 | } | ||
| 8606 | 8611 | ||
| 8607 | /* FIXME <= Gen4 stride limits are bit unclear */ | 8612 | /* FIXME <= Gen4 stride limits are bit unclear */ |
| 8608 | if (mode_cmd->pitches[0] > 32768) | 8613 | if (mode_cmd->pitches[0] > 32768) { |
| 8614 | DRM_DEBUG("pitch (%d) must be at less than 32768\n", | ||
| 8615 | mode_cmd->pitches[0]); | ||
| 8609 | return -EINVAL; | 8616 | return -EINVAL; |
| 8617 | } | ||
| 8610 | 8618 | ||
| 8611 | if (obj->tiling_mode != I915_TILING_NONE && | 8619 | if (obj->tiling_mode != I915_TILING_NONE && |
| 8612 | mode_cmd->pitches[0] != obj->stride) | 8620 | mode_cmd->pitches[0] != obj->stride) { |
| 8621 | DRM_DEBUG("pitch (%d) must match tiling stride (%d)\n", | ||
| 8622 | mode_cmd->pitches[0], obj->stride); | ||
| 8613 | return -EINVAL; | 8623 | return -EINVAL; |
| 8624 | } | ||
| 8614 | 8625 | ||
| 8615 | /* Reject formats not supported by any plane early. */ | 8626 | /* Reject formats not supported by any plane early. */ |
| 8616 | switch (mode_cmd->pixel_format) { | 8627 | switch (mode_cmd->pixel_format) { |
| @@ -8621,8 +8632,10 @@ int intel_framebuffer_init(struct drm_device *dev, | |||
| 8621 | break; | 8632 | break; |
| 8622 | case DRM_FORMAT_XRGB1555: | 8633 | case DRM_FORMAT_XRGB1555: |
| 8623 | case DRM_FORMAT_ARGB1555: | 8634 | case DRM_FORMAT_ARGB1555: |
| 8624 | if (INTEL_INFO(dev)->gen > 3) | 8635 | if (INTEL_INFO(dev)->gen > 3) { |
| 8636 | DRM_DEBUG("invalid format: 0x%08x\n", mode_cmd->pixel_format); | ||
| 8625 | return -EINVAL; | 8637 | return -EINVAL; |
| 8638 | } | ||
| 8626 | break; | 8639 | break; |
| 8627 | case DRM_FORMAT_XBGR8888: | 8640 | case DRM_FORMAT_XBGR8888: |
| 8628 | case DRM_FORMAT_ABGR8888: | 8641 | case DRM_FORMAT_ABGR8888: |
| @@ -8630,18 +8643,22 @@ int intel_framebuffer_init(struct drm_device *dev, | |||
| 8630 | case DRM_FORMAT_ARGB2101010: | 8643 | case DRM_FORMAT_ARGB2101010: |
| 8631 | case DRM_FORMAT_XBGR2101010: | 8644 | case DRM_FORMAT_XBGR2101010: |
| 8632 | case DRM_FORMAT_ABGR2101010: | 8645 | case DRM_FORMAT_ABGR2101010: |
| 8633 | if (INTEL_INFO(dev)->gen < 4) | 8646 | if (INTEL_INFO(dev)->gen < 4) { |
| 8647 | DRM_DEBUG("invalid format: 0x%08x\n", mode_cmd->pixel_format); | ||
| 8634 | return -EINVAL; | 8648 | return -EINVAL; |
| 8649 | } | ||
| 8635 | break; | 8650 | break; |
| 8636 | case DRM_FORMAT_YUYV: | 8651 | case DRM_FORMAT_YUYV: |
| 8637 | case DRM_FORMAT_UYVY: | 8652 | case DRM_FORMAT_UYVY: |
| 8638 | case DRM_FORMAT_YVYU: | 8653 | case DRM_FORMAT_YVYU: |
| 8639 | case DRM_FORMAT_VYUY: | 8654 | case DRM_FORMAT_VYUY: |
| 8640 | if (INTEL_INFO(dev)->gen < 6) | 8655 | if (INTEL_INFO(dev)->gen < 5) { |
| 8656 | DRM_DEBUG("invalid format: 0x%08x\n", mode_cmd->pixel_format); | ||
| 8641 | return -EINVAL; | 8657 | return -EINVAL; |
| 8658 | } | ||
| 8642 | break; | 8659 | break; |
| 8643 | default: | 8660 | default: |
| 8644 | DRM_DEBUG_KMS("unsupported pixel format 0x%08x\n", mode_cmd->pixel_format); | 8661 | DRM_DEBUG("unsupported pixel format 0x%08x\n", mode_cmd->pixel_format); |
| 8645 | return -EINVAL; | 8662 | return -EINVAL; |
| 8646 | } | 8663 | } |
| 8647 | 8664 | ||
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index b9a660a53677..17aee74258ad 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
| @@ -776,14 +776,6 @@ static const struct dmi_system_id intel_no_lvds[] = { | |||
| 776 | }, | 776 | }, |
| 777 | { | 777 | { |
| 778 | .callback = intel_no_lvds_dmi_callback, | 778 | .callback = intel_no_lvds_dmi_callback, |
| 779 | .ident = "ZOTAC ZBOXSD-ID12/ID13", | ||
| 780 | .matches = { | ||
| 781 | DMI_MATCH(DMI_BOARD_VENDOR, "ZOTAC"), | ||
| 782 | DMI_MATCH(DMI_BOARD_NAME, "ZBOXSD-ID12/ID13"), | ||
| 783 | }, | ||
| 784 | }, | ||
| 785 | { | ||
| 786 | .callback = intel_no_lvds_dmi_callback, | ||
| 787 | .ident = "Gigabyte GA-D525TUD", | 779 | .ident = "Gigabyte GA-D525TUD", |
| 788 | .matches = { | 780 | .matches = { |
| 789 | DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co., Ltd."), | 781 | DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co., Ltd."), |
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index e6f54ffab3ba..e83a11794172 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
| @@ -44,6 +44,14 @@ | |||
| 44 | * i915.i915_enable_fbc parameter | 44 | * i915.i915_enable_fbc parameter |
| 45 | */ | 45 | */ |
| 46 | 46 | ||
| 47 | static bool intel_crtc_active(struct drm_crtc *crtc) | ||
| 48 | { | ||
| 49 | /* Be paranoid as we can arrive here with only partial | ||
| 50 | * state retrieved from the hardware during setup. | ||
| 51 | */ | ||
| 52 | return to_intel_crtc(crtc)->active && crtc->fb && crtc->mode.clock; | ||
| 53 | } | ||
| 54 | |||
| 47 | static void i8xx_disable_fbc(struct drm_device *dev) | 55 | static void i8xx_disable_fbc(struct drm_device *dev) |
| 48 | { | 56 | { |
| 49 | struct drm_i915_private *dev_priv = dev->dev_private; | 57 | struct drm_i915_private *dev_priv = dev->dev_private; |
| @@ -405,9 +413,8 @@ void intel_update_fbc(struct drm_device *dev) | |||
| 405 | * - going to an unsupported config (interlace, pixel multiply, etc.) | 413 | * - going to an unsupported config (interlace, pixel multiply, etc.) |
| 406 | */ | 414 | */ |
| 407 | list_for_each_entry(tmp_crtc, &dev->mode_config.crtc_list, head) { | 415 | list_for_each_entry(tmp_crtc, &dev->mode_config.crtc_list, head) { |
| 408 | if (to_intel_crtc(tmp_crtc)->active && | 416 | if (intel_crtc_active(tmp_crtc) && |
| 409 | !to_intel_crtc(tmp_crtc)->primary_disabled && | 417 | !to_intel_crtc(tmp_crtc)->primary_disabled) { |
| 410 | tmp_crtc->fb) { | ||
| 411 | if (crtc) { | 418 | if (crtc) { |
| 412 | DRM_DEBUG_KMS("more than one pipe active, disabling compression\n"); | 419 | DRM_DEBUG_KMS("more than one pipe active, disabling compression\n"); |
| 413 | dev_priv->no_fbc_reason = FBC_MULTIPLE_PIPES; | 420 | dev_priv->no_fbc_reason = FBC_MULTIPLE_PIPES; |
| @@ -992,7 +999,7 @@ static struct drm_crtc *single_enabled_crtc(struct drm_device *dev) | |||
| 992 | struct drm_crtc *crtc, *enabled = NULL; | 999 | struct drm_crtc *crtc, *enabled = NULL; |
| 993 | 1000 | ||
| 994 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { | 1001 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { |
| 995 | if (to_intel_crtc(crtc)->active && crtc->fb) { | 1002 | if (intel_crtc_active(crtc)) { |
| 996 | if (enabled) | 1003 | if (enabled) |
| 997 | return NULL; | 1004 | return NULL; |
| 998 | enabled = crtc; | 1005 | enabled = crtc; |
| @@ -1086,7 +1093,7 @@ static bool g4x_compute_wm0(struct drm_device *dev, | |||
| 1086 | int entries, tlb_miss; | 1093 | int entries, tlb_miss; |
| 1087 | 1094 | ||
| 1088 | crtc = intel_get_crtc_for_plane(dev, plane); | 1095 | crtc = intel_get_crtc_for_plane(dev, plane); |
| 1089 | if (crtc->fb == NULL || !to_intel_crtc(crtc)->active) { | 1096 | if (!intel_crtc_active(crtc)) { |
| 1090 | *cursor_wm = cursor->guard_size; | 1097 | *cursor_wm = cursor->guard_size; |
| 1091 | *plane_wm = display->guard_size; | 1098 | *plane_wm = display->guard_size; |
| 1092 | return false; | 1099 | return false; |
| @@ -1215,7 +1222,7 @@ static bool vlv_compute_drain_latency(struct drm_device *dev, | |||
| 1215 | int entries; | 1222 | int entries; |
| 1216 | 1223 | ||
| 1217 | crtc = intel_get_crtc_for_plane(dev, plane); | 1224 | crtc = intel_get_crtc_for_plane(dev, plane); |
| 1218 | if (crtc->fb == NULL || !to_intel_crtc(crtc)->active) | 1225 | if (!intel_crtc_active(crtc)) |
| 1219 | return false; | 1226 | return false; |
| 1220 | 1227 | ||
| 1221 | clock = crtc->mode.clock; /* VESA DOT Clock */ | 1228 | clock = crtc->mode.clock; /* VESA DOT Clock */ |
| @@ -1476,7 +1483,7 @@ static void i9xx_update_wm(struct drm_device *dev) | |||
| 1476 | 1483 | ||
| 1477 | fifo_size = dev_priv->display.get_fifo_size(dev, 0); | 1484 | fifo_size = dev_priv->display.get_fifo_size(dev, 0); |
| 1478 | crtc = intel_get_crtc_for_plane(dev, 0); | 1485 | crtc = intel_get_crtc_for_plane(dev, 0); |
| 1479 | if (to_intel_crtc(crtc)->active && crtc->fb) { | 1486 | if (intel_crtc_active(crtc)) { |
| 1480 | int cpp = crtc->fb->bits_per_pixel / 8; | 1487 | int cpp = crtc->fb->bits_per_pixel / 8; |
| 1481 | if (IS_GEN2(dev)) | 1488 | if (IS_GEN2(dev)) |
| 1482 | cpp = 4; | 1489 | cpp = 4; |
| @@ -1490,7 +1497,7 @@ static void i9xx_update_wm(struct drm_device *dev) | |||
| 1490 | 1497 | ||
| 1491 | fifo_size = dev_priv->display.get_fifo_size(dev, 1); | 1498 | fifo_size = dev_priv->display.get_fifo_size(dev, 1); |
| 1492 | crtc = intel_get_crtc_for_plane(dev, 1); | 1499 | crtc = intel_get_crtc_for_plane(dev, 1); |
| 1493 | if (to_intel_crtc(crtc)->active && crtc->fb) { | 1500 | if (intel_crtc_active(crtc)) { |
| 1494 | int cpp = crtc->fb->bits_per_pixel / 8; | 1501 | int cpp = crtc->fb->bits_per_pixel / 8; |
| 1495 | if (IS_GEN2(dev)) | 1502 | if (IS_GEN2(dev)) |
| 1496 | cpp = 4; | 1503 | cpp = 4; |
| @@ -2044,7 +2051,7 @@ sandybridge_compute_sprite_wm(struct drm_device *dev, int plane, | |||
| 2044 | int entries, tlb_miss; | 2051 | int entries, tlb_miss; |
| 2045 | 2052 | ||
| 2046 | crtc = intel_get_crtc_for_plane(dev, plane); | 2053 | crtc = intel_get_crtc_for_plane(dev, plane); |
| 2047 | if (crtc->fb == NULL || !to_intel_crtc(crtc)->active) { | 2054 | if (!intel_crtc_active(crtc)) { |
| 2048 | *sprite_wm = display->guard_size; | 2055 | *sprite_wm = display->guard_size; |
| 2049 | return false; | 2056 | return false; |
| 2050 | } | 2057 | } |
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index 827dcd4edf1c..d7b060e0a231 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c | |||
| @@ -120,11 +120,10 @@ ivb_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb, | |||
| 120 | I915_WRITE(SPRSTRIDE(pipe), fb->pitches[0]); | 120 | I915_WRITE(SPRSTRIDE(pipe), fb->pitches[0]); |
| 121 | I915_WRITE(SPRPOS(pipe), (crtc_y << 16) | crtc_x); | 121 | I915_WRITE(SPRPOS(pipe), (crtc_y << 16) | crtc_x); |
| 122 | 122 | ||
| 123 | linear_offset = y * fb->pitches[0] + x * (fb->bits_per_pixel / 8); | 123 | linear_offset = y * fb->pitches[0] + x * pixel_size; |
| 124 | sprsurf_offset = | 124 | sprsurf_offset = |
| 125 | intel_gen4_compute_offset_xtiled(&x, &y, | 125 | intel_gen4_compute_offset_xtiled(&x, &y, |
| 126 | fb->bits_per_pixel / 8, | 126 | pixel_size, fb->pitches[0]); |
| 127 | fb->pitches[0]); | ||
| 128 | linear_offset -= sprsurf_offset; | 127 | linear_offset -= sprsurf_offset; |
| 129 | 128 | ||
| 130 | /* HSW consolidates SPRTILEOFF and SPRLINOFF into a single SPROFFSET | 129 | /* HSW consolidates SPRTILEOFF and SPRLINOFF into a single SPROFFSET |
| @@ -286,11 +285,10 @@ ilk_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb, | |||
| 286 | I915_WRITE(DVSSTRIDE(pipe), fb->pitches[0]); | 285 | I915_WRITE(DVSSTRIDE(pipe), fb->pitches[0]); |
| 287 | I915_WRITE(DVSPOS(pipe), (crtc_y << 16) | crtc_x); | 286 | I915_WRITE(DVSPOS(pipe), (crtc_y << 16) | crtc_x); |
| 288 | 287 | ||
| 289 | linear_offset = y * fb->pitches[0] + x * (fb->bits_per_pixel / 8); | 288 | linear_offset = y * fb->pitches[0] + x * pixel_size; |
| 290 | dvssurf_offset = | 289 | dvssurf_offset = |
| 291 | intel_gen4_compute_offset_xtiled(&x, &y, | 290 | intel_gen4_compute_offset_xtiled(&x, &y, |
| 292 | fb->bits_per_pixel / 8, | 291 | pixel_size, fb->pitches[0]); |
| 293 | fb->pitches[0]); | ||
| 294 | linear_offset -= dvssurf_offset; | 292 | linear_offset -= dvssurf_offset; |
| 295 | 293 | ||
| 296 | if (obj->tiling_mode != I915_TILING_NONE) | 294 | if (obj->tiling_mode != I915_TILING_NONE) |
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c index 1e910117b0a2..122b571ccc7c 100644 --- a/drivers/gpu/drm/mgag200/mgag200_drv.c +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c | |||
| @@ -60,8 +60,7 @@ static void mgag200_kick_out_firmware_fb(struct pci_dev *pdev) | |||
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | 62 | ||
| 63 | static int __devinit | 63 | static int mga_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 64 | mga_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | ||
| 65 | { | 64 | { |
| 66 | mgag200_kick_out_firmware_fb(pdev); | 65 | mgag200_kick_out_firmware_fb(pdev); |
| 67 | 66 | ||
diff --git a/drivers/gpu/drm/nouveau/core/core/client.c b/drivers/gpu/drm/nouveau/core/core/client.c index c617f0480071..8bbb58f94a19 100644 --- a/drivers/gpu/drm/nouveau/core/core/client.c +++ b/drivers/gpu/drm/nouveau/core/core/client.c | |||
| @@ -66,10 +66,8 @@ nouveau_client_create_(const char *name, u64 devname, const char *cfg, | |||
| 66 | 66 | ||
| 67 | ret = nouveau_handle_create(nv_object(client), ~0, ~0, | 67 | ret = nouveau_handle_create(nv_object(client), ~0, ~0, |
| 68 | nv_object(client), &client->root); | 68 | nv_object(client), &client->root); |
| 69 | if (ret) { | 69 | if (ret) |
| 70 | nouveau_namedb_destroy(&client->base); | ||
| 71 | return ret; | 70 | return ret; |
| 72 | } | ||
| 73 | 71 | ||
| 74 | /* prevent init/fini being called, os in in charge of this */ | 72 | /* prevent init/fini being called, os in in charge of this */ |
| 75 | atomic_set(&nv_object(client)->usecount, 2); | 73 | atomic_set(&nv_object(client)->usecount, 2); |
diff --git a/drivers/gpu/drm/nouveau/core/core/handle.c b/drivers/gpu/drm/nouveau/core/core/handle.c index b8d2cbf8a7a7..264c2b338ac3 100644 --- a/drivers/gpu/drm/nouveau/core/core/handle.c +++ b/drivers/gpu/drm/nouveau/core/core/handle.c | |||
| @@ -109,7 +109,7 @@ nouveau_handle_create(struct nouveau_object *parent, u32 _parent, u32 _handle, | |||
| 109 | while (!nv_iclass(namedb, NV_NAMEDB_CLASS)) | 109 | while (!nv_iclass(namedb, NV_NAMEDB_CLASS)) |
| 110 | namedb = namedb->parent; | 110 | namedb = namedb->parent; |
| 111 | 111 | ||
| 112 | handle = *phandle = kzalloc(sizeof(*handle), GFP_KERNEL); | 112 | handle = kzalloc(sizeof(*handle), GFP_KERNEL); |
| 113 | if (!handle) | 113 | if (!handle) |
| 114 | return -ENOMEM; | 114 | return -ENOMEM; |
| 115 | 115 | ||
| @@ -146,6 +146,9 @@ nouveau_handle_create(struct nouveau_object *parent, u32 _parent, u32 _handle, | |||
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | hprintk(handle, TRACE, "created\n"); | 148 | hprintk(handle, TRACE, "created\n"); |
| 149 | |||
| 150 | *phandle = handle; | ||
| 151 | |||
| 149 | return 0; | 152 | return 0; |
| 150 | } | 153 | } |
| 151 | 154 | ||
diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c index 0f09af135415..ca1a7d76a95b 100644 --- a/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c +++ b/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c | |||
| @@ -851,20 +851,23 @@ exec_script(struct nv50_disp_priv *priv, int head, int id) | |||
| 851 | for (i = 0; !(ctrl & (1 << head)) && i < 3; i++) | 851 | for (i = 0; !(ctrl & (1 << head)) && i < 3; i++) |
| 852 | ctrl = nv_rd32(priv, 0x610b5c + (i * 8)); | 852 | ctrl = nv_rd32(priv, 0x610b5c + (i * 8)); |
| 853 | 853 | ||
| 854 | if (nv_device(priv)->chipset < 0x90 || | 854 | if (!(ctrl & (1 << head))) { |
| 855 | nv_device(priv)->chipset == 0x92 || | 855 | if (nv_device(priv)->chipset < 0x90 || |
| 856 | nv_device(priv)->chipset == 0xa0) { | 856 | nv_device(priv)->chipset == 0x92 || |
| 857 | for (i = 0; !(ctrl & (1 << head)) && i < 2; i++) | 857 | nv_device(priv)->chipset == 0xa0) { |
| 858 | ctrl = nv_rd32(priv, 0x610b74 + (i * 8)); | 858 | for (i = 0; !(ctrl & (1 << head)) && i < 2; i++) |
| 859 | i += 3; | 859 | ctrl = nv_rd32(priv, 0x610b74 + (i * 8)); |
| 860 | } else { | 860 | i += 4; |
| 861 | for (i = 0; !(ctrl & (1 << head)) && i < 4; i++) | 861 | } else { |
| 862 | ctrl = nv_rd32(priv, 0x610798 + (i * 8)); | 862 | for (i = 0; !(ctrl & (1 << head)) && i < 4; i++) |
| 863 | i += 3; | 863 | ctrl = nv_rd32(priv, 0x610798 + (i * 8)); |
| 864 | i += 4; | ||
| 865 | } | ||
| 864 | } | 866 | } |
| 865 | 867 | ||
| 866 | if (!(ctrl & (1 << head))) | 868 | if (!(ctrl & (1 << head))) |
| 867 | return false; | 869 | return false; |
| 870 | i--; | ||
| 868 | 871 | ||
| 869 | data = exec_lookup(priv, head, i, ctrl, &dcb, &ver, &hdr, &cnt, &len, &info); | 872 | data = exec_lookup(priv, head, i, ctrl, &dcb, &ver, &hdr, &cnt, &len, &info); |
| 870 | if (data) { | 873 | if (data) { |
| @@ -898,20 +901,23 @@ exec_clkcmp(struct nv50_disp_priv *priv, int head, int id, u32 pclk, | |||
| 898 | for (i = 0; !(ctrl & (1 << head)) && i < 3; i++) | 901 | for (i = 0; !(ctrl & (1 << head)) && i < 3; i++) |
| 899 | ctrl = nv_rd32(priv, 0x610b58 + (i * 8)); | 902 | ctrl = nv_rd32(priv, 0x610b58 + (i * 8)); |
| 900 | 903 | ||
| 901 | if (nv_device(priv)->chipset < 0x90 || | 904 | if (!(ctrl & (1 << head))) { |
| 902 | nv_device(priv)->chipset == 0x92 || | 905 | if (nv_device(priv)->chipset < 0x90 || |
| 903 | nv_device(priv)->chipset == 0xa0) { | 906 | nv_device(priv)->chipset == 0x92 || |
| 904 | for (i = 0; !(ctrl & (1 << head)) && i < 2; i++) | 907 | nv_device(priv)->chipset == 0xa0) { |
| 905 | ctrl = nv_rd32(priv, 0x610b70 + (i * 8)); | 908 | for (i = 0; !(ctrl & (1 << head)) && i < 2; i++) |
| 906 | i += 3; | 909 | ctrl = nv_rd32(priv, 0x610b70 + (i * 8)); |
| 907 | } else { | 910 | i += 4; |
| 908 | for (i = 0; !(ctrl & (1 << head)) && i < 4; i++) | 911 | } else { |
| 909 | ctrl = nv_rd32(priv, 0x610794 + (i * 8)); | 912 | for (i = 0; !(ctrl & (1 << head)) && i < 4; i++) |
| 910 | i += 3; | 913 | ctrl = nv_rd32(priv, 0x610794 + (i * 8)); |
| 914 | i += 4; | ||
| 915 | } | ||
| 911 | } | 916 | } |
| 912 | 917 | ||
| 913 | if (!(ctrl & (1 << head))) | 918 | if (!(ctrl & (1 << head))) |
| 914 | return 0x0000; | 919 | return 0x0000; |
| 920 | i--; | ||
| 915 | 921 | ||
| 916 | data = exec_lookup(priv, head, i, ctrl, outp, &ver, &hdr, &cnt, &len, &info1); | 922 | data = exec_lookup(priv, head, i, ctrl, outp, &ver, &hdr, &cnt, &len, &info1); |
| 917 | if (!data) | 923 | if (!data) |
diff --git a/drivers/gpu/drm/nouveau/core/include/core/client.h b/drivers/gpu/drm/nouveau/core/include/core/client.h index 0193532ceac9..63acc0346ff2 100644 --- a/drivers/gpu/drm/nouveau/core/include/core/client.h +++ b/drivers/gpu/drm/nouveau/core/include/core/client.h | |||
| @@ -36,6 +36,9 @@ nouveau_client(void *obj) | |||
| 36 | 36 | ||
| 37 | int nouveau_client_create_(const char *name, u64 device, const char *cfg, | 37 | int nouveau_client_create_(const char *name, u64 device, const char *cfg, |
| 38 | const char *dbg, int, void **); | 38 | const char *dbg, int, void **); |
| 39 | #define nouveau_client_destroy(p) \ | ||
| 40 | nouveau_namedb_destroy(&(p)->base) | ||
| 41 | |||
| 39 | int nouveau_client_init(struct nouveau_client *); | 42 | int nouveau_client_init(struct nouveau_client *); |
| 40 | int nouveau_client_fini(struct nouveau_client *, bool suspend); | 43 | int nouveau_client_fini(struct nouveau_client *, bool suspend); |
| 41 | 44 | ||
diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/bios/pll.h b/drivers/gpu/drm/nouveau/core/include/subdev/bios/pll.h index c345097592f2..b2f3d4d0aa49 100644 --- a/drivers/gpu/drm/nouveau/core/include/subdev/bios/pll.h +++ b/drivers/gpu/drm/nouveau/core/include/subdev/bios/pll.h | |||
| @@ -38,6 +38,8 @@ enum nvbios_pll_type { | |||
| 38 | PLL_UNK42 = 0x42, | 38 | PLL_UNK42 = 0x42, |
| 39 | PLL_VPLL0 = 0x80, | 39 | PLL_VPLL0 = 0x80, |
| 40 | PLL_VPLL1 = 0x81, | 40 | PLL_VPLL1 = 0x81, |
| 41 | PLL_VPLL2 = 0x82, | ||
| 42 | PLL_VPLL3 = 0x83, | ||
| 41 | PLL_MAX = 0xff | 43 | PLL_MAX = 0xff |
| 42 | }; | 44 | }; |
| 43 | 45 | ||
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c index 2917d552689b..690ed438b2ad 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c | |||
| @@ -1534,7 +1534,6 @@ init_io(struct nvbios_init *init) | |||
| 1534 | mdelay(10); | 1534 | mdelay(10); |
| 1535 | init_wr32(init, 0x614100, 0x10000018); | 1535 | init_wr32(init, 0x614100, 0x10000018); |
| 1536 | init_wr32(init, 0x614900, 0x10000018); | 1536 | init_wr32(init, 0x614900, 0x10000018); |
| 1537 | return; | ||
| 1538 | } | 1537 | } |
| 1539 | 1538 | ||
| 1540 | value = init_rdport(init, port) & mask; | 1539 | value = init_rdport(init, port) & mask; |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/clock/nvc0.c b/drivers/gpu/drm/nouveau/core/subdev/clock/nvc0.c index f6962c9b6c36..7c9626258a46 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/clock/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/subdev/clock/nvc0.c | |||
| @@ -52,6 +52,8 @@ nvc0_clock_pll_set(struct nouveau_clock *clk, u32 type, u32 freq) | |||
| 52 | switch (info.type) { | 52 | switch (info.type) { |
| 53 | case PLL_VPLL0: | 53 | case PLL_VPLL0: |
| 54 | case PLL_VPLL1: | 54 | case PLL_VPLL1: |
| 55 | case PLL_VPLL2: | ||
| 56 | case PLL_VPLL3: | ||
| 55 | nv_mask(priv, info.reg + 0x0c, 0x00000000, 0x00000100); | 57 | nv_mask(priv, info.reg + 0x0c, 0x00000000, 0x00000100); |
| 56 | nv_wr32(priv, info.reg + 0x04, (P << 16) | (N << 8) | M); | 58 | nv_wr32(priv, info.reg + 0x04, (P << 16) | (N << 8) | M); |
| 57 | nv_wr32(priv, info.reg + 0x10, fN << 16); | 59 | nv_wr32(priv, info.reg + 0x10, fN << 16); |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c index 306bdf121452..7606ed15b6fa 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c | |||
| @@ -145,14 +145,14 @@ nvc0_fb_vram_new(struct nouveau_fb *pfb, u64 size, u32 align, u32 ncmin, | |||
| 145 | mem->memtype = type; | 145 | mem->memtype = type; |
| 146 | mem->size = size; | 146 | mem->size = size; |
| 147 | 147 | ||
| 148 | mutex_lock(&mm->mutex); | 148 | mutex_lock(&pfb->base.mutex); |
| 149 | do { | 149 | do { |
| 150 | if (back) | 150 | if (back) |
| 151 | ret = nouveau_mm_tail(mm, 1, size, ncmin, align, &r); | 151 | ret = nouveau_mm_tail(mm, 1, size, ncmin, align, &r); |
| 152 | else | 152 | else |
| 153 | ret = nouveau_mm_head(mm, 1, size, ncmin, align, &r); | 153 | ret = nouveau_mm_head(mm, 1, size, ncmin, align, &r); |
| 154 | if (ret) { | 154 | if (ret) { |
| 155 | mutex_unlock(&mm->mutex); | 155 | mutex_unlock(&pfb->base.mutex); |
| 156 | pfb->ram.put(pfb, &mem); | 156 | pfb->ram.put(pfb, &mem); |
| 157 | return ret; | 157 | return ret; |
| 158 | } | 158 | } |
| @@ -160,7 +160,7 @@ nvc0_fb_vram_new(struct nouveau_fb *pfb, u64 size, u32 align, u32 ncmin, | |||
| 160 | list_add_tail(&r->rl_entry, &mem->regions); | 160 | list_add_tail(&r->rl_entry, &mem->regions); |
| 161 | size -= r->length; | 161 | size -= r->length; |
| 162 | } while (size); | 162 | } while (size); |
| 163 | mutex_unlock(&mm->mutex); | 163 | mutex_unlock(&pfb->base.mutex); |
| 164 | 164 | ||
| 165 | r = list_first_entry(&mem->regions, struct nouveau_mm_node, rl_entry); | 165 | r = list_first_entry(&mem->regions, struct nouveau_mm_node, rl_entry); |
| 166 | mem->offset = (u64)r->offset << 12; | 166 | mem->offset = (u64)r->offset << 12; |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/instmem/base.c b/drivers/gpu/drm/nouveau/core/subdev/instmem/base.c index 1188227ca6aa..6565f3dbbe04 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/instmem/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/instmem/base.c | |||
| @@ -40,15 +40,21 @@ nouveau_instobj_create_(struct nouveau_object *parent, | |||
| 40 | if (ret) | 40 | if (ret) |
| 41 | return ret; | 41 | return ret; |
| 42 | 42 | ||
| 43 | mutex_lock(&imem->base.mutex); | ||
| 43 | list_add(&iobj->head, &imem->list); | 44 | list_add(&iobj->head, &imem->list); |
| 45 | mutex_unlock(&imem->base.mutex); | ||
| 44 | return 0; | 46 | return 0; |
| 45 | } | 47 | } |
| 46 | 48 | ||
| 47 | void | 49 | void |
| 48 | nouveau_instobj_destroy(struct nouveau_instobj *iobj) | 50 | nouveau_instobj_destroy(struct nouveau_instobj *iobj) |
| 49 | { | 51 | { |
| 50 | if (iobj->head.prev) | 52 | struct nouveau_subdev *subdev = nv_subdev(iobj->base.engine); |
| 51 | list_del(&iobj->head); | 53 | |
| 54 | mutex_lock(&subdev->mutex); | ||
| 55 | list_del(&iobj->head); | ||
| 56 | mutex_unlock(&subdev->mutex); | ||
| 57 | |||
| 52 | return nouveau_object_destroy(&iobj->base); | 58 | return nouveau_object_destroy(&iobj->base); |
| 53 | } | 59 | } |
| 54 | 60 | ||
| @@ -88,6 +94,8 @@ nouveau_instmem_init(struct nouveau_instmem *imem) | |||
| 88 | if (ret) | 94 | if (ret) |
| 89 | return ret; | 95 | return ret; |
| 90 | 96 | ||
| 97 | mutex_lock(&imem->base.mutex); | ||
| 98 | |||
| 91 | list_for_each_entry(iobj, &imem->list, head) { | 99 | list_for_each_entry(iobj, &imem->list, head) { |
| 92 | if (iobj->suspend) { | 100 | if (iobj->suspend) { |
| 93 | for (i = 0; i < iobj->size; i += 4) | 101 | for (i = 0; i < iobj->size; i += 4) |
| @@ -97,6 +105,8 @@ nouveau_instmem_init(struct nouveau_instmem *imem) | |||
| 97 | } | 105 | } |
| 98 | } | 106 | } |
| 99 | 107 | ||
| 108 | mutex_unlock(&imem->base.mutex); | ||
| 109 | |||
| 100 | return 0; | 110 | return 0; |
| 101 | } | 111 | } |
| 102 | 112 | ||
| @@ -104,17 +114,26 @@ int | |||
| 104 | nouveau_instmem_fini(struct nouveau_instmem *imem, bool suspend) | 114 | nouveau_instmem_fini(struct nouveau_instmem *imem, bool suspend) |
| 105 | { | 115 | { |
| 106 | struct nouveau_instobj *iobj; | 116 | struct nouveau_instobj *iobj; |
| 107 | int i; | 117 | int i, ret = 0; |
| 108 | 118 | ||
| 109 | if (suspend) { | 119 | if (suspend) { |
| 120 | mutex_lock(&imem->base.mutex); | ||
| 121 | |||
| 110 | list_for_each_entry(iobj, &imem->list, head) { | 122 | list_for_each_entry(iobj, &imem->list, head) { |
| 111 | iobj->suspend = vmalloc(iobj->size); | 123 | iobj->suspend = vmalloc(iobj->size); |
| 112 | if (iobj->suspend) { | 124 | if (!iobj->suspend) { |
| 113 | for (i = 0; i < iobj->size; i += 4) | 125 | ret = -ENOMEM; |
| 114 | iobj->suspend[i / 4] = nv_ro32(iobj, i); | 126 | break; |
| 115 | } else | 127 | } |
| 116 | return -ENOMEM; | 128 | |
| 129 | for (i = 0; i < iobj->size; i += 4) | ||
| 130 | iobj->suspend[i / 4] = nv_ro32(iobj, i); | ||
| 117 | } | 131 | } |
| 132 | |||
| 133 | mutex_unlock(&imem->base.mutex); | ||
| 134 | |||
| 135 | if (ret) | ||
| 136 | return ret; | ||
| 118 | } | 137 | } |
| 119 | 138 | ||
| 120 | return nouveau_subdev_fini(&imem->base, suspend); | 139 | return nouveau_subdev_fini(&imem->base, suspend); |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/vm/base.c b/drivers/gpu/drm/nouveau/core/subdev/vm/base.c index 082c11b75acb..77c67fc970e6 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/vm/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/vm/base.c | |||
| @@ -352,7 +352,7 @@ nouveau_vm_create(struct nouveau_vmmgr *vmm, u64 offset, u64 length, | |||
| 352 | u64 mm_length = (offset + length) - mm_offset; | 352 | u64 mm_length = (offset + length) - mm_offset; |
| 353 | int ret; | 353 | int ret; |
| 354 | 354 | ||
| 355 | vm = *pvm = kzalloc(sizeof(*vm), GFP_KERNEL); | 355 | vm = kzalloc(sizeof(*vm), GFP_KERNEL); |
| 356 | if (!vm) | 356 | if (!vm) |
| 357 | return -ENOMEM; | 357 | return -ENOMEM; |
| 358 | 358 | ||
| @@ -376,6 +376,8 @@ nouveau_vm_create(struct nouveau_vmmgr *vmm, u64 offset, u64 length, | |||
| 376 | return ret; | 376 | return ret; |
| 377 | } | 377 | } |
| 378 | 378 | ||
| 379 | *pvm = vm; | ||
| 380 | |||
| 379 | return 0; | 381 | return 0; |
| 380 | } | 382 | } |
| 381 | 383 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 5614c89148cb..69d7b1d0b9d6 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
| @@ -1276,7 +1276,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) | |||
| 1276 | if (drm->agp.stat == ENABLED) { | 1276 | if (drm->agp.stat == ENABLED) { |
| 1277 | mem->bus.offset = mem->start << PAGE_SHIFT; | 1277 | mem->bus.offset = mem->start << PAGE_SHIFT; |
| 1278 | mem->bus.base = drm->agp.base; | 1278 | mem->bus.base = drm->agp.base; |
| 1279 | mem->bus.is_iomem = true; | 1279 | mem->bus.is_iomem = !dev->agp->cant_use_aperture; |
| 1280 | } | 1280 | } |
| 1281 | #endif | 1281 | #endif |
| 1282 | break; | 1282 | break; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index ac340ba32017..e620ba8271b4 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c | |||
| @@ -127,12 +127,26 @@ nouveau_connector_ddc_detect(struct drm_connector *connector, | |||
| 127 | struct nouveau_encoder **pnv_encoder) | 127 | struct nouveau_encoder **pnv_encoder) |
| 128 | { | 128 | { |
| 129 | struct drm_device *dev = connector->dev; | 129 | struct drm_device *dev = connector->dev; |
| 130 | struct nouveau_connector *nv_connector = nouveau_connector(connector); | ||
| 130 | struct nouveau_drm *drm = nouveau_drm(dev); | 131 | struct nouveau_drm *drm = nouveau_drm(dev); |
| 132 | struct nouveau_gpio *gpio = nouveau_gpio(drm->device); | ||
| 131 | struct nouveau_i2c *i2c = nouveau_i2c(drm->device); | 133 | struct nouveau_i2c *i2c = nouveau_i2c(drm->device); |
| 132 | int i; | 134 | struct nouveau_i2c_port *port = NULL; |
| 135 | int i, panel = -ENODEV; | ||
| 136 | |||
| 137 | /* eDP panels need powering on by us (if the VBIOS doesn't default it | ||
| 138 | * to on) before doing any AUX channel transactions. LVDS panel power | ||
| 139 | * is handled by the SOR itself, and not required for LVDS DDC. | ||
| 140 | */ | ||
| 141 | if (nv_connector->type == DCB_CONNECTOR_eDP) { | ||
| 142 | panel = gpio->get(gpio, 0, DCB_GPIO_PANEL_POWER, 0xff); | ||
| 143 | if (panel == 0) { | ||
| 144 | gpio->set(gpio, 0, DCB_GPIO_PANEL_POWER, 0xff, 1); | ||
| 145 | msleep(300); | ||
| 146 | } | ||
| 147 | } | ||
| 133 | 148 | ||
| 134 | for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) { | 149 | for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) { |
| 135 | struct nouveau_i2c_port *port = NULL; | ||
| 136 | struct nouveau_encoder *nv_encoder; | 150 | struct nouveau_encoder *nv_encoder; |
| 137 | struct drm_mode_object *obj; | 151 | struct drm_mode_object *obj; |
| 138 | int id; | 152 | int id; |
| @@ -150,11 +164,19 @@ nouveau_connector_ddc_detect(struct drm_connector *connector, | |||
| 150 | port = i2c->find(i2c, nv_encoder->dcb->i2c_index); | 164 | port = i2c->find(i2c, nv_encoder->dcb->i2c_index); |
| 151 | if (port && nv_probe_i2c(port, 0x50)) { | 165 | if (port && nv_probe_i2c(port, 0x50)) { |
| 152 | *pnv_encoder = nv_encoder; | 166 | *pnv_encoder = nv_encoder; |
| 153 | return port; | 167 | break; |
| 154 | } | 168 | } |
| 169 | |||
| 170 | port = NULL; | ||
| 155 | } | 171 | } |
| 156 | 172 | ||
| 157 | return NULL; | 173 | /* eDP panel not detected, restore panel power GPIO to previous |
| 174 | * state to avoid confusing the SOR for other output types. | ||
| 175 | */ | ||
| 176 | if (!port && panel == 0) | ||
| 177 | gpio->set(gpio, 0, DCB_GPIO_PANEL_POWER, 0xff, panel); | ||
| 178 | |||
| 179 | return port; | ||
| 158 | } | 180 | } |
| 159 | 181 | ||
| 160 | static struct nouveau_encoder * | 182 | static struct nouveau_encoder * |
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index e4188f24fc75..508b00a2ce0d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c | |||
| @@ -225,15 +225,6 @@ nouveau_display_init(struct drm_device *dev) | |||
| 225 | if (ret) | 225 | if (ret) |
| 226 | return ret; | 226 | return ret; |
| 227 | 227 | ||
| 228 | /* power on internal panel if it's not already. the init tables of | ||
| 229 | * some vbios default this to off for some reason, causing the | ||
| 230 | * panel to not work after resume | ||
| 231 | */ | ||
| 232 | if (gpio && gpio->get(gpio, 0, DCB_GPIO_PANEL_POWER, 0xff) == 0) { | ||
| 233 | gpio->set(gpio, 0, DCB_GPIO_PANEL_POWER, 0xff, 1); | ||
| 234 | msleep(300); | ||
| 235 | } | ||
| 236 | |||
| 237 | /* enable polling for external displays */ | 228 | /* enable polling for external displays */ |
| 238 | drm_kms_helper_poll_enable(dev); | 229 | drm_kms_helper_poll_enable(dev); |
| 239 | 230 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 01c403ddb99b..8b090f1eb51d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c | |||
| @@ -84,11 +84,16 @@ nouveau_cli_create(struct pci_dev *pdev, const char *name, | |||
| 84 | struct nouveau_cli *cli; | 84 | struct nouveau_cli *cli; |
| 85 | int ret; | 85 | int ret; |
| 86 | 86 | ||
| 87 | *pcli = NULL; | ||
| 87 | ret = nouveau_client_create_(name, nouveau_name(pdev), nouveau_config, | 88 | ret = nouveau_client_create_(name, nouveau_name(pdev), nouveau_config, |
| 88 | nouveau_debug, size, pcli); | 89 | nouveau_debug, size, pcli); |
| 89 | cli = *pcli; | 90 | cli = *pcli; |
| 90 | if (ret) | 91 | if (ret) { |
| 92 | if (cli) | ||
| 93 | nouveau_client_destroy(&cli->base); | ||
| 94 | *pcli = NULL; | ||
| 91 | return ret; | 95 | return ret; |
| 96 | } | ||
| 92 | 97 | ||
| 93 | mutex_init(&cli->mutex); | 98 | mutex_init(&cli->mutex); |
| 94 | return 0; | 99 | return 0; |
| @@ -189,8 +194,8 @@ nouveau_accel_init(struct nouveau_drm *drm) | |||
| 189 | nouveau_bo_move_init(drm); | 194 | nouveau_bo_move_init(drm); |
| 190 | } | 195 | } |
| 191 | 196 | ||
| 192 | static int __devinit | 197 | static int nouveau_drm_probe(struct pci_dev *pdev, |
| 193 | nouveau_drm_probe(struct pci_dev *pdev, const struct pci_device_id *pent) | 198 | const struct pci_device_id *pent) |
| 194 | { | 199 | { |
| 195 | struct nouveau_device *device; | 200 | struct nouveau_device *device; |
| 196 | struct apertures_struct *aper; | 201 | struct apertures_struct *aper; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.h b/drivers/gpu/drm/nouveau/nouveau_fence.h index bedafd1c9539..cdb83acdffe2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.h +++ b/drivers/gpu/drm/nouveau/nouveau_fence.h | |||
| @@ -60,6 +60,7 @@ u32 nv10_fence_read(struct nouveau_channel *); | |||
| 60 | void nv10_fence_context_del(struct nouveau_channel *); | 60 | void nv10_fence_context_del(struct nouveau_channel *); |
| 61 | void nv10_fence_destroy(struct nouveau_drm *); | 61 | void nv10_fence_destroy(struct nouveau_drm *); |
| 62 | int nv10_fence_create(struct nouveau_drm *); | 62 | int nv10_fence_create(struct nouveau_drm *); |
| 63 | void nv17_fence_resume(struct nouveau_drm *drm); | ||
| 63 | 64 | ||
| 64 | int nv50_fence_create(struct nouveau_drm *); | 65 | int nv50_fence_create(struct nouveau_drm *); |
| 65 | int nv84_fence_create(struct nouveau_drm *); | 66 | int nv84_fence_create(struct nouveau_drm *); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c index 5566172774df..a701ff5ffa5b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c | |||
| @@ -698,10 +698,10 @@ static int | |||
| 698 | nouveau_hwmon_init(struct drm_device *dev) | 698 | nouveau_hwmon_init(struct drm_device *dev) |
| 699 | { | 699 | { |
| 700 | struct nouveau_pm *pm = nouveau_pm(dev); | 700 | struct nouveau_pm *pm = nouveau_pm(dev); |
| 701 | struct nouveau_drm *drm = nouveau_drm(dev); | ||
| 702 | struct nouveau_therm *therm = nouveau_therm(drm->device); | ||
| 703 | 701 | ||
| 704 | #if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE)) | 702 | #if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE)) |
| 703 | struct nouveau_drm *drm = nouveau_drm(dev); | ||
| 704 | struct nouveau_therm *therm = nouveau_therm(drm->device); | ||
| 705 | struct device *hwmon_dev; | 705 | struct device *hwmon_dev; |
| 706 | int ret = 0; | 706 | int ret = 0; |
| 707 | 707 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_prime.c b/drivers/gpu/drm/nouveau/nouveau_prime.c index 3543fec2355e..b8e05ae38212 100644 --- a/drivers/gpu/drm/nouveau/nouveau_prime.c +++ b/drivers/gpu/drm/nouveau/nouveau_prime.c | |||
| @@ -193,6 +193,7 @@ struct drm_gem_object *nouveau_gem_prime_import(struct drm_device *dev, | |||
| 193 | if (nvbo->gem) { | 193 | if (nvbo->gem) { |
| 194 | if (nvbo->gem->dev == dev) { | 194 | if (nvbo->gem->dev == dev) { |
| 195 | drm_gem_object_reference(nvbo->gem); | 195 | drm_gem_object_reference(nvbo->gem); |
| 196 | dma_buf_put(dma_buf); | ||
| 196 | return nvbo->gem; | 197 | return nvbo->gem; |
| 197 | } | 198 | } |
| 198 | } | 199 | } |
diff --git a/drivers/gpu/drm/nouveau/nv04_dfp.c b/drivers/gpu/drm/nouveau/nv04_dfp.c index 184cdf806761..39ffc07f906b 100644 --- a/drivers/gpu/drm/nouveau/nv04_dfp.c +++ b/drivers/gpu/drm/nouveau/nv04_dfp.c | |||
| @@ -505,7 +505,7 @@ static void nv04_dfp_update_backlight(struct drm_encoder *encoder, int mode) | |||
| 505 | 505 | ||
| 506 | static inline bool is_powersaving_dpms(int mode) | 506 | static inline bool is_powersaving_dpms(int mode) |
| 507 | { | 507 | { |
| 508 | return (mode != DRM_MODE_DPMS_ON); | 508 | return mode != DRM_MODE_DPMS_ON && mode != NV_DPMS_CLEARED; |
| 509 | } | 509 | } |
| 510 | 510 | ||
| 511 | static void nv04_lvds_dpms(struct drm_encoder *encoder, int mode) | 511 | static void nv04_lvds_dpms(struct drm_encoder *encoder, int mode) |
diff --git a/drivers/gpu/drm/nouveau/nv10_fence.c b/drivers/gpu/drm/nouveau/nv10_fence.c index 7ae7f97a6d4d..03017f24d593 100644 --- a/drivers/gpu/drm/nouveau/nv10_fence.c +++ b/drivers/gpu/drm/nouveau/nv10_fence.c | |||
| @@ -162,6 +162,13 @@ nv10_fence_destroy(struct nouveau_drm *drm) | |||
| 162 | kfree(priv); | 162 | kfree(priv); |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | void nv17_fence_resume(struct nouveau_drm *drm) | ||
| 166 | { | ||
| 167 | struct nv10_fence_priv *priv = drm->fence; | ||
| 168 | |||
| 169 | nouveau_bo_wr32(priv->bo, 0, priv->sequence); | ||
| 170 | } | ||
| 171 | |||
| 165 | int | 172 | int |
| 166 | nv10_fence_create(struct nouveau_drm *drm) | 173 | nv10_fence_create(struct nouveau_drm *drm) |
| 167 | { | 174 | { |
| @@ -197,6 +204,7 @@ nv10_fence_create(struct nouveau_drm *drm) | |||
| 197 | if (ret == 0) { | 204 | if (ret == 0) { |
| 198 | nouveau_bo_wr32(priv->bo, 0x000, 0x00000000); | 205 | nouveau_bo_wr32(priv->bo, 0x000, 0x00000000); |
| 199 | priv->base.sync = nv17_fence_sync; | 206 | priv->base.sync = nv17_fence_sync; |
| 207 | priv->base.resume = nv17_fence_resume; | ||
| 200 | } | 208 | } |
| 201 | } | 209 | } |
| 202 | 210 | ||
diff --git a/drivers/gpu/drm/nouveau/nv50_fence.c b/drivers/gpu/drm/nouveau/nv50_fence.c index c20f2727ea0b..d889f3ac0d41 100644 --- a/drivers/gpu/drm/nouveau/nv50_fence.c +++ b/drivers/gpu/drm/nouveau/nv50_fence.c | |||
| @@ -122,6 +122,7 @@ nv50_fence_create(struct nouveau_drm *drm) | |||
| 122 | if (ret == 0) { | 122 | if (ret == 0) { |
| 123 | nouveau_bo_wr32(priv->bo, 0x000, 0x00000000); | 123 | nouveau_bo_wr32(priv->bo, 0x000, 0x00000000); |
| 124 | priv->base.sync = nv17_fence_sync; | 124 | priv->base.sync = nv17_fence_sync; |
| 125 | priv->base.resume = nv17_fence_resume; | ||
| 125 | } | 126 | } |
| 126 | 127 | ||
| 127 | if (ret) | 128 | if (ret) |
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index f95d7fc1f5e0..061fa0a28900 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
| @@ -2306,22 +2306,20 @@ bool evergreen_gpu_is_lockup(struct radeon_device *rdev, struct radeon_ring *rin | |||
| 2306 | return radeon_ring_test_lockup(rdev, ring); | 2306 | return radeon_ring_test_lockup(rdev, ring); |
| 2307 | } | 2307 | } |
| 2308 | 2308 | ||
| 2309 | static int evergreen_gpu_soft_reset(struct radeon_device *rdev) | 2309 | static void evergreen_gpu_soft_reset_gfx(struct radeon_device *rdev) |
| 2310 | { | 2310 | { |
| 2311 | struct evergreen_mc_save save; | ||
| 2312 | u32 grbm_reset = 0; | 2311 | u32 grbm_reset = 0; |
| 2313 | 2312 | ||
| 2314 | if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE)) | 2313 | if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE)) |
| 2315 | return 0; | 2314 | return; |
| 2316 | 2315 | ||
| 2317 | dev_info(rdev->dev, "GPU softreset \n"); | 2316 | dev_info(rdev->dev, " GRBM_STATUS = 0x%08X\n", |
| 2318 | dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n", | ||
| 2319 | RREG32(GRBM_STATUS)); | 2317 | RREG32(GRBM_STATUS)); |
| 2320 | dev_info(rdev->dev, " GRBM_STATUS_SE0=0x%08X\n", | 2318 | dev_info(rdev->dev, " GRBM_STATUS_SE0 = 0x%08X\n", |
| 2321 | RREG32(GRBM_STATUS_SE0)); | 2319 | RREG32(GRBM_STATUS_SE0)); |
| 2322 | dev_info(rdev->dev, " GRBM_STATUS_SE1=0x%08X\n", | 2320 | dev_info(rdev->dev, " GRBM_STATUS_SE1 = 0x%08X\n", |
| 2323 | RREG32(GRBM_STATUS_SE1)); | 2321 | RREG32(GRBM_STATUS_SE1)); |
| 2324 | dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", | 2322 | dev_info(rdev->dev, " SRBM_STATUS = 0x%08X\n", |
| 2325 | RREG32(SRBM_STATUS)); | 2323 | RREG32(SRBM_STATUS)); |
| 2326 | dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", | 2324 | dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", |
| 2327 | RREG32(CP_STALLED_STAT1)); | 2325 | RREG32(CP_STALLED_STAT1)); |
| @@ -2331,10 +2329,7 @@ static int evergreen_gpu_soft_reset(struct radeon_device *rdev) | |||
| 2331 | RREG32(CP_BUSY_STAT)); | 2329 | RREG32(CP_BUSY_STAT)); |
| 2332 | dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", | 2330 | dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", |
| 2333 | RREG32(CP_STAT)); | 2331 | RREG32(CP_STAT)); |
| 2334 | evergreen_mc_stop(rdev, &save); | 2332 | |
| 2335 | if (evergreen_mc_wait_for_idle(rdev)) { | ||
| 2336 | dev_warn(rdev->dev, "Wait for MC idle timedout !\n"); | ||
| 2337 | } | ||
| 2338 | /* Disable CP parsing/prefetching */ | 2333 | /* Disable CP parsing/prefetching */ |
| 2339 | WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT); | 2334 | WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT); |
| 2340 | 2335 | ||
| @@ -2358,15 +2353,14 @@ static int evergreen_gpu_soft_reset(struct radeon_device *rdev) | |||
| 2358 | udelay(50); | 2353 | udelay(50); |
| 2359 | WREG32(GRBM_SOFT_RESET, 0); | 2354 | WREG32(GRBM_SOFT_RESET, 0); |
| 2360 | (void)RREG32(GRBM_SOFT_RESET); | 2355 | (void)RREG32(GRBM_SOFT_RESET); |
| 2361 | /* Wait a little for things to settle down */ | 2356 | |
| 2362 | udelay(50); | 2357 | dev_info(rdev->dev, " GRBM_STATUS = 0x%08X\n", |
| 2363 | dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n", | ||
| 2364 | RREG32(GRBM_STATUS)); | 2358 | RREG32(GRBM_STATUS)); |
| 2365 | dev_info(rdev->dev, " GRBM_STATUS_SE0=0x%08X\n", | 2359 | dev_info(rdev->dev, " GRBM_STATUS_SE0 = 0x%08X\n", |
| 2366 | RREG32(GRBM_STATUS_SE0)); | 2360 | RREG32(GRBM_STATUS_SE0)); |
| 2367 | dev_info(rdev->dev, " GRBM_STATUS_SE1=0x%08X\n", | 2361 | dev_info(rdev->dev, " GRBM_STATUS_SE1 = 0x%08X\n", |
| 2368 | RREG32(GRBM_STATUS_SE1)); | 2362 | RREG32(GRBM_STATUS_SE1)); |
| 2369 | dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", | 2363 | dev_info(rdev->dev, " SRBM_STATUS = 0x%08X\n", |
| 2370 | RREG32(SRBM_STATUS)); | 2364 | RREG32(SRBM_STATUS)); |
| 2371 | dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", | 2365 | dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", |
| 2372 | RREG32(CP_STALLED_STAT1)); | 2366 | RREG32(CP_STALLED_STAT1)); |
| @@ -2376,13 +2370,65 @@ static int evergreen_gpu_soft_reset(struct radeon_device *rdev) | |||
| 2376 | RREG32(CP_BUSY_STAT)); | 2370 | RREG32(CP_BUSY_STAT)); |
| 2377 | dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", | 2371 | dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", |
| 2378 | RREG32(CP_STAT)); | 2372 | RREG32(CP_STAT)); |
| 2373 | } | ||
| 2374 | |||
| 2375 | static void evergreen_gpu_soft_reset_dma(struct radeon_device *rdev) | ||
| 2376 | { | ||
| 2377 | u32 tmp; | ||
| 2378 | |||
| 2379 | if (RREG32(DMA_STATUS_REG) & DMA_IDLE) | ||
| 2380 | return; | ||
| 2381 | |||
| 2382 | dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n", | ||
| 2383 | RREG32(DMA_STATUS_REG)); | ||
| 2384 | |||
| 2385 | /* Disable DMA */ | ||
| 2386 | tmp = RREG32(DMA_RB_CNTL); | ||
| 2387 | tmp &= ~DMA_RB_ENABLE; | ||
| 2388 | WREG32(DMA_RB_CNTL, tmp); | ||
| 2389 | |||
| 2390 | /* Reset dma */ | ||
| 2391 | WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA); | ||
| 2392 | RREG32(SRBM_SOFT_RESET); | ||
| 2393 | udelay(50); | ||
| 2394 | WREG32(SRBM_SOFT_RESET, 0); | ||
| 2395 | |||
| 2396 | dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n", | ||
| 2397 | RREG32(DMA_STATUS_REG)); | ||
| 2398 | } | ||
| 2399 | |||
| 2400 | static int evergreen_gpu_soft_reset(struct radeon_device *rdev, u32 reset_mask) | ||
| 2401 | { | ||
| 2402 | struct evergreen_mc_save save; | ||
| 2403 | |||
| 2404 | if (reset_mask == 0) | ||
| 2405 | return 0; | ||
| 2406 | |||
| 2407 | dev_info(rdev->dev, "GPU softreset: 0x%08X\n", reset_mask); | ||
| 2408 | |||
| 2409 | evergreen_mc_stop(rdev, &save); | ||
| 2410 | if (evergreen_mc_wait_for_idle(rdev)) { | ||
| 2411 | dev_warn(rdev->dev, "Wait for MC idle timedout !\n"); | ||
| 2412 | } | ||
| 2413 | |||
| 2414 | if (reset_mask & (RADEON_RESET_GFX | RADEON_RESET_COMPUTE)) | ||
| 2415 | evergreen_gpu_soft_reset_gfx(rdev); | ||
| 2416 | |||
| 2417 | if (reset_mask & RADEON_RESET_DMA) | ||
| 2418 | evergreen_gpu_soft_reset_dma(rdev); | ||
| 2419 | |||
| 2420 | /* Wait a little for things to settle down */ | ||
| 2421 | udelay(50); | ||
| 2422 | |||
| 2379 | evergreen_mc_resume(rdev, &save); | 2423 | evergreen_mc_resume(rdev, &save); |
| 2380 | return 0; | 2424 | return 0; |
| 2381 | } | 2425 | } |
| 2382 | 2426 | ||
| 2383 | int evergreen_asic_reset(struct radeon_device *rdev) | 2427 | int evergreen_asic_reset(struct radeon_device *rdev) |
| 2384 | { | 2428 | { |
| 2385 | return evergreen_gpu_soft_reset(rdev); | 2429 | return evergreen_gpu_soft_reset(rdev, (RADEON_RESET_GFX | |
| 2430 | RADEON_RESET_COMPUTE | | ||
| 2431 | RADEON_RESET_DMA)); | ||
| 2386 | } | 2432 | } |
| 2387 | 2433 | ||
| 2388 | /* Interrupts */ | 2434 | /* Interrupts */ |
| @@ -3215,7 +3261,7 @@ void evergreen_dma_fence_ring_emit(struct radeon_device *rdev, | |||
| 3215 | radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_TRAP, 0, 0, 0)); | 3261 | radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_TRAP, 0, 0, 0)); |
| 3216 | /* flush HDP */ | 3262 | /* flush HDP */ |
| 3217 | radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_SRBM_WRITE, 0, 0, 0)); | 3263 | radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_SRBM_WRITE, 0, 0, 0)); |
| 3218 | radeon_ring_write(ring, (0xf << 16) | HDP_MEM_COHERENCY_FLUSH_CNTL); | 3264 | radeon_ring_write(ring, (0xf << 16) | (HDP_MEM_COHERENCY_FLUSH_CNTL >> 2)); |
| 3219 | radeon_ring_write(ring, 1); | 3265 | radeon_ring_write(ring, 1); |
| 3220 | } | 3266 | } |
| 3221 | 3267 | ||
diff --git a/drivers/gpu/drm/radeon/evergreend.h b/drivers/gpu/drm/radeon/evergreend.h index cb9baaac9e85..0bfd0e9e469b 100644 --- a/drivers/gpu/drm/radeon/evergreend.h +++ b/drivers/gpu/drm/radeon/evergreend.h | |||
| @@ -742,8 +742,9 @@ | |||
| 742 | #define SOFT_RESET_ROM (1 << 14) | 742 | #define SOFT_RESET_ROM (1 << 14) |
| 743 | #define SOFT_RESET_SEM (1 << 15) | 743 | #define SOFT_RESET_SEM (1 << 15) |
| 744 | #define SOFT_RESET_VMC (1 << 17) | 744 | #define SOFT_RESET_VMC (1 << 17) |
| 745 | #define SOFT_RESET_DMA (1 << 20) | ||
| 745 | #define SOFT_RESET_TST (1 << 21) | 746 | #define SOFT_RESET_TST (1 << 21) |
| 746 | #define SOFT_RESET_REGBB (1 << 22) | 747 | #define SOFT_RESET_REGBB (1 << 22) |
| 747 | #define SOFT_RESET_ORB (1 << 23) | 748 | #define SOFT_RESET_ORB (1 << 23) |
| 748 | 749 | ||
| 749 | /* display watermarks */ | 750 | /* display watermarks */ |
| @@ -2027,4 +2028,15 @@ | |||
| 2027 | /* cayman packet3 addition */ | 2028 | /* cayman packet3 addition */ |
| 2028 | #define CAYMAN_PACKET3_DEALLOC_STATE 0x14 | 2029 | #define CAYMAN_PACKET3_DEALLOC_STATE 0x14 |
| 2029 | 2030 | ||
| 2031 | /* DMA regs common on r6xx/r7xx/evergreen/ni */ | ||
| 2032 | #define DMA_RB_CNTL 0xd000 | ||
| 2033 | # define DMA_RB_ENABLE (1 << 0) | ||
| 2034 | # define DMA_RB_SIZE(x) ((x) << 1) /* log2 */ | ||
| 2035 | # define DMA_RB_SWAP_ENABLE (1 << 9) /* 8IN32 */ | ||
| 2036 | # define DMA_RPTR_WRITEBACK_ENABLE (1 << 12) | ||
| 2037 | # define DMA_RPTR_WRITEBACK_SWAP_ENABLE (1 << 13) /* 8IN32 */ | ||
| 2038 | # define DMA_RPTR_WRITEBACK_TIMER(x) ((x) << 16) /* log2 */ | ||
| 2039 | #define DMA_STATUS_REG 0xd034 | ||
| 2040 | # define DMA_IDLE (1 << 0) | ||
| 2041 | |||
| 2030 | #endif | 2042 | #endif |
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 7bdbcb00aaf2..896f1cbc58a5 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c | |||
| @@ -1306,22 +1306,20 @@ void cayman_dma_fini(struct radeon_device *rdev) | |||
| 1306 | radeon_ring_fini(rdev, &rdev->ring[CAYMAN_RING_TYPE_DMA1_INDEX]); | 1306 | radeon_ring_fini(rdev, &rdev->ring[CAYMAN_RING_TYPE_DMA1_INDEX]); |
| 1307 | } | 1307 | } |
| 1308 | 1308 | ||
| 1309 | static int cayman_gpu_soft_reset(struct radeon_device *rdev) | 1309 | static void cayman_gpu_soft_reset_gfx(struct radeon_device *rdev) |
| 1310 | { | 1310 | { |
| 1311 | struct evergreen_mc_save save; | ||
| 1312 | u32 grbm_reset = 0; | 1311 | u32 grbm_reset = 0; |
| 1313 | 1312 | ||
| 1314 | if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE)) | 1313 | if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE)) |
| 1315 | return 0; | 1314 | return; |
| 1316 | 1315 | ||
| 1317 | dev_info(rdev->dev, "GPU softreset \n"); | 1316 | dev_info(rdev->dev, " GRBM_STATUS = 0x%08X\n", |
| 1318 | dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n", | ||
| 1319 | RREG32(GRBM_STATUS)); | 1317 | RREG32(GRBM_STATUS)); |
| 1320 | dev_info(rdev->dev, " GRBM_STATUS_SE0=0x%08X\n", | 1318 | dev_info(rdev->dev, " GRBM_STATUS_SE0 = 0x%08X\n", |
| 1321 | RREG32(GRBM_STATUS_SE0)); | 1319 | RREG32(GRBM_STATUS_SE0)); |
| 1322 | dev_info(rdev->dev, " GRBM_STATUS_SE1=0x%08X\n", | 1320 | dev_info(rdev->dev, " GRBM_STATUS_SE1 = 0x%08X\n", |
| 1323 | RREG32(GRBM_STATUS_SE1)); | 1321 | RREG32(GRBM_STATUS_SE1)); |
| 1324 | dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", | 1322 | dev_info(rdev->dev, " SRBM_STATUS = 0x%08X\n", |
| 1325 | RREG32(SRBM_STATUS)); | 1323 | RREG32(SRBM_STATUS)); |
| 1326 | dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", | 1324 | dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", |
| 1327 | RREG32(CP_STALLED_STAT1)); | 1325 | RREG32(CP_STALLED_STAT1)); |
| @@ -1331,19 +1329,7 @@ static int cayman_gpu_soft_reset(struct radeon_device *rdev) | |||
| 1331 | RREG32(CP_BUSY_STAT)); | 1329 | RREG32(CP_BUSY_STAT)); |
| 1332 | dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", | 1330 | dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", |
| 1333 | RREG32(CP_STAT)); | 1331 | RREG32(CP_STAT)); |
| 1334 | dev_info(rdev->dev, " VM_CONTEXT0_PROTECTION_FAULT_ADDR 0x%08X\n", | ||
| 1335 | RREG32(0x14F8)); | ||
| 1336 | dev_info(rdev->dev, " VM_CONTEXT0_PROTECTION_FAULT_STATUS 0x%08X\n", | ||
| 1337 | RREG32(0x14D8)); | ||
| 1338 | dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x%08X\n", | ||
| 1339 | RREG32(0x14FC)); | ||
| 1340 | dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n", | ||
| 1341 | RREG32(0x14DC)); | ||
| 1342 | 1332 | ||
| 1343 | evergreen_mc_stop(rdev, &save); | ||
| 1344 | if (evergreen_mc_wait_for_idle(rdev)) { | ||
| 1345 | dev_warn(rdev->dev, "Wait for MC idle timedout !\n"); | ||
| 1346 | } | ||
| 1347 | /* Disable CP parsing/prefetching */ | 1333 | /* Disable CP parsing/prefetching */ |
| 1348 | WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT); | 1334 | WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT); |
| 1349 | 1335 | ||
| @@ -1368,16 +1354,14 @@ static int cayman_gpu_soft_reset(struct radeon_device *rdev) | |||
| 1368 | udelay(50); | 1354 | udelay(50); |
| 1369 | WREG32(GRBM_SOFT_RESET, 0); | 1355 | WREG32(GRBM_SOFT_RESET, 0); |
| 1370 | (void)RREG32(GRBM_SOFT_RESET); | 1356 | (void)RREG32(GRBM_SOFT_RESET); |
| 1371 | /* Wait a little for things to settle down */ | ||
| 1372 | udelay(50); | ||
| 1373 | 1357 | ||
| 1374 | dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n", | 1358 | dev_info(rdev->dev, " GRBM_STATUS = 0x%08X\n", |
| 1375 | RREG32(GRBM_STATUS)); | 1359 | RREG32(GRBM_STATUS)); |
| 1376 | dev_info(rdev->dev, " GRBM_STATUS_SE0=0x%08X\n", | 1360 | dev_info(rdev->dev, " GRBM_STATUS_SE0 = 0x%08X\n", |
| 1377 | RREG32(GRBM_STATUS_SE0)); | 1361 | RREG32(GRBM_STATUS_SE0)); |
| 1378 | dev_info(rdev->dev, " GRBM_STATUS_SE1=0x%08X\n", | 1362 | dev_info(rdev->dev, " GRBM_STATUS_SE1 = 0x%08X\n", |
| 1379 | RREG32(GRBM_STATUS_SE1)); | 1363 | RREG32(GRBM_STATUS_SE1)); |
| 1380 | dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", | 1364 | dev_info(rdev->dev, " SRBM_STATUS = 0x%08X\n", |
| 1381 | RREG32(SRBM_STATUS)); | 1365 | RREG32(SRBM_STATUS)); |
| 1382 | dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", | 1366 | dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", |
| 1383 | RREG32(CP_STALLED_STAT1)); | 1367 | RREG32(CP_STALLED_STAT1)); |
| @@ -1387,13 +1371,81 @@ static int cayman_gpu_soft_reset(struct radeon_device *rdev) | |||
| 1387 | RREG32(CP_BUSY_STAT)); | 1371 | RREG32(CP_BUSY_STAT)); |
| 1388 | dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", | 1372 | dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", |
| 1389 | RREG32(CP_STAT)); | 1373 | RREG32(CP_STAT)); |
| 1374 | |||
| 1375 | } | ||
| 1376 | |||
| 1377 | static void cayman_gpu_soft_reset_dma(struct radeon_device *rdev) | ||
| 1378 | { | ||
| 1379 | u32 tmp; | ||
| 1380 | |||
| 1381 | if (RREG32(DMA_STATUS_REG) & DMA_IDLE) | ||
| 1382 | return; | ||
| 1383 | |||
| 1384 | dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n", | ||
| 1385 | RREG32(DMA_STATUS_REG)); | ||
| 1386 | |||
| 1387 | /* dma0 */ | ||
| 1388 | tmp = RREG32(DMA_RB_CNTL + DMA0_REGISTER_OFFSET); | ||
| 1389 | tmp &= ~DMA_RB_ENABLE; | ||
| 1390 | WREG32(DMA_RB_CNTL + DMA0_REGISTER_OFFSET, tmp); | ||
| 1391 | |||
| 1392 | /* dma1 */ | ||
| 1393 | tmp = RREG32(DMA_RB_CNTL + DMA1_REGISTER_OFFSET); | ||
| 1394 | tmp &= ~DMA_RB_ENABLE; | ||
| 1395 | WREG32(DMA_RB_CNTL + DMA1_REGISTER_OFFSET, tmp); | ||
| 1396 | |||
| 1397 | /* Reset dma */ | ||
| 1398 | WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA | SOFT_RESET_DMA1); | ||
| 1399 | RREG32(SRBM_SOFT_RESET); | ||
| 1400 | udelay(50); | ||
| 1401 | WREG32(SRBM_SOFT_RESET, 0); | ||
| 1402 | |||
| 1403 | dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n", | ||
| 1404 | RREG32(DMA_STATUS_REG)); | ||
| 1405 | |||
| 1406 | } | ||
| 1407 | |||
| 1408 | static int cayman_gpu_soft_reset(struct radeon_device *rdev, u32 reset_mask) | ||
| 1409 | { | ||
| 1410 | struct evergreen_mc_save save; | ||
| 1411 | |||
| 1412 | if (reset_mask == 0) | ||
| 1413 | return 0; | ||
| 1414 | |||
| 1415 | dev_info(rdev->dev, "GPU softreset: 0x%08X\n", reset_mask); | ||
| 1416 | |||
| 1417 | dev_info(rdev->dev, " VM_CONTEXT0_PROTECTION_FAULT_ADDR 0x%08X\n", | ||
| 1418 | RREG32(0x14F8)); | ||
| 1419 | dev_info(rdev->dev, " VM_CONTEXT0_PROTECTION_FAULT_STATUS 0x%08X\n", | ||
| 1420 | RREG32(0x14D8)); | ||
| 1421 | dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x%08X\n", | ||
| 1422 | RREG32(0x14FC)); | ||
| 1423 | dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n", | ||
| 1424 | RREG32(0x14DC)); | ||
| 1425 | |||
| 1426 | evergreen_mc_stop(rdev, &save); | ||
| 1427 | if (evergreen_mc_wait_for_idle(rdev)) { | ||
| 1428 | dev_warn(rdev->dev, "Wait for MC idle timedout !\n"); | ||
| 1429 | } | ||
| 1430 | |||
| 1431 | if (reset_mask & (RADEON_RESET_GFX | RADEON_RESET_COMPUTE)) | ||
| 1432 | cayman_gpu_soft_reset_gfx(rdev); | ||
| 1433 | |||
| 1434 | if (reset_mask & RADEON_RESET_DMA) | ||
| 1435 | cayman_gpu_soft_reset_dma(rdev); | ||
| 1436 | |||
| 1437 | /* Wait a little for things to settle down */ | ||
| 1438 | udelay(50); | ||
| 1439 | |||
| 1390 | evergreen_mc_resume(rdev, &save); | 1440 | evergreen_mc_resume(rdev, &save); |
| 1391 | return 0; | 1441 | return 0; |
| 1392 | } | 1442 | } |
| 1393 | 1443 | ||
| 1394 | int cayman_asic_reset(struct radeon_device *rdev) | 1444 | int cayman_asic_reset(struct radeon_device *rdev) |
| 1395 | { | 1445 | { |
| 1396 | return cayman_gpu_soft_reset(rdev); | 1446 | return cayman_gpu_soft_reset(rdev, (RADEON_RESET_GFX | |
| 1447 | RADEON_RESET_COMPUTE | | ||
| 1448 | RADEON_RESET_DMA)); | ||
| 1397 | } | 1449 | } |
| 1398 | 1450 | ||
| 1399 | /** | 1451 | /** |
diff --git a/drivers/gpu/drm/radeon/nid.h b/drivers/gpu/drm/radeon/nid.h index b93186b8ee4b..48e5022ee921 100644 --- a/drivers/gpu/drm/radeon/nid.h +++ b/drivers/gpu/drm/radeon/nid.h | |||
| @@ -65,7 +65,7 @@ | |||
| 65 | #define SOFT_RESET_VMC (1 << 17) | 65 | #define SOFT_RESET_VMC (1 << 17) |
| 66 | #define SOFT_RESET_DMA (1 << 20) | 66 | #define SOFT_RESET_DMA (1 << 20) |
| 67 | #define SOFT_RESET_TST (1 << 21) | 67 | #define SOFT_RESET_TST (1 << 21) |
| 68 | #define SOFT_RESET_REGBB (1 << 22) | 68 | #define SOFT_RESET_REGBB (1 << 22) |
| 69 | #define SOFT_RESET_ORB (1 << 23) | 69 | #define SOFT_RESET_ORB (1 << 23) |
| 70 | 70 | ||
| 71 | #define VM_CONTEXT0_REQUEST_RESPONSE 0x1470 | 71 | #define VM_CONTEXT0_REQUEST_RESPONSE 0x1470 |
| @@ -675,4 +675,3 @@ | |||
| 675 | #define DMA_PACKET_NOP 0xf | 675 | #define DMA_PACKET_NOP 0xf |
| 676 | 676 | ||
| 677 | #endif | 677 | #endif |
| 678 | |||
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 2aaf147969bd..537e259b3837 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
| @@ -1258,9 +1258,8 @@ void r600_vram_scratch_fini(struct radeon_device *rdev) | |||
| 1258 | * reset, it's up to the caller to determine if the GPU needs one. We | 1258 | * reset, it's up to the caller to determine if the GPU needs one. We |
| 1259 | * might add an helper function to check that. | 1259 | * might add an helper function to check that. |
| 1260 | */ | 1260 | */ |
| 1261 | static int r600_gpu_soft_reset(struct radeon_device *rdev) | 1261 | static void r600_gpu_soft_reset_gfx(struct radeon_device *rdev) |
| 1262 | { | 1262 | { |
| 1263 | struct rv515_mc_save save; | ||
| 1264 | u32 grbm_busy_mask = S_008010_VC_BUSY(1) | S_008010_VGT_BUSY_NO_DMA(1) | | 1263 | u32 grbm_busy_mask = S_008010_VC_BUSY(1) | S_008010_VGT_BUSY_NO_DMA(1) | |
| 1265 | S_008010_VGT_BUSY(1) | S_008010_TA03_BUSY(1) | | 1264 | S_008010_VGT_BUSY(1) | S_008010_TA03_BUSY(1) | |
| 1266 | S_008010_TC_BUSY(1) | S_008010_SX_BUSY(1) | | 1265 | S_008010_TC_BUSY(1) | S_008010_SX_BUSY(1) | |
| @@ -1280,14 +1279,13 @@ static int r600_gpu_soft_reset(struct radeon_device *rdev) | |||
| 1280 | u32 tmp; | 1279 | u32 tmp; |
| 1281 | 1280 | ||
| 1282 | if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE)) | 1281 | if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE)) |
| 1283 | return 0; | 1282 | return; |
| 1284 | 1283 | ||
| 1285 | dev_info(rdev->dev, "GPU softreset \n"); | 1284 | dev_info(rdev->dev, " R_008010_GRBM_STATUS = 0x%08X\n", |
| 1286 | dev_info(rdev->dev, " R_008010_GRBM_STATUS=0x%08X\n", | ||
| 1287 | RREG32(R_008010_GRBM_STATUS)); | 1285 | RREG32(R_008010_GRBM_STATUS)); |
| 1288 | dev_info(rdev->dev, " R_008014_GRBM_STATUS2=0x%08X\n", | 1286 | dev_info(rdev->dev, " R_008014_GRBM_STATUS2 = 0x%08X\n", |
| 1289 | RREG32(R_008014_GRBM_STATUS2)); | 1287 | RREG32(R_008014_GRBM_STATUS2)); |
| 1290 | dev_info(rdev->dev, " R_000E50_SRBM_STATUS=0x%08X\n", | 1288 | dev_info(rdev->dev, " R_000E50_SRBM_STATUS = 0x%08X\n", |
| 1291 | RREG32(R_000E50_SRBM_STATUS)); | 1289 | RREG32(R_000E50_SRBM_STATUS)); |
| 1292 | dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", | 1290 | dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", |
| 1293 | RREG32(CP_STALLED_STAT1)); | 1291 | RREG32(CP_STALLED_STAT1)); |
| @@ -1297,12 +1295,10 @@ static int r600_gpu_soft_reset(struct radeon_device *rdev) | |||
| 1297 | RREG32(CP_BUSY_STAT)); | 1295 | RREG32(CP_BUSY_STAT)); |
| 1298 | dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", | 1296 | dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", |
| 1299 | RREG32(CP_STAT)); | 1297 | RREG32(CP_STAT)); |
| 1300 | rv515_mc_stop(rdev, &save); | 1298 | |
| 1301 | if (r600_mc_wait_for_idle(rdev)) { | ||
| 1302 | dev_warn(rdev->dev, "Wait for MC idle timedout !\n"); | ||
| 1303 | } | ||
| 1304 | /* Disable CP parsing/prefetching */ | 1299 | /* Disable CP parsing/prefetching */ |
| 1305 | WREG32(R_0086D8_CP_ME_CNTL, S_0086D8_CP_ME_HALT(1)); | 1300 | WREG32(R_0086D8_CP_ME_CNTL, S_0086D8_CP_ME_HALT(1)); |
| 1301 | |||
| 1306 | /* Check if any of the rendering block is busy and reset it */ | 1302 | /* Check if any of the rendering block is busy and reset it */ |
| 1307 | if ((RREG32(R_008010_GRBM_STATUS) & grbm_busy_mask) || | 1303 | if ((RREG32(R_008010_GRBM_STATUS) & grbm_busy_mask) || |
| 1308 | (RREG32(R_008014_GRBM_STATUS2) & grbm2_busy_mask)) { | 1304 | (RREG32(R_008014_GRBM_STATUS2) & grbm2_busy_mask)) { |
| @@ -1332,13 +1328,12 @@ static int r600_gpu_soft_reset(struct radeon_device *rdev) | |||
| 1332 | RREG32(R_008020_GRBM_SOFT_RESET); | 1328 | RREG32(R_008020_GRBM_SOFT_RESET); |
| 1333 | mdelay(15); | 1329 | mdelay(15); |
| 1334 | WREG32(R_008020_GRBM_SOFT_RESET, 0); | 1330 | WREG32(R_008020_GRBM_SOFT_RESET, 0); |
| 1335 | /* Wait a little for things to settle down */ | 1331 | |
| 1336 | mdelay(1); | 1332 | dev_info(rdev->dev, " R_008010_GRBM_STATUS = 0x%08X\n", |
| 1337 | dev_info(rdev->dev, " R_008010_GRBM_STATUS=0x%08X\n", | ||
| 1338 | RREG32(R_008010_GRBM_STATUS)); | 1333 | RREG32(R_008010_GRBM_STATUS)); |
| 1339 | dev_info(rdev->dev, " R_008014_GRBM_STATUS2=0x%08X\n", | 1334 | dev_info(rdev->dev, " R_008014_GRBM_STATUS2 = 0x%08X\n", |
| 1340 | RREG32(R_008014_GRBM_STATUS2)); | 1335 | RREG32(R_008014_GRBM_STATUS2)); |
| 1341 | dev_info(rdev->dev, " R_000E50_SRBM_STATUS=0x%08X\n", | 1336 | dev_info(rdev->dev, " R_000E50_SRBM_STATUS = 0x%08X\n", |
| 1342 | RREG32(R_000E50_SRBM_STATUS)); | 1337 | RREG32(R_000E50_SRBM_STATUS)); |
| 1343 | dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", | 1338 | dev_info(rdev->dev, " R_008674_CP_STALLED_STAT1 = 0x%08X\n", |
| 1344 | RREG32(CP_STALLED_STAT1)); | 1339 | RREG32(CP_STALLED_STAT1)); |
| @@ -1348,6 +1343,60 @@ static int r600_gpu_soft_reset(struct radeon_device *rdev) | |||
| 1348 | RREG32(CP_BUSY_STAT)); | 1343 | RREG32(CP_BUSY_STAT)); |
| 1349 | dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", | 1344 | dev_info(rdev->dev, " R_008680_CP_STAT = 0x%08X\n", |
| 1350 | RREG32(CP_STAT)); | 1345 | RREG32(CP_STAT)); |
| 1346 | |||
| 1347 | } | ||
| 1348 | |||
| 1349 | static void r600_gpu_soft_reset_dma(struct radeon_device *rdev) | ||
| 1350 | { | ||
| 1351 | u32 tmp; | ||
| 1352 | |||
| 1353 | if (RREG32(DMA_STATUS_REG) & DMA_IDLE) | ||
| 1354 | return; | ||
| 1355 | |||
| 1356 | dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n", | ||
| 1357 | RREG32(DMA_STATUS_REG)); | ||
| 1358 | |||
| 1359 | /* Disable DMA */ | ||
| 1360 | tmp = RREG32(DMA_RB_CNTL); | ||
| 1361 | tmp &= ~DMA_RB_ENABLE; | ||
| 1362 | WREG32(DMA_RB_CNTL, tmp); | ||
| 1363 | |||
| 1364 | /* Reset dma */ | ||
| 1365 | if (rdev->family >= CHIP_RV770) | ||
| 1366 | WREG32(SRBM_SOFT_RESET, RV770_SOFT_RESET_DMA); | ||
| 1367 | else | ||
| 1368 | WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA); | ||
| 1369 | RREG32(SRBM_SOFT_RESET); | ||
| 1370 | udelay(50); | ||
| 1371 | WREG32(SRBM_SOFT_RESET, 0); | ||
| 1372 | |||
| 1373 | dev_info(rdev->dev, " R_00D034_DMA_STATUS_REG = 0x%08X\n", | ||
| 1374 | RREG32(DMA_STATUS_REG)); | ||
| 1375 | } | ||
| 1376 | |||
| 1377 | static int r600_gpu_soft_reset(struct radeon_device *rdev, u32 reset_mask) | ||
| 1378 | { | ||
| 1379 | struct rv515_mc_save save; | ||
| 1380 | |||
| 1381 | if (reset_mask == 0) | ||
| 1382 | return 0; | ||
| 1383 | |||
| 1384 | dev_info(rdev->dev, "GPU softreset: 0x%08X\n", reset_mask); | ||
| 1385 | |||
| 1386 | rv515_mc_stop(rdev, &save); | ||
| 1387 | if (r600_mc_wait_for_idle(rdev)) { | ||
| 1388 | dev_warn(rdev->dev, "Wait for MC idle timedout !\n"); | ||
| 1389 | } | ||
| 1390 | |||
| 1391 | if (reset_mask & (RADEON_RESET_GFX | RADEON_RESET_COMPUTE)) | ||
| 1392 | r600_gpu_soft_reset_gfx(rdev); | ||
| 1393 | |||
| 1394 | if (reset_mask & RADEON_RESET_DMA) | ||
| 1395 | r600_gpu_soft_reset_dma(rdev); | ||
| 1396 | |||
| 1397 | /* Wait a little for things to settle down */ | ||
| 1398 | mdelay(1); | ||
| 1399 | |||
| 1351 | rv515_mc_resume(rdev, &save); | 1400 | rv515_mc_resume(rdev, &save); |
| 1352 | return 0; | 1401 | return 0; |
| 1353 | } | 1402 | } |
| @@ -1395,7 +1444,9 @@ bool r600_dma_is_lockup(struct radeon_device *rdev, struct radeon_ring *ring) | |||
| 1395 | 1444 | ||
| 1396 | int r600_asic_reset(struct radeon_device *rdev) | 1445 | int r600_asic_reset(struct radeon_device *rdev) |
| 1397 | { | 1446 | { |
| 1398 | return r600_gpu_soft_reset(rdev); | 1447 | return r600_gpu_soft_reset(rdev, (RADEON_RESET_GFX | |
| 1448 | RADEON_RESET_COMPUTE | | ||
| 1449 | RADEON_RESET_DMA)); | ||
| 1399 | } | 1450 | } |
| 1400 | 1451 | ||
| 1401 | u32 r6xx_remap_render_backend(struct radeon_device *rdev, | 1452 | u32 r6xx_remap_render_backend(struct radeon_device *rdev, |
| @@ -2595,7 +2646,7 @@ int r600_copy_blit(struct radeon_device *rdev, | |||
| 2595 | * @num_gpu_pages: number of GPU pages to xfer | 2646 | * @num_gpu_pages: number of GPU pages to xfer |
| 2596 | * @fence: radeon fence object | 2647 | * @fence: radeon fence object |
| 2597 | * | 2648 | * |
| 2598 | * Copy GPU paging using the DMA engine (r6xx-r7xx). | 2649 | * Copy GPU paging using the DMA engine (r6xx). |
| 2599 | * Used by the radeon ttm implementation to move pages if | 2650 | * Used by the radeon ttm implementation to move pages if |
| 2600 | * registered as the asic copy callback. | 2651 | * registered as the asic copy callback. |
| 2601 | */ | 2652 | */ |
| @@ -2618,8 +2669,8 @@ int r600_copy_dma(struct radeon_device *rdev, | |||
| 2618 | } | 2669 | } |
| 2619 | 2670 | ||
| 2620 | size_in_dw = (num_gpu_pages << RADEON_GPU_PAGE_SHIFT) / 4; | 2671 | size_in_dw = (num_gpu_pages << RADEON_GPU_PAGE_SHIFT) / 4; |
| 2621 | num_loops = DIV_ROUND_UP(size_in_dw, 0xffff); | 2672 | num_loops = DIV_ROUND_UP(size_in_dw, 0xFFFE); |
| 2622 | r = radeon_ring_lock(rdev, ring, num_loops * 5 + 8); | 2673 | r = radeon_ring_lock(rdev, ring, num_loops * 4 + 8); |
| 2623 | if (r) { | 2674 | if (r) { |
| 2624 | DRM_ERROR("radeon: moving bo (%d).\n", r); | 2675 | DRM_ERROR("radeon: moving bo (%d).\n", r); |
| 2625 | radeon_semaphore_free(rdev, &sem, NULL); | 2676 | radeon_semaphore_free(rdev, &sem, NULL); |
| @@ -2636,14 +2687,14 @@ int r600_copy_dma(struct radeon_device *rdev, | |||
| 2636 | 2687 | ||
| 2637 | for (i = 0; i < num_loops; i++) { | 2688 | for (i = 0; i < num_loops; i++) { |
| 2638 | cur_size_in_dw = size_in_dw; | 2689 | cur_size_in_dw = size_in_dw; |
| 2639 | if (cur_size_in_dw > 0xFFFF) | 2690 | if (cur_size_in_dw > 0xFFFE) |
| 2640 | cur_size_in_dw = 0xFFFF; | 2691 | cur_size_in_dw = 0xFFFE; |
| 2641 | size_in_dw -= cur_size_in_dw; | 2692 | size_in_dw -= cur_size_in_dw; |
| 2642 | radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_COPY, 0, 0, cur_size_in_dw)); | 2693 | radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_COPY, 0, 0, cur_size_in_dw)); |
| 2643 | radeon_ring_write(ring, dst_offset & 0xfffffffc); | 2694 | radeon_ring_write(ring, dst_offset & 0xfffffffc); |
| 2644 | radeon_ring_write(ring, src_offset & 0xfffffffc); | 2695 | radeon_ring_write(ring, src_offset & 0xfffffffc); |
| 2645 | radeon_ring_write(ring, upper_32_bits(dst_offset) & 0xff); | 2696 | radeon_ring_write(ring, (((upper_32_bits(dst_offset) & 0xff) << 16) | |
| 2646 | radeon_ring_write(ring, upper_32_bits(src_offset) & 0xff); | 2697 | (upper_32_bits(src_offset) & 0xff))); |
| 2647 | src_offset += cur_size_in_dw * 4; | 2698 | src_offset += cur_size_in_dw * 4; |
| 2648 | dst_offset += cur_size_in_dw * 4; | 2699 | dst_offset += cur_size_in_dw * 4; |
| 2649 | } | 2700 | } |
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index 9ea13d07cc55..69ec24ab8d63 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c | |||
| @@ -2476,8 +2476,10 @@ static void r600_cs_parser_fini(struct radeon_cs_parser *parser, int error) | |||
| 2476 | kfree(parser->relocs); | 2476 | kfree(parser->relocs); |
| 2477 | for (i = 0; i < parser->nchunks; i++) { | 2477 | for (i = 0; i < parser->nchunks; i++) { |
| 2478 | kfree(parser->chunks[i].kdata); | 2478 | kfree(parser->chunks[i].kdata); |
| 2479 | kfree(parser->chunks[i].kpage[0]); | 2479 | if (parser->rdev && (parser->rdev->flags & RADEON_IS_AGP)) { |
| 2480 | kfree(parser->chunks[i].kpage[1]); | 2480 | kfree(parser->chunks[i].kpage[0]); |
| 2481 | kfree(parser->chunks[i].kpage[1]); | ||
| 2482 | } | ||
| 2481 | } | 2483 | } |
| 2482 | kfree(parser->chunks); | 2484 | kfree(parser->chunks); |
| 2483 | kfree(parser->chunks_array); | 2485 | kfree(parser->chunks_array); |
| @@ -2561,16 +2563,16 @@ int r600_dma_cs_next_reloc(struct radeon_cs_parser *p, | |||
| 2561 | struct radeon_cs_chunk *relocs_chunk; | 2563 | struct radeon_cs_chunk *relocs_chunk; |
| 2562 | unsigned idx; | 2564 | unsigned idx; |
| 2563 | 2565 | ||
| 2566 | *cs_reloc = NULL; | ||
| 2564 | if (p->chunk_relocs_idx == -1) { | 2567 | if (p->chunk_relocs_idx == -1) { |
| 2565 | DRM_ERROR("No relocation chunk !\n"); | 2568 | DRM_ERROR("No relocation chunk !\n"); |
| 2566 | return -EINVAL; | 2569 | return -EINVAL; |
| 2567 | } | 2570 | } |
| 2568 | *cs_reloc = NULL; | ||
| 2569 | relocs_chunk = &p->chunks[p->chunk_relocs_idx]; | 2571 | relocs_chunk = &p->chunks[p->chunk_relocs_idx]; |
| 2570 | idx = p->dma_reloc_idx; | 2572 | idx = p->dma_reloc_idx; |
| 2571 | if (idx >= relocs_chunk->length_dw) { | 2573 | if (idx >= p->nrelocs) { |
| 2572 | DRM_ERROR("Relocs at %d after relocations chunk end %d !\n", | 2574 | DRM_ERROR("Relocs at %d after relocations chunk end %d !\n", |
| 2573 | idx, relocs_chunk->length_dw); | 2575 | idx, p->nrelocs); |
| 2574 | return -EINVAL; | 2576 | return -EINVAL; |
| 2575 | } | 2577 | } |
| 2576 | *cs_reloc = p->relocs_ptr[idx]; | 2578 | *cs_reloc = p->relocs_ptr[idx]; |
| @@ -2677,16 +2679,29 @@ int r600_dma_cs_parse(struct radeon_cs_parser *p) | |||
| 2677 | } | 2679 | } |
| 2678 | p->idx += 7; | 2680 | p->idx += 7; |
| 2679 | } else { | 2681 | } else { |
| 2680 | src_offset = ib[idx+2]; | 2682 | if (p->family >= CHIP_RV770) { |
| 2681 | src_offset |= ((u64)(ib[idx+4] & 0xff)) << 32; | 2683 | src_offset = ib[idx+2]; |
| 2682 | dst_offset = ib[idx+1]; | 2684 | src_offset |= ((u64)(ib[idx+4] & 0xff)) << 32; |
| 2683 | dst_offset |= ((u64)(ib[idx+3] & 0xff)) << 32; | 2685 | dst_offset = ib[idx+1]; |
| 2686 | dst_offset |= ((u64)(ib[idx+3] & 0xff)) << 32; | ||
| 2684 | 2687 | ||
| 2685 | ib[idx+1] += (u32)(dst_reloc->lobj.gpu_offset & 0xfffffffc); | 2688 | ib[idx+1] += (u32)(dst_reloc->lobj.gpu_offset & 0xfffffffc); |
| 2686 | ib[idx+2] += (u32)(src_reloc->lobj.gpu_offset & 0xfffffffc); | 2689 | ib[idx+2] += (u32)(src_reloc->lobj.gpu_offset & 0xfffffffc); |
| 2687 | ib[idx+3] += upper_32_bits(dst_reloc->lobj.gpu_offset) & 0xff; | 2690 | ib[idx+3] += upper_32_bits(dst_reloc->lobj.gpu_offset) & 0xff; |
| 2688 | ib[idx+4] += upper_32_bits(src_reloc->lobj.gpu_offset) & 0xff; | 2691 | ib[idx+4] += upper_32_bits(src_reloc->lobj.gpu_offset) & 0xff; |
| 2689 | p->idx += 5; | 2692 | p->idx += 5; |
| 2693 | } else { | ||
| 2694 | src_offset = ib[idx+2]; | ||
| 2695 | src_offset |= ((u64)(ib[idx+3] & 0xff)) << 32; | ||
| 2696 | dst_offset = ib[idx+1]; | ||
| 2697 | dst_offset |= ((u64)(ib[idx+3] & 0xff0000)) << 16; | ||
| 2698 | |||
| 2699 | ib[idx+1] += (u32)(dst_reloc->lobj.gpu_offset & 0xfffffffc); | ||
| 2700 | ib[idx+2] += (u32)(src_reloc->lobj.gpu_offset & 0xfffffffc); | ||
| 2701 | ib[idx+3] += upper_32_bits(src_reloc->lobj.gpu_offset) & 0xff; | ||
| 2702 | ib[idx+3] += (upper_32_bits(dst_reloc->lobj.gpu_offset) & 0xff) << 16; | ||
| 2703 | p->idx += 4; | ||
| 2704 | } | ||
| 2690 | } | 2705 | } |
| 2691 | if ((src_offset + (count * 4)) > radeon_bo_size(src_reloc->robj)) { | 2706 | if ((src_offset + (count * 4)) > radeon_bo_size(src_reloc->robj)) { |
| 2692 | dev_warn(p->dev, "DMA copy src buffer too small (%llu %lu)\n", | 2707 | dev_warn(p->dev, "DMA copy src buffer too small (%llu %lu)\n", |
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 9b9422c4403a..34e52304a525 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
| @@ -132,6 +132,11 @@ extern int radeon_lockup_timeout; | |||
| 132 | #define RADEON_VA_RESERVED_SIZE (8 << 20) | 132 | #define RADEON_VA_RESERVED_SIZE (8 << 20) |
| 133 | #define RADEON_IB_VM_MAX_SIZE (64 << 10) | 133 | #define RADEON_IB_VM_MAX_SIZE (64 << 10) |
| 134 | 134 | ||
| 135 | /* reset flags */ | ||
| 136 | #define RADEON_RESET_GFX (1 << 0) | ||
| 137 | #define RADEON_RESET_COMPUTE (1 << 1) | ||
| 138 | #define RADEON_RESET_DMA (1 << 2) | ||
| 139 | |||
| 135 | /* | 140 | /* |
| 136 | * Errata workarounds. | 141 | * Errata workarounds. |
| 137 | */ | 142 | */ |
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c index 596bcbe80ed0..9056fafb00ea 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.c +++ b/drivers/gpu/drm/radeon/radeon_asic.c | |||
| @@ -1140,9 +1140,9 @@ static struct radeon_asic rv770_asic = { | |||
| 1140 | .copy = { | 1140 | .copy = { |
| 1141 | .blit = &r600_copy_blit, | 1141 | .blit = &r600_copy_blit, |
| 1142 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, | 1142 | .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, |
| 1143 | .dma = &r600_copy_dma, | 1143 | .dma = &rv770_copy_dma, |
| 1144 | .dma_ring_index = R600_RING_TYPE_DMA_INDEX, | 1144 | .dma_ring_index = R600_RING_TYPE_DMA_INDEX, |
| 1145 | .copy = &r600_copy_dma, | 1145 | .copy = &rv770_copy_dma, |
| 1146 | .copy_ring_index = R600_RING_TYPE_DMA_INDEX, | 1146 | .copy_ring_index = R600_RING_TYPE_DMA_INDEX, |
| 1147 | }, | 1147 | }, |
| 1148 | .surface = { | 1148 | .surface = { |
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index 5f4882cc2152..15d70e613076 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h | |||
| @@ -403,6 +403,10 @@ u32 rv770_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base); | |||
| 403 | void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc); | 403 | void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc); |
| 404 | void r700_cp_stop(struct radeon_device *rdev); | 404 | void r700_cp_stop(struct radeon_device *rdev); |
| 405 | void r700_cp_fini(struct radeon_device *rdev); | 405 | void r700_cp_fini(struct radeon_device *rdev); |
| 406 | int rv770_copy_dma(struct radeon_device *rdev, | ||
| 407 | uint64_t src_offset, uint64_t dst_offset, | ||
| 408 | unsigned num_gpu_pages, | ||
| 409 | struct radeon_fence **fence); | ||
| 406 | 410 | ||
| 407 | /* | 411 | /* |
| 408 | * evergreen | 412 | * evergreen |
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index 4af89126e223..33a56a09ff10 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c | |||
| @@ -1548,6 +1548,9 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) | |||
| 1548 | of_machine_is_compatible("PowerBook6,7")) { | 1548 | of_machine_is_compatible("PowerBook6,7")) { |
| 1549 | /* ibook */ | 1549 | /* ibook */ |
| 1550 | rdev->mode_info.connector_table = CT_IBOOK; | 1550 | rdev->mode_info.connector_table = CT_IBOOK; |
| 1551 | } else if (of_machine_is_compatible("PowerMac3,5")) { | ||
| 1552 | /* PowerMac G4 Silver radeon 7500 */ | ||
| 1553 | rdev->mode_info.connector_table = CT_MAC_G4_SILVER; | ||
| 1551 | } else if (of_machine_is_compatible("PowerMac4,4")) { | 1554 | } else if (of_machine_is_compatible("PowerMac4,4")) { |
| 1552 | /* emac */ | 1555 | /* emac */ |
| 1553 | rdev->mode_info.connector_table = CT_EMAC; | 1556 | rdev->mode_info.connector_table = CT_EMAC; |
| @@ -2212,6 +2215,54 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) | |||
| 2212 | CONNECTOR_OBJECT_ID_SVIDEO, | 2215 | CONNECTOR_OBJECT_ID_SVIDEO, |
| 2213 | &hpd); | 2216 | &hpd); |
| 2214 | break; | 2217 | break; |
| 2218 | case CT_MAC_G4_SILVER: | ||
| 2219 | DRM_INFO("Connector Table: %d (mac g4 silver)\n", | ||
| 2220 | rdev->mode_info.connector_table); | ||
| 2221 | /* DVI-I - tv dac, int tmds */ | ||
| 2222 | ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); | ||
| 2223 | hpd.hpd = RADEON_HPD_1; /* ??? */ | ||
| 2224 | radeon_add_legacy_encoder(dev, | ||
| 2225 | radeon_get_encoder_enum(dev, | ||
| 2226 | ATOM_DEVICE_DFP1_SUPPORT, | ||
| 2227 | 0), | ||
| 2228 | ATOM_DEVICE_DFP1_SUPPORT); | ||
| 2229 | radeon_add_legacy_encoder(dev, | ||
| 2230 | radeon_get_encoder_enum(dev, | ||
| 2231 | ATOM_DEVICE_CRT2_SUPPORT, | ||
| 2232 | 2), | ||
| 2233 | ATOM_DEVICE_CRT2_SUPPORT); | ||
| 2234 | radeon_add_legacy_connector(dev, 0, | ||
| 2235 | ATOM_DEVICE_DFP1_SUPPORT | | ||
| 2236 | ATOM_DEVICE_CRT2_SUPPORT, | ||
| 2237 | DRM_MODE_CONNECTOR_DVII, &ddc_i2c, | ||
| 2238 | CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I, | ||
| 2239 | &hpd); | ||
| 2240 | /* VGA - primary dac */ | ||
| 2241 | ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); | ||
| 2242 | hpd.hpd = RADEON_HPD_NONE; | ||
| 2243 | radeon_add_legacy_encoder(dev, | ||
| 2244 | radeon_get_encoder_enum(dev, | ||
| 2245 | ATOM_DEVICE_CRT1_SUPPORT, | ||
| 2246 | 1), | ||
| 2247 | ATOM_DEVICE_CRT1_SUPPORT); | ||
| 2248 | radeon_add_legacy_connector(dev, 1, ATOM_DEVICE_CRT1_SUPPORT, | ||
| 2249 | DRM_MODE_CONNECTOR_VGA, &ddc_i2c, | ||
| 2250 | CONNECTOR_OBJECT_ID_VGA, | ||
| 2251 | &hpd); | ||
| 2252 | /* TV - TV DAC */ | ||
| 2253 | ddc_i2c.valid = false; | ||
| 2254 | hpd.hpd = RADEON_HPD_NONE; | ||
| 2255 | radeon_add_legacy_encoder(dev, | ||
| 2256 | radeon_get_encoder_enum(dev, | ||
| 2257 | ATOM_DEVICE_TV1_SUPPORT, | ||
| 2258 | 2), | ||
| 2259 | ATOM_DEVICE_TV1_SUPPORT); | ||
| 2260 | radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT, | ||
| 2261 | DRM_MODE_CONNECTOR_SVIDEO, | ||
| 2262 | &ddc_i2c, | ||
| 2263 | CONNECTOR_OBJECT_ID_SVIDEO, | ||
| 2264 | &hpd); | ||
| 2265 | break; | ||
| 2215 | default: | 2266 | default: |
| 2216 | DRM_INFO("Connector table: %d (invalid)\n", | 2267 | DRM_INFO("Connector table: %d (invalid)\n", |
| 2217 | rdev->mode_info.connector_table); | 2268 | rdev->mode_info.connector_table); |
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 47bf162ab9c6..2399f25ec037 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
| @@ -741,7 +741,7 @@ radeon_vga_detect(struct drm_connector *connector, bool force) | |||
| 741 | ret = connector_status_disconnected; | 741 | ret = connector_status_disconnected; |
| 742 | 742 | ||
| 743 | if (radeon_connector->ddc_bus) | 743 | if (radeon_connector->ddc_bus) |
| 744 | dret = radeon_ddc_probe(radeon_connector); | 744 | dret = radeon_ddc_probe(radeon_connector, false); |
| 745 | if (dret) { | 745 | if (dret) { |
| 746 | radeon_connector->detected_by_load = false; | 746 | radeon_connector->detected_by_load = false; |
| 747 | if (radeon_connector->edid) { | 747 | if (radeon_connector->edid) { |
| @@ -947,7 +947,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force) | |||
| 947 | return connector->status; | 947 | return connector->status; |
| 948 | 948 | ||
| 949 | if (radeon_connector->ddc_bus) | 949 | if (radeon_connector->ddc_bus) |
| 950 | dret = radeon_ddc_probe(radeon_connector); | 950 | dret = radeon_ddc_probe(radeon_connector, false); |
| 951 | if (dret) { | 951 | if (dret) { |
| 952 | radeon_connector->detected_by_load = false; | 952 | radeon_connector->detected_by_load = false; |
| 953 | if (radeon_connector->edid) { | 953 | if (radeon_connector->edid) { |
| @@ -1401,7 +1401,8 @@ radeon_dp_detect(struct drm_connector *connector, bool force) | |||
| 1401 | if (encoder) { | 1401 | if (encoder) { |
| 1402 | /* setup ddc on the bridge */ | 1402 | /* setup ddc on the bridge */ |
| 1403 | radeon_atom_ext_encoder_setup_ddc(encoder); | 1403 | radeon_atom_ext_encoder_setup_ddc(encoder); |
| 1404 | if (radeon_ddc_probe(radeon_connector)) /* try DDC */ | 1404 | /* bridge chips are always aux */ |
| 1405 | if (radeon_ddc_probe(radeon_connector, true)) /* try DDC */ | ||
| 1405 | ret = connector_status_connected; | 1406 | ret = connector_status_connected; |
| 1406 | else if (radeon_connector->dac_load_detect) { /* try load detection */ | 1407 | else if (radeon_connector->dac_load_detect) { /* try load detection */ |
| 1407 | struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; | 1408 | struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; |
| @@ -1419,7 +1420,8 @@ radeon_dp_detect(struct drm_connector *connector, bool force) | |||
| 1419 | if (radeon_dp_getdpcd(radeon_connector)) | 1420 | if (radeon_dp_getdpcd(radeon_connector)) |
| 1420 | ret = connector_status_connected; | 1421 | ret = connector_status_connected; |
| 1421 | } else { | 1422 | } else { |
| 1422 | if (radeon_ddc_probe(radeon_connector)) | 1423 | /* try non-aux ddc (DP to DVI/HMDI/etc. adapter) */ |
| 1424 | if (radeon_ddc_probe(radeon_connector, false)) | ||
| 1423 | ret = connector_status_connected; | 1425 | ret = connector_status_connected; |
| 1424 | } | 1426 | } |
| 1425 | } | 1427 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c index 396baba0141a..469661fd1903 100644 --- a/drivers/gpu/drm/radeon/radeon_cs.c +++ b/drivers/gpu/drm/radeon/radeon_cs.c | |||
| @@ -279,13 +279,13 @@ int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data) | |||
| 279 | p->chunks[p->chunk_ib_idx].length_dw); | 279 | p->chunks[p->chunk_ib_idx].length_dw); |
| 280 | return -EINVAL; | 280 | return -EINVAL; |
| 281 | } | 281 | } |
| 282 | if ((p->rdev->flags & RADEON_IS_AGP)) { | 282 | if (p->rdev && (p->rdev->flags & RADEON_IS_AGP)) { |
| 283 | p->chunks[p->chunk_ib_idx].kpage[0] = kmalloc(PAGE_SIZE, GFP_KERNEL); | 283 | p->chunks[p->chunk_ib_idx].kpage[0] = kmalloc(PAGE_SIZE, GFP_KERNEL); |
| 284 | p->chunks[p->chunk_ib_idx].kpage[1] = kmalloc(PAGE_SIZE, GFP_KERNEL); | 284 | p->chunks[p->chunk_ib_idx].kpage[1] = kmalloc(PAGE_SIZE, GFP_KERNEL); |
| 285 | if (p->chunks[p->chunk_ib_idx].kpage[0] == NULL || | 285 | if (p->chunks[p->chunk_ib_idx].kpage[0] == NULL || |
| 286 | p->chunks[p->chunk_ib_idx].kpage[1] == NULL) { | 286 | p->chunks[p->chunk_ib_idx].kpage[1] == NULL) { |
| 287 | kfree(p->chunks[i].kpage[0]); | 287 | kfree(p->chunks[p->chunk_ib_idx].kpage[0]); |
| 288 | kfree(p->chunks[i].kpage[1]); | 288 | kfree(p->chunks[p->chunk_ib_idx].kpage[1]); |
| 289 | return -ENOMEM; | 289 | return -ENOMEM; |
| 290 | } | 290 | } |
| 291 | } | 291 | } |
| @@ -583,7 +583,8 @@ static int radeon_cs_update_pages(struct radeon_cs_parser *p, int pg_idx) | |||
| 583 | struct radeon_cs_chunk *ibc = &p->chunks[p->chunk_ib_idx]; | 583 | struct radeon_cs_chunk *ibc = &p->chunks[p->chunk_ib_idx]; |
| 584 | int i; | 584 | int i; |
| 585 | int size = PAGE_SIZE; | 585 | int size = PAGE_SIZE; |
| 586 | bool copy1 = (p->rdev->flags & RADEON_IS_AGP) ? false : true; | 586 | bool copy1 = (p->rdev && (p->rdev->flags & RADEON_IS_AGP)) ? |
| 587 | false : true; | ||
| 587 | 588 | ||
| 588 | for (i = ibc->last_copied_page + 1; i < pg_idx; i++) { | 589 | for (i = ibc->last_copied_page + 1; i < pg_idx; i++) { |
| 589 | if (DRM_COPY_FROM_USER(p->ib.ptr + (i * (PAGE_SIZE/4)), | 590 | if (DRM_COPY_FROM_USER(p->ib.ptr + (i * (PAGE_SIZE/4)), |
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index cd756262924d..edfc54e41842 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c | |||
| @@ -897,6 +897,25 @@ static void radeon_check_arguments(struct radeon_device *rdev) | |||
| 897 | } | 897 | } |
| 898 | 898 | ||
| 899 | /** | 899 | /** |
| 900 | * radeon_switcheroo_quirk_long_wakeup - return true if longer d3 delay is | ||
| 901 | * needed for waking up. | ||
| 902 | * | ||
| 903 | * @pdev: pci dev pointer | ||
| 904 | */ | ||
| 905 | static bool radeon_switcheroo_quirk_long_wakeup(struct pci_dev *pdev) | ||
| 906 | { | ||
| 907 | |||
| 908 | /* 6600m in a macbook pro */ | ||
| 909 | if (pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE && | ||
| 910 | pdev->subsystem_device == 0x00e2) { | ||
| 911 | printk(KERN_INFO "radeon: quirking longer d3 wakeup delay\n"); | ||
| 912 | return true; | ||
| 913 | } | ||
| 914 | |||
| 915 | return false; | ||
| 916 | } | ||
| 917 | |||
| 918 | /** | ||
| 900 | * radeon_switcheroo_set_state - set switcheroo state | 919 | * radeon_switcheroo_set_state - set switcheroo state |
| 901 | * | 920 | * |
| 902 | * @pdev: pci dev pointer | 921 | * @pdev: pci dev pointer |
| @@ -910,10 +929,19 @@ static void radeon_switcheroo_set_state(struct pci_dev *pdev, enum vga_switchero | |||
| 910 | struct drm_device *dev = pci_get_drvdata(pdev); | 929 | struct drm_device *dev = pci_get_drvdata(pdev); |
| 911 | pm_message_t pmm = { .event = PM_EVENT_SUSPEND }; | 930 | pm_message_t pmm = { .event = PM_EVENT_SUSPEND }; |
| 912 | if (state == VGA_SWITCHEROO_ON) { | 931 | if (state == VGA_SWITCHEROO_ON) { |
| 932 | unsigned d3_delay = dev->pdev->d3_delay; | ||
| 933 | |||
| 913 | printk(KERN_INFO "radeon: switched on\n"); | 934 | printk(KERN_INFO "radeon: switched on\n"); |
| 914 | /* don't suspend or resume card normally */ | 935 | /* don't suspend or resume card normally */ |
| 915 | dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; | 936 | dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; |
| 937 | |||
| 938 | if (d3_delay < 20 && radeon_switcheroo_quirk_long_wakeup(pdev)) | ||
| 939 | dev->pdev->d3_delay = 20; | ||
| 940 | |||
| 916 | radeon_resume_kms(dev); | 941 | radeon_resume_kms(dev); |
| 942 | |||
| 943 | dev->pdev->d3_delay = d3_delay; | ||
| 944 | |||
| 917 | dev->switch_power_state = DRM_SWITCH_POWER_ON; | 945 | dev->switch_power_state = DRM_SWITCH_POWER_ON; |
| 918 | drm_kms_helper_poll_enable(dev); | 946 | drm_kms_helper_poll_enable(dev); |
| 919 | } else { | 947 | } else { |
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index 310c0e5254ba..1da2386d7cf7 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c | |||
| @@ -699,10 +699,15 @@ int radeon_ddc_get_modes(struct radeon_connector *radeon_connector) | |||
| 699 | if (radeon_connector->router.ddc_valid) | 699 | if (radeon_connector->router.ddc_valid) |
| 700 | radeon_router_select_ddc_port(radeon_connector); | 700 | radeon_router_select_ddc_port(radeon_connector); |
| 701 | 701 | ||
| 702 | if ((radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_DisplayPort) || | 702 | if (radeon_connector_encoder_get_dp_bridge_encoder_id(&radeon_connector->base) != |
| 703 | (radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_eDP) || | 703 | ENCODER_OBJECT_ID_NONE) { |
| 704 | (radeon_connector_encoder_get_dp_bridge_encoder_id(&radeon_connector->base) != | 704 | struct radeon_connector_atom_dig *dig = radeon_connector->con_priv; |
| 705 | ENCODER_OBJECT_ID_NONE)) { | 705 | |
| 706 | if (dig->dp_i2c_bus) | ||
| 707 | radeon_connector->edid = drm_get_edid(&radeon_connector->base, | ||
| 708 | &dig->dp_i2c_bus->adapter); | ||
| 709 | } else if ((radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_DisplayPort) || | ||
| 710 | (radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_eDP)) { | ||
| 706 | struct radeon_connector_atom_dig *dig = radeon_connector->con_priv; | 711 | struct radeon_connector_atom_dig *dig = radeon_connector->con_priv; |
| 707 | 712 | ||
| 708 | if ((dig->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT || | 713 | if ((dig->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT || |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index ff7593498a74..dff6cf77f953 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
| @@ -306,8 +306,8 @@ static int radeon_kick_out_firmware_fb(struct pci_dev *pdev) | |||
| 306 | return 0; | 306 | return 0; |
| 307 | } | 307 | } |
| 308 | 308 | ||
| 309 | static int __devinit | 309 | static int radeon_pci_probe(struct pci_dev *pdev, |
| 310 | radeon_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 310 | const struct pci_device_id *ent) |
| 311 | { | 311 | { |
| 312 | int ret; | 312 | int ret; |
| 313 | 313 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c index c5bddd630eb9..fc60b74ee304 100644 --- a/drivers/gpu/drm/radeon/radeon_i2c.c +++ b/drivers/gpu/drm/radeon/radeon_i2c.c | |||
| @@ -39,7 +39,7 @@ extern u32 radeon_atom_hw_i2c_func(struct i2c_adapter *adap); | |||
| 39 | * radeon_ddc_probe | 39 | * radeon_ddc_probe |
| 40 | * | 40 | * |
| 41 | */ | 41 | */ |
| 42 | bool radeon_ddc_probe(struct radeon_connector *radeon_connector) | 42 | bool radeon_ddc_probe(struct radeon_connector *radeon_connector, bool use_aux) |
| 43 | { | 43 | { |
| 44 | u8 out = 0x0; | 44 | u8 out = 0x0; |
| 45 | u8 buf[8]; | 45 | u8 buf[8]; |
| @@ -63,7 +63,13 @@ bool radeon_ddc_probe(struct radeon_connector *radeon_connector) | |||
| 63 | if (radeon_connector->router.ddc_valid) | 63 | if (radeon_connector->router.ddc_valid) |
| 64 | radeon_router_select_ddc_port(radeon_connector); | 64 | radeon_router_select_ddc_port(radeon_connector); |
| 65 | 65 | ||
| 66 | ret = i2c_transfer(&radeon_connector->ddc_bus->adapter, msgs, 2); | 66 | if (use_aux) { |
| 67 | struct radeon_connector_atom_dig *dig = radeon_connector->con_priv; | ||
| 68 | ret = i2c_transfer(&dig->dp_i2c_bus->adapter, msgs, 2); | ||
| 69 | } else { | ||
| 70 | ret = i2c_transfer(&radeon_connector->ddc_bus->adapter, msgs, 2); | ||
| 71 | } | ||
| 72 | |||
| 67 | if (ret != 2) | 73 | if (ret != 2) |
| 68 | /* Couldn't find an accessible DDC on this connector */ | 74 | /* Couldn't find an accessible DDC on this connector */ |
| 69 | return false; | 75 | return false; |
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index f5ba2241dacc..62cd512f5c8d 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c | |||
| @@ -640,6 +640,14 @@ static enum drm_connector_status radeon_legacy_primary_dac_detect(struct drm_enc | |||
| 640 | enum drm_connector_status found = connector_status_disconnected; | 640 | enum drm_connector_status found = connector_status_disconnected; |
| 641 | bool color = true; | 641 | bool color = true; |
| 642 | 642 | ||
| 643 | /* just don't bother on RN50 those chip are often connected to remoting | ||
| 644 | * console hw and often we get failure to load detect those. So to make | ||
| 645 | * everyone happy report the encoder as always connected. | ||
| 646 | */ | ||
| 647 | if (ASIC_IS_RN50(rdev)) { | ||
| 648 | return connector_status_connected; | ||
| 649 | } | ||
| 650 | |||
| 643 | /* save the regs we need */ | 651 | /* save the regs we need */ |
| 644 | vclk_ecp_cntl = RREG32_PLL(RADEON_VCLK_ECP_CNTL); | 652 | vclk_ecp_cntl = RREG32_PLL(RADEON_VCLK_ECP_CNTL); |
| 645 | crtc_ext_cntl = RREG32(RADEON_CRTC_EXT_CNTL); | 653 | crtc_ext_cntl = RREG32(RADEON_CRTC_EXT_CNTL); |
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index d818b503b42f..4003f5a68c09 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h | |||
| @@ -209,7 +209,8 @@ enum radeon_connector_table { | |||
| 209 | CT_RN50_POWER, | 209 | CT_RN50_POWER, |
| 210 | CT_MAC_X800, | 210 | CT_MAC_X800, |
| 211 | CT_MAC_G5_9600, | 211 | CT_MAC_G5_9600, |
| 212 | CT_SAM440EP | 212 | CT_SAM440EP, |
| 213 | CT_MAC_G4_SILVER | ||
| 213 | }; | 214 | }; |
| 214 | 215 | ||
| 215 | enum radeon_dvo_chip { | 216 | enum radeon_dvo_chip { |
| @@ -558,7 +559,7 @@ extern void radeon_i2c_put_byte(struct radeon_i2c_chan *i2c, | |||
| 558 | u8 val); | 559 | u8 val); |
| 559 | extern void radeon_router_select_ddc_port(struct radeon_connector *radeon_connector); | 560 | extern void radeon_router_select_ddc_port(struct radeon_connector *radeon_connector); |
| 560 | extern void radeon_router_select_cd_port(struct radeon_connector *radeon_connector); | 561 | extern void radeon_router_select_cd_port(struct radeon_connector *radeon_connector); |
| 561 | extern bool radeon_ddc_probe(struct radeon_connector *radeon_connector); | 562 | extern bool radeon_ddc_probe(struct radeon_connector *radeon_connector, bool use_aux); |
| 562 | extern int radeon_ddc_get_modes(struct radeon_connector *radeon_connector); | 563 | extern int radeon_ddc_get_modes(struct radeon_connector *radeon_connector); |
| 563 | 564 | ||
| 564 | extern struct drm_encoder *radeon_best_encoder(struct drm_connector *connector); | 565 | extern struct drm_encoder *radeon_best_encoder(struct drm_connector *connector); |
diff --git a/drivers/gpu/drm/radeon/radeon_prime.c b/drivers/gpu/drm/radeon/radeon_prime.c index e09521858f64..26c23bb651c6 100644 --- a/drivers/gpu/drm/radeon/radeon_prime.c +++ b/drivers/gpu/drm/radeon/radeon_prime.c | |||
| @@ -194,6 +194,7 @@ struct drm_gem_object *radeon_gem_prime_import(struct drm_device *dev, | |||
| 194 | bo = dma_buf->priv; | 194 | bo = dma_buf->priv; |
| 195 | if (bo->gem_base.dev == dev) { | 195 | if (bo->gem_base.dev == dev) { |
| 196 | drm_gem_object_reference(&bo->gem_base); | 196 | drm_gem_object_reference(&bo->gem_base); |
| 197 | dma_buf_put(dma_buf); | ||
| 197 | return &bo->gem_base; | 198 | return &bo->gem_base; |
| 198 | } | 199 | } |
| 199 | } | 200 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index ebd69562ef6c..141f2b6a9cf2 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c | |||
| @@ -770,22 +770,28 @@ static int radeon_debugfs_ring_info(struct seq_file *m, void *data) | |||
| 770 | int ridx = *(int*)node->info_ent->data; | 770 | int ridx = *(int*)node->info_ent->data; |
| 771 | struct radeon_ring *ring = &rdev->ring[ridx]; | 771 | struct radeon_ring *ring = &rdev->ring[ridx]; |
| 772 | unsigned count, i, j; | 772 | unsigned count, i, j; |
| 773 | u32 tmp; | ||
| 773 | 774 | ||
| 774 | radeon_ring_free_size(rdev, ring); | 775 | radeon_ring_free_size(rdev, ring); |
| 775 | count = (ring->ring_size / 4) - ring->ring_free_dw; | 776 | count = (ring->ring_size / 4) - ring->ring_free_dw; |
| 776 | seq_printf(m, "wptr(0x%04x): 0x%08x\n", ring->wptr_reg, RREG32(ring->wptr_reg)); | 777 | tmp = RREG32(ring->wptr_reg) >> ring->ptr_reg_shift; |
| 777 | seq_printf(m, "rptr(0x%04x): 0x%08x\n", ring->rptr_reg, RREG32(ring->rptr_reg)); | 778 | seq_printf(m, "wptr(0x%04x): 0x%08x [%5d]\n", ring->wptr_reg, tmp, tmp); |
| 779 | tmp = RREG32(ring->rptr_reg) >> ring->ptr_reg_shift; | ||
| 780 | seq_printf(m, "rptr(0x%04x): 0x%08x [%5d]\n", ring->rptr_reg, tmp, tmp); | ||
| 778 | if (ring->rptr_save_reg) { | 781 | if (ring->rptr_save_reg) { |
| 779 | seq_printf(m, "rptr next(0x%04x): 0x%08x\n", ring->rptr_save_reg, | 782 | seq_printf(m, "rptr next(0x%04x): 0x%08x\n", ring->rptr_save_reg, |
| 780 | RREG32(ring->rptr_save_reg)); | 783 | RREG32(ring->rptr_save_reg)); |
| 781 | } | 784 | } |
| 782 | seq_printf(m, "driver's copy of the wptr: 0x%08x\n", ring->wptr); | 785 | seq_printf(m, "driver's copy of the wptr: 0x%08x [%5d]\n", ring->wptr, ring->wptr); |
| 783 | seq_printf(m, "driver's copy of the rptr: 0x%08x\n", ring->rptr); | 786 | seq_printf(m, "driver's copy of the rptr: 0x%08x [%5d]\n", ring->rptr, ring->rptr); |
| 784 | seq_printf(m, "%u free dwords in ring\n", ring->ring_free_dw); | 787 | seq_printf(m, "%u free dwords in ring\n", ring->ring_free_dw); |
| 785 | seq_printf(m, "%u dwords in ring\n", count); | 788 | seq_printf(m, "%u dwords in ring\n", count); |
| 786 | i = ring->rptr; | 789 | /* print 8 dw before current rptr as often it's the last executed |
| 787 | for (j = 0; j <= count; j++) { | 790 | * packet that is the root issue |
| 788 | seq_printf(m, "r[%04d]=0x%08x\n", i, ring->ring[i]); | 791 | */ |
| 792 | i = (ring->rptr + ring->ptr_mask + 1 - 32) & ring->ptr_mask; | ||
| 793 | for (j = 0; j <= (count + 32); j++) { | ||
| 794 | seq_printf(m, "r[%5d]=0x%08x\n", i, ring->ring[i]); | ||
| 789 | i = (i + 1) & ring->ptr_mask; | 795 | i = (i + 1) & ring->ptr_mask; |
| 790 | } | 796 | } |
| 791 | return 0; | 797 | return 0; |
| @@ -794,11 +800,15 @@ static int radeon_debugfs_ring_info(struct seq_file *m, void *data) | |||
| 794 | static int radeon_ring_type_gfx_index = RADEON_RING_TYPE_GFX_INDEX; | 800 | static int radeon_ring_type_gfx_index = RADEON_RING_TYPE_GFX_INDEX; |
| 795 | static int cayman_ring_type_cp1_index = CAYMAN_RING_TYPE_CP1_INDEX; | 801 | static int cayman_ring_type_cp1_index = CAYMAN_RING_TYPE_CP1_INDEX; |
| 796 | static int cayman_ring_type_cp2_index = CAYMAN_RING_TYPE_CP2_INDEX; | 802 | static int cayman_ring_type_cp2_index = CAYMAN_RING_TYPE_CP2_INDEX; |
| 803 | static int radeon_ring_type_dma1_index = R600_RING_TYPE_DMA_INDEX; | ||
| 804 | static int radeon_ring_type_dma2_index = CAYMAN_RING_TYPE_DMA1_INDEX; | ||
| 797 | 805 | ||
| 798 | static struct drm_info_list radeon_debugfs_ring_info_list[] = { | 806 | static struct drm_info_list radeon_debugfs_ring_info_list[] = { |
| 799 | {"radeon_ring_gfx", radeon_debugfs_ring_info, 0, &radeon_ring_type_gfx_index}, | 807 | {"radeon_ring_gfx", radeon_debugfs_ring_info, 0, &radeon_ring_type_gfx_index}, |
| 800 | {"radeon_ring_cp1", radeon_debugfs_ring_info, 0, &cayman_ring_type_cp1_index}, | 808 | {"radeon_ring_cp1", radeon_debugfs_ring_info, 0, &cayman_ring_type_cp1_index}, |
| 801 | {"radeon_ring_cp2", radeon_debugfs_ring_info, 0, &cayman_ring_type_cp2_index}, | 809 | {"radeon_ring_cp2", radeon_debugfs_ring_info, 0, &cayman_ring_type_cp2_index}, |
| 810 | {"radeon_ring_dma1", radeon_debugfs_ring_info, 0, &radeon_ring_type_dma1_index}, | ||
| 811 | {"radeon_ring_dma2", radeon_debugfs_ring_info, 0, &radeon_ring_type_dma2_index}, | ||
| 802 | }; | 812 | }; |
| 803 | 813 | ||
| 804 | static int radeon_debugfs_sa_info(struct seq_file *m, void *data) | 814 | static int radeon_debugfs_sa_info(struct seq_file *m, void *data) |
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index 87c979c4f721..1b2444f4d8f4 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c | |||
| @@ -887,6 +887,80 @@ static int rv770_mc_init(struct radeon_device *rdev) | |||
| 887 | return 0; | 887 | return 0; |
| 888 | } | 888 | } |
| 889 | 889 | ||
| 890 | /** | ||
| 891 | * rv770_copy_dma - copy pages using the DMA engine | ||
| 892 | * | ||
| 893 | * @rdev: radeon_device pointer | ||
| 894 | * @src_offset: src GPU address | ||
| 895 | * @dst_offset: dst GPU address | ||
| 896 | * @num_gpu_pages: number of GPU pages to xfer | ||
| 897 | * @fence: radeon fence object | ||
| 898 | * | ||
| 899 | * Copy GPU paging using the DMA engine (r7xx). | ||
| 900 | * Used by the radeon ttm implementation to move pages if | ||
| 901 | * registered as the asic copy callback. | ||
| 902 | */ | ||
| 903 | int rv770_copy_dma(struct radeon_device *rdev, | ||
| 904 | uint64_t src_offset, uint64_t dst_offset, | ||
| 905 | unsigned num_gpu_pages, | ||
| 906 | struct radeon_fence **fence) | ||
| 907 | { | ||
| 908 | struct radeon_semaphore *sem = NULL; | ||
| 909 | int ring_index = rdev->asic->copy.dma_ring_index; | ||
| 910 | struct radeon_ring *ring = &rdev->ring[ring_index]; | ||
| 911 | u32 size_in_dw, cur_size_in_dw; | ||
| 912 | int i, num_loops; | ||
| 913 | int r = 0; | ||
| 914 | |||
| 915 | r = radeon_semaphore_create(rdev, &sem); | ||
| 916 | if (r) { | ||
| 917 | DRM_ERROR("radeon: moving bo (%d).\n", r); | ||
| 918 | return r; | ||
| 919 | } | ||
| 920 | |||
| 921 | size_in_dw = (num_gpu_pages << RADEON_GPU_PAGE_SHIFT) / 4; | ||
| 922 | num_loops = DIV_ROUND_UP(size_in_dw, 0xFFFF); | ||
| 923 | r = radeon_ring_lock(rdev, ring, num_loops * 5 + 8); | ||
| 924 | if (r) { | ||
| 925 | DRM_ERROR("radeon: moving bo (%d).\n", r); | ||
| 926 | radeon_semaphore_free(rdev, &sem, NULL); | ||
| 927 | return r; | ||
| 928 | } | ||
| 929 | |||
| 930 | if (radeon_fence_need_sync(*fence, ring->idx)) { | ||
| 931 | radeon_semaphore_sync_rings(rdev, sem, (*fence)->ring, | ||
| 932 | ring->idx); | ||
| 933 | radeon_fence_note_sync(*fence, ring->idx); | ||
| 934 | } else { | ||
| 935 | radeon_semaphore_free(rdev, &sem, NULL); | ||
| 936 | } | ||
| 937 | |||
| 938 | for (i = 0; i < num_loops; i++) { | ||
| 939 | cur_size_in_dw = size_in_dw; | ||
| 940 | if (cur_size_in_dw > 0xFFFF) | ||
| 941 | cur_size_in_dw = 0xFFFF; | ||
| 942 | size_in_dw -= cur_size_in_dw; | ||
| 943 | radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_COPY, 0, 0, cur_size_in_dw)); | ||
| 944 | radeon_ring_write(ring, dst_offset & 0xfffffffc); | ||
| 945 | radeon_ring_write(ring, src_offset & 0xfffffffc); | ||
| 946 | radeon_ring_write(ring, upper_32_bits(dst_offset) & 0xff); | ||
| 947 | radeon_ring_write(ring, upper_32_bits(src_offset) & 0xff); | ||
| 948 | src_offset += cur_size_in_dw * 4; | ||
| 949 | dst_offset += cur_size_in_dw * 4; | ||
| 950 | } | ||
| 951 | |||
| 952 | r = radeon_fence_emit(rdev, fence, ring->idx); | ||
| 953 | if (r) { | ||
| 954 | radeon_ring_unlock_undo(rdev, ring); | ||
| 955 | return r; | ||
| 956 | } | ||
| 957 | |||
| 958 | radeon_ring_unlock_commit(rdev, ring); | ||
| 959 | radeon_semaphore_free(rdev, &sem, *fence); | ||
| 960 | |||
| 961 | return r; | ||
| 962 | } | ||
| 963 | |||
| 890 | static int rv770_startup(struct radeon_device *rdev) | 964 | static int rv770_startup(struct radeon_device *rdev) |
| 891 | { | 965 | { |
| 892 | struct radeon_ring *ring; | 966 | struct radeon_ring *ring; |
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index ef683653f0b7..3240a3d64f30 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c | |||
| @@ -2126,15 +2126,13 @@ bool si_gpu_is_lockup(struct radeon_device *rdev, struct radeon_ring *ring) | |||
| 2126 | return radeon_ring_test_lockup(rdev, ring); | 2126 | return radeon_ring_test_lockup(rdev, ring); |
| 2127 | } | 2127 | } |
| 2128 | 2128 | ||
| 2129 | static int si_gpu_soft_reset(struct radeon_device *rdev) | 2129 | static void si_gpu_soft_reset_gfx(struct radeon_device *rdev) |
| 2130 | { | 2130 | { |
| 2131 | struct evergreen_mc_save save; | ||
| 2132 | u32 grbm_reset = 0; | 2131 | u32 grbm_reset = 0; |
| 2133 | 2132 | ||
| 2134 | if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE)) | 2133 | if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE)) |
| 2135 | return 0; | 2134 | return; |
| 2136 | 2135 | ||
| 2137 | dev_info(rdev->dev, "GPU softreset \n"); | ||
| 2138 | dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n", | 2136 | dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n", |
| 2139 | RREG32(GRBM_STATUS)); | 2137 | RREG32(GRBM_STATUS)); |
| 2140 | dev_info(rdev->dev, " GRBM_STATUS2=0x%08X\n", | 2138 | dev_info(rdev->dev, " GRBM_STATUS2=0x%08X\n", |
| @@ -2145,10 +2143,7 @@ static int si_gpu_soft_reset(struct radeon_device *rdev) | |||
| 2145 | RREG32(GRBM_STATUS_SE1)); | 2143 | RREG32(GRBM_STATUS_SE1)); |
| 2146 | dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", | 2144 | dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", |
| 2147 | RREG32(SRBM_STATUS)); | 2145 | RREG32(SRBM_STATUS)); |
| 2148 | evergreen_mc_stop(rdev, &save); | 2146 | |
| 2149 | if (radeon_mc_wait_for_idle(rdev)) { | ||
| 2150 | dev_warn(rdev->dev, "Wait for MC idle timedout !\n"); | ||
| 2151 | } | ||
| 2152 | /* Disable CP parsing/prefetching */ | 2147 | /* Disable CP parsing/prefetching */ |
| 2153 | WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT | CP_CE_HALT); | 2148 | WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT | CP_CE_HALT); |
| 2154 | 2149 | ||
| @@ -2173,8 +2168,7 @@ static int si_gpu_soft_reset(struct radeon_device *rdev) | |||
| 2173 | udelay(50); | 2168 | udelay(50); |
| 2174 | WREG32(GRBM_SOFT_RESET, 0); | 2169 | WREG32(GRBM_SOFT_RESET, 0); |
| 2175 | (void)RREG32(GRBM_SOFT_RESET); | 2170 | (void)RREG32(GRBM_SOFT_RESET); |
| 2176 | /* Wait a little for things to settle down */ | 2171 | |
| 2177 | udelay(50); | ||
| 2178 | dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n", | 2172 | dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n", |
| 2179 | RREG32(GRBM_STATUS)); | 2173 | RREG32(GRBM_STATUS)); |
| 2180 | dev_info(rdev->dev, " GRBM_STATUS2=0x%08X\n", | 2174 | dev_info(rdev->dev, " GRBM_STATUS2=0x%08X\n", |
| @@ -2185,13 +2179,75 @@ static int si_gpu_soft_reset(struct radeon_device *rdev) | |||
| 2185 | RREG32(GRBM_STATUS_SE1)); | 2179 | RREG32(GRBM_STATUS_SE1)); |
| 2186 | dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", | 2180 | dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n", |
| 2187 | RREG32(SRBM_STATUS)); | 2181 | RREG32(SRBM_STATUS)); |
| 2182 | } | ||
| 2183 | |||
| 2184 | static void si_gpu_soft_reset_dma(struct radeon_device *rdev) | ||
| 2185 | { | ||
| 2186 | u32 tmp; | ||
| 2187 | |||
| 2188 | if (RREG32(DMA_STATUS_REG) & DMA_IDLE) | ||
| 2189 | return; | ||
| 2190 | |||
| 2191 | dev_info(rdev->dev, " DMA_STATUS_REG = 0x%08X\n", | ||
| 2192 | RREG32(DMA_STATUS_REG)); | ||
| 2193 | |||
| 2194 | /* dma0 */ | ||
| 2195 | tmp = RREG32(DMA_RB_CNTL + DMA0_REGISTER_OFFSET); | ||
| 2196 | tmp &= ~DMA_RB_ENABLE; | ||
| 2197 | WREG32(DMA_RB_CNTL + DMA0_REGISTER_OFFSET, tmp); | ||
| 2198 | |||
| 2199 | /* dma1 */ | ||
| 2200 | tmp = RREG32(DMA_RB_CNTL + DMA1_REGISTER_OFFSET); | ||
| 2201 | tmp &= ~DMA_RB_ENABLE; | ||
| 2202 | WREG32(DMA_RB_CNTL + DMA1_REGISTER_OFFSET, tmp); | ||
| 2203 | |||
| 2204 | /* Reset dma */ | ||
| 2205 | WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA | SOFT_RESET_DMA1); | ||
| 2206 | RREG32(SRBM_SOFT_RESET); | ||
| 2207 | udelay(50); | ||
| 2208 | WREG32(SRBM_SOFT_RESET, 0); | ||
| 2209 | |||
| 2210 | dev_info(rdev->dev, " DMA_STATUS_REG = 0x%08X\n", | ||
| 2211 | RREG32(DMA_STATUS_REG)); | ||
| 2212 | } | ||
| 2213 | |||
| 2214 | static int si_gpu_soft_reset(struct radeon_device *rdev, u32 reset_mask) | ||
| 2215 | { | ||
| 2216 | struct evergreen_mc_save save; | ||
| 2217 | |||
| 2218 | if (reset_mask == 0) | ||
| 2219 | return 0; | ||
| 2220 | |||
| 2221 | dev_info(rdev->dev, "GPU softreset: 0x%08X\n", reset_mask); | ||
| 2222 | |||
| 2223 | dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x%08X\n", | ||
| 2224 | RREG32(VM_CONTEXT1_PROTECTION_FAULT_ADDR)); | ||
| 2225 | dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n", | ||
| 2226 | RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS)); | ||
| 2227 | |||
| 2228 | evergreen_mc_stop(rdev, &save); | ||
| 2229 | if (radeon_mc_wait_for_idle(rdev)) { | ||
| 2230 | dev_warn(rdev->dev, "Wait for MC idle timedout !\n"); | ||
| 2231 | } | ||
| 2232 | |||
| 2233 | if (reset_mask & (RADEON_RESET_GFX | RADEON_RESET_COMPUTE)) | ||
| 2234 | si_gpu_soft_reset_gfx(rdev); | ||
| 2235 | |||
| 2236 | if (reset_mask & RADEON_RESET_DMA) | ||
| 2237 | si_gpu_soft_reset_dma(rdev); | ||
| 2238 | |||
| 2239 | /* Wait a little for things to settle down */ | ||
| 2240 | udelay(50); | ||
| 2241 | |||
| 2188 | evergreen_mc_resume(rdev, &save); | 2242 | evergreen_mc_resume(rdev, &save); |
| 2189 | return 0; | 2243 | return 0; |
| 2190 | } | 2244 | } |
| 2191 | 2245 | ||
| 2192 | int si_asic_reset(struct radeon_device *rdev) | 2246 | int si_asic_reset(struct radeon_device *rdev) |
| 2193 | { | 2247 | { |
| 2194 | return si_gpu_soft_reset(rdev); | 2248 | return si_gpu_soft_reset(rdev, (RADEON_RESET_GFX | |
| 2249 | RADEON_RESET_COMPUTE | | ||
| 2250 | RADEON_RESET_DMA)); | ||
| 2195 | } | 2251 | } |
| 2196 | 2252 | ||
| 2197 | /* MC */ | 2253 | /* MC */ |
diff --git a/drivers/gpu/drm/radeon/sid.h b/drivers/gpu/drm/radeon/sid.h index 62b46215d423..c056aae814f0 100644 --- a/drivers/gpu/drm/radeon/sid.h +++ b/drivers/gpu/drm/radeon/sid.h | |||
| @@ -62,6 +62,22 @@ | |||
| 62 | 62 | ||
| 63 | #define SRBM_STATUS 0xE50 | 63 | #define SRBM_STATUS 0xE50 |
| 64 | 64 | ||
| 65 | #define SRBM_SOFT_RESET 0x0E60 | ||
| 66 | #define SOFT_RESET_BIF (1 << 1) | ||
| 67 | #define SOFT_RESET_DC (1 << 5) | ||
| 68 | #define SOFT_RESET_DMA1 (1 << 6) | ||
| 69 | #define SOFT_RESET_GRBM (1 << 8) | ||
| 70 | #define SOFT_RESET_HDP (1 << 9) | ||
| 71 | #define SOFT_RESET_IH (1 << 10) | ||
| 72 | #define SOFT_RESET_MC (1 << 11) | ||
| 73 | #define SOFT_RESET_ROM (1 << 14) | ||
| 74 | #define SOFT_RESET_SEM (1 << 15) | ||
| 75 | #define SOFT_RESET_VMC (1 << 17) | ||
| 76 | #define SOFT_RESET_DMA (1 << 20) | ||
| 77 | #define SOFT_RESET_TST (1 << 21) | ||
| 78 | #define SOFT_RESET_REGBB (1 << 22) | ||
| 79 | #define SOFT_RESET_ORB (1 << 23) | ||
| 80 | |||
| 65 | #define CC_SYS_RB_BACKEND_DISABLE 0xe80 | 81 | #define CC_SYS_RB_BACKEND_DISABLE 0xe80 |
| 66 | #define GC_USER_SYS_RB_BACKEND_DISABLE 0xe84 | 82 | #define GC_USER_SYS_RB_BACKEND_DISABLE 0xe84 |
| 67 | 83 | ||
| @@ -1013,6 +1029,8 @@ | |||
| 1013 | # define DATA_SWAP_ENABLE (1 << 3) | 1029 | # define DATA_SWAP_ENABLE (1 << 3) |
| 1014 | # define FENCE_SWAP_ENABLE (1 << 4) | 1030 | # define FENCE_SWAP_ENABLE (1 << 4) |
| 1015 | # define CTXEMPTY_INT_ENABLE (1 << 28) | 1031 | # define CTXEMPTY_INT_ENABLE (1 << 28) |
| 1032 | #define DMA_STATUS_REG 0xd034 | ||
| 1033 | # define DMA_IDLE (1 << 0) | ||
| 1016 | #define DMA_TILING_CONFIG 0xd0b8 | 1034 | #define DMA_TILING_CONFIG 0xd0b8 |
| 1017 | 1035 | ||
| 1018 | #define DMA_PACKET(cmd, b, t, s, n) ((((cmd) & 0xF) << 28) | \ | 1036 | #define DMA_PACKET(cmd, b, t, s, n) ((((cmd) & 0xF) << 28) | \ |
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c index 1c350fc4e449..d1d5306ebf24 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | * Hardware initialization | 33 | * Hardware initialization |
| 34 | */ | 34 | */ |
| 35 | 35 | ||
| 36 | static int __devinit shmob_drm_init_interface(struct shmob_drm_device *sdev) | 36 | static int shmob_drm_init_interface(struct shmob_drm_device *sdev) |
| 37 | { | 37 | { |
| 38 | static const u32 ldmt1r[] = { | 38 | static const u32 ldmt1r[] = { |
| 39 | [SHMOB_DRM_IFACE_RGB8] = LDMT1R_MIFTYP_RGB8, | 39 | [SHMOB_DRM_IFACE_RGB8] = LDMT1R_MIFTYP_RGB8, |
| @@ -67,7 +67,7 @@ static int __devinit shmob_drm_init_interface(struct shmob_drm_device *sdev) | |||
| 67 | return 0; | 67 | return 0; |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | static int __devinit shmob_drm_setup_clocks(struct shmob_drm_device *sdev, | 70 | static int shmob_drm_setup_clocks(struct shmob_drm_device *sdev, |
| 71 | enum shmob_drm_clk_source clksrc) | 71 | enum shmob_drm_clk_source clksrc) |
| 72 | { | 72 | { |
| 73 | struct clk *clk; | 73 | struct clk *clk; |
| @@ -330,12 +330,12 @@ static const struct dev_pm_ops shmob_drm_pm_ops = { | |||
| 330 | * Platform driver | 330 | * Platform driver |
| 331 | */ | 331 | */ |
| 332 | 332 | ||
| 333 | static int __devinit shmob_drm_probe(struct platform_device *pdev) | 333 | static int shmob_drm_probe(struct platform_device *pdev) |
| 334 | { | 334 | { |
| 335 | return drm_platform_init(&shmob_drm_driver, pdev); | 335 | return drm_platform_init(&shmob_drm_driver, pdev); |
| 336 | } | 336 | } |
| 337 | 337 | ||
| 338 | static int __devexit shmob_drm_remove(struct platform_device *pdev) | 338 | static int shmob_drm_remove(struct platform_device *pdev) |
| 339 | { | 339 | { |
| 340 | drm_platform_exit(&shmob_drm_driver, pdev); | 340 | drm_platform_exit(&shmob_drm_driver, pdev); |
| 341 | 341 | ||
| @@ -344,7 +344,7 @@ static int __devexit shmob_drm_remove(struct platform_device *pdev) | |||
| 344 | 344 | ||
| 345 | static struct platform_driver shmob_drm_platform_driver = { | 345 | static struct platform_driver shmob_drm_platform_driver = { |
| 346 | .probe = shmob_drm_probe, | 346 | .probe = shmob_drm_probe, |
| 347 | .remove = __devexit_p(shmob_drm_remove), | 347 | .remove = shmob_drm_remove, |
| 348 | .driver = { | 348 | .driver = { |
| 349 | .owner = THIS_MODULE, | 349 | .owner = THIS_MODULE, |
| 350 | .name = "shmob-drm", | 350 | .name = "shmob-drm", |
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index 9e9c5d2a5c74..d73d6e3e17b2 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c | |||
| @@ -654,11 +654,13 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo, | |||
| 654 | */ | 654 | */ |
| 655 | 655 | ||
| 656 | set_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags); | 656 | set_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags); |
| 657 | |||
| 658 | /* ttm_buffer_object_transfer accesses bo->sync_obj */ | ||
| 659 | ret = ttm_buffer_object_transfer(bo, &ghost_obj); | ||
| 657 | spin_unlock(&bdev->fence_lock); | 660 | spin_unlock(&bdev->fence_lock); |
| 658 | if (tmp_obj) | 661 | if (tmp_obj) |
| 659 | driver->sync_obj_unref(&tmp_obj); | 662 | driver->sync_obj_unref(&tmp_obj); |
| 660 | 663 | ||
| 661 | ret = ttm_buffer_object_transfer(bo, &ghost_obj); | ||
| 662 | if (ret) | 664 | if (ret) |
| 663 | return ret; | 665 | return ret; |
| 664 | 666 | ||
diff --git a/drivers/gpu/drm/udl/udl_connector.c b/drivers/gpu/drm/udl/udl_connector.c index 512f44add89f..fe5cdbcf2636 100644 --- a/drivers/gpu/drm/udl/udl_connector.c +++ b/drivers/gpu/drm/udl/udl_connector.c | |||
| @@ -22,13 +22,17 @@ | |||
| 22 | static u8 *udl_get_edid(struct udl_device *udl) | 22 | static u8 *udl_get_edid(struct udl_device *udl) |
| 23 | { | 23 | { |
| 24 | u8 *block; | 24 | u8 *block; |
| 25 | char rbuf[3]; | 25 | char *rbuf; |
| 26 | int ret, i; | 26 | int ret, i; |
| 27 | 27 | ||
| 28 | block = kmalloc(EDID_LENGTH, GFP_KERNEL); | 28 | block = kmalloc(EDID_LENGTH, GFP_KERNEL); |
| 29 | if (block == NULL) | 29 | if (block == NULL) |
| 30 | return NULL; | 30 | return NULL; |
| 31 | 31 | ||
| 32 | rbuf = kmalloc(2, GFP_KERNEL); | ||
| 33 | if (rbuf == NULL) | ||
| 34 | goto error; | ||
| 35 | |||
| 32 | for (i = 0; i < EDID_LENGTH; i++) { | 36 | for (i = 0; i < EDID_LENGTH; i++) { |
| 33 | ret = usb_control_msg(udl->ddev->usbdev, | 37 | ret = usb_control_msg(udl->ddev->usbdev, |
| 34 | usb_rcvctrlpipe(udl->ddev->usbdev, 0), (0x02), | 38 | usb_rcvctrlpipe(udl->ddev->usbdev, 0), (0x02), |
| @@ -36,16 +40,17 @@ static u8 *udl_get_edid(struct udl_device *udl) | |||
| 36 | HZ); | 40 | HZ); |
| 37 | if (ret < 1) { | 41 | if (ret < 1) { |
| 38 | DRM_ERROR("Read EDID byte %d failed err %x\n", i, ret); | 42 | DRM_ERROR("Read EDID byte %d failed err %x\n", i, ret); |
| 39 | i--; | ||
| 40 | goto error; | 43 | goto error; |
| 41 | } | 44 | } |
| 42 | block[i] = rbuf[1]; | 45 | block[i] = rbuf[1]; |
| 43 | } | 46 | } |
| 44 | 47 | ||
| 48 | kfree(rbuf); | ||
| 45 | return block; | 49 | return block; |
| 46 | 50 | ||
| 47 | error: | 51 | error: |
| 48 | kfree(block); | 52 | kfree(block); |
| 53 | kfree(rbuf); | ||
| 49 | return NULL; | 54 | return NULL; |
| 50 | } | 55 | } |
| 51 | 56 | ||
| @@ -57,6 +62,14 @@ static int udl_get_modes(struct drm_connector *connector) | |||
| 57 | 62 | ||
| 58 | edid = (struct edid *)udl_get_edid(udl); | 63 | edid = (struct edid *)udl_get_edid(udl); |
| 59 | 64 | ||
| 65 | /* | ||
| 66 | * We only read the main block, but if the monitor reports extension | ||
| 67 | * blocks then the drm edid code expects them to be present, so patch | ||
| 68 | * the extension count to 0. | ||
| 69 | */ | ||
| 70 | edid->checksum += edid->extensions; | ||
| 71 | edid->extensions = 0; | ||
| 72 | |||
| 60 | drm_mode_connector_update_edid_property(connector, edid); | 73 | drm_mode_connector_update_edid_property(connector, edid); |
| 61 | ret = drm_add_edid_modes(connector, edid); | 74 | ret = drm_add_edid_modes(connector, edid); |
| 62 | kfree(edid); | 75 | kfree(edid); |
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index 9ef222442ca0..12e4fdc810bf 100644 --- a/drivers/hid/i2c-hid/i2c-hid.c +++ b/drivers/hid/i2c-hid/i2c-hid.c | |||
| @@ -731,7 +731,7 @@ static struct hid_ll_driver i2c_hid_ll_driver = { | |||
| 731 | .hidinput_input_event = i2c_hid_hidinput_input_event, | 731 | .hidinput_input_event = i2c_hid_hidinput_input_event, |
| 732 | }; | 732 | }; |
| 733 | 733 | ||
| 734 | static int __devinit i2c_hid_init_irq(struct i2c_client *client) | 734 | static int i2c_hid_init_irq(struct i2c_client *client) |
| 735 | { | 735 | { |
| 736 | struct i2c_hid *ihid = i2c_get_clientdata(client); | 736 | struct i2c_hid *ihid = i2c_get_clientdata(client); |
| 737 | int ret; | 737 | int ret; |
| @@ -753,7 +753,7 @@ static int __devinit i2c_hid_init_irq(struct i2c_client *client) | |||
| 753 | return 0; | 753 | return 0; |
| 754 | } | 754 | } |
| 755 | 755 | ||
| 756 | static int __devinit i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid) | 756 | static int i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid) |
| 757 | { | 757 | { |
| 758 | struct i2c_client *client = ihid->client; | 758 | struct i2c_client *client = ihid->client; |
| 759 | struct i2c_hid_desc *hdesc = &ihid->hdesc; | 759 | struct i2c_hid_desc *hdesc = &ihid->hdesc; |
| @@ -810,8 +810,8 @@ static int __devinit i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid) | |||
| 810 | return 0; | 810 | return 0; |
| 811 | } | 811 | } |
| 812 | 812 | ||
| 813 | static int __devinit i2c_hid_probe(struct i2c_client *client, | 813 | static int i2c_hid_probe(struct i2c_client *client, |
| 814 | const struct i2c_device_id *dev_id) | 814 | const struct i2c_device_id *dev_id) |
| 815 | { | 815 | { |
| 816 | int ret; | 816 | int ret; |
| 817 | struct i2c_hid *ihid; | 817 | struct i2c_hid *ihid; |
| @@ -902,7 +902,7 @@ err: | |||
| 902 | return ret; | 902 | return ret; |
| 903 | } | 903 | } |
| 904 | 904 | ||
| 905 | static int __devexit i2c_hid_remove(struct i2c_client *client) | 905 | static int i2c_hid_remove(struct i2c_client *client) |
| 906 | { | 906 | { |
| 907 | struct i2c_hid *ihid = i2c_get_clientdata(client); | 907 | struct i2c_hid *ihid = i2c_get_clientdata(client); |
| 908 | struct hid_device *hid; | 908 | struct hid_device *hid; |
| @@ -967,7 +967,7 @@ static struct i2c_driver i2c_hid_driver = { | |||
| 967 | }, | 967 | }, |
| 968 | 968 | ||
| 969 | .probe = i2c_hid_probe, | 969 | .probe = i2c_hid_probe, |
| 970 | .remove = __devexit_p(i2c_hid_remove), | 970 | .remove = i2c_hid_remove, |
| 971 | 971 | ||
| 972 | .id_table = i2c_hid_id_table, | 972 | .id_table = i2c_hid_id_table, |
| 973 | }; | 973 | }; |
diff --git a/drivers/hsi/clients/hsi_char.c b/drivers/hsi/clients/hsi_char.c index 3ad91f6447d8..e61e5f991aa5 100644 --- a/drivers/hsi/clients/hsi_char.c +++ b/drivers/hsi/clients/hsi_char.c | |||
| @@ -675,7 +675,7 @@ static const struct file_operations hsc_fops = { | |||
| 675 | .release = hsc_release, | 675 | .release = hsc_release, |
| 676 | }; | 676 | }; |
| 677 | 677 | ||
| 678 | static void __devinit hsc_channel_init(struct hsc_channel *channel) | 678 | static void hsc_channel_init(struct hsc_channel *channel) |
| 679 | { | 679 | { |
| 680 | init_waitqueue_head(&channel->rx_wait); | 680 | init_waitqueue_head(&channel->rx_wait); |
| 681 | init_waitqueue_head(&channel->tx_wait); | 681 | init_waitqueue_head(&channel->tx_wait); |
| @@ -685,7 +685,7 @@ static void __devinit hsc_channel_init(struct hsc_channel *channel) | |||
| 685 | INIT_LIST_HEAD(&channel->tx_msgs_queue); | 685 | INIT_LIST_HEAD(&channel->tx_msgs_queue); |
| 686 | } | 686 | } |
| 687 | 687 | ||
| 688 | static int __devinit hsc_probe(struct device *dev) | 688 | static int hsc_probe(struct device *dev) |
| 689 | { | 689 | { |
| 690 | const char devname[] = "hsi_char"; | 690 | const char devname[] = "hsi_char"; |
| 691 | struct hsc_client_data *cl_data; | 691 | struct hsc_client_data *cl_data; |
| @@ -744,7 +744,7 @@ out1: | |||
| 744 | return ret; | 744 | return ret; |
| 745 | } | 745 | } |
| 746 | 746 | ||
| 747 | static int __devexit hsc_remove(struct device *dev) | 747 | static int hsc_remove(struct device *dev) |
| 748 | { | 748 | { |
| 749 | struct hsi_client *cl = to_hsi_client(dev); | 749 | struct hsi_client *cl = to_hsi_client(dev); |
| 750 | struct hsc_client_data *cl_data = hsi_client_drvdata(cl); | 750 | struct hsc_client_data *cl_data = hsi_client_drvdata(cl); |
| @@ -763,7 +763,7 @@ static struct hsi_client_driver hsc_driver = { | |||
| 763 | .name = "hsi_char", | 763 | .name = "hsi_char", |
| 764 | .owner = THIS_MODULE, | 764 | .owner = THIS_MODULE, |
| 765 | .probe = hsc_probe, | 765 | .probe = hsc_probe, |
| 766 | .remove = __devexit_p(hsc_remove), | 766 | .remove = hsc_remove, |
| 767 | }, | 767 | }, |
| 768 | }; | 768 | }; |
| 769 | 769 | ||
diff --git a/drivers/hwmon/vexpress.c b/drivers/hwmon/vexpress.c index 59fd1268e58a..d867e6bb2be1 100644 --- a/drivers/hwmon/vexpress.c +++ b/drivers/hwmon/vexpress.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/hwmon.h> | 19 | #include <linux/hwmon.h> |
| 20 | #include <linux/hwmon-sysfs.h> | 20 | #include <linux/hwmon-sysfs.h> |
| 21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
| 22 | #include <linux/of.h> | ||
| 22 | #include <linux/of_device.h> | 23 | #include <linux/of_device.h> |
| 23 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
| 24 | #include <linux/vexpress.h> | 25 | #include <linux/vexpress.h> |
| @@ -196,7 +197,7 @@ error: | |||
| 196 | return err; | 197 | return err; |
| 197 | } | 198 | } |
| 198 | 199 | ||
| 199 | static int __devexit vexpress_hwmon_remove(struct platform_device *pdev) | 200 | static int vexpress_hwmon_remove(struct platform_device *pdev) |
| 200 | { | 201 | { |
| 201 | struct vexpress_hwmon_data *data = platform_get_drvdata(pdev); | 202 | struct vexpress_hwmon_data *data = platform_get_drvdata(pdev); |
| 202 | const struct of_device_id *match; | 203 | const struct of_device_id *match; |
| @@ -213,7 +214,7 @@ static int __devexit vexpress_hwmon_remove(struct platform_device *pdev) | |||
| 213 | 214 | ||
| 214 | static struct platform_driver vexpress_hwmon_driver = { | 215 | static struct platform_driver vexpress_hwmon_driver = { |
| 215 | .probe = vexpress_hwmon_probe, | 216 | .probe = vexpress_hwmon_probe, |
| 216 | .remove = __devexit_p(vexpress_hwmon_remove), | 217 | .remove = vexpress_hwmon_remove, |
| 217 | .driver = { | 218 | .driver = { |
| 218 | .name = DRVNAME, | 219 | .name = DRVNAME, |
| 219 | .owner = THIS_MODULE, | 220 | .owner = THIS_MODULE, |
diff --git a/drivers/ide/aec62xx.c b/drivers/ide/aec62xx.c index 01451940393b..c7eaf20af926 100644 --- a/drivers/ide/aec62xx.c +++ b/drivers/ide/aec62xx.c | |||
| @@ -181,7 +181,7 @@ static const struct ide_port_ops atp86x_port_ops = { | |||
| 181 | .cable_detect = atp86x_cable_detect, | 181 | .cable_detect = atp86x_cable_detect, |
| 182 | }; | 182 | }; |
| 183 | 183 | ||
| 184 | static const struct ide_port_info aec62xx_chipsets[] __devinitconst = { | 184 | static const struct ide_port_info aec62xx_chipsets[] = { |
| 185 | { /* 0: AEC6210 */ | 185 | { /* 0: AEC6210 */ |
| 186 | .name = DRV_NAME, | 186 | .name = DRV_NAME, |
| 187 | .init_chipset = init_chipset_aec62xx, | 187 | .init_chipset = init_chipset_aec62xx, |
| @@ -251,7 +251,7 @@ static const struct ide_port_info aec62xx_chipsets[] __devinitconst = { | |||
| 251 | * chips, pass a local copy of 'struct ide_port_info' down the call chain. | 251 | * chips, pass a local copy of 'struct ide_port_info' down the call chain. |
| 252 | */ | 252 | */ |
| 253 | 253 | ||
| 254 | static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 254 | static int aec62xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 255 | { | 255 | { |
| 256 | const struct chipset_bus_clock_list_entry *bus_clock; | 256 | const struct chipset_bus_clock_list_entry *bus_clock; |
| 257 | struct ide_port_info d; | 257 | struct ide_port_info d; |
| @@ -287,7 +287,7 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi | |||
| 287 | return err; | 287 | return err; |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | static void __devexit aec62xx_remove(struct pci_dev *dev) | 290 | static void aec62xx_remove(struct pci_dev *dev) |
| 291 | { | 291 | { |
| 292 | ide_pci_remove(dev); | 292 | ide_pci_remove(dev); |
| 293 | pci_disable_device(dev); | 293 | pci_disable_device(dev); |
| @@ -307,7 +307,7 @@ static struct pci_driver aec62xx_pci_driver = { | |||
| 307 | .name = "AEC62xx_IDE", | 307 | .name = "AEC62xx_IDE", |
| 308 | .id_table = aec62xx_pci_tbl, | 308 | .id_table = aec62xx_pci_tbl, |
| 309 | .probe = aec62xx_init_one, | 309 | .probe = aec62xx_init_one, |
| 310 | .remove = __devexit_p(aec62xx_remove), | 310 | .remove = aec62xx_remove, |
| 311 | .suspend = ide_pci_suspend, | 311 | .suspend = ide_pci_suspend, |
| 312 | .resume = ide_pci_resume, | 312 | .resume = ide_pci_resume, |
| 313 | }; | 313 | }; |
diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c index 911a27ca356b..36f76e28a0bf 100644 --- a/drivers/ide/alim15x3.c +++ b/drivers/ide/alim15x3.c | |||
| @@ -415,7 +415,7 @@ static u8 ali_cable_detect(ide_hwif_t *hwif) | |||
| 415 | * Sparc systems. | 415 | * Sparc systems. |
| 416 | */ | 416 | */ |
| 417 | 417 | ||
| 418 | static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) | 418 | static void init_hwif_ali15x3(ide_hwif_t *hwif) |
| 419 | { | 419 | { |
| 420 | u8 ideic, inmir; | 420 | u8 ideic, inmir; |
| 421 | s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6, | 421 | s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6, |
| @@ -464,8 +464,7 @@ static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) | |||
| 464 | * Set up the DMA functionality on the ALi 15x3. | 464 | * Set up the DMA functionality on the ALi 15x3. |
| 465 | */ | 465 | */ |
| 466 | 466 | ||
| 467 | static int __devinit init_dma_ali15x3(ide_hwif_t *hwif, | 467 | static int init_dma_ali15x3(ide_hwif_t *hwif, const struct ide_port_info *d) |
| 468 | const struct ide_port_info *d) | ||
| 469 | { | 468 | { |
| 470 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 469 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
| 471 | unsigned long base = ide_pci_dma_base(hwif, d); | 470 | unsigned long base = ide_pci_dma_base(hwif, d); |
| @@ -512,7 +511,7 @@ static const struct ide_dma_ops ali_dma_ops = { | |||
| 512 | .dma_sff_read_status = ide_dma_sff_read_status, | 511 | .dma_sff_read_status = ide_dma_sff_read_status, |
| 513 | }; | 512 | }; |
| 514 | 513 | ||
| 515 | static const struct ide_port_info ali15x3_chipset __devinitconst = { | 514 | static const struct ide_port_info ali15x3_chipset = { |
| 516 | .name = DRV_NAME, | 515 | .name = DRV_NAME, |
| 517 | .init_chipset = init_chipset_ali15x3, | 516 | .init_chipset = init_chipset_ali15x3, |
| 518 | .init_hwif = init_hwif_ali15x3, | 517 | .init_hwif = init_hwif_ali15x3, |
| @@ -532,7 +531,8 @@ static const struct ide_port_info ali15x3_chipset __devinitconst = { | |||
| 532 | * hot plug layer. | 531 | * hot plug layer. |
| 533 | */ | 532 | */ |
| 534 | 533 | ||
| 535 | static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 534 | static int alim15x3_init_one(struct pci_dev *dev, |
| 535 | const struct pci_device_id *id) | ||
| 536 | { | 536 | { |
| 537 | struct ide_port_info d = ali15x3_chipset; | 537 | struct ide_port_info d = ali15x3_chipset; |
| 538 | u8 rev = dev->revision, idx = id->driver_data; | 538 | u8 rev = dev->revision, idx = id->driver_data; |
diff --git a/drivers/ide/amd74xx.c b/drivers/ide/amd74xx.c index 56fc99557ba2..cbfe846911d1 100644 --- a/drivers/ide/amd74xx.c +++ b/drivers/ide/amd74xx.c | |||
| @@ -223,7 +223,7 @@ static const struct ide_port_ops amd_port_ops = { | |||
| 223 | .udma_mask = udma, \ | 223 | .udma_mask = udma, \ |
| 224 | } | 224 | } |
| 225 | 225 | ||
| 226 | static const struct ide_port_info amd74xx_chipsets[] __devinitconst = { | 226 | static const struct ide_port_info amd74xx_chipsets[] = { |
| 227 | /* 0: AMD7401 */ DECLARE_AMD_DEV(0x00, ATA_UDMA2), | 227 | /* 0: AMD7401 */ DECLARE_AMD_DEV(0x00, ATA_UDMA2), |
| 228 | /* 1: AMD7409 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA4), | 228 | /* 1: AMD7409 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA4), |
| 229 | /* 2: AMD7411/7441 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA5), | 229 | /* 2: AMD7411/7441 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA5), |
| @@ -235,7 +235,7 @@ static const struct ide_port_info amd74xx_chipsets[] __devinitconst = { | |||
| 235 | /* 6: AMD5536 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA5), | 235 | /* 6: AMD5536 */ DECLARE_AMD_DEV(ATA_SWDMA2, ATA_UDMA5), |
| 236 | }; | 236 | }; |
| 237 | 237 | ||
| 238 | static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id) | 238 | static int amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id) |
| 239 | { | 239 | { |
| 240 | struct ide_port_info d; | 240 | struct ide_port_info d; |
| 241 | u8 idx = id->driver_data; | 241 | u8 idx = id->driver_data; |
diff --git a/drivers/ide/atiixp.c b/drivers/ide/atiixp.c index cb43480b1bd5..dbd0f242ec18 100644 --- a/drivers/ide/atiixp.c +++ b/drivers/ide/atiixp.c | |||
| @@ -139,7 +139,7 @@ static const struct ide_port_ops atiixp_port_ops = { | |||
| 139 | .cable_detect = atiixp_cable_detect, | 139 | .cable_detect = atiixp_cable_detect, |
| 140 | }; | 140 | }; |
| 141 | 141 | ||
| 142 | static const struct ide_port_info atiixp_pci_info[] __devinitconst = { | 142 | static const struct ide_port_info atiixp_pci_info[] = { |
| 143 | { /* 0: IXP200/300/400/700 */ | 143 | { /* 0: IXP200/300/400/700 */ |
| 144 | .name = DRV_NAME, | 144 | .name = DRV_NAME, |
| 145 | .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}}, | 145 | .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}}, |
| @@ -168,7 +168,7 @@ static const struct ide_port_info atiixp_pci_info[] __devinitconst = { | |||
| 168 | * finds a device matching our IDE device tables. | 168 | * finds a device matching our IDE device tables. |
| 169 | */ | 169 | */ |
| 170 | 170 | ||
| 171 | static int __devinit atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 171 | static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 172 | { | 172 | { |
| 173 | return ide_pci_init_one(dev, &atiixp_pci_info[id->driver_data], NULL); | 173 | return ide_pci_init_one(dev, &atiixp_pci_info[id->driver_data], NULL); |
| 174 | } | 174 | } |
diff --git a/drivers/ide/cmd64x.c b/drivers/ide/cmd64x.c index d1fc43802f5d..b127ed60c733 100644 --- a/drivers/ide/cmd64x.c +++ b/drivers/ide/cmd64x.c | |||
| @@ -327,7 +327,7 @@ static const struct ide_dma_ops cmd646_rev1_dma_ops = { | |||
| 327 | .dma_sff_read_status = ide_dma_sff_read_status, | 327 | .dma_sff_read_status = ide_dma_sff_read_status, |
| 328 | }; | 328 | }; |
| 329 | 329 | ||
| 330 | static const struct ide_port_info cmd64x_chipsets[] __devinitconst = { | 330 | static const struct ide_port_info cmd64x_chipsets[] = { |
| 331 | { /* 0: CMD643 */ | 331 | { /* 0: CMD643 */ |
| 332 | .name = DRV_NAME, | 332 | .name = DRV_NAME, |
| 333 | .init_chipset = init_chipset_cmd64x, | 333 | .init_chipset = init_chipset_cmd64x, |
| @@ -373,7 +373,7 @@ static const struct ide_port_info cmd64x_chipsets[] __devinitconst = { | |||
| 373 | } | 373 | } |
| 374 | }; | 374 | }; |
| 375 | 375 | ||
| 376 | static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 376 | static int cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 377 | { | 377 | { |
| 378 | struct ide_port_info d; | 378 | struct ide_port_info d; |
| 379 | u8 idx = id->driver_data; | 379 | u8 idx = id->driver_data; |
diff --git a/drivers/ide/cs5520.c b/drivers/ide/cs5520.c index 14447621e60b..6250aee30503 100644 --- a/drivers/ide/cs5520.c +++ b/drivers/ide/cs5520.c | |||
| @@ -94,7 +94,7 @@ static const struct ide_port_ops cs5520_port_ops = { | |||
| 94 | .set_dma_mode = cs5520_set_dma_mode, | 94 | .set_dma_mode = cs5520_set_dma_mode, |
| 95 | }; | 95 | }; |
| 96 | 96 | ||
| 97 | static const struct ide_port_info cyrix_chipset __devinitconst = { | 97 | static const struct ide_port_info cyrix_chipset = { |
| 98 | .name = DRV_NAME, | 98 | .name = DRV_NAME, |
| 99 | .enablebits = { { 0x60, 0x01, 0x01 }, { 0x60, 0x02, 0x02 } }, | 99 | .enablebits = { { 0x60, 0x01, 0x01 }, { 0x60, 0x02, 0x02 } }, |
| 100 | .port_ops = &cs5520_port_ops, | 100 | .port_ops = &cs5520_port_ops, |
| @@ -108,7 +108,7 @@ static const struct ide_port_info cyrix_chipset __devinitconst = { | |||
| 108 | * work longhand. | 108 | * work longhand. |
| 109 | */ | 109 | */ |
| 110 | 110 | ||
| 111 | static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 111 | static int cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 112 | { | 112 | { |
| 113 | const struct ide_port_info *d = &cyrix_chipset; | 113 | const struct ide_port_info *d = &cyrix_chipset; |
| 114 | struct ide_hw hw[2], *hws[] = { NULL, NULL }; | 114 | struct ide_hw hw[2], *hws[] = { NULL, NULL }; |
diff --git a/drivers/ide/cs5530.c b/drivers/ide/cs5530.c index 49b40ad59d1a..65371599b976 100644 --- a/drivers/ide/cs5530.c +++ b/drivers/ide/cs5530.c | |||
| @@ -226,7 +226,7 @@ out: | |||
| 226 | * performs channel-specific pre-initialization before drive probing. | 226 | * performs channel-specific pre-initialization before drive probing. |
| 227 | */ | 227 | */ |
| 228 | 228 | ||
| 229 | static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif) | 229 | static void init_hwif_cs5530 (ide_hwif_t *hwif) |
| 230 | { | 230 | { |
| 231 | unsigned long basereg; | 231 | unsigned long basereg; |
| 232 | u32 d0_timings; | 232 | u32 d0_timings; |
| @@ -245,7 +245,7 @@ static const struct ide_port_ops cs5530_port_ops = { | |||
| 245 | .udma_filter = cs5530_udma_filter, | 245 | .udma_filter = cs5530_udma_filter, |
| 246 | }; | 246 | }; |
| 247 | 247 | ||
| 248 | static const struct ide_port_info cs5530_chipset __devinitconst = { | 248 | static const struct ide_port_info cs5530_chipset = { |
| 249 | .name = DRV_NAME, | 249 | .name = DRV_NAME, |
| 250 | .init_chipset = init_chipset_cs5530, | 250 | .init_chipset = init_chipset_cs5530, |
| 251 | .init_hwif = init_hwif_cs5530, | 251 | .init_hwif = init_hwif_cs5530, |
| @@ -257,7 +257,7 @@ static const struct ide_port_info cs5530_chipset __devinitconst = { | |||
| 257 | .udma_mask = ATA_UDMA2, | 257 | .udma_mask = ATA_UDMA2, |
| 258 | }; | 258 | }; |
| 259 | 259 | ||
| 260 | static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 260 | static int cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 261 | { | 261 | { |
| 262 | return ide_pci_init_one(dev, &cs5530_chipset, NULL); | 262 | return ide_pci_init_one(dev, &cs5530_chipset, NULL); |
| 263 | } | 263 | } |
diff --git a/drivers/ide/cs5535.c b/drivers/ide/cs5535.c index 18d4c852602b..3bc5b9a34013 100644 --- a/drivers/ide/cs5535.c +++ b/drivers/ide/cs5535.c | |||
| @@ -170,7 +170,7 @@ static const struct ide_port_ops cs5535_port_ops = { | |||
| 170 | .cable_detect = cs5535_cable_detect, | 170 | .cable_detect = cs5535_cable_detect, |
| 171 | }; | 171 | }; |
| 172 | 172 | ||
| 173 | static const struct ide_port_info cs5535_chipset __devinitconst = { | 173 | static const struct ide_port_info cs5535_chipset = { |
| 174 | .name = DRV_NAME, | 174 | .name = DRV_NAME, |
| 175 | .port_ops = &cs5535_port_ops, | 175 | .port_ops = &cs5535_port_ops, |
| 176 | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE, | 176 | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE, |
| @@ -179,8 +179,7 @@ static const struct ide_port_info cs5535_chipset __devinitconst = { | |||
| 179 | .udma_mask = ATA_UDMA4, | 179 | .udma_mask = ATA_UDMA4, |
| 180 | }; | 180 | }; |
| 181 | 181 | ||
| 182 | static int __devinit cs5535_init_one(struct pci_dev *dev, | 182 | static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 183 | const struct pci_device_id *id) | ||
| 184 | { | 183 | { |
| 185 | return ide_pci_init_one(dev, &cs5535_chipset, NULL); | 184 | return ide_pci_init_one(dev, &cs5535_chipset, NULL); |
| 186 | } | 185 | } |
diff --git a/drivers/ide/cy82c693.c b/drivers/ide/cy82c693.c index 3ffb49dab574..f5820079a286 100644 --- a/drivers/ide/cy82c693.c +++ b/drivers/ide/cy82c693.c | |||
| @@ -145,7 +145,7 @@ static void cy82c693_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) | |||
| 145 | pci_dev_put(dev); | 145 | pci_dev_put(dev); |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | static void __devinit init_iops_cy82c693(ide_hwif_t *hwif) | 148 | static void init_iops_cy82c693(ide_hwif_t *hwif) |
| 149 | { | 149 | { |
| 150 | static ide_hwif_t *primary; | 150 | static ide_hwif_t *primary; |
| 151 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 151 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
| @@ -163,7 +163,7 @@ static const struct ide_port_ops cy82c693_port_ops = { | |||
| 163 | .set_dma_mode = cy82c693_set_dma_mode, | 163 | .set_dma_mode = cy82c693_set_dma_mode, |
| 164 | }; | 164 | }; |
| 165 | 165 | ||
| 166 | static const struct ide_port_info cy82c693_chipset __devinitconst = { | 166 | static const struct ide_port_info cy82c693_chipset = { |
| 167 | .name = DRV_NAME, | 167 | .name = DRV_NAME, |
| 168 | .init_iops = init_iops_cy82c693, | 168 | .init_iops = init_iops_cy82c693, |
| 169 | .port_ops = &cy82c693_port_ops, | 169 | .port_ops = &cy82c693_port_ops, |
| @@ -173,7 +173,8 @@ static const struct ide_port_info cy82c693_chipset __devinitconst = { | |||
| 173 | .mwdma_mask = ATA_MWDMA2, | 173 | .mwdma_mask = ATA_MWDMA2, |
| 174 | }; | 174 | }; |
| 175 | 175 | ||
| 176 | static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 176 | static int cy82c693_init_one(struct pci_dev *dev, |
| 177 | const struct pci_device_id *id) | ||
| 177 | { | 178 | { |
| 178 | struct pci_dev *dev2; | 179 | struct pci_dev *dev2; |
| 179 | int ret = -ENODEV; | 180 | int ret = -ENODEV; |
| @@ -190,7 +191,7 @@ static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_dev | |||
| 190 | return ret; | 191 | return ret; |
| 191 | } | 192 | } |
| 192 | 193 | ||
| 193 | static void __devexit cy82c693_remove(struct pci_dev *dev) | 194 | static void cy82c693_remove(struct pci_dev *dev) |
| 194 | { | 195 | { |
| 195 | struct ide_host *host = pci_get_drvdata(dev); | 196 | struct ide_host *host = pci_get_drvdata(dev); |
| 196 | struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL; | 197 | struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL; |
| @@ -209,7 +210,7 @@ static struct pci_driver cy82c693_pci_driver = { | |||
| 209 | .name = "Cypress_IDE", | 210 | .name = "Cypress_IDE", |
| 210 | .id_table = cy82c693_pci_tbl, | 211 | .id_table = cy82c693_pci_tbl, |
| 211 | .probe = cy82c693_init_one, | 212 | .probe = cy82c693_init_one, |
| 212 | .remove = __devexit_p(cy82c693_remove), | 213 | .remove = cy82c693_remove, |
| 213 | .suspend = ide_pci_suspend, | 214 | .suspend = ide_pci_suspend, |
| 214 | .resume = ide_pci_resume, | 215 | .resume = ide_pci_resume, |
| 215 | }; | 216 | }; |
diff --git a/drivers/ide/delkin_cb.c b/drivers/ide/delkin_cb.c index 1e10eba62ceb..7e27d3295e55 100644 --- a/drivers/ide/delkin_cb.c +++ b/drivers/ide/delkin_cb.c | |||
| @@ -71,8 +71,7 @@ static const struct ide_port_info delkin_cb_port_info = { | |||
| 71 | .chipset = ide_pci, | 71 | .chipset = ide_pci, |
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| 74 | static int __devinit | 74 | static int delkin_cb_probe(struct pci_dev *dev, const struct pci_device_id *id) |
| 75 | delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id) | ||
| 76 | { | 75 | { |
| 77 | struct ide_host *host; | 76 | struct ide_host *host; |
| 78 | unsigned long base; | 77 | unsigned long base; |
| @@ -158,7 +157,7 @@ static int delkin_cb_resume(struct pci_dev *dev) | |||
| 158 | #define delkin_cb_resume NULL | 157 | #define delkin_cb_resume NULL |
| 159 | #endif | 158 | #endif |
| 160 | 159 | ||
| 161 | static struct pci_device_id delkin_cb_pci_tbl[] __devinitdata = { | 160 | static struct pci_device_id delkin_cb_pci_tbl[] = { |
| 162 | { 0x1145, 0xf021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 161 | { 0x1145, 0xf021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
| 163 | { 0x1145, 0xf024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 162 | { 0x1145, 0xf024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
| 164 | { 0, }, | 163 | { 0, }, |
diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c index 4aec3b87ff91..696b6c1ec940 100644 --- a/drivers/ide/hpt366.c +++ b/drivers/ide/hpt366.c | |||
| @@ -443,7 +443,7 @@ static struct hpt_timings hpt37x_timings = { | |||
| 443 | } | 443 | } |
| 444 | }; | 444 | }; |
| 445 | 445 | ||
| 446 | static const struct hpt_info hpt36x __devinitconst = { | 446 | static const struct hpt_info hpt36x = { |
| 447 | .chip_name = "HPT36x", | 447 | .chip_name = "HPT36x", |
| 448 | .chip_type = HPT36x, | 448 | .chip_type = HPT36x, |
| 449 | .udma_mask = HPT366_ALLOW_ATA66_3 ? (HPT366_ALLOW_ATA66_4 ? ATA_UDMA4 : ATA_UDMA3) : ATA_UDMA2, | 449 | .udma_mask = HPT366_ALLOW_ATA66_3 ? (HPT366_ALLOW_ATA66_4 ? ATA_UDMA4 : ATA_UDMA3) : ATA_UDMA2, |
| @@ -451,7 +451,7 @@ static const struct hpt_info hpt36x __devinitconst = { | |||
| 451 | .timings = &hpt36x_timings | 451 | .timings = &hpt36x_timings |
| 452 | }; | 452 | }; |
| 453 | 453 | ||
| 454 | static const struct hpt_info hpt370 __devinitconst = { | 454 | static const struct hpt_info hpt370 = { |
| 455 | .chip_name = "HPT370", | 455 | .chip_name = "HPT370", |
| 456 | .chip_type = HPT370, | 456 | .chip_type = HPT370, |
| 457 | .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4, | 457 | .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4, |
| @@ -459,7 +459,7 @@ static const struct hpt_info hpt370 __devinitconst = { | |||
| 459 | .timings = &hpt37x_timings | 459 | .timings = &hpt37x_timings |
| 460 | }; | 460 | }; |
| 461 | 461 | ||
| 462 | static const struct hpt_info hpt370a __devinitconst = { | 462 | static const struct hpt_info hpt370a = { |
| 463 | .chip_name = "HPT370A", | 463 | .chip_name = "HPT370A", |
| 464 | .chip_type = HPT370A, | 464 | .chip_type = HPT370A, |
| 465 | .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4, | 465 | .udma_mask = HPT370_ALLOW_ATA100_5 ? ATA_UDMA5 : ATA_UDMA4, |
| @@ -467,7 +467,7 @@ static const struct hpt_info hpt370a __devinitconst = { | |||
| 467 | .timings = &hpt37x_timings | 467 | .timings = &hpt37x_timings |
| 468 | }; | 468 | }; |
| 469 | 469 | ||
| 470 | static const struct hpt_info hpt374 __devinitconst = { | 470 | static const struct hpt_info hpt374 = { |
| 471 | .chip_name = "HPT374", | 471 | .chip_name = "HPT374", |
| 472 | .chip_type = HPT374, | 472 | .chip_type = HPT374, |
| 473 | .udma_mask = ATA_UDMA5, | 473 | .udma_mask = ATA_UDMA5, |
| @@ -475,7 +475,7 @@ static const struct hpt_info hpt374 __devinitconst = { | |||
| 475 | .timings = &hpt37x_timings | 475 | .timings = &hpt37x_timings |
| 476 | }; | 476 | }; |
| 477 | 477 | ||
| 478 | static const struct hpt_info hpt372 __devinitconst = { | 478 | static const struct hpt_info hpt372 = { |
| 479 | .chip_name = "HPT372", | 479 | .chip_name = "HPT372", |
| 480 | .chip_type = HPT372, | 480 | .chip_type = HPT372, |
| 481 | .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, | 481 | .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, |
| @@ -483,7 +483,7 @@ static const struct hpt_info hpt372 __devinitconst = { | |||
| 483 | .timings = &hpt37x_timings | 483 | .timings = &hpt37x_timings |
| 484 | }; | 484 | }; |
| 485 | 485 | ||
| 486 | static const struct hpt_info hpt372a __devinitconst = { | 486 | static const struct hpt_info hpt372a = { |
| 487 | .chip_name = "HPT372A", | 487 | .chip_name = "HPT372A", |
| 488 | .chip_type = HPT372A, | 488 | .chip_type = HPT372A, |
| 489 | .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, | 489 | .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, |
| @@ -491,7 +491,7 @@ static const struct hpt_info hpt372a __devinitconst = { | |||
| 491 | .timings = &hpt37x_timings | 491 | .timings = &hpt37x_timings |
| 492 | }; | 492 | }; |
| 493 | 493 | ||
| 494 | static const struct hpt_info hpt302 __devinitconst = { | 494 | static const struct hpt_info hpt302 = { |
| 495 | .chip_name = "HPT302", | 495 | .chip_name = "HPT302", |
| 496 | .chip_type = HPT302, | 496 | .chip_type = HPT302, |
| 497 | .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, | 497 | .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, |
| @@ -499,7 +499,7 @@ static const struct hpt_info hpt302 __devinitconst = { | |||
| 499 | .timings = &hpt37x_timings | 499 | .timings = &hpt37x_timings |
| 500 | }; | 500 | }; |
| 501 | 501 | ||
| 502 | static const struct hpt_info hpt371 __devinitconst = { | 502 | static const struct hpt_info hpt371 = { |
| 503 | .chip_name = "HPT371", | 503 | .chip_name = "HPT371", |
| 504 | .chip_type = HPT371, | 504 | .chip_type = HPT371, |
| 505 | .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, | 505 | .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, |
| @@ -507,7 +507,7 @@ static const struct hpt_info hpt371 __devinitconst = { | |||
| 507 | .timings = &hpt37x_timings | 507 | .timings = &hpt37x_timings |
| 508 | }; | 508 | }; |
| 509 | 509 | ||
| 510 | static const struct hpt_info hpt372n __devinitconst = { | 510 | static const struct hpt_info hpt372n = { |
| 511 | .chip_name = "HPT372N", | 511 | .chip_name = "HPT372N", |
| 512 | .chip_type = HPT372N, | 512 | .chip_type = HPT372N, |
| 513 | .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, | 513 | .udma_mask = HPT372_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, |
| @@ -515,7 +515,7 @@ static const struct hpt_info hpt372n __devinitconst = { | |||
| 515 | .timings = &hpt37x_timings | 515 | .timings = &hpt37x_timings |
| 516 | }; | 516 | }; |
| 517 | 517 | ||
| 518 | static const struct hpt_info hpt302n __devinitconst = { | 518 | static const struct hpt_info hpt302n = { |
| 519 | .chip_name = "HPT302N", | 519 | .chip_name = "HPT302N", |
| 520 | .chip_type = HPT302N, | 520 | .chip_type = HPT302N, |
| 521 | .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, | 521 | .udma_mask = HPT302_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, |
| @@ -523,7 +523,7 @@ static const struct hpt_info hpt302n __devinitconst = { | |||
| 523 | .timings = &hpt37x_timings | 523 | .timings = &hpt37x_timings |
| 524 | }; | 524 | }; |
| 525 | 525 | ||
| 526 | static const struct hpt_info hpt371n __devinitconst = { | 526 | static const struct hpt_info hpt371n = { |
| 527 | .chip_name = "HPT371N", | 527 | .chip_name = "HPT371N", |
| 528 | .chip_type = HPT371N, | 528 | .chip_type = HPT371N, |
| 529 | .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, | 529 | .udma_mask = HPT371_ALLOW_ATA133_6 ? ATA_UDMA6 : ATA_UDMA5, |
| @@ -1197,7 +1197,7 @@ static u8 hpt3xx_cable_detect(ide_hwif_t *hwif) | |||
| 1197 | return (scr1 & ata66) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; | 1197 | return (scr1 & ata66) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; |
| 1198 | } | 1198 | } |
| 1199 | 1199 | ||
| 1200 | static void __devinit init_hwif_hpt366(ide_hwif_t *hwif) | 1200 | static void init_hwif_hpt366(ide_hwif_t *hwif) |
| 1201 | { | 1201 | { |
| 1202 | struct hpt_info *info = hpt3xx_get_info(hwif->dev); | 1202 | struct hpt_info *info = hpt3xx_get_info(hwif->dev); |
| 1203 | u8 chip_type = info->chip_type; | 1203 | u8 chip_type = info->chip_type; |
| @@ -1221,7 +1221,7 @@ static void __devinit init_hwif_hpt366(ide_hwif_t *hwif) | |||
| 1221 | } | 1221 | } |
| 1222 | } | 1222 | } |
| 1223 | 1223 | ||
| 1224 | static int __devinit init_dma_hpt366(ide_hwif_t *hwif, | 1224 | static int init_dma_hpt366(ide_hwif_t *hwif, |
| 1225 | const struct ide_port_info *d) | 1225 | const struct ide_port_info *d) |
| 1226 | { | 1226 | { |
| 1227 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 1227 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
| @@ -1265,7 +1265,7 @@ static int __devinit init_dma_hpt366(ide_hwif_t *hwif, | |||
| 1265 | return 0; | 1265 | return 0; |
| 1266 | } | 1266 | } |
| 1267 | 1267 | ||
| 1268 | static void __devinit hpt374_init(struct pci_dev *dev, struct pci_dev *dev2) | 1268 | static void hpt374_init(struct pci_dev *dev, struct pci_dev *dev2) |
| 1269 | { | 1269 | { |
| 1270 | if (dev2->irq != dev->irq) { | 1270 | if (dev2->irq != dev->irq) { |
| 1271 | /* FIXME: we need a core pci_set_interrupt() */ | 1271 | /* FIXME: we need a core pci_set_interrupt() */ |
| @@ -1275,7 +1275,7 @@ static void __devinit hpt374_init(struct pci_dev *dev, struct pci_dev *dev2) | |||
| 1275 | } | 1275 | } |
| 1276 | } | 1276 | } |
| 1277 | 1277 | ||
| 1278 | static void __devinit hpt371_init(struct pci_dev *dev) | 1278 | static void hpt371_init(struct pci_dev *dev) |
| 1279 | { | 1279 | { |
| 1280 | u8 mcr1 = 0; | 1280 | u8 mcr1 = 0; |
| 1281 | 1281 | ||
| @@ -1290,7 +1290,7 @@ static void __devinit hpt371_init(struct pci_dev *dev) | |||
| 1290 | pci_write_config_byte(dev, 0x50, mcr1 & ~0x04); | 1290 | pci_write_config_byte(dev, 0x50, mcr1 & ~0x04); |
| 1291 | } | 1291 | } |
| 1292 | 1292 | ||
| 1293 | static int __devinit hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2) | 1293 | static int hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2) |
| 1294 | { | 1294 | { |
| 1295 | u8 mcr1 = 0, pin1 = 0, pin2 = 0; | 1295 | u8 mcr1 = 0, pin1 = 0, pin2 = 0; |
| 1296 | 1296 | ||
| @@ -1361,7 +1361,7 @@ static const struct ide_dma_ops hpt36x_dma_ops = { | |||
| 1361 | .dma_sff_read_status = ide_dma_sff_read_status, | 1361 | .dma_sff_read_status = ide_dma_sff_read_status, |
| 1362 | }; | 1362 | }; |
| 1363 | 1363 | ||
| 1364 | static const struct ide_port_info hpt366_chipsets[] __devinitconst = { | 1364 | static const struct ide_port_info hpt366_chipsets[] = { |
| 1365 | { /* 0: HPT36x */ | 1365 | { /* 0: HPT36x */ |
| 1366 | .name = DRV_NAME, | 1366 | .name = DRV_NAME, |
| 1367 | .init_chipset = init_chipset_hpt366, | 1367 | .init_chipset = init_chipset_hpt366, |
| @@ -1402,7 +1402,7 @@ static const struct ide_port_info hpt366_chipsets[] __devinitconst = { | |||
| 1402 | * Called when the PCI registration layer (or the IDE initialization) | 1402 | * Called when the PCI registration layer (or the IDE initialization) |
| 1403 | * finds a device matching our IDE device tables. | 1403 | * finds a device matching our IDE device tables. |
| 1404 | */ | 1404 | */ |
| 1405 | static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 1405 | static int hpt366_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 1406 | { | 1406 | { |
| 1407 | const struct hpt_info *info = NULL; | 1407 | const struct hpt_info *info = NULL; |
| 1408 | struct hpt_info *dyn_info; | 1408 | struct hpt_info *dyn_info; |
| @@ -1499,7 +1499,7 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic | |||
| 1499 | return ret; | 1499 | return ret; |
| 1500 | } | 1500 | } |
| 1501 | 1501 | ||
| 1502 | static void __devexit hpt366_remove(struct pci_dev *dev) | 1502 | static void hpt366_remove(struct pci_dev *dev) |
| 1503 | { | 1503 | { |
| 1504 | struct ide_host *host = pci_get_drvdata(dev); | 1504 | struct ide_host *host = pci_get_drvdata(dev); |
| 1505 | struct ide_info *info = host->host_priv; | 1505 | struct ide_info *info = host->host_priv; |
| @@ -1510,7 +1510,7 @@ static void __devexit hpt366_remove(struct pci_dev *dev) | |||
| 1510 | kfree(info); | 1510 | kfree(info); |
| 1511 | } | 1511 | } |
| 1512 | 1512 | ||
| 1513 | static const struct pci_device_id hpt366_pci_tbl[] __devinitconst = { | 1513 | static const struct pci_device_id hpt366_pci_tbl[] = { |
| 1514 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366), 0 }, | 1514 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366), 0 }, |
| 1515 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT372), 1 }, | 1515 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT372), 1 }, |
| 1516 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT302), 2 }, | 1516 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT302), 2 }, |
| @@ -1525,7 +1525,7 @@ static struct pci_driver hpt366_pci_driver = { | |||
| 1525 | .name = "HPT366_IDE", | 1525 | .name = "HPT366_IDE", |
| 1526 | .id_table = hpt366_pci_tbl, | 1526 | .id_table = hpt366_pci_tbl, |
| 1527 | .probe = hpt366_init_one, | 1527 | .probe = hpt366_init_one, |
| 1528 | .remove = __devexit_p(hpt366_remove), | 1528 | .remove = hpt366_remove, |
| 1529 | .suspend = ide_pci_suspend, | 1529 | .suspend = ide_pci_suspend, |
| 1530 | .resume = ide_pci_resume, | 1530 | .resume = ide_pci_resume, |
| 1531 | }; | 1531 | }; |
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c index e640d0ac3af6..9f0a48e39b8a 100644 --- a/drivers/ide/icside.c +++ b/drivers/ide/icside.c | |||
| @@ -406,8 +406,8 @@ static const struct ide_port_info icside_v5_port_info = { | |||
| 406 | .chipset = ide_acorn, | 406 | .chipset = ide_acorn, |
| 407 | }; | 407 | }; |
| 408 | 408 | ||
| 409 | static int __devinit | 409 | static int icside_register_v5(struct icside_state *state, |
| 410 | icside_register_v5(struct icside_state *state, struct expansion_card *ec) | 410 | struct expansion_card *ec) |
| 411 | { | 411 | { |
| 412 | void __iomem *base; | 412 | void __iomem *base; |
| 413 | struct ide_host *host; | 413 | struct ide_host *host; |
| @@ -460,8 +460,8 @@ static const struct ide_port_info icside_v6_port_info __initconst = { | |||
| 460 | .chipset = ide_acorn, | 460 | .chipset = ide_acorn, |
| 461 | }; | 461 | }; |
| 462 | 462 | ||
| 463 | static int __devinit | 463 | static int icside_register_v6(struct icside_state *state, |
| 464 | icside_register_v6(struct icside_state *state, struct expansion_card *ec) | 464 | struct expansion_card *ec) |
| 465 | { | 465 | { |
| 466 | void __iomem *ioc_base, *easi_base; | 466 | void __iomem *ioc_base, *easi_base; |
| 467 | struct ide_host *host; | 467 | struct ide_host *host; |
| @@ -537,8 +537,7 @@ out: | |||
| 537 | return ret; | 537 | return ret; |
| 538 | } | 538 | } |
| 539 | 539 | ||
| 540 | static int __devinit | 540 | static int icside_probe(struct expansion_card *ec, const struct ecard_id *id) |
| 541 | icside_probe(struct expansion_card *ec, const struct ecard_id *id) | ||
| 542 | { | 541 | { |
| 543 | struct icside_state *state; | 542 | struct icside_state *state; |
| 544 | void __iomem *idmem; | 543 | void __iomem *idmem; |
| @@ -604,7 +603,7 @@ icside_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
| 604 | return ret; | 603 | return ret; |
| 605 | } | 604 | } |
| 606 | 605 | ||
| 607 | static void __devexit icside_remove(struct expansion_card *ec) | 606 | static void icside_remove(struct expansion_card *ec) |
| 608 | { | 607 | { |
| 609 | struct icside_state *state = ecard_get_drvdata(ec); | 608 | struct icside_state *state = ecard_get_drvdata(ec); |
| 610 | 609 | ||
| @@ -666,7 +665,7 @@ static const struct ecard_id icside_ids[] = { | |||
| 666 | 665 | ||
| 667 | static struct ecard_driver icside_driver = { | 666 | static struct ecard_driver icside_driver = { |
| 668 | .probe = icside_probe, | 667 | .probe = icside_probe, |
| 669 | .remove = __devexit_p(icside_remove), | 668 | .remove = icside_remove, |
| 670 | .shutdown = icside_shutdown, | 669 | .shutdown = icside_shutdown, |
| 671 | .id_table = icside_ids, | 670 | .id_table = icside_ids, |
| 672 | .drv = { | 671 | .drv = { |
diff --git a/drivers/ide/ide-pci-generic.c b/drivers/ide/ide-pci-generic.c index dab5b670bfbf..673420db953f 100644 --- a/drivers/ide/ide-pci-generic.c +++ b/drivers/ide/ide-pci-generic.c | |||
| @@ -53,7 +53,7 @@ static const struct ide_port_ops netcell_port_ops = { | |||
| 53 | .udma_mask = ATA_UDMA6, \ | 53 | .udma_mask = ATA_UDMA6, \ |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | static const struct ide_port_info generic_chipsets[] __devinitconst = { | 56 | static const struct ide_port_info generic_chipsets[] = { |
| 57 | /* 0: Unknown */ | 57 | /* 0: Unknown */ |
| 58 | DECLARE_GENERIC_PCI_DEV(0), | 58 | DECLARE_GENERIC_PCI_DEV(0), |
| 59 | 59 | ||
| @@ -103,7 +103,7 @@ static const struct ide_port_info generic_chipsets[] __devinitconst = { | |||
| 103 | * finds a device matching our IDE device tables. | 103 | * finds a device matching our IDE device tables. |
| 104 | */ | 104 | */ |
| 105 | 105 | ||
| 106 | static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 106 | static int generic_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 107 | { | 107 | { |
| 108 | const struct ide_port_info *d = &generic_chipsets[id->driver_data]; | 108 | const struct ide_port_info *d = &generic_chipsets[id->driver_data]; |
| 109 | int ret = -ENODEV; | 109 | int ret = -ENODEV; |
diff --git a/drivers/ide/ide_platform.c b/drivers/ide/ide_platform.c index 962693b10a1c..ba4bfbead24b 100644 --- a/drivers/ide/ide_platform.c +++ b/drivers/ide/ide_platform.c | |||
| @@ -22,11 +22,9 @@ | |||
| 22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
| 23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
| 24 | 24 | ||
| 25 | static void __devinit plat_ide_setup_ports(struct ide_hw *hw, | 25 | static void plat_ide_setup_ports(struct ide_hw *hw, void __iomem *base, |
| 26 | void __iomem *base, | 26 | void __iomem *ctrl, |
| 27 | void __iomem *ctrl, | 27 | struct pata_platform_info *pdata, int irq) |
| 28 | struct pata_platform_info *pdata, | ||
| 29 | int irq) | ||
| 30 | { | 28 | { |
| 31 | unsigned long port = (unsigned long)base; | 29 | unsigned long port = (unsigned long)base; |
| 32 | int i; | 30 | int i; |
| @@ -48,7 +46,7 @@ static const struct ide_port_info platform_ide_port_info = { | |||
| 48 | .chipset = ide_generic, | 46 | .chipset = ide_generic, |
| 49 | }; | 47 | }; |
| 50 | 48 | ||
| 51 | static int __devinit plat_ide_probe(struct platform_device *pdev) | 49 | static int plat_ide_probe(struct platform_device *pdev) |
| 52 | { | 50 | { |
| 53 | struct resource *res_base, *res_alt, *res_irq; | 51 | struct resource *res_base, *res_alt, *res_irq; |
| 54 | void __iomem *base, *alt_base; | 52 | void __iomem *base, *alt_base; |
| @@ -115,7 +113,7 @@ out: | |||
| 115 | return ret; | 113 | return ret; |
| 116 | } | 114 | } |
| 117 | 115 | ||
| 118 | static int __devexit plat_ide_remove(struct platform_device *pdev) | 116 | static int plat_ide_remove(struct platform_device *pdev) |
| 119 | { | 117 | { |
| 120 | struct ide_host *host = dev_get_drvdata(&pdev->dev); | 118 | struct ide_host *host = dev_get_drvdata(&pdev->dev); |
| 121 | 119 | ||
| @@ -130,7 +128,7 @@ static struct platform_driver platform_ide_driver = { | |||
| 130 | .owner = THIS_MODULE, | 128 | .owner = THIS_MODULE, |
| 131 | }, | 129 | }, |
| 132 | .probe = plat_ide_probe, | 130 | .probe = plat_ide_probe, |
| 133 | .remove = __devexit_p(plat_ide_remove), | 131 | .remove = plat_ide_remove, |
| 134 | }; | 132 | }; |
| 135 | 133 | ||
| 136 | static int __init platform_ide_init(void) | 134 | static int __init platform_ide_init(void) |
diff --git a/drivers/ide/it8172.c b/drivers/ide/it8172.c index d5dd180c4b85..b6f674ab4fb7 100644 --- a/drivers/ide/it8172.c +++ b/drivers/ide/it8172.c | |||
| @@ -115,7 +115,7 @@ static const struct ide_port_ops it8172_port_ops = { | |||
| 115 | .set_dma_mode = it8172_set_dma_mode, | 115 | .set_dma_mode = it8172_set_dma_mode, |
| 116 | }; | 116 | }; |
| 117 | 117 | ||
| 118 | static const struct ide_port_info it8172_port_info __devinitconst = { | 118 | static const struct ide_port_info it8172_port_info = { |
| 119 | .name = DRV_NAME, | 119 | .name = DRV_NAME, |
| 120 | .port_ops = &it8172_port_ops, | 120 | .port_ops = &it8172_port_ops, |
| 121 | .enablebits = { {0x41, 0x80, 0x80}, {0x00, 0x00, 0x00} }, | 121 | .enablebits = { {0x41, 0x80, 0x80}, {0x00, 0x00, 0x00} }, |
| @@ -125,8 +125,7 @@ static const struct ide_port_info it8172_port_info __devinitconst = { | |||
| 125 | .udma_mask = ATA_UDMA2, | 125 | .udma_mask = ATA_UDMA2, |
| 126 | }; | 126 | }; |
| 127 | 127 | ||
| 128 | static int __devinit it8172_init_one(struct pci_dev *dev, | 128 | static int it8172_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 129 | const struct pci_device_id *id) | ||
| 130 | { | 129 | { |
| 131 | if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) | 130 | if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) |
| 132 | return -ENODEV; /* IT8172 is more than an IDE controller */ | 131 | return -ENODEV; /* IT8172 is more than an IDE controller */ |
diff --git a/drivers/ide/it8213.c b/drivers/ide/it8213.c index 1847aeb5450a..6b92846682fc 100644 --- a/drivers/ide/it8213.c +++ b/drivers/ide/it8213.c | |||
| @@ -156,7 +156,7 @@ static const struct ide_port_ops it8213_port_ops = { | |||
| 156 | .cable_detect = it8213_cable_detect, | 156 | .cable_detect = it8213_cable_detect, |
| 157 | }; | 157 | }; |
| 158 | 158 | ||
| 159 | static const struct ide_port_info it8213_chipset __devinitconst = { | 159 | static const struct ide_port_info it8213_chipset = { |
| 160 | .name = DRV_NAME, | 160 | .name = DRV_NAME, |
| 161 | .enablebits = { {0x41, 0x80, 0x80} }, | 161 | .enablebits = { {0x41, 0x80, 0x80} }, |
| 162 | .port_ops = &it8213_port_ops, | 162 | .port_ops = &it8213_port_ops, |
| @@ -177,7 +177,7 @@ static const struct ide_port_info it8213_chipset __devinitconst = { | |||
| 177 | * standard helper functions to do almost all the work for us. | 177 | * standard helper functions to do almost all the work for us. |
| 178 | */ | 178 | */ |
| 179 | 179 | ||
| 180 | static int __devinit it8213_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 180 | static int it8213_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 181 | { | 181 | { |
| 182 | return ide_pci_init_one(dev, &it8213_chipset, NULL); | 182 | return ide_pci_init_one(dev, &it8213_chipset, NULL); |
| 183 | } | 183 | } |
diff --git a/drivers/ide/it821x.c b/drivers/ide/it821x.c index c5611dbca342..f01ba4606be0 100644 --- a/drivers/ide/it821x.c +++ b/drivers/ide/it821x.c | |||
| @@ -528,7 +528,7 @@ static struct ide_dma_ops it821x_pass_through_dma_ops = { | |||
| 528 | * ide DMA handlers appropriately | 528 | * ide DMA handlers appropriately |
| 529 | */ | 529 | */ |
| 530 | 530 | ||
| 531 | static void __devinit init_hwif_it821x(ide_hwif_t *hwif) | 531 | static void init_hwif_it821x(ide_hwif_t *hwif) |
| 532 | { | 532 | { |
| 533 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 533 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
| 534 | struct ide_host *host = pci_get_drvdata(dev); | 534 | struct ide_host *host = pci_get_drvdata(dev); |
| @@ -630,7 +630,7 @@ static const struct ide_port_ops it821x_port_ops = { | |||
| 630 | .cable_detect = it821x_cable_detect, | 630 | .cable_detect = it821x_cable_detect, |
| 631 | }; | 631 | }; |
| 632 | 632 | ||
| 633 | static const struct ide_port_info it821x_chipset __devinitconst = { | 633 | static const struct ide_port_info it821x_chipset = { |
| 634 | .name = DRV_NAME, | 634 | .name = DRV_NAME, |
| 635 | .init_chipset = init_chipset_it821x, | 635 | .init_chipset = init_chipset_it821x, |
| 636 | .init_hwif = init_hwif_it821x, | 636 | .init_hwif = init_hwif_it821x, |
| @@ -647,7 +647,7 @@ static const struct ide_port_info it821x_chipset __devinitconst = { | |||
| 647 | * We then use the IDE PCI generic helper to do most of the work. | 647 | * We then use the IDE PCI generic helper to do most of the work. |
| 648 | */ | 648 | */ |
| 649 | 649 | ||
| 650 | static int __devinit it821x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 650 | static int it821x_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 651 | { | 651 | { |
| 652 | struct it821x_dev *itdevs; | 652 | struct it821x_dev *itdevs; |
| 653 | int rc; | 653 | int rc; |
| @@ -667,7 +667,7 @@ static int __devinit it821x_init_one(struct pci_dev *dev, const struct pci_devic | |||
| 667 | return rc; | 667 | return rc; |
| 668 | } | 668 | } |
| 669 | 669 | ||
| 670 | static void __devexit it821x_remove(struct pci_dev *dev) | 670 | static void it821x_remove(struct pci_dev *dev) |
| 671 | { | 671 | { |
| 672 | struct ide_host *host = pci_get_drvdata(dev); | 672 | struct ide_host *host = pci_get_drvdata(dev); |
| 673 | struct it821x_dev *itdevs = host->host_priv; | 673 | struct it821x_dev *itdevs = host->host_priv; |
| @@ -689,7 +689,7 @@ static struct pci_driver it821x_pci_driver = { | |||
| 689 | .name = "ITE821x IDE", | 689 | .name = "ITE821x IDE", |
| 690 | .id_table = it821x_pci_tbl, | 690 | .id_table = it821x_pci_tbl, |
| 691 | .probe = it821x_init_one, | 691 | .probe = it821x_init_one, |
| 692 | .remove = __devexit_p(it821x_remove), | 692 | .remove = it821x_remove, |
| 693 | .suspend = ide_pci_suspend, | 693 | .suspend = ide_pci_suspend, |
| 694 | .resume = ide_pci_resume, | 694 | .resume = ide_pci_resume, |
| 695 | }; | 695 | }; |
diff --git a/drivers/ide/jmicron.c b/drivers/ide/jmicron.c index efddd7d9f92d..ae6480dcbadf 100644 --- a/drivers/ide/jmicron.c +++ b/drivers/ide/jmicron.c | |||
| @@ -102,7 +102,7 @@ static const struct ide_port_ops jmicron_port_ops = { | |||
| 102 | .cable_detect = jmicron_cable_detect, | 102 | .cable_detect = jmicron_cable_detect, |
| 103 | }; | 103 | }; |
| 104 | 104 | ||
| 105 | static const struct ide_port_info jmicron_chipset __devinitconst = { | 105 | static const struct ide_port_info jmicron_chipset = { |
| 106 | .name = DRV_NAME, | 106 | .name = DRV_NAME, |
| 107 | .enablebits = { { 0x40, 0x01, 0x01 }, { 0x40, 0x10, 0x10 } }, | 107 | .enablebits = { { 0x40, 0x01, 0x01 }, { 0x40, 0x10, 0x10 } }, |
| 108 | .port_ops = &jmicron_port_ops, | 108 | .port_ops = &jmicron_port_ops, |
| @@ -120,7 +120,7 @@ static const struct ide_port_info jmicron_chipset __devinitconst = { | |||
| 120 | * We then use the IDE PCI generic helper to do most of the work. | 120 | * We then use the IDE PCI generic helper to do most of the work. |
| 121 | */ | 121 | */ |
| 122 | 122 | ||
| 123 | static int __devinit jmicron_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 123 | static int jmicron_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 124 | { | 124 | { |
| 125 | return ide_pci_init_one(dev, &jmicron_chipset, NULL); | 125 | return ide_pci_init_one(dev, &jmicron_chipset, NULL); |
| 126 | } | 126 | } |
diff --git a/drivers/ide/ns87415.c b/drivers/ide/ns87415.c index 73f78d872d55..392fd106edf1 100644 --- a/drivers/ide/ns87415.c +++ b/drivers/ide/ns87415.c | |||
| @@ -96,7 +96,7 @@ static const struct ide_tp_ops superio_tp_ops = { | |||
| 96 | .output_data = ide_output_data, | 96 | .output_data = ide_output_data, |
| 97 | }; | 97 | }; |
| 98 | 98 | ||
| 99 | static void __devinit superio_init_iops(struct hwif_s *hwif) | 99 | static void superio_init_iops(struct hwif_s *hwif) |
| 100 | { | 100 | { |
| 101 | struct pci_dev *pdev = to_pci_dev(hwif->dev); | 101 | struct pci_dev *pdev = to_pci_dev(hwif->dev); |
| 102 | u32 dma_stat; | 102 | u32 dma_stat; |
| @@ -201,7 +201,7 @@ static int ns87415_dma_end(ide_drive_t *drive) | |||
| 201 | return (dma_stat & 7) != 4; | 201 | return (dma_stat & 7) != 4; |
| 202 | } | 202 | } |
| 203 | 203 | ||
| 204 | static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) | 204 | static void init_hwif_ns87415 (ide_hwif_t *hwif) |
| 205 | { | 205 | { |
| 206 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 206 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
| 207 | unsigned int ctrl, using_inta; | 207 | unsigned int ctrl, using_inta; |
| @@ -293,7 +293,7 @@ static const struct ide_dma_ops ns87415_dma_ops = { | |||
| 293 | .dma_sff_read_status = superio_dma_sff_read_status, | 293 | .dma_sff_read_status = superio_dma_sff_read_status, |
| 294 | }; | 294 | }; |
| 295 | 295 | ||
| 296 | static const struct ide_port_info ns87415_chipset __devinitconst = { | 296 | static const struct ide_port_info ns87415_chipset = { |
| 297 | .name = DRV_NAME, | 297 | .name = DRV_NAME, |
| 298 | .init_hwif = init_hwif_ns87415, | 298 | .init_hwif = init_hwif_ns87415, |
| 299 | .tp_ops = &ns87415_tp_ops, | 299 | .tp_ops = &ns87415_tp_ops, |
| @@ -302,7 +302,7 @@ static const struct ide_port_info ns87415_chipset __devinitconst = { | |||
| 302 | IDE_HFLAG_NO_ATAPI_DMA, | 302 | IDE_HFLAG_NO_ATAPI_DMA, |
| 303 | }; | 303 | }; |
| 304 | 304 | ||
| 305 | static int __devinit ns87415_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 305 | static int ns87415_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 306 | { | 306 | { |
| 307 | struct ide_port_info d = ns87415_chipset; | 307 | struct ide_port_info d = ns87415_chipset; |
| 308 | 308 | ||
diff --git a/drivers/ide/opti621.c b/drivers/ide/opti621.c index 39edc66cb96c..26a45007e535 100644 --- a/drivers/ide/opti621.c +++ b/drivers/ide/opti621.c | |||
| @@ -131,7 +131,7 @@ static const struct ide_port_ops opti621_port_ops = { | |||
| 131 | .set_pio_mode = opti621_set_pio_mode, | 131 | .set_pio_mode = opti621_set_pio_mode, |
| 132 | }; | 132 | }; |
| 133 | 133 | ||
| 134 | static const struct ide_port_info opti621_chipset __devinitconst = { | 134 | static const struct ide_port_info opti621_chipset = { |
| 135 | .name = DRV_NAME, | 135 | .name = DRV_NAME, |
| 136 | .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} }, | 136 | .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} }, |
| 137 | .port_ops = &opti621_port_ops, | 137 | .port_ops = &opti621_port_ops, |
| @@ -139,7 +139,7 @@ static const struct ide_port_info opti621_chipset __devinitconst = { | |||
| 139 | .pio_mask = ATA_PIO4, | 139 | .pio_mask = ATA_PIO4, |
| 140 | }; | 140 | }; |
| 141 | 141 | ||
| 142 | static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 142 | static int opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 143 | { | 143 | { |
| 144 | return ide_pci_init_one(dev, &opti621_chipset, NULL); | 144 | return ide_pci_init_one(dev, &opti621_chipset, NULL); |
| 145 | } | 145 | } |
diff --git a/drivers/ide/palm_bk3710.c b/drivers/ide/palm_bk3710.c index 712c7904d03e..6107cc4ee012 100644 --- a/drivers/ide/palm_bk3710.c +++ b/drivers/ide/palm_bk3710.c | |||
| @@ -220,7 +220,7 @@ static void palm_bk3710_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) | |||
| 220 | palm_bk3710_setpiomode(base, mate, is_slave, cycle_time, pio); | 220 | palm_bk3710_setpiomode(base, mate, is_slave, cycle_time, pio); |
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | static void __devinit palm_bk3710_chipinit(void __iomem *base) | 223 | static void palm_bk3710_chipinit(void __iomem *base) |
| 224 | { | 224 | { |
| 225 | /* | 225 | /* |
| 226 | * REVISIT: the ATA reset signal needs to be managed through a | 226 | * REVISIT: the ATA reset signal needs to be managed through a |
| @@ -282,8 +282,7 @@ static u8 palm_bk3710_cable_detect(ide_hwif_t *hwif) | |||
| 282 | return ATA_CBL_PATA80; | 282 | return ATA_CBL_PATA80; |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | static int __devinit palm_bk3710_init_dma(ide_hwif_t *hwif, | 285 | static int palm_bk3710_init_dma(ide_hwif_t *hwif, const struct ide_port_info *d) |
| 286 | const struct ide_port_info *d) | ||
| 287 | { | 286 | { |
| 288 | printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name); | 287 | printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name); |
| 289 | 288 | ||
| @@ -301,7 +300,7 @@ static const struct ide_port_ops palm_bk3710_ports_ops = { | |||
| 301 | .cable_detect = palm_bk3710_cable_detect, | 300 | .cable_detect = palm_bk3710_cable_detect, |
| 302 | }; | 301 | }; |
| 303 | 302 | ||
| 304 | static struct ide_port_info __devinitdata palm_bk3710_port_info = { | 303 | static struct ide_port_info palm_bk3710_port_info = { |
| 305 | .init_dma = palm_bk3710_init_dma, | 304 | .init_dma = palm_bk3710_init_dma, |
| 306 | .port_ops = &palm_bk3710_ports_ops, | 305 | .port_ops = &palm_bk3710_ports_ops, |
| 307 | .dma_ops = &sff_dma_ops, | 306 | .dma_ops = &sff_dma_ops, |
diff --git a/drivers/ide/pdc202xx_new.c b/drivers/ide/pdc202xx_new.c index 2e5ceb62fb3b..df73cbd9387e 100644 --- a/drivers/ide/pdc202xx_new.c +++ b/drivers/ide/pdc202xx_new.c | |||
| @@ -422,7 +422,7 @@ static int init_chipset_pdcnew(struct pci_dev *dev) | |||
| 422 | return 0; | 422 | return 0; |
| 423 | } | 423 | } |
| 424 | 424 | ||
| 425 | static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev) | 425 | static struct pci_dev *pdc20270_get_dev2(struct pci_dev *dev) |
| 426 | { | 426 | { |
| 427 | struct pci_dev *dev2; | 427 | struct pci_dev *dev2; |
| 428 | 428 | ||
| @@ -465,7 +465,7 @@ static const struct ide_port_ops pdcnew_port_ops = { | |||
| 465 | .udma_mask = udma, \ | 465 | .udma_mask = udma, \ |
| 466 | } | 466 | } |
| 467 | 467 | ||
| 468 | static const struct ide_port_info pdcnew_chipsets[] __devinitconst = { | 468 | static const struct ide_port_info pdcnew_chipsets[] = { |
| 469 | /* 0: PDC202{68,70} */ DECLARE_PDCNEW_DEV(ATA_UDMA5), | 469 | /* 0: PDC202{68,70} */ DECLARE_PDCNEW_DEV(ATA_UDMA5), |
| 470 | /* 1: PDC202{69,71,75,76,77} */ DECLARE_PDCNEW_DEV(ATA_UDMA6), | 470 | /* 1: PDC202{69,71,75,76,77} */ DECLARE_PDCNEW_DEV(ATA_UDMA6), |
| 471 | }; | 471 | }; |
| @@ -479,7 +479,7 @@ static const struct ide_port_info pdcnew_chipsets[] __devinitconst = { | |||
| 479 | * finds a device matching our IDE device tables. | 479 | * finds a device matching our IDE device tables. |
| 480 | */ | 480 | */ |
| 481 | 481 | ||
| 482 | static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 482 | static int pdc202new_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 483 | { | 483 | { |
| 484 | const struct ide_port_info *d = &pdcnew_chipsets[id->driver_data]; | 484 | const struct ide_port_info *d = &pdcnew_chipsets[id->driver_data]; |
| 485 | struct pci_dev *bridge = dev->bus->self; | 485 | struct pci_dev *bridge = dev->bus->self; |
| @@ -514,7 +514,7 @@ static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_de | |||
| 514 | return ide_pci_init_one(dev, d, NULL); | 514 | return ide_pci_init_one(dev, d, NULL); |
| 515 | } | 515 | } |
| 516 | 516 | ||
| 517 | static void __devexit pdc202new_remove(struct pci_dev *dev) | 517 | static void pdc202new_remove(struct pci_dev *dev) |
| 518 | { | 518 | { |
| 519 | struct ide_host *host = pci_get_drvdata(dev); | 519 | struct ide_host *host = pci_get_drvdata(dev); |
| 520 | struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL; | 520 | struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL; |
| @@ -539,7 +539,7 @@ static struct pci_driver pdc202new_pci_driver = { | |||
| 539 | .name = "Promise_IDE", | 539 | .name = "Promise_IDE", |
| 540 | .id_table = pdc202new_pci_tbl, | 540 | .id_table = pdc202new_pci_tbl, |
| 541 | .probe = pdc202new_init_one, | 541 | .probe = pdc202new_init_one, |
| 542 | .remove = __devexit_p(pdc202new_remove), | 542 | .remove = pdc202new_remove, |
| 543 | .suspend = ide_pci_suspend, | 543 | .suspend = ide_pci_suspend, |
| 544 | .resume = ide_pci_resume, | 544 | .resume = ide_pci_resume, |
| 545 | }; | 545 | }; |
diff --git a/drivers/ide/pdc202xx_old.c b/drivers/ide/pdc202xx_old.c index 563451096812..224ad46d6cb2 100644 --- a/drivers/ide/pdc202xx_old.c +++ b/drivers/ide/pdc202xx_old.c | |||
| @@ -211,8 +211,7 @@ out: | |||
| 211 | return 0; | 211 | return 0; |
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev, | 214 | static void pdc202ata4_fixup_irq(struct pci_dev *dev, const char *name) |
| 215 | const char *name) | ||
| 216 | { | 215 | { |
| 217 | if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) { | 216 | if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) { |
| 218 | u8 irq = 0, irq2 = 0; | 217 | u8 irq = 0, irq2 = 0; |
| @@ -270,7 +269,7 @@ static const struct ide_dma_ops pdc2026x_dma_ops = { | |||
| 270 | .max_sectors = sectors, \ | 269 | .max_sectors = sectors, \ |
| 271 | } | 270 | } |
| 272 | 271 | ||
| 273 | static const struct ide_port_info pdc202xx_chipsets[] __devinitconst = { | 272 | static const struct ide_port_info pdc202xx_chipsets[] = { |
| 274 | { /* 0: PDC20246 */ | 273 | { /* 0: PDC20246 */ |
| 275 | .name = DRV_NAME, | 274 | .name = DRV_NAME, |
| 276 | .init_chipset = init_chipset_pdc202xx, | 275 | .init_chipset = init_chipset_pdc202xx, |
| @@ -297,7 +296,8 @@ static const struct ide_port_info pdc202xx_chipsets[] __devinitconst = { | |||
| 297 | * finds a device matching our IDE device tables. | 296 | * finds a device matching our IDE device tables. |
| 298 | */ | 297 | */ |
| 299 | 298 | ||
| 300 | static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 299 | static int pdc202xx_init_one(struct pci_dev *dev, |
| 300 | const struct pci_device_id *id) | ||
| 301 | { | 301 | { |
| 302 | const struct ide_port_info *d; | 302 | const struct ide_port_info *d; |
| 303 | u8 idx = id->driver_data; | 303 | u8 idx = id->driver_data; |
diff --git a/drivers/ide/piix.c b/drivers/ide/piix.c index fe0fd60cfc09..a671cead6ae7 100644 --- a/drivers/ide/piix.c +++ b/drivers/ide/piix.c | |||
| @@ -297,7 +297,7 @@ static u8 piix_cable_detect(ide_hwif_t *hwif) | |||
| 297 | * capabilities of the hardware. | 297 | * capabilities of the hardware. |
| 298 | */ | 298 | */ |
| 299 | 299 | ||
| 300 | static void __devinit init_hwif_piix(ide_hwif_t *hwif) | 300 | static void init_hwif_piix(ide_hwif_t *hwif) |
| 301 | { | 301 | { |
| 302 | if (!hwif->dma_base) | 302 | if (!hwif->dma_base) |
| 303 | return; | 303 | return; |
| @@ -344,7 +344,7 @@ static const struct ide_port_ops ich_port_ops = { | |||
| 344 | .udma_mask = udma, \ | 344 | .udma_mask = udma, \ |
| 345 | } | 345 | } |
| 346 | 346 | ||
| 347 | static const struct ide_port_info piix_pci_info[] __devinitconst = { | 347 | static const struct ide_port_info piix_pci_info[] = { |
| 348 | /* 0: MPIIX */ | 348 | /* 0: MPIIX */ |
| 349 | { /* | 349 | { /* |
| 350 | * MPIIX actually has only a single IDE channel mapped to | 350 | * MPIIX actually has only a single IDE channel mapped to |
| @@ -382,7 +382,7 @@ static const struct ide_port_info piix_pci_info[] __devinitconst = { | |||
| 382 | * finds a device matching our IDE device tables. | 382 | * finds a device matching our IDE device tables. |
| 383 | */ | 383 | */ |
| 384 | 384 | ||
| 385 | static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 385 | static int piix_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 386 | { | 386 | { |
| 387 | return ide_pci_init_one(dev, &piix_pci_info[id->driver_data], NULL); | 387 | return ide_pci_init_one(dev, &piix_pci_info[id->driver_data], NULL); |
| 388 | } | 388 | } |
| @@ -394,7 +394,7 @@ static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_ | |||
| 394 | * they are found, disable use of DMA IDE | 394 | * they are found, disable use of DMA IDE |
| 395 | */ | 395 | */ |
| 396 | 396 | ||
| 397 | static void __devinit piix_check_450nx(void) | 397 | static void piix_check_450nx(void) |
| 398 | { | 398 | { |
| 399 | struct pci_dev *pdev = NULL; | 399 | struct pci_dev *pdev = NULL; |
| 400 | u16 cfg; | 400 | u16 cfg; |
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c index e944c7f705f7..bf83d7bb6bc6 100644 --- a/drivers/ide/pmac.c +++ b/drivers/ide/pmac.c | |||
| @@ -1025,8 +1025,7 @@ static const struct ide_port_info pmac_port_info = { | |||
| 1025 | * Setup, register & probe an IDE channel driven by this driver, this is | 1025 | * Setup, register & probe an IDE channel driven by this driver, this is |
| 1026 | * called by one of the 2 probe functions (macio or PCI). | 1026 | * called by one of the 2 probe functions (macio or PCI). |
| 1027 | */ | 1027 | */ |
| 1028 | static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif, | 1028 | static int pmac_ide_setup_device(pmac_ide_hwif_t *pmif, struct ide_hw *hw) |
| 1029 | struct ide_hw *hw) | ||
| 1030 | { | 1029 | { |
| 1031 | struct device_node *np = pmif->node; | 1030 | struct device_node *np = pmif->node; |
| 1032 | const int *bidp; | 1031 | const int *bidp; |
| @@ -1126,7 +1125,7 @@ static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif, | |||
| 1126 | return rc; | 1125 | return rc; |
| 1127 | } | 1126 | } |
| 1128 | 1127 | ||
| 1129 | static void __devinit pmac_ide_init_ports(struct ide_hw *hw, unsigned long base) | 1128 | static void pmac_ide_init_ports(struct ide_hw *hw, unsigned long base) |
| 1130 | { | 1129 | { |
| 1131 | int i; | 1130 | int i; |
| 1132 | 1131 | ||
| @@ -1139,8 +1138,8 @@ static void __devinit pmac_ide_init_ports(struct ide_hw *hw, unsigned long base) | |||
| 1139 | /* | 1138 | /* |
| 1140 | * Attach to a macio probed interface | 1139 | * Attach to a macio probed interface |
| 1141 | */ | 1140 | */ |
| 1142 | static int __devinit | 1141 | static int pmac_ide_macio_attach(struct macio_dev *mdev, |
| 1143 | pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | 1142 | const struct of_device_id *match) |
| 1144 | { | 1143 | { |
| 1145 | void __iomem *base; | 1144 | void __iomem *base; |
| 1146 | unsigned long regbase; | 1145 | unsigned long regbase; |
| @@ -1262,8 +1261,8 @@ pmac_ide_macio_resume(struct macio_dev *mdev) | |||
| 1262 | /* | 1261 | /* |
| 1263 | * Attach to a PCI probed interface | 1262 | * Attach to a PCI probed interface |
| 1264 | */ | 1263 | */ |
| 1265 | static int __devinit | 1264 | static int pmac_ide_pci_attach(struct pci_dev *pdev, |
| 1266 | pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id) | 1265 | const struct pci_device_id *id) |
| 1267 | { | 1266 | { |
| 1268 | struct device_node *np; | 1267 | struct device_node *np; |
| 1269 | pmac_ide_hwif_t *pmif; | 1268 | pmac_ide_hwif_t *pmif; |
| @@ -1692,8 +1691,7 @@ static const struct ide_dma_ops pmac_dma_ops = { | |||
| 1692 | * Allocate the data structures needed for using DMA with an interface | 1691 | * Allocate the data structures needed for using DMA with an interface |
| 1693 | * and fill the proper list of functions pointers | 1692 | * and fill the proper list of functions pointers |
| 1694 | */ | 1693 | */ |
| 1695 | static int __devinit pmac_ide_init_dma(ide_hwif_t *hwif, | 1694 | static int pmac_ide_init_dma(ide_hwif_t *hwif, const struct ide_port_info *d) |
| 1696 | const struct ide_port_info *d) | ||
| 1697 | { | 1695 | { |
| 1698 | pmac_ide_hwif_t *pmif = | 1696 | pmac_ide_hwif_t *pmif = |
| 1699 | (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent); | 1697 | (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent); |
diff --git a/drivers/ide/rapide.c b/drivers/ide/rapide.c index 48d976aad7ab..d73c3d10087c 100644 --- a/drivers/ide/rapide.c +++ b/drivers/ide/rapide.c | |||
| @@ -29,8 +29,7 @@ static void rapide_setup_ports(struct ide_hw *hw, void __iomem *base, | |||
| 29 | hw->irq = irq; | 29 | hw->irq = irq; |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | static int __devinit | 32 | static int rapide_probe(struct expansion_card *ec, const struct ecard_id *id) |
| 33 | rapide_probe(struct expansion_card *ec, const struct ecard_id *id) | ||
| 34 | { | 33 | { |
| 35 | void __iomem *base; | 34 | void __iomem *base; |
| 36 | struct ide_host *host; | 35 | struct ide_host *host; |
| @@ -64,7 +63,7 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
| 64 | return ret; | 63 | return ret; |
| 65 | } | 64 | } |
| 66 | 65 | ||
| 67 | static void __devexit rapide_remove(struct expansion_card *ec) | 66 | static void rapide_remove(struct expansion_card *ec) |
| 68 | { | 67 | { |
| 69 | struct ide_host *host = ecard_get_drvdata(ec); | 68 | struct ide_host *host = ecard_get_drvdata(ec); |
| 70 | 69 | ||
| @@ -82,7 +81,7 @@ static struct ecard_id rapide_ids[] = { | |||
| 82 | 81 | ||
| 83 | static struct ecard_driver rapide_driver = { | 82 | static struct ecard_driver rapide_driver = { |
| 84 | .probe = rapide_probe, | 83 | .probe = rapide_probe, |
| 85 | .remove = __devexit_p(rapide_remove), | 84 | .remove = rapide_remove, |
| 86 | .id_table = rapide_ids, | 85 | .id_table = rapide_ids, |
| 87 | .drv = { | 86 | .drv = { |
| 88 | .name = "rapide", | 87 | .name = "rapide", |
diff --git a/drivers/ide/rz1000.c b/drivers/ide/rz1000.c index c04173e9fc38..f4b66f7ec9fd 100644 --- a/drivers/ide/rz1000.c +++ b/drivers/ide/rz1000.c | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | 22 | ||
| 23 | #define DRV_NAME "rz1000" | 23 | #define DRV_NAME "rz1000" |
| 24 | 24 | ||
| 25 | static int __devinit rz1000_disable_readahead(struct pci_dev *dev) | 25 | static int rz1000_disable_readahead(struct pci_dev *dev) |
| 26 | { | 26 | { |
| 27 | u16 reg; | 27 | u16 reg; |
| 28 | 28 | ||
| @@ -38,12 +38,12 @@ static int __devinit rz1000_disable_readahead(struct pci_dev *dev) | |||
| 38 | } | 38 | } |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | static const struct ide_port_info rz1000_chipset __devinitconst = { | 41 | static const struct ide_port_info rz1000_chipset = { |
| 42 | .name = DRV_NAME, | 42 | .name = DRV_NAME, |
| 43 | .host_flags = IDE_HFLAG_NO_DMA, | 43 | .host_flags = IDE_HFLAG_NO_DMA, |
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 46 | static int rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 47 | { | 47 | { |
| 48 | struct ide_port_info d = rz1000_chipset; | 48 | struct ide_port_info d = rz1000_chipset; |
| 49 | int rc; | 49 | int rc; |
diff --git a/drivers/ide/sc1200.c b/drivers/ide/sc1200.c index d4758ebe77da..a5b701818405 100644 --- a/drivers/ide/sc1200.c +++ b/drivers/ide/sc1200.c | |||
| @@ -291,7 +291,7 @@ static const struct ide_dma_ops sc1200_dma_ops = { | |||
| 291 | .dma_sff_read_status = ide_dma_sff_read_status, | 291 | .dma_sff_read_status = ide_dma_sff_read_status, |
| 292 | }; | 292 | }; |
| 293 | 293 | ||
| 294 | static const struct ide_port_info sc1200_chipset __devinitconst = { | 294 | static const struct ide_port_info sc1200_chipset = { |
| 295 | .name = DRV_NAME, | 295 | .name = DRV_NAME, |
| 296 | .port_ops = &sc1200_port_ops, | 296 | .port_ops = &sc1200_port_ops, |
| 297 | .dma_ops = &sc1200_dma_ops, | 297 | .dma_ops = &sc1200_dma_ops, |
| @@ -303,7 +303,7 @@ static const struct ide_port_info sc1200_chipset __devinitconst = { | |||
| 303 | .udma_mask = ATA_UDMA2, | 303 | .udma_mask = ATA_UDMA2, |
| 304 | }; | 304 | }; |
| 305 | 305 | ||
| 306 | static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 306 | static int sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 307 | { | 307 | { |
| 308 | struct sc1200_saved_state *ss = NULL; | 308 | struct sc1200_saved_state *ss = NULL; |
| 309 | int rc; | 309 | int rc; |
diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c index 970103810021..2a2d188b5d5b 100644 --- a/drivers/ide/scc_pata.c +++ b/drivers/ide/scc_pata.c | |||
| @@ -585,8 +585,7 @@ static int scc_ide_setup_pci_device(struct pci_dev *dev, | |||
| 585 | * Perform the initial set up for this device. | 585 | * Perform the initial set up for this device. |
| 586 | */ | 586 | */ |
| 587 | 587 | ||
| 588 | static int __devinit init_setup_scc(struct pci_dev *dev, | 588 | static int init_setup_scc(struct pci_dev *dev, const struct ide_port_info *d) |
| 589 | const struct ide_port_info *d) | ||
| 590 | { | 589 | { |
| 591 | unsigned long ctl_base; | 590 | unsigned long ctl_base; |
| 592 | unsigned long dma_base; | 591 | unsigned long dma_base; |
| @@ -718,7 +717,7 @@ static void scc_output_data(ide_drive_t *drive, struct ide_cmd *cmd, | |||
| 718 | * | 717 | * |
| 719 | */ | 718 | */ |
| 720 | 719 | ||
| 721 | static void __devinit init_mmio_iops_scc(ide_hwif_t *hwif) | 720 | static void init_mmio_iops_scc(ide_hwif_t *hwif) |
| 722 | { | 721 | { |
| 723 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 722 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
| 724 | struct scc_ports *ports = pci_get_drvdata(dev); | 723 | struct scc_ports *ports = pci_get_drvdata(dev); |
| @@ -738,7 +737,7 @@ static void __devinit init_mmio_iops_scc(ide_hwif_t *hwif) | |||
| 738 | * and then do the MMIO setup. | 737 | * and then do the MMIO setup. |
| 739 | */ | 738 | */ |
| 740 | 739 | ||
| 741 | static void __devinit init_iops_scc(ide_hwif_t *hwif) | 740 | static void init_iops_scc(ide_hwif_t *hwif) |
| 742 | { | 741 | { |
| 743 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 742 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
| 744 | 743 | ||
| @@ -748,8 +747,7 @@ static void __devinit init_iops_scc(ide_hwif_t *hwif) | |||
| 748 | init_mmio_iops_scc(hwif); | 747 | init_mmio_iops_scc(hwif); |
| 749 | } | 748 | } |
| 750 | 749 | ||
| 751 | static int __devinit scc_init_dma(ide_hwif_t *hwif, | 750 | static int scc_init_dma(ide_hwif_t *hwif, const struct ide_port_info *d) |
| 752 | const struct ide_port_info *d) | ||
| 753 | { | 751 | { |
| 754 | return ide_allocate_dma_engine(hwif); | 752 | return ide_allocate_dma_engine(hwif); |
| 755 | } | 753 | } |
| @@ -768,7 +766,7 @@ static u8 scc_cable_detect(ide_hwif_t *hwif) | |||
| 768 | * ide DMA handlers appropriately. | 766 | * ide DMA handlers appropriately. |
| 769 | */ | 767 | */ |
| 770 | 768 | ||
| 771 | static void __devinit init_hwif_scc(ide_hwif_t *hwif) | 769 | static void init_hwif_scc(ide_hwif_t *hwif) |
| 772 | { | 770 | { |
| 773 | /* PTERADD */ | 771 | /* PTERADD */ |
| 774 | out_be32((void __iomem *)(hwif->dma_base + 0x018), hwif->dmatable_dma); | 772 | out_be32((void __iomem *)(hwif->dma_base + 0x018), hwif->dmatable_dma); |
| @@ -811,7 +809,7 @@ static const struct ide_dma_ops scc_dma_ops = { | |||
| 811 | .dma_sff_read_status = scc_dma_sff_read_status, | 809 | .dma_sff_read_status = scc_dma_sff_read_status, |
| 812 | }; | 810 | }; |
| 813 | 811 | ||
| 814 | static const struct ide_port_info scc_chipset __devinitconst = { | 812 | static const struct ide_port_info scc_chipset = { |
| 815 | .name = "sccIDE", | 813 | .name = "sccIDE", |
| 816 | .init_iops = init_iops_scc, | 814 | .init_iops = init_iops_scc, |
| 817 | .init_dma = scc_init_dma, | 815 | .init_dma = scc_init_dma, |
| @@ -834,7 +832,7 @@ static const struct ide_port_info scc_chipset __devinitconst = { | |||
| 834 | * We then use the IDE PCI generic helper to do most of the work. | 832 | * We then use the IDE PCI generic helper to do most of the work. |
| 835 | */ | 833 | */ |
| 836 | 834 | ||
| 837 | static int __devinit scc_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 835 | static int scc_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 838 | { | 836 | { |
| 839 | return init_setup_scc(dev, &scc_chipset); | 837 | return init_setup_scc(dev, &scc_chipset); |
| 840 | } | 838 | } |
| @@ -846,7 +844,7 @@ static int __devinit scc_init_one(struct pci_dev *dev, const struct pci_device_i | |||
| 846 | * Called by the PCI code when it removes an SCC PATA controller. | 844 | * Called by the PCI code when it removes an SCC PATA controller. |
| 847 | */ | 845 | */ |
| 848 | 846 | ||
| 849 | static void __devexit scc_remove(struct pci_dev *dev) | 847 | static void scc_remove(struct pci_dev *dev) |
| 850 | { | 848 | { |
| 851 | struct scc_ports *ports = pci_get_drvdata(dev); | 849 | struct scc_ports *ports = pci_get_drvdata(dev); |
| 852 | struct ide_host *host = ports->host; | 850 | struct ide_host *host = ports->host; |
| @@ -869,7 +867,7 @@ static struct pci_driver scc_pci_driver = { | |||
| 869 | .name = "SCC IDE", | 867 | .name = "SCC IDE", |
| 870 | .id_table = scc_pci_tbl, | 868 | .id_table = scc_pci_tbl, |
| 871 | .probe = scc_init_one, | 869 | .probe = scc_init_one, |
| 872 | .remove = __devexit_p(scc_remove), | 870 | .remove = scc_remove, |
| 873 | }; | 871 | }; |
| 874 | 872 | ||
| 875 | static int __init scc_ide_init(void) | 873 | static int __init scc_ide_init(void) |
diff --git a/drivers/ide/serverworks.c b/drivers/ide/serverworks.c index 24d72ef23df7..a97affca18ab 100644 --- a/drivers/ide/serverworks.c +++ b/drivers/ide/serverworks.c | |||
| @@ -337,7 +337,7 @@ static const struct ide_port_ops svwks_port_ops = { | |||
| 337 | .cable_detect = svwks_cable_detect, | 337 | .cable_detect = svwks_cable_detect, |
| 338 | }; | 338 | }; |
| 339 | 339 | ||
| 340 | static const struct ide_port_info serverworks_chipsets[] __devinitconst = { | 340 | static const struct ide_port_info serverworks_chipsets[] = { |
| 341 | { /* 0: OSB4 */ | 341 | { /* 0: OSB4 */ |
| 342 | .name = DRV_NAME, | 342 | .name = DRV_NAME, |
| 343 | .init_chipset = init_chipset_svwks, | 343 | .init_chipset = init_chipset_svwks, |
| @@ -391,7 +391,7 @@ static const struct ide_port_info serverworks_chipsets[] __devinitconst = { | |||
| 391 | * finds a device matching our IDE device tables. | 391 | * finds a device matching our IDE device tables. |
| 392 | */ | 392 | */ |
| 393 | 393 | ||
| 394 | static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 394 | static int svwks_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 395 | { | 395 | { |
| 396 | struct ide_port_info d; | 396 | struct ide_port_info d; |
| 397 | u8 idx = id->driver_data; | 397 | u8 idx = id->driver_data; |
diff --git a/drivers/ide/sgiioc4.c b/drivers/ide/sgiioc4.c index e3ea591f66d3..a5ca179a83b3 100644 --- a/drivers/ide/sgiioc4.c +++ b/drivers/ide/sgiioc4.c | |||
| @@ -307,8 +307,7 @@ static u8 sgiioc4_read_status(ide_hwif_t *hwif) | |||
| 307 | } | 307 | } |
| 308 | 308 | ||
| 309 | /* Creates a DMA map for the scatter-gather list entries */ | 309 | /* Creates a DMA map for the scatter-gather list entries */ |
| 310 | static int __devinit ide_dma_sgiioc4(ide_hwif_t *hwif, | 310 | static int ide_dma_sgiioc4(ide_hwif_t *hwif, const struct ide_port_info *d) |
| 311 | const struct ide_port_info *d) | ||
| 312 | { | 311 | { |
| 313 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 312 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
| 314 | unsigned long dma_base = pci_resource_start(dev, 0) + IOC4_DMA_OFFSET; | 313 | unsigned long dma_base = pci_resource_start(dev, 0) + IOC4_DMA_OFFSET; |
| @@ -520,7 +519,7 @@ static const struct ide_dma_ops sgiioc4_dma_ops = { | |||
| 520 | .dma_lost_irq = sgiioc4_dma_lost_irq, | 519 | .dma_lost_irq = sgiioc4_dma_lost_irq, |
| 521 | }; | 520 | }; |
| 522 | 521 | ||
| 523 | static const struct ide_port_info sgiioc4_port_info __devinitconst = { | 522 | static const struct ide_port_info sgiioc4_port_info = { |
| 524 | .name = DRV_NAME, | 523 | .name = DRV_NAME, |
| 525 | .chipset = ide_pci, | 524 | .chipset = ide_pci, |
| 526 | .init_dma = ide_dma_sgiioc4, | 525 | .init_dma = ide_dma_sgiioc4, |
| @@ -532,7 +531,7 @@ static const struct ide_port_info sgiioc4_port_info __devinitconst = { | |||
| 532 | .mwdma_mask = ATA_MWDMA2_ONLY, | 531 | .mwdma_mask = ATA_MWDMA2_ONLY, |
| 533 | }; | 532 | }; |
| 534 | 533 | ||
| 535 | static int __devinit sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | 534 | static int sgiioc4_ide_setup_pci_device(struct pci_dev *dev) |
| 536 | { | 535 | { |
| 537 | unsigned long cmd_base, irqport; | 536 | unsigned long cmd_base, irqport; |
| 538 | unsigned long bar0, cmd_phys_base, ctl; | 537 | unsigned long bar0, cmd_phys_base, ctl; |
| @@ -581,7 +580,7 @@ req_mem_rgn_err: | |||
| 581 | return rc; | 580 | return rc; |
| 582 | } | 581 | } |
| 583 | 582 | ||
| 584 | static unsigned int __devinit pci_init_sgiioc4(struct pci_dev *dev) | 583 | static unsigned int pci_init_sgiioc4(struct pci_dev *dev) |
| 585 | { | 584 | { |
| 586 | int ret; | 585 | int ret; |
| 587 | 586 | ||
| @@ -601,7 +600,7 @@ out: | |||
| 601 | return ret; | 600 | return ret; |
| 602 | } | 601 | } |
| 603 | 602 | ||
| 604 | int __devinit ioc4_ide_attach_one(struct ioc4_driver_data *idd) | 603 | int ioc4_ide_attach_one(struct ioc4_driver_data *idd) |
| 605 | { | 604 | { |
| 606 | /* | 605 | /* |
| 607 | * PCI-RT does not bring out IDE connection. | 606 | * PCI-RT does not bring out IDE connection. |
| @@ -613,7 +612,7 @@ int __devinit ioc4_ide_attach_one(struct ioc4_driver_data *idd) | |||
| 613 | return pci_init_sgiioc4(idd->idd_pdev); | 612 | return pci_init_sgiioc4(idd->idd_pdev); |
| 614 | } | 613 | } |
| 615 | 614 | ||
| 616 | static struct ioc4_submodule __devinitdata ioc4_ide_submodule = { | 615 | static struct ioc4_submodule ioc4_ide_submodule = { |
| 617 | .is_name = "IOC4_ide", | 616 | .is_name = "IOC4_ide", |
| 618 | .is_owner = THIS_MODULE, | 617 | .is_owner = THIS_MODULE, |
| 619 | .is_probe = ioc4_ide_attach_one, | 618 | .is_probe = ioc4_ide_attach_one, |
diff --git a/drivers/ide/siimage.c b/drivers/ide/siimage.c index 46f7e30d3790..6a1849bb476c 100644 --- a/drivers/ide/siimage.c +++ b/drivers/ide/siimage.c | |||
| @@ -546,7 +546,7 @@ static int init_chipset_siimage(struct pci_dev *dev) | |||
| 546 | * extended PRD tables. For better SI3112 support use the libata driver | 546 | * extended PRD tables. For better SI3112 support use the libata driver |
| 547 | */ | 547 | */ |
| 548 | 548 | ||
| 549 | static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) | 549 | static void init_mmio_iops_siimage(ide_hwif_t *hwif) |
| 550 | { | 550 | { |
| 551 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 551 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
| 552 | struct ide_host *host = pci_get_drvdata(dev); | 552 | struct ide_host *host = pci_get_drvdata(dev); |
| @@ -646,7 +646,7 @@ static void sil_quirkproc(ide_drive_t *drive) | |||
| 646 | * can get the iops right before using them. | 646 | * can get the iops right before using them. |
| 647 | */ | 647 | */ |
| 648 | 648 | ||
| 649 | static void __devinit init_iops_siimage(ide_hwif_t *hwif) | 649 | static void init_iops_siimage(ide_hwif_t *hwif) |
| 650 | { | 650 | { |
| 651 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 651 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
| 652 | struct ide_host *host = pci_get_drvdata(dev); | 652 | struct ide_host *host = pci_get_drvdata(dev); |
| @@ -719,7 +719,7 @@ static const struct ide_dma_ops sil_dma_ops = { | |||
| 719 | .udma_mask = ATA_UDMA6, \ | 719 | .udma_mask = ATA_UDMA6, \ |
| 720 | } | 720 | } |
| 721 | 721 | ||
| 722 | static const struct ide_port_info siimage_chipsets[] __devinitconst = { | 722 | static const struct ide_port_info siimage_chipsets[] = { |
| 723 | /* 0: SiI680 */ DECLARE_SII_DEV(&sil_pata_port_ops), | 723 | /* 0: SiI680 */ DECLARE_SII_DEV(&sil_pata_port_ops), |
| 724 | /* 1: SiI3112 */ DECLARE_SII_DEV(&sil_sata_port_ops) | 724 | /* 1: SiI3112 */ DECLARE_SII_DEV(&sil_sata_port_ops) |
| 725 | }; | 725 | }; |
| @@ -733,8 +733,7 @@ static const struct ide_port_info siimage_chipsets[] __devinitconst = { | |||
| 733 | * We then use the IDE PCI generic helper to do most of the work. | 733 | * We then use the IDE PCI generic helper to do most of the work. |
| 734 | */ | 734 | */ |
| 735 | 735 | ||
| 736 | static int __devinit siimage_init_one(struct pci_dev *dev, | 736 | static int siimage_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 737 | const struct pci_device_id *id) | ||
| 738 | { | 737 | { |
| 739 | void __iomem *ioaddr = NULL; | 738 | void __iomem *ioaddr = NULL; |
| 740 | resource_size_t bar5 = pci_resource_start(dev, 5); | 739 | resource_size_t bar5 = pci_resource_start(dev, 5); |
| @@ -790,7 +789,7 @@ static int __devinit siimage_init_one(struct pci_dev *dev, | |||
| 790 | return rc; | 789 | return rc; |
| 791 | } | 790 | } |
| 792 | 791 | ||
| 793 | static void __devexit siimage_remove(struct pci_dev *dev) | 792 | static void siimage_remove(struct pci_dev *dev) |
| 794 | { | 793 | { |
| 795 | struct ide_host *host = pci_get_drvdata(dev); | 794 | struct ide_host *host = pci_get_drvdata(dev); |
| 796 | void __iomem *ioaddr = host->host_priv; | 795 | void __iomem *ioaddr = host->host_priv; |
| @@ -822,7 +821,7 @@ static struct pci_driver siimage_pci_driver = { | |||
| 822 | .name = "SiI_IDE", | 821 | .name = "SiI_IDE", |
| 823 | .id_table = siimage_pci_tbl, | 822 | .id_table = siimage_pci_tbl, |
| 824 | .probe = siimage_init_one, | 823 | .probe = siimage_init_one, |
| 825 | .remove = __devexit_p(siimage_remove), | 824 | .remove = siimage_remove, |
| 826 | .suspend = ide_pci_suspend, | 825 | .suspend = ide_pci_suspend, |
| 827 | .resume = ide_pci_resume, | 826 | .resume = ide_pci_resume, |
| 828 | }; | 827 | }; |
diff --git a/drivers/ide/sis5513.c b/drivers/ide/sis5513.c index 09e61b4c5e94..247853ea1368 100644 --- a/drivers/ide/sis5513.c +++ b/drivers/ide/sis5513.c | |||
| @@ -362,7 +362,7 @@ static u8 sis_ata133_udma_filter(ide_drive_t *drive) | |||
| 362 | return (regdw & 0x08) ? ATA_UDMA6 : ATA_UDMA5; | 362 | return (regdw & 0x08) ? ATA_UDMA6 : ATA_UDMA5; |
| 363 | } | 363 | } |
| 364 | 364 | ||
| 365 | static int __devinit sis_find_family(struct pci_dev *dev) | 365 | static int sis_find_family(struct pci_dev *dev) |
| 366 | { | 366 | { |
| 367 | struct pci_dev *host; | 367 | struct pci_dev *host; |
| 368 | int i = 0; | 368 | int i = 0; |
| @@ -563,7 +563,7 @@ static const struct ide_port_ops sis_ata133_port_ops = { | |||
| 563 | .cable_detect = sis_cable_detect, | 563 | .cable_detect = sis_cable_detect, |
| 564 | }; | 564 | }; |
| 565 | 565 | ||
| 566 | static const struct ide_port_info sis5513_chipset __devinitconst = { | 566 | static const struct ide_port_info sis5513_chipset = { |
| 567 | .name = DRV_NAME, | 567 | .name = DRV_NAME, |
| 568 | .init_chipset = init_chipset_sis5513, | 568 | .init_chipset = init_chipset_sis5513, |
| 569 | .enablebits = { {0x4a, 0x02, 0x02}, {0x4a, 0x04, 0x04} }, | 569 | .enablebits = { {0x4a, 0x02, 0x02}, {0x4a, 0x04, 0x04} }, |
| @@ -572,7 +572,7 @@ static const struct ide_port_info sis5513_chipset __devinitconst = { | |||
| 572 | .mwdma_mask = ATA_MWDMA2, | 572 | .mwdma_mask = ATA_MWDMA2, |
| 573 | }; | 573 | }; |
| 574 | 574 | ||
| 575 | static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 575 | static int sis5513_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 576 | { | 576 | { |
| 577 | struct ide_port_info d = sis5513_chipset; | 577 | struct ide_port_info d = sis5513_chipset; |
| 578 | u8 udma_rates[] = { 0x00, 0x00, 0x07, 0x1f, 0x3f, 0x3f, 0x7f, 0x7f }; | 578 | u8 udma_rates[] = { 0x00, 0x00, 0x07, 0x1f, 0x3f, 0x3f, 0x7f, 0x7f }; |
| @@ -595,7 +595,7 @@ static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_devi | |||
| 595 | return ide_pci_init_one(dev, &d, NULL); | 595 | return ide_pci_init_one(dev, &d, NULL); |
| 596 | } | 596 | } |
| 597 | 597 | ||
| 598 | static void __devexit sis5513_remove(struct pci_dev *dev) | 598 | static void sis5513_remove(struct pci_dev *dev) |
| 599 | { | 599 | { |
| 600 | ide_pci_remove(dev); | 600 | ide_pci_remove(dev); |
| 601 | pci_disable_device(dev); | 601 | pci_disable_device(dev); |
| @@ -613,7 +613,7 @@ static struct pci_driver sis5513_pci_driver = { | |||
| 613 | .name = "SIS_IDE", | 613 | .name = "SIS_IDE", |
| 614 | .id_table = sis5513_pci_tbl, | 614 | .id_table = sis5513_pci_tbl, |
| 615 | .probe = sis5513_init_one, | 615 | .probe = sis5513_init_one, |
| 616 | .remove = __devexit_p(sis5513_remove), | 616 | .remove = sis5513_remove, |
| 617 | .suspend = ide_pci_suspend, | 617 | .suspend = ide_pci_suspend, |
| 618 | .resume = ide_pci_resume, | 618 | .resume = ide_pci_resume, |
| 619 | }; | 619 | }; |
diff --git a/drivers/ide/sl82c105.c b/drivers/ide/sl82c105.c index d051cd224bdb..8755df3330a0 100644 --- a/drivers/ide/sl82c105.c +++ b/drivers/ide/sl82c105.c | |||
| @@ -299,7 +299,7 @@ static const struct ide_dma_ops sl82c105_dma_ops = { | |||
| 299 | .dma_sff_read_status = ide_dma_sff_read_status, | 299 | .dma_sff_read_status = ide_dma_sff_read_status, |
| 300 | }; | 300 | }; |
| 301 | 301 | ||
| 302 | static const struct ide_port_info sl82c105_chipset __devinitconst = { | 302 | static const struct ide_port_info sl82c105_chipset = { |
| 303 | .name = DRV_NAME, | 303 | .name = DRV_NAME, |
| 304 | .init_chipset = init_chipset_sl82c105, | 304 | .init_chipset = init_chipset_sl82c105, |
| 305 | .enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}}, | 305 | .enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}}, |
| @@ -313,7 +313,7 @@ static const struct ide_port_info sl82c105_chipset __devinitconst = { | |||
| 313 | .mwdma_mask = ATA_MWDMA2, | 313 | .mwdma_mask = ATA_MWDMA2, |
| 314 | }; | 314 | }; |
| 315 | 315 | ||
| 316 | static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 316 | static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 317 | { | 317 | { |
| 318 | struct ide_port_info d = sl82c105_chipset; | 318 | struct ide_port_info d = sl82c105_chipset; |
| 319 | u8 rev = sl82c105_bridge_revision(dev); | 319 | u8 rev = sl82c105_bridge_revision(dev); |
diff --git a/drivers/ide/slc90e66.c b/drivers/ide/slc90e66.c index 863a5e9283ca..8af92bbb3dcb 100644 --- a/drivers/ide/slc90e66.c +++ b/drivers/ide/slc90e66.c | |||
| @@ -132,7 +132,7 @@ static const struct ide_port_ops slc90e66_port_ops = { | |||
| 132 | .cable_detect = slc90e66_cable_detect, | 132 | .cable_detect = slc90e66_cable_detect, |
| 133 | }; | 133 | }; |
| 134 | 134 | ||
| 135 | static const struct ide_port_info slc90e66_chipset __devinitconst = { | 135 | static const struct ide_port_info slc90e66_chipset = { |
| 136 | .name = DRV_NAME, | 136 | .name = DRV_NAME, |
| 137 | .enablebits = { {0x41, 0x80, 0x80}, {0x43, 0x80, 0x80} }, | 137 | .enablebits = { {0x41, 0x80, 0x80}, {0x43, 0x80, 0x80} }, |
| 138 | .port_ops = &slc90e66_port_ops, | 138 | .port_ops = &slc90e66_port_ops, |
| @@ -142,7 +142,8 @@ static const struct ide_port_info slc90e66_chipset __devinitconst = { | |||
| 142 | .udma_mask = ATA_UDMA4, | 142 | .udma_mask = ATA_UDMA4, |
| 143 | }; | 143 | }; |
| 144 | 144 | ||
| 145 | static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 145 | static int slc90e66_init_one(struct pci_dev *dev, |
| 146 | const struct pci_device_id *id) | ||
| 146 | { | 147 | { |
| 147 | return ide_pci_init_one(dev, &slc90e66_chipset, NULL); | 148 | return ide_pci_init_one(dev, &slc90e66_chipset, NULL); |
| 148 | } | 149 | } |
diff --git a/drivers/ide/tc86c001.c b/drivers/ide/tc86c001.c index 17946785ebf6..17e6132b99bf 100644 --- a/drivers/ide/tc86c001.c +++ b/drivers/ide/tc86c001.c | |||
| @@ -144,7 +144,7 @@ static u8 tc86c001_cable_detect(ide_hwif_t *hwif) | |||
| 144 | return (scr1 & 0x2000) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; | 144 | return (scr1 & 0x2000) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | static void __devinit init_hwif_tc86c001(ide_hwif_t *hwif) | 147 | static void init_hwif_tc86c001(ide_hwif_t *hwif) |
| 148 | { | 148 | { |
| 149 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 149 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
| 150 | unsigned long sc_base = pci_resource_start(dev, 5); | 150 | unsigned long sc_base = pci_resource_start(dev, 5); |
| @@ -192,7 +192,7 @@ static const struct ide_dma_ops tc86c001_dma_ops = { | |||
| 192 | .dma_sff_read_status = ide_dma_sff_read_status, | 192 | .dma_sff_read_status = ide_dma_sff_read_status, |
| 193 | }; | 193 | }; |
| 194 | 194 | ||
| 195 | static const struct ide_port_info tc86c001_chipset __devinitconst = { | 195 | static const struct ide_port_info tc86c001_chipset = { |
| 196 | .name = DRV_NAME, | 196 | .name = DRV_NAME, |
| 197 | .init_hwif = init_hwif_tc86c001, | 197 | .init_hwif = init_hwif_tc86c001, |
| 198 | .port_ops = &tc86c001_port_ops, | 198 | .port_ops = &tc86c001_port_ops, |
| @@ -203,8 +203,8 @@ static const struct ide_port_info tc86c001_chipset __devinitconst = { | |||
| 203 | .udma_mask = ATA_UDMA4, | 203 | .udma_mask = ATA_UDMA4, |
| 204 | }; | 204 | }; |
| 205 | 205 | ||
| 206 | static int __devinit tc86c001_init_one(struct pci_dev *dev, | 206 | static int tc86c001_init_one(struct pci_dev *dev, |
| 207 | const struct pci_device_id *id) | 207 | const struct pci_device_id *id) |
| 208 | { | 208 | { |
| 209 | int rc; | 209 | int rc; |
| 210 | 210 | ||
| @@ -232,7 +232,7 @@ out: | |||
| 232 | return rc; | 232 | return rc; |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | static void __devexit tc86c001_remove(struct pci_dev *dev) | 235 | static void tc86c001_remove(struct pci_dev *dev) |
| 236 | { | 236 | { |
| 237 | ide_pci_remove(dev); | 237 | ide_pci_remove(dev); |
| 238 | pci_release_region(dev, 5); | 238 | pci_release_region(dev, 5); |
| @@ -249,7 +249,7 @@ static struct pci_driver tc86c001_pci_driver = { | |||
| 249 | .name = "TC86C001", | 249 | .name = "TC86C001", |
| 250 | .id_table = tc86c001_pci_tbl, | 250 | .id_table = tc86c001_pci_tbl, |
| 251 | .probe = tc86c001_init_one, | 251 | .probe = tc86c001_init_one, |
| 252 | .remove = __devexit_p(tc86c001_remove), | 252 | .remove = tc86c001_remove, |
| 253 | }; | 253 | }; |
| 254 | 254 | ||
| 255 | static int __init tc86c001_ide_init(void) | 255 | static int __init tc86c001_ide_init(void) |
diff --git a/drivers/ide/triflex.c b/drivers/ide/triflex.c index 55ce1b80efcb..7f1af9493f0e 100644 --- a/drivers/ide/triflex.c +++ b/drivers/ide/triflex.c | |||
| @@ -92,7 +92,7 @@ static const struct ide_port_ops triflex_port_ops = { | |||
| 92 | .set_dma_mode = triflex_set_mode, | 92 | .set_dma_mode = triflex_set_mode, |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | static const struct ide_port_info triflex_device __devinitconst = { | 95 | static const struct ide_port_info triflex_device = { |
| 96 | .name = DRV_NAME, | 96 | .name = DRV_NAME, |
| 97 | .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}}, | 97 | .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}}, |
| 98 | .port_ops = &triflex_port_ops, | 98 | .port_ops = &triflex_port_ops, |
| @@ -101,8 +101,7 @@ static const struct ide_port_info triflex_device __devinitconst = { | |||
| 101 | .mwdma_mask = ATA_MWDMA2, | 101 | .mwdma_mask = ATA_MWDMA2, |
| 102 | }; | 102 | }; |
| 103 | 103 | ||
| 104 | static int __devinit triflex_init_one(struct pci_dev *dev, | 104 | static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 105 | const struct pci_device_id *id) | ||
| 106 | { | 105 | { |
| 107 | return ide_pci_init_one(dev, &triflex_device, NULL); | 106 | return ide_pci_init_one(dev, &triflex_device, NULL); |
| 108 | } | 107 | } |
diff --git a/drivers/ide/trm290.c b/drivers/ide/trm290.c index e494a98a43a9..0069f6ce74cf 100644 --- a/drivers/ide/trm290.c +++ b/drivers/ide/trm290.c | |||
| @@ -231,7 +231,7 @@ static void trm290_dma_host_set(ide_drive_t *drive, int on) | |||
| 231 | { | 231 | { |
| 232 | } | 232 | } |
| 233 | 233 | ||
| 234 | static void __devinit init_hwif_trm290(ide_hwif_t *hwif) | 234 | static void init_hwif_trm290(ide_hwif_t *hwif) |
| 235 | { | 235 | { |
| 236 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 236 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
| 237 | unsigned int cfg_base = pci_resource_start(dev, 4); | 237 | unsigned int cfg_base = pci_resource_start(dev, 4); |
| @@ -324,7 +324,7 @@ static struct ide_dma_ops trm290_dma_ops = { | |||
| 324 | .dma_check = trm290_dma_check, | 324 | .dma_check = trm290_dma_check, |
| 325 | }; | 325 | }; |
| 326 | 326 | ||
| 327 | static const struct ide_port_info trm290_chipset __devinitconst = { | 327 | static const struct ide_port_info trm290_chipset = { |
| 328 | .name = DRV_NAME, | 328 | .name = DRV_NAME, |
| 329 | .init_hwif = init_hwif_trm290, | 329 | .init_hwif = init_hwif_trm290, |
| 330 | .tp_ops = &trm290_tp_ops, | 330 | .tp_ops = &trm290_tp_ops, |
| @@ -338,7 +338,7 @@ static const struct ide_port_info trm290_chipset __devinitconst = { | |||
| 338 | IDE_HFLAG_NO_LBA48, | 338 | IDE_HFLAG_NO_LBA48, |
| 339 | }; | 339 | }; |
| 340 | 340 | ||
| 341 | static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 341 | static int trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 342 | { | 342 | { |
| 343 | return ide_pci_init_one(dev, &trm290_chipset, NULL); | 343 | return ide_pci_init_one(dev, &trm290_chipset, NULL); |
| 344 | } | 344 | } |
diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c index eb7767864d10..01464f1e2339 100644 --- a/drivers/ide/via82cxxx.c +++ b/drivers/ide/via82cxxx.c | |||
| @@ -403,7 +403,7 @@ static const struct ide_port_ops via_port_ops = { | |||
| 403 | .cable_detect = via82cxxx_cable_detect, | 403 | .cable_detect = via82cxxx_cable_detect, |
| 404 | }; | 404 | }; |
| 405 | 405 | ||
| 406 | static const struct ide_port_info via82cxxx_chipset __devinitconst = { | 406 | static const struct ide_port_info via82cxxx_chipset = { |
| 407 | .name = DRV_NAME, | 407 | .name = DRV_NAME, |
| 408 | .init_chipset = init_chipset_via82cxxx, | 408 | .init_chipset = init_chipset_via82cxxx, |
| 409 | .enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } }, | 409 | .enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } }, |
| @@ -416,7 +416,7 @@ static const struct ide_port_info via82cxxx_chipset __devinitconst = { | |||
| 416 | .mwdma_mask = ATA_MWDMA2, | 416 | .mwdma_mask = ATA_MWDMA2, |
| 417 | }; | 417 | }; |
| 418 | 418 | ||
| 419 | static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 419 | static int via_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 420 | { | 420 | { |
| 421 | struct pci_dev *isa = NULL; | 421 | struct pci_dev *isa = NULL; |
| 422 | struct via_isa_bridge *via_config; | 422 | struct via_isa_bridge *via_config; |
| @@ -489,7 +489,7 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i | |||
| 489 | return rc; | 489 | return rc; |
| 490 | } | 490 | } |
| 491 | 491 | ||
| 492 | static void __devexit via_remove(struct pci_dev *dev) | 492 | static void via_remove(struct pci_dev *dev) |
| 493 | { | 493 | { |
| 494 | struct ide_host *host = pci_get_drvdata(dev); | 494 | struct ide_host *host = pci_get_drvdata(dev); |
| 495 | struct via82cxxx_dev *vdev = host->host_priv; | 495 | struct via82cxxx_dev *vdev = host->host_priv; |
| @@ -514,7 +514,7 @@ static struct pci_driver via_pci_driver = { | |||
| 514 | .name = "VIA_IDE", | 514 | .name = "VIA_IDE", |
| 515 | .id_table = via_pci_tbl, | 515 | .id_table = via_pci_tbl, |
| 516 | .probe = via_init_one, | 516 | .probe = via_init_one, |
| 517 | .remove = __devexit_p(via_remove), | 517 | .remove = via_remove, |
| 518 | .suspend = ide_pci_suspend, | 518 | .suspend = ide_pci_suspend, |
| 519 | .resume = ide_pci_resume, | 519 | .resume = ide_pci_resume, |
| 520 | }; | 520 | }; |
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index c49c04d9c2b0..4ba384f1ab54 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c | |||
| @@ -506,7 +506,7 @@ static int intel_idle_cpuidle_driver_init(void) | |||
| 506 | if (*cpuidle_state_table[cstate].name == '\0') | 506 | if (*cpuidle_state_table[cstate].name == '\0') |
| 507 | pr_debug(PREFIX "unaware of model 0x%x" | 507 | pr_debug(PREFIX "unaware of model 0x%x" |
| 508 | " MWAIT %d please" | 508 | " MWAIT %d please" |
| 509 | " contact lenb@kernel.org", | 509 | " contact lenb@kernel.org\n", |
| 510 | boot_cpu_data.x86_model, cstate); | 510 | boot_cpu_data.x86_model, cstate); |
| 511 | continue; | 511 | continue; |
| 512 | } | 512 | } |
diff --git a/drivers/iio/accel/Kconfig b/drivers/iio/accel/Kconfig index fe4bcd7c5b12..05e996fafc9d 100644 --- a/drivers/iio/accel/Kconfig +++ b/drivers/iio/accel/Kconfig | |||
| @@ -8,6 +8,7 @@ config HID_SENSOR_ACCEL_3D | |||
| 8 | select IIO_BUFFER | 8 | select IIO_BUFFER |
| 9 | select IIO_TRIGGERED_BUFFER | 9 | select IIO_TRIGGERED_BUFFER |
| 10 | select HID_SENSOR_IIO_COMMON | 10 | select HID_SENSOR_IIO_COMMON |
| 11 | select HID_SENSOR_IIO_TRIGGER | ||
| 11 | tristate "HID Accelerometers 3D" | 12 | tristate "HID Accelerometers 3D" |
| 12 | help | 13 | help |
| 13 | Say yes here to build support for the HID SENSOR | 14 | Say yes here to build support for the HID SENSOR |
diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c index e67bb912bd19..0b0c3c66f6c0 100644 --- a/drivers/iio/accel/hid-sensor-accel-3d.c +++ b/drivers/iio/accel/hid-sensor-accel-3d.c | |||
| @@ -278,7 +278,7 @@ static int accel_3d_parse_report(struct platform_device *pdev, | |||
| 278 | } | 278 | } |
| 279 | 279 | ||
| 280 | /* Function to initialize the processing for usage id */ | 280 | /* Function to initialize the processing for usage id */ |
| 281 | static int __devinit hid_accel_3d_probe(struct platform_device *pdev) | 281 | static int hid_accel_3d_probe(struct platform_device *pdev) |
| 282 | { | 282 | { |
| 283 | int ret = 0; | 283 | int ret = 0; |
| 284 | static const char *name = "accel_3d"; | 284 | static const char *name = "accel_3d"; |
| @@ -375,7 +375,7 @@ error_ret: | |||
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | /* Function to deinitialize the processing for usage id */ | 377 | /* Function to deinitialize the processing for usage id */ |
| 378 | static int __devinit hid_accel_3d_remove(struct platform_device *pdev) | 378 | static int hid_accel_3d_remove(struct platform_device *pdev) |
| 379 | { | 379 | { |
| 380 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; | 380 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; |
| 381 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); | 381 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); |
diff --git a/drivers/iio/adc/ad7266.c b/drivers/iio/adc/ad7266.c index a6f4fc5f8201..bbad9b94cd75 100644 --- a/drivers/iio/adc/ad7266.c +++ b/drivers/iio/adc/ad7266.c | |||
| @@ -367,7 +367,7 @@ static const struct ad7266_chan_info ad7266_chan_infos[] = { | |||
| 367 | }, | 367 | }, |
| 368 | }; | 368 | }; |
| 369 | 369 | ||
| 370 | static void __devinit ad7266_init_channels(struct iio_dev *indio_dev) | 370 | static void ad7266_init_channels(struct iio_dev *indio_dev) |
| 371 | { | 371 | { |
| 372 | struct ad7266_state *st = iio_priv(indio_dev); | 372 | struct ad7266_state *st = iio_priv(indio_dev); |
| 373 | bool is_differential, is_signed; | 373 | bool is_differential, is_signed; |
| @@ -391,7 +391,7 @@ static const char * const ad7266_gpio_labels[] = { | |||
| 391 | "AD0", "AD1", "AD2", | 391 | "AD0", "AD1", "AD2", |
| 392 | }; | 392 | }; |
| 393 | 393 | ||
| 394 | static int __devinit ad7266_probe(struct spi_device *spi) | 394 | static int ad7266_probe(struct spi_device *spi) |
| 395 | { | 395 | { |
| 396 | struct ad7266_platform_data *pdata = spi->dev.platform_data; | 396 | struct ad7266_platform_data *pdata = spi->dev.platform_data; |
| 397 | struct iio_dev *indio_dev; | 397 | struct iio_dev *indio_dev; |
| @@ -411,7 +411,11 @@ static int __devinit ad7266_probe(struct spi_device *spi) | |||
| 411 | if (ret) | 411 | if (ret) |
| 412 | goto error_put_reg; | 412 | goto error_put_reg; |
| 413 | 413 | ||
| 414 | st->vref_uv = regulator_get_voltage(st->reg); | 414 | ret = regulator_get_voltage(st->reg); |
| 415 | if (ret < 0) | ||
| 416 | goto error_disable_reg; | ||
| 417 | |||
| 418 | st->vref_uv = ret; | ||
| 415 | } else { | 419 | } else { |
| 416 | /* Use internal reference */ | 420 | /* Use internal reference */ |
| 417 | st->vref_uv = 2500000; | 421 | st->vref_uv = 2500000; |
| @@ -494,7 +498,7 @@ error_put_reg: | |||
| 494 | return ret; | 498 | return ret; |
| 495 | } | 499 | } |
| 496 | 500 | ||
| 497 | static int __devexit ad7266_remove(struct spi_device *spi) | 501 | static int ad7266_remove(struct spi_device *spi) |
| 498 | { | 502 | { |
| 499 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 503 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 500 | struct ad7266_state *st = iio_priv(indio_dev); | 504 | struct ad7266_state *st = iio_priv(indio_dev); |
| @@ -525,7 +529,7 @@ static struct spi_driver ad7266_driver = { | |||
| 525 | .owner = THIS_MODULE, | 529 | .owner = THIS_MODULE, |
| 526 | }, | 530 | }, |
| 527 | .probe = ad7266_probe, | 531 | .probe = ad7266_probe, |
| 528 | .remove = __devexit_p(ad7266_remove), | 532 | .remove = ad7266_remove, |
| 529 | .id_table = ad7266_id, | 533 | .id_table = ad7266_id, |
| 530 | }; | 534 | }; |
| 531 | module_spi_driver(ad7266_driver); | 535 | module_spi_driver(ad7266_driver); |
diff --git a/drivers/iio/adc/ad7298.c b/drivers/iio/adc/ad7298.c index 2364807a5d6c..b34d754994d5 100644 --- a/drivers/iio/adc/ad7298.c +++ b/drivers/iio/adc/ad7298.c | |||
| @@ -292,7 +292,7 @@ static const struct iio_info ad7298_info = { | |||
| 292 | .driver_module = THIS_MODULE, | 292 | .driver_module = THIS_MODULE, |
| 293 | }; | 293 | }; |
| 294 | 294 | ||
| 295 | static int __devinit ad7298_probe(struct spi_device *spi) | 295 | static int ad7298_probe(struct spi_device *spi) |
| 296 | { | 296 | { |
| 297 | struct ad7298_platform_data *pdata = spi->dev.platform_data; | 297 | struct ad7298_platform_data *pdata = spi->dev.platform_data; |
| 298 | struct ad7298_state *st; | 298 | struct ad7298_state *st; |
| @@ -370,7 +370,7 @@ error_free: | |||
| 370 | return ret; | 370 | return ret; |
| 371 | } | 371 | } |
| 372 | 372 | ||
| 373 | static int __devexit ad7298_remove(struct spi_device *spi) | 373 | static int ad7298_remove(struct spi_device *spi) |
| 374 | { | 374 | { |
| 375 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 375 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 376 | struct ad7298_state *st = iio_priv(indio_dev); | 376 | struct ad7298_state *st = iio_priv(indio_dev); |
| @@ -398,7 +398,7 @@ static struct spi_driver ad7298_driver = { | |||
| 398 | .owner = THIS_MODULE, | 398 | .owner = THIS_MODULE, |
| 399 | }, | 399 | }, |
| 400 | .probe = ad7298_probe, | 400 | .probe = ad7298_probe, |
| 401 | .remove = __devexit_p(ad7298_remove), | 401 | .remove = ad7298_remove, |
| 402 | .id_table = ad7298_id, | 402 | .id_table = ad7298_id, |
| 403 | }; | 403 | }; |
| 404 | module_spi_driver(ad7298_driver); | 404 | module_spi_driver(ad7298_driver); |
diff --git a/drivers/iio/adc/ad7476.c b/drivers/iio/adc/ad7476.c index 330248bfebae..1491fa6debb2 100644 --- a/drivers/iio/adc/ad7476.c +++ b/drivers/iio/adc/ad7476.c | |||
| @@ -207,7 +207,7 @@ static const struct iio_info ad7476_info = { | |||
| 207 | .read_raw = &ad7476_read_raw, | 207 | .read_raw = &ad7476_read_raw, |
| 208 | }; | 208 | }; |
| 209 | 209 | ||
| 210 | static int __devinit ad7476_probe(struct spi_device *spi) | 210 | static int ad7476_probe(struct spi_device *spi) |
| 211 | { | 211 | { |
| 212 | struct ad7476_state *st; | 212 | struct ad7476_state *st; |
| 213 | struct iio_dev *indio_dev; | 213 | struct iio_dev *indio_dev; |
| @@ -277,7 +277,7 @@ error_ret: | |||
| 277 | return ret; | 277 | return ret; |
| 278 | } | 278 | } |
| 279 | 279 | ||
| 280 | static int __devexit ad7476_remove(struct spi_device *spi) | 280 | static int ad7476_remove(struct spi_device *spi) |
| 281 | { | 281 | { |
| 282 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 282 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 283 | struct ad7476_state *st = iio_priv(indio_dev); | 283 | struct ad7476_state *st = iio_priv(indio_dev); |
| @@ -322,7 +322,7 @@ static struct spi_driver ad7476_driver = { | |||
| 322 | .owner = THIS_MODULE, | 322 | .owner = THIS_MODULE, |
| 323 | }, | 323 | }, |
| 324 | .probe = ad7476_probe, | 324 | .probe = ad7476_probe, |
| 325 | .remove = __devexit_p(ad7476_remove), | 325 | .remove = ad7476_remove, |
| 326 | .id_table = ad7476_id, | 326 | .id_table = ad7476_id, |
| 327 | }; | 327 | }; |
| 328 | module_spi_driver(ad7476_driver); | 328 | module_spi_driver(ad7476_driver); |
diff --git a/drivers/iio/adc/ad7791.c b/drivers/iio/adc/ad7791.c index e93740843b2b..5e8d1da6887f 100644 --- a/drivers/iio/adc/ad7791.c +++ b/drivers/iio/adc/ad7791.c | |||
| @@ -325,8 +325,8 @@ static const struct iio_info ad7791_no_filter_info = { | |||
| 325 | .driver_module = THIS_MODULE, | 325 | .driver_module = THIS_MODULE, |
| 326 | }; | 326 | }; |
| 327 | 327 | ||
| 328 | static int __devinit ad7791_setup(struct ad7791_state *st, | 328 | static int ad7791_setup(struct ad7791_state *st, |
| 329 | struct ad7791_platform_data *pdata) | 329 | struct ad7791_platform_data *pdata) |
| 330 | { | 330 | { |
| 331 | /* Set to poweron-reset default values */ | 331 | /* Set to poweron-reset default values */ |
| 332 | st->mode = AD7791_MODE_BUFFER; | 332 | st->mode = AD7791_MODE_BUFFER; |
| @@ -349,7 +349,7 @@ static int __devinit ad7791_setup(struct ad7791_state *st, | |||
| 349 | st->mode); | 349 | st->mode); |
| 350 | } | 350 | } |
| 351 | 351 | ||
| 352 | static int __devinit ad7791_probe(struct spi_device *spi) | 352 | static int ad7791_probe(struct spi_device *spi) |
| 353 | { | 353 | { |
| 354 | struct ad7791_platform_data *pdata = spi->dev.platform_data; | 354 | struct ad7791_platform_data *pdata = spi->dev.platform_data; |
| 355 | struct iio_dev *indio_dev; | 355 | struct iio_dev *indio_dev; |
| @@ -418,7 +418,7 @@ err_iio_free: | |||
| 418 | return ret; | 418 | return ret; |
| 419 | } | 419 | } |
| 420 | 420 | ||
| 421 | static int __devexit ad7791_remove(struct spi_device *spi) | 421 | static int ad7791_remove(struct spi_device *spi) |
| 422 | { | 422 | { |
| 423 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 423 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 424 | struct ad7791_state *st = iio_priv(indio_dev); | 424 | struct ad7791_state *st = iio_priv(indio_dev); |
| @@ -450,7 +450,7 @@ static struct spi_driver ad7791_driver = { | |||
| 450 | .owner = THIS_MODULE, | 450 | .owner = THIS_MODULE, |
| 451 | }, | 451 | }, |
| 452 | .probe = ad7791_probe, | 452 | .probe = ad7791_probe, |
| 453 | .remove = __devexit_p(ad7791_remove), | 453 | .remove = ad7791_remove, |
| 454 | .id_table = ad7791_spi_ids, | 454 | .id_table = ad7791_spi_ids, |
| 455 | }; | 455 | }; |
| 456 | module_spi_driver(ad7791_driver); | 456 | module_spi_driver(ad7791_driver); |
diff --git a/drivers/iio/adc/ad7887.c b/drivers/iio/adc/ad7887.c index 81153fafac7a..a33d5cd1a536 100644 --- a/drivers/iio/adc/ad7887.c +++ b/drivers/iio/adc/ad7887.c | |||
| @@ -233,7 +233,7 @@ static const struct iio_info ad7887_info = { | |||
| 233 | .driver_module = THIS_MODULE, | 233 | .driver_module = THIS_MODULE, |
| 234 | }; | 234 | }; |
| 235 | 235 | ||
| 236 | static int __devinit ad7887_probe(struct spi_device *spi) | 236 | static int ad7887_probe(struct spi_device *spi) |
| 237 | { | 237 | { |
| 238 | struct ad7887_platform_data *pdata = spi->dev.platform_data; | 238 | struct ad7887_platform_data *pdata = spi->dev.platform_data; |
| 239 | struct ad7887_state *st; | 239 | struct ad7887_state *st; |
| @@ -340,7 +340,7 @@ error_free: | |||
| 340 | return ret; | 340 | return ret; |
| 341 | } | 341 | } |
| 342 | 342 | ||
| 343 | static int __devexit ad7887_remove(struct spi_device *spi) | 343 | static int ad7887_remove(struct spi_device *spi) |
| 344 | { | 344 | { |
| 345 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 345 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 346 | struct ad7887_state *st = iio_priv(indio_dev); | 346 | struct ad7887_state *st = iio_priv(indio_dev); |
| @@ -368,7 +368,7 @@ static struct spi_driver ad7887_driver = { | |||
| 368 | .owner = THIS_MODULE, | 368 | .owner = THIS_MODULE, |
| 369 | }, | 369 | }, |
| 370 | .probe = ad7887_probe, | 370 | .probe = ad7887_probe, |
| 371 | .remove = __devexit_p(ad7887_remove), | 371 | .remove = ad7887_remove, |
| 372 | .id_table = ad7887_id, | 372 | .id_table = ad7887_id, |
| 373 | }; | 373 | }; |
| 374 | module_spi_driver(ad7887_driver); | 374 | module_spi_driver(ad7887_driver); |
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c index 03b85940f4ba..a526c0e3aaa8 100644 --- a/drivers/iio/adc/at91_adc.c +++ b/drivers/iio/adc/at91_adc.c | |||
| @@ -80,7 +80,7 @@ static irqreturn_t at91_adc_trigger_handler(int irq, void *p) | |||
| 80 | *timestamp = pf->timestamp; | 80 | *timestamp = pf->timestamp; |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | iio_push_to_buffers(indio_dev, (u8 *)st->buffer); | 83 | iio_push_to_buffers(idev, (u8 *)st->buffer); |
| 84 | 84 | ||
| 85 | iio_trigger_notify_done(idev->trig); | 85 | iio_trigger_notify_done(idev->trig); |
| 86 | 86 | ||
| @@ -514,7 +514,7 @@ static const struct iio_info at91_adc_info = { | |||
| 514 | .read_raw = &at91_adc_read_raw, | 514 | .read_raw = &at91_adc_read_raw, |
| 515 | }; | 515 | }; |
| 516 | 516 | ||
| 517 | static int __devinit at91_adc_probe(struct platform_device *pdev) | 517 | static int at91_adc_probe(struct platform_device *pdev) |
| 518 | { | 518 | { |
| 519 | unsigned int prsc, mstrclk, ticks, adc_clk; | 519 | unsigned int prsc, mstrclk, ticks, adc_clk; |
| 520 | int ret; | 520 | int ret; |
| @@ -678,7 +678,7 @@ error_ret: | |||
| 678 | return ret; | 678 | return ret; |
| 679 | } | 679 | } |
| 680 | 680 | ||
| 681 | static int __devexit at91_adc_remove(struct platform_device *pdev) | 681 | static int at91_adc_remove(struct platform_device *pdev) |
| 682 | { | 682 | { |
| 683 | struct iio_dev *idev = platform_get_drvdata(pdev); | 683 | struct iio_dev *idev = platform_get_drvdata(pdev); |
| 684 | struct at91_adc_state *st = iio_priv(idev); | 684 | struct at91_adc_state *st = iio_priv(idev); |
| @@ -702,7 +702,7 @@ MODULE_DEVICE_TABLE(of, at91_adc_dt_ids); | |||
| 702 | 702 | ||
| 703 | static struct platform_driver at91_adc_driver = { | 703 | static struct platform_driver at91_adc_driver = { |
| 704 | .probe = at91_adc_probe, | 704 | .probe = at91_adc_probe, |
| 705 | .remove = __devexit_p(at91_adc_remove), | 705 | .remove = at91_adc_remove, |
| 706 | .driver = { | 706 | .driver = { |
| 707 | .name = "at91_adc", | 707 | .name = "at91_adc", |
| 708 | .of_match_table = of_match_ptr(at91_adc_dt_ids), | 708 | .of_match_table = of_match_ptr(at91_adc_dt_ids), |
diff --git a/drivers/iio/adc/lp8788_adc.c b/drivers/iio/adc/lp8788_adc.c index a93aaf0bb841..72955e45e9e0 100644 --- a/drivers/iio/adc/lp8788_adc.c +++ b/drivers/iio/adc/lp8788_adc.c | |||
| @@ -193,7 +193,7 @@ static inline void lp8788_iio_map_unregister(struct iio_dev *indio_dev, | |||
| 193 | iio_map_array_unregister(indio_dev, adc->map); | 193 | iio_map_array_unregister(indio_dev, adc->map); |
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | static int __devinit lp8788_adc_probe(struct platform_device *pdev) | 196 | static int lp8788_adc_probe(struct platform_device *pdev) |
| 197 | { | 197 | { |
| 198 | struct lp8788 *lp = dev_get_drvdata(pdev->dev.parent); | 198 | struct lp8788 *lp = dev_get_drvdata(pdev->dev.parent); |
| 199 | struct iio_dev *indio_dev; | 199 | struct iio_dev *indio_dev; |
| @@ -236,7 +236,7 @@ err_iio_map: | |||
| 236 | return ret; | 236 | return ret; |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | static int __devexit lp8788_adc_remove(struct platform_device *pdev) | 239 | static int lp8788_adc_remove(struct platform_device *pdev) |
| 240 | { | 240 | { |
| 241 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); | 241 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); |
| 242 | struct lp8788_adc *adc = iio_priv(indio_dev); | 242 | struct lp8788_adc *adc = iio_priv(indio_dev); |
| @@ -250,7 +250,7 @@ static int __devexit lp8788_adc_remove(struct platform_device *pdev) | |||
| 250 | 250 | ||
| 251 | static struct platform_driver lp8788_adc_driver = { | 251 | static struct platform_driver lp8788_adc_driver = { |
| 252 | .probe = lp8788_adc_probe, | 252 | .probe = lp8788_adc_probe, |
| 253 | .remove = __devexit_p(lp8788_adc_remove), | 253 | .remove = lp8788_adc_remove, |
| 254 | .driver = { | 254 | .driver = { |
| 255 | .name = LP8788_DEV_ADC, | 255 | .name = LP8788_DEV_ADC, |
| 256 | .owner = THIS_MODULE, | 256 | .owner = THIS_MODULE, |
diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c index 1e84b5b55093..03b25b3dc71e 100644 --- a/drivers/iio/adc/max1363.c +++ b/drivers/iio/adc/max1363.c | |||
| @@ -1402,7 +1402,7 @@ static int max1363_initial_setup(struct max1363_state *st) | |||
| 1402 | return max1363_set_scan_mode(st); | 1402 | return max1363_set_scan_mode(st); |
| 1403 | } | 1403 | } |
| 1404 | 1404 | ||
| 1405 | static int __devinit max1363_alloc_scan_masks(struct iio_dev *indio_dev) | 1405 | static int max1363_alloc_scan_masks(struct iio_dev *indio_dev) |
| 1406 | { | 1406 | { |
| 1407 | struct max1363_state *st = iio_priv(indio_dev); | 1407 | struct max1363_state *st = iio_priv(indio_dev); |
| 1408 | unsigned long *masks; | 1408 | unsigned long *masks; |
| @@ -1525,8 +1525,8 @@ static void max1363_buffer_cleanup(struct iio_dev *indio_dev) | |||
| 1525 | iio_kfifo_free(indio_dev->buffer); | 1525 | iio_kfifo_free(indio_dev->buffer); |
| 1526 | } | 1526 | } |
| 1527 | 1527 | ||
| 1528 | static int __devinit max1363_probe(struct i2c_client *client, | 1528 | static int max1363_probe(struct i2c_client *client, |
| 1529 | const struct i2c_device_id *id) | 1529 | const struct i2c_device_id *id) |
| 1530 | { | 1530 | { |
| 1531 | int ret; | 1531 | int ret; |
| 1532 | struct max1363_state *st; | 1532 | struct max1363_state *st; |
| @@ -1605,26 +1605,27 @@ static int __devinit max1363_probe(struct i2c_client *client, | |||
| 1605 | 1605 | ||
| 1606 | return 0; | 1606 | return 0; |
| 1607 | error_free_irq: | 1607 | error_free_irq: |
| 1608 | free_irq(st->client->irq, indio_dev); | 1608 | if (client->irq) |
| 1609 | free_irq(st->client->irq, indio_dev); | ||
| 1609 | error_uninit_buffer: | 1610 | error_uninit_buffer: |
| 1610 | iio_buffer_unregister(indio_dev); | 1611 | iio_buffer_unregister(indio_dev); |
| 1611 | error_cleanup_buffer: | 1612 | error_cleanup_buffer: |
| 1612 | max1363_buffer_cleanup(indio_dev); | 1613 | max1363_buffer_cleanup(indio_dev); |
| 1613 | error_free_available_scan_masks: | 1614 | error_free_available_scan_masks: |
| 1614 | kfree(indio_dev->available_scan_masks); | 1615 | kfree(indio_dev->available_scan_masks); |
| 1615 | error_unregister_map: | ||
| 1616 | iio_map_array_unregister(indio_dev, client->dev.platform_data); | ||
| 1617 | error_disable_reg: | 1616 | error_disable_reg: |
| 1618 | regulator_disable(st->reg); | 1617 | regulator_disable(st->reg); |
| 1619 | error_put_reg: | 1618 | error_put_reg: |
| 1620 | regulator_put(st->reg); | 1619 | regulator_put(st->reg); |
| 1620 | error_unregister_map: | ||
| 1621 | iio_map_array_unregister(indio_dev, client->dev.platform_data); | ||
| 1621 | error_free_device: | 1622 | error_free_device: |
| 1622 | iio_device_free(indio_dev); | 1623 | iio_device_free(indio_dev); |
| 1623 | error_out: | 1624 | error_out: |
| 1624 | return ret; | 1625 | return ret; |
| 1625 | } | 1626 | } |
| 1626 | 1627 | ||
| 1627 | static int __devexit max1363_remove(struct i2c_client *client) | 1628 | static int max1363_remove(struct i2c_client *client) |
| 1628 | { | 1629 | { |
| 1629 | struct iio_dev *indio_dev = i2c_get_clientdata(client); | 1630 | struct iio_dev *indio_dev = i2c_get_clientdata(client); |
| 1630 | struct max1363_state *st = iio_priv(indio_dev); | 1631 | struct max1363_state *st = iio_priv(indio_dev); |
| @@ -1635,10 +1636,8 @@ static int __devexit max1363_remove(struct i2c_client *client) | |||
| 1635 | iio_buffer_unregister(indio_dev); | 1636 | iio_buffer_unregister(indio_dev); |
| 1636 | max1363_buffer_cleanup(indio_dev); | 1637 | max1363_buffer_cleanup(indio_dev); |
| 1637 | kfree(indio_dev->available_scan_masks); | 1638 | kfree(indio_dev->available_scan_masks); |
| 1638 | if (!IS_ERR(st->reg)) { | 1639 | regulator_disable(st->reg); |
| 1639 | regulator_disable(st->reg); | 1640 | regulator_put(st->reg); |
| 1640 | regulator_put(st->reg); | ||
| 1641 | } | ||
| 1642 | iio_map_array_unregister(indio_dev, client->dev.platform_data); | 1641 | iio_map_array_unregister(indio_dev, client->dev.platform_data); |
| 1643 | iio_device_free(indio_dev); | 1642 | iio_device_free(indio_dev); |
| 1644 | 1643 | ||
| @@ -1690,7 +1689,7 @@ static struct i2c_driver max1363_driver = { | |||
| 1690 | .name = "max1363", | 1689 | .name = "max1363", |
| 1691 | }, | 1690 | }, |
| 1692 | .probe = max1363_probe, | 1691 | .probe = max1363_probe, |
| 1693 | .remove = __devexit_p(max1363_remove), | 1692 | .remove = max1363_remove, |
| 1694 | .id_table = max1363_id, | 1693 | .id_table = max1363_id, |
| 1695 | }; | 1694 | }; |
| 1696 | module_i2c_driver(max1363_driver); | 1695 | module_i2c_driver(max1363_driver); |
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c index 02a43c87a8a3..cd030e100c39 100644 --- a/drivers/iio/adc/ti_am335x_adc.c +++ b/drivers/iio/adc/ti_am335x_adc.c | |||
| @@ -136,7 +136,7 @@ static const struct iio_info tiadc_info = { | |||
| 136 | .read_raw = &tiadc_read_raw, | 136 | .read_raw = &tiadc_read_raw, |
| 137 | }; | 137 | }; |
| 138 | 138 | ||
| 139 | static int __devinit tiadc_probe(struct platform_device *pdev) | 139 | static int tiadc_probe(struct platform_device *pdev) |
| 140 | { | 140 | { |
| 141 | struct iio_dev *indio_dev; | 141 | struct iio_dev *indio_dev; |
| 142 | struct tiadc_device *adc_dev; | 142 | struct tiadc_device *adc_dev; |
| @@ -188,7 +188,7 @@ err_ret: | |||
| 188 | return err; | 188 | return err; |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | static int __devexit tiadc_remove(struct platform_device *pdev) | 191 | static int tiadc_remove(struct platform_device *pdev) |
| 192 | { | 192 | { |
| 193 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); | 193 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); |
| 194 | 194 | ||
| @@ -250,7 +250,7 @@ static struct platform_driver tiadc_driver = { | |||
| 250 | .pm = TIADC_PM_OPS, | 250 | .pm = TIADC_PM_OPS, |
| 251 | }, | 251 | }, |
| 252 | .probe = tiadc_probe, | 252 | .probe = tiadc_probe, |
| 253 | .remove = __devexit_p(tiadc_remove), | 253 | .remove = tiadc_remove, |
| 254 | }; | 254 | }; |
| 255 | 255 | ||
| 256 | module_platform_driver(tiadc_driver); | 256 | module_platform_driver(tiadc_driver); |
diff --git a/drivers/iio/adc/viperboard_adc.c b/drivers/iio/adc/viperboard_adc.c index 10136a8b20d4..ad0261533dee 100644 --- a/drivers/iio/adc/viperboard_adc.c +++ b/drivers/iio/adc/viperboard_adc.c | |||
| @@ -116,7 +116,7 @@ static const struct iio_info vprbrd_adc_iio_info = { | |||
| 116 | .driver_module = THIS_MODULE, | 116 | .driver_module = THIS_MODULE, |
| 117 | }; | 117 | }; |
| 118 | 118 | ||
| 119 | static int __devinit vprbrd_adc_probe(struct platform_device *pdev) | 119 | static int vprbrd_adc_probe(struct platform_device *pdev) |
| 120 | { | 120 | { |
| 121 | struct vprbrd *vb = dev_get_drvdata(pdev->dev.parent); | 121 | struct vprbrd *vb = dev_get_drvdata(pdev->dev.parent); |
| 122 | struct vprbrd_adc *adc; | 122 | struct vprbrd_adc *adc; |
| @@ -154,7 +154,7 @@ error: | |||
| 154 | return ret; | 154 | return ret; |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | static int __devexit vprbrd_adc_remove(struct platform_device *pdev) | 157 | static int vprbrd_adc_remove(struct platform_device *pdev) |
| 158 | { | 158 | { |
| 159 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); | 159 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); |
| 160 | 160 | ||
| @@ -170,7 +170,7 @@ static struct platform_driver vprbrd_adc_driver = { | |||
| 170 | .owner = THIS_MODULE, | 170 | .owner = THIS_MODULE, |
| 171 | }, | 171 | }, |
| 172 | .probe = vprbrd_adc_probe, | 172 | .probe = vprbrd_adc_probe, |
| 173 | .remove = __devexit_p(vprbrd_adc_remove), | 173 | .remove = vprbrd_adc_remove, |
| 174 | }; | 174 | }; |
| 175 | 175 | ||
| 176 | module_platform_driver(vprbrd_adc_driver); | 176 | module_platform_driver(vprbrd_adc_driver); |
diff --git a/drivers/iio/amplifiers/ad8366.c b/drivers/iio/amplifiers/ad8366.c index d8281cdbfc4a..d6c0af23a2a7 100644 --- a/drivers/iio/amplifiers/ad8366.c +++ b/drivers/iio/amplifiers/ad8366.c | |||
| @@ -133,7 +133,7 @@ static const struct iio_chan_spec ad8366_channels[] = { | |||
| 133 | AD8366_CHAN(1), | 133 | AD8366_CHAN(1), |
| 134 | }; | 134 | }; |
| 135 | 135 | ||
| 136 | static int __devinit ad8366_probe(struct spi_device *spi) | 136 | static int ad8366_probe(struct spi_device *spi) |
| 137 | { | 137 | { |
| 138 | struct iio_dev *indio_dev; | 138 | struct iio_dev *indio_dev; |
| 139 | struct ad8366_state *st; | 139 | struct ad8366_state *st; |
| @@ -182,7 +182,7 @@ error_put_reg: | |||
| 182 | return ret; | 182 | return ret; |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | static int __devexit ad8366_remove(struct spi_device *spi) | 185 | static int ad8366_remove(struct spi_device *spi) |
| 186 | { | 186 | { |
| 187 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 187 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 188 | struct ad8366_state *st = iio_priv(indio_dev); | 188 | struct ad8366_state *st = iio_priv(indio_dev); |
| @@ -211,7 +211,7 @@ static struct spi_driver ad8366_driver = { | |||
| 211 | .owner = THIS_MODULE, | 211 | .owner = THIS_MODULE, |
| 212 | }, | 212 | }, |
| 213 | .probe = ad8366_probe, | 213 | .probe = ad8366_probe, |
| 214 | .remove = __devexit_p(ad8366_remove), | 214 | .remove = ad8366_remove, |
| 215 | .id_table = ad8366_id, | 215 | .id_table = ad8366_id, |
| 216 | }; | 216 | }; |
| 217 | 217 | ||
diff --git a/drivers/iio/common/hid-sensors/Kconfig b/drivers/iio/common/hid-sensors/Kconfig index ae10778da7aa..1178121b55b0 100644 --- a/drivers/iio/common/hid-sensors/Kconfig +++ b/drivers/iio/common/hid-sensors/Kconfig | |||
| @@ -6,7 +6,7 @@ menu "Hid Sensor IIO Common" | |||
| 6 | config HID_SENSOR_IIO_COMMON | 6 | config HID_SENSOR_IIO_COMMON |
| 7 | tristate "Common modules for all HID Sensor IIO drivers" | 7 | tristate "Common modules for all HID Sensor IIO drivers" |
| 8 | depends on HID_SENSOR_HUB | 8 | depends on HID_SENSOR_HUB |
| 9 | select IIO_TRIGGER if IIO_BUFFER | 9 | select HID_SENSOR_IIO_TRIGGER if IIO_BUFFER |
| 10 | help | 10 | help |
| 11 | Say yes here to build support for HID sensor to use | 11 | Say yes here to build support for HID sensor to use |
| 12 | HID sensor common processing for attributes and IIO triggers. | 12 | HID sensor common processing for attributes and IIO triggers. |
| @@ -14,6 +14,17 @@ config HID_SENSOR_IIO_COMMON | |||
| 14 | HID sensor drivers, this module contains processing for those | 14 | HID sensor drivers, this module contains processing for those |
| 15 | attributes. | 15 | attributes. |
| 16 | 16 | ||
| 17 | config HID_SENSOR_IIO_TRIGGER | ||
| 18 | tristate "Common module (trigger) for all HID Sensor IIO drivers" | ||
| 19 | depends on HID_SENSOR_HUB && HID_SENSOR_IIO_COMMON | ||
| 20 | select IIO_TRIGGER | ||
| 21 | help | ||
| 22 | Say yes here to build trigger support for HID sensors. | ||
| 23 | Triggers will be send if all requested attributes were read. | ||
| 24 | |||
| 25 | If this driver is compiled as a module, it will be named | ||
| 26 | hid-sensor-trigger. | ||
| 27 | |||
| 17 | config HID_SENSOR_ENUM_BASE_QUIRKS | 28 | config HID_SENSOR_ENUM_BASE_QUIRKS |
| 18 | bool "ENUM base quirks for HID Sensor IIO drivers" | 29 | bool "ENUM base quirks for HID Sensor IIO drivers" |
| 19 | depends on HID_SENSOR_IIO_COMMON | 30 | depends on HID_SENSOR_IIO_COMMON |
diff --git a/drivers/iio/common/hid-sensors/Makefile b/drivers/iio/common/hid-sensors/Makefile index 1f463e00c242..22e7c5a82325 100644 --- a/drivers/iio/common/hid-sensors/Makefile +++ b/drivers/iio/common/hid-sensors/Makefile | |||
| @@ -3,4 +3,5 @@ | |||
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | obj-$(CONFIG_HID_SENSOR_IIO_COMMON) += hid-sensor-iio-common.o | 5 | obj-$(CONFIG_HID_SENSOR_IIO_COMMON) += hid-sensor-iio-common.o |
| 6 | hid-sensor-iio-common-y := hid-sensor-attributes.o hid-sensor-trigger.o | 6 | obj-$(CONFIG_HID_SENSOR_IIO_TRIGGER) += hid-sensor-trigger.o |
| 7 | hid-sensor-iio-common-y := hid-sensor-attributes.o | ||
diff --git a/drivers/iio/dac/ad5064.c b/drivers/iio/dac/ad5064.c index eb281a2c295b..2fe1d4edcb2f 100644 --- a/drivers/iio/dac/ad5064.c +++ b/drivers/iio/dac/ad5064.c | |||
| @@ -424,8 +424,8 @@ static const char * const ad5064_vref_name(struct ad5064_state *st, | |||
| 424 | return st->chip_info->shared_vref ? "vref" : ad5064_vref_names[vref]; | 424 | return st->chip_info->shared_vref ? "vref" : ad5064_vref_names[vref]; |
| 425 | } | 425 | } |
| 426 | 426 | ||
| 427 | static int __devinit ad5064_probe(struct device *dev, enum ad5064_type type, | 427 | static int ad5064_probe(struct device *dev, enum ad5064_type type, |
| 428 | const char *name, ad5064_write_func write) | 428 | const char *name, ad5064_write_func write) |
| 429 | { | 429 | { |
| 430 | struct iio_dev *indio_dev; | 430 | struct iio_dev *indio_dev; |
| 431 | struct ad5064_state *st; | 431 | struct ad5064_state *st; |
| @@ -495,7 +495,7 @@ error_free: | |||
| 495 | return ret; | 495 | return ret; |
| 496 | } | 496 | } |
| 497 | 497 | ||
| 498 | static int __devexit ad5064_remove(struct device *dev) | 498 | static int ad5064_remove(struct device *dev) |
| 499 | { | 499 | { |
| 500 | struct iio_dev *indio_dev = dev_get_drvdata(dev); | 500 | struct iio_dev *indio_dev = dev_get_drvdata(dev); |
| 501 | struct ad5064_state *st = iio_priv(indio_dev); | 501 | struct ad5064_state *st = iio_priv(indio_dev); |
| @@ -523,7 +523,7 @@ static int ad5064_spi_write(struct ad5064_state *st, unsigned int cmd, | |||
| 523 | return spi_write(spi, &st->data.spi, sizeof(st->data.spi)); | 523 | return spi_write(spi, &st->data.spi, sizeof(st->data.spi)); |
| 524 | } | 524 | } |
| 525 | 525 | ||
| 526 | static int __devinit ad5064_spi_probe(struct spi_device *spi) | 526 | static int ad5064_spi_probe(struct spi_device *spi) |
| 527 | { | 527 | { |
| 528 | const struct spi_device_id *id = spi_get_device_id(spi); | 528 | const struct spi_device_id *id = spi_get_device_id(spi); |
| 529 | 529 | ||
| @@ -531,7 +531,7 @@ static int __devinit ad5064_spi_probe(struct spi_device *spi) | |||
| 531 | ad5064_spi_write); | 531 | ad5064_spi_write); |
| 532 | } | 532 | } |
| 533 | 533 | ||
| 534 | static int __devexit ad5064_spi_remove(struct spi_device *spi) | 534 | static int ad5064_spi_remove(struct spi_device *spi) |
| 535 | { | 535 | { |
| 536 | return ad5064_remove(&spi->dev); | 536 | return ad5064_remove(&spi->dev); |
| 537 | } | 537 | } |
| @@ -563,7 +563,7 @@ static struct spi_driver ad5064_spi_driver = { | |||
| 563 | .owner = THIS_MODULE, | 563 | .owner = THIS_MODULE, |
| 564 | }, | 564 | }, |
| 565 | .probe = ad5064_spi_probe, | 565 | .probe = ad5064_spi_probe, |
| 566 | .remove = __devexit_p(ad5064_spi_remove), | 566 | .remove = ad5064_spi_remove, |
| 567 | .id_table = ad5064_spi_ids, | 567 | .id_table = ad5064_spi_ids, |
| 568 | }; | 568 | }; |
| 569 | 569 | ||
| @@ -596,14 +596,14 @@ static int ad5064_i2c_write(struct ad5064_state *st, unsigned int cmd, | |||
| 596 | return i2c_master_send(i2c, st->data.i2c, 3); | 596 | return i2c_master_send(i2c, st->data.i2c, 3); |
| 597 | } | 597 | } |
| 598 | 598 | ||
| 599 | static int __devinit ad5064_i2c_probe(struct i2c_client *i2c, | 599 | static int ad5064_i2c_probe(struct i2c_client *i2c, |
| 600 | const struct i2c_device_id *id) | 600 | const struct i2c_device_id *id) |
| 601 | { | 601 | { |
| 602 | return ad5064_probe(&i2c->dev, id->driver_data, id->name, | 602 | return ad5064_probe(&i2c->dev, id->driver_data, id->name, |
| 603 | ad5064_i2c_write); | 603 | ad5064_i2c_write); |
| 604 | } | 604 | } |
| 605 | 605 | ||
| 606 | static int __devexit ad5064_i2c_remove(struct i2c_client *i2c) | 606 | static int ad5064_i2c_remove(struct i2c_client *i2c) |
| 607 | { | 607 | { |
| 608 | return ad5064_remove(&i2c->dev); | 608 | return ad5064_remove(&i2c->dev); |
| 609 | } | 609 | } |
| @@ -625,7 +625,7 @@ static struct i2c_driver ad5064_i2c_driver = { | |||
| 625 | .owner = THIS_MODULE, | 625 | .owner = THIS_MODULE, |
| 626 | }, | 626 | }, |
| 627 | .probe = ad5064_i2c_probe, | 627 | .probe = ad5064_i2c_probe, |
| 628 | .remove = __devexit_p(ad5064_i2c_remove), | 628 | .remove = ad5064_i2c_remove, |
| 629 | .id_table = ad5064_i2c_ids, | 629 | .id_table = ad5064_i2c_ids, |
| 630 | }; | 630 | }; |
| 631 | 631 | ||
diff --git a/drivers/iio/dac/ad5360.c b/drivers/iio/dac/ad5360.c index 8fce84fe70b1..54b46fd3aede 100644 --- a/drivers/iio/dac/ad5360.c +++ b/drivers/iio/dac/ad5360.c | |||
| @@ -433,7 +433,7 @@ static const char * const ad5360_vref_name[] = { | |||
| 433 | "vref0", "vref1", "vref2" | 433 | "vref0", "vref1", "vref2" |
| 434 | }; | 434 | }; |
| 435 | 435 | ||
| 436 | static int __devinit ad5360_alloc_channels(struct iio_dev *indio_dev) | 436 | static int ad5360_alloc_channels(struct iio_dev *indio_dev) |
| 437 | { | 437 | { |
| 438 | struct ad5360_state *st = iio_priv(indio_dev); | 438 | struct ad5360_state *st = iio_priv(indio_dev); |
| 439 | struct iio_chan_spec *channels; | 439 | struct iio_chan_spec *channels; |
| @@ -456,7 +456,7 @@ static int __devinit ad5360_alloc_channels(struct iio_dev *indio_dev) | |||
| 456 | return 0; | 456 | return 0; |
| 457 | } | 457 | } |
| 458 | 458 | ||
| 459 | static int __devinit ad5360_probe(struct spi_device *spi) | 459 | static int ad5360_probe(struct spi_device *spi) |
| 460 | { | 460 | { |
| 461 | enum ad5360_type type = spi_get_device_id(spi)->driver_data; | 461 | enum ad5360_type type = spi_get_device_id(spi)->driver_data; |
| 462 | struct iio_dev *indio_dev; | 462 | struct iio_dev *indio_dev; |
| @@ -524,7 +524,7 @@ error_free: | |||
| 524 | return ret; | 524 | return ret; |
| 525 | } | 525 | } |
| 526 | 526 | ||
| 527 | static int __devexit ad5360_remove(struct spi_device *spi) | 527 | static int ad5360_remove(struct spi_device *spi) |
| 528 | { | 528 | { |
| 529 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 529 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 530 | struct ad5360_state *st = iio_priv(indio_dev); | 530 | struct ad5360_state *st = iio_priv(indio_dev); |
| @@ -560,7 +560,7 @@ static struct spi_driver ad5360_driver = { | |||
| 560 | .owner = THIS_MODULE, | 560 | .owner = THIS_MODULE, |
| 561 | }, | 561 | }, |
| 562 | .probe = ad5360_probe, | 562 | .probe = ad5360_probe, |
| 563 | .remove = __devexit_p(ad5360_remove), | 563 | .remove = ad5360_remove, |
| 564 | .id_table = ad5360_ids, | 564 | .id_table = ad5360_ids, |
| 565 | }; | 565 | }; |
| 566 | module_spi_driver(ad5360_driver); | 566 | module_spi_driver(ad5360_driver); |
diff --git a/drivers/iio/dac/ad5380.c b/drivers/iio/dac/ad5380.c index 14991ac55f26..483fc379a2da 100644 --- a/drivers/iio/dac/ad5380.c +++ b/drivers/iio/dac/ad5380.c | |||
| @@ -338,7 +338,7 @@ static const struct ad5380_chip_info ad5380_chip_info_tbl[] = { | |||
| 338 | }, | 338 | }, |
| 339 | }; | 339 | }; |
| 340 | 340 | ||
| 341 | static int __devinit ad5380_alloc_channels(struct iio_dev *indio_dev) | 341 | static int ad5380_alloc_channels(struct iio_dev *indio_dev) |
| 342 | { | 342 | { |
| 343 | struct ad5380_state *st = iio_priv(indio_dev); | 343 | struct ad5380_state *st = iio_priv(indio_dev); |
| 344 | struct iio_chan_spec *channels; | 344 | struct iio_chan_spec *channels; |
| @@ -361,8 +361,8 @@ static int __devinit ad5380_alloc_channels(struct iio_dev *indio_dev) | |||
| 361 | return 0; | 361 | return 0; |
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | static int __devinit ad5380_probe(struct device *dev, struct regmap *regmap, | 364 | static int ad5380_probe(struct device *dev, struct regmap *regmap, |
| 365 | enum ad5380_type type, const char *name) | 365 | enum ad5380_type type, const char *name) |
| 366 | { | 366 | { |
| 367 | struct iio_dev *indio_dev; | 367 | struct iio_dev *indio_dev; |
| 368 | struct ad5380_state *st; | 368 | struct ad5380_state *st; |
| @@ -406,7 +406,11 @@ static int __devinit ad5380_probe(struct device *dev, struct regmap *regmap, | |||
| 406 | goto error_free_reg; | 406 | goto error_free_reg; |
| 407 | } | 407 | } |
| 408 | 408 | ||
| 409 | st->vref = regulator_get_voltage(st->vref_reg); | 409 | ret = regulator_get_voltage(st->vref_reg); |
| 410 | if (ret < 0) | ||
| 411 | goto error_disable_reg; | ||
| 412 | |||
| 413 | st->vref = ret; | ||
| 410 | } else { | 414 | } else { |
| 411 | st->vref = st->chip_info->int_vref; | 415 | st->vref = st->chip_info->int_vref; |
| 412 | ctrl |= AD5380_CTRL_INT_VREF_EN; | 416 | ctrl |= AD5380_CTRL_INT_VREF_EN; |
| @@ -441,7 +445,7 @@ error_out: | |||
| 441 | return ret; | 445 | return ret; |
| 442 | } | 446 | } |
| 443 | 447 | ||
| 444 | static int __devexit ad5380_remove(struct device *dev) | 448 | static int ad5380_remove(struct device *dev) |
| 445 | { | 449 | { |
| 446 | struct iio_dev *indio_dev = dev_get_drvdata(dev); | 450 | struct iio_dev *indio_dev = dev_get_drvdata(dev); |
| 447 | struct ad5380_state *st = iio_priv(indio_dev); | 451 | struct ad5380_state *st = iio_priv(indio_dev); |
| @@ -478,7 +482,7 @@ static const struct regmap_config ad5380_regmap_config = { | |||
| 478 | 482 | ||
| 479 | #if IS_ENABLED(CONFIG_SPI_MASTER) | 483 | #if IS_ENABLED(CONFIG_SPI_MASTER) |
| 480 | 484 | ||
| 481 | static int __devinit ad5380_spi_probe(struct spi_device *spi) | 485 | static int ad5380_spi_probe(struct spi_device *spi) |
| 482 | { | 486 | { |
| 483 | const struct spi_device_id *id = spi_get_device_id(spi); | 487 | const struct spi_device_id *id = spi_get_device_id(spi); |
| 484 | struct regmap *regmap; | 488 | struct regmap *regmap; |
| @@ -491,7 +495,7 @@ static int __devinit ad5380_spi_probe(struct spi_device *spi) | |||
| 491 | return ad5380_probe(&spi->dev, regmap, id->driver_data, id->name); | 495 | return ad5380_probe(&spi->dev, regmap, id->driver_data, id->name); |
| 492 | } | 496 | } |
| 493 | 497 | ||
| 494 | static int __devexit ad5380_spi_remove(struct spi_device *spi) | 498 | static int ad5380_spi_remove(struct spi_device *spi) |
| 495 | { | 499 | { |
| 496 | return ad5380_remove(&spi->dev); | 500 | return ad5380_remove(&spi->dev); |
| 497 | } | 501 | } |
| @@ -523,7 +527,7 @@ static struct spi_driver ad5380_spi_driver = { | |||
| 523 | .owner = THIS_MODULE, | 527 | .owner = THIS_MODULE, |
| 524 | }, | 528 | }, |
| 525 | .probe = ad5380_spi_probe, | 529 | .probe = ad5380_spi_probe, |
| 526 | .remove = __devexit_p(ad5380_spi_remove), | 530 | .remove = ad5380_spi_remove, |
| 527 | .id_table = ad5380_spi_ids, | 531 | .id_table = ad5380_spi_ids, |
| 528 | }; | 532 | }; |
| 529 | 533 | ||
| @@ -552,8 +556,8 @@ static inline void ad5380_spi_unregister_driver(void) | |||
| 552 | 556 | ||
| 553 | #if IS_ENABLED(CONFIG_I2C) | 557 | #if IS_ENABLED(CONFIG_I2C) |
| 554 | 558 | ||
| 555 | static int __devinit ad5380_i2c_probe(struct i2c_client *i2c, | 559 | static int ad5380_i2c_probe(struct i2c_client *i2c, |
| 556 | const struct i2c_device_id *id) | 560 | const struct i2c_device_id *id) |
| 557 | { | 561 | { |
| 558 | struct regmap *regmap; | 562 | struct regmap *regmap; |
| 559 | 563 | ||
| @@ -565,7 +569,7 @@ static int __devinit ad5380_i2c_probe(struct i2c_client *i2c, | |||
| 565 | return ad5380_probe(&i2c->dev, regmap, id->driver_data, id->name); | 569 | return ad5380_probe(&i2c->dev, regmap, id->driver_data, id->name); |
| 566 | } | 570 | } |
| 567 | 571 | ||
| 568 | static int __devexit ad5380_i2c_remove(struct i2c_client *i2c) | 572 | static int ad5380_i2c_remove(struct i2c_client *i2c) |
| 569 | { | 573 | { |
| 570 | return ad5380_remove(&i2c->dev); | 574 | return ad5380_remove(&i2c->dev); |
| 571 | } | 575 | } |
| @@ -597,7 +601,7 @@ static struct i2c_driver ad5380_i2c_driver = { | |||
| 597 | .owner = THIS_MODULE, | 601 | .owner = THIS_MODULE, |
| 598 | }, | 602 | }, |
| 599 | .probe = ad5380_i2c_probe, | 603 | .probe = ad5380_i2c_probe, |
| 600 | .remove = __devexit_p(ad5380_i2c_remove), | 604 | .remove = ad5380_i2c_remove, |
| 601 | .id_table = ad5380_i2c_ids, | 605 | .id_table = ad5380_i2c_ids, |
| 602 | }; | 606 | }; |
| 603 | 607 | ||
diff --git a/drivers/iio/dac/ad5421.c b/drivers/iio/dac/ad5421.c index cdbc5bf25c31..43be948db83e 100644 --- a/drivers/iio/dac/ad5421.c +++ b/drivers/iio/dac/ad5421.c | |||
| @@ -449,7 +449,7 @@ static const struct iio_info ad5421_info = { | |||
| 449 | .driver_module = THIS_MODULE, | 449 | .driver_module = THIS_MODULE, |
| 450 | }; | 450 | }; |
| 451 | 451 | ||
| 452 | static int __devinit ad5421_probe(struct spi_device *spi) | 452 | static int ad5421_probe(struct spi_device *spi) |
| 453 | { | 453 | { |
| 454 | struct ad5421_platform_data *pdata = dev_get_platdata(&spi->dev); | 454 | struct ad5421_platform_data *pdata = dev_get_platdata(&spi->dev); |
| 455 | struct iio_dev *indio_dev; | 455 | struct iio_dev *indio_dev; |
| @@ -516,7 +516,7 @@ error_free: | |||
| 516 | return ret; | 516 | return ret; |
| 517 | } | 517 | } |
| 518 | 518 | ||
| 519 | static int __devexit ad5421_remove(struct spi_device *spi) | 519 | static int ad5421_remove(struct spi_device *spi) |
| 520 | { | 520 | { |
| 521 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 521 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 522 | 522 | ||
| @@ -534,7 +534,7 @@ static struct spi_driver ad5421_driver = { | |||
| 534 | .owner = THIS_MODULE, | 534 | .owner = THIS_MODULE, |
| 535 | }, | 535 | }, |
| 536 | .probe = ad5421_probe, | 536 | .probe = ad5421_probe, |
| 537 | .remove = __devexit_p(ad5421_remove), | 537 | .remove = ad5421_remove, |
| 538 | }; | 538 | }; |
| 539 | module_spi_driver(ad5421_driver); | 539 | module_spi_driver(ad5421_driver); |
| 540 | 540 | ||
diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c index 3310cbbd41e7..f5583aedfb59 100644 --- a/drivers/iio/dac/ad5446.c +++ b/drivers/iio/dac/ad5446.c | |||
| @@ -212,8 +212,8 @@ static const struct iio_info ad5446_info = { | |||
| 212 | .driver_module = THIS_MODULE, | 212 | .driver_module = THIS_MODULE, |
| 213 | }; | 213 | }; |
| 214 | 214 | ||
| 215 | static int __devinit ad5446_probe(struct device *dev, const char *name, | 215 | static int ad5446_probe(struct device *dev, const char *name, |
| 216 | const struct ad5446_chip_info *chip_info) | 216 | const struct ad5446_chip_info *chip_info) |
| 217 | { | 217 | { |
| 218 | struct ad5446_state *st; | 218 | struct ad5446_state *st; |
| 219 | struct iio_dev *indio_dev; | 219 | struct iio_dev *indio_dev; |
| @@ -226,7 +226,11 @@ static int __devinit ad5446_probe(struct device *dev, const char *name, | |||
| 226 | if (ret) | 226 | if (ret) |
| 227 | goto error_put_reg; | 227 | goto error_put_reg; |
| 228 | 228 | ||
| 229 | voltage_uv = regulator_get_voltage(reg); | 229 | ret = regulator_get_voltage(reg); |
| 230 | if (ret < 0) | ||
| 231 | goto error_disable_reg; | ||
| 232 | |||
| 233 | voltage_uv = ret; | ||
| 230 | } | 234 | } |
| 231 | 235 | ||
| 232 | indio_dev = iio_device_alloc(sizeof(*st)); | 236 | indio_dev = iio_device_alloc(sizeof(*st)); |
| @@ -461,7 +465,7 @@ static const struct spi_device_id ad5446_spi_ids[] = { | |||
| 461 | }; | 465 | }; |
| 462 | MODULE_DEVICE_TABLE(spi, ad5446_spi_ids); | 466 | MODULE_DEVICE_TABLE(spi, ad5446_spi_ids); |
| 463 | 467 | ||
| 464 | static int __devinit ad5446_spi_probe(struct spi_device *spi) | 468 | static int ad5446_spi_probe(struct spi_device *spi) |
| 465 | { | 469 | { |
| 466 | const struct spi_device_id *id = spi_get_device_id(spi); | 470 | const struct spi_device_id *id = spi_get_device_id(spi); |
| 467 | 471 | ||
| @@ -469,7 +473,7 @@ static int __devinit ad5446_spi_probe(struct spi_device *spi) | |||
| 469 | &ad5446_spi_chip_info[id->driver_data]); | 473 | &ad5446_spi_chip_info[id->driver_data]); |
| 470 | } | 474 | } |
| 471 | 475 | ||
| 472 | static int __devexit ad5446_spi_remove(struct spi_device *spi) | 476 | static int ad5446_spi_remove(struct spi_device *spi) |
| 473 | { | 477 | { |
| 474 | return ad5446_remove(&spi->dev); | 478 | return ad5446_remove(&spi->dev); |
| 475 | } | 479 | } |
| @@ -480,7 +484,7 @@ static struct spi_driver ad5446_spi_driver = { | |||
| 480 | .owner = THIS_MODULE, | 484 | .owner = THIS_MODULE, |
| 481 | }, | 485 | }, |
| 482 | .probe = ad5446_spi_probe, | 486 | .probe = ad5446_spi_probe, |
| 483 | .remove = __devexit_p(ad5446_spi_remove), | 487 | .remove = ad5446_spi_remove, |
| 484 | .id_table = ad5446_spi_ids, | 488 | .id_table = ad5446_spi_ids, |
| 485 | }; | 489 | }; |
| 486 | 490 | ||
| @@ -539,14 +543,14 @@ static const struct ad5446_chip_info ad5446_i2c_chip_info[] = { | |||
| 539 | }, | 543 | }, |
| 540 | }; | 544 | }; |
| 541 | 545 | ||
| 542 | static int __devinit ad5446_i2c_probe(struct i2c_client *i2c, | 546 | static int ad5446_i2c_probe(struct i2c_client *i2c, |
| 543 | const struct i2c_device_id *id) | 547 | const struct i2c_device_id *id) |
| 544 | { | 548 | { |
| 545 | return ad5446_probe(&i2c->dev, id->name, | 549 | return ad5446_probe(&i2c->dev, id->name, |
| 546 | &ad5446_i2c_chip_info[id->driver_data]); | 550 | &ad5446_i2c_chip_info[id->driver_data]); |
| 547 | } | 551 | } |
| 548 | 552 | ||
| 549 | static int __devexit ad5446_i2c_remove(struct i2c_client *i2c) | 553 | static int ad5446_i2c_remove(struct i2c_client *i2c) |
| 550 | { | 554 | { |
| 551 | return ad5446_remove(&i2c->dev); | 555 | return ad5446_remove(&i2c->dev); |
| 552 | } | 556 | } |
| @@ -568,7 +572,7 @@ static struct i2c_driver ad5446_i2c_driver = { | |||
| 568 | .owner = THIS_MODULE, | 572 | .owner = THIS_MODULE, |
| 569 | }, | 573 | }, |
| 570 | .probe = ad5446_i2c_probe, | 574 | .probe = ad5446_i2c_probe, |
| 571 | .remove = __devexit_p(ad5446_i2c_remove), | 575 | .remove = ad5446_i2c_remove, |
| 572 | .id_table = ad5446_i2c_ids, | 576 | .id_table = ad5446_i2c_ids, |
| 573 | }; | 577 | }; |
| 574 | 578 | ||
diff --git a/drivers/iio/dac/ad5449.c b/drivers/iio/dac/ad5449.c index 0ee6f8eeba8d..c4731b7b577b 100644 --- a/drivers/iio/dac/ad5449.c +++ b/drivers/iio/dac/ad5449.c | |||
| @@ -266,7 +266,7 @@ static const char *ad5449_vref_name(struct ad5449 *st, int n) | |||
| 266 | return "VREFB"; | 266 | return "VREFB"; |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | static int __devinit ad5449_spi_probe(struct spi_device *spi) | 269 | static int ad5449_spi_probe(struct spi_device *spi) |
| 270 | { | 270 | { |
| 271 | struct ad5449_platform_data *pdata = spi->dev.platform_data; | 271 | struct ad5449_platform_data *pdata = spi->dev.platform_data; |
| 272 | const struct spi_device_id *id = spi_get_device_id(spi); | 272 | const struct spi_device_id *id = spi_get_device_id(spi); |
| @@ -333,7 +333,7 @@ error_free: | |||
| 333 | return ret; | 333 | return ret; |
| 334 | } | 334 | } |
| 335 | 335 | ||
| 336 | static int __devexit ad5449_spi_remove(struct spi_device *spi) | 336 | static int ad5449_spi_remove(struct spi_device *spi) |
| 337 | { | 337 | { |
| 338 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 338 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 339 | struct ad5449 *st = iio_priv(indio_dev); | 339 | struct ad5449 *st = iio_priv(indio_dev); |
| @@ -366,7 +366,7 @@ static struct spi_driver ad5449_spi_driver = { | |||
| 366 | .owner = THIS_MODULE, | 366 | .owner = THIS_MODULE, |
| 367 | }, | 367 | }, |
| 368 | .probe = ad5449_spi_probe, | 368 | .probe = ad5449_spi_probe, |
| 369 | .remove = __devexit_p(ad5449_spi_remove), | 369 | .remove = ad5449_spi_remove, |
| 370 | .id_table = ad5449_spi_ids, | 370 | .id_table = ad5449_spi_ids, |
| 371 | }; | 371 | }; |
| 372 | module_spi_driver(ad5449_spi_driver); | 372 | module_spi_driver(ad5449_spi_driver); |
diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac/ad5504.c index 242bdc7d0044..0661829f2773 100644 --- a/drivers/iio/dac/ad5504.c +++ b/drivers/iio/dac/ad5504.c | |||
| @@ -277,7 +277,7 @@ static const struct iio_chan_spec ad5504_channels[] = { | |||
| 277 | AD5504_CHANNEL(3), | 277 | AD5504_CHANNEL(3), |
| 278 | }; | 278 | }; |
| 279 | 279 | ||
| 280 | static int __devinit ad5504_probe(struct spi_device *spi) | 280 | static int ad5504_probe(struct spi_device *spi) |
| 281 | { | 281 | { |
| 282 | struct ad5504_platform_data *pdata = spi->dev.platform_data; | 282 | struct ad5504_platform_data *pdata = spi->dev.platform_data; |
| 283 | struct iio_dev *indio_dev; | 283 | struct iio_dev *indio_dev; |
| @@ -296,7 +296,11 @@ static int __devinit ad5504_probe(struct spi_device *spi) | |||
| 296 | if (ret) | 296 | if (ret) |
| 297 | goto error_put_reg; | 297 | goto error_put_reg; |
| 298 | 298 | ||
| 299 | voltage_uv = regulator_get_voltage(reg); | 299 | ret = regulator_get_voltage(reg); |
| 300 | if (ret < 0) | ||
| 301 | goto error_disable_reg; | ||
| 302 | |||
| 303 | voltage_uv = ret; | ||
| 300 | } | 304 | } |
| 301 | 305 | ||
| 302 | spi_set_drvdata(spi, indio_dev); | 306 | spi_set_drvdata(spi, indio_dev); |
| @@ -352,7 +356,7 @@ error_ret: | |||
| 352 | return ret; | 356 | return ret; |
| 353 | } | 357 | } |
| 354 | 358 | ||
| 355 | static int __devexit ad5504_remove(struct spi_device *spi) | 359 | static int ad5504_remove(struct spi_device *spi) |
| 356 | { | 360 | { |
| 357 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 361 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 358 | struct ad5504_state *st = iio_priv(indio_dev); | 362 | struct ad5504_state *st = iio_priv(indio_dev); |
| @@ -383,7 +387,7 @@ static struct spi_driver ad5504_driver = { | |||
| 383 | .owner = THIS_MODULE, | 387 | .owner = THIS_MODULE, |
| 384 | }, | 388 | }, |
| 385 | .probe = ad5504_probe, | 389 | .probe = ad5504_probe, |
| 386 | .remove = __devexit_p(ad5504_remove), | 390 | .remove = ad5504_remove, |
| 387 | .id_table = ad5504_id, | 391 | .id_table = ad5504_id, |
| 388 | }; | 392 | }; |
| 389 | module_spi_driver(ad5504_driver); | 393 | module_spi_driver(ad5504_driver); |
diff --git a/drivers/iio/dac/ad5624r_spi.c b/drivers/iio/dac/ad5624r_spi.c index 6a7d6a48cc6d..f6e116627b71 100644 --- a/drivers/iio/dac/ad5624r_spi.c +++ b/drivers/iio/dac/ad5624r_spi.c | |||
| @@ -220,7 +220,7 @@ static const struct ad5624r_chip_info ad5624r_chip_info_tbl[] = { | |||
| 220 | }, | 220 | }, |
| 221 | }; | 221 | }; |
| 222 | 222 | ||
| 223 | static int __devinit ad5624r_probe(struct spi_device *spi) | 223 | static int ad5624r_probe(struct spi_device *spi) |
| 224 | { | 224 | { |
| 225 | struct ad5624r_state *st; | 225 | struct ad5624r_state *st; |
| 226 | struct iio_dev *indio_dev; | 226 | struct iio_dev *indio_dev; |
| @@ -238,7 +238,11 @@ static int __devinit ad5624r_probe(struct spi_device *spi) | |||
| 238 | if (ret) | 238 | if (ret) |
| 239 | goto error_put_reg; | 239 | goto error_put_reg; |
| 240 | 240 | ||
| 241 | voltage_uv = regulator_get_voltage(st->reg); | 241 | ret = regulator_get_voltage(st->reg); |
| 242 | if (ret < 0) | ||
| 243 | goto error_disable_reg; | ||
| 244 | |||
| 245 | voltage_uv = ret; | ||
| 242 | } | 246 | } |
| 243 | 247 | ||
| 244 | spi_set_drvdata(spi, indio_dev); | 248 | spi_set_drvdata(spi, indio_dev); |
| @@ -282,7 +286,7 @@ error_ret: | |||
| 282 | return ret; | 286 | return ret; |
| 283 | } | 287 | } |
| 284 | 288 | ||
| 285 | static int __devexit ad5624r_remove(struct spi_device *spi) | 289 | static int ad5624r_remove(struct spi_device *spi) |
| 286 | { | 290 | { |
| 287 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 291 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 288 | struct ad5624r_state *st = iio_priv(indio_dev); | 292 | struct ad5624r_state *st = iio_priv(indio_dev); |
| @@ -314,7 +318,7 @@ static struct spi_driver ad5624r_driver = { | |||
| 314 | .owner = THIS_MODULE, | 318 | .owner = THIS_MODULE, |
| 315 | }, | 319 | }, |
| 316 | .probe = ad5624r_probe, | 320 | .probe = ad5624r_probe, |
| 317 | .remove = __devexit_p(ad5624r_remove), | 321 | .remove = ad5624r_remove, |
| 318 | .id_table = ad5624r_id, | 322 | .id_table = ad5624r_id, |
| 319 | }; | 323 | }; |
| 320 | module_spi_driver(ad5624r_driver); | 324 | module_spi_driver(ad5624r_driver); |
diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c index bc92ff9309c2..ca9609d7a15c 100644 --- a/drivers/iio/dac/ad5686.c +++ b/drivers/iio/dac/ad5686.c | |||
| @@ -313,7 +313,7 @@ static const struct ad5686_chip_info ad5686_chip_info_tbl[] = { | |||
| 313 | }; | 313 | }; |
| 314 | 314 | ||
| 315 | 315 | ||
| 316 | static int __devinit ad5686_probe(struct spi_device *spi) | 316 | static int ad5686_probe(struct spi_device *spi) |
| 317 | { | 317 | { |
| 318 | struct ad5686_state *st; | 318 | struct ad5686_state *st; |
| 319 | struct iio_dev *indio_dev; | 319 | struct iio_dev *indio_dev; |
| @@ -332,7 +332,11 @@ static int __devinit ad5686_probe(struct spi_device *spi) | |||
| 332 | if (ret) | 332 | if (ret) |
| 333 | goto error_put_reg; | 333 | goto error_put_reg; |
| 334 | 334 | ||
| 335 | voltage_uv = regulator_get_voltage(st->reg); | 335 | ret = regulator_get_voltage(st->reg); |
| 336 | if (ret < 0) | ||
| 337 | goto error_disable_reg; | ||
| 338 | |||
| 339 | voltage_uv = ret; | ||
| 336 | } | 340 | } |
| 337 | 341 | ||
| 338 | st->chip_info = | 342 | st->chip_info = |
| @@ -379,7 +383,7 @@ error_put_reg: | |||
| 379 | return ret; | 383 | return ret; |
| 380 | } | 384 | } |
| 381 | 385 | ||
| 382 | static int __devexit ad5686_remove(struct spi_device *spi) | 386 | static int ad5686_remove(struct spi_device *spi) |
| 383 | { | 387 | { |
| 384 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 388 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 385 | struct ad5686_state *st = iio_priv(indio_dev); | 389 | struct ad5686_state *st = iio_priv(indio_dev); |
| @@ -408,7 +412,7 @@ static struct spi_driver ad5686_driver = { | |||
| 408 | .owner = THIS_MODULE, | 412 | .owner = THIS_MODULE, |
| 409 | }, | 413 | }, |
| 410 | .probe = ad5686_probe, | 414 | .probe = ad5686_probe, |
| 411 | .remove = __devexit_p(ad5686_remove), | 415 | .remove = ad5686_remove, |
| 412 | .id_table = ad5686_id, | 416 | .id_table = ad5686_id, |
| 413 | }; | 417 | }; |
| 414 | module_spi_driver(ad5686_driver); | 418 | module_spi_driver(ad5686_driver); |
diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c index 5db3506034c5..0869bbd27d30 100644 --- a/drivers/iio/dac/ad5755.c +++ b/drivers/iio/dac/ad5755.c | |||
| @@ -447,8 +447,8 @@ static bool ad5755_is_valid_mode(struct ad5755_state *st, enum ad5755_mode mode) | |||
| 447 | } | 447 | } |
| 448 | } | 448 | } |
| 449 | 449 | ||
| 450 | static int __devinit ad5755_setup_pdata(struct iio_dev *indio_dev, | 450 | static int ad5755_setup_pdata(struct iio_dev *indio_dev, |
| 451 | const struct ad5755_platform_data *pdata) | 451 | const struct ad5755_platform_data *pdata) |
| 452 | { | 452 | { |
| 453 | struct ad5755_state *st = iio_priv(indio_dev); | 453 | struct ad5755_state *st = iio_priv(indio_dev); |
| 454 | unsigned int val; | 454 | unsigned int val; |
| @@ -503,7 +503,7 @@ static int __devinit ad5755_setup_pdata(struct iio_dev *indio_dev, | |||
| 503 | return 0; | 503 | return 0; |
| 504 | } | 504 | } |
| 505 | 505 | ||
| 506 | static bool __devinit ad5755_is_voltage_mode(enum ad5755_mode mode) | 506 | static bool ad5755_is_voltage_mode(enum ad5755_mode mode) |
| 507 | { | 507 | { |
| 508 | switch (mode) { | 508 | switch (mode) { |
| 509 | case AD5755_MODE_VOLTAGE_0V_5V: | 509 | case AD5755_MODE_VOLTAGE_0V_5V: |
| @@ -516,8 +516,8 @@ static bool __devinit ad5755_is_voltage_mode(enum ad5755_mode mode) | |||
| 516 | } | 516 | } |
| 517 | } | 517 | } |
| 518 | 518 | ||
| 519 | static int __devinit ad5755_init_channels(struct iio_dev *indio_dev, | 519 | static int ad5755_init_channels(struct iio_dev *indio_dev, |
| 520 | const struct ad5755_platform_data *pdata) | 520 | const struct ad5755_platform_data *pdata) |
| 521 | { | 521 | { |
| 522 | struct ad5755_state *st = iio_priv(indio_dev); | 522 | struct ad5755_state *st = iio_priv(indio_dev); |
| 523 | struct iio_chan_spec *channels = st->channels; | 523 | struct iio_chan_spec *channels = st->channels; |
| @@ -562,7 +562,7 @@ static const struct ad5755_platform_data ad5755_default_pdata = { | |||
| 562 | }, | 562 | }, |
| 563 | }; | 563 | }; |
| 564 | 564 | ||
| 565 | static int __devinit ad5755_probe(struct spi_device *spi) | 565 | static int ad5755_probe(struct spi_device *spi) |
| 566 | { | 566 | { |
| 567 | enum ad5755_type type = spi_get_device_id(spi)->driver_data; | 567 | enum ad5755_type type = spi_get_device_id(spi)->driver_data; |
| 568 | const struct ad5755_platform_data *pdata = dev_get_platdata(&spi->dev); | 568 | const struct ad5755_platform_data *pdata = dev_get_platdata(&spi->dev); |
| @@ -614,7 +614,7 @@ error_free: | |||
| 614 | return ret; | 614 | return ret; |
| 615 | } | 615 | } |
| 616 | 616 | ||
| 617 | static int __devexit ad5755_remove(struct spi_device *spi) | 617 | static int ad5755_remove(struct spi_device *spi) |
| 618 | { | 618 | { |
| 619 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 619 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 620 | 620 | ||
| @@ -640,7 +640,7 @@ static struct spi_driver ad5755_driver = { | |||
| 640 | .owner = THIS_MODULE, | 640 | .owner = THIS_MODULE, |
| 641 | }, | 641 | }, |
| 642 | .probe = ad5755_probe, | 642 | .probe = ad5755_probe, |
| 643 | .remove = __devexit_p(ad5755_remove), | 643 | .remove = ad5755_remove, |
| 644 | .id_table = ad5755_id, | 644 | .id_table = ad5755_id, |
| 645 | }; | 645 | }; |
| 646 | module_spi_driver(ad5755_driver); | 646 | module_spi_driver(ad5755_driver); |
diff --git a/drivers/iio/dac/ad5764.c b/drivers/iio/dac/ad5764.c index ffce30447445..7f9045e6daa4 100644 --- a/drivers/iio/dac/ad5764.c +++ b/drivers/iio/dac/ad5764.c | |||
| @@ -273,7 +273,7 @@ static const struct iio_info ad5764_info = { | |||
| 273 | .driver_module = THIS_MODULE, | 273 | .driver_module = THIS_MODULE, |
| 274 | }; | 274 | }; |
| 275 | 275 | ||
| 276 | static int __devinit ad5764_probe(struct spi_device *spi) | 276 | static int ad5764_probe(struct spi_device *spi) |
| 277 | { | 277 | { |
| 278 | enum ad5764_type type = spi_get_device_id(spi)->driver_data; | 278 | enum ad5764_type type = spi_get_device_id(spi)->driver_data; |
| 279 | struct iio_dev *indio_dev; | 279 | struct iio_dev *indio_dev; |
| @@ -340,7 +340,7 @@ error_free: | |||
| 340 | return ret; | 340 | return ret; |
| 341 | } | 341 | } |
| 342 | 342 | ||
| 343 | static int __devexit ad5764_remove(struct spi_device *spi) | 343 | static int ad5764_remove(struct spi_device *spi) |
| 344 | { | 344 | { |
| 345 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 345 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 346 | struct ad5764_state *st = iio_priv(indio_dev); | 346 | struct ad5764_state *st = iio_priv(indio_dev); |
| @@ -372,7 +372,7 @@ static struct spi_driver ad5764_driver = { | |||
| 372 | .owner = THIS_MODULE, | 372 | .owner = THIS_MODULE, |
| 373 | }, | 373 | }, |
| 374 | .probe = ad5764_probe, | 374 | .probe = ad5764_probe, |
| 375 | .remove = __devexit_p(ad5764_remove), | 375 | .remove = ad5764_remove, |
| 376 | .id_table = ad5764_ids, | 376 | .id_table = ad5764_ids, |
| 377 | }; | 377 | }; |
| 378 | module_spi_driver(ad5764_driver); | 378 | module_spi_driver(ad5764_driver); |
diff --git a/drivers/iio/dac/ad5791.c b/drivers/iio/dac/ad5791.c index 2bd2e37280ff..6407b5407ddd 100644 --- a/drivers/iio/dac/ad5791.c +++ b/drivers/iio/dac/ad5791.c | |||
| @@ -346,7 +346,7 @@ static const struct iio_info ad5791_info = { | |||
| 346 | .driver_module = THIS_MODULE, | 346 | .driver_module = THIS_MODULE, |
| 347 | }; | 347 | }; |
| 348 | 348 | ||
| 349 | static int __devinit ad5791_probe(struct spi_device *spi) | 349 | static int ad5791_probe(struct spi_device *spi) |
| 350 | { | 350 | { |
| 351 | struct ad5791_platform_data *pdata = spi->dev.platform_data; | 351 | struct ad5791_platform_data *pdata = spi->dev.platform_data; |
| 352 | struct iio_dev *indio_dev; | 352 | struct iio_dev *indio_dev; |
| @@ -365,7 +365,11 @@ static int __devinit ad5791_probe(struct spi_device *spi) | |||
| 365 | if (ret) | 365 | if (ret) |
| 366 | goto error_put_reg_pos; | 366 | goto error_put_reg_pos; |
| 367 | 367 | ||
| 368 | pos_voltage_uv = regulator_get_voltage(st->reg_vdd); | 368 | ret = regulator_get_voltage(st->reg_vdd); |
| 369 | if (ret < 0) | ||
| 370 | goto error_disable_reg_pos; | ||
| 371 | |||
| 372 | pos_voltage_uv = ret; | ||
| 369 | } | 373 | } |
| 370 | 374 | ||
| 371 | st->reg_vss = regulator_get(&spi->dev, "vss"); | 375 | st->reg_vss = regulator_get(&spi->dev, "vss"); |
| @@ -374,7 +378,11 @@ static int __devinit ad5791_probe(struct spi_device *spi) | |||
| 374 | if (ret) | 378 | if (ret) |
| 375 | goto error_put_reg_neg; | 379 | goto error_put_reg_neg; |
| 376 | 380 | ||
| 377 | neg_voltage_uv = regulator_get_voltage(st->reg_vss); | 381 | ret = regulator_get_voltage(st->reg_vss); |
| 382 | if (ret < 0) | ||
| 383 | goto error_disable_reg_neg; | ||
| 384 | |||
| 385 | neg_voltage_uv = ret; | ||
| 378 | } | 386 | } |
| 379 | 387 | ||
| 380 | st->pwr_down = true; | 388 | st->pwr_down = true; |
| @@ -428,6 +436,7 @@ error_put_reg_neg: | |||
| 428 | if (!IS_ERR(st->reg_vss)) | 436 | if (!IS_ERR(st->reg_vss)) |
| 429 | regulator_put(st->reg_vss); | 437 | regulator_put(st->reg_vss); |
| 430 | 438 | ||
| 439 | error_disable_reg_pos: | ||
| 431 | if (!IS_ERR(st->reg_vdd)) | 440 | if (!IS_ERR(st->reg_vdd)) |
| 432 | regulator_disable(st->reg_vdd); | 441 | regulator_disable(st->reg_vdd); |
| 433 | error_put_reg_pos: | 442 | error_put_reg_pos: |
| @@ -439,7 +448,7 @@ error_ret: | |||
| 439 | return ret; | 448 | return ret; |
| 440 | } | 449 | } |
| 441 | 450 | ||
| 442 | static int __devexit ad5791_remove(struct spi_device *spi) | 451 | static int ad5791_remove(struct spi_device *spi) |
| 443 | { | 452 | { |
| 444 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 453 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 445 | struct ad5791_state *st = iio_priv(indio_dev); | 454 | struct ad5791_state *st = iio_priv(indio_dev); |
| @@ -475,7 +484,7 @@ static struct spi_driver ad5791_driver = { | |||
| 475 | .owner = THIS_MODULE, | 484 | .owner = THIS_MODULE, |
| 476 | }, | 485 | }, |
| 477 | .probe = ad5791_probe, | 486 | .probe = ad5791_probe, |
| 478 | .remove = __devexit_p(ad5791_remove), | 487 | .remove = ad5791_remove, |
| 479 | .id_table = ad5791_id, | 488 | .id_table = ad5791_id, |
| 480 | }; | 489 | }; |
| 481 | module_spi_driver(ad5791_driver); | 490 | module_spi_driver(ad5791_driver); |
diff --git a/drivers/iio/dac/max517.c b/drivers/iio/dac/max517.c index c3d748c25939..352abe2004a4 100644 --- a/drivers/iio/dac/max517.c +++ b/drivers/iio/dac/max517.c | |||
| @@ -156,7 +156,7 @@ static const struct iio_chan_spec max517_channels[] = { | |||
| 156 | MAX517_CHANNEL(1) | 156 | MAX517_CHANNEL(1) |
| 157 | }; | 157 | }; |
| 158 | 158 | ||
| 159 | static int __devinit max517_probe(struct i2c_client *client, | 159 | static int max517_probe(struct i2c_client *client, |
| 160 | const struct i2c_device_id *id) | 160 | const struct i2c_device_id *id) |
| 161 | { | 161 | { |
| 162 | struct max517_data *data; | 162 | struct max517_data *data; |
| @@ -210,7 +210,7 @@ exit: | |||
| 210 | return err; | 210 | return err; |
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | static int __devexit max517_remove(struct i2c_client *client) | 213 | static int max517_remove(struct i2c_client *client) |
| 214 | { | 214 | { |
| 215 | iio_device_unregister(i2c_get_clientdata(client)); | 215 | iio_device_unregister(i2c_get_clientdata(client)); |
| 216 | iio_device_free(i2c_get_clientdata(client)); | 216 | iio_device_free(i2c_get_clientdata(client)); |
| @@ -232,7 +232,7 @@ static struct i2c_driver max517_driver = { | |||
| 232 | .pm = MAX517_PM_OPS, | 232 | .pm = MAX517_PM_OPS, |
| 233 | }, | 233 | }, |
| 234 | .probe = max517_probe, | 234 | .probe = max517_probe, |
| 235 | .remove = __devexit_p(max517_remove), | 235 | .remove = max517_remove, |
| 236 | .id_table = max517_id, | 236 | .id_table = max517_id, |
| 237 | }; | 237 | }; |
| 238 | module_i2c_driver(max517_driver); | 238 | module_i2c_driver(max517_driver); |
diff --git a/drivers/iio/dac/mcp4725.c b/drivers/iio/dac/mcp4725.c index e0e168bd5b45..8f88cc4059a2 100644 --- a/drivers/iio/dac/mcp4725.c +++ b/drivers/iio/dac/mcp4725.c | |||
| @@ -141,8 +141,8 @@ static const struct iio_info mcp4725_info = { | |||
| 141 | .driver_module = THIS_MODULE, | 141 | .driver_module = THIS_MODULE, |
| 142 | }; | 142 | }; |
| 143 | 143 | ||
| 144 | static int __devinit mcp4725_probe(struct i2c_client *client, | 144 | static int mcp4725_probe(struct i2c_client *client, |
| 145 | const struct i2c_device_id *id) | 145 | const struct i2c_device_id *id) |
| 146 | { | 146 | { |
| 147 | struct mcp4725_data *data; | 147 | struct mcp4725_data *data; |
| 148 | struct iio_dev *indio_dev; | 148 | struct iio_dev *indio_dev; |
| @@ -195,7 +195,7 @@ exit: | |||
| 195 | return err; | 195 | return err; |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | static int __devexit mcp4725_remove(struct i2c_client *client) | 198 | static int mcp4725_remove(struct i2c_client *client) |
| 199 | { | 199 | { |
| 200 | struct iio_dev *indio_dev = i2c_get_clientdata(client); | 200 | struct iio_dev *indio_dev = i2c_get_clientdata(client); |
| 201 | 201 | ||
| @@ -217,7 +217,7 @@ static struct i2c_driver mcp4725_driver = { | |||
| 217 | .pm = MCP4725_PM_OPS, | 217 | .pm = MCP4725_PM_OPS, |
| 218 | }, | 218 | }, |
| 219 | .probe = mcp4725_probe, | 219 | .probe = mcp4725_probe, |
| 220 | .remove = __devexit_p(mcp4725_remove), | 220 | .remove = mcp4725_remove, |
| 221 | .id_table = mcp4725_id, | 221 | .id_table = mcp4725_id, |
| 222 | }; | 222 | }; |
| 223 | module_i2c_driver(mcp4725_driver); | 223 | module_i2c_driver(mcp4725_driver); |
diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c index b737c64a402d..80307473e3a9 100644 --- a/drivers/iio/frequency/ad9523.c +++ b/drivers/iio/frequency/ad9523.c | |||
| @@ -959,7 +959,7 @@ static int ad9523_setup(struct iio_dev *indio_dev) | |||
| 959 | return 0; | 959 | return 0; |
| 960 | } | 960 | } |
| 961 | 961 | ||
| 962 | static int __devinit ad9523_probe(struct spi_device *spi) | 962 | static int ad9523_probe(struct spi_device *spi) |
| 963 | { | 963 | { |
| 964 | struct ad9523_platform_data *pdata = spi->dev.platform_data; | 964 | struct ad9523_platform_data *pdata = spi->dev.platform_data; |
| 965 | struct iio_dev *indio_dev; | 965 | struct iio_dev *indio_dev; |
| @@ -1020,7 +1020,7 @@ error_put_reg: | |||
| 1020 | return ret; | 1020 | return ret; |
| 1021 | } | 1021 | } |
| 1022 | 1022 | ||
| 1023 | static int __devexit ad9523_remove(struct spi_device *spi) | 1023 | static int ad9523_remove(struct spi_device *spi) |
| 1024 | { | 1024 | { |
| 1025 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 1025 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 1026 | struct ad9523_state *st = iio_priv(indio_dev); | 1026 | struct ad9523_state *st = iio_priv(indio_dev); |
| @@ -1049,7 +1049,7 @@ static struct spi_driver ad9523_driver = { | |||
| 1049 | .owner = THIS_MODULE, | 1049 | .owner = THIS_MODULE, |
| 1050 | }, | 1050 | }, |
| 1051 | .probe = ad9523_probe, | 1051 | .probe = ad9523_probe, |
| 1052 | .remove = __devexit_p(ad9523_remove), | 1052 | .remove = ad9523_remove, |
| 1053 | .id_table = ad9523_id, | 1053 | .id_table = ad9523_id, |
| 1054 | }; | 1054 | }; |
| 1055 | module_spi_driver(ad9523_driver); | 1055 | module_spi_driver(ad9523_driver); |
diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c index e35bb8f6fe75..a884252ac66b 100644 --- a/drivers/iio/frequency/adf4350.c +++ b/drivers/iio/frequency/adf4350.c | |||
| @@ -173,7 +173,7 @@ static int adf4350_set_freq(struct adf4350_state *st, unsigned long long freq) | |||
| 173 | } while ((st->r1_mod > ADF4350_MAX_MODULUS) && r_cnt); | 173 | } while ((st->r1_mod > ADF4350_MAX_MODULUS) && r_cnt); |
| 174 | } while (r_cnt == 0); | 174 | } while (r_cnt == 0); |
| 175 | 175 | ||
| 176 | tmp = freq * (u64)st->r1_mod + (st->fpfd > 1); | 176 | tmp = freq * (u64)st->r1_mod + (st->fpfd >> 1); |
| 177 | do_div(tmp, st->fpfd); /* Div round closest (n + d/2)/d */ | 177 | do_div(tmp, st->fpfd); /* Div round closest (n + d/2)/d */ |
| 178 | st->r0_fract = do_div(tmp, st->r1_mod); | 178 | st->r0_fract = do_div(tmp, st->r1_mod); |
| 179 | st->r0_int = tmp; | 179 | st->r0_int = tmp; |
| @@ -355,7 +355,7 @@ static const struct iio_info adf4350_info = { | |||
| 355 | .driver_module = THIS_MODULE, | 355 | .driver_module = THIS_MODULE, |
| 356 | }; | 356 | }; |
| 357 | 357 | ||
| 358 | static int __devinit adf4350_probe(struct spi_device *spi) | 358 | static int adf4350_probe(struct spi_device *spi) |
| 359 | { | 359 | { |
| 360 | struct adf4350_platform_data *pdata = spi->dev.platform_data; | 360 | struct adf4350_platform_data *pdata = spi->dev.platform_data; |
| 361 | struct iio_dev *indio_dev; | 361 | struct iio_dev *indio_dev; |
| @@ -440,7 +440,7 @@ error_put_reg: | |||
| 440 | return ret; | 440 | return ret; |
| 441 | } | 441 | } |
| 442 | 442 | ||
| 443 | static int __devexit adf4350_remove(struct spi_device *spi) | 443 | static int adf4350_remove(struct spi_device *spi) |
| 444 | { | 444 | { |
| 445 | struct iio_dev *indio_dev = spi_get_drvdata(spi); | 445 | struct iio_dev *indio_dev = spi_get_drvdata(spi); |
| 446 | struct adf4350_state *st = iio_priv(indio_dev); | 446 | struct adf4350_state *st = iio_priv(indio_dev); |
| @@ -476,7 +476,7 @@ static struct spi_driver adf4350_driver = { | |||
| 476 | .owner = THIS_MODULE, | 476 | .owner = THIS_MODULE, |
| 477 | }, | 477 | }, |
| 478 | .probe = adf4350_probe, | 478 | .probe = adf4350_probe, |
| 479 | .remove = __devexit_p(adf4350_remove), | 479 | .remove = adf4350_remove, |
| 480 | .id_table = adf4350_id, | 480 | .id_table = adf4350_id, |
| 481 | }; | 481 | }; |
| 482 | module_spi_driver(adf4350_driver); | 482 | module_spi_driver(adf4350_driver); |
diff --git a/drivers/iio/gyro/Kconfig b/drivers/iio/gyro/Kconfig index 48ed1483ff27..96b68f63a902 100644 --- a/drivers/iio/gyro/Kconfig +++ b/drivers/iio/gyro/Kconfig | |||
| @@ -17,6 +17,7 @@ config HID_SENSOR_GYRO_3D | |||
| 17 | select IIO_BUFFER | 17 | select IIO_BUFFER |
| 18 | select IIO_TRIGGERED_BUFFER | 18 | select IIO_TRIGGERED_BUFFER |
| 19 | select HID_SENSOR_IIO_COMMON | 19 | select HID_SENSOR_IIO_COMMON |
| 20 | select HID_SENSOR_IIO_TRIGGER | ||
| 20 | tristate "HID Gyroscope 3D" | 21 | tristate "HID Gyroscope 3D" |
| 21 | help | 22 | help |
| 22 | Say yes here to build support for the HID SENSOR | 23 | Say yes here to build support for the HID SENSOR |
diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c index 4c8b158e40e1..06e7cc35450c 100644 --- a/drivers/iio/gyro/hid-sensor-gyro-3d.c +++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c | |||
| @@ -278,7 +278,7 @@ static int gyro_3d_parse_report(struct platform_device *pdev, | |||
| 278 | } | 278 | } |
| 279 | 279 | ||
| 280 | /* Function to initialize the processing for usage id */ | 280 | /* Function to initialize the processing for usage id */ |
| 281 | static int __devinit hid_gyro_3d_probe(struct platform_device *pdev) | 281 | static int hid_gyro_3d_probe(struct platform_device *pdev) |
| 282 | { | 282 | { |
| 283 | int ret = 0; | 283 | int ret = 0; |
| 284 | static const char *name = "gyro_3d"; | 284 | static const char *name = "gyro_3d"; |
| @@ -375,7 +375,7 @@ error_ret: | |||
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | /* Function to deinitialize the processing for usage id */ | 377 | /* Function to deinitialize the processing for usage id */ |
| 378 | static int __devinit hid_gyro_3d_remove(struct platform_device *pdev) | 378 | static int hid_gyro_3d_remove(struct platform_device *pdev) |
| 379 | { | 379 | { |
| 380 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; | 380 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; |
| 381 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); | 381 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); |
diff --git a/drivers/iio/light/Kconfig b/drivers/iio/light/Kconfig index 1763c9bcb98a..dbf80abc834f 100644 --- a/drivers/iio/light/Kconfig +++ b/drivers/iio/light/Kconfig | |||
| @@ -47,6 +47,7 @@ config HID_SENSOR_ALS | |||
| 47 | select IIO_BUFFER | 47 | select IIO_BUFFER |
| 48 | select IIO_TRIGGERED_BUFFER | 48 | select IIO_TRIGGERED_BUFFER |
| 49 | select HID_SENSOR_IIO_COMMON | 49 | select HID_SENSOR_IIO_COMMON |
| 50 | select HID_SENSOR_IIO_TRIGGER | ||
| 50 | tristate "HID ALS" | 51 | tristate "HID ALS" |
| 51 | help | 52 | help |
| 52 | Say yes here to build support for the HID SENSOR | 53 | Say yes here to build support for the HID SENSOR |
diff --git a/drivers/iio/light/adjd_s311.c b/drivers/iio/light/adjd_s311.c index 36d210a06b28..d5b9d39d95b2 100644 --- a/drivers/iio/light/adjd_s311.c +++ b/drivers/iio/light/adjd_s311.c | |||
| @@ -286,8 +286,8 @@ static const struct iio_info adjd_s311_info = { | |||
| 286 | .driver_module = THIS_MODULE, | 286 | .driver_module = THIS_MODULE, |
| 287 | }; | 287 | }; |
| 288 | 288 | ||
| 289 | static int __devinit adjd_s311_probe(struct i2c_client *client, | 289 | static int adjd_s311_probe(struct i2c_client *client, |
| 290 | const struct i2c_device_id *id) | 290 | const struct i2c_device_id *id) |
| 291 | { | 291 | { |
| 292 | struct adjd_s311_data *data; | 292 | struct adjd_s311_data *data; |
| 293 | struct iio_dev *indio_dev; | 293 | struct iio_dev *indio_dev; |
| @@ -330,7 +330,7 @@ exit: | |||
| 330 | return err; | 330 | return err; |
| 331 | } | 331 | } |
| 332 | 332 | ||
| 333 | static int __devexit adjd_s311_remove(struct i2c_client *client) | 333 | static int adjd_s311_remove(struct i2c_client *client) |
| 334 | { | 334 | { |
| 335 | struct iio_dev *indio_dev = i2c_get_clientdata(client); | 335 | struct iio_dev *indio_dev = i2c_get_clientdata(client); |
| 336 | struct adjd_s311_data *data = iio_priv(indio_dev); | 336 | struct adjd_s311_data *data = iio_priv(indio_dev); |
| @@ -354,7 +354,7 @@ static struct i2c_driver adjd_s311_driver = { | |||
| 354 | .name = ADJD_S311_DRV_NAME, | 354 | .name = ADJD_S311_DRV_NAME, |
| 355 | }, | 355 | }, |
| 356 | .probe = adjd_s311_probe, | 356 | .probe = adjd_s311_probe, |
| 357 | .remove = __devexit_p(adjd_s311_remove), | 357 | .remove = adjd_s311_remove, |
| 358 | .id_table = adjd_s311_id, | 358 | .id_table = adjd_s311_id, |
| 359 | }; | 359 | }; |
| 360 | module_i2c_driver(adjd_s311_driver); | 360 | module_i2c_driver(adjd_s311_driver); |
diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c index 23eeeef64e84..e2d042f2a544 100644 --- a/drivers/iio/light/hid-sensor-als.c +++ b/drivers/iio/light/hid-sensor-als.c | |||
| @@ -245,7 +245,7 @@ static int als_parse_report(struct platform_device *pdev, | |||
| 245 | } | 245 | } |
| 246 | 246 | ||
| 247 | /* Function to initialize the processing for usage id */ | 247 | /* Function to initialize the processing for usage id */ |
| 248 | static int __devinit hid_als_probe(struct platform_device *pdev) | 248 | static int hid_als_probe(struct platform_device *pdev) |
| 249 | { | 249 | { |
| 250 | int ret = 0; | 250 | int ret = 0; |
| 251 | static const char *name = "als"; | 251 | static const char *name = "als"; |
| @@ -341,7 +341,7 @@ error_ret: | |||
| 341 | } | 341 | } |
| 342 | 342 | ||
| 343 | /* Function to deinitialize the processing for usage id */ | 343 | /* Function to deinitialize the processing for usage id */ |
| 344 | static int __devinit hid_als_remove(struct platform_device *pdev) | 344 | static int hid_als_remove(struct platform_device *pdev) |
| 345 | { | 345 | { |
| 346 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; | 346 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; |
| 347 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); | 347 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); |
diff --git a/drivers/iio/light/lm3533-als.c b/drivers/iio/light/lm3533-als.c index e45712a921ce..7503012ce933 100644 --- a/drivers/iio/light/lm3533-als.c +++ b/drivers/iio/light/lm3533-als.c | |||
| @@ -718,8 +718,7 @@ static struct attribute_group lm3533_als_attribute_group = { | |||
| 718 | .attrs = lm3533_als_attributes | 718 | .attrs = lm3533_als_attributes |
| 719 | }; | 719 | }; |
| 720 | 720 | ||
| 721 | static int __devinit lm3533_als_set_input_mode(struct lm3533_als *als, | 721 | static int lm3533_als_set_input_mode(struct lm3533_als *als, bool pwm_mode) |
| 722 | bool pwm_mode) | ||
| 723 | { | 722 | { |
| 724 | u8 mask = LM3533_ALS_INPUT_MODE_MASK; | 723 | u8 mask = LM3533_ALS_INPUT_MODE_MASK; |
| 725 | u8 val; | 724 | u8 val; |
| @@ -740,7 +739,7 @@ static int __devinit lm3533_als_set_input_mode(struct lm3533_als *als, | |||
| 740 | return 0; | 739 | return 0; |
| 741 | } | 740 | } |
| 742 | 741 | ||
| 743 | static int __devinit lm3533_als_set_resistor(struct lm3533_als *als, u8 val) | 742 | static int lm3533_als_set_resistor(struct lm3533_als *als, u8 val) |
| 744 | { | 743 | { |
| 745 | int ret; | 744 | int ret; |
| 746 | 745 | ||
| @@ -756,8 +755,8 @@ static int __devinit lm3533_als_set_resistor(struct lm3533_als *als, u8 val) | |||
| 756 | return 0; | 755 | return 0; |
| 757 | } | 756 | } |
| 758 | 757 | ||
| 759 | static int __devinit lm3533_als_setup(struct lm3533_als *als, | 758 | static int lm3533_als_setup(struct lm3533_als *als, |
| 760 | struct lm3533_als_platform_data *pdata) | 759 | struct lm3533_als_platform_data *pdata) |
| 761 | { | 760 | { |
| 762 | int ret; | 761 | int ret; |
| 763 | 762 | ||
| @@ -775,7 +774,7 @@ static int __devinit lm3533_als_setup(struct lm3533_als *als, | |||
| 775 | return 0; | 774 | return 0; |
| 776 | } | 775 | } |
| 777 | 776 | ||
| 778 | static int __devinit lm3533_als_setup_irq(struct lm3533_als *als, void *dev) | 777 | static int lm3533_als_setup_irq(struct lm3533_als *als, void *dev) |
| 779 | { | 778 | { |
| 780 | u8 mask = LM3533_ALS_INT_ENABLE_MASK; | 779 | u8 mask = LM3533_ALS_INT_ENABLE_MASK; |
| 781 | int ret; | 780 | int ret; |
| @@ -799,7 +798,7 @@ static int __devinit lm3533_als_setup_irq(struct lm3533_als *als, void *dev) | |||
| 799 | return 0; | 798 | return 0; |
| 800 | } | 799 | } |
| 801 | 800 | ||
| 802 | static int __devinit lm3533_als_enable(struct lm3533_als *als) | 801 | static int lm3533_als_enable(struct lm3533_als *als) |
| 803 | { | 802 | { |
| 804 | u8 mask = LM3533_ALS_ENABLE_MASK; | 803 | u8 mask = LM3533_ALS_ENABLE_MASK; |
| 805 | int ret; | 804 | int ret; |
| @@ -830,7 +829,7 @@ static const struct iio_info lm3533_als_info = { | |||
| 830 | .read_raw = &lm3533_als_read_raw, | 829 | .read_raw = &lm3533_als_read_raw, |
| 831 | }; | 830 | }; |
| 832 | 831 | ||
| 833 | static int __devinit lm3533_als_probe(struct platform_device *pdev) | 832 | static int lm3533_als_probe(struct platform_device *pdev) |
| 834 | { | 833 | { |
| 835 | struct lm3533 *lm3533; | 834 | struct lm3533 *lm3533; |
| 836 | struct lm3533_als_platform_data *pdata; | 835 | struct lm3533_als_platform_data *pdata; |
| @@ -901,7 +900,7 @@ err_free_dev: | |||
| 901 | return ret; | 900 | return ret; |
| 902 | } | 901 | } |
| 903 | 902 | ||
| 904 | static int __devexit lm3533_als_remove(struct platform_device *pdev) | 903 | static int lm3533_als_remove(struct platform_device *pdev) |
| 905 | { | 904 | { |
| 906 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); | 905 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); |
| 907 | struct lm3533_als *als = iio_priv(indio_dev); | 906 | struct lm3533_als *als = iio_priv(indio_dev); |
| @@ -922,7 +921,7 @@ static struct platform_driver lm3533_als_driver = { | |||
| 922 | .owner = THIS_MODULE, | 921 | .owner = THIS_MODULE, |
| 923 | }, | 922 | }, |
| 924 | .probe = lm3533_als_probe, | 923 | .probe = lm3533_als_probe, |
| 925 | .remove = __devexit_p(lm3533_als_remove), | 924 | .remove = lm3533_als_remove, |
| 926 | }; | 925 | }; |
| 927 | module_platform_driver(lm3533_als_driver); | 926 | module_platform_driver(lm3533_als_driver); |
| 928 | 927 | ||
diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c index e49cb9784a6f..2aa748fbdc0e 100644 --- a/drivers/iio/light/vcnl4000.c +++ b/drivers/iio/light/vcnl4000.c | |||
| @@ -150,8 +150,8 @@ static const struct iio_info vcnl4000_info = { | |||
| 150 | .driver_module = THIS_MODULE, | 150 | .driver_module = THIS_MODULE, |
| 151 | }; | 151 | }; |
| 152 | 152 | ||
| 153 | static int __devinit vcnl4000_probe(struct i2c_client *client, | 153 | static int vcnl4000_probe(struct i2c_client *client, |
| 154 | const struct i2c_device_id *id) | 154 | const struct i2c_device_id *id) |
| 155 | { | 155 | { |
| 156 | struct vcnl4000_data *data; | 156 | struct vcnl4000_data *data; |
| 157 | struct iio_dev *indio_dev; | 157 | struct iio_dev *indio_dev; |
| @@ -190,7 +190,7 @@ error_free_dev: | |||
| 190 | return ret; | 190 | return ret; |
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | static int __devexit vcnl4000_remove(struct i2c_client *client) | 193 | static int vcnl4000_remove(struct i2c_client *client) |
| 194 | { | 194 | { |
| 195 | struct iio_dev *indio_dev = i2c_get_clientdata(client); | 195 | struct iio_dev *indio_dev = i2c_get_clientdata(client); |
| 196 | 196 | ||
| @@ -206,7 +206,7 @@ static struct i2c_driver vcnl4000_driver = { | |||
| 206 | .owner = THIS_MODULE, | 206 | .owner = THIS_MODULE, |
| 207 | }, | 207 | }, |
| 208 | .probe = vcnl4000_probe, | 208 | .probe = vcnl4000_probe, |
| 209 | .remove = __devexit_p(vcnl4000_remove), | 209 | .remove = vcnl4000_remove, |
| 210 | .id_table = vcnl4000_id, | 210 | .id_table = vcnl4000_id, |
| 211 | }; | 211 | }; |
| 212 | 212 | ||
diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig index c1f0cdd57037..ff11d68225cf 100644 --- a/drivers/iio/magnetometer/Kconfig +++ b/drivers/iio/magnetometer/Kconfig | |||
| @@ -8,6 +8,7 @@ config HID_SENSOR_MAGNETOMETER_3D | |||
| 8 | select IIO_BUFFER | 8 | select IIO_BUFFER |
| 9 | select IIO_TRIGGERED_BUFFER | 9 | select IIO_TRIGGERED_BUFFER |
| 10 | select HID_SENSOR_IIO_COMMON | 10 | select HID_SENSOR_IIO_COMMON |
| 11 | select HID_SENSOR_IIO_TRIGGER | ||
| 11 | tristate "HID Magenetometer 3D" | 12 | tristate "HID Magenetometer 3D" |
| 12 | help | 13 | help |
| 13 | Say yes here to build support for the HID SENSOR | 14 | Say yes here to build support for the HID SENSOR |
diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c index 8e75eb76ccd9..7ac2c7483ba8 100644 --- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c +++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c | |||
| @@ -279,7 +279,7 @@ static int magn_3d_parse_report(struct platform_device *pdev, | |||
| 279 | } | 279 | } |
| 280 | 280 | ||
| 281 | /* Function to initialize the processing for usage id */ | 281 | /* Function to initialize the processing for usage id */ |
| 282 | static int __devinit hid_magn_3d_probe(struct platform_device *pdev) | 282 | static int hid_magn_3d_probe(struct platform_device *pdev) |
| 283 | { | 283 | { |
| 284 | int ret = 0; | 284 | int ret = 0; |
| 285 | static char *name = "magn_3d"; | 285 | static char *name = "magn_3d"; |
| @@ -376,7 +376,7 @@ error_ret: | |||
| 376 | } | 376 | } |
| 377 | 377 | ||
| 378 | /* Function to deinitialize the processing for usage id */ | 378 | /* Function to deinitialize the processing for usage id */ |
| 379 | static int __devinit hid_magn_3d_remove(struct platform_device *pdev) | 379 | static int hid_magn_3d_remove(struct platform_device *pdev) |
| 380 | { | 380 | { |
| 381 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; | 381 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; |
| 382 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); | 382 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); |
diff --git a/drivers/infiniband/hw/amso1100/c2.c b/drivers/infiniband/hw/amso1100/c2.c index 5ce7b9e8bff6..7275e727e0f5 100644 --- a/drivers/infiniband/hw/amso1100/c2.c +++ b/drivers/infiniband/hw/amso1100/c2.c | |||
| @@ -920,8 +920,7 @@ static struct net_device *c2_devinit(struct c2_dev *c2dev, | |||
| 920 | return netdev; | 920 | return netdev; |
| 921 | } | 921 | } |
| 922 | 922 | ||
| 923 | static int __devinit c2_probe(struct pci_dev *pcidev, | 923 | static int c2_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) |
| 924 | const struct pci_device_id *ent) | ||
| 925 | { | 924 | { |
| 926 | int ret = 0, i; | 925 | int ret = 0, i; |
| 927 | unsigned long reg0_start, reg0_flags, reg0_len; | 926 | unsigned long reg0_start, reg0_flags, reg0_len; |
| @@ -1191,7 +1190,7 @@ static int __devinit c2_probe(struct pci_dev *pcidev, | |||
| 1191 | return ret; | 1190 | return ret; |
| 1192 | } | 1191 | } |
| 1193 | 1192 | ||
| 1194 | static void __devexit c2_remove(struct pci_dev *pcidev) | 1193 | static void c2_remove(struct pci_dev *pcidev) |
| 1195 | { | 1194 | { |
| 1196 | struct c2_dev *c2dev = pci_get_drvdata(pcidev); | 1195 | struct c2_dev *c2dev = pci_get_drvdata(pcidev); |
| 1197 | struct net_device *netdev = c2dev->netdev; | 1196 | struct net_device *netdev = c2dev->netdev; |
| @@ -1236,7 +1235,7 @@ static struct pci_driver c2_pci_driver = { | |||
| 1236 | .name = DRV_NAME, | 1235 | .name = DRV_NAME, |
| 1237 | .id_table = c2_pci_table, | 1236 | .id_table = c2_pci_table, |
| 1238 | .probe = c2_probe, | 1237 | .probe = c2_probe, |
| 1239 | .remove = __devexit_p(c2_remove), | 1238 | .remove = c2_remove, |
| 1240 | }; | 1239 | }; |
| 1241 | 1240 | ||
| 1242 | static int __init c2_init_module(void) | 1241 | static int __init c2_init_module(void) |
diff --git a/drivers/infiniband/hw/amso1100/c2.h b/drivers/infiniband/hw/amso1100/c2.h index 6ae698e68775..ba7a1208ff9e 100644 --- a/drivers/infiniband/hw/amso1100/c2.h +++ b/drivers/infiniband/hw/amso1100/c2.h | |||
| @@ -498,16 +498,16 @@ extern int c2_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr, | |||
| 498 | struct ib_send_wr **bad_wr); | 498 | struct ib_send_wr **bad_wr); |
| 499 | extern int c2_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *ib_wr, | 499 | extern int c2_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *ib_wr, |
| 500 | struct ib_recv_wr **bad_wr); | 500 | struct ib_recv_wr **bad_wr); |
| 501 | extern void __devinit c2_init_qp_table(struct c2_dev *c2dev); | 501 | extern void c2_init_qp_table(struct c2_dev *c2dev); |
| 502 | extern void __devexit c2_cleanup_qp_table(struct c2_dev *c2dev); | 502 | extern void c2_cleanup_qp_table(struct c2_dev *c2dev); |
| 503 | extern void c2_set_qp_state(struct c2_qp *, int); | 503 | extern void c2_set_qp_state(struct c2_qp *, int); |
| 504 | extern struct c2_qp *c2_find_qpn(struct c2_dev *c2dev, int qpn); | 504 | extern struct c2_qp *c2_find_qpn(struct c2_dev *c2dev, int qpn); |
| 505 | 505 | ||
| 506 | /* PDs */ | 506 | /* PDs */ |
| 507 | extern int c2_pd_alloc(struct c2_dev *c2dev, int privileged, struct c2_pd *pd); | 507 | extern int c2_pd_alloc(struct c2_dev *c2dev, int privileged, struct c2_pd *pd); |
| 508 | extern void c2_pd_free(struct c2_dev *c2dev, struct c2_pd *pd); | 508 | extern void c2_pd_free(struct c2_dev *c2dev, struct c2_pd *pd); |
| 509 | extern int __devinit c2_init_pd_table(struct c2_dev *c2dev); | 509 | extern int c2_init_pd_table(struct c2_dev *c2dev); |
| 510 | extern void __devexit c2_cleanup_pd_table(struct c2_dev *c2dev); | 510 | extern void c2_cleanup_pd_table(struct c2_dev *c2dev); |
| 511 | 511 | ||
| 512 | /* CQs */ | 512 | /* CQs */ |
| 513 | extern int c2_init_cq(struct c2_dev *c2dev, int entries, | 513 | extern int c2_init_cq(struct c2_dev *c2dev, int entries, |
diff --git a/drivers/infiniband/hw/amso1100/c2_pd.c b/drivers/infiniband/hw/amso1100/c2_pd.c index 161f2a285351..f3e81dc357bb 100644 --- a/drivers/infiniband/hw/amso1100/c2_pd.c +++ b/drivers/infiniband/hw/amso1100/c2_pd.c | |||
| @@ -70,7 +70,7 @@ void c2_pd_free(struct c2_dev *c2dev, struct c2_pd *pd) | |||
| 70 | spin_unlock(&c2dev->pd_table.lock); | 70 | spin_unlock(&c2dev->pd_table.lock); |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | int __devinit c2_init_pd_table(struct c2_dev *c2dev) | 73 | int c2_init_pd_table(struct c2_dev *c2dev) |
| 74 | { | 74 | { |
| 75 | 75 | ||
| 76 | c2dev->pd_table.last = 0; | 76 | c2dev->pd_table.last = 0; |
| @@ -84,7 +84,7 @@ int __devinit c2_init_pd_table(struct c2_dev *c2dev) | |||
| 84 | return 0; | 84 | return 0; |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | void __devexit c2_cleanup_pd_table(struct c2_dev *c2dev) | 87 | void c2_cleanup_pd_table(struct c2_dev *c2dev) |
| 88 | { | 88 | { |
| 89 | kfree(c2dev->pd_table.table); | 89 | kfree(c2dev->pd_table.table); |
| 90 | } | 90 | } |
diff --git a/drivers/infiniband/hw/amso1100/c2_qp.c b/drivers/infiniband/hw/amso1100/c2_qp.c index 0d7b6f23caff..28cd5cb51859 100644 --- a/drivers/infiniband/hw/amso1100/c2_qp.c +++ b/drivers/infiniband/hw/amso1100/c2_qp.c | |||
| @@ -1010,13 +1010,13 @@ out: | |||
| 1010 | return err; | 1010 | return err; |
| 1011 | } | 1011 | } |
| 1012 | 1012 | ||
| 1013 | void __devinit c2_init_qp_table(struct c2_dev *c2dev) | 1013 | void c2_init_qp_table(struct c2_dev *c2dev) |
| 1014 | { | 1014 | { |
| 1015 | spin_lock_init(&c2dev->qp_table.lock); | 1015 | spin_lock_init(&c2dev->qp_table.lock); |
| 1016 | idr_init(&c2dev->qp_table.idr); | 1016 | idr_init(&c2dev->qp_table.idr); |
| 1017 | } | 1017 | } |
| 1018 | 1018 | ||
| 1019 | void __devexit c2_cleanup_qp_table(struct c2_dev *c2dev) | 1019 | void c2_cleanup_qp_table(struct c2_dev *c2dev) |
| 1020 | { | 1020 | { |
| 1021 | idr_destroy(&c2dev->qp_table.idr); | 1021 | idr_destroy(&c2dev->qp_table.idr); |
| 1022 | } | 1022 | } |
diff --git a/drivers/infiniband/hw/amso1100/c2_rnic.c b/drivers/infiniband/hw/amso1100/c2_rnic.c index e4a73158fc7f..b7c986990053 100644 --- a/drivers/infiniband/hw/amso1100/c2_rnic.c +++ b/drivers/infiniband/hw/amso1100/c2_rnic.c | |||
| @@ -442,7 +442,7 @@ static int c2_rnic_close(struct c2_dev *c2dev) | |||
| 442 | * involves initializing the various limits and resource pools that | 442 | * involves initializing the various limits and resource pools that |
| 443 | * comprise the RNIC instance. | 443 | * comprise the RNIC instance. |
| 444 | */ | 444 | */ |
| 445 | int __devinit c2_rnic_init(struct c2_dev *c2dev) | 445 | int c2_rnic_init(struct c2_dev *c2dev) |
| 446 | { | 446 | { |
| 447 | int err; | 447 | int err; |
| 448 | u32 qsize, msgsize; | 448 | u32 qsize, msgsize; |
| @@ -611,7 +611,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev) | |||
| 611 | /* | 611 | /* |
| 612 | * Called by c2_remove to cleanup the RNIC resources. | 612 | * Called by c2_remove to cleanup the RNIC resources. |
| 613 | */ | 613 | */ |
| 614 | void __devexit c2_rnic_term(struct c2_dev *c2dev) | 614 | void c2_rnic_term(struct c2_dev *c2dev) |
| 615 | { | 615 | { |
| 616 | 616 | ||
| 617 | /* Close the open adapter instance */ | 617 | /* Close the open adapter instance */ |
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index 832e7a7d0aee..f8a62918a88d 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c | |||
| @@ -713,8 +713,8 @@ static struct attribute_group ehca_dev_attr_grp = { | |||
| 713 | .attrs = ehca_dev_attrs | 713 | .attrs = ehca_dev_attrs |
| 714 | }; | 714 | }; |
| 715 | 715 | ||
| 716 | static int __devinit ehca_probe(struct platform_device *dev, | 716 | static int ehca_probe(struct platform_device *dev, |
| 717 | const struct of_device_id *id) | 717 | const struct of_device_id *id) |
| 718 | { | 718 | { |
| 719 | struct ehca_shca *shca; | 719 | struct ehca_shca *shca; |
| 720 | const u64 *handle; | 720 | const u64 *handle; |
| @@ -879,7 +879,7 @@ probe1: | |||
| 879 | return -EINVAL; | 879 | return -EINVAL; |
| 880 | } | 880 | } |
| 881 | 881 | ||
| 882 | static int __devexit ehca_remove(struct platform_device *dev) | 882 | static int ehca_remove(struct platform_device *dev) |
| 883 | { | 883 | { |
| 884 | struct ehca_shca *shca = dev_get_drvdata(&dev->dev); | 884 | struct ehca_shca *shca = dev_get_drvdata(&dev->dev); |
| 885 | unsigned long flags; | 885 | unsigned long flags; |
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index bfca37b2432f..7b371f545ece 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c | |||
| @@ -127,9 +127,8 @@ const char *ipath_ibcstatus_str[] = { | |||
| 127 | "LTState1C", "LTState1D", "LTState1E", "LTState1F" | 127 | "LTState1C", "LTState1D", "LTState1E", "LTState1F" |
| 128 | }; | 128 | }; |
| 129 | 129 | ||
| 130 | static void __devexit ipath_remove_one(struct pci_dev *); | 130 | static void ipath_remove_one(struct pci_dev *); |
| 131 | static int __devinit ipath_init_one(struct pci_dev *, | 131 | static int ipath_init_one(struct pci_dev *, const struct pci_device_id *); |
| 132 | const struct pci_device_id *); | ||
| 133 | 132 | ||
| 134 | /* Only needed for registration, nothing else needs this info */ | 133 | /* Only needed for registration, nothing else needs this info */ |
| 135 | #define PCI_VENDOR_ID_PATHSCALE 0x1fc1 | 134 | #define PCI_VENDOR_ID_PATHSCALE 0x1fc1 |
| @@ -148,7 +147,7 @@ MODULE_DEVICE_TABLE(pci, ipath_pci_tbl); | |||
| 148 | static struct pci_driver ipath_driver = { | 147 | static struct pci_driver ipath_driver = { |
| 149 | .name = IPATH_DRV_NAME, | 148 | .name = IPATH_DRV_NAME, |
| 150 | .probe = ipath_init_one, | 149 | .probe = ipath_init_one, |
| 151 | .remove = __devexit_p(ipath_remove_one), | 150 | .remove = ipath_remove_one, |
| 152 | .id_table = ipath_pci_tbl, | 151 | .id_table = ipath_pci_tbl, |
| 153 | .driver = { | 152 | .driver = { |
| 154 | .groups = ipath_driver_attr_groups, | 153 | .groups = ipath_driver_attr_groups, |
| @@ -392,8 +391,7 @@ done: | |||
| 392 | 391 | ||
| 393 | static void cleanup_device(struct ipath_devdata *dd); | 392 | static void cleanup_device(struct ipath_devdata *dd); |
| 394 | 393 | ||
| 395 | static int __devinit ipath_init_one(struct pci_dev *pdev, | 394 | static int ipath_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 396 | const struct pci_device_id *ent) | ||
| 397 | { | 395 | { |
| 398 | int ret, len, j; | 396 | int ret, len, j; |
| 399 | struct ipath_devdata *dd; | 397 | struct ipath_devdata *dd; |
| @@ -737,7 +735,7 @@ static void cleanup_device(struct ipath_devdata *dd) | |||
| 737 | kfree(tmp); | 735 | kfree(tmp); |
| 738 | } | 736 | } |
| 739 | 737 | ||
| 740 | static void __devexit ipath_remove_one(struct pci_dev *pdev) | 738 | static void ipath_remove_one(struct pci_dev *pdev) |
| 741 | { | 739 | { |
| 742 | struct ipath_devdata *dd = pci_get_drvdata(pdev); | 740 | struct ipath_devdata *dd = pci_get_drvdata(pdev); |
| 743 | 741 | ||
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index aa12a533ae9e..87897b95666d 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c | |||
| @@ -130,7 +130,7 @@ static int log_mtts_per_seg = ilog2(MTHCA_MTT_SEG_SIZE / 8); | |||
| 130 | module_param_named(log_mtts_per_seg, log_mtts_per_seg, int, 0444); | 130 | module_param_named(log_mtts_per_seg, log_mtts_per_seg, int, 0444); |
| 131 | MODULE_PARM_DESC(log_mtts_per_seg, "Log2 number of MTT entries per segment (1-5)"); | 131 | MODULE_PARM_DESC(log_mtts_per_seg, "Log2 number of MTT entries per segment (1-5)"); |
| 132 | 132 | ||
| 133 | static char mthca_version[] __devinitdata = | 133 | static char mthca_version[] = |
| 134 | DRV_NAME ": Mellanox InfiniBand HCA driver v" | 134 | DRV_NAME ": Mellanox InfiniBand HCA driver v" |
| 135 | DRV_VERSION " (" DRV_RELDATE ")\n"; | 135 | DRV_VERSION " (" DRV_RELDATE ")\n"; |
| 136 | 136 | ||
| @@ -1139,8 +1139,7 @@ int __mthca_restart_one(struct pci_dev *pdev) | |||
| 1139 | return __mthca_init_one(pdev, hca_type); | 1139 | return __mthca_init_one(pdev, hca_type); |
| 1140 | } | 1140 | } |
| 1141 | 1141 | ||
| 1142 | static int __devinit mthca_init_one(struct pci_dev *pdev, | 1142 | static int mthca_init_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 1143 | const struct pci_device_id *id) | ||
| 1144 | { | 1143 | { |
| 1145 | int ret; | 1144 | int ret; |
| 1146 | 1145 | ||
| @@ -1162,7 +1161,7 @@ static int __devinit mthca_init_one(struct pci_dev *pdev, | |||
| 1162 | return ret; | 1161 | return ret; |
| 1163 | } | 1162 | } |
| 1164 | 1163 | ||
| 1165 | static void __devexit mthca_remove_one(struct pci_dev *pdev) | 1164 | static void mthca_remove_one(struct pci_dev *pdev) |
| 1166 | { | 1165 | { |
| 1167 | mutex_lock(&mthca_device_mutex); | 1166 | mutex_lock(&mthca_device_mutex); |
| 1168 | __mthca_remove_one(pdev); | 1167 | __mthca_remove_one(pdev); |
| @@ -1199,7 +1198,7 @@ static struct pci_driver mthca_driver = { | |||
| 1199 | .name = DRV_NAME, | 1198 | .name = DRV_NAME, |
| 1200 | .id_table = mthca_pci_table, | 1199 | .id_table = mthca_pci_table, |
| 1201 | .probe = mthca_init_one, | 1200 | .probe = mthca_init_one, |
| 1202 | .remove = __devexit_p(mthca_remove_one) | 1201 | .remove = mthca_remove_one, |
| 1203 | }; | 1202 | }; |
| 1204 | 1203 | ||
| 1205 | static void __init __mthca_check_profile_val(const char *name, int *pval, | 1204 | static void __init __mthca_check_profile_val(const char *name, int *pval, |
diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c index 748db2d3e465..5b152a366dff 100644 --- a/drivers/infiniband/hw/nes/nes.c +++ b/drivers/infiniband/hw/nes/nes.c | |||
| @@ -444,7 +444,7 @@ static irqreturn_t nes_interrupt(int irq, void *dev_id) | |||
| 444 | /** | 444 | /** |
| 445 | * nes_probe - Device initialization | 445 | * nes_probe - Device initialization |
| 446 | */ | 446 | */ |
| 447 | static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) | 447 | static int nes_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) |
| 448 | { | 448 | { |
| 449 | struct net_device *netdev = NULL; | 449 | struct net_device *netdev = NULL; |
| 450 | struct nes_device *nesdev = NULL; | 450 | struct nes_device *nesdev = NULL; |
| @@ -749,7 +749,7 @@ static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_i | |||
| 749 | /** | 749 | /** |
| 750 | * nes_remove - unload from kernel | 750 | * nes_remove - unload from kernel |
| 751 | */ | 751 | */ |
| 752 | static void __devexit nes_remove(struct pci_dev *pcidev) | 752 | static void nes_remove(struct pci_dev *pcidev) |
| 753 | { | 753 | { |
| 754 | struct nes_device *nesdev = pci_get_drvdata(pcidev); | 754 | struct nes_device *nesdev = pci_get_drvdata(pcidev); |
| 755 | struct net_device *netdev; | 755 | struct net_device *netdev; |
| @@ -810,7 +810,7 @@ static struct pci_driver nes_pci_driver = { | |||
| 810 | .name = DRV_NAME, | 810 | .name = DRV_NAME, |
| 811 | .id_table = nes_pci_table, | 811 | .id_table = nes_pci_table, |
| 812 | .probe = nes_probe, | 812 | .probe = nes_probe, |
| 813 | .remove = __devexit_p(nes_remove), | 813 | .remove = nes_remove, |
| 814 | }; | 814 | }; |
| 815 | 815 | ||
| 816 | static ssize_t nes_show_adapter(struct device_driver *ddp, char *buf) | 816 | static ssize_t nes_show_adapter(struct device_driver *ddp, char *buf) |
diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c index 4443adfcd9ee..ddf066d9abb6 100644 --- a/drivers/infiniband/hw/qib/qib_init.c +++ b/drivers/infiniband/hw/qib/qib_init.c | |||
| @@ -1134,9 +1134,8 @@ void qib_disable_after_error(struct qib_devdata *dd) | |||
| 1134 | *dd->devstatusp |= QIB_STATUS_HWERROR; | 1134 | *dd->devstatusp |= QIB_STATUS_HWERROR; |
| 1135 | } | 1135 | } |
| 1136 | 1136 | ||
| 1137 | static void __devexit qib_remove_one(struct pci_dev *); | 1137 | static void qib_remove_one(struct pci_dev *); |
| 1138 | static int __devinit qib_init_one(struct pci_dev *, | 1138 | static int qib_init_one(struct pci_dev *, const struct pci_device_id *); |
| 1139 | const struct pci_device_id *); | ||
| 1140 | 1139 | ||
| 1141 | #define DRIVER_LOAD_MSG "QLogic " QIB_DRV_NAME " loaded: " | 1140 | #define DRIVER_LOAD_MSG "QLogic " QIB_DRV_NAME " loaded: " |
| 1142 | #define PFX QIB_DRV_NAME ": " | 1141 | #define PFX QIB_DRV_NAME ": " |
| @@ -1153,7 +1152,7 @@ MODULE_DEVICE_TABLE(pci, qib_pci_tbl); | |||
| 1153 | struct pci_driver qib_driver = { | 1152 | struct pci_driver qib_driver = { |
| 1154 | .name = QIB_DRV_NAME, | 1153 | .name = QIB_DRV_NAME, |
| 1155 | .probe = qib_init_one, | 1154 | .probe = qib_init_one, |
| 1156 | .remove = __devexit_p(qib_remove_one), | 1155 | .remove = qib_remove_one, |
| 1157 | .id_table = qib_pci_tbl, | 1156 | .id_table = qib_pci_tbl, |
| 1158 | .err_handler = &qib_pci_err_handler, | 1157 | .err_handler = &qib_pci_err_handler, |
| 1159 | }; | 1158 | }; |
| @@ -1342,8 +1341,7 @@ static void qib_postinit_cleanup(struct qib_devdata *dd) | |||
| 1342 | qib_free_devdata(dd); | 1341 | qib_free_devdata(dd); |
| 1343 | } | 1342 | } |
| 1344 | 1343 | ||
| 1345 | static int __devinit qib_init_one(struct pci_dev *pdev, | 1344 | static int qib_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 1346 | const struct pci_device_id *ent) | ||
| 1347 | { | 1345 | { |
| 1348 | int ret, j, pidx, initfail; | 1346 | int ret, j, pidx, initfail; |
| 1349 | struct qib_devdata *dd = NULL; | 1347 | struct qib_devdata *dd = NULL; |
| @@ -1448,7 +1446,7 @@ bail: | |||
| 1448 | return ret; | 1446 | return ret; |
| 1449 | } | 1447 | } |
| 1450 | 1448 | ||
| 1451 | static void __devexit qib_remove_one(struct pci_dev *pdev) | 1449 | static void qib_remove_one(struct pci_dev *pdev) |
| 1452 | { | 1450 | { |
| 1453 | struct qib_devdata *dd = pci_get_drvdata(pdev); | 1451 | struct qib_devdata *dd = pci_get_drvdata(pdev); |
| 1454 | int ret; | 1452 | int ret; |
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index d327f5a2bb0e..b29ca651a395 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c | |||
| @@ -602,6 +602,7 @@ gpio_keys_get_devtree_pdata(struct device *dev) | |||
| 602 | 602 | ||
| 603 | i = 0; | 603 | i = 0; |
| 604 | for_each_child_of_node(node, pp) { | 604 | for_each_child_of_node(node, pp) { |
| 605 | int gpio; | ||
| 605 | enum of_gpio_flags flags; | 606 | enum of_gpio_flags flags; |
| 606 | 607 | ||
| 607 | if (!of_find_property(pp, "gpios", NULL)) { | 608 | if (!of_find_property(pp, "gpios", NULL)) { |
| @@ -610,9 +611,19 @@ gpio_keys_get_devtree_pdata(struct device *dev) | |||
| 610 | continue; | 611 | continue; |
| 611 | } | 612 | } |
| 612 | 613 | ||
| 614 | gpio = of_get_gpio_flags(pp, 0, &flags); | ||
| 615 | if (gpio < 0) { | ||
| 616 | error = gpio; | ||
| 617 | if (error != -EPROBE_DEFER) | ||
| 618 | dev_err(dev, | ||
| 619 | "Failed to get gpio flags, error: %d\n", | ||
| 620 | error); | ||
| 621 | goto err_free_pdata; | ||
| 622 | } | ||
| 623 | |||
| 613 | button = &pdata->buttons[i++]; | 624 | button = &pdata->buttons[i++]; |
| 614 | 625 | ||
| 615 | button->gpio = of_get_gpio_flags(pp, 0, &flags); | 626 | button->gpio = gpio; |
| 616 | button->active_low = flags & OF_GPIO_ACTIVE_LOW; | 627 | button->active_low = flags & OF_GPIO_ACTIVE_LOW; |
| 617 | 628 | ||
| 618 | if (of_property_read_u32(pp, "linux,code", &button->code)) { | 629 | if (of_property_read_u32(pp, "linux,code", &button->code)) { |
diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c index f686fd970553..21147164874d 100644 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c | |||
| @@ -135,6 +135,7 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct | |||
| 135 | 135 | ||
| 136 | i = 0; | 136 | i = 0; |
| 137 | for_each_child_of_node(node, pp) { | 137 | for_each_child_of_node(node, pp) { |
| 138 | int gpio; | ||
| 138 | enum of_gpio_flags flags; | 139 | enum of_gpio_flags flags; |
| 139 | 140 | ||
| 140 | if (!of_find_property(pp, "gpios", NULL)) { | 141 | if (!of_find_property(pp, "gpios", NULL)) { |
| @@ -143,9 +144,19 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct | |||
| 143 | continue; | 144 | continue; |
| 144 | } | 145 | } |
| 145 | 146 | ||
| 147 | gpio = of_get_gpio_flags(pp, 0, &flags); | ||
| 148 | if (gpio < 0) { | ||
| 149 | error = gpio; | ||
| 150 | if (error != -EPROBE_DEFER) | ||
| 151 | dev_err(dev, | ||
| 152 | "Failed to get gpio flags, error: %d\n", | ||
| 153 | error); | ||
| 154 | goto err_free_pdata; | ||
| 155 | } | ||
| 156 | |||
| 146 | button = &pdata->buttons[i++]; | 157 | button = &pdata->buttons[i++]; |
| 147 | 158 | ||
| 148 | button->gpio = of_get_gpio_flags(pp, 0, &flags); | 159 | button->gpio = gpio; |
| 149 | button->active_low = flags & OF_GPIO_ACTIVE_LOW; | 160 | button->active_low = flags & OF_GPIO_ACTIVE_LOW; |
| 150 | 161 | ||
| 151 | if (of_property_read_u32(pp, "linux,code", &button->code)) { | 162 | if (of_property_read_u32(pp, "linux,code", &button->code)) { |
diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c index 50e9c5e195e1..a34cc6714e5b 100644 --- a/drivers/input/keyboard/tca8418_keypad.c +++ b/drivers/input/keyboard/tca8418_keypad.c | |||
| @@ -384,7 +384,7 @@ static const struct i2c_device_id tca8418_id[] = { | |||
| 384 | MODULE_DEVICE_TABLE(i2c, tca8418_id); | 384 | MODULE_DEVICE_TABLE(i2c, tca8418_id); |
| 385 | 385 | ||
| 386 | #ifdef CONFIG_OF | 386 | #ifdef CONFIG_OF |
| 387 | static const struct of_device_id tca8418_dt_ids[] __devinitconst = { | 387 | static const struct of_device_id tca8418_dt_ids[] = { |
| 388 | { .compatible = "ti,tca8418", }, | 388 | { .compatible = "ti,tca8418", }, |
| 389 | { } | 389 | { } |
| 390 | }; | 390 | }; |
diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c index e582922bacf7..cc7e0d4a8f93 100644 --- a/drivers/input/mouse/sentelic.c +++ b/drivers/input/mouse/sentelic.c | |||
| @@ -791,7 +791,7 @@ static psmouse_ret_t fsp_process_byte(struct psmouse *psmouse) | |||
| 791 | fsp_set_slot(dev, 0, fgrs > 0, abs_x, abs_y); | 791 | fsp_set_slot(dev, 0, fgrs > 0, abs_x, abs_y); |
| 792 | fsp_set_slot(dev, 1, false, 0, 0); | 792 | fsp_set_slot(dev, 1, false, 0, 0); |
| 793 | } | 793 | } |
| 794 | if (fgrs > 0) { | 794 | if (fgrs == 1 || (fgrs == 2 && !(packet[0] & FSP_PB0_MFMC_FGR2))) { |
| 795 | input_report_abs(dev, ABS_X, abs_x); | 795 | input_report_abs(dev, ABS_X, abs_x); |
| 796 | input_report_abs(dev, ABS_Y, abs_y); | 796 | input_report_abs(dev, ABS_Y, abs_y); |
| 797 | } | 797 | } |
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index c2c07a4a7f21..b9d091157884 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
| @@ -4234,7 +4234,7 @@ static struct iommu_ops intel_iommu_ops = { | |||
| 4234 | .pgsize_bitmap = INTEL_IOMMU_PGSIZES, | 4234 | .pgsize_bitmap = INTEL_IOMMU_PGSIZES, |
| 4235 | }; | 4235 | }; |
| 4236 | 4236 | ||
| 4237 | static void __devinit quirk_iommu_rwbf(struct pci_dev *dev) | 4237 | static void quirk_iommu_rwbf(struct pci_dev *dev) |
| 4238 | { | 4238 | { |
| 4239 | /* | 4239 | /* |
| 4240 | * Mobile 4 Series Chipset neglects to set RWBF capability, | 4240 | * Mobile 4 Series Chipset neglects to set RWBF capability, |
| @@ -4262,7 +4262,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf); | |||
| 4262 | #define GGC_MEMORY_SIZE_3M_VT (0xa << 8) | 4262 | #define GGC_MEMORY_SIZE_3M_VT (0xa << 8) |
| 4263 | #define GGC_MEMORY_SIZE_4M_VT (0xb << 8) | 4263 | #define GGC_MEMORY_SIZE_4M_VT (0xb << 8) |
| 4264 | 4264 | ||
| 4265 | static void __devinit quirk_calpella_no_shadow_gtt(struct pci_dev *dev) | 4265 | static void quirk_calpella_no_shadow_gtt(struct pci_dev *dev) |
| 4266 | { | 4266 | { |
| 4267 | unsigned short ggc; | 4267 | unsigned short ggc; |
| 4268 | 4268 | ||
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 18108c1405e2..d33c980e9c20 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c | |||
| @@ -934,7 +934,7 @@ static void omap_iommu_detach(struct omap_iommu *obj) | |||
| 934 | /* | 934 | /* |
| 935 | * OMAP Device MMU(IOMMU) detection | 935 | * OMAP Device MMU(IOMMU) detection |
| 936 | */ | 936 | */ |
| 937 | static int __devinit omap_iommu_probe(struct platform_device *pdev) | 937 | static int omap_iommu_probe(struct platform_device *pdev) |
| 938 | { | 938 | { |
| 939 | int err = -ENODEV; | 939 | int err = -ENODEV; |
| 940 | int irq; | 940 | int irq; |
| @@ -1003,7 +1003,7 @@ err_mem: | |||
| 1003 | return err; | 1003 | return err; |
| 1004 | } | 1004 | } |
| 1005 | 1005 | ||
| 1006 | static int __devexit omap_iommu_remove(struct platform_device *pdev) | 1006 | static int omap_iommu_remove(struct platform_device *pdev) |
| 1007 | { | 1007 | { |
| 1008 | int irq; | 1008 | int irq; |
| 1009 | struct resource *res; | 1009 | struct resource *res; |
| @@ -1028,7 +1028,7 @@ static int __devexit omap_iommu_remove(struct platform_device *pdev) | |||
| 1028 | 1028 | ||
| 1029 | static struct platform_driver omap_iommu_driver = { | 1029 | static struct platform_driver omap_iommu_driver = { |
| 1030 | .probe = omap_iommu_probe, | 1030 | .probe = omap_iommu_probe, |
| 1031 | .remove = __devexit_p(omap_iommu_remove), | 1031 | .remove = omap_iommu_remove, |
| 1032 | .driver = { | 1032 | .driver = { |
| 1033 | .name = "omap-iommu", | 1033 | .name = "omap-iommu", |
| 1034 | }, | 1034 | }, |
diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c index 4c9db62814ff..8219f1d596ee 100644 --- a/drivers/iommu/tegra-gart.c +++ b/drivers/iommu/tegra-gart.c | |||
| @@ -431,7 +431,7 @@ const struct dev_pm_ops tegra_gart_pm_ops = { | |||
| 431 | }; | 431 | }; |
| 432 | 432 | ||
| 433 | #ifdef CONFIG_OF | 433 | #ifdef CONFIG_OF |
| 434 | static struct of_device_id tegra_gart_of_match[] __devinitdata = { | 434 | static struct of_device_id tegra_gart_of_match[] = { |
| 435 | { .compatible = "nvidia,tegra20-gart", }, | 435 | { .compatible = "nvidia,tegra20-gart", }, |
| 436 | { }, | 436 | { }, |
| 437 | }; | 437 | }; |
| @@ -449,7 +449,7 @@ static struct platform_driver tegra_gart_driver = { | |||
| 449 | }, | 449 | }, |
| 450 | }; | 450 | }; |
| 451 | 451 | ||
| 452 | static int __devinit tegra_gart_init(void) | 452 | static int tegra_gart_init(void) |
| 453 | { | 453 | { |
| 454 | return platform_driver_register(&tegra_gart_driver); | 454 | return platform_driver_register(&tegra_gart_driver); |
| 455 | } | 455 | } |
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index 25c1210c0832..fc178893789a 100644 --- a/drivers/iommu/tegra-smmu.c +++ b/drivers/iommu/tegra-smmu.c | |||
| @@ -1255,7 +1255,7 @@ const struct dev_pm_ops tegra_smmu_pm_ops = { | |||
| 1255 | }; | 1255 | }; |
| 1256 | 1256 | ||
| 1257 | #ifdef CONFIG_OF | 1257 | #ifdef CONFIG_OF |
| 1258 | static struct of_device_id tegra_smmu_of_match[] __devinitdata = { | 1258 | static struct of_device_id tegra_smmu_of_match[] = { |
| 1259 | { .compatible = "nvidia,tegra30-smmu", }, | 1259 | { .compatible = "nvidia,tegra30-smmu", }, |
| 1260 | { }, | 1260 | { }, |
| 1261 | }; | 1261 | }; |
| @@ -1273,7 +1273,7 @@ static struct platform_driver tegra_smmu_driver = { | |||
| 1273 | }, | 1273 | }, |
| 1274 | }; | 1274 | }; |
| 1275 | 1275 | ||
| 1276 | static int __devinit tegra_smmu_init(void) | 1276 | static int tegra_smmu_init(void) |
| 1277 | { | 1277 | { |
| 1278 | return platform_driver_register(&tegra_smmu_driver); | 1278 | return platform_driver_register(&tegra_smmu_driver); |
| 1279 | } | 1279 | } |
diff --git a/drivers/isdn/hardware/avm/b1pci.c b/drivers/isdn/hardware/avm/b1pci.c index b305e6b2b8ee..ac4863c2ecbc 100644 --- a/drivers/isdn/hardware/avm/b1pci.c +++ b/drivers/isdn/hardware/avm/b1pci.c | |||
| @@ -299,8 +299,8 @@ static void b1pciv4_remove(struct pci_dev *pdev) | |||
| 299 | 299 | ||
| 300 | #endif /* CONFIG_ISDN_DRV_AVMB1_B1PCIV4 */ | 300 | #endif /* CONFIG_ISDN_DRV_AVMB1_B1PCIV4 */ |
| 301 | 301 | ||
| 302 | static int __devinit b1pci_pci_probe(struct pci_dev *pdev, | 302 | static int b1pci_pci_probe(struct pci_dev *pdev, |
| 303 | const struct pci_device_id *ent) | 303 | const struct pci_device_id *ent) |
| 304 | { | 304 | { |
| 305 | struct capicardparams param; | 305 | struct capicardparams param; |
| 306 | int retval; | 306 | int retval; |
| @@ -344,7 +344,7 @@ static int __devinit b1pci_pci_probe(struct pci_dev *pdev, | |||
| 344 | return retval; | 344 | return retval; |
| 345 | } | 345 | } |
| 346 | 346 | ||
| 347 | static void __devexit b1pci_pci_remove(struct pci_dev *pdev) | 347 | static void b1pci_pci_remove(struct pci_dev *pdev) |
| 348 | { | 348 | { |
| 349 | #ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4 | 349 | #ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4 |
| 350 | avmcard *card = pci_get_drvdata(pdev); | 350 | avmcard *card = pci_get_drvdata(pdev); |
| @@ -362,7 +362,7 @@ static struct pci_driver b1pci_pci_driver = { | |||
| 362 | .name = "b1pci", | 362 | .name = "b1pci", |
| 363 | .id_table = b1pci_pci_tbl, | 363 | .id_table = b1pci_pci_tbl, |
| 364 | .probe = b1pci_pci_probe, | 364 | .probe = b1pci_pci_probe, |
| 365 | .remove = __devexit_p(b1pci_pci_remove), | 365 | .remove = b1pci_pci_remove, |
| 366 | }; | 366 | }; |
| 367 | 367 | ||
| 368 | static struct capi_driver capi_driver_b1pci = { | 368 | static struct capi_driver capi_driver_b1pci = { |
diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c index 98f18812441d..1d7fc44e3eef 100644 --- a/drivers/isdn/hardware/avm/c4.c +++ b/drivers/isdn/hardware/avm/c4.c | |||
| @@ -1249,8 +1249,7 @@ err: | |||
| 1249 | 1249 | ||
| 1250 | /* ------------------------------------------------------------- */ | 1250 | /* ------------------------------------------------------------- */ |
| 1251 | 1251 | ||
| 1252 | static int __devinit c4_probe(struct pci_dev *dev, | 1252 | static int c4_probe(struct pci_dev *dev, const struct pci_device_id *ent) |
| 1253 | const struct pci_device_id *ent) | ||
| 1254 | { | 1253 | { |
| 1255 | int nr = ent->driver_data; | 1254 | int nr = ent->driver_data; |
| 1256 | int retval = 0; | 1255 | int retval = 0; |
diff --git a/drivers/isdn/hardware/avm/t1pci.c b/drivers/isdn/hardware/avm/t1pci.c index cb9a30427bd2..2180b1685691 100644 --- a/drivers/isdn/hardware/avm/t1pci.c +++ b/drivers/isdn/hardware/avm/t1pci.c | |||
| @@ -187,8 +187,7 @@ static char *t1pci_procinfo(struct capi_ctr *ctrl) | |||
| 187 | 187 | ||
| 188 | /* ------------------------------------------------------------- */ | 188 | /* ------------------------------------------------------------- */ |
| 189 | 189 | ||
| 190 | static int __devinit t1pci_probe(struct pci_dev *dev, | 190 | static int t1pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) |
| 191 | const struct pci_device_id *ent) | ||
| 192 | { | 191 | { |
| 193 | struct capicardparams param; | 192 | struct capicardparams param; |
| 194 | int retval; | 193 | int retval; |
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c index ca6d276bb256..52377b4bf039 100644 --- a/drivers/isdn/hardware/eicon/divasmain.c +++ b/drivers/isdn/hardware/eicon/divasmain.c | |||
| @@ -150,12 +150,12 @@ MODULE_DEVICE_TABLE(pci, divas_pci_tbl); | |||
| 150 | 150 | ||
| 151 | static int divas_init_one(struct pci_dev *pdev, | 151 | static int divas_init_one(struct pci_dev *pdev, |
| 152 | const struct pci_device_id *ent); | 152 | const struct pci_device_id *ent); |
| 153 | static void __devexit divas_remove_one(struct pci_dev *pdev); | 153 | static void divas_remove_one(struct pci_dev *pdev); |
| 154 | 154 | ||
| 155 | static struct pci_driver diva_pci_driver = { | 155 | static struct pci_driver diva_pci_driver = { |
| 156 | .name = "divas", | 156 | .name = "divas", |
| 157 | .probe = divas_init_one, | 157 | .probe = divas_init_one, |
| 158 | .remove = __devexit_p(divas_remove_one), | 158 | .remove = divas_remove_one, |
| 159 | .id_table = divas_pci_tbl, | 159 | .id_table = divas_pci_tbl, |
| 160 | }; | 160 | }; |
| 161 | 161 | ||
| @@ -688,8 +688,7 @@ static int __init divas_register_chrdev(void) | |||
| 688 | /* -------------------------------------------------------------------------- | 688 | /* -------------------------------------------------------------------------- |
| 689 | PCI driver section | 689 | PCI driver section |
| 690 | -------------------------------------------------------------------------- */ | 690 | -------------------------------------------------------------------------- */ |
| 691 | static int __devinit divas_init_one(struct pci_dev *pdev, | 691 | static int divas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 692 | const struct pci_device_id *ent) | ||
| 693 | { | 692 | { |
| 694 | void *pdiva = NULL; | 693 | void *pdiva = NULL; |
| 695 | u8 pci_latency; | 694 | u8 pci_latency; |
| @@ -749,7 +748,7 @@ static int __devinit divas_init_one(struct pci_dev *pdev, | |||
| 749 | return (0); | 748 | return (0); |
| 750 | } | 749 | } |
| 751 | 750 | ||
| 752 | static void __devexit divas_remove_one(struct pci_dev *pdev) | 751 | static void divas_remove_one(struct pci_dev *pdev) |
| 753 | { | 752 | { |
| 754 | void *pdiva = pci_get_drvdata(pdev); | 753 | void *pdiva = pci_get_drvdata(pdev); |
| 755 | 754 | ||
diff --git a/drivers/isdn/hardware/mISDN/avmfritz.c b/drivers/isdn/hardware/mISDN/avmfritz.c index dceaec821b0e..292991c90c02 100644 --- a/drivers/isdn/hardware/mISDN/avmfritz.c +++ b/drivers/isdn/hardware/mISDN/avmfritz.c | |||
| @@ -1034,7 +1034,7 @@ release_card(struct fritzcard *card) | |||
| 1034 | AVM_cnt--; | 1034 | AVM_cnt--; |
| 1035 | } | 1035 | } |
| 1036 | 1036 | ||
| 1037 | static int __devinit | 1037 | static int |
| 1038 | setup_instance(struct fritzcard *card) | 1038 | setup_instance(struct fritzcard *card) |
| 1039 | { | 1039 | { |
| 1040 | int i, err; | 1040 | int i, err; |
| @@ -1096,7 +1096,7 @@ error: | |||
| 1096 | return err; | 1096 | return err; |
| 1097 | } | 1097 | } |
| 1098 | 1098 | ||
| 1099 | static int __devinit | 1099 | static int |
| 1100 | fritzpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 1100 | fritzpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 1101 | { | 1101 | { |
| 1102 | int err = -ENOMEM; | 1102 | int err = -ENOMEM; |
| @@ -1130,7 +1130,7 @@ fritzpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 1130 | return err; | 1130 | return err; |
| 1131 | } | 1131 | } |
| 1132 | 1132 | ||
| 1133 | static void __devexit | 1133 | static void |
| 1134 | fritz_remove_pci(struct pci_dev *pdev) | 1134 | fritz_remove_pci(struct pci_dev *pdev) |
| 1135 | { | 1135 | { |
| 1136 | struct fritzcard *card = pci_get_drvdata(pdev); | 1136 | struct fritzcard *card = pci_get_drvdata(pdev); |
| @@ -1142,7 +1142,7 @@ fritz_remove_pci(struct pci_dev *pdev) | |||
| 1142 | pr_info("%s: drvdata already removed\n", __func__); | 1142 | pr_info("%s: drvdata already removed\n", __func__); |
| 1143 | } | 1143 | } |
| 1144 | 1144 | ||
| 1145 | static struct pci_device_id fcpci_ids[] __devinitdata = { | 1145 | static struct pci_device_id fcpci_ids[] = { |
| 1146 | { PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1, PCI_ANY_ID, PCI_ANY_ID, | 1146 | { PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1, PCI_ANY_ID, PCI_ANY_ID, |
| 1147 | 0, 0, (unsigned long) "Fritz!Card PCI"}, | 1147 | 0, 0, (unsigned long) "Fritz!Card PCI"}, |
| 1148 | { PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1_V2, PCI_ANY_ID, PCI_ANY_ID, | 1148 | { PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1_V2, PCI_ANY_ID, PCI_ANY_ID, |
| @@ -1154,7 +1154,7 @@ MODULE_DEVICE_TABLE(pci, fcpci_ids); | |||
| 1154 | static struct pci_driver fcpci_driver = { | 1154 | static struct pci_driver fcpci_driver = { |
| 1155 | .name = "fcpci", | 1155 | .name = "fcpci", |
| 1156 | .probe = fritzpci_probe, | 1156 | .probe = fritzpci_probe, |
| 1157 | .remove = __devexit_p(fritz_remove_pci), | 1157 | .remove = fritz_remove_pci, |
| 1158 | .id_table = fcpci_ids, | 1158 | .id_table = fcpci_ids, |
| 1159 | }; | 1159 | }; |
| 1160 | 1160 | ||
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index f02794203bb1..28543d795188 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c | |||
| @@ -5274,7 +5274,7 @@ free_card: | |||
| 5274 | return ret_err; | 5274 | return ret_err; |
| 5275 | } | 5275 | } |
| 5276 | 5276 | ||
| 5277 | static void __devexit hfc_remove_pci(struct pci_dev *pdev) | 5277 | static void hfc_remove_pci(struct pci_dev *pdev) |
| 5278 | { | 5278 | { |
| 5279 | struct hfc_multi *card = pci_get_drvdata(pdev); | 5279 | struct hfc_multi *card = pci_get_drvdata(pdev); |
| 5280 | u_long flags; | 5280 | u_long flags; |
| @@ -5351,7 +5351,7 @@ static const struct hm_map hfcm_map[] = { | |||
| 5351 | 5351 | ||
| 5352 | #undef H | 5352 | #undef H |
| 5353 | #define H(x) ((unsigned long)&hfcm_map[x]) | 5353 | #define H(x) ((unsigned long)&hfcm_map[x]) |
| 5354 | static struct pci_device_id hfmultipci_ids[] __devinitdata = { | 5354 | static struct pci_device_id hfmultipci_ids[] = { |
| 5355 | 5355 | ||
| 5356 | /* Cards with HFC-4S Chip */ | 5356 | /* Cards with HFC-4S Chip */ |
| 5357 | { PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD, | 5357 | { PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD, |
| @@ -5472,7 +5472,7 @@ hfcmulti_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 5472 | static struct pci_driver hfcmultipci_driver = { | 5472 | static struct pci_driver hfcmultipci_driver = { |
| 5473 | .name = "hfc_multi", | 5473 | .name = "hfc_multi", |
| 5474 | .probe = hfcmulti_probe, | 5474 | .probe = hfcmulti_probe, |
| 5475 | .remove = __devexit_p(hfc_remove_pci), | 5475 | .remove = hfc_remove_pci, |
| 5476 | .id_table = hfmultipci_ids, | 5476 | .id_table = hfmultipci_ids, |
| 5477 | }; | 5477 | }; |
| 5478 | 5478 | ||
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index 6e99d73563b8..a7e4939787c9 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c | |||
| @@ -2215,7 +2215,7 @@ static struct pci_device_id hfc_ids[] = | |||
| 2215 | {}, | 2215 | {}, |
| 2216 | }; | 2216 | }; |
| 2217 | 2217 | ||
| 2218 | static int __devinit | 2218 | static int |
| 2219 | hfc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 2219 | hfc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 2220 | { | 2220 | { |
| 2221 | int err = -ENOMEM; | 2221 | int err = -ENOMEM; |
| @@ -2246,7 +2246,7 @@ hfc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 2246 | return err; | 2246 | return err; |
| 2247 | } | 2247 | } |
| 2248 | 2248 | ||
| 2249 | static void __devexit | 2249 | static void |
| 2250 | hfc_remove_pci(struct pci_dev *pdev) | 2250 | hfc_remove_pci(struct pci_dev *pdev) |
| 2251 | { | 2251 | { |
| 2252 | struct hfc_pci *card = pci_get_drvdata(pdev); | 2252 | struct hfc_pci *card = pci_get_drvdata(pdev); |
| @@ -2263,7 +2263,7 @@ hfc_remove_pci(struct pci_dev *pdev) | |||
| 2263 | static struct pci_driver hfc_driver = { | 2263 | static struct pci_driver hfc_driver = { |
| 2264 | .name = "hfcpci", | 2264 | .name = "hfcpci", |
| 2265 | .probe = hfc_probe, | 2265 | .probe = hfc_probe, |
| 2266 | .remove = __devexit_p(hfc_remove_pci), | 2266 | .remove = hfc_remove_pci, |
| 2267 | .id_table = hfc_ids, | 2267 | .id_table = hfc_ids, |
| 2268 | }; | 2268 | }; |
| 2269 | 2269 | ||
diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware/mISDN/mISDNinfineon.c index 631eb3fa63cf..c1493f4162fb 100644 --- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c +++ b/drivers/isdn/hardware/mISDN/mISDNinfineon.c | |||
| @@ -125,7 +125,7 @@ struct inf_hw { | |||
| 125 | #define PCI_SUBVENDOR_SEDLBAUER_PCI 0x53 | 125 | #define PCI_SUBVENDOR_SEDLBAUER_PCI 0x53 |
| 126 | #define PCI_SUB_ID_SEDLBAUER 0x01 | 126 | #define PCI_SUB_ID_SEDLBAUER 0x01 |
| 127 | 127 | ||
| 128 | static struct pci_device_id infineon_ids[] __devinitdata = { | 128 | static struct pci_device_id infineon_ids[] = { |
| 129 | { PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA20), INF_DIVA20 }, | 129 | { PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA20), INF_DIVA20 }, |
| 130 | { PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA20_U), INF_DIVA20U }, | 130 | { PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA20_U), INF_DIVA20U }, |
| 131 | { PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA201), INF_DIVA201 }, | 131 | { PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA201), INF_DIVA201 }, |
| @@ -603,7 +603,7 @@ inf_ctrl(struct inf_hw *hw, u32 cmd, u_long arg) | |||
| 603 | return ret; | 603 | return ret; |
| 604 | } | 604 | } |
| 605 | 605 | ||
| 606 | static int __devinit | 606 | static int |
| 607 | init_irq(struct inf_hw *hw) | 607 | init_irq(struct inf_hw *hw) |
| 608 | { | 608 | { |
| 609 | int ret, cnt = 3; | 609 | int ret, cnt = 3; |
| @@ -662,7 +662,7 @@ release_io(struct inf_hw *hw) | |||
| 662 | } | 662 | } |
| 663 | } | 663 | } |
| 664 | 664 | ||
| 665 | static int __devinit | 665 | static int |
| 666 | setup_io(struct inf_hw *hw) | 666 | setup_io(struct inf_hw *hw) |
| 667 | { | 667 | { |
| 668 | int err = 0; | 668 | int err = 0; |
| @@ -896,7 +896,7 @@ release_card(struct inf_hw *card) { | |||
| 896 | inf_cnt--; | 896 | inf_cnt--; |
| 897 | } | 897 | } |
| 898 | 898 | ||
| 899 | static int __devinit | 899 | static int |
| 900 | setup_instance(struct inf_hw *card) | 900 | setup_instance(struct inf_hw *card) |
| 901 | { | 901 | { |
| 902 | int err; | 902 | int err; |
| @@ -1060,7 +1060,7 @@ static const struct inf_cinfo inf_card_info[] = { | |||
| 1060 | } | 1060 | } |
| 1061 | }; | 1061 | }; |
| 1062 | 1062 | ||
| 1063 | static const struct inf_cinfo * __devinit | 1063 | static const struct inf_cinfo * |
| 1064 | get_card_info(enum inf_types typ) | 1064 | get_card_info(enum inf_types typ) |
| 1065 | { | 1065 | { |
| 1066 | const struct inf_cinfo *ci = inf_card_info; | 1066 | const struct inf_cinfo *ci = inf_card_info; |
| @@ -1073,7 +1073,7 @@ get_card_info(enum inf_types typ) | |||
| 1073 | return NULL; | 1073 | return NULL; |
| 1074 | } | 1074 | } |
| 1075 | 1075 | ||
| 1076 | static int __devinit | 1076 | static int |
| 1077 | inf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 1077 | inf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 1078 | { | 1078 | { |
| 1079 | int err = -ENOMEM; | 1079 | int err = -ENOMEM; |
| @@ -1135,7 +1135,7 @@ inf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 1135 | return err; | 1135 | return err; |
| 1136 | } | 1136 | } |
| 1137 | 1137 | ||
| 1138 | static void __devexit | 1138 | static void |
| 1139 | inf_remove(struct pci_dev *pdev) | 1139 | inf_remove(struct pci_dev *pdev) |
| 1140 | { | 1140 | { |
| 1141 | struct inf_hw *card = pci_get_drvdata(pdev); | 1141 | struct inf_hw *card = pci_get_drvdata(pdev); |
| @@ -1149,7 +1149,7 @@ inf_remove(struct pci_dev *pdev) | |||
| 1149 | static struct pci_driver infineon_driver = { | 1149 | static struct pci_driver infineon_driver = { |
| 1150 | .name = "ISDN Infineon pci", | 1150 | .name = "ISDN Infineon pci", |
| 1151 | .probe = inf_probe, | 1151 | .probe = inf_probe, |
| 1152 | .remove = __devexit_p(inf_remove), | 1152 | .remove = inf_remove, |
| 1153 | .id_table = infineon_ids, | 1153 | .id_table = infineon_ids, |
| 1154 | }; | 1154 | }; |
| 1155 | 1155 | ||
diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c index 9bcade59eb73..8e2944784e00 100644 --- a/drivers/isdn/hardware/mISDN/netjet.c +++ b/drivers/isdn/hardware/mISDN/netjet.c | |||
| @@ -1008,7 +1008,7 @@ nj_setup(struct tiger_hw *card) | |||
| 1008 | } | 1008 | } |
| 1009 | 1009 | ||
| 1010 | 1010 | ||
| 1011 | static int __devinit | 1011 | static int |
| 1012 | setup_instance(struct tiger_hw *card) | 1012 | setup_instance(struct tiger_hw *card) |
| 1013 | { | 1013 | { |
| 1014 | int i, err; | 1014 | int i, err; |
| @@ -1059,7 +1059,7 @@ error: | |||
| 1059 | return err; | 1059 | return err; |
| 1060 | } | 1060 | } |
| 1061 | 1061 | ||
| 1062 | static int __devinit | 1062 | static int |
| 1063 | nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 1063 | nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 1064 | { | 1064 | { |
| 1065 | int err = -ENOMEM; | 1065 | int err = -ENOMEM; |
| @@ -1124,7 +1124,7 @@ nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 1124 | } | 1124 | } |
| 1125 | 1125 | ||
| 1126 | 1126 | ||
| 1127 | static void __devexit nj_remove(struct pci_dev *pdev) | 1127 | static void nj_remove(struct pci_dev *pdev) |
| 1128 | { | 1128 | { |
| 1129 | struct tiger_hw *card = pci_get_drvdata(pdev); | 1129 | struct tiger_hw *card = pci_get_drvdata(pdev); |
| 1130 | 1130 | ||
| @@ -1137,7 +1137,7 @@ static void __devexit nj_remove(struct pci_dev *pdev) | |||
| 1137 | /* We cannot select cards with PCI_SUB... IDs, since here are cards with | 1137 | /* We cannot select cards with PCI_SUB... IDs, since here are cards with |
| 1138 | * SUB IDs set to PCI_ANY_ID, so we need to match all and reject | 1138 | * SUB IDs set to PCI_ANY_ID, so we need to match all and reject |
| 1139 | * known other cards which not work with this driver - see probe function */ | 1139 | * known other cards which not work with this driver - see probe function */ |
| 1140 | static struct pci_device_id nj_pci_ids[] __devinitdata = { | 1140 | static struct pci_device_id nj_pci_ids[] = { |
| 1141 | { PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_300, | 1141 | { PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_300, |
| 1142 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 1142 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
| 1143 | { } | 1143 | { } |
| @@ -1147,7 +1147,7 @@ MODULE_DEVICE_TABLE(pci, nj_pci_ids); | |||
| 1147 | static struct pci_driver nj_driver = { | 1147 | static struct pci_driver nj_driver = { |
| 1148 | .name = "netjet", | 1148 | .name = "netjet", |
| 1149 | .probe = nj_probe, | 1149 | .probe = nj_probe, |
| 1150 | .remove = __devexit_p(nj_remove), | 1150 | .remove = nj_remove, |
| 1151 | .id_table = nj_pci_ids, | 1151 | .id_table = nj_pci_ids, |
| 1152 | }; | 1152 | }; |
| 1153 | 1153 | ||
diff --git a/drivers/isdn/hardware/mISDN/speedfax.c b/drivers/isdn/hardware/mISDN/speedfax.c index 93f344d74e54..9815bb4eec9c 100644 --- a/drivers/isdn/hardware/mISDN/speedfax.c +++ b/drivers/isdn/hardware/mISDN/speedfax.c | |||
| @@ -282,7 +282,7 @@ sfax_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg) | |||
| 282 | return err; | 282 | return err; |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | static int __devinit | 285 | static int |
| 286 | init_card(struct sfax_hw *sf) | 286 | init_card(struct sfax_hw *sf) |
| 287 | { | 287 | { |
| 288 | int ret, cnt = 3; | 288 | int ret, cnt = 3; |
| @@ -321,7 +321,7 @@ init_card(struct sfax_hw *sf) | |||
| 321 | } | 321 | } |
| 322 | 322 | ||
| 323 | 323 | ||
| 324 | static int __devinit | 324 | static int |
| 325 | setup_speedfax(struct sfax_hw *sf) | 325 | setup_speedfax(struct sfax_hw *sf) |
| 326 | { | 326 | { |
| 327 | u_long flags; | 327 | u_long flags; |
| @@ -371,7 +371,7 @@ release_card(struct sfax_hw *card) { | |||
| 371 | sfax_cnt--; | 371 | sfax_cnt--; |
| 372 | } | 372 | } |
| 373 | 373 | ||
| 374 | static int __devinit | 374 | static int |
| 375 | setup_instance(struct sfax_hw *card) | 375 | setup_instance(struct sfax_hw *card) |
| 376 | { | 376 | { |
| 377 | const struct firmware *firmware; | 377 | const struct firmware *firmware; |
| @@ -451,7 +451,7 @@ error_fw: | |||
| 451 | return err; | 451 | return err; |
| 452 | } | 452 | } |
| 453 | 453 | ||
| 454 | static int __devinit | 454 | static int |
| 455 | sfaxpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 455 | sfaxpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 456 | { | 456 | { |
| 457 | int err = -ENOMEM; | 457 | int err = -ENOMEM; |
| @@ -480,7 +480,7 @@ sfaxpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 480 | return err; | 480 | return err; |
| 481 | } | 481 | } |
| 482 | 482 | ||
| 483 | static void __devexit | 483 | static void |
| 484 | sfax_remove_pci(struct pci_dev *pdev) | 484 | sfax_remove_pci(struct pci_dev *pdev) |
| 485 | { | 485 | { |
| 486 | struct sfax_hw *card = pci_get_drvdata(pdev); | 486 | struct sfax_hw *card = pci_get_drvdata(pdev); |
| @@ -491,7 +491,7 @@ sfax_remove_pci(struct pci_dev *pdev) | |||
| 491 | pr_debug("%s: drvdata already removed\n", __func__); | 491 | pr_debug("%s: drvdata already removed\n", __func__); |
| 492 | } | 492 | } |
| 493 | 493 | ||
| 494 | static struct pci_device_id sfaxpci_ids[] __devinitdata = { | 494 | static struct pci_device_id sfaxpci_ids[] = { |
| 495 | { PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_100, | 495 | { PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_100, |
| 496 | PCI_SUBVENDOR_SPEEDFAX_PYRAMID, PCI_SUB_ID_SEDLBAUER, | 496 | PCI_SUBVENDOR_SPEEDFAX_PYRAMID, PCI_SUB_ID_SEDLBAUER, |
| 497 | 0, 0, (unsigned long) "Pyramid Speedfax + PCI" | 497 | 0, 0, (unsigned long) "Pyramid Speedfax + PCI" |
| @@ -507,7 +507,7 @@ MODULE_DEVICE_TABLE(pci, sfaxpci_ids); | |||
| 507 | static struct pci_driver sfaxpci_driver = { | 507 | static struct pci_driver sfaxpci_driver = { |
| 508 | .name = "speedfax+ pci", | 508 | .name = "speedfax+ pci", |
| 509 | .probe = sfaxpci_probe, | 509 | .probe = sfaxpci_probe, |
| 510 | .remove = __devexit_p(sfax_remove_pci), | 510 | .remove = sfax_remove_pci, |
| 511 | .id_table = sfaxpci_ids, | 511 | .id_table = sfaxpci_ids, |
| 512 | }; | 512 | }; |
| 513 | 513 | ||
diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c index 335fe6455002..de69f6828c76 100644 --- a/drivers/isdn/hardware/mISDN/w6692.c +++ b/drivers/isdn/hardware/mISDN/w6692.c | |||
| @@ -1355,7 +1355,7 @@ error_setup: | |||
| 1355 | return err; | 1355 | return err; |
| 1356 | } | 1356 | } |
| 1357 | 1357 | ||
| 1358 | static int __devinit | 1358 | static int |
| 1359 | w6692_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 1359 | w6692_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 1360 | { | 1360 | { |
| 1361 | int err = -ENOMEM; | 1361 | int err = -ENOMEM; |
| @@ -1387,7 +1387,7 @@ w6692_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 1387 | return err; | 1387 | return err; |
| 1388 | } | 1388 | } |
| 1389 | 1389 | ||
| 1390 | static void __devexit | 1390 | static void |
| 1391 | w6692_remove_pci(struct pci_dev *pdev) | 1391 | w6692_remove_pci(struct pci_dev *pdev) |
| 1392 | { | 1392 | { |
| 1393 | struct w6692_hw *card = pci_get_drvdata(pdev); | 1393 | struct w6692_hw *card = pci_get_drvdata(pdev); |
| @@ -1414,7 +1414,7 @@ MODULE_DEVICE_TABLE(pci, w6692_ids); | |||
| 1414 | static struct pci_driver w6692_driver = { | 1414 | static struct pci_driver w6692_driver = { |
| 1415 | .name = "w6692", | 1415 | .name = "w6692", |
| 1416 | .probe = w6692_probe, | 1416 | .probe = w6692_probe, |
| 1417 | .remove = __devexit_p(w6692_remove_pci), | 1417 | .remove = w6692_remove_pci, |
| 1418 | .id_table = w6692_ids, | 1418 | .id_table = w6692_ids, |
| 1419 | }; | 1419 | }; |
| 1420 | 1420 | ||
diff --git a/drivers/isdn/hisax/amd7930_fn.c b/drivers/isdn/hisax/amd7930_fn.c index 525471e776a7..1063babe1d3a 100644 --- a/drivers/isdn/hisax/amd7930_fn.c +++ b/drivers/isdn/hisax/amd7930_fn.c | |||
| @@ -786,8 +786,7 @@ void Amd7930_init(struct IsdnCardState *cs) | |||
| 786 | } | 786 | } |
| 787 | } | 787 | } |
| 788 | 788 | ||
| 789 | void __devinit | 789 | void setup_Amd7930(struct IsdnCardState *cs) |
| 790 | setup_Amd7930(struct IsdnCardState *cs) | ||
| 791 | { | 790 | { |
| 792 | INIT_WORK(&cs->tqueue, Amd7930_bh); | 791 | INIT_WORK(&cs->tqueue, Amd7930_bh); |
| 793 | cs->dbusytimer.function = (void *) dbusy_timer_handler; | 792 | cs->dbusytimer.function = (void *) dbusy_timer_handler; |
diff --git a/drivers/isdn/hisax/asuscom.c b/drivers/isdn/hisax/asuscom.c index 2b74a40ad2a0..62f9c43e2377 100644 --- a/drivers/isdn/hisax/asuscom.c +++ b/drivers/isdn/hisax/asuscom.c | |||
| @@ -295,7 +295,7 @@ Asus_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | #ifdef __ISAPNP__ | 297 | #ifdef __ISAPNP__ |
| 298 | static struct isapnp_device_id asus_ids[] __devinitdata = { | 298 | static struct isapnp_device_id asus_ids[] = { |
| 299 | { ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688), | 299 | { ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688), |
| 300 | ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688), | 300 | ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688), |
| 301 | (unsigned long) "Asus1688 PnP" }, | 301 | (unsigned long) "Asus1688 PnP" }, |
| @@ -311,12 +311,11 @@ static struct isapnp_device_id asus_ids[] __devinitdata = { | |||
| 311 | { 0, } | 311 | { 0, } |
| 312 | }; | 312 | }; |
| 313 | 313 | ||
| 314 | static struct isapnp_device_id *ipid __devinitdata = &asus_ids[0]; | 314 | static struct isapnp_device_id *ipid = &asus_ids[0]; |
| 315 | static struct pnp_card *pnp_c __devinitdata = NULL; | 315 | static struct pnp_card *pnp_c = NULL; |
| 316 | #endif | 316 | #endif |
| 317 | 317 | ||
| 318 | int __devinit | 318 | int setup_asuscom(struct IsdnCard *card) |
| 319 | setup_asuscom(struct IsdnCard *card) | ||
| 320 | { | 319 | { |
| 321 | int bytecnt; | 320 | int bytecnt; |
| 322 | struct IsdnCardState *cs = card->cs; | 321 | struct IsdnCardState *cs = card->cs; |
diff --git a/drivers/isdn/hisax/avm_a1.c b/drivers/isdn/hisax/avm_a1.c index 402d489cbbf1..7dd74087ad72 100644 --- a/drivers/isdn/hisax/avm_a1.c +++ b/drivers/isdn/hisax/avm_a1.c | |||
| @@ -177,8 +177,7 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 177 | return (0); | 177 | return (0); |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | int __devinit | 180 | int setup_avm_a1(struct IsdnCard *card) |
| 181 | setup_avm_a1(struct IsdnCard *card) | ||
| 182 | { | 181 | { |
| 183 | u_char val; | 182 | u_char val; |
| 184 | struct IsdnCardState *cs = card->cs; | 183 | struct IsdnCardState *cs = card->cs; |
diff --git a/drivers/isdn/hisax/avm_a1p.c b/drivers/isdn/hisax/avm_a1p.c index 39347198d643..bc52d54ff5e1 100644 --- a/drivers/isdn/hisax/avm_a1p.c +++ b/drivers/isdn/hisax/avm_a1p.c | |||
| @@ -213,7 +213,7 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 213 | return 0; | 213 | return 0; |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | int __devinit setup_avm_a1_pcmcia(struct IsdnCard *card) | 216 | int setup_avm_a1_pcmcia(struct IsdnCard *card) |
| 217 | { | 217 | { |
| 218 | u_char model, vers; | 218 | u_char model, vers; |
| 219 | struct IsdnCardState *cs = card->cs; | 219 | struct IsdnCardState *cs = card->cs; |
diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c index 979492d69dae..ee9b9a03cffa 100644 --- a/drivers/isdn/hisax/avm_pci.c +++ b/drivers/isdn/hisax/avm_pci.c | |||
| @@ -718,7 +718,7 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 718 | return (0); | 718 | return (0); |
| 719 | } | 719 | } |
| 720 | 720 | ||
| 721 | static int __devinit avm_setup_rest(struct IsdnCardState *cs) | 721 | static int avm_setup_rest(struct IsdnCardState *cs) |
| 722 | { | 722 | { |
| 723 | u_int val, ver; | 723 | u_int val, ver; |
| 724 | 724 | ||
| @@ -770,16 +770,16 @@ static int __devinit avm_setup_rest(struct IsdnCardState *cs) | |||
| 770 | 770 | ||
| 771 | #ifndef __ISAPNP__ | 771 | #ifndef __ISAPNP__ |
| 772 | 772 | ||
| 773 | static int __devinit avm_pnp_setup(struct IsdnCardState *cs) | 773 | static int avm_pnp_setup(struct IsdnCardState *cs) |
| 774 | { | 774 | { |
| 775 | return (1); /* no-op: success */ | 775 | return (1); /* no-op: success */ |
| 776 | } | 776 | } |
| 777 | 777 | ||
| 778 | #else | 778 | #else |
| 779 | 779 | ||
| 780 | static struct pnp_card *pnp_avm_c __devinitdata = NULL; | 780 | static struct pnp_card *pnp_avm_c = NULL; |
| 781 | 781 | ||
| 782 | static int __devinit avm_pnp_setup(struct IsdnCardState *cs) | 782 | static int avm_pnp_setup(struct IsdnCardState *cs) |
| 783 | { | 783 | { |
| 784 | struct pnp_dev *pnp_avm_d = NULL; | 784 | struct pnp_dev *pnp_avm_d = NULL; |
| 785 | 785 | ||
| @@ -825,16 +825,16 @@ static int __devinit avm_pnp_setup(struct IsdnCardState *cs) | |||
| 825 | 825 | ||
| 826 | #ifndef CONFIG_PCI | 826 | #ifndef CONFIG_PCI |
| 827 | 827 | ||
| 828 | static int __devinit avm_pci_setup(struct IsdnCardState *cs) | 828 | static int avm_pci_setup(struct IsdnCardState *cs) |
| 829 | { | 829 | { |
| 830 | return (1); /* no-op: success */ | 830 | return (1); /* no-op: success */ |
| 831 | } | 831 | } |
| 832 | 832 | ||
| 833 | #else | 833 | #else |
| 834 | 834 | ||
| 835 | static struct pci_dev *dev_avm __devinitdata = NULL; | 835 | static struct pci_dev *dev_avm = NULL; |
| 836 | 836 | ||
| 837 | static int __devinit avm_pci_setup(struct IsdnCardState *cs) | 837 | static int avm_pci_setup(struct IsdnCardState *cs) |
| 838 | { | 838 | { |
| 839 | if ((dev_avm = hisax_find_pci_device(PCI_VENDOR_ID_AVM, | 839 | if ((dev_avm = hisax_find_pci_device(PCI_VENDOR_ID_AVM, |
| 840 | PCI_DEVICE_ID_AVM_A1, dev_avm))) { | 840 | PCI_DEVICE_ID_AVM_A1, dev_avm))) { |
| @@ -867,8 +867,7 @@ static int __devinit avm_pci_setup(struct IsdnCardState *cs) | |||
| 867 | 867 | ||
| 868 | #endif /* CONFIG_PCI */ | 868 | #endif /* CONFIG_PCI */ |
| 869 | 869 | ||
| 870 | int __devinit | 870 | int setup_avm_pcipnp(struct IsdnCard *card) |
| 871 | setup_avm_pcipnp(struct IsdnCard *card) | ||
| 872 | { | 871 | { |
| 873 | struct IsdnCardState *cs = card->cs; | 872 | struct IsdnCardState *cs = card->cs; |
| 874 | char tmp[64]; | 873 | char tmp[64]; |
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c index c644557ae614..4e676bcf8506 100644 --- a/drivers/isdn/hisax/avma1_cs.c +++ b/drivers/isdn/hisax/avma1_cs.c | |||
| @@ -38,11 +38,11 @@ module_param(isdnprot, int, 0); | |||
| 38 | 38 | ||
| 39 | /*====================================================================*/ | 39 | /*====================================================================*/ |
| 40 | 40 | ||
| 41 | static int avma1cs_config(struct pcmcia_device *link) __devinit; | 41 | static int avma1cs_config(struct pcmcia_device *link); |
| 42 | static void avma1cs_release(struct pcmcia_device *link); | 42 | static void avma1cs_release(struct pcmcia_device *link); |
| 43 | static void avma1cs_detach(struct pcmcia_device *p_dev) __devexit; | 43 | static void avma1cs_detach(struct pcmcia_device *p_dev); |
| 44 | 44 | ||
| 45 | static int __devinit avma1cs_probe(struct pcmcia_device *p_dev) | 45 | static int avma1cs_probe(struct pcmcia_device *p_dev) |
| 46 | { | 46 | { |
| 47 | dev_dbg(&p_dev->dev, "avma1cs_attach()\n"); | 47 | dev_dbg(&p_dev->dev, "avma1cs_attach()\n"); |
| 48 | 48 | ||
| @@ -54,7 +54,7 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev) | |||
| 54 | return avma1cs_config(p_dev); | 54 | return avma1cs_config(p_dev); |
| 55 | } /* avma1cs_attach */ | 55 | } /* avma1cs_attach */ |
| 56 | 56 | ||
| 57 | static void __devexit avma1cs_detach(struct pcmcia_device *link) | 57 | static void avma1cs_detach(struct pcmcia_device *link) |
| 58 | { | 58 | { |
| 59 | dev_dbg(&link->dev, "avma1cs_detach(0x%p)\n", link); | 59 | dev_dbg(&link->dev, "avma1cs_detach(0x%p)\n", link); |
| 60 | avma1cs_release(link); | 60 | avma1cs_release(link); |
| @@ -72,7 +72,7 @@ static int avma1cs_configcheck(struct pcmcia_device *p_dev, void *priv_data) | |||
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | 74 | ||
| 75 | static int __devinit avma1cs_config(struct pcmcia_device *link) | 75 | static int avma1cs_config(struct pcmcia_device *link) |
| 76 | { | 76 | { |
| 77 | int i = -1; | 77 | int i = -1; |
| 78 | char devname[128]; | 78 | char devname[128]; |
| @@ -156,7 +156,7 @@ static struct pcmcia_driver avma1cs_driver = { | |||
| 156 | .owner = THIS_MODULE, | 156 | .owner = THIS_MODULE, |
| 157 | .name = "avma1_cs", | 157 | .name = "avma1_cs", |
| 158 | .probe = avma1cs_probe, | 158 | .probe = avma1cs_probe, |
| 159 | .remove = __devexit_p(avma1cs_detach), | 159 | .remove = avma1cs_detach, |
| 160 | .id_table = avma1cs_ids, | 160 | .id_table = avma1cs_ids, |
| 161 | }; | 161 | }; |
| 162 | 162 | ||
diff --git a/drivers/isdn/hisax/bkm_a4t.c b/drivers/isdn/hisax/bkm_a4t.c index f6bf9c68892e..c360164bde1b 100644 --- a/drivers/isdn/hisax/bkm_a4t.c +++ b/drivers/isdn/hisax/bkm_a4t.c | |||
| @@ -253,10 +253,8 @@ BKM_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 253 | return (0); | 253 | return (0); |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | static int __devinit a4t_pci_probe(struct pci_dev *dev_a4t, | 256 | static int a4t_pci_probe(struct pci_dev *dev_a4t, struct IsdnCardState *cs, |
| 257 | struct IsdnCardState *cs, | 257 | u_int *found, u_int *pci_memaddr) |
| 258 | u_int *found, | ||
| 259 | u_int *pci_memaddr) | ||
| 260 | { | 258 | { |
| 261 | u16 sub_sys; | 259 | u16 sub_sys; |
| 262 | u16 sub_vendor; | 260 | u16 sub_vendor; |
| @@ -275,9 +273,8 @@ static int __devinit a4t_pci_probe(struct pci_dev *dev_a4t, | |||
| 275 | return (-1); /* continue looping */ | 273 | return (-1); /* continue looping */ |
| 276 | } | 274 | } |
| 277 | 275 | ||
| 278 | static int __devinit a4t_cs_init(struct IsdnCard *card, | 276 | static int a4t_cs_init(struct IsdnCard *card, struct IsdnCardState *cs, |
| 279 | struct IsdnCardState *cs, | 277 | u_int pci_memaddr) |
| 280 | u_int pci_memaddr) | ||
| 281 | { | 278 | { |
| 282 | I20_REGISTER_FILE *pI20_Regs; | 279 | I20_REGISTER_FILE *pI20_Regs; |
| 283 | 280 | ||
| @@ -323,10 +320,9 @@ static int __devinit a4t_cs_init(struct IsdnCard *card, | |||
| 323 | return (1); | 320 | return (1); |
| 324 | } | 321 | } |
| 325 | 322 | ||
| 326 | static struct pci_dev *dev_a4t __devinitdata = NULL; | 323 | static struct pci_dev *dev_a4t = NULL; |
| 327 | 324 | ||
| 328 | int __devinit | 325 | int setup_bkm_a4t(struct IsdnCard *card) |
| 329 | setup_bkm_a4t(struct IsdnCard *card) | ||
| 330 | { | 326 | { |
| 331 | struct IsdnCardState *cs = card->cs; | 327 | struct IsdnCardState *cs = card->cs; |
| 332 | char tmp[64]; | 328 | char tmp[64]; |
diff --git a/drivers/isdn/hisax/bkm_a8.c b/drivers/isdn/hisax/bkm_a8.c index c9c98f071af6..dd663ea57ec6 100644 --- a/drivers/isdn/hisax/bkm_a8.c +++ b/drivers/isdn/hisax/bkm_a8.c | |||
| @@ -255,8 +255,7 @@ BKM_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 255 | return (0); | 255 | return (0); |
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | static int __devinit | 258 | static int sct_alloc_io(u_int adr, u_int len) |
| 259 | sct_alloc_io(u_int adr, u_int len) | ||
| 260 | { | 259 | { |
| 261 | if (!request_region(adr, len, "scitel")) { | 260 | if (!request_region(adr, len, "scitel")) { |
| 262 | printk(KERN_WARNING | 261 | printk(KERN_WARNING |
| @@ -267,15 +266,14 @@ sct_alloc_io(u_int adr, u_int len) | |||
| 267 | return (0); | 266 | return (0); |
| 268 | } | 267 | } |
| 269 | 268 | ||
| 270 | static struct pci_dev *dev_a8 __devinitdata = NULL; | 269 | static struct pci_dev *dev_a8 = NULL; |
| 271 | static u16 sub_vendor_id __devinitdata = 0; | 270 | static u16 sub_vendor_id = 0; |
| 272 | static u16 sub_sys_id __devinitdata = 0; | 271 | static u16 sub_sys_id = 0; |
| 273 | static u_char pci_bus __devinitdata = 0; | 272 | static u_char pci_bus = 0; |
| 274 | static u_char pci_device_fn __devinitdata = 0; | 273 | static u_char pci_device_fn = 0; |
| 275 | static u_char pci_irq __devinitdata = 0; | 274 | static u_char pci_irq = 0; |
| 276 | 275 | ||
| 277 | int __devinit | 276 | int setup_sct_quadro(struct IsdnCard *card) |
| 278 | setup_sct_quadro(struct IsdnCard *card) | ||
| 279 | { | 277 | { |
| 280 | struct IsdnCardState *cs = card->cs; | 278 | struct IsdnCardState *cs = card->cs; |
| 281 | char tmp[64]; | 279 | char tmp[64]; |
diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index b5edc0eeec06..bf04d2a3cf4a 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c | |||
| @@ -338,11 +338,11 @@ static int io[HISAX_MAX_CARDS] = { 0, }; | |||
| 338 | #define IO0_IO1 | 338 | #define IO0_IO1 |
| 339 | #endif | 339 | #endif |
| 340 | #ifdef IO0_IO1 | 340 | #ifdef IO0_IO1 |
| 341 | static int io0[HISAX_MAX_CARDS] __devinitdata = { 0, }; | 341 | static int io0[HISAX_MAX_CARDS] = { 0, }; |
| 342 | static int io1[HISAX_MAX_CARDS] __devinitdata = { 0, }; | 342 | static int io1[HISAX_MAX_CARDS] = { 0, }; |
| 343 | #endif | 343 | #endif |
| 344 | static int irq[HISAX_MAX_CARDS] __devinitdata = { 0, }; | 344 | static int irq[HISAX_MAX_CARDS] = { 0, }; |
| 345 | static int mem[HISAX_MAX_CARDS] __devinitdata = { 0, }; | 345 | static int mem[HISAX_MAX_CARDS] = { 0, }; |
| 346 | static char *id = HiSaxID; | 346 | static char *id = HiSaxID; |
| 347 | 347 | ||
| 348 | MODULE_DESCRIPTION("ISDN4Linux: Driver for passive ISDN cards"); | 348 | MODULE_DESCRIPTION("ISDN4Linux: Driver for passive ISDN cards"); |
| @@ -852,7 +852,7 @@ static int init_card(struct IsdnCardState *cs) | |||
| 852 | return 3; | 852 | return 3; |
| 853 | } | 853 | } |
| 854 | 854 | ||
| 855 | static int __devinit hisax_cs_setup_card(struct IsdnCard *card) | 855 | static int hisax_cs_setup_card(struct IsdnCard *card) |
| 856 | { | 856 | { |
| 857 | int ret; | 857 | int ret; |
| 858 | 858 | ||
| @@ -1171,12 +1171,8 @@ outf_cs: | |||
| 1171 | return 0; | 1171 | return 0; |
| 1172 | } | 1172 | } |
| 1173 | 1173 | ||
| 1174 | /* Used from an exported function but calls __devinit functions. | 1174 | static int checkcard(int cardnr, char *id, int *busy_flag, |
| 1175 | * Tell modpost not to warn (__ref) | 1175 | struct module *lockowner, hisax_setup_func_t card_setup) |
| 1176 | */ | ||
| 1177 | static int __ref checkcard(int cardnr, char *id, int *busy_flag, | ||
| 1178 | struct module *lockowner, | ||
| 1179 | hisax_setup_func_t card_setup) | ||
| 1180 | { | 1176 | { |
| 1181 | int ret; | 1177 | int ret; |
| 1182 | struct IsdnCard *card = cards + cardnr; | 1178 | struct IsdnCard *card = cards + cardnr; |
| @@ -1547,9 +1543,7 @@ static void __exit HiSax_exit(void) | |||
| 1547 | printk(KERN_INFO "HiSax module removed\n"); | 1543 | printk(KERN_INFO "HiSax module removed\n"); |
| 1548 | } | 1544 | } |
| 1549 | 1545 | ||
| 1550 | #ifdef CONFIG_HOTPLUG | 1546 | int hisax_init_pcmcia(void *pcm_iob, int *busy_flag, struct IsdnCard *card) |
| 1551 | |||
| 1552 | int __devinit hisax_init_pcmcia(void *pcm_iob, int *busy_flag, struct IsdnCard *card) | ||
| 1553 | { | 1547 | { |
| 1554 | u_char ids[16]; | 1548 | u_char ids[16]; |
| 1555 | int ret = -1; | 1549 | int ret = -1; |
| @@ -1568,9 +1562,7 @@ int __devinit hisax_init_pcmcia(void *pcm_iob, int *busy_flag, struct IsdnCard * | |||
| 1568 | error: | 1562 | error: |
| 1569 | return ret; | 1563 | return ret; |
| 1570 | } | 1564 | } |
| 1571 | |||
| 1572 | EXPORT_SYMBOL(hisax_init_pcmcia); | 1565 | EXPORT_SYMBOL(hisax_init_pcmcia); |
| 1573 | #endif | ||
| 1574 | 1566 | ||
| 1575 | EXPORT_SYMBOL(HiSax_closecard); | 1567 | EXPORT_SYMBOL(HiSax_closecard); |
| 1576 | 1568 | ||
| @@ -1917,7 +1909,7 @@ static void EChannel_proc_rcv(struct hisax_d_if *d_if) | |||
| 1917 | #ifdef CONFIG_PCI | 1909 | #ifdef CONFIG_PCI |
| 1918 | #include <linux/pci.h> | 1910 | #include <linux/pci.h> |
| 1919 | 1911 | ||
| 1920 | static struct pci_device_id hisax_pci_tbl[] __devinitdata __used = { | 1912 | static struct pci_device_id hisax_pci_tbl[] __used = { |
| 1921 | #ifdef CONFIG_HISAX_FRITZPCI | 1913 | #ifdef CONFIG_HISAX_FRITZPCI |
| 1922 | {PCI_VDEVICE(AVM, PCI_DEVICE_ID_AVM_A1) }, | 1914 | {PCI_VDEVICE(AVM, PCI_DEVICE_ID_AVM_A1) }, |
| 1923 | #endif | 1915 | #endif |
diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c index 62a2945fa7f2..8d0cf6e4dc00 100644 --- a/drivers/isdn/hisax/diva.c +++ b/drivers/isdn/hisax/diva.c | |||
| @@ -904,7 +904,7 @@ Diva_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 904 | return (0); | 904 | return (0); |
| 905 | } | 905 | } |
| 906 | 906 | ||
| 907 | static int __devinit setup_diva_common(struct IsdnCardState *cs) | 907 | static int setup_diva_common(struct IsdnCardState *cs) |
| 908 | { | 908 | { |
| 909 | int bytecnt; | 909 | int bytecnt; |
| 910 | u_char val; | 910 | u_char val; |
| @@ -997,7 +997,7 @@ static int __devinit setup_diva_common(struct IsdnCardState *cs) | |||
| 997 | 997 | ||
| 998 | #ifdef CONFIG_ISA | 998 | #ifdef CONFIG_ISA |
| 999 | 999 | ||
| 1000 | static int __devinit setup_diva_isa(struct IsdnCard *card) | 1000 | static int setup_diva_isa(struct IsdnCard *card) |
| 1001 | { | 1001 | { |
| 1002 | struct IsdnCardState *cs = card->cs; | 1002 | struct IsdnCardState *cs = card->cs; |
| 1003 | u_char val; | 1003 | u_char val; |
| @@ -1033,7 +1033,7 @@ static int __devinit setup_diva_isa(struct IsdnCard *card) | |||
| 1033 | 1033 | ||
| 1034 | #else /* if !CONFIG_ISA */ | 1034 | #else /* if !CONFIG_ISA */ |
| 1035 | 1035 | ||
| 1036 | static int __devinit setup_diva_isa(struct IsdnCard *card) | 1036 | static int setup_diva_isa(struct IsdnCard *card) |
| 1037 | { | 1037 | { |
| 1038 | return (-1); /* card not found; continue search */ | 1038 | return (-1); /* card not found; continue search */ |
| 1039 | } | 1039 | } |
| @@ -1041,7 +1041,7 @@ static int __devinit setup_diva_isa(struct IsdnCard *card) | |||
| 1041 | #endif /* CONFIG_ISA */ | 1041 | #endif /* CONFIG_ISA */ |
| 1042 | 1042 | ||
| 1043 | #ifdef __ISAPNP__ | 1043 | #ifdef __ISAPNP__ |
| 1044 | static struct isapnp_device_id diva_ids[] __devinitdata = { | 1044 | static struct isapnp_device_id diva_ids[] = { |
| 1045 | { ISAPNP_VENDOR('G', 'D', 'I'), ISAPNP_FUNCTION(0x51), | 1045 | { ISAPNP_VENDOR('G', 'D', 'I'), ISAPNP_FUNCTION(0x51), |
| 1046 | ISAPNP_VENDOR('G', 'D', 'I'), ISAPNP_FUNCTION(0x51), | 1046 | ISAPNP_VENDOR('G', 'D', 'I'), ISAPNP_FUNCTION(0x51), |
| 1047 | (unsigned long) "Diva picola" }, | 1047 | (unsigned long) "Diva picola" }, |
| @@ -1063,10 +1063,10 @@ static struct isapnp_device_id diva_ids[] __devinitdata = { | |||
| 1063 | { 0, } | 1063 | { 0, } |
| 1064 | }; | 1064 | }; |
| 1065 | 1065 | ||
| 1066 | static struct isapnp_device_id *ipid __devinitdata = &diva_ids[0]; | 1066 | static struct isapnp_device_id *ipid = &diva_ids[0]; |
| 1067 | static struct pnp_card *pnp_c __devinitdata = NULL; | 1067 | static struct pnp_card *pnp_c = NULL; |
| 1068 | 1068 | ||
| 1069 | static int __devinit setup_diva_isapnp(struct IsdnCard *card) | 1069 | static int setup_diva_isapnp(struct IsdnCard *card) |
| 1070 | { | 1070 | { |
| 1071 | struct IsdnCardState *cs = card->cs; | 1071 | struct IsdnCardState *cs = card->cs; |
| 1072 | struct pnp_dev *pnp_d; | 1072 | struct pnp_dev *pnp_d; |
| @@ -1141,7 +1141,7 @@ static int __devinit setup_diva_isapnp(struct IsdnCard *card) | |||
| 1141 | 1141 | ||
| 1142 | #else /* if !ISAPNP */ | 1142 | #else /* if !ISAPNP */ |
| 1143 | 1143 | ||
| 1144 | static int __devinit setup_diva_isapnp(struct IsdnCard *card) | 1144 | static int setup_diva_isapnp(struct IsdnCard *card) |
| 1145 | { | 1145 | { |
| 1146 | return (-1); /* card not found; continue search */ | 1146 | return (-1); /* card not found; continue search */ |
| 1147 | } | 1147 | } |
| @@ -1149,12 +1149,12 @@ static int __devinit setup_diva_isapnp(struct IsdnCard *card) | |||
| 1149 | #endif /* ISAPNP */ | 1149 | #endif /* ISAPNP */ |
| 1150 | 1150 | ||
| 1151 | #ifdef CONFIG_PCI | 1151 | #ifdef CONFIG_PCI |
| 1152 | static struct pci_dev *dev_diva __devinitdata = NULL; | 1152 | static struct pci_dev *dev_diva = NULL; |
| 1153 | static struct pci_dev *dev_diva_u __devinitdata = NULL; | 1153 | static struct pci_dev *dev_diva_u = NULL; |
| 1154 | static struct pci_dev *dev_diva201 __devinitdata = NULL; | 1154 | static struct pci_dev *dev_diva201 = NULL; |
| 1155 | static struct pci_dev *dev_diva202 __devinitdata = NULL; | 1155 | static struct pci_dev *dev_diva202 = NULL; |
| 1156 | 1156 | ||
| 1157 | static int __devinit setup_diva_pci(struct IsdnCard *card) | 1157 | static int setup_diva_pci(struct IsdnCard *card) |
| 1158 | { | 1158 | { |
| 1159 | struct IsdnCardState *cs = card->cs; | 1159 | struct IsdnCardState *cs = card->cs; |
| 1160 | 1160 | ||
| @@ -1231,15 +1231,14 @@ static int __devinit setup_diva_pci(struct IsdnCard *card) | |||
| 1231 | 1231 | ||
| 1232 | #else /* if !CONFIG_PCI */ | 1232 | #else /* if !CONFIG_PCI */ |
| 1233 | 1233 | ||
| 1234 | static int __devinit setup_diva_pci(struct IsdnCard *card) | 1234 | static int setup_diva_pci(struct IsdnCard *card) |
| 1235 | { | 1235 | { |
| 1236 | return (-1); /* card not found; continue search */ | 1236 | return (-1); /* card not found; continue search */ |
| 1237 | } | 1237 | } |
| 1238 | 1238 | ||
| 1239 | #endif /* CONFIG_PCI */ | 1239 | #endif /* CONFIG_PCI */ |
| 1240 | 1240 | ||
| 1241 | int __devinit | 1241 | int setup_diva(struct IsdnCard *card) |
| 1242 | setup_diva(struct IsdnCard *card) | ||
| 1243 | { | 1242 | { |
| 1244 | int rc, have_card = 0; | 1243 | int rc, have_card = 0; |
| 1245 | struct IsdnCardState *cs = card->cs; | 1244 | struct IsdnCardState *cs = card->cs; |
diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c index 64ba26a4afe6..1df6f9a56ca2 100644 --- a/drivers/isdn/hisax/elsa.c +++ b/drivers/isdn/hisax/elsa.c | |||
| @@ -831,8 +831,7 @@ probe_elsa(struct IsdnCardState *cs) | |||
| 831 | return (CARD_portlist[i]); | 831 | return (CARD_portlist[i]); |
| 832 | } | 832 | } |
| 833 | 833 | ||
| 834 | static int __devinit | 834 | static int setup_elsa_isa(struct IsdnCard *card) |
| 835 | setup_elsa_isa(struct IsdnCard *card) | ||
| 836 | { | 835 | { |
| 837 | struct IsdnCardState *cs = card->cs; | 836 | struct IsdnCardState *cs = card->cs; |
| 838 | u_char val; | 837 | u_char val; |
| @@ -902,7 +901,7 @@ setup_elsa_isa(struct IsdnCard *card) | |||
| 902 | } | 901 | } |
| 903 | 902 | ||
| 904 | #ifdef __ISAPNP__ | 903 | #ifdef __ISAPNP__ |
| 905 | static struct isapnp_device_id elsa_ids[] __devinitdata = { | 904 | static struct isapnp_device_id elsa_ids[] = { |
| 906 | { ISAPNP_VENDOR('E', 'L', 'S'), ISAPNP_FUNCTION(0x0133), | 905 | { ISAPNP_VENDOR('E', 'L', 'S'), ISAPNP_FUNCTION(0x0133), |
| 907 | ISAPNP_VENDOR('E', 'L', 'S'), ISAPNP_FUNCTION(0x0133), | 906 | ISAPNP_VENDOR('E', 'L', 'S'), ISAPNP_FUNCTION(0x0133), |
| 908 | (unsigned long) "Elsa QS1000" }, | 907 | (unsigned long) "Elsa QS1000" }, |
| @@ -912,12 +911,11 @@ static struct isapnp_device_id elsa_ids[] __devinitdata = { | |||
| 912 | { 0, } | 911 | { 0, } |
| 913 | }; | 912 | }; |
| 914 | 913 | ||
| 915 | static struct isapnp_device_id *ipid __devinitdata = &elsa_ids[0]; | 914 | static struct isapnp_device_id *ipid = &elsa_ids[0]; |
| 916 | static struct pnp_card *pnp_c __devinitdata = NULL; | 915 | static struct pnp_card *pnp_c = NULL; |
| 917 | #endif /* __ISAPNP__ */ | 916 | #endif /* __ISAPNP__ */ |
| 918 | 917 | ||
| 919 | static int __devinit | 918 | static int setup_elsa_isapnp(struct IsdnCard *card) |
| 920 | setup_elsa_isapnp(struct IsdnCard *card) | ||
| 921 | { | 919 | { |
| 922 | struct IsdnCardState *cs = card->cs; | 920 | struct IsdnCardState *cs = card->cs; |
| 923 | 921 | ||
| @@ -994,8 +992,7 @@ setup_elsa_isapnp(struct IsdnCard *card) | |||
| 994 | return (1); | 992 | return (1); |
| 995 | } | 993 | } |
| 996 | 994 | ||
| 997 | static void __devinit | 995 | static void setup_elsa_pcmcia(struct IsdnCard *card) |
| 998 | setup_elsa_pcmcia(struct IsdnCard *card) | ||
| 999 | { | 996 | { |
| 1000 | struct IsdnCardState *cs = card->cs; | 997 | struct IsdnCardState *cs = card->cs; |
| 1001 | u_char val; | 998 | u_char val; |
| @@ -1027,11 +1024,10 @@ setup_elsa_pcmcia(struct IsdnCard *card) | |||
| 1027 | } | 1024 | } |
| 1028 | 1025 | ||
| 1029 | #ifdef CONFIG_PCI | 1026 | #ifdef CONFIG_PCI |
| 1030 | static struct pci_dev *dev_qs1000 __devinitdata = NULL; | 1027 | static struct pci_dev *dev_qs1000 = NULL; |
| 1031 | static struct pci_dev *dev_qs3000 __devinitdata = NULL; | 1028 | static struct pci_dev *dev_qs3000 = NULL; |
| 1032 | 1029 | ||
| 1033 | static int __devinit | 1030 | static int setup_elsa_pci(struct IsdnCard *card) |
| 1034 | setup_elsa_pci(struct IsdnCard *card) | ||
| 1035 | { | 1031 | { |
| 1036 | struct IsdnCardState *cs = card->cs; | 1032 | struct IsdnCardState *cs = card->cs; |
| 1037 | 1033 | ||
| @@ -1089,15 +1085,13 @@ setup_elsa_pci(struct IsdnCard *card) | |||
| 1089 | 1085 | ||
| 1090 | #else | 1086 | #else |
| 1091 | 1087 | ||
| 1092 | static int __devinit | 1088 | static int setup_elsa_pci(struct IsdnCard *card) |
| 1093 | setup_elsa_pci(struct IsdnCard *card) | ||
| 1094 | { | 1089 | { |
| 1095 | return (1); | 1090 | return (1); |
| 1096 | } | 1091 | } |
| 1097 | #endif /* CONFIG_PCI */ | 1092 | #endif /* CONFIG_PCI */ |
| 1098 | 1093 | ||
| 1099 | static int __devinit | 1094 | static int setup_elsa_common(struct IsdnCard *card) |
| 1100 | setup_elsa_common(struct IsdnCard *card) | ||
| 1101 | { | 1095 | { |
| 1102 | struct IsdnCardState *cs = card->cs; | 1096 | struct IsdnCardState *cs = card->cs; |
| 1103 | u_char val; | 1097 | u_char val; |
| @@ -1212,8 +1206,7 @@ setup_elsa_common(struct IsdnCard *card) | |||
| 1212 | return (1); | 1206 | return (1); |
| 1213 | } | 1207 | } |
| 1214 | 1208 | ||
| 1215 | int __devinit | 1209 | int setup_elsa(struct IsdnCard *card) |
| 1216 | setup_elsa(struct IsdnCard *card) | ||
| 1217 | { | 1210 | { |
| 1218 | int rc; | 1211 | int rc; |
| 1219 | struct IsdnCardState *cs = card->cs; | 1212 | struct IsdnCardState *cs = card->cs; |
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c index a8c4d3fc9a6d..ebe56918f6fc 100644 --- a/drivers/isdn/hisax/elsa_cs.c +++ b/drivers/isdn/hisax/elsa_cs.c | |||
| @@ -62,9 +62,9 @@ MODULE_LICENSE("Dual MPL/GPL"); | |||
| 62 | static int protocol = 2; /* EURO-ISDN Default */ | 62 | static int protocol = 2; /* EURO-ISDN Default */ |
| 63 | module_param(protocol, int, 0); | 63 | module_param(protocol, int, 0); |
| 64 | 64 | ||
| 65 | static int elsa_cs_config(struct pcmcia_device *link) __devinit; | 65 | static int elsa_cs_config(struct pcmcia_device *link); |
| 66 | static void elsa_cs_release(struct pcmcia_device *link); | 66 | static void elsa_cs_release(struct pcmcia_device *link); |
| 67 | static void elsa_cs_detach(struct pcmcia_device *p_dev) __devexit; | 67 | static void elsa_cs_detach(struct pcmcia_device *p_dev); |
| 68 | 68 | ||
| 69 | typedef struct local_info_t { | 69 | typedef struct local_info_t { |
| 70 | struct pcmcia_device *p_dev; | 70 | struct pcmcia_device *p_dev; |
| @@ -72,7 +72,7 @@ typedef struct local_info_t { | |||
| 72 | int cardnr; | 72 | int cardnr; |
| 73 | } local_info_t; | 73 | } local_info_t; |
| 74 | 74 | ||
| 75 | static int __devinit elsa_cs_probe(struct pcmcia_device *link) | 75 | static int elsa_cs_probe(struct pcmcia_device *link) |
| 76 | { | 76 | { |
| 77 | local_info_t *local; | 77 | local_info_t *local; |
| 78 | 78 | ||
| @@ -90,7 +90,7 @@ static int __devinit elsa_cs_probe(struct pcmcia_device *link) | |||
| 90 | return elsa_cs_config(link); | 90 | return elsa_cs_config(link); |
| 91 | } /* elsa_cs_attach */ | 91 | } /* elsa_cs_attach */ |
| 92 | 92 | ||
| 93 | static void __devexit elsa_cs_detach(struct pcmcia_device *link) | 93 | static void elsa_cs_detach(struct pcmcia_device *link) |
| 94 | { | 94 | { |
| 95 | local_info_t *info = link->priv; | 95 | local_info_t *info = link->priv; |
| 96 | 96 | ||
| @@ -126,7 +126,7 @@ static int elsa_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data) | |||
| 126 | return -ENODEV; | 126 | return -ENODEV; |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | static int __devinit elsa_cs_config(struct pcmcia_device *link) | 129 | static int elsa_cs_config(struct pcmcia_device *link) |
| 130 | { | 130 | { |
| 131 | int i; | 131 | int i; |
| 132 | IsdnCard_t icard; | 132 | IsdnCard_t icard; |
| @@ -210,7 +210,7 @@ static struct pcmcia_driver elsa_cs_driver = { | |||
| 210 | .owner = THIS_MODULE, | 210 | .owner = THIS_MODULE, |
| 211 | .name = "elsa_cs", | 211 | .name = "elsa_cs", |
| 212 | .probe = elsa_cs_probe, | 212 | .probe = elsa_cs_probe, |
| 213 | .remove = __devexit_p(elsa_cs_detach), | 213 | .remove = elsa_cs_detach, |
| 214 | .id_table = elsa_ids, | 214 | .id_table = elsa_ids, |
| 215 | .suspend = elsa_suspend, | 215 | .suspend = elsa_suspend, |
| 216 | .resume = elsa_resume, | 216 | .resume = elsa_resume, |
diff --git a/drivers/isdn/hisax/enternow_pci.c b/drivers/isdn/hisax/enternow_pci.c index b1e38b54ebac..e8d431a8302d 100644 --- a/drivers/isdn/hisax/enternow_pci.c +++ b/drivers/isdn/hisax/enternow_pci.c | |||
| @@ -300,8 +300,7 @@ enpci_interrupt(int intno, void *dev_id) | |||
| 300 | return IRQ_HANDLED; | 300 | return IRQ_HANDLED; |
| 301 | } | 301 | } |
| 302 | 302 | ||
| 303 | static int __devinit en_pci_probe(struct pci_dev *dev_netjet, | 303 | static int en_pci_probe(struct pci_dev *dev_netjet, struct IsdnCardState *cs) |
| 304 | struct IsdnCardState *cs) | ||
| 305 | { | 304 | { |
| 306 | if (pci_enable_device(dev_netjet)) | 305 | if (pci_enable_device(dev_netjet)) |
| 307 | return (0); | 306 | return (0); |
| @@ -326,8 +325,7 @@ static int __devinit en_pci_probe(struct pci_dev *dev_netjet, | |||
| 326 | return (1); | 325 | return (1); |
| 327 | } | 326 | } |
| 328 | 327 | ||
| 329 | static void __devinit en_cs_init(struct IsdnCard *card, | 328 | static void en_cs_init(struct IsdnCard *card, struct IsdnCardState *cs) |
| 330 | struct IsdnCardState *cs) | ||
| 331 | { | 329 | { |
| 332 | cs->hw.njet.auxa = cs->hw.njet.base + NETJET_AUXDATA; | 330 | cs->hw.njet.auxa = cs->hw.njet.base + NETJET_AUXDATA; |
| 333 | cs->hw.njet.isac = cs->hw.njet.base + 0xC0; // Fenster zum AMD | 331 | cs->hw.njet.isac = cs->hw.njet.base + 0xC0; // Fenster zum AMD |
| @@ -350,8 +348,7 @@ static void __devinit en_cs_init(struct IsdnCard *card, | |||
| 350 | outb(cs->hw.njet.auxd, cs->hw.njet.auxa); | 348 | outb(cs->hw.njet.auxd, cs->hw.njet.auxa); |
| 351 | } | 349 | } |
| 352 | 350 | ||
| 353 | static int __devinit en_cs_init_rest(struct IsdnCard *card, | 351 | static int en_cs_init_rest(struct IsdnCard *card, struct IsdnCardState *cs) |
| 354 | struct IsdnCardState *cs) | ||
| 355 | { | 352 | { |
| 356 | const int bytecnt = 256; | 353 | const int bytecnt = 256; |
| 357 | 354 | ||
| @@ -384,11 +381,10 @@ static int __devinit en_cs_init_rest(struct IsdnCard *card, | |||
| 384 | return (1); | 381 | return (1); |
| 385 | } | 382 | } |
| 386 | 383 | ||
| 387 | static struct pci_dev *dev_netjet __devinitdata = NULL; | 384 | static struct pci_dev *dev_netjet = NULL; |
| 388 | 385 | ||
| 389 | /* called by config.c */ | 386 | /* called by config.c */ |
| 390 | int __devinit | 387 | int setup_enternow_pci(struct IsdnCard *card) |
| 391 | setup_enternow_pci(struct IsdnCard *card) | ||
| 392 | { | 388 | { |
| 393 | int ret; | 389 | int ret; |
| 394 | struct IsdnCardState *cs = card->cs; | 390 | struct IsdnCardState *cs = card->cs; |
diff --git a/drivers/isdn/hisax/gazel.c b/drivers/isdn/hisax/gazel.c index 4fef77562554..35c6df6534ec 100644 --- a/drivers/isdn/hisax/gazel.c +++ b/drivers/isdn/hisax/gazel.c | |||
| @@ -483,8 +483,7 @@ error: | |||
| 483 | return 1; | 483 | return 1; |
| 484 | } | 484 | } |
| 485 | 485 | ||
| 486 | static int __devinit | 486 | static int setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs) |
| 487 | setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs) | ||
| 488 | { | 487 | { |
| 489 | printk(KERN_INFO "Gazel: ISA PnP card automatic recognition\n"); | 488 | printk(KERN_INFO "Gazel: ISA PnP card automatic recognition\n"); |
| 490 | // we got an irq parameter, assume it is an ISA card | 489 | // we got an irq parameter, assume it is an ISA card |
| @@ -532,10 +531,9 @@ setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs) | |||
| 532 | } | 531 | } |
| 533 | 532 | ||
| 534 | #ifdef CONFIG_PCI | 533 | #ifdef CONFIG_PCI |
| 535 | static struct pci_dev *dev_tel __devinitdata = NULL; | 534 | static struct pci_dev *dev_tel = NULL; |
| 536 | 535 | ||
| 537 | static int __devinit | 536 | static int setup_gazelpci(struct IsdnCardState *cs) |
| 538 | setup_gazelpci(struct IsdnCardState *cs) | ||
| 539 | { | 537 | { |
| 540 | u_int pci_ioaddr0 = 0, pci_ioaddr1 = 0; | 538 | u_int pci_ioaddr0 = 0, pci_ioaddr1 = 0; |
| 541 | u_char pci_irq = 0, found; | 539 | u_char pci_irq = 0, found; |
| @@ -622,8 +620,7 @@ setup_gazelpci(struct IsdnCardState *cs) | |||
| 622 | } | 620 | } |
| 623 | #endif /* CONFIG_PCI */ | 621 | #endif /* CONFIG_PCI */ |
| 624 | 622 | ||
| 625 | int __devinit | 623 | int setup_gazel(struct IsdnCard *card) |
| 626 | setup_gazel(struct IsdnCard *card) | ||
| 627 | { | 624 | { |
| 628 | struct IsdnCardState *cs = card->cs; | 625 | struct IsdnCardState *cs = card->cs; |
| 629 | char tmp[64]; | 626 | char tmp[64]; |
diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c index dea04de8e7ca..c49c294fc81e 100644 --- a/drivers/isdn/hisax/hfc4s8s_l1.c +++ b/drivers/isdn/hisax/hfc4s8s_l1.c | |||
| @@ -1497,7 +1497,7 @@ enable_pci_ports(hfc4s8s_hw *hw) | |||
| 1497 | /* initialise the HFC-4s/8s hardware */ | 1497 | /* initialise the HFC-4s/8s hardware */ |
| 1498 | /* return 0 on success. */ | 1498 | /* return 0 on success. */ |
| 1499 | /*************************************/ | 1499 | /*************************************/ |
| 1500 | static int __devinit | 1500 | static int |
| 1501 | setup_instance(hfc4s8s_hw *hw) | 1501 | setup_instance(hfc4s8s_hw *hw) |
| 1502 | { | 1502 | { |
| 1503 | int err = -EIO; | 1503 | int err = -EIO; |
| @@ -1585,7 +1585,7 @@ out: | |||
| 1585 | /*****************************************/ | 1585 | /*****************************************/ |
| 1586 | /* PCI hotplug interface: probe new card */ | 1586 | /* PCI hotplug interface: probe new card */ |
| 1587 | /*****************************************/ | 1587 | /*****************************************/ |
| 1588 | static int __devinit | 1588 | static int |
| 1589 | hfc4s8s_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 1589 | hfc4s8s_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 1590 | { | 1590 | { |
| 1591 | int err = -ENOMEM; | 1591 | int err = -ENOMEM; |
| @@ -1640,7 +1640,7 @@ out: | |||
| 1640 | /**************************************/ | 1640 | /**************************************/ |
| 1641 | /* PCI hotplug interface: remove card */ | 1641 | /* PCI hotplug interface: remove card */ |
| 1642 | /**************************************/ | 1642 | /**************************************/ |
| 1643 | static void __devexit | 1643 | static void |
| 1644 | hfc4s8s_remove(struct pci_dev *pdev) | 1644 | hfc4s8s_remove(struct pci_dev *pdev) |
| 1645 | { | 1645 | { |
| 1646 | hfc4s8s_hw *hw = pci_get_drvdata(pdev); | 1646 | hfc4s8s_hw *hw = pci_get_drvdata(pdev); |
| @@ -1662,7 +1662,7 @@ hfc4s8s_remove(struct pci_dev *pdev) | |||
| 1662 | static struct pci_driver hfc4s8s_driver = { | 1662 | static struct pci_driver hfc4s8s_driver = { |
| 1663 | .name = "hfc4s8s_l1", | 1663 | .name = "hfc4s8s_l1", |
| 1664 | .probe = hfc4s8s_probe, | 1664 | .probe = hfc4s8s_probe, |
| 1665 | .remove = __devexit_p(hfc4s8s_remove), | 1665 | .remove = hfc4s8s_remove, |
| 1666 | .id_table = hfc4s8s_ids, | 1666 | .id_table = hfc4s8s_ids, |
| 1667 | }; | 1667 | }; |
| 1668 | 1668 | ||
| @@ -1688,14 +1688,6 @@ hfc4s8s_module_init(void) | |||
| 1688 | } | 1688 | } |
| 1689 | printk(KERN_INFO "HFC-4S/8S: found %d cards\n", card_cnt); | 1689 | printk(KERN_INFO "HFC-4S/8S: found %d cards\n", card_cnt); |
| 1690 | 1690 | ||
| 1691 | #if !defined(CONFIG_HOTPLUG) | ||
| 1692 | if (err == 0) { | ||
| 1693 | err = -ENODEV; | ||
| 1694 | pci_unregister_driver(&hfc4s8s_driver); | ||
| 1695 | goto out; | ||
| 1696 | } | ||
| 1697 | #endif | ||
| 1698 | |||
| 1699 | return 0; | 1691 | return 0; |
| 1700 | out: | 1692 | out: |
| 1701 | return (err); | 1693 | return (err); |
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c index f60d4be58941..3ccd724ff8c2 100644 --- a/drivers/isdn/hisax/hfc_pci.c +++ b/drivers/isdn/hisax/hfc_pci.c | |||
| @@ -1632,9 +1632,9 @@ hfcpci_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 1632 | 1632 | ||
| 1633 | 1633 | ||
| 1634 | /* this variable is used as card index when more than one cards are present */ | 1634 | /* this variable is used as card index when more than one cards are present */ |
| 1635 | static struct pci_dev *dev_hfcpci __devinitdata = NULL; | 1635 | static struct pci_dev *dev_hfcpci = NULL; |
| 1636 | 1636 | ||
| 1637 | int __devinit | 1637 | int |
| 1638 | setup_hfcpci(struct IsdnCard *card) | 1638 | setup_hfcpci(struct IsdnCard *card) |
| 1639 | { | 1639 | { |
| 1640 | u_long flags; | 1640 | u_long flags; |
diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c index 4ec279ce052f..90f34ae2b80f 100644 --- a/drivers/isdn/hisax/hfc_sx.c +++ b/drivers/isdn/hisax/hfc_sx.c | |||
| @@ -1381,19 +1381,18 @@ hfcsx_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 1381 | } | 1381 | } |
| 1382 | 1382 | ||
| 1383 | #ifdef __ISAPNP__ | 1383 | #ifdef __ISAPNP__ |
| 1384 | static struct isapnp_device_id hfc_ids[] __devinitdata = { | 1384 | static struct isapnp_device_id hfc_ids[] = { |
| 1385 | { ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2620), | 1385 | { ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2620), |
| 1386 | ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2620), | 1386 | ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2620), |
| 1387 | (unsigned long) "Teles 16.3c2" }, | 1387 | (unsigned long) "Teles 16.3c2" }, |
| 1388 | { 0, } | 1388 | { 0, } |
| 1389 | }; | 1389 | }; |
| 1390 | 1390 | ||
| 1391 | static struct isapnp_device_id *ipid __devinitdata = &hfc_ids[0]; | 1391 | static struct isapnp_device_id *ipid = &hfc_ids[0]; |
| 1392 | static struct pnp_card *pnp_c __devinitdata = NULL; | 1392 | static struct pnp_card *pnp_c = NULL; |
| 1393 | #endif | 1393 | #endif |
| 1394 | 1394 | ||
| 1395 | int __devinit | 1395 | int setup_hfcsx(struct IsdnCard *card) |
| 1396 | setup_hfcsx(struct IsdnCard *card) | ||
| 1397 | { | 1396 | { |
| 1398 | struct IsdnCardState *cs = card->cs; | 1397 | struct IsdnCardState *cs = card->cs; |
| 1399 | char tmp[64]; | 1398 | char tmp[64]; |
diff --git a/drivers/isdn/hisax/hfcscard.c b/drivers/isdn/hisax/hfcscard.c index a5f048bd2bb3..394da646e97b 100644 --- a/drivers/isdn/hisax/hfcscard.c +++ b/drivers/isdn/hisax/hfcscard.c | |||
| @@ -136,7 +136,7 @@ hfcs_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | #ifdef __ISAPNP__ | 138 | #ifdef __ISAPNP__ |
| 139 | static struct isapnp_device_id hfc_ids[] __devinitdata = { | 139 | static struct isapnp_device_id hfc_ids[] = { |
| 140 | { ISAPNP_VENDOR('A', 'N', 'X'), ISAPNP_FUNCTION(0x1114), | 140 | { ISAPNP_VENDOR('A', 'N', 'X'), ISAPNP_FUNCTION(0x1114), |
| 141 | ISAPNP_VENDOR('A', 'N', 'X'), ISAPNP_FUNCTION(0x1114), | 141 | ISAPNP_VENDOR('A', 'N', 'X'), ISAPNP_FUNCTION(0x1114), |
| 142 | (unsigned long) "Acer P10" }, | 142 | (unsigned long) "Acer P10" }, |
| @@ -161,12 +161,11 @@ static struct isapnp_device_id hfc_ids[] __devinitdata = { | |||
| 161 | { 0, } | 161 | { 0, } |
| 162 | }; | 162 | }; |
| 163 | 163 | ||
| 164 | static struct isapnp_device_id *ipid __devinitdata = &hfc_ids[0]; | 164 | static struct isapnp_device_id *ipid = &hfc_ids[0]; |
| 165 | static struct pnp_card *pnp_c __devinitdata = NULL; | 165 | static struct pnp_card *pnp_c = NULL; |
| 166 | #endif | 166 | #endif |
| 167 | 167 | ||
| 168 | int __devinit | 168 | int setup_hfcs(struct IsdnCard *card) |
| 169 | setup_hfcs(struct IsdnCard *card) | ||
| 170 | { | 169 | { |
| 171 | struct IsdnCardState *cs = card->cs; | 170 | struct IsdnCardState *cs = card->cs; |
| 172 | char tmp[64]; | 171 | char tmp[64]; |
diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c index e4f47fe3f7fd..5e8a5d967162 100644 --- a/drivers/isdn/hisax/hisax_fcpcipnp.c +++ b/drivers/isdn/hisax/hisax_fcpcipnp.c | |||
| @@ -70,7 +70,7 @@ static struct pci_device_id fcpci_ids[] = { | |||
| 70 | MODULE_DEVICE_TABLE(pci, fcpci_ids); | 70 | MODULE_DEVICE_TABLE(pci, fcpci_ids); |
| 71 | 71 | ||
| 72 | #ifdef CONFIG_PNP | 72 | #ifdef CONFIG_PNP |
| 73 | static struct pnp_device_id fcpnp_ids[] __devinitdata = { | 73 | static struct pnp_device_id fcpnp_ids[] = { |
| 74 | { | 74 | { |
| 75 | .id = "AVM0900", | 75 | .id = "AVM0900", |
| 76 | .driver_data = (unsigned long) "Fritz!Card PnP", | 76 | .driver_data = (unsigned long) "Fritz!Card PnP", |
| @@ -712,7 +712,7 @@ static inline void fcpci_init(struct fritz_adapter *adapter) | |||
| 712 | 712 | ||
| 713 | // ---------------------------------------------------------------------- | 713 | // ---------------------------------------------------------------------- |
| 714 | 714 | ||
| 715 | static int __devinit fcpcipnp_setup(struct fritz_adapter *adapter) | 715 | static int fcpcipnp_setup(struct fritz_adapter *adapter) |
| 716 | { | 716 | { |
| 717 | u32 val = 0; | 717 | u32 val = 0; |
| 718 | int retval; | 718 | int retval; |
| @@ -825,7 +825,7 @@ err: | |||
| 825 | return retval; | 825 | return retval; |
| 826 | } | 826 | } |
| 827 | 827 | ||
| 828 | static void __devexit fcpcipnp_release(struct fritz_adapter *adapter) | 828 | static void fcpcipnp_release(struct fritz_adapter *adapter) |
| 829 | { | 829 | { |
| 830 | DBG(1, ""); | 830 | DBG(1, ""); |
| 831 | 831 | ||
| @@ -836,8 +836,7 @@ static void __devexit fcpcipnp_release(struct fritz_adapter *adapter) | |||
| 836 | 836 | ||
| 837 | // ---------------------------------------------------------------------- | 837 | // ---------------------------------------------------------------------- |
| 838 | 838 | ||
| 839 | static struct fritz_adapter * __devinit | 839 | static struct fritz_adapter *new_adapter(void) |
| 840 | new_adapter(void) | ||
| 841 | { | 840 | { |
| 842 | struct fritz_adapter *adapter; | 841 | struct fritz_adapter *adapter; |
| 843 | struct hisax_b_if *b_if[2]; | 842 | struct hisax_b_if *b_if[2]; |
| @@ -876,8 +875,7 @@ static void delete_adapter(struct fritz_adapter *adapter) | |||
| 876 | kfree(adapter); | 875 | kfree(adapter); |
| 877 | } | 876 | } |
| 878 | 877 | ||
| 879 | static int __devinit fcpci_probe(struct pci_dev *pdev, | 878 | static int fcpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 880 | const struct pci_device_id *ent) | ||
| 881 | { | 879 | { |
| 882 | struct fritz_adapter *adapter; | 880 | struct fritz_adapter *adapter; |
| 883 | int retval; | 881 | int retval; |
| @@ -917,7 +915,7 @@ err: | |||
| 917 | } | 915 | } |
| 918 | 916 | ||
| 919 | #ifdef CONFIG_PNP | 917 | #ifdef CONFIG_PNP |
| 920 | static int __devinit fcpnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) | 918 | static int fcpnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) |
| 921 | { | 919 | { |
| 922 | struct fritz_adapter *adapter; | 920 | struct fritz_adapter *adapter; |
| 923 | int retval; | 921 | int retval; |
| @@ -959,7 +957,7 @@ err: | |||
| 959 | return retval; | 957 | return retval; |
| 960 | } | 958 | } |
| 961 | 959 | ||
| 962 | static void __devexit fcpnp_remove(struct pnp_dev *pdev) | 960 | static void fcpnp_remove(struct pnp_dev *pdev) |
| 963 | { | 961 | { |
| 964 | struct fritz_adapter *adapter = pnp_get_drvdata(pdev); | 962 | struct fritz_adapter *adapter = pnp_get_drvdata(pdev); |
| 965 | 963 | ||
| @@ -973,12 +971,12 @@ static void __devexit fcpnp_remove(struct pnp_dev *pdev) | |||
| 973 | static struct pnp_driver fcpnp_driver = { | 971 | static struct pnp_driver fcpnp_driver = { |
| 974 | .name = "fcpnp", | 972 | .name = "fcpnp", |
| 975 | .probe = fcpnp_probe, | 973 | .probe = fcpnp_probe, |
| 976 | .remove = __devexit_p(fcpnp_remove), | 974 | .remove = fcpnp_remove, |
| 977 | .id_table = fcpnp_ids, | 975 | .id_table = fcpnp_ids, |
| 978 | }; | 976 | }; |
| 979 | #endif | 977 | #endif |
| 980 | 978 | ||
| 981 | static void __devexit fcpci_remove(struct pci_dev *pdev) | 979 | static void fcpci_remove(struct pci_dev *pdev) |
| 982 | { | 980 | { |
| 983 | struct fritz_adapter *adapter = pci_get_drvdata(pdev); | 981 | struct fritz_adapter *adapter = pci_get_drvdata(pdev); |
| 984 | 982 | ||
| @@ -990,7 +988,7 @@ static void __devexit fcpci_remove(struct pci_dev *pdev) | |||
| 990 | static struct pci_driver fcpci_driver = { | 988 | static struct pci_driver fcpci_driver = { |
| 991 | .name = "fcpci", | 989 | .name = "fcpci", |
| 992 | .probe = fcpci_probe, | 990 | .probe = fcpci_probe, |
| 993 | .remove = __devexit_p(fcpci_remove), | 991 | .remove = fcpci_remove, |
| 994 | .id_table = fcpci_ids, | 992 | .id_table = fcpci_ids, |
| 995 | }; | 993 | }; |
| 996 | 994 | ||
diff --git a/drivers/isdn/hisax/icc.c b/drivers/isdn/hisax/icc.c index 7be762b17c70..db5321f6379b 100644 --- a/drivers/isdn/hisax/icc.c +++ b/drivers/isdn/hisax/icc.c | |||
| @@ -673,8 +673,7 @@ clear_pending_icc_ints(struct IsdnCardState *cs) | |||
| 673 | cs->writeisac(cs, ICC_MASK, 0xFF); | 673 | cs->writeisac(cs, ICC_MASK, 0xFF); |
| 674 | } | 674 | } |
| 675 | 675 | ||
| 676 | void __devinit | 676 | void setup_icc(struct IsdnCardState *cs) |
| 677 | setup_icc(struct IsdnCardState *cs) | ||
| 678 | { | 677 | { |
| 679 | INIT_WORK(&cs->tqueue, icc_bh); | 678 | INIT_WORK(&cs->tqueue, icc_bh); |
| 680 | cs->dbusytimer.function = (void *) dbusy_timer_handler; | 679 | cs->dbusytimer.function = (void *) dbusy_timer_handler; |
diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c index bcd70a387307..a365ccc1c99c 100644 --- a/drivers/isdn/hisax/isac.c +++ b/drivers/isdn/hisax/isac.c | |||
| @@ -24,11 +24,11 @@ | |||
| 24 | #define DBUSY_TIMER_VALUE 80 | 24 | #define DBUSY_TIMER_VALUE 80 |
| 25 | #define ARCOFI_USE 1 | 25 | #define ARCOFI_USE 1 |
| 26 | 26 | ||
| 27 | static char *ISACVer[] __devinitdata = | 27 | static char *ISACVer[] = |
| 28 | {"2086/2186 V1.1", "2085 B1", "2085 B2", | 28 | {"2086/2186 V1.1", "2085 B1", "2085 B2", |
| 29 | "2085 V2.3"}; | 29 | "2085 V2.3"}; |
| 30 | 30 | ||
| 31 | void __devinit ISACVersion(struct IsdnCardState *cs, char *s) | 31 | void ISACVersion(struct IsdnCardState *cs, char *s) |
| 32 | { | 32 | { |
| 33 | int val; | 33 | int val; |
| 34 | 34 | ||
| @@ -669,8 +669,7 @@ void clear_pending_isac_ints(struct IsdnCardState *cs) | |||
| 669 | cs->writeisac(cs, ISAC_MASK, 0xFF); | 669 | cs->writeisac(cs, ISAC_MASK, 0xFF); |
| 670 | } | 670 | } |
| 671 | 671 | ||
| 672 | void __devinit | 672 | void setup_isac(struct IsdnCardState *cs) |
| 673 | setup_isac(struct IsdnCardState *cs) | ||
| 674 | { | 673 | { |
| 675 | INIT_WORK(&cs->tqueue, isac_bh); | 674 | INIT_WORK(&cs->tqueue, isac_bh); |
| 676 | cs->dbusytimer.function = (void *) dbusy_timer_handler; | 675 | cs->dbusytimer.function = (void *) dbusy_timer_handler; |
diff --git a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c index c1530fe248c2..1399ddd4f6cb 100644 --- a/drivers/isdn/hisax/isurf.c +++ b/drivers/isdn/hisax/isurf.c | |||
| @@ -194,11 +194,10 @@ isurf_auxcmd(struct IsdnCardState *cs, isdn_ctrl *ic) { | |||
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | #ifdef __ISAPNP__ | 196 | #ifdef __ISAPNP__ |
| 197 | static struct pnp_card *pnp_c __devinitdata = NULL; | 197 | static struct pnp_card *pnp_c = NULL; |
| 198 | #endif | 198 | #endif |
| 199 | 199 | ||
| 200 | int __devinit | 200 | int setup_isurf(struct IsdnCard *card) |
| 201 | setup_isurf(struct IsdnCard *card) | ||
| 202 | { | 201 | { |
| 203 | int ver; | 202 | int ver; |
| 204 | struct IsdnCardState *cs = card->cs; | 203 | struct IsdnCardState *cs = card->cs; |
diff --git a/drivers/isdn/hisax/ix1_micro.c b/drivers/isdn/hisax/ix1_micro.c index 5f299f82b801..7ae39f5e865d 100644 --- a/drivers/isdn/hisax/ix1_micro.c +++ b/drivers/isdn/hisax/ix1_micro.c | |||
| @@ -209,7 +209,7 @@ ix1_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | #ifdef __ISAPNP__ | 211 | #ifdef __ISAPNP__ |
| 212 | static struct isapnp_device_id itk_ids[] __devinitdata = { | 212 | static struct isapnp_device_id itk_ids[] = { |
| 213 | { ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25), | 213 | { ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25), |
| 214 | ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25), | 214 | ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25), |
| 215 | (unsigned long) "ITK micro 2" }, | 215 | (unsigned long) "ITK micro 2" }, |
| @@ -219,13 +219,12 @@ static struct isapnp_device_id itk_ids[] __devinitdata = { | |||
| 219 | { 0, } | 219 | { 0, } |
| 220 | }; | 220 | }; |
| 221 | 221 | ||
| 222 | static struct isapnp_device_id *ipid __devinitdata = &itk_ids[0]; | 222 | static struct isapnp_device_id *ipid = &itk_ids[0]; |
| 223 | static struct pnp_card *pnp_c __devinitdata = NULL; | 223 | static struct pnp_card *pnp_c = NULL; |
| 224 | #endif | 224 | #endif |
| 225 | 225 | ||
| 226 | 226 | ||
| 227 | int __devinit | 227 | int setup_ix1micro(struct IsdnCard *card) |
| 228 | setup_ix1micro(struct IsdnCard *card) | ||
| 229 | { | 228 | { |
| 230 | struct IsdnCardState *cs = card->cs; | 229 | struct IsdnCardState *cs = card->cs; |
| 231 | char tmp[64]; | 230 | char tmp[64]; |
diff --git a/drivers/isdn/hisax/mic.c b/drivers/isdn/hisax/mic.c index 08a6b7fb17f7..93398676f78f 100644 --- a/drivers/isdn/hisax/mic.c +++ b/drivers/isdn/hisax/mic.c | |||
| @@ -187,8 +187,7 @@ mic_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 187 | return (0); | 187 | return (0); |
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | int __devinit | 190 | int setup_mic(struct IsdnCard *card) |
| 191 | setup_mic(struct IsdnCard *card) | ||
| 192 | { | 191 | { |
| 193 | int bytecnt; | 192 | int bytecnt; |
| 194 | struct IsdnCardState *cs = card->cs; | 193 | struct IsdnCardState *cs = card->cs; |
diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c index 6569e0315cca..e4c33cfe3ef4 100644 --- a/drivers/isdn/hisax/niccy.c +++ b/drivers/isdn/hisax/niccy.c | |||
| @@ -223,10 +223,10 @@ static int niccy_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | #ifdef __ISAPNP__ | 225 | #ifdef __ISAPNP__ |
| 226 | static struct pnp_card *pnp_c __devinitdata = NULL; | 226 | static struct pnp_card *pnp_c = NULL; |
| 227 | #endif | 227 | #endif |
| 228 | 228 | ||
| 229 | int __devinit setup_niccy(struct IsdnCard *card) | 229 | int setup_niccy(struct IsdnCard *card) |
| 230 | { | 230 | { |
| 231 | struct IsdnCardState *cs = card->cs; | 231 | struct IsdnCardState *cs = card->cs; |
| 232 | char tmp[64]; | 232 | char tmp[64]; |
| @@ -298,7 +298,7 @@ int __devinit setup_niccy(struct IsdnCard *card) | |||
| 298 | } | 298 | } |
| 299 | } else { | 299 | } else { |
| 300 | #ifdef CONFIG_PCI | 300 | #ifdef CONFIG_PCI |
| 301 | static struct pci_dev *niccy_dev __devinitdata; | 301 | static struct pci_dev *niccy_dev; |
| 302 | 302 | ||
| 303 | u_int pci_ioaddr; | 303 | u_int pci_ioaddr; |
| 304 | cs->subtyp = 0; | 304 | cs->subtyp = 0; |
diff --git a/drivers/isdn/hisax/nj_s.c b/drivers/isdn/hisax/nj_s.c index f36ff69c07e1..32b4bbd18eb9 100644 --- a/drivers/isdn/hisax/nj_s.c +++ b/drivers/isdn/hisax/nj_s.c | |||
| @@ -148,8 +148,7 @@ NETjet_S_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 148 | return (0); | 148 | return (0); |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | static int __devinit njs_pci_probe(struct pci_dev *dev_netjet, | 151 | static int njs_pci_probe(struct pci_dev *dev_netjet, struct IsdnCardState *cs) |
| 152 | struct IsdnCardState *cs) | ||
| 153 | { | 152 | { |
| 154 | u32 cfg; | 153 | u32 cfg; |
| 155 | 154 | ||
| @@ -187,8 +186,7 @@ static int __devinit njs_pci_probe(struct pci_dev *dev_netjet, | |||
| 187 | return (1); | 186 | return (1); |
| 188 | } | 187 | } |
| 189 | 188 | ||
| 190 | static int __devinit njs_cs_init(struct IsdnCard *card, | 189 | static int njs_cs_init(struct IsdnCard *card, struct IsdnCardState *cs) |
| 191 | struct IsdnCardState *cs) | ||
| 192 | { | 190 | { |
| 193 | 191 | ||
| 194 | cs->hw.njet.auxa = cs->hw.njet.base + NETJET_AUXDATA; | 192 | cs->hw.njet.auxa = cs->hw.njet.base + NETJET_AUXDATA; |
| @@ -225,8 +223,7 @@ static int __devinit njs_cs_init(struct IsdnCard *card, | |||
| 225 | return 1; /* end loop */ | 223 | return 1; /* end loop */ |
| 226 | } | 224 | } |
| 227 | 225 | ||
| 228 | static int __devinit njs_cs_init_rest(struct IsdnCard *card, | 226 | static int njs_cs_init_rest(struct IsdnCard *card, struct IsdnCardState *cs) |
| 229 | struct IsdnCardState *cs) | ||
| 230 | { | 227 | { |
| 231 | const int bytecnt = 256; | 228 | const int bytecnt = 256; |
| 232 | 229 | ||
| @@ -256,10 +253,9 @@ static int __devinit njs_cs_init_rest(struct IsdnCard *card, | |||
| 256 | return (1); | 253 | return (1); |
| 257 | } | 254 | } |
| 258 | 255 | ||
| 259 | static struct pci_dev *dev_netjet __devinitdata = NULL; | 256 | static struct pci_dev *dev_netjet = NULL; |
| 260 | 257 | ||
| 261 | int __devinit | 258 | int setup_netjet_s(struct IsdnCard *card) |
| 262 | setup_netjet_s(struct IsdnCard *card) | ||
| 263 | { | 259 | { |
| 264 | int ret; | 260 | int ret; |
| 265 | struct IsdnCardState *cs = card->cs; | 261 | struct IsdnCardState *cs = card->cs; |
diff --git a/drivers/isdn/hisax/nj_u.c b/drivers/isdn/hisax/nj_u.c index 333484aef425..4e8adbede361 100644 --- a/drivers/isdn/hisax/nj_u.c +++ b/drivers/isdn/hisax/nj_u.c | |||
| @@ -128,8 +128,7 @@ NETjet_U_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 128 | return (0); | 128 | return (0); |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | static int __devinit nju_pci_probe(struct pci_dev *dev_netjet, | 131 | static int nju_pci_probe(struct pci_dev *dev_netjet, struct IsdnCardState *cs) |
| 132 | struct IsdnCardState *cs) | ||
| 133 | { | 132 | { |
| 134 | if (pci_enable_device(dev_netjet)) | 133 | if (pci_enable_device(dev_netjet)) |
| 135 | return (0); | 134 | return (0); |
| @@ -148,8 +147,7 @@ static int __devinit nju_pci_probe(struct pci_dev *dev_netjet, | |||
| 148 | return (1); | 147 | return (1); |
| 149 | } | 148 | } |
| 150 | 149 | ||
| 151 | static int __devinit nju_cs_init(struct IsdnCard *card, | 150 | static int nju_cs_init(struct IsdnCard *card, struct IsdnCardState *cs) |
| 152 | struct IsdnCardState *cs) | ||
| 153 | { | 151 | { |
| 154 | cs->hw.njet.auxa = cs->hw.njet.base + NETJET_AUXDATA; | 152 | cs->hw.njet.auxa = cs->hw.njet.base + NETJET_AUXDATA; |
| 155 | cs->hw.njet.isac = cs->hw.njet.base | NETJET_ISAC_OFF; | 153 | cs->hw.njet.isac = cs->hw.njet.base | NETJET_ISAC_OFF; |
| @@ -187,8 +185,7 @@ static int __devinit nju_cs_init(struct IsdnCard *card, | |||
| 187 | return 1; /* end loop */ | 185 | return 1; /* end loop */ |
| 188 | } | 186 | } |
| 189 | 187 | ||
| 190 | static int __devinit nju_cs_init_rest(struct IsdnCard *card, | 188 | static int nju_cs_init_rest(struct IsdnCard *card, struct IsdnCardState *cs) |
| 191 | struct IsdnCardState *cs) | ||
| 192 | { | 189 | { |
| 193 | const int bytecnt = 256; | 190 | const int bytecnt = 256; |
| 194 | 191 | ||
| @@ -219,10 +216,9 @@ static int __devinit nju_cs_init_rest(struct IsdnCard *card, | |||
| 219 | return (1); | 216 | return (1); |
| 220 | } | 217 | } |
| 221 | 218 | ||
| 222 | static struct pci_dev *dev_netjet __devinitdata = NULL; | 219 | static struct pci_dev *dev_netjet = NULL; |
| 223 | 220 | ||
| 224 | int __devinit | 221 | int setup_netjet_u(struct IsdnCard *card) |
| 225 | setup_netjet_u(struct IsdnCard *card) | ||
| 226 | { | 222 | { |
| 227 | int ret; | 223 | int ret; |
| 228 | struct IsdnCardState *cs = card->cs; | 224 | struct IsdnCardState *cs = card->cs; |
diff --git a/drivers/isdn/hisax/s0box.c b/drivers/isdn/hisax/s0box.c index 383c4e7ce50b..4e7d0aa227ad 100644 --- a/drivers/isdn/hisax/s0box.c +++ b/drivers/isdn/hisax/s0box.c | |||
| @@ -210,8 +210,7 @@ S0Box_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 210 | return (0); | 210 | return (0); |
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | int __devinit | 213 | int setup_s0box(struct IsdnCard *card) |
| 214 | setup_s0box(struct IsdnCard *card) | ||
| 215 | { | 214 | { |
| 216 | struct IsdnCardState *cs = card->cs; | 215 | struct IsdnCardState *cs = card->cs; |
| 217 | char tmp[64]; | 216 | char tmp[64]; |
diff --git a/drivers/isdn/hisax/saphir.c b/drivers/isdn/hisax/saphir.c index 75dcae6d36e0..6b2d0eccdd56 100644 --- a/drivers/isdn/hisax/saphir.c +++ b/drivers/isdn/hisax/saphir.c | |||
| @@ -240,8 +240,7 @@ saphir_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | 242 | ||
| 243 | int __devinit | 243 | int setup_saphir(struct IsdnCard *card) |
| 244 | setup_saphir(struct IsdnCard *card) | ||
| 245 | { | 244 | { |
| 246 | struct IsdnCardState *cs = card->cs; | 245 | struct IsdnCardState *cs = card->cs; |
| 247 | char tmp[64]; | 246 | char tmp[64]; |
diff --git a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c index 1ee531b6be99..f16a47bcef48 100644 --- a/drivers/isdn/hisax/sedlbauer.c +++ b/drivers/isdn/hisax/sedlbauer.c | |||
| @@ -517,7 +517,7 @@ Sedl_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 517 | } | 517 | } |
| 518 | 518 | ||
| 519 | #ifdef __ISAPNP__ | 519 | #ifdef __ISAPNP__ |
| 520 | static struct isapnp_device_id sedl_ids[] __devinitdata = { | 520 | static struct isapnp_device_id sedl_ids[] = { |
| 521 | { ISAPNP_VENDOR('S', 'A', 'G'), ISAPNP_FUNCTION(0x01), | 521 | { ISAPNP_VENDOR('S', 'A', 'G'), ISAPNP_FUNCTION(0x01), |
| 522 | ISAPNP_VENDOR('S', 'A', 'G'), ISAPNP_FUNCTION(0x01), | 522 | ISAPNP_VENDOR('S', 'A', 'G'), ISAPNP_FUNCTION(0x01), |
| 523 | (unsigned long) "Speed win" }, | 523 | (unsigned long) "Speed win" }, |
| @@ -527,11 +527,10 @@ static struct isapnp_device_id sedl_ids[] __devinitdata = { | |||
| 527 | { 0, } | 527 | { 0, } |
| 528 | }; | 528 | }; |
| 529 | 529 | ||
| 530 | static struct isapnp_device_id *ipid __devinitdata = &sedl_ids[0]; | 530 | static struct isapnp_device_id *ipid = &sedl_ids[0]; |
| 531 | static struct pnp_card *pnp_c __devinitdata = NULL; | 531 | static struct pnp_card *pnp_c = NULL; |
| 532 | 532 | ||
| 533 | static int __devinit | 533 | static int setup_sedlbauer_isapnp(struct IsdnCard *card, int *bytecnt) |
| 534 | setup_sedlbauer_isapnp(struct IsdnCard *card, int *bytecnt) | ||
| 535 | { | 534 | { |
| 536 | struct IsdnCardState *cs = card->cs; | 535 | struct IsdnCardState *cs = card->cs; |
| 537 | struct pnp_dev *pnp_d; | 536 | struct pnp_dev *pnp_d; |
| @@ -591,18 +590,16 @@ setup_sedlbauer_isapnp(struct IsdnCard *card, int *bytecnt) | |||
| 591 | } | 590 | } |
| 592 | #else | 591 | #else |
| 593 | 592 | ||
| 594 | static int __devinit | 593 | static int setup_sedlbauer_isapnp(struct IsdnCard *card, int *bytecnt) |
| 595 | setup_sedlbauer_isapnp(struct IsdnCard *card, int *bytecnt) | ||
| 596 | { | 594 | { |
| 597 | return -1; | 595 | return -1; |
| 598 | } | 596 | } |
| 599 | #endif /* __ISAPNP__ */ | 597 | #endif /* __ISAPNP__ */ |
| 600 | 598 | ||
| 601 | #ifdef CONFIG_PCI | 599 | #ifdef CONFIG_PCI |
| 602 | static struct pci_dev *dev_sedl __devinitdata = NULL; | 600 | static struct pci_dev *dev_sedl = NULL; |
| 603 | 601 | ||
| 604 | static int __devinit | 602 | static int setup_sedlbauer_pci(struct IsdnCard *card) |
| 605 | setup_sedlbauer_pci(struct IsdnCard *card) | ||
| 606 | { | 603 | { |
| 607 | struct IsdnCardState *cs = card->cs; | 604 | struct IsdnCardState *cs = card->cs; |
| 608 | u16 sub_vendor_id, sub_id; | 605 | u16 sub_vendor_id, sub_id; |
| @@ -667,16 +664,14 @@ setup_sedlbauer_pci(struct IsdnCard *card) | |||
| 667 | 664 | ||
| 668 | #else | 665 | #else |
| 669 | 666 | ||
| 670 | static int __devinit | 667 | static int setup_sedlbauer_pci(struct IsdnCard *card) |
| 671 | setup_sedlbauer_pci(struct IsdnCard *card) | ||
| 672 | { | 668 | { |
| 673 | return (1); | 669 | return (1); |
| 674 | } | 670 | } |
| 675 | 671 | ||
| 676 | #endif /* CONFIG_PCI */ | 672 | #endif /* CONFIG_PCI */ |
| 677 | 673 | ||
| 678 | int __devinit | 674 | int setup_sedlbauer(struct IsdnCard *card) |
| 679 | setup_sedlbauer(struct IsdnCard *card) | ||
| 680 | { | 675 | { |
| 681 | int bytecnt = 8, ver, val, rc; | 676 | int bytecnt = 8, ver, val, rc; |
| 682 | struct IsdnCardState *cs = card->cs; | 677 | struct IsdnCardState *cs = card->cs; |
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c index f0dfc0c976eb..90f81291641b 100644 --- a/drivers/isdn/hisax/sedlbauer_cs.c +++ b/drivers/isdn/hisax/sedlbauer_cs.c | |||
| @@ -62,10 +62,10 @@ MODULE_LICENSE("Dual MPL/GPL"); | |||
| 62 | static int protocol = 2; /* EURO-ISDN Default */ | 62 | static int protocol = 2; /* EURO-ISDN Default */ |
| 63 | module_param(protocol, int, 0); | 63 | module_param(protocol, int, 0); |
| 64 | 64 | ||
| 65 | static int sedlbauer_config(struct pcmcia_device *link) __devinit; | 65 | static int sedlbauer_config(struct pcmcia_device *link); |
| 66 | static void sedlbauer_release(struct pcmcia_device *link); | 66 | static void sedlbauer_release(struct pcmcia_device *link); |
| 67 | 67 | ||
| 68 | static void sedlbauer_detach(struct pcmcia_device *p_dev) __devexit; | 68 | static void sedlbauer_detach(struct pcmcia_device *p_dev); |
| 69 | 69 | ||
| 70 | typedef struct local_info_t { | 70 | typedef struct local_info_t { |
| 71 | struct pcmcia_device *p_dev; | 71 | struct pcmcia_device *p_dev; |
| @@ -73,7 +73,7 @@ typedef struct local_info_t { | |||
| 73 | int cardnr; | 73 | int cardnr; |
| 74 | } local_info_t; | 74 | } local_info_t; |
| 75 | 75 | ||
| 76 | static int __devinit sedlbauer_probe(struct pcmcia_device *link) | 76 | static int sedlbauer_probe(struct pcmcia_device *link) |
| 77 | { | 77 | { |
| 78 | local_info_t *local; | 78 | local_info_t *local; |
| 79 | 79 | ||
| @@ -90,7 +90,7 @@ static int __devinit sedlbauer_probe(struct pcmcia_device *link) | |||
| 90 | return sedlbauer_config(link); | 90 | return sedlbauer_config(link); |
| 91 | } /* sedlbauer_attach */ | 91 | } /* sedlbauer_attach */ |
| 92 | 92 | ||
| 93 | static void __devexit sedlbauer_detach(struct pcmcia_device *link) | 93 | static void sedlbauer_detach(struct pcmcia_device *link) |
| 94 | { | 94 | { |
| 95 | dev_dbg(&link->dev, "sedlbauer_detach(0x%p)\n", link); | 95 | dev_dbg(&link->dev, "sedlbauer_detach(0x%p)\n", link); |
| 96 | 96 | ||
| @@ -110,7 +110,7 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev, void *priv_data) | |||
| 110 | return pcmcia_request_io(p_dev); | 110 | return pcmcia_request_io(p_dev); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | static int __devinit sedlbauer_config(struct pcmcia_device *link) | 113 | static int sedlbauer_config(struct pcmcia_device *link) |
| 114 | { | 114 | { |
| 115 | int ret; | 115 | int ret; |
| 116 | IsdnCard_t icard; | 116 | IsdnCard_t icard; |
| @@ -201,7 +201,7 @@ static struct pcmcia_driver sedlbauer_driver = { | |||
| 201 | .owner = THIS_MODULE, | 201 | .owner = THIS_MODULE, |
| 202 | .name = "sedlbauer_cs", | 202 | .name = "sedlbauer_cs", |
| 203 | .probe = sedlbauer_probe, | 203 | .probe = sedlbauer_probe, |
| 204 | .remove = __devexit_p(sedlbauer_detach), | 204 | .remove = sedlbauer_detach, |
| 205 | .id_table = sedlbauer_ids, | 205 | .id_table = sedlbauer_ids, |
| 206 | .suspend = sedlbauer_suspend, | 206 | .suspend = sedlbauer_suspend, |
| 207 | .resume = sedlbauer_resume, | 207 | .resume = sedlbauer_resume, |
diff --git a/drivers/isdn/hisax/sportster.c b/drivers/isdn/hisax/sportster.c index 1267298ef551..18cee6360d0a 100644 --- a/drivers/isdn/hisax/sportster.c +++ b/drivers/isdn/hisax/sportster.c | |||
| @@ -183,8 +183,7 @@ Sportster_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 183 | return (0); | 183 | return (0); |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | static int __devinit | 186 | static int get_io_range(struct IsdnCardState *cs) |
| 187 | get_io_range(struct IsdnCardState *cs) | ||
| 188 | { | 187 | { |
| 189 | int i, j, adr; | 188 | int i, j, adr; |
| 190 | 189 | ||
| @@ -208,8 +207,7 @@ get_io_range(struct IsdnCardState *cs) | |||
| 208 | } | 207 | } |
| 209 | } | 208 | } |
| 210 | 209 | ||
| 211 | int __devinit | 210 | int setup_sportster(struct IsdnCard *card) |
| 212 | setup_sportster(struct IsdnCard *card) | ||
| 213 | { | 211 | { |
| 214 | struct IsdnCardState *cs = card->cs; | 212 | struct IsdnCardState *cs = card->cs; |
| 215 | char tmp[64]; | 213 | char tmp[64]; |
diff --git a/drivers/isdn/hisax/teleint.c b/drivers/isdn/hisax/teleint.c index fa329e27cc5b..bf647545c70c 100644 --- a/drivers/isdn/hisax/teleint.c +++ b/drivers/isdn/hisax/teleint.c | |||
| @@ -259,8 +259,7 @@ TeleInt_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 259 | return (0); | 259 | return (0); |
| 260 | } | 260 | } |
| 261 | 261 | ||
| 262 | int __devinit | 262 | int setup_TeleInt(struct IsdnCard *card) |
| 263 | setup_TeleInt(struct IsdnCard *card) | ||
| 264 | { | 263 | { |
| 265 | struct IsdnCardState *cs = card->cs; | 264 | struct IsdnCardState *cs = card->cs; |
| 266 | char tmp[64]; | 265 | char tmp[64]; |
diff --git a/drivers/isdn/hisax/teles0.c b/drivers/isdn/hisax/teles0.c index 49b4a26f91e0..ce9eabdd2f6e 100644 --- a/drivers/isdn/hisax/teles0.c +++ b/drivers/isdn/hisax/teles0.c | |||
| @@ -263,8 +263,7 @@ Teles_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 263 | return (0); | 263 | return (0); |
| 264 | } | 264 | } |
| 265 | 265 | ||
| 266 | int __devinit | 266 | int setup_teles0(struct IsdnCard *card) |
| 267 | setup_teles0(struct IsdnCard *card) | ||
| 268 | { | 267 | { |
| 269 | u_char val; | 268 | u_char val; |
| 270 | struct IsdnCardState *cs = card->cs; | 269 | struct IsdnCardState *cs = card->cs; |
diff --git a/drivers/isdn/hisax/teles3.c b/drivers/isdn/hisax/teles3.c index 220b919fafc3..38fb2c1a3f0f 100644 --- a/drivers/isdn/hisax/teles3.c +++ b/drivers/isdn/hisax/teles3.c | |||
| @@ -253,7 +253,7 @@ Teles_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 253 | 253 | ||
| 254 | #ifdef __ISAPNP__ | 254 | #ifdef __ISAPNP__ |
| 255 | 255 | ||
| 256 | static struct isapnp_device_id teles_ids[] __devinitdata = { | 256 | static struct isapnp_device_id teles_ids[] = { |
| 257 | { ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110), | 257 | { ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110), |
| 258 | ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110), | 258 | ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110), |
| 259 | (unsigned long) "Teles 16.3 PnP" }, | 259 | (unsigned long) "Teles 16.3 PnP" }, |
| @@ -266,12 +266,11 @@ static struct isapnp_device_id teles_ids[] __devinitdata = { | |||
| 266 | { 0, } | 266 | { 0, } |
| 267 | }; | 267 | }; |
| 268 | 268 | ||
| 269 | static struct isapnp_device_id *ipid __devinitdata = &teles_ids[0]; | 269 | static struct isapnp_device_id *ipid = &teles_ids[0]; |
| 270 | static struct pnp_card *pnp_c __devinitdata = NULL; | 270 | static struct pnp_card *pnp_c = NULL; |
| 271 | #endif | 271 | #endif |
| 272 | 272 | ||
| 273 | int __devinit | 273 | int setup_teles3(struct IsdnCard *card) |
| 274 | setup_teles3(struct IsdnCard *card) | ||
| 275 | { | 274 | { |
| 276 | u_char val; | 275 | u_char val; |
| 277 | struct IsdnCardState *cs = card->cs; | 276 | struct IsdnCardState *cs = card->cs; |
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c index 4deac451807c..f2476ffb04fd 100644 --- a/drivers/isdn/hisax/teles_cs.c +++ b/drivers/isdn/hisax/teles_cs.c | |||
| @@ -43,9 +43,9 @@ MODULE_LICENSE("GPL"); | |||
| 43 | static int protocol = 2; /* EURO-ISDN Default */ | 43 | static int protocol = 2; /* EURO-ISDN Default */ |
| 44 | module_param(protocol, int, 0); | 44 | module_param(protocol, int, 0); |
| 45 | 45 | ||
| 46 | static int teles_cs_config(struct pcmcia_device *link) __devinit; | 46 | static int teles_cs_config(struct pcmcia_device *link); |
| 47 | static void teles_cs_release(struct pcmcia_device *link); | 47 | static void teles_cs_release(struct pcmcia_device *link); |
| 48 | static void teles_detach(struct pcmcia_device *p_dev) __devexit; | 48 | static void teles_detach(struct pcmcia_device *p_dev); |
| 49 | 49 | ||
| 50 | typedef struct local_info_t { | 50 | typedef struct local_info_t { |
| 51 | struct pcmcia_device *p_dev; | 51 | struct pcmcia_device *p_dev; |
| @@ -53,7 +53,7 @@ typedef struct local_info_t { | |||
| 53 | int cardnr; | 53 | int cardnr; |
| 54 | } local_info_t; | 54 | } local_info_t; |
| 55 | 55 | ||
| 56 | static int __devinit teles_probe(struct pcmcia_device *link) | 56 | static int teles_probe(struct pcmcia_device *link) |
| 57 | { | 57 | { |
| 58 | local_info_t *local; | 58 | local_info_t *local; |
| 59 | 59 | ||
| @@ -72,7 +72,7 @@ static int __devinit teles_probe(struct pcmcia_device *link) | |||
| 72 | return teles_cs_config(link); | 72 | return teles_cs_config(link); |
| 73 | } /* teles_attach */ | 73 | } /* teles_attach */ |
| 74 | 74 | ||
| 75 | static void __devexit teles_detach(struct pcmcia_device *link) | 75 | static void teles_detach(struct pcmcia_device *link) |
| 76 | { | 76 | { |
| 77 | local_info_t *info = link->priv; | 77 | local_info_t *info = link->priv; |
| 78 | 78 | ||
| @@ -108,7 +108,7 @@ static int teles_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data) | |||
| 108 | return -ENODEV; | 108 | return -ENODEV; |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | static int __devinit teles_cs_config(struct pcmcia_device *link) | 111 | static int teles_cs_config(struct pcmcia_device *link) |
| 112 | { | 112 | { |
| 113 | int i; | 113 | int i; |
| 114 | IsdnCard_t icard; | 114 | IsdnCard_t icard; |
| @@ -192,7 +192,7 @@ static struct pcmcia_driver teles_cs_driver = { | |||
| 192 | .owner = THIS_MODULE, | 192 | .owner = THIS_MODULE, |
| 193 | .name = "teles_cs", | 193 | .name = "teles_cs", |
| 194 | .probe = teles_probe, | 194 | .probe = teles_probe, |
| 195 | .remove = __devexit_p(teles_detach), | 195 | .remove = teles_detach, |
| 196 | .id_table = teles_ids, | 196 | .id_table = teles_ids, |
| 197 | .suspend = teles_suspend, | 197 | .suspend = teles_suspend, |
| 198 | .resume = teles_resume, | 198 | .resume = teles_resume, |
diff --git a/drivers/isdn/hisax/telespci.c b/drivers/isdn/hisax/telespci.c index 9c002c9dc771..f6ab63aa6995 100644 --- a/drivers/isdn/hisax/telespci.c +++ b/drivers/isdn/hisax/telespci.c | |||
| @@ -283,10 +283,9 @@ TelesPCI_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 283 | return (0); | 283 | return (0); |
| 284 | } | 284 | } |
| 285 | 285 | ||
| 286 | static struct pci_dev *dev_tel __devinitdata = NULL; | 286 | static struct pci_dev *dev_tel = NULL; |
| 287 | 287 | ||
| 288 | int __devinit | 288 | int setup_telespci(struct IsdnCard *card) |
| 289 | setup_telespci(struct IsdnCard *card) | ||
| 290 | { | 289 | { |
| 291 | struct IsdnCardState *cs = card->cs; | 290 | struct IsdnCardState *cs = card->cs; |
| 292 | char tmp[64]; | 291 | char tmp[64]; |
diff --git a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c index 0f0d094af85b..d8cac6935818 100644 --- a/drivers/isdn/hisax/w6692.c +++ b/drivers/isdn/hisax/w6692.c | |||
| @@ -991,10 +991,9 @@ w6692_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
| 991 | 991 | ||
| 992 | static int id_idx; | 992 | static int id_idx; |
| 993 | 993 | ||
| 994 | static struct pci_dev *dev_w6692 __devinitdata = NULL; | 994 | static struct pci_dev *dev_w6692 = NULL; |
| 995 | 995 | ||
| 996 | int __devinit | 996 | int setup_w6692(struct IsdnCard *card) |
| 997 | setup_w6692(struct IsdnCard *card) | ||
| 998 | { | 997 | { |
| 999 | struct IsdnCardState *cs = card->cs; | 998 | struct IsdnCardState *cs = card->cs; |
| 1000 | char tmp[64]; | 999 | char tmp[64]; |
diff --git a/drivers/isdn/hysdn/hysdn_init.c b/drivers/isdn/hysdn/hysdn_init.c index b61bbb4bb52b..0db2f7506250 100644 --- a/drivers/isdn/hysdn/hysdn_init.c +++ b/drivers/isdn/hysdn/hysdn_init.c | |||
| @@ -56,8 +56,8 @@ static hysdn_card *card_last = NULL; /* pointer to first card */ | |||
| 56 | /* is assumed and the module will not be kept in memory. */ | 56 | /* is assumed and the module will not be kept in memory. */ |
| 57 | /****************************************************************************/ | 57 | /****************************************************************************/ |
| 58 | 58 | ||
| 59 | static int __devinit hysdn_pci_init_one(struct pci_dev *akt_pcidev, | 59 | static int hysdn_pci_init_one(struct pci_dev *akt_pcidev, |
| 60 | const struct pci_device_id *ent) | 60 | const struct pci_device_id *ent) |
| 61 | { | 61 | { |
| 62 | hysdn_card *card; | 62 | hysdn_card *card; |
| 63 | int rc; | 63 | int rc; |
| @@ -109,7 +109,7 @@ err_out: | |||
| 109 | return rc; | 109 | return rc; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | static void __devexit hysdn_pci_remove_one(struct pci_dev *akt_pcidev) | 112 | static void hysdn_pci_remove_one(struct pci_dev *akt_pcidev) |
| 113 | { | 113 | { |
| 114 | hysdn_card *card = pci_get_drvdata(akt_pcidev); | 114 | hysdn_card *card = pci_get_drvdata(akt_pcidev); |
| 115 | 115 | ||
| @@ -147,7 +147,7 @@ static struct pci_driver hysdn_pci_driver = { | |||
| 147 | .name = "hysdn", | 147 | .name = "hysdn", |
| 148 | .id_table = hysdn_pci_tbl, | 148 | .id_table = hysdn_pci_tbl, |
| 149 | .probe = hysdn_pci_init_one, | 149 | .probe = hysdn_pci_init_one, |
| 150 | .remove = __devexit_p(hysdn_pci_remove_one), | 150 | .remove = hysdn_pci_remove_one, |
| 151 | }; | 151 | }; |
| 152 | 152 | ||
| 153 | static int hysdn_have_procfs; | 153 | static int hysdn_have_procfs; |
diff --git a/drivers/isdn/mISDN/core.c b/drivers/isdn/mISDN/core.c index c401634c00ec..3e245712bba7 100644 --- a/drivers/isdn/mISDN/core.c +++ b/drivers/isdn/mISDN/core.c | |||
| @@ -140,7 +140,6 @@ static struct device_attribute mISDN_dev_attrs[] = { | |||
| 140 | {} | 140 | {} |
| 141 | }; | 141 | }; |
| 142 | 142 | ||
| 143 | #ifdef CONFIG_HOTPLUG | ||
| 144 | static int mISDN_uevent(struct device *dev, struct kobj_uevent_env *env) | 143 | static int mISDN_uevent(struct device *dev, struct kobj_uevent_env *env) |
| 145 | { | 144 | { |
| 146 | struct mISDNdevice *mdev = dev_to_mISDN(dev); | 145 | struct mISDNdevice *mdev = dev_to_mISDN(dev); |
| @@ -153,7 +152,6 @@ static int mISDN_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
| 153 | 152 | ||
| 154 | return 0; | 153 | return 0; |
| 155 | } | 154 | } |
| 156 | #endif | ||
| 157 | 155 | ||
| 158 | static void mISDN_class_release(struct class *cls) | 156 | static void mISDN_class_release(struct class *cls) |
| 159 | { | 157 | { |
| @@ -163,9 +161,7 @@ static void mISDN_class_release(struct class *cls) | |||
| 163 | static struct class mISDN_class = { | 161 | static struct class mISDN_class = { |
| 164 | .name = "mISDN", | 162 | .name = "mISDN", |
| 165 | .owner = THIS_MODULE, | 163 | .owner = THIS_MODULE, |
| 166 | #ifdef CONFIG_HOTPLUG | ||
| 167 | .dev_uevent = mISDN_uevent, | 164 | .dev_uevent = mISDN_uevent, |
| 168 | #endif | ||
| 169 | .dev_attrs = mISDN_dev_attrs, | 165 | .dev_attrs = mISDN_dev_attrs, |
| 170 | .dev_release = mISDN_dev_release, | 166 | .dev_release = mISDN_dev_release, |
| 171 | .class_release = mISDN_class_release, | 167 | .class_release = mISDN_class_release, |
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index ef87310b7662..ac5c87939860 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c | |||
| @@ -679,7 +679,7 @@ void macio_release_resources(struct macio_dev *dev) | |||
| 679 | 679 | ||
| 680 | #ifdef CONFIG_PCI | 680 | #ifdef CONFIG_PCI |
| 681 | 681 | ||
| 682 | static int __devinit macio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 682 | static int macio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 683 | { | 683 | { |
| 684 | struct device_node* np; | 684 | struct device_node* np; |
| 685 | struct macio_chip* chip; | 685 | struct macio_chip* chip; |
| @@ -739,7 +739,7 @@ static int __devinit macio_pci_probe(struct pci_dev *pdev, const struct pci_devi | |||
| 739 | return 0; | 739 | return 0; |
| 740 | } | 740 | } |
| 741 | 741 | ||
| 742 | static void __devexit macio_pci_remove(struct pci_dev* pdev) | 742 | static void macio_pci_remove(struct pci_dev* pdev) |
| 743 | { | 743 | { |
| 744 | panic("removing of macio-asic not supported !\n"); | 744 | panic("removing of macio-asic not supported !\n"); |
| 745 | } | 745 | } |
| @@ -748,7 +748,7 @@ static void __devexit macio_pci_remove(struct pci_dev* pdev) | |||
| 748 | * MacIO is matched against any Apple ID, it's probe() function | 748 | * MacIO is matched against any Apple ID, it's probe() function |
| 749 | * will then decide wether it applies or not | 749 | * will then decide wether it applies or not |
| 750 | */ | 750 | */ |
| 751 | static const struct pci_device_id __devinitconst pci_ids[] = { { | 751 | static const struct pci_device_id pci_ids[] = { { |
| 752 | .vendor = PCI_VENDOR_ID_APPLE, | 752 | .vendor = PCI_VENDOR_ID_APPLE, |
| 753 | .device = PCI_ANY_ID, | 753 | .device = PCI_ANY_ID, |
| 754 | .subvendor = PCI_ANY_ID, | 754 | .subvendor = PCI_ANY_ID, |
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index 3f8d032f180f..d98e566a8f5e 100644 --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c | |||
| @@ -556,7 +556,8 @@ static int media_bay_task(void *x) | |||
| 556 | return 0; | 556 | return 0; |
| 557 | } | 557 | } |
| 558 | 558 | ||
| 559 | static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_device_id *match) | 559 | static int media_bay_attach(struct macio_dev *mdev, |
| 560 | const struct of_device_id *match) | ||
| 560 | { | 561 | { |
| 561 | struct media_bay_info* bay; | 562 | struct media_bay_info* bay; |
| 562 | u32 __iomem *regbase; | 563 | u32 __iomem *regbase; |
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index 6dc26b61219b..cad0e19b47a2 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c | |||
| @@ -253,7 +253,7 @@ static void rackmeter_do_timer(struct work_struct *work) | |||
| 253 | msecs_to_jiffies(CPU_SAMPLING_RATE)); | 253 | msecs_to_jiffies(CPU_SAMPLING_RATE)); |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | static void __devinit rackmeter_init_cpu_sniffer(struct rackmeter *rm) | 256 | static void rackmeter_init_cpu_sniffer(struct rackmeter *rm) |
| 257 | { | 257 | { |
| 258 | unsigned int cpu; | 258 | unsigned int cpu; |
| 259 | 259 | ||
| @@ -287,7 +287,7 @@ static void rackmeter_stop_cpu_sniffer(struct rackmeter *rm) | |||
| 287 | cancel_delayed_work_sync(&rm->cpu[1].sniffer); | 287 | cancel_delayed_work_sync(&rm->cpu[1].sniffer); |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | static int __devinit rackmeter_setup(struct rackmeter *rm) | 290 | static int rackmeter_setup(struct rackmeter *rm) |
| 291 | { | 291 | { |
| 292 | pr_debug("rackmeter: setting up i2s..\n"); | 292 | pr_debug("rackmeter: setting up i2s..\n"); |
| 293 | rackmeter_setup_i2s(rm); | 293 | rackmeter_setup_i2s(rm); |
| @@ -362,8 +362,8 @@ static irqreturn_t rackmeter_irq(int irq, void *arg) | |||
| 362 | return IRQ_HANDLED; | 362 | return IRQ_HANDLED; |
| 363 | } | 363 | } |
| 364 | 364 | ||
| 365 | static int __devinit rackmeter_probe(struct macio_dev* mdev, | 365 | static int rackmeter_probe(struct macio_dev* mdev, |
| 366 | const struct of_device_id *match) | 366 | const struct of_device_id *match) |
| 367 | { | 367 | { |
| 368 | struct device_node *i2s = NULL, *np = NULL; | 368 | struct device_node *i2s = NULL, *np = NULL; |
| 369 | struct rackmeter *rm = NULL; | 369 | struct rackmeter *rm = NULL; |
| @@ -521,7 +521,7 @@ static int __devinit rackmeter_probe(struct macio_dev* mdev, | |||
| 521 | return rc; | 521 | return rc; |
| 522 | } | 522 | } |
| 523 | 523 | ||
| 524 | static int __devexit rackmeter_remove(struct macio_dev* mdev) | 524 | static int rackmeter_remove(struct macio_dev* mdev) |
| 525 | { | 525 | { |
| 526 | struct rackmeter *rm = dev_get_drvdata(&mdev->ofdev.dev); | 526 | struct rackmeter *rm = dev_get_drvdata(&mdev->ofdev.dev); |
| 527 | 527 | ||
| @@ -588,7 +588,7 @@ static struct macio_driver rackmeter_driver = { | |||
| 588 | .of_match_table = rackmeter_match, | 588 | .of_match_table = rackmeter_match, |
| 589 | }, | 589 | }, |
| 590 | .probe = rackmeter_probe, | 590 | .probe = rackmeter_probe, |
| 591 | .remove = __devexit_p(rackmeter_remove), | 591 | .remove = rackmeter_remove, |
| 592 | .shutdown = rackmeter_shutdown, | 592 | .shutdown = rackmeter_shutdown, |
| 593 | }; | 593 | }; |
| 594 | 594 | ||
diff --git a/drivers/macintosh/windfarm_ad7417_sensor.c b/drivers/macintosh/windfarm_ad7417_sensor.c index ac3f243b9c5a..7c28b71246c9 100644 --- a/drivers/macintosh/windfarm_ad7417_sensor.c +++ b/drivers/macintosh/windfarm_ad7417_sensor.c | |||
| @@ -177,9 +177,9 @@ static const struct wf_sensor_ops wf_ad7417_adc_ops = { | |||
| 177 | .owner = THIS_MODULE, | 177 | .owner = THIS_MODULE, |
| 178 | }; | 178 | }; |
| 179 | 179 | ||
| 180 | static void __devinit wf_ad7417_add_sensor(struct wf_ad7417_priv *pv, | 180 | static void wf_ad7417_add_sensor(struct wf_ad7417_priv *pv, |
| 181 | int index, const char *name, | 181 | int index, const char *name, |
| 182 | const struct wf_sensor_ops *ops) | 182 | const struct wf_sensor_ops *ops) |
| 183 | { | 183 | { |
| 184 | pv->sensors[index].name = kasprintf(GFP_KERNEL, "%s-%d", name, pv->cpu); | 184 | pv->sensors[index].name = kasprintf(GFP_KERNEL, "%s-%d", name, pv->cpu); |
| 185 | pv->sensors[index].priv = pv; | 185 | pv->sensors[index].priv = pv; |
| @@ -188,7 +188,7 @@ static void __devinit wf_ad7417_add_sensor(struct wf_ad7417_priv *pv, | |||
| 188 | kref_get(&pv->ref); | 188 | kref_get(&pv->ref); |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | static void __devinit wf_ad7417_init_chip(struct wf_ad7417_priv *pv) | 191 | static void wf_ad7417_init_chip(struct wf_ad7417_priv *pv) |
| 192 | { | 192 | { |
| 193 | int rc; | 193 | int rc; |
| 194 | u8 buf[2]; | 194 | u8 buf[2]; |
| @@ -230,8 +230,8 @@ static void __devinit wf_ad7417_init_chip(struct wf_ad7417_priv *pv) | |||
| 230 | pv->config = config; | 230 | pv->config = config; |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | static int __devinit wf_ad7417_probe(struct i2c_client *client, | 233 | static int wf_ad7417_probe(struct i2c_client *client, |
| 234 | const struct i2c_device_id *id) | 234 | const struct i2c_device_id *id) |
| 235 | { | 235 | { |
| 236 | struct wf_ad7417_priv *pv; | 236 | struct wf_ad7417_priv *pv; |
| 237 | const struct mpu_data *mpu; | 237 | const struct mpu_data *mpu; |
| @@ -290,7 +290,7 @@ static int __devinit wf_ad7417_probe(struct i2c_client *client, | |||
| 290 | return 0; | 290 | return 0; |
| 291 | } | 291 | } |
| 292 | 292 | ||
| 293 | static int __devexit wf_ad7417_remove(struct i2c_client *client) | 293 | static int wf_ad7417_remove(struct i2c_client *client) |
| 294 | { | 294 | { |
| 295 | struct wf_ad7417_priv *pv = dev_get_drvdata(&client->dev); | 295 | struct wf_ad7417_priv *pv = dev_get_drvdata(&client->dev); |
| 296 | int i; | 296 | int i; |
| @@ -322,7 +322,7 @@ static struct i2c_driver wf_ad7417_driver = { | |||
| 322 | .id_table = wf_ad7417_id, | 322 | .id_table = wf_ad7417_id, |
| 323 | }; | 323 | }; |
| 324 | 324 | ||
| 325 | static int __devinit wf_ad7417_init(void) | 325 | static int wf_ad7417_init(void) |
| 326 | { | 326 | { |
| 327 | /* This is only supported on these machines */ | 327 | /* This is only supported on these machines */ |
| 328 | if (!of_machine_is_compatible("PowerMac7,2") && | 328 | if (!of_machine_is_compatible("PowerMac7,2") && |
| @@ -333,7 +333,7 @@ static int __devinit wf_ad7417_init(void) | |||
| 333 | return i2c_add_driver(&wf_ad7417_driver); | 333 | return i2c_add_driver(&wf_ad7417_driver); |
| 334 | } | 334 | } |
| 335 | 335 | ||
| 336 | static void __devexit wf_ad7417_exit(void) | 336 | static void wf_ad7417_exit(void) |
| 337 | { | 337 | { |
| 338 | i2c_del_driver(&wf_ad7417_driver); | 338 | i2c_del_driver(&wf_ad7417_driver); |
| 339 | } | 339 | } |
diff --git a/drivers/macintosh/windfarm_fcu_controls.c b/drivers/macintosh/windfarm_fcu_controls.c index fd6ed15a979d..0226b796a21c 100644 --- a/drivers/macintosh/windfarm_fcu_controls.c +++ b/drivers/macintosh/windfarm_fcu_controls.c | |||
| @@ -282,7 +282,7 @@ static const struct wf_control_ops wf_fcu_fan_pwm_ops = { | |||
| 282 | .owner = THIS_MODULE, | 282 | .owner = THIS_MODULE, |
| 283 | }; | 283 | }; |
| 284 | 284 | ||
| 285 | static void __devinit wf_fcu_get_pump_minmax(struct wf_fcu_fan *fan) | 285 | static void wf_fcu_get_pump_minmax(struct wf_fcu_fan *fan) |
| 286 | { | 286 | { |
| 287 | const struct mpu_data *mpu = wf_get_mpu(0); | 287 | const struct mpu_data *mpu = wf_get_mpu(0); |
| 288 | u16 pump_min = 0, pump_max = 0xffff; | 288 | u16 pump_min = 0, pump_max = 0xffff; |
| @@ -317,7 +317,7 @@ static void __devinit wf_fcu_get_pump_minmax(struct wf_fcu_fan *fan) | |||
| 317 | fan->ctrl.name, pump_min, pump_max); | 317 | fan->ctrl.name, pump_min, pump_max); |
| 318 | } | 318 | } |
| 319 | 319 | ||
| 320 | static void __devinit wf_fcu_get_rpmfan_minmax(struct wf_fcu_fan *fan) | 320 | static void wf_fcu_get_rpmfan_minmax(struct wf_fcu_fan *fan) |
| 321 | { | 321 | { |
| 322 | struct wf_fcu_priv *pv = fan->fcu_priv; | 322 | struct wf_fcu_priv *pv = fan->fcu_priv; |
| 323 | const struct mpu_data *mpu0 = wf_get_mpu(0); | 323 | const struct mpu_data *mpu0 = wf_get_mpu(0); |
| @@ -359,9 +359,8 @@ static void __devinit wf_fcu_get_rpmfan_minmax(struct wf_fcu_fan *fan) | |||
| 359 | fan->ctrl.name, fan->min, fan->max); | 359 | fan->ctrl.name, fan->min, fan->max); |
| 360 | } | 360 | } |
| 361 | 361 | ||
| 362 | static void __devinit wf_fcu_add_fan(struct wf_fcu_priv *pv, | 362 | static void wf_fcu_add_fan(struct wf_fcu_priv *pv, const char *name, |
| 363 | const char *name, | 363 | int type, int id) |
| 364 | int type, int id) | ||
| 365 | { | 364 | { |
| 366 | struct wf_fcu_fan *fan; | 365 | struct wf_fcu_fan *fan; |
| 367 | 366 | ||
| @@ -399,7 +398,7 @@ static void __devinit wf_fcu_add_fan(struct wf_fcu_priv *pv, | |||
| 399 | kref_get(&pv->ref); | 398 | kref_get(&pv->ref); |
| 400 | } | 399 | } |
| 401 | 400 | ||
| 402 | static void __devinit wf_fcu_lookup_fans(struct wf_fcu_priv *pv) | 401 | static void wf_fcu_lookup_fans(struct wf_fcu_priv *pv) |
| 403 | { | 402 | { |
| 404 | /* Translation of device-tree location properties to | 403 | /* Translation of device-tree location properties to |
| 405 | * windfarm fan names | 404 | * windfarm fan names |
| @@ -481,7 +480,7 @@ static void __devinit wf_fcu_lookup_fans(struct wf_fcu_priv *pv) | |||
| 481 | } | 480 | } |
| 482 | } | 481 | } |
| 483 | 482 | ||
| 484 | static void __devinit wf_fcu_default_fans(struct wf_fcu_priv *pv) | 483 | static void wf_fcu_default_fans(struct wf_fcu_priv *pv) |
| 485 | { | 484 | { |
| 486 | /* We only support the default fans for PowerMac7,2 */ | 485 | /* We only support the default fans for PowerMac7,2 */ |
| 487 | if (!of_machine_is_compatible("PowerMac7,2")) | 486 | if (!of_machine_is_compatible("PowerMac7,2")) |
| @@ -496,7 +495,7 @@ static void __devinit wf_fcu_default_fans(struct wf_fcu_priv *pv) | |||
| 496 | wf_fcu_add_fan(pv, "cpu-rear-fan-1", FCU_FAN_RPM, 6); | 495 | wf_fcu_add_fan(pv, "cpu-rear-fan-1", FCU_FAN_RPM, 6); |
| 497 | } | 496 | } |
| 498 | 497 | ||
| 499 | static int __devinit wf_fcu_init_chip(struct wf_fcu_priv *pv) | 498 | static int wf_fcu_init_chip(struct wf_fcu_priv *pv) |
| 500 | { | 499 | { |
| 501 | unsigned char buf = 0xff; | 500 | unsigned char buf = 0xff; |
| 502 | int rc; | 501 | int rc; |
| @@ -518,8 +517,8 @@ static int __devinit wf_fcu_init_chip(struct wf_fcu_priv *pv) | |||
| 518 | return 0; | 517 | return 0; |
| 519 | } | 518 | } |
| 520 | 519 | ||
| 521 | static int __devinit wf_fcu_probe(struct i2c_client *client, | 520 | static int wf_fcu_probe(struct i2c_client *client, |
| 522 | const struct i2c_device_id *id) | 521 | const struct i2c_device_id *id) |
| 523 | { | 522 | { |
| 524 | struct wf_fcu_priv *pv; | 523 | struct wf_fcu_priv *pv; |
| 525 | 524 | ||
| @@ -564,7 +563,7 @@ static int __devinit wf_fcu_probe(struct i2c_client *client, | |||
| 564 | return 0; | 563 | return 0; |
| 565 | } | 564 | } |
| 566 | 565 | ||
| 567 | static int __devexit wf_fcu_remove(struct i2c_client *client) | 566 | static int wf_fcu_remove(struct i2c_client *client) |
| 568 | { | 567 | { |
| 569 | struct wf_fcu_priv *pv = dev_get_drvdata(&client->dev); | 568 | struct wf_fcu_priv *pv = dev_get_drvdata(&client->dev); |
| 570 | struct wf_fcu_fan *fan; | 569 | struct wf_fcu_fan *fan; |
diff --git a/drivers/macintosh/windfarm_pm112.c b/drivers/macintosh/windfarm_pm112.c index e0ee80700cde..35ef6e2582b8 100644 --- a/drivers/macintosh/windfarm_pm112.c +++ b/drivers/macintosh/windfarm_pm112.c | |||
| @@ -656,7 +656,7 @@ static int wf_pm112_probe(struct platform_device *dev) | |||
| 656 | return 0; | 656 | return 0; |
| 657 | } | 657 | } |
| 658 | 658 | ||
| 659 | static int __devexit wf_pm112_remove(struct platform_device *dev) | 659 | static int wf_pm112_remove(struct platform_device *dev) |
| 660 | { | 660 | { |
| 661 | wf_unregister_client(&pm112_events); | 661 | wf_unregister_client(&pm112_events); |
| 662 | /* should release all sensors and controls */ | 662 | /* should release all sensors and controls */ |
| @@ -665,7 +665,7 @@ static int __devexit wf_pm112_remove(struct platform_device *dev) | |||
| 665 | 665 | ||
| 666 | static struct platform_driver wf_pm112_driver = { | 666 | static struct platform_driver wf_pm112_driver = { |
| 667 | .probe = wf_pm112_probe, | 667 | .probe = wf_pm112_probe, |
| 668 | .remove = __devexit_p(wf_pm112_remove), | 668 | .remove = wf_pm112_remove, |
| 669 | .driver = { | 669 | .driver = { |
| 670 | .name = "windfarm", | 670 | .name = "windfarm", |
| 671 | .owner = THIS_MODULE, | 671 | .owner = THIS_MODULE, |
diff --git a/drivers/macintosh/windfarm_pm121.c b/drivers/macintosh/windfarm_pm121.c index 04067e073aa9..af605e915d41 100644 --- a/drivers/macintosh/windfarm_pm121.c +++ b/drivers/macintosh/windfarm_pm121.c | |||
| @@ -987,7 +987,7 @@ static int pm121_probe(struct platform_device *ddev) | |||
| 987 | return 0; | 987 | return 0; |
| 988 | } | 988 | } |
| 989 | 989 | ||
| 990 | static int __devexit pm121_remove(struct platform_device *ddev) | 990 | static int pm121_remove(struct platform_device *ddev) |
| 991 | { | 991 | { |
| 992 | wf_unregister_client(&pm121_events); | 992 | wf_unregister_client(&pm121_events); |
| 993 | return 0; | 993 | return 0; |
| @@ -995,7 +995,7 @@ static int __devexit pm121_remove(struct platform_device *ddev) | |||
| 995 | 995 | ||
| 996 | static struct platform_driver pm121_driver = { | 996 | static struct platform_driver pm121_driver = { |
| 997 | .probe = pm121_probe, | 997 | .probe = pm121_probe, |
| 998 | .remove = __devexit_p(pm121_remove), | 998 | .remove = pm121_remove, |
| 999 | .driver = { | 999 | .driver = { |
| 1000 | .name = "windfarm", | 1000 | .name = "windfarm", |
| 1001 | .bus = &platform_bus_type, | 1001 | .bus = &platform_bus_type, |
diff --git a/drivers/macintosh/windfarm_pm72.c b/drivers/macintosh/windfarm_pm72.c index 84ac913d7e3a..6e5585357cd3 100644 --- a/drivers/macintosh/windfarm_pm72.c +++ b/drivers/macintosh/windfarm_pm72.c | |||
| @@ -776,7 +776,7 @@ static int wf_pm72_probe(struct platform_device *dev) | |||
| 776 | return 0; | 776 | return 0; |
| 777 | } | 777 | } |
| 778 | 778 | ||
| 779 | static int __devexit wf_pm72_remove(struct platform_device *dev) | 779 | static int wf_pm72_remove(struct platform_device *dev) |
| 780 | { | 780 | { |
| 781 | wf_unregister_client(&pm72_events); | 781 | wf_unregister_client(&pm72_events); |
| 782 | 782 | ||
diff --git a/drivers/macintosh/windfarm_pm81.c b/drivers/macintosh/windfarm_pm81.c index 990c87606be9..f84933ff3298 100644 --- a/drivers/macintosh/windfarm_pm81.c +++ b/drivers/macintosh/windfarm_pm81.c | |||
| @@ -720,7 +720,7 @@ static int wf_smu_probe(struct platform_device *ddev) | |||
| 720 | return 0; | 720 | return 0; |
| 721 | } | 721 | } |
| 722 | 722 | ||
| 723 | static int __devexit wf_smu_remove(struct platform_device *ddev) | 723 | static int wf_smu_remove(struct platform_device *ddev) |
| 724 | { | 724 | { |
| 725 | wf_unregister_client(&wf_smu_events); | 725 | wf_unregister_client(&wf_smu_events); |
| 726 | 726 | ||
| @@ -763,7 +763,7 @@ static int __devexit wf_smu_remove(struct platform_device *ddev) | |||
| 763 | 763 | ||
| 764 | static struct platform_driver wf_smu_driver = { | 764 | static struct platform_driver wf_smu_driver = { |
| 765 | .probe = wf_smu_probe, | 765 | .probe = wf_smu_probe, |
| 766 | .remove = __devexit_p(wf_smu_remove), | 766 | .remove = wf_smu_remove, |
| 767 | .driver = { | 767 | .driver = { |
| 768 | .name = "windfarm", | 768 | .name = "windfarm", |
| 769 | .owner = THIS_MODULE, | 769 | .owner = THIS_MODULE, |
diff --git a/drivers/macintosh/windfarm_pm91.c b/drivers/macintosh/windfarm_pm91.c index 7653603cb00e..2eb484f213c8 100644 --- a/drivers/macintosh/windfarm_pm91.c +++ b/drivers/macintosh/windfarm_pm91.c | |||
| @@ -642,7 +642,7 @@ static int wf_smu_probe(struct platform_device *ddev) | |||
| 642 | return 0; | 642 | return 0; |
| 643 | } | 643 | } |
| 644 | 644 | ||
| 645 | static int __devexit wf_smu_remove(struct platform_device *ddev) | 645 | static int wf_smu_remove(struct platform_device *ddev) |
| 646 | { | 646 | { |
| 647 | wf_unregister_client(&wf_smu_events); | 647 | wf_unregister_client(&wf_smu_events); |
| 648 | 648 | ||
| @@ -692,7 +692,7 @@ static int __devexit wf_smu_remove(struct platform_device *ddev) | |||
| 692 | 692 | ||
| 693 | static struct platform_driver wf_smu_driver = { | 693 | static struct platform_driver wf_smu_driver = { |
| 694 | .probe = wf_smu_probe, | 694 | .probe = wf_smu_probe, |
| 695 | .remove = __devexit_p(wf_smu_remove), | 695 | .remove = wf_smu_remove, |
| 696 | .driver = { | 696 | .driver = { |
| 697 | .name = "windfarm", | 697 | .name = "windfarm", |
| 698 | .owner = THIS_MODULE, | 698 | .owner = THIS_MODULE, |
diff --git a/drivers/macintosh/windfarm_rm31.c b/drivers/macintosh/windfarm_rm31.c index 3eca6d4b52fc..844003fb4ef0 100644 --- a/drivers/macintosh/windfarm_rm31.c +++ b/drivers/macintosh/windfarm_rm31.c | |||
| @@ -669,7 +669,7 @@ static int wf_rm31_probe(struct platform_device *dev) | |||
| 669 | return 0; | 669 | return 0; |
| 670 | } | 670 | } |
| 671 | 671 | ||
| 672 | static int __devexit wf_rm31_remove(struct platform_device *dev) | 672 | static int wf_rm31_remove(struct platform_device *dev) |
| 673 | { | 673 | { |
| 674 | wf_unregister_client(&rm31_events); | 674 | wf_unregister_client(&rm31_events); |
| 675 | 675 | ||
diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index 45ecf8db1eae..64d71fb87a96 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c | |||
| @@ -540,8 +540,8 @@ static int init_device(struct i2c_client *client, struct adv7180_state *state) | |||
| 540 | return 0; | 540 | return 0; |
| 541 | } | 541 | } |
| 542 | 542 | ||
| 543 | static __devinit int adv7180_probe(struct i2c_client *client, | 543 | static int adv7180_probe(struct i2c_client *client, |
| 544 | const struct i2c_device_id *id) | 544 | const struct i2c_device_id *id) |
| 545 | { | 545 | { |
| 546 | struct adv7180_state *state; | 546 | struct adv7180_state *state; |
| 547 | struct v4l2_subdev *sd; | 547 | struct v4l2_subdev *sd; |
| @@ -587,7 +587,7 @@ err: | |||
| 587 | return ret; | 587 | return ret; |
| 588 | } | 588 | } |
| 589 | 589 | ||
| 590 | static __devexit int adv7180_remove(struct i2c_client *client) | 590 | static int adv7180_remove(struct i2c_client *client) |
| 591 | { | 591 | { |
| 592 | struct v4l2_subdev *sd = i2c_get_clientdata(client); | 592 | struct v4l2_subdev *sd = i2c_get_clientdata(client); |
| 593 | struct adv7180_state *state = to_state(sd); | 593 | struct adv7180_state *state = to_state(sd); |
| @@ -652,7 +652,7 @@ static struct i2c_driver adv7180_driver = { | |||
| 652 | .name = KBUILD_MODNAME, | 652 | .name = KBUILD_MODNAME, |
| 653 | }, | 653 | }, |
| 654 | .probe = adv7180_probe, | 654 | .probe = adv7180_probe, |
| 655 | .remove = __devexit_p(adv7180_remove), | 655 | .remove = adv7180_remove, |
| 656 | #ifdef CONFIG_PM | 656 | #ifdef CONFIG_PM |
| 657 | .suspend = adv7180_suspend, | 657 | .suspend = adv7180_suspend, |
| 658 | .resume = adv7180_resume, | 658 | .resume = adv7180_resume, |
diff --git a/drivers/media/i2c/adv7183.c b/drivers/media/i2c/adv7183.c index 10c3c1db4cdd..6fed5b74e743 100644 --- a/drivers/media/i2c/adv7183.c +++ b/drivers/media/i2c/adv7183.c | |||
| @@ -677,7 +677,7 @@ static struct i2c_driver adv7183_driver = { | |||
| 677 | .name = "adv7183", | 677 | .name = "adv7183", |
| 678 | }, | 678 | }, |
| 679 | .probe = adv7183_probe, | 679 | .probe = adv7183_probe, |
| 680 | .remove = __devexit_p(adv7183_remove), | 680 | .remove = adv7183_remove, |
| 681 | .id_table = adv7183_id, | 681 | .id_table = adv7183_id, |
| 682 | }; | 682 | }; |
| 683 | 683 | ||
diff --git a/drivers/media/i2c/as3645a.c b/drivers/media/i2c/as3645a.c index 3bfdbf9d9bf1..58d523f2648f 100644 --- a/drivers/media/i2c/as3645a.c +++ b/drivers/media/i2c/as3645a.c | |||
| @@ -713,7 +713,7 @@ static int as3645a_resume(struct device *dev) | |||
| 713 | * The number of LEDs reported in platform data is used to compute default | 713 | * The number of LEDs reported in platform data is used to compute default |
| 714 | * limits. Parameters passed through platform data can override those limits. | 714 | * limits. Parameters passed through platform data can override those limits. |
| 715 | */ | 715 | */ |
| 716 | static int __devinit as3645a_init_controls(struct as3645a *flash) | 716 | static int as3645a_init_controls(struct as3645a *flash) |
| 717 | { | 717 | { |
| 718 | const struct as3645a_platform_data *pdata = flash->pdata; | 718 | const struct as3645a_platform_data *pdata = flash->pdata; |
| 719 | struct v4l2_ctrl *ctrl; | 719 | struct v4l2_ctrl *ctrl; |
| @@ -804,8 +804,8 @@ static int __devinit as3645a_init_controls(struct as3645a *flash) | |||
| 804 | return flash->ctrls.error; | 804 | return flash->ctrls.error; |
| 805 | } | 805 | } |
| 806 | 806 | ||
| 807 | static int __devinit as3645a_probe(struct i2c_client *client, | 807 | static int as3645a_probe(struct i2c_client *client, |
| 808 | const struct i2c_device_id *devid) | 808 | const struct i2c_device_id *devid) |
| 809 | { | 809 | { |
| 810 | struct as3645a *flash; | 810 | struct as3645a *flash; |
| 811 | int ret; | 811 | int ret; |
| @@ -846,7 +846,7 @@ done: | |||
| 846 | return ret; | 846 | return ret; |
| 847 | } | 847 | } |
| 848 | 848 | ||
| 849 | static int __devexit as3645a_remove(struct i2c_client *client) | 849 | static int as3645a_remove(struct i2c_client *client) |
| 850 | { | 850 | { |
| 851 | struct v4l2_subdev *subdev = i2c_get_clientdata(client); | 851 | struct v4l2_subdev *subdev = i2c_get_clientdata(client); |
| 852 | struct as3645a *flash = to_as3645a(subdev); | 852 | struct as3645a *flash = to_as3645a(subdev); |
| @@ -877,7 +877,7 @@ static struct i2c_driver as3645a_i2c_driver = { | |||
| 877 | .pm = &as3645a_pm_ops, | 877 | .pm = &as3645a_pm_ops, |
| 878 | }, | 878 | }, |
| 879 | .probe = as3645a_probe, | 879 | .probe = as3645a_probe, |
| 880 | .remove = __devexit_p(as3645a_remove), | 880 | .remove = as3645a_remove, |
| 881 | .id_table = as3645a_id_table, | 881 | .id_table = as3645a_id_table, |
| 882 | }; | 882 | }; |
| 883 | 883 | ||
diff --git a/drivers/media/i2c/m5mols/m5mols_core.c b/drivers/media/i2c/m5mols/m5mols_core.c index 8131d651de9e..8a8d42fe2633 100644 --- a/drivers/media/i2c/m5mols/m5mols_core.c +++ b/drivers/media/i2c/m5mols/m5mols_core.c | |||
| @@ -926,8 +926,8 @@ static irqreturn_t m5mols_irq_handler(int irq, void *data) | |||
| 926 | return IRQ_HANDLED; | 926 | return IRQ_HANDLED; |
| 927 | } | 927 | } |
| 928 | 928 | ||
| 929 | static int __devinit m5mols_probe(struct i2c_client *client, | 929 | static int m5mols_probe(struct i2c_client *client, |
| 930 | const struct i2c_device_id *id) | 930 | const struct i2c_device_id *id) |
| 931 | { | 931 | { |
| 932 | const struct m5mols_platform_data *pdata = client->dev.platform_data; | 932 | const struct m5mols_platform_data *pdata = client->dev.platform_data; |
| 933 | struct m5mols_info *info; | 933 | struct m5mols_info *info; |
| @@ -1018,7 +1018,7 @@ out_free: | |||
| 1018 | return ret; | 1018 | return ret; |
| 1019 | } | 1019 | } |
| 1020 | 1020 | ||
| 1021 | static int __devexit m5mols_remove(struct i2c_client *client) | 1021 | static int m5mols_remove(struct i2c_client *client) |
| 1022 | { | 1022 | { |
| 1023 | struct v4l2_subdev *sd = i2c_get_clientdata(client); | 1023 | struct v4l2_subdev *sd = i2c_get_clientdata(client); |
| 1024 | struct m5mols_info *info = to_m5mols(sd); | 1024 | struct m5mols_info *info = to_m5mols(sd); |
| @@ -1045,7 +1045,7 @@ static struct i2c_driver m5mols_i2c_driver = { | |||
| 1045 | .name = MODULE_NAME, | 1045 | .name = MODULE_NAME, |
| 1046 | }, | 1046 | }, |
| 1047 | .probe = m5mols_probe, | 1047 | .probe = m5mols_probe, |
| 1048 | .remove = __devexit_p(m5mols_remove), | 1048 | .remove = m5mols_remove, |
| 1049 | .id_table = m5mols_id, | 1049 | .id_table = m5mols_id, |
| 1050 | }; | 1050 | }; |
| 1051 | 1051 | ||
diff --git a/drivers/media/i2c/vs6624.c b/drivers/media/i2c/vs6624.c index f434a19b9bcb..9ac1b8c3a837 100644 --- a/drivers/media/i2c/vs6624.c +++ b/drivers/media/i2c/vs6624.c | |||
| @@ -788,7 +788,7 @@ static const struct v4l2_subdev_ops vs6624_ops = { | |||
| 788 | .video = &vs6624_video_ops, | 788 | .video = &vs6624_video_ops, |
| 789 | }; | 789 | }; |
| 790 | 790 | ||
| 791 | static int __devinit vs6624_probe(struct i2c_client *client, | 791 | static int vs6624_probe(struct i2c_client *client, |
| 792 | const struct i2c_device_id *id) | 792 | const struct i2c_device_id *id) |
| 793 | { | 793 | { |
| 794 | struct vs6624 *sensor; | 794 | struct vs6624 *sensor; |
| @@ -881,7 +881,7 @@ static int __devinit vs6624_probe(struct i2c_client *client, | |||
| 881 | return ret; | 881 | return ret; |
| 882 | } | 882 | } |
| 883 | 883 | ||
| 884 | static int __devexit vs6624_remove(struct i2c_client *client) | 884 | static int vs6624_remove(struct i2c_client *client) |
| 885 | { | 885 | { |
| 886 | struct v4l2_subdev *sd = i2c_get_clientdata(client); | 886 | struct v4l2_subdev *sd = i2c_get_clientdata(client); |
| 887 | struct vs6624 *sensor = to_vs6624(sd); | 887 | struct vs6624 *sensor = to_vs6624(sd); |
| @@ -906,7 +906,7 @@ static struct i2c_driver vs6624_driver = { | |||
| 906 | .name = "vs6624", | 906 | .name = "vs6624", |
| 907 | }, | 907 | }, |
| 908 | .probe = vs6624_probe, | 908 | .probe = vs6624_probe, |
| 909 | .remove = __devexit_p(vs6624_remove), | 909 | .remove = vs6624_remove, |
| 910 | .id_table = vs6624_id, | 910 | .id_table = vs6624_id, |
| 911 | }; | 911 | }; |
| 912 | 912 | ||
diff --git a/drivers/media/mmc/siano/smssdio.c b/drivers/media/mmc/siano/smssdio.c index d6f3f100699a..15d34935e00b 100644 --- a/drivers/media/mmc/siano/smssdio.c +++ b/drivers/media/mmc/siano/smssdio.c | |||
| @@ -50,7 +50,7 @@ | |||
| 50 | #define SMSSDIO_INT 0x04 | 50 | #define SMSSDIO_INT 0x04 |
| 51 | #define SMSSDIO_BLOCK_SIZE 128 | 51 | #define SMSSDIO_BLOCK_SIZE 128 |
| 52 | 52 | ||
| 53 | static const struct sdio_device_id smssdio_ids[] __devinitconst = { | 53 | static const struct sdio_device_id smssdio_ids[] = { |
| 54 | {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_STELLAR), | 54 | {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_STELLAR), |
| 55 | .driver_data = SMS1XXX_BOARD_SIANO_STELLAR}, | 55 | .driver_data = SMS1XXX_BOARD_SIANO_STELLAR}, |
| 56 | {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_NOVA_A0), | 56 | {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_NOVA_A0), |
| @@ -224,7 +224,7 @@ static void smssdio_interrupt(struct sdio_func *func) | |||
| 224 | smscore_onresponse(smsdev->coredev, cb); | 224 | smscore_onresponse(smsdev->coredev, cb); |
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | static int __devinit smssdio_probe(struct sdio_func *func, | 227 | static int smssdio_probe(struct sdio_func *func, |
| 228 | const struct sdio_device_id *id) | 228 | const struct sdio_device_id *id) |
| 229 | { | 229 | { |
| 230 | int ret; | 230 | int ret; |
diff --git a/drivers/media/pci/bt8xx/bt878.c b/drivers/media/pci/bt8xx/bt878.c index b34fa95185e4..66eb0baab0e9 100644 --- a/drivers/media/pci/bt8xx/bt878.c +++ b/drivers/media/pci/bt8xx/bt878.c | |||
| @@ -391,7 +391,7 @@ EXPORT_SYMBOL(bt878_device_control); | |||
| 391 | .driver_data = (unsigned long) name \ | 391 | .driver_data = (unsigned long) name \ |
| 392 | } | 392 | } |
| 393 | 393 | ||
| 394 | static struct pci_device_id bt878_pci_tbl[] __devinitdata = { | 394 | static struct pci_device_id bt878_pci_tbl[] = { |
| 395 | BROOKTREE_878_DEVICE(0x0071, 0x0101, "Nebula Electronics DigiTV"), | 395 | BROOKTREE_878_DEVICE(0x0071, 0x0101, "Nebula Electronics DigiTV"), |
| 396 | BROOKTREE_878_DEVICE(0x1461, 0x0761, "AverMedia AverTV DVB-T 761"), | 396 | BROOKTREE_878_DEVICE(0x1461, 0x0761, "AverMedia AverTV DVB-T 761"), |
| 397 | BROOKTREE_878_DEVICE(0x11bd, 0x001c, "Pinnacle PCTV Sat"), | 397 | BROOKTREE_878_DEVICE(0x11bd, 0x001c, "Pinnacle PCTV Sat"), |
| @@ -410,7 +410,7 @@ static struct pci_device_id bt878_pci_tbl[] __devinitdata = { | |||
| 410 | 410 | ||
| 411 | MODULE_DEVICE_TABLE(pci, bt878_pci_tbl); | 411 | MODULE_DEVICE_TABLE(pci, bt878_pci_tbl); |
| 412 | 412 | ||
| 413 | static const char * __devinit card_name(const struct pci_device_id *id) | 413 | static const char * card_name(const struct pci_device_id *id) |
| 414 | { | 414 | { |
| 415 | return id->driver_data ? (const char *)id->driver_data : "Unknown"; | 415 | return id->driver_data ? (const char *)id->driver_data : "Unknown"; |
| 416 | } | 416 | } |
| @@ -419,8 +419,7 @@ static const char * __devinit card_name(const struct pci_device_id *id) | |||
| 419 | /* PCI device handling */ | 419 | /* PCI device handling */ |
| 420 | /***********************/ | 420 | /***********************/ |
| 421 | 421 | ||
| 422 | static int __devinit bt878_probe(struct pci_dev *dev, | 422 | static int bt878_probe(struct pci_dev *dev, const struct pci_device_id *pci_id) |
| 423 | const struct pci_device_id *pci_id) | ||
| 424 | { | 423 | { |
| 425 | int result = 0; | 424 | int result = 0; |
| 426 | unsigned char lat; | 425 | unsigned char lat; |
| @@ -529,7 +528,7 @@ static int __devinit bt878_probe(struct pci_dev *dev, | |||
| 529 | return result; | 528 | return result; |
| 530 | } | 529 | } |
| 531 | 530 | ||
| 532 | static void __devexit bt878_remove(struct pci_dev *pci_dev) | 531 | static void bt878_remove(struct pci_dev *pci_dev) |
| 533 | { | 532 | { |
| 534 | u8 command; | 533 | u8 command; |
| 535 | struct bt878 *bt = pci_get_drvdata(pci_dev); | 534 | struct bt878 *bt = pci_get_drvdata(pci_dev); |
| @@ -573,7 +572,7 @@ static struct pci_driver bt878_pci_driver = { | |||
| 573 | .name = "bt878", | 572 | .name = "bt878", |
| 574 | .id_table = bt878_pci_tbl, | 573 | .id_table = bt878_pci_tbl, |
| 575 | .probe = bt878_probe, | 574 | .probe = bt878_probe, |
| 576 | .remove = __devexit_p(bt878_remove), | 575 | .remove = bt878_remove, |
| 577 | }; | 576 | }; |
| 578 | 577 | ||
| 579 | /*******************************/ | 578 | /*******************************/ |
diff --git a/drivers/media/pci/bt8xx/bttv-cards.c b/drivers/media/pci/bt8xx/bttv-cards.c index 38952faaffda..c4c59175e52c 100644 --- a/drivers/media/pci/bt8xx/bttv-cards.c +++ b/drivers/media/pci/bt8xx/bttv-cards.c | |||
| @@ -87,7 +87,7 @@ static int tea5757_read(struct bttv *btv); | |||
| 87 | static int tea5757_write(struct bttv *btv, int value); | 87 | static int tea5757_write(struct bttv *btv, int value); |
| 88 | static void identify_by_eeprom(struct bttv *btv, | 88 | static void identify_by_eeprom(struct bttv *btv, |
| 89 | unsigned char eeprom_data[256]); | 89 | unsigned char eeprom_data[256]); |
| 90 | static int __devinit pvr_boot(struct bttv *btv); | 90 | static int pvr_boot(struct bttv *btv); |
| 91 | 91 | ||
| 92 | /* config variables */ | 92 | /* config variables */ |
| 93 | static unsigned int triton1; | 93 | static unsigned int triton1; |
| @@ -151,7 +151,7 @@ static struct CARD { | |||
| 151 | unsigned id; | 151 | unsigned id; |
| 152 | int cardnr; | 152 | int cardnr; |
| 153 | char *name; | 153 | char *name; |
| 154 | } cards[] __devinitdata = { | 154 | } cards[] = { |
| 155 | { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" }, | 155 | { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" }, |
| 156 | { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" }, | 156 | { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" }, |
| 157 | { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" }, | 157 | { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" }, |
| @@ -2837,7 +2837,7 @@ static unsigned char eeprom_data[256]; | |||
| 2837 | /* | 2837 | /* |
| 2838 | * identify card | 2838 | * identify card |
| 2839 | */ | 2839 | */ |
| 2840 | void __devinit bttv_idcard(struct bttv *btv) | 2840 | void bttv_idcard(struct bttv *btv) |
| 2841 | { | 2841 | { |
| 2842 | unsigned int gpiobits; | 2842 | unsigned int gpiobits; |
| 2843 | int i,type; | 2843 | int i,type; |
| @@ -3235,7 +3235,7 @@ static void bttv_reset_audio(struct bttv *btv) | |||
| 3235 | } | 3235 | } |
| 3236 | 3236 | ||
| 3237 | /* initialization part one -- before registering i2c bus */ | 3237 | /* initialization part one -- before registering i2c bus */ |
| 3238 | void __devinit bttv_init_card1(struct bttv *btv) | 3238 | void bttv_init_card1(struct bttv *btv) |
| 3239 | { | 3239 | { |
| 3240 | switch (btv->c.type) { | 3240 | switch (btv->c.type) { |
| 3241 | case BTTV_BOARD_HAUPPAUGE: | 3241 | case BTTV_BOARD_HAUPPAUGE: |
| @@ -3267,7 +3267,7 @@ void __devinit bttv_init_card1(struct bttv *btv) | |||
| 3267 | } | 3267 | } |
| 3268 | 3268 | ||
| 3269 | /* initialization part two -- after registering i2c bus */ | 3269 | /* initialization part two -- after registering i2c bus */ |
| 3270 | void __devinit bttv_init_card2(struct bttv *btv) | 3270 | void bttv_init_card2(struct bttv *btv) |
| 3271 | { | 3271 | { |
| 3272 | btv->tuner_type = UNSET; | 3272 | btv->tuner_type = UNSET; |
| 3273 | 3273 | ||
| @@ -3571,7 +3571,7 @@ no_audio: | |||
| 3571 | 3571 | ||
| 3572 | 3572 | ||
| 3573 | /* initialize the tuner */ | 3573 | /* initialize the tuner */ |
| 3574 | void __devinit bttv_init_tuner(struct bttv *btv) | 3574 | void bttv_init_tuner(struct bttv *btv) |
| 3575 | { | 3575 | { |
| 3576 | int addr = ADDR_UNSET; | 3576 | int addr = ADDR_UNSET; |
| 3577 | 3577 | ||
| @@ -3635,7 +3635,7 @@ static void modtec_eeprom(struct bttv *btv) | |||
| 3635 | } | 3635 | } |
| 3636 | } | 3636 | } |
| 3637 | 3637 | ||
| 3638 | static void __devinit hauppauge_eeprom(struct bttv *btv) | 3638 | static void hauppauge_eeprom(struct bttv *btv) |
| 3639 | { | 3639 | { |
| 3640 | struct tveeprom tv; | 3640 | struct tveeprom tv; |
| 3641 | 3641 | ||
| @@ -3709,8 +3709,7 @@ static int terratec_active_radio_upgrade(struct bttv *btv) | |||
| 3709 | #define BTTV_ALT_DCLK 0x100000 | 3709 | #define BTTV_ALT_DCLK 0x100000 |
| 3710 | #define BTTV_ALT_NCONFIG 0x800000 | 3710 | #define BTTV_ALT_NCONFIG 0x800000 |
| 3711 | 3711 | ||
| 3712 | static int __devinit pvr_altera_load(struct bttv *btv, const u8 *micro, | 3712 | static int pvr_altera_load(struct bttv *btv, const u8 *micro, u32 microlen) |
| 3713 | u32 microlen) | ||
| 3714 | { | 3713 | { |
| 3715 | u32 n; | 3714 | u32 n; |
| 3716 | u8 bits; | 3715 | u8 bits; |
| @@ -3747,7 +3746,7 @@ static int __devinit pvr_altera_load(struct bttv *btv, const u8 *micro, | |||
| 3747 | return 0; | 3746 | return 0; |
| 3748 | } | 3747 | } |
| 3749 | 3748 | ||
| 3750 | static int __devinit pvr_boot(struct bttv *btv) | 3749 | static int pvr_boot(struct bttv *btv) |
| 3751 | { | 3750 | { |
| 3752 | const struct firmware *fw_entry; | 3751 | const struct firmware *fw_entry; |
| 3753 | int rc; | 3752 | int rc; |
| @@ -3767,7 +3766,7 @@ static int __devinit pvr_boot(struct bttv *btv) | |||
| 3767 | /* ----------------------------------------------------------------------- */ | 3766 | /* ----------------------------------------------------------------------- */ |
| 3768 | /* some osprey specific stuff */ | 3767 | /* some osprey specific stuff */ |
| 3769 | 3768 | ||
| 3770 | static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256]) | 3769 | static void osprey_eeprom(struct bttv *btv, const u8 ee[256]) |
| 3771 | { | 3770 | { |
| 3772 | int i; | 3771 | int i; |
| 3773 | u32 serial = 0; | 3772 | u32 serial = 0; |
| @@ -3898,7 +3897,7 @@ static int tuner_1_table[] = { | |||
| 3898 | TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */ | 3897 | TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */ |
| 3899 | TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL}; | 3898 | TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL}; |
| 3900 | 3899 | ||
| 3901 | static void __devinit avermedia_eeprom(struct bttv *btv) | 3900 | static void avermedia_eeprom(struct bttv *btv) |
| 3902 | { | 3901 | { |
| 3903 | int tuner_make, tuner_tv_fm, tuner_format, tuner_type = 0; | 3902 | int tuner_make, tuner_tv_fm, tuner_format, tuner_type = 0; |
| 3904 | 3903 | ||
| @@ -3960,7 +3959,7 @@ u32 bttv_tda9880_setnorm(struct bttv *btv, u32 gpiobits) | |||
| 3960 | * Hauppauge: pin 5 | 3959 | * Hauppauge: pin 5 |
| 3961 | * Voodoo: pin 20 | 3960 | * Voodoo: pin 20 |
| 3962 | */ | 3961 | */ |
| 3963 | static void __devinit boot_msp34xx(struct bttv *btv, int pin) | 3962 | static void boot_msp34xx(struct bttv *btv, int pin) |
| 3964 | { | 3963 | { |
| 3965 | int mask = (1 << pin); | 3964 | int mask = (1 << pin); |
| 3966 | 3965 | ||
| @@ -3983,11 +3982,10 @@ static void __devinit boot_msp34xx(struct bttv *btv, int pin) | |||
| 3983 | * used by Alessandro Rubini in his pxc200 | 3982 | * used by Alessandro Rubini in his pxc200 |
| 3984 | * driver, but using BTTV functions */ | 3983 | * driver, but using BTTV functions */ |
| 3985 | 3984 | ||
| 3986 | static void __devinit init_PXC200(struct bttv *btv) | 3985 | static void init_PXC200(struct bttv *btv) |
| 3987 | { | 3986 | { |
| 3988 | static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d, | 3987 | static int vals[] = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d, 0x01, 0x02, |
| 3989 | 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, | 3988 | 0x03, 0x04, 0x05, 0x06, 0x00 }; |
| 3990 | 0x00 }; | ||
| 3991 | unsigned int i; | 3989 | unsigned int i; |
| 3992 | int tmp; | 3990 | int tmp; |
| 3993 | u32 val; | 3991 | u32 val; |
| @@ -4851,7 +4849,7 @@ void __init bttv_check_chipset(void) | |||
| 4851 | } | 4849 | } |
| 4852 | } | 4850 | } |
| 4853 | 4851 | ||
| 4854 | int __devinit bttv_handle_chipset(struct bttv *btv) | 4852 | int bttv_handle_chipset(struct bttv *btv) |
| 4855 | { | 4853 | { |
| 4856 | unsigned char command; | 4854 | unsigned char command; |
| 4857 | 4855 | ||
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index de6f41f19187..45e5d0661b60 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c | |||
| @@ -4199,7 +4199,7 @@ static void bttv_unregister_video(struct bttv *btv) | |||
| 4199 | } | 4199 | } |
| 4200 | 4200 | ||
| 4201 | /* register video4linux devices */ | 4201 | /* register video4linux devices */ |
| 4202 | static int __devinit bttv_register_video(struct bttv *btv) | 4202 | static int bttv_register_video(struct bttv *btv) |
| 4203 | { | 4203 | { |
| 4204 | if (no_overlay > 0) | 4204 | if (no_overlay > 0) |
| 4205 | pr_notice("Overlay support disabled\n"); | 4205 | pr_notice("Overlay support disabled\n"); |
| @@ -4265,8 +4265,7 @@ static void pci_set_command(struct pci_dev *dev) | |||
| 4265 | #endif | 4265 | #endif |
| 4266 | } | 4266 | } |
| 4267 | 4267 | ||
| 4268 | static int __devinit bttv_probe(struct pci_dev *dev, | 4268 | static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id) |
| 4269 | const struct pci_device_id *pci_id) | ||
| 4270 | { | 4269 | { |
| 4271 | int result; | 4270 | int result; |
| 4272 | unsigned char lat; | 4271 | unsigned char lat; |
| @@ -4454,7 +4453,7 @@ fail0: | |||
| 4454 | return result; | 4453 | return result; |
| 4455 | } | 4454 | } |
| 4456 | 4455 | ||
| 4457 | static void __devexit bttv_remove(struct pci_dev *pci_dev) | 4456 | static void bttv_remove(struct pci_dev *pci_dev) |
| 4458 | { | 4457 | { |
| 4459 | struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev); | 4458 | struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev); |
| 4460 | struct bttv *btv = to_bttv(v4l2_dev); | 4459 | struct bttv *btv = to_bttv(v4l2_dev); |
| @@ -4598,7 +4597,7 @@ static struct pci_driver bttv_pci_driver = { | |||
| 4598 | .name = "bttv", | 4597 | .name = "bttv", |
| 4599 | .id_table = bttv_pci_tbl, | 4598 | .id_table = bttv_pci_tbl, |
| 4600 | .probe = bttv_probe, | 4599 | .probe = bttv_probe, |
| 4601 | .remove = __devexit_p(bttv_remove), | 4600 | .remove = bttv_remove, |
| 4602 | #ifdef CONFIG_PM | 4601 | #ifdef CONFIG_PM |
| 4603 | .suspend = bttv_suspend, | 4602 | .suspend = bttv_suspend, |
| 4604 | .resume = bttv_resume, | 4603 | .resume = bttv_resume, |
diff --git a/drivers/media/pci/bt8xx/bttv-i2c.c b/drivers/media/pci/bt8xx/bttv-i2c.c index 580c8e682392..5039b8826e0a 100644 --- a/drivers/media/pci/bt8xx/bttv-i2c.c +++ b/drivers/media/pci/bt8xx/bttv-i2c.c | |||
| @@ -99,7 +99,7 @@ static int bttv_bit_getsda(void *data) | |||
| 99 | return state; | 99 | return state; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | static struct i2c_algo_bit_data __devinitdata bttv_i2c_algo_bit_template = { | 102 | static struct i2c_algo_bit_data bttv_i2c_algo_bit_template = { |
| 103 | .setsda = bttv_bit_setsda, | 103 | .setsda = bttv_bit_setsda, |
| 104 | .setscl = bttv_bit_setscl, | 104 | .setscl = bttv_bit_setscl, |
| 105 | .getsda = bttv_bit_getsda, | 105 | .getsda = bttv_bit_getsda, |
| @@ -312,7 +312,7 @@ int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1, | |||
| 312 | } | 312 | } |
| 313 | 313 | ||
| 314 | /* read EEPROM content */ | 314 | /* read EEPROM content */ |
| 315 | void __devinit bttv_readee(struct bttv *btv, unsigned char *eedata, int addr) | 315 | void bttv_readee(struct bttv *btv, unsigned char *eedata, int addr) |
| 316 | { | 316 | { |
| 317 | memset(eedata, 0, 256); | 317 | memset(eedata, 0, 256); |
| 318 | if (0 != btv->i2c_rc) | 318 | if (0 != btv->i2c_rc) |
| @@ -347,7 +347,7 @@ static void do_i2c_scan(char *name, struct i2c_client *c) | |||
| 347 | } | 347 | } |
| 348 | 348 | ||
| 349 | /* init + register i2c adapter */ | 349 | /* init + register i2c adapter */ |
| 350 | int __devinit init_bttv_i2c(struct bttv *btv) | 350 | int init_bttv_i2c(struct bttv *btv) |
| 351 | { | 351 | { |
| 352 | strlcpy(btv->i2c_client.name, "bttv internal", I2C_NAME_SIZE); | 352 | strlcpy(btv->i2c_client.name, "bttv internal", I2C_NAME_SIZE); |
| 353 | 353 | ||
diff --git a/drivers/media/pci/bt8xx/bttv-input.c b/drivers/media/pci/bt8xx/bttv-input.c index ef4c7cd41982..04207a799055 100644 --- a/drivers/media/pci/bt8xx/bttv-input.c +++ b/drivers/media/pci/bt8xx/bttv-input.c | |||
| @@ -368,7 +368,7 @@ static int get_key_pv951(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | |||
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | /* Instantiate the I2C IR receiver device, if present */ | 370 | /* Instantiate the I2C IR receiver device, if present */ |
| 371 | void __devinit init_bttv_i2c_ir(struct bttv *btv) | 371 | void init_bttv_i2c_ir(struct bttv *btv) |
| 372 | { | 372 | { |
| 373 | const unsigned short addr_list[] = { | 373 | const unsigned short addr_list[] = { |
| 374 | 0x1a, 0x18, 0x64, 0x30, 0x71, | 374 | 0x1a, 0x18, 0x64, 0x30, 0x71, |
| @@ -411,7 +411,7 @@ void __devinit init_bttv_i2c_ir(struct bttv *btv) | |||
| 411 | return; | 411 | return; |
| 412 | } | 412 | } |
| 413 | 413 | ||
| 414 | int __devexit fini_bttv_i2c(struct bttv *btv) | 414 | int fini_bttv_i2c(struct bttv *btv) |
| 415 | { | 415 | { |
| 416 | if (0 != btv->i2c_rc) | 416 | if (0 != btv->i2c_rc) |
| 417 | return 0; | 417 | return 0; |
diff --git a/drivers/media/pci/bt8xx/dvb-bt8xx.c b/drivers/media/pci/bt8xx/dvb-bt8xx.c index 81fab9adc1ca..d407244fd1bc 100644 --- a/drivers/media/pci/bt8xx/dvb-bt8xx.c +++ b/drivers/media/pci/bt8xx/dvb-bt8xx.c | |||
| @@ -118,7 +118,8 @@ static int is_pci_slot_eq(struct pci_dev* adev, struct pci_dev* bdev) | |||
| 118 | return 0; | 118 | return 0; |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | static struct bt878 __devinit *dvb_bt8xx_878_match(unsigned int bttv_nr, struct pci_dev* bttv_pci_dev) | 121 | static struct bt878 *dvb_bt8xx_878_match(unsigned int bttv_nr, |
| 122 | struct pci_dev* bttv_pci_dev) | ||
| 122 | { | 123 | { |
| 123 | unsigned int card_nr; | 124 | unsigned int card_nr; |
| 124 | 125 | ||
| @@ -720,7 +721,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) | |||
| 720 | } | 721 | } |
| 721 | } | 722 | } |
| 722 | 723 | ||
| 723 | static int __devinit dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type) | 724 | static int dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type) |
| 724 | { | 725 | { |
| 725 | int result; | 726 | int result; |
| 726 | 727 | ||
| @@ -811,7 +812,7 @@ err_unregister_adaptor: | |||
| 811 | return result; | 812 | return result; |
| 812 | } | 813 | } |
| 813 | 814 | ||
| 814 | static int __devinit dvb_bt8xx_probe(struct bttv_sub_device *sub) | 815 | static int dvb_bt8xx_probe(struct bttv_sub_device *sub) |
| 815 | { | 816 | { |
| 816 | struct dvb_bt8xx_card *card; | 817 | struct dvb_bt8xx_card *card; |
| 817 | struct pci_dev* bttv_pci_dev; | 818 | struct pci_dev* bttv_pci_dev; |
diff --git a/drivers/media/pci/cx18/cx18-driver.c b/drivers/media/pci/cx18/cx18-driver.c index 039133d692e3..613e5ae7d5ca 100644 --- a/drivers/media/pci/cx18/cx18-driver.c +++ b/drivers/media/pci/cx18/cx18-driver.c | |||
| @@ -53,7 +53,7 @@ int (*cx18_ext_init)(struct cx18 *); | |||
| 53 | EXPORT_SYMBOL(cx18_ext_init); | 53 | EXPORT_SYMBOL(cx18_ext_init); |
| 54 | 54 | ||
| 55 | /* add your revision and whatnot here */ | 55 | /* add your revision and whatnot here */ |
| 56 | static struct pci_device_id cx18_pci_tbl[] __devinitdata = { | 56 | static struct pci_device_id cx18_pci_tbl[] = { |
| 57 | {PCI_VENDOR_ID_CX, PCI_DEVICE_ID_CX23418, | 57 | {PCI_VENDOR_ID_CX, PCI_DEVICE_ID_CX23418, |
| 58 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 58 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
| 59 | {0,} | 59 | {0,} |
| @@ -691,7 +691,7 @@ done: | |||
| 691 | cx->card_i2c = cx->card->i2c; | 691 | cx->card_i2c = cx->card->i2c; |
| 692 | } | 692 | } |
| 693 | 693 | ||
| 694 | static int __devinit cx18_create_in_workq(struct cx18 *cx) | 694 | static int cx18_create_in_workq(struct cx18 *cx) |
| 695 | { | 695 | { |
| 696 | snprintf(cx->in_workq_name, sizeof(cx->in_workq_name), "%s-in", | 696 | snprintf(cx->in_workq_name, sizeof(cx->in_workq_name), "%s-in", |
| 697 | cx->v4l2_dev.name); | 697 | cx->v4l2_dev.name); |
| @@ -703,7 +703,7 @@ static int __devinit cx18_create_in_workq(struct cx18 *cx) | |||
| 703 | return 0; | 703 | return 0; |
| 704 | } | 704 | } |
| 705 | 705 | ||
| 706 | static void __devinit cx18_init_in_work_orders(struct cx18 *cx) | 706 | static void cx18_init_in_work_orders(struct cx18 *cx) |
| 707 | { | 707 | { |
| 708 | int i; | 708 | int i; |
| 709 | for (i = 0; i < CX18_MAX_IN_WORK_ORDERS; i++) { | 709 | for (i = 0; i < CX18_MAX_IN_WORK_ORDERS; i++) { |
| @@ -718,7 +718,7 @@ static void __devinit cx18_init_in_work_orders(struct cx18 *cx) | |||
| 718 | No assumptions on the card type may be made here (see cx18_init_struct2 | 718 | No assumptions on the card type may be made here (see cx18_init_struct2 |
| 719 | for that). | 719 | for that). |
| 720 | */ | 720 | */ |
| 721 | static int __devinit cx18_init_struct1(struct cx18 *cx) | 721 | static int cx18_init_struct1(struct cx18 *cx) |
| 722 | { | 722 | { |
| 723 | int ret; | 723 | int ret; |
| 724 | 724 | ||
| @@ -775,7 +775,7 @@ static int __devinit cx18_init_struct1(struct cx18 *cx) | |||
| 775 | 775 | ||
| 776 | /* Second initialization part. Here the card type has been | 776 | /* Second initialization part. Here the card type has been |
| 777 | autodetected. */ | 777 | autodetected. */ |
| 778 | static void __devinit cx18_init_struct2(struct cx18 *cx) | 778 | static void cx18_init_struct2(struct cx18 *cx) |
| 779 | { | 779 | { |
| 780 | int i; | 780 | int i; |
| 781 | 781 | ||
| @@ -892,8 +892,8 @@ static void cx18_init_subdevs(struct cx18 *cx) | |||
| 892 | cx->sd_extmux = cx18_find_hw(cx, cx->card->hw_muxer); | 892 | cx->sd_extmux = cx18_find_hw(cx, cx->card->hw_muxer); |
| 893 | } | 893 | } |
| 894 | 894 | ||
| 895 | static int __devinit cx18_probe(struct pci_dev *pci_dev, | 895 | static int cx18_probe(struct pci_dev *pci_dev, |
| 896 | const struct pci_device_id *pci_id) | 896 | const struct pci_device_id *pci_id) |
| 897 | { | 897 | { |
| 898 | int retval = 0; | 898 | int retval = 0; |
| 899 | int i; | 899 | int i; |
diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c index 065ecd54bda3..f0416a668b4c 100644 --- a/drivers/media/pci/cx23885/cx23885-core.c +++ b/drivers/media/pci/cx23885/cx23885-core.c | |||
| @@ -2086,8 +2086,8 @@ void cx23885_gpio_enable(struct cx23885_dev *dev, u32 mask, int asoutput) | |||
| 2086 | /* TODO: 23-19 */ | 2086 | /* TODO: 23-19 */ |
| 2087 | } | 2087 | } |
| 2088 | 2088 | ||
| 2089 | static int __devinit cx23885_initdev(struct pci_dev *pci_dev, | 2089 | static int cx23885_initdev(struct pci_dev *pci_dev, |
| 2090 | const struct pci_device_id *pci_id) | 2090 | const struct pci_device_id *pci_id) |
| 2091 | { | 2091 | { |
| 2092 | struct cx23885_dev *dev; | 2092 | struct cx23885_dev *dev; |
| 2093 | int err; | 2093 | int err; |
| @@ -2167,7 +2167,7 @@ fail_free: | |||
| 2167 | return err; | 2167 | return err; |
| 2168 | } | 2168 | } |
| 2169 | 2169 | ||
| 2170 | static void __devexit cx23885_finidev(struct pci_dev *pci_dev) | 2170 | static void cx23885_finidev(struct pci_dev *pci_dev) |
| 2171 | { | 2171 | { |
| 2172 | struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev); | 2172 | struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev); |
| 2173 | struct cx23885_dev *dev = to_cx23885(v4l2_dev); | 2173 | struct cx23885_dev *dev = to_cx23885(v4l2_dev); |
| @@ -2210,7 +2210,7 @@ static struct pci_driver cx23885_pci_driver = { | |||
| 2210 | .name = "cx23885", | 2210 | .name = "cx23885", |
| 2211 | .id_table = cx23885_pci_tbl, | 2211 | .id_table = cx23885_pci_tbl, |
| 2212 | .probe = cx23885_initdev, | 2212 | .probe = cx23885_initdev, |
| 2213 | .remove = __devexit_p(cx23885_finidev), | 2213 | .remove = cx23885_finidev, |
| 2214 | /* TODO */ | 2214 | /* TODO */ |
| 2215 | .suspend = NULL, | 2215 | .suspend = NULL, |
| 2216 | .resume = NULL, | 2216 | .resume = NULL, |
diff --git a/drivers/media/pci/cx25821/cx25821-core.c b/drivers/media/pci/cx25821/cx25821-core.c index f11f6f07e915..1884e2cc35e9 100644 --- a/drivers/media/pci/cx25821/cx25821-core.c +++ b/drivers/media/pci/cx25821/cx25821-core.c | |||
| @@ -1361,8 +1361,8 @@ struct cx25821_dev *cx25821_dev_get(struct pci_dev *pci) | |||
| 1361 | } | 1361 | } |
| 1362 | EXPORT_SYMBOL(cx25821_dev_get); | 1362 | EXPORT_SYMBOL(cx25821_dev_get); |
| 1363 | 1363 | ||
| 1364 | static int __devinit cx25821_initdev(struct pci_dev *pci_dev, | 1364 | static int cx25821_initdev(struct pci_dev *pci_dev, |
| 1365 | const struct pci_device_id *pci_id) | 1365 | const struct pci_device_id *pci_id) |
| 1366 | { | 1366 | { |
| 1367 | struct cx25821_dev *dev; | 1367 | struct cx25821_dev *dev; |
| 1368 | int err = 0; | 1368 | int err = 0; |
| @@ -1433,7 +1433,7 @@ fail_free: | |||
| 1433 | return err; | 1433 | return err; |
| 1434 | } | 1434 | } |
| 1435 | 1435 | ||
| 1436 | static void __devexit cx25821_finidev(struct pci_dev *pci_dev) | 1436 | static void cx25821_finidev(struct pci_dev *pci_dev) |
| 1437 | { | 1437 | { |
| 1438 | struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev); | 1438 | struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev); |
| 1439 | struct cx25821_dev *dev = get_cx25821(v4l2_dev); | 1439 | struct cx25821_dev *dev = get_cx25821(v4l2_dev); |
| @@ -1478,7 +1478,7 @@ static struct pci_driver cx25821_pci_driver = { | |||
| 1478 | .name = "cx25821", | 1478 | .name = "cx25821", |
| 1479 | .id_table = cx25821_pci_tbl, | 1479 | .id_table = cx25821_pci_tbl, |
| 1480 | .probe = cx25821_initdev, | 1480 | .probe = cx25821_initdev, |
| 1481 | .remove = __devexit_p(cx25821_finidev), | 1481 | .remove = cx25821_finidev, |
| 1482 | /* TODO */ | 1482 | /* TODO */ |
| 1483 | .suspend = NULL, | 1483 | .suspend = NULL, |
| 1484 | .resume = NULL, | 1484 | .resume = NULL, |
diff --git a/drivers/media/pci/cx88/cx88-alsa.c b/drivers/media/pci/cx88/cx88-alsa.c index d2de1a913e19..27d62623274b 100644 --- a/drivers/media/pci/cx88/cx88-alsa.c +++ b/drivers/media/pci/cx88/cx88-alsa.c | |||
| @@ -540,7 +540,7 @@ static struct snd_pcm_ops snd_cx88_pcm_ops = { | |||
| 540 | /* | 540 | /* |
| 541 | * create a PCM device | 541 | * create a PCM device |
| 542 | */ | 542 | */ |
| 543 | static int __devinit snd_cx88_pcm(snd_cx88_card_t *chip, int device, const char *name) | 543 | static int snd_cx88_pcm(snd_cx88_card_t *chip, int device, const char *name) |
| 544 | { | 544 | { |
| 545 | int err; | 545 | int err; |
| 546 | struct snd_pcm *pcm; | 546 | struct snd_pcm *pcm; |
| @@ -753,7 +753,7 @@ static struct snd_kcontrol_new snd_cx88_alc_switch = { | |||
| 753 | * Only boards with eeprom and byte 1 at eeprom=1 have it | 753 | * Only boards with eeprom and byte 1 at eeprom=1 have it |
| 754 | */ | 754 | */ |
| 755 | 755 | ||
| 756 | static const struct pci_device_id cx88_audio_pci_tbl[] __devinitdata = { | 756 | static const struct pci_device_id cx88_audio_pci_tbl[] = { |
| 757 | {0x14f1,0x8801,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, | 757 | {0x14f1,0x8801,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, |
| 758 | {0x14f1,0x8811,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, | 758 | {0x14f1,0x8811,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, |
| 759 | {0, } | 759 | {0, } |
| @@ -792,10 +792,9 @@ static void snd_cx88_dev_free(struct snd_card * card) | |||
| 792 | */ | 792 | */ |
| 793 | 793 | ||
| 794 | static int devno; | 794 | static int devno; |
| 795 | static int __devinit snd_cx88_create(struct snd_card *card, | 795 | static int snd_cx88_create(struct snd_card *card, struct pci_dev *pci, |
| 796 | struct pci_dev *pci, | 796 | snd_cx88_card_t **rchip, |
| 797 | snd_cx88_card_t **rchip, | 797 | struct cx88_core **core_ptr) |
| 798 | struct cx88_core **core_ptr) | ||
| 799 | { | 798 | { |
| 800 | snd_cx88_card_t *chip; | 799 | snd_cx88_card_t *chip; |
| 801 | struct cx88_core *core; | 800 | struct cx88_core *core; |
| @@ -862,8 +861,8 @@ static int __devinit snd_cx88_create(struct snd_card *card, | |||
| 862 | return 0; | 861 | return 0; |
| 863 | } | 862 | } |
| 864 | 863 | ||
| 865 | static int __devinit cx88_audio_initdev(struct pci_dev *pci, | 864 | static int cx88_audio_initdev(struct pci_dev *pci, |
| 866 | const struct pci_device_id *pci_id) | 865 | const struct pci_device_id *pci_id) |
| 867 | { | 866 | { |
| 868 | struct snd_card *card; | 867 | struct snd_card *card; |
| 869 | snd_cx88_card_t *chip; | 868 | snd_cx88_card_t *chip; |
| @@ -931,7 +930,7 @@ error: | |||
| 931 | /* | 930 | /* |
| 932 | * ALSA destructor | 931 | * ALSA destructor |
| 933 | */ | 932 | */ |
| 934 | static void __devexit cx88_audio_finidev(struct pci_dev *pci) | 933 | static void cx88_audio_finidev(struct pci_dev *pci) |
| 935 | { | 934 | { |
| 936 | struct cx88_audio_dev *card = pci_get_drvdata(pci); | 935 | struct cx88_audio_dev *card = pci_get_drvdata(pci); |
| 937 | 936 | ||
| @@ -950,7 +949,7 @@ static struct pci_driver cx88_audio_pci_driver = { | |||
| 950 | .name = "cx88_audio", | 949 | .name = "cx88_audio", |
| 951 | .id_table = cx88_audio_pci_tbl, | 950 | .id_table = cx88_audio_pci_tbl, |
| 952 | .probe = cx88_audio_initdev, | 951 | .probe = cx88_audio_initdev, |
| 953 | .remove = __devexit_p(cx88_audio_finidev), | 952 | .remove = cx88_audio_finidev, |
| 954 | }; | 953 | }; |
| 955 | 954 | ||
| 956 | /**************************************************************************** | 955 | /**************************************************************************** |
diff --git a/drivers/media/pci/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c index d46b008a46b8..c9d3182f79d5 100644 --- a/drivers/media/pci/cx88/cx88-mpeg.c +++ b/drivers/media/pci/cx88/cx88-mpeg.c | |||
| @@ -791,8 +791,8 @@ int cx8802_unregister_driver(struct cx8802_driver *drv) | |||
| 791 | } | 791 | } |
| 792 | 792 | ||
| 793 | /* ----------------------------------------------------------- */ | 793 | /* ----------------------------------------------------------- */ |
| 794 | static int __devinit cx8802_probe(struct pci_dev *pci_dev, | 794 | static int cx8802_probe(struct pci_dev *pci_dev, |
| 795 | const struct pci_device_id *pci_id) | 795 | const struct pci_device_id *pci_id) |
| 796 | { | 796 | { |
| 797 | struct cx8802_dev *dev; | 797 | struct cx8802_dev *dev; |
| 798 | struct cx88_core *core; | 798 | struct cx88_core *core; |
| @@ -840,7 +840,7 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev, | |||
| 840 | return err; | 840 | return err; |
| 841 | } | 841 | } |
| 842 | 842 | ||
| 843 | static void __devexit cx8802_remove(struct pci_dev *pci_dev) | 843 | static void cx8802_remove(struct pci_dev *pci_dev) |
| 844 | { | 844 | { |
| 845 | struct cx8802_dev *dev; | 845 | struct cx8802_dev *dev; |
| 846 | 846 | ||
| @@ -898,7 +898,7 @@ static struct pci_driver cx8802_pci_driver = { | |||
| 898 | .name = "cx88-mpeg driver manager", | 898 | .name = "cx88-mpeg driver manager", |
| 899 | .id_table = cx8802_pci_tbl, | 899 | .id_table = cx8802_pci_tbl, |
| 900 | .probe = cx8802_probe, | 900 | .probe = cx8802_probe, |
| 901 | .remove = __devexit_p(cx8802_remove), | 901 | .remove = cx8802_remove, |
| 902 | }; | 902 | }; |
| 903 | 903 | ||
| 904 | static int __init cx8802_init(void) | 904 | static int __init cx8802_init(void) |
diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c index 05171457bf28..bc78354262ac 100644 --- a/drivers/media/pci/cx88/cx88-video.c +++ b/drivers/media/pci/cx88/cx88-video.c | |||
| @@ -1696,8 +1696,8 @@ static void cx8800_unregister_video(struct cx8800_dev *dev) | |||
| 1696 | } | 1696 | } |
| 1697 | } | 1697 | } |
| 1698 | 1698 | ||
| 1699 | static int __devinit cx8800_initdev(struct pci_dev *pci_dev, | 1699 | static int cx8800_initdev(struct pci_dev *pci_dev, |
| 1700 | const struct pci_device_id *pci_id) | 1700 | const struct pci_device_id *pci_id) |
| 1701 | { | 1701 | { |
| 1702 | struct cx8800_dev *dev; | 1702 | struct cx8800_dev *dev; |
| 1703 | struct cx88_core *core; | 1703 | struct cx88_core *core; |
| @@ -1923,7 +1923,7 @@ fail_free: | |||
| 1923 | return err; | 1923 | return err; |
| 1924 | } | 1924 | } |
| 1925 | 1925 | ||
| 1926 | static void __devexit cx8800_finidev(struct pci_dev *pci_dev) | 1926 | static void cx8800_finidev(struct pci_dev *pci_dev) |
| 1927 | { | 1927 | { |
| 1928 | struct cx8800_dev *dev = pci_get_drvdata(pci_dev); | 1928 | struct cx8800_dev *dev = pci_get_drvdata(pci_dev); |
| 1929 | struct cx88_core *core = dev->core; | 1929 | struct cx88_core *core = dev->core; |
| @@ -2052,7 +2052,7 @@ static struct pci_driver cx8800_pci_driver = { | |||
| 2052 | .name = "cx8800", | 2052 | .name = "cx8800", |
| 2053 | .id_table = cx8800_pci_tbl, | 2053 | .id_table = cx8800_pci_tbl, |
| 2054 | .probe = cx8800_initdev, | 2054 | .probe = cx8800_initdev, |
| 2055 | .remove = __devexit_p(cx8800_finidev), | 2055 | .remove = cx8800_finidev, |
| 2056 | #ifdef CONFIG_PM | 2056 | #ifdef CONFIG_PM |
| 2057 | .suspend = cx8800_suspend, | 2057 | .suspend = cx8800_suspend, |
| 2058 | .resume = cx8800_resume, | 2058 | .resume = cx8800_resume, |
diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c index feff57ee5a08..36e34522b9a8 100644 --- a/drivers/media/pci/ddbridge/ddbridge-core.c +++ b/drivers/media/pci/ddbridge/ddbridge-core.c | |||
| @@ -1542,7 +1542,7 @@ static void ddb_unmap(struct ddb *dev) | |||
| 1542 | } | 1542 | } |
| 1543 | 1543 | ||
| 1544 | 1544 | ||
| 1545 | static void __devexit ddb_remove(struct pci_dev *pdev) | 1545 | static void ddb_remove(struct pci_dev *pdev) |
| 1546 | { | 1546 | { |
| 1547 | struct ddb *dev = (struct ddb *) pci_get_drvdata(pdev); | 1547 | struct ddb *dev = (struct ddb *) pci_get_drvdata(pdev); |
| 1548 | 1548 | ||
| @@ -1565,8 +1565,7 @@ static void __devexit ddb_remove(struct pci_dev *pdev) | |||
| 1565 | } | 1565 | } |
| 1566 | 1566 | ||
| 1567 | 1567 | ||
| 1568 | static int __devinit ddb_probe(struct pci_dev *pdev, | 1568 | static int ddb_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 1569 | const struct pci_device_id *id) | ||
| 1570 | { | 1569 | { |
| 1571 | struct ddb *dev; | 1570 | struct ddb *dev; |
| 1572 | int stat = 0; | 1571 | int stat = 0; |
| @@ -1679,7 +1678,7 @@ static struct ddb_info ddb_v6 = { | |||
| 1679 | .subvendor = _subvend, .subdevice = _subdev, \ | 1678 | .subvendor = _subvend, .subdevice = _subdev, \ |
| 1680 | .driver_data = (unsigned long)&_driverdata } | 1679 | .driver_data = (unsigned long)&_driverdata } |
| 1681 | 1680 | ||
| 1682 | static const struct pci_device_id ddb_id_tbl[] __devinitdata = { | 1681 | static const struct pci_device_id ddb_id_tbl[] = { |
| 1683 | DDB_ID(DDVID, 0x0002, DDVID, 0x0001, ddb_octopus), | 1682 | DDB_ID(DDVID, 0x0002, DDVID, 0x0001, ddb_octopus), |
| 1684 | DDB_ID(DDVID, 0x0003, DDVID, 0x0001, ddb_octopus), | 1683 | DDB_ID(DDVID, 0x0003, DDVID, 0x0001, ddb_octopus), |
| 1685 | DDB_ID(DDVID, 0x0003, DDVID, 0x0002, ddb_octopus_le), | 1684 | DDB_ID(DDVID, 0x0003, DDVID, 0x0002, ddb_octopus_le), |
| @@ -1696,7 +1695,7 @@ static struct pci_driver ddb_pci_driver = { | |||
| 1696 | .name = "DDBridge", | 1695 | .name = "DDBridge", |
| 1697 | .id_table = ddb_id_tbl, | 1696 | .id_table = ddb_id_tbl, |
| 1698 | .probe = ddb_probe, | 1697 | .probe = ddb_probe, |
| 1699 | .remove = __devexit_p(ddb_remove), | 1698 | .remove = ddb_remove, |
| 1700 | }; | 1699 | }; |
| 1701 | 1700 | ||
| 1702 | static __init int module_init_ddbridge(void) | 1701 | static __init int module_init_ddbridge(void) |
diff --git a/drivers/media/pci/dm1105/dm1105.c b/drivers/media/pci/dm1105/dm1105.c index f288ffcc4b6b..904c3ea350f5 100644 --- a/drivers/media/pci/dm1105/dm1105.c +++ b/drivers/media/pci/dm1105/dm1105.c | |||
| @@ -616,7 +616,7 @@ static void dm1105_set_dma_addr(struct dm1105_dev *dev) | |||
| 616 | dm_writel(DM1105_STADR, cpu_to_le32(dev->dma_addr)); | 616 | dm_writel(DM1105_STADR, cpu_to_le32(dev->dma_addr)); |
| 617 | } | 617 | } |
| 618 | 618 | ||
| 619 | static int __devinit dm1105_dma_map(struct dm1105_dev *dev) | 619 | static int dm1105_dma_map(struct dm1105_dev *dev) |
| 620 | { | 620 | { |
| 621 | dev->ts_buf = pci_alloc_consistent(dev->pdev, | 621 | dev->ts_buf = pci_alloc_consistent(dev->pdev, |
| 622 | 6 * DM1105_DMA_BYTES, | 622 | 6 * DM1105_DMA_BYTES, |
| @@ -736,7 +736,7 @@ static irqreturn_t dm1105_irq(int irq, void *dev_id) | |||
| 736 | return IRQ_HANDLED; | 736 | return IRQ_HANDLED; |
| 737 | } | 737 | } |
| 738 | 738 | ||
| 739 | static int __devinit dm1105_ir_init(struct dm1105_dev *dm1105) | 739 | static int dm1105_ir_init(struct dm1105_dev *dm1105) |
| 740 | { | 740 | { |
| 741 | struct rc_dev *dev; | 741 | struct rc_dev *dev; |
| 742 | int err = -ENOMEM; | 742 | int err = -ENOMEM; |
| @@ -776,12 +776,12 @@ static int __devinit dm1105_ir_init(struct dm1105_dev *dm1105) | |||
| 776 | return 0; | 776 | return 0; |
| 777 | } | 777 | } |
| 778 | 778 | ||
| 779 | static void __devexit dm1105_ir_exit(struct dm1105_dev *dm1105) | 779 | static void dm1105_ir_exit(struct dm1105_dev *dm1105) |
| 780 | { | 780 | { |
| 781 | rc_unregister_device(dm1105->ir.dev); | 781 | rc_unregister_device(dm1105->ir.dev); |
| 782 | } | 782 | } |
| 783 | 783 | ||
| 784 | static int __devinit dm1105_hw_init(struct dm1105_dev *dev) | 784 | static int dm1105_hw_init(struct dm1105_dev *dev) |
| 785 | { | 785 | { |
| 786 | dm1105_disable_irqs(dev); | 786 | dm1105_disable_irqs(dev); |
| 787 | 787 | ||
| @@ -849,7 +849,7 @@ static struct ds3000_config dvbworld_ds3000_config = { | |||
| 849 | .demod_address = 0x68, | 849 | .demod_address = 0x68, |
| 850 | }; | 850 | }; |
| 851 | 851 | ||
| 852 | static int __devinit frontend_init(struct dm1105_dev *dev) | 852 | static int frontend_init(struct dm1105_dev *dev) |
| 853 | { | 853 | { |
| 854 | int ret; | 854 | int ret; |
| 855 | 855 | ||
| @@ -949,7 +949,7 @@ static int __devinit frontend_init(struct dm1105_dev *dev) | |||
| 949 | return 0; | 949 | return 0; |
| 950 | } | 950 | } |
| 951 | 951 | ||
| 952 | static void __devinit dm1105_read_mac(struct dm1105_dev *dev, u8 *mac) | 952 | static void dm1105_read_mac(struct dm1105_dev *dev, u8 *mac) |
| 953 | { | 953 | { |
| 954 | static u8 command[1] = { 0x28 }; | 954 | static u8 command[1] = { 0x28 }; |
| 955 | 955 | ||
| @@ -971,7 +971,7 @@ static void __devinit dm1105_read_mac(struct dm1105_dev *dev, u8 *mac) | |||
| 971 | dev_info(&dev->pdev->dev, "MAC %pM\n", mac); | 971 | dev_info(&dev->pdev->dev, "MAC %pM\n", mac); |
| 972 | } | 972 | } |
| 973 | 973 | ||
| 974 | static int __devinit dm1105_probe(struct pci_dev *pdev, | 974 | static int dm1105_probe(struct pci_dev *pdev, |
| 975 | const struct pci_device_id *ent) | 975 | const struct pci_device_id *ent) |
| 976 | { | 976 | { |
| 977 | struct dm1105_dev *dev; | 977 | struct dm1105_dev *dev; |
| @@ -1174,7 +1174,7 @@ err_kfree: | |||
| 1174 | return ret; | 1174 | return ret; |
| 1175 | } | 1175 | } |
| 1176 | 1176 | ||
| 1177 | static void __devexit dm1105_remove(struct pci_dev *pdev) | 1177 | static void dm1105_remove(struct pci_dev *pdev) |
| 1178 | { | 1178 | { |
| 1179 | struct dm1105_dev *dev = pci_get_drvdata(pdev); | 1179 | struct dm1105_dev *dev = pci_get_drvdata(pdev); |
| 1180 | struct dvb_adapter *dvb_adapter = &dev->dvb_adapter; | 1180 | struct dvb_adapter *dvb_adapter = &dev->dvb_adapter; |
| @@ -1207,7 +1207,7 @@ static void __devexit dm1105_remove(struct pci_dev *pdev) | |||
| 1207 | kfree(dev); | 1207 | kfree(dev); |
| 1208 | } | 1208 | } |
| 1209 | 1209 | ||
| 1210 | static struct pci_device_id dm1105_id_table[] __devinitdata = { | 1210 | static struct pci_device_id dm1105_id_table[] = { |
| 1211 | { | 1211 | { |
| 1212 | .vendor = PCI_VENDOR_ID_TRIGEM, | 1212 | .vendor = PCI_VENDOR_ID_TRIGEM, |
| 1213 | .device = PCI_DEVICE_ID_DM1105, | 1213 | .device = PCI_DEVICE_ID_DM1105, |
| @@ -1229,7 +1229,7 @@ static struct pci_driver dm1105_driver = { | |||
| 1229 | .name = DRIVER_NAME, | 1229 | .name = DRIVER_NAME, |
| 1230 | .id_table = dm1105_id_table, | 1230 | .id_table = dm1105_id_table, |
| 1231 | .probe = dm1105_probe, | 1231 | .probe = dm1105_probe, |
| 1232 | .remove = __devexit_p(dm1105_remove), | 1232 | .remove = dm1105_remove, |
| 1233 | }; | 1233 | }; |
| 1234 | 1234 | ||
| 1235 | static int __init dm1105_init(void) | 1235 | static int __init dm1105_init(void) |
diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c index 74e9a5032364..df88dc4ab555 100644 --- a/drivers/media/pci/ivtv/ivtv-driver.c +++ b/drivers/media/pci/ivtv/ivtv-driver.c | |||
| @@ -73,7 +73,7 @@ int (*ivtv_ext_init)(struct ivtv *); | |||
| 73 | EXPORT_SYMBOL(ivtv_ext_init); | 73 | EXPORT_SYMBOL(ivtv_ext_init); |
| 74 | 74 | ||
| 75 | /* add your revision and whatnot here */ | 75 | /* add your revision and whatnot here */ |
| 76 | static struct pci_device_id ivtv_pci_tbl[] __devinitdata = { | 76 | static struct pci_device_id ivtv_pci_tbl[] = { |
| 77 | {PCI_VENDOR_ID_ICOMP, PCI_DEVICE_ID_IVTV15, | 77 | {PCI_VENDOR_ID_ICOMP, PCI_DEVICE_ID_IVTV15, |
| 78 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 78 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
| 79 | {PCI_VENDOR_ID_ICOMP, PCI_DEVICE_ID_IVTV16, | 79 | {PCI_VENDOR_ID_ICOMP, PCI_DEVICE_ID_IVTV16, |
| @@ -736,7 +736,7 @@ done: | |||
| 736 | No assumptions on the card type may be made here (see ivtv_init_struct2 | 736 | No assumptions on the card type may be made here (see ivtv_init_struct2 |
| 737 | for that). | 737 | for that). |
| 738 | */ | 738 | */ |
| 739 | static int __devinit ivtv_init_struct1(struct ivtv *itv) | 739 | static int ivtv_init_struct1(struct ivtv *itv) |
| 740 | { | 740 | { |
| 741 | struct sched_param param = { .sched_priority = 99 }; | 741 | struct sched_param param = { .sched_priority = 99 }; |
| 742 | 742 | ||
| @@ -802,7 +802,7 @@ static int __devinit ivtv_init_struct1(struct ivtv *itv) | |||
| 802 | 802 | ||
| 803 | /* Second initialization part. Here the card type has been | 803 | /* Second initialization part. Here the card type has been |
| 804 | autodetected. */ | 804 | autodetected. */ |
| 805 | static void __devinit ivtv_init_struct2(struct ivtv *itv) | 805 | static void ivtv_init_struct2(struct ivtv *itv) |
| 806 | { | 806 | { |
| 807 | int i; | 807 | int i; |
| 808 | 808 | ||
| @@ -1001,8 +1001,7 @@ static void ivtv_load_and_init_modules(struct ivtv *itv) | |||
| 1001 | } | 1001 | } |
| 1002 | } | 1002 | } |
| 1003 | 1003 | ||
| 1004 | static int __devinit ivtv_probe(struct pci_dev *pdev, | 1004 | static int ivtv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) |
| 1005 | const struct pci_device_id *pci_id) | ||
| 1006 | { | 1005 | { |
| 1007 | int retval = 0; | 1006 | int retval = 0; |
| 1008 | int vbi_buf_size; | 1007 | int vbi_buf_size; |
diff --git a/drivers/media/pci/mantis/hopper_cards.c b/drivers/media/pci/mantis/hopper_cards.c index cc0251e01077..6fe9fe5293dc 100644 --- a/drivers/media/pci/mantis/hopper_cards.c +++ b/drivers/media/pci/mantis/hopper_cards.c | |||
| @@ -151,7 +151,8 @@ static irqreturn_t hopper_irq_handler(int irq, void *dev_id) | |||
| 151 | return IRQ_HANDLED; | 151 | return IRQ_HANDLED; |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | static int __devinit hopper_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | 154 | static int hopper_pci_probe(struct pci_dev *pdev, |
| 155 | const struct pci_device_id *pci_id) | ||
| 155 | { | 156 | { |
| 156 | struct mantis_pci *mantis; | 157 | struct mantis_pci *mantis; |
| 157 | struct mantis_hwconfig *config; | 158 | struct mantis_hwconfig *config; |
| @@ -230,7 +231,7 @@ fail0: | |||
| 230 | return err; | 231 | return err; |
| 231 | } | 232 | } |
| 232 | 233 | ||
| 233 | static void __devexit hopper_pci_remove(struct pci_dev *pdev) | 234 | static void hopper_pci_remove(struct pci_dev *pdev) |
| 234 | { | 235 | { |
| 235 | struct mantis_pci *mantis = pci_get_drvdata(pdev); | 236 | struct mantis_pci *mantis = pci_get_drvdata(pdev); |
| 236 | 237 | ||
| @@ -259,12 +260,12 @@ static struct pci_driver hopper_pci_driver = { | |||
| 259 | .remove = hopper_pci_remove, | 260 | .remove = hopper_pci_remove, |
| 260 | }; | 261 | }; |
| 261 | 262 | ||
| 262 | static int __devinit hopper_init(void) | 263 | static int hopper_init(void) |
| 263 | { | 264 | { |
| 264 | return pci_register_driver(&hopper_pci_driver); | 265 | return pci_register_driver(&hopper_pci_driver); |
| 265 | } | 266 | } |
| 266 | 267 | ||
| 267 | static void __devexit hopper_exit(void) | 268 | static void hopper_exit(void) |
| 268 | { | 269 | { |
| 269 | return pci_unregister_driver(&hopper_pci_driver); | 270 | return pci_unregister_driver(&hopper_pci_driver); |
| 270 | } | 271 | } |
diff --git a/drivers/media/pci/mantis/mantis_cards.c b/drivers/media/pci/mantis/mantis_cards.c index 0207d1f064e0..932a0d73a7f8 100644 --- a/drivers/media/pci/mantis/mantis_cards.c +++ b/drivers/media/pci/mantis/mantis_cards.c | |||
| @@ -159,7 +159,8 @@ static irqreturn_t mantis_irq_handler(int irq, void *dev_id) | |||
| 159 | return IRQ_HANDLED; | 159 | return IRQ_HANDLED; |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | static int __devinit mantis_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | 162 | static int mantis_pci_probe(struct pci_dev *pdev, |
| 163 | const struct pci_device_id *pci_id) | ||
| 163 | { | 164 | { |
| 164 | struct mantis_pci *mantis; | 165 | struct mantis_pci *mantis; |
| 165 | struct mantis_hwconfig *config; | 166 | struct mantis_hwconfig *config; |
| @@ -249,7 +250,7 @@ fail0: | |||
| 249 | return err; | 250 | return err; |
| 250 | } | 251 | } |
| 251 | 252 | ||
| 252 | static void __devexit mantis_pci_remove(struct pci_dev *pdev) | 253 | static void mantis_pci_remove(struct pci_dev *pdev) |
| 253 | { | 254 | { |
| 254 | struct mantis_pci *mantis = pci_get_drvdata(pdev); | 255 | struct mantis_pci *mantis = pci_get_drvdata(pdev); |
| 255 | 256 | ||
| @@ -289,12 +290,12 @@ static struct pci_driver mantis_pci_driver = { | |||
| 289 | .remove = mantis_pci_remove, | 290 | .remove = mantis_pci_remove, |
| 290 | }; | 291 | }; |
| 291 | 292 | ||
| 292 | static int __devinit mantis_init(void) | 293 | static int mantis_init(void) |
| 293 | { | 294 | { |
| 294 | return pci_register_driver(&mantis_pci_driver); | 295 | return pci_register_driver(&mantis_pci_driver); |
| 295 | } | 296 | } |
| 296 | 297 | ||
| 297 | static void __devexit mantis_exit(void) | 298 | static void mantis_exit(void) |
| 298 | { | 299 | { |
| 299 | return pci_unregister_driver(&mantis_pci_driver); | 300 | return pci_unregister_driver(&mantis_pci_driver); |
| 300 | } | 301 | } |
diff --git a/drivers/media/pci/mantis/mantis_dvb.c b/drivers/media/pci/mantis/mantis_dvb.c index 5d15c6b74d9b..5a71e1791cf5 100644 --- a/drivers/media/pci/mantis/mantis_dvb.c +++ b/drivers/media/pci/mantis/mantis_dvb.c | |||
| @@ -144,7 +144,7 @@ static int mantis_dvb_stop_feed(struct dvb_demux_feed *dvbdmxfeed) | |||
| 144 | return 0; | 144 | return 0; |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | int __devinit mantis_dvb_init(struct mantis_pci *mantis) | 147 | int mantis_dvb_init(struct mantis_pci *mantis) |
| 148 | { | 148 | { |
| 149 | struct mantis_hwconfig *config = mantis->hwconfig; | 149 | struct mantis_hwconfig *config = mantis->hwconfig; |
| 150 | int result = -1; | 150 | int result = -1; |
| @@ -271,7 +271,7 @@ err0: | |||
| 271 | } | 271 | } |
| 272 | EXPORT_SYMBOL_GPL(mantis_dvb_init); | 272 | EXPORT_SYMBOL_GPL(mantis_dvb_init); |
| 273 | 273 | ||
| 274 | int __devexit mantis_dvb_exit(struct mantis_pci *mantis) | 274 | int mantis_dvb_exit(struct mantis_pci *mantis) |
| 275 | { | 275 | { |
| 276 | int err; | 276 | int err; |
| 277 | 277 | ||
diff --git a/drivers/media/pci/mantis/mantis_i2c.c b/drivers/media/pci/mantis/mantis_i2c.c index e7794517fe26..937fb9d50213 100644 --- a/drivers/media/pci/mantis/mantis_i2c.c +++ b/drivers/media/pci/mantis/mantis_i2c.c | |||
| @@ -217,7 +217,7 @@ static struct i2c_algorithm mantis_algo = { | |||
| 217 | .functionality = mantis_i2c_func, | 217 | .functionality = mantis_i2c_func, |
| 218 | }; | 218 | }; |
| 219 | 219 | ||
| 220 | int __devinit mantis_i2c_init(struct mantis_pci *mantis) | 220 | int mantis_i2c_init(struct mantis_pci *mantis) |
| 221 | { | 221 | { |
| 222 | u32 intstat, intmask; | 222 | u32 intstat, intmask; |
| 223 | struct i2c_adapter *i2c_adapter = &mantis->adapter; | 223 | struct i2c_adapter *i2c_adapter = &mantis->adapter; |
diff --git a/drivers/media/pci/mantis/mantis_pci.c b/drivers/media/pci/mantis/mantis_pci.c index 371558af2d96..a846036ea022 100644 --- a/drivers/media/pci/mantis/mantis_pci.c +++ b/drivers/media/pci/mantis/mantis_pci.c | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | #define DRIVER_NAME "Mantis Core" | 47 | #define DRIVER_NAME "Mantis Core" |
| 48 | 48 | ||
| 49 | int __devinit mantis_pci_init(struct mantis_pci *mantis) | 49 | int mantis_pci_init(struct mantis_pci *mantis) |
| 50 | { | 50 | { |
| 51 | u8 latency; | 51 | u8 latency; |
| 52 | struct mantis_hwconfig *config = mantis->hwconfig; | 52 | struct mantis_hwconfig *config = mantis->hwconfig; |
diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c index ae7d32027bf7..049e18667cd0 100644 --- a/drivers/media/pci/meye/meye.c +++ b/drivers/media/pci/meye/meye.c | |||
| @@ -1728,8 +1728,7 @@ static int meye_resume(struct pci_dev *pdev) | |||
| 1728 | } | 1728 | } |
| 1729 | #endif | 1729 | #endif |
| 1730 | 1730 | ||
| 1731 | static int __devinit meye_probe(struct pci_dev *pcidev, | 1731 | static int meye_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) |
| 1732 | const struct pci_device_id *ent) | ||
| 1733 | { | 1732 | { |
| 1734 | struct v4l2_device *v4l2_dev = &meye.v4l2_dev; | 1733 | struct v4l2_device *v4l2_dev = &meye.v4l2_dev; |
| 1735 | int ret = -EBUSY; | 1734 | int ret = -EBUSY; |
| @@ -1889,7 +1888,7 @@ outnotdev: | |||
| 1889 | return ret; | 1888 | return ret; |
| 1890 | } | 1889 | } |
| 1891 | 1890 | ||
| 1892 | static void __devexit meye_remove(struct pci_dev *pcidev) | 1891 | static void meye_remove(struct pci_dev *pcidev) |
| 1893 | { | 1892 | { |
| 1894 | video_unregister_device(meye.vdev); | 1893 | video_unregister_device(meye.vdev); |
| 1895 | 1894 | ||
| @@ -1935,7 +1934,7 @@ static struct pci_driver meye_driver = { | |||
| 1935 | .name = "meye", | 1934 | .name = "meye", |
| 1936 | .id_table = meye_pci_tbl, | 1935 | .id_table = meye_pci_tbl, |
| 1937 | .probe = meye_probe, | 1936 | .probe = meye_probe, |
| 1938 | .remove = __devexit_p(meye_remove), | 1937 | .remove = meye_remove, |
| 1939 | #ifdef CONFIG_PM | 1938 | #ifdef CONFIG_PM |
| 1940 | .suspend = meye_suspend, | 1939 | .suspend = meye_suspend, |
| 1941 | .resume = meye_resume, | 1940 | .resume = meye_resume, |
diff --git a/drivers/media/pci/ngene/ngene-cards.c b/drivers/media/pci/ngene/ngene-cards.c index b38bce529566..fad214113669 100644 --- a/drivers/media/pci/ngene/ngene-cards.c +++ b/drivers/media/pci/ngene/ngene-cards.c | |||
| @@ -743,7 +743,7 @@ static struct ngene_info ngene_info_terratec = { | |||
| 743 | 743 | ||
| 744 | /****************************************************************************/ | 744 | /****************************************************************************/ |
| 745 | 745 | ||
| 746 | static const struct pci_device_id ngene_id_tbl[] __devinitdata = { | 746 | static const struct pci_device_id ngene_id_tbl[] = { |
| 747 | NGENE_ID(0x18c3, 0xabc3, ngene_info_cineS2), | 747 | NGENE_ID(0x18c3, 0xabc3, ngene_info_cineS2), |
| 748 | NGENE_ID(0x18c3, 0xabc4, ngene_info_cineS2), | 748 | NGENE_ID(0x18c3, 0xabc4, ngene_info_cineS2), |
| 749 | NGENE_ID(0x18c3, 0xdb01, ngene_info_satixS2), | 749 | NGENE_ID(0x18c3, 0xdb01, ngene_info_satixS2), |
| @@ -800,7 +800,7 @@ static struct pci_driver ngene_pci_driver = { | |||
| 800 | .name = "ngene", | 800 | .name = "ngene", |
| 801 | .id_table = ngene_id_tbl, | 801 | .id_table = ngene_id_tbl, |
| 802 | .probe = ngene_probe, | 802 | .probe = ngene_probe, |
| 803 | .remove = __devexit_p(ngene_remove), | 803 | .remove = ngene_remove, |
| 804 | .err_handler = &ngene_errors, | 804 | .err_handler = &ngene_errors, |
| 805 | .shutdown = ngene_shutdown, | 805 | .shutdown = ngene_shutdown, |
| 806 | }; | 806 | }; |
diff --git a/drivers/media/pci/ngene/ngene-core.c b/drivers/media/pci/ngene/ngene-core.c index 8eeec4f50ccb..37ebc42392ad 100644 --- a/drivers/media/pci/ngene/ngene-core.c +++ b/drivers/media/pci/ngene/ngene-core.c | |||
| @@ -1636,7 +1636,7 @@ void ngene_shutdown(struct pci_dev *pdev) | |||
| 1636 | /* device probe/remove calls ************************************************/ | 1636 | /* device probe/remove calls ************************************************/ |
| 1637 | /****************************************************************************/ | 1637 | /****************************************************************************/ |
| 1638 | 1638 | ||
| 1639 | void __devexit ngene_remove(struct pci_dev *pdev) | 1639 | void ngene_remove(struct pci_dev *pdev) |
| 1640 | { | 1640 | { |
| 1641 | struct ngene *dev = pci_get_drvdata(pdev); | 1641 | struct ngene *dev = pci_get_drvdata(pdev); |
| 1642 | int i; | 1642 | int i; |
| @@ -1652,8 +1652,7 @@ void __devexit ngene_remove(struct pci_dev *pdev) | |||
| 1652 | pci_disable_device(pdev); | 1652 | pci_disable_device(pdev); |
| 1653 | } | 1653 | } |
| 1654 | 1654 | ||
| 1655 | int __devinit ngene_probe(struct pci_dev *pci_dev, | 1655 | int ngene_probe(struct pci_dev *pci_dev, const struct pci_device_id *id) |
| 1656 | const struct pci_device_id *id) | ||
| 1657 | { | 1656 | { |
| 1658 | struct ngene *dev; | 1657 | struct ngene *dev; |
| 1659 | int stat = 0; | 1658 | int stat = 0; |
diff --git a/drivers/media/pci/ngene/ngene.h b/drivers/media/pci/ngene/ngene.h index 5443dc0caea5..22c39ff6bfa0 100644 --- a/drivers/media/pci/ngene/ngene.h +++ b/drivers/media/pci/ngene/ngene.h | |||
| @@ -887,9 +887,8 @@ struct ngene_buffer { | |||
| 887 | 887 | ||
| 888 | 888 | ||
| 889 | /* Provided by ngene-core.c */ | 889 | /* Provided by ngene-core.c */ |
| 890 | int __devinit ngene_probe(struct pci_dev *pci_dev, | 890 | int ngene_probe(struct pci_dev *pci_dev, const struct pci_device_id *id); |
| 891 | const struct pci_device_id *id); | 891 | void ngene_remove(struct pci_dev *pdev); |
| 892 | void __devexit ngene_remove(struct pci_dev *pdev); | ||
| 893 | void ngene_shutdown(struct pci_dev *pdev); | 892 | void ngene_shutdown(struct pci_dev *pdev); |
| 894 | int ngene_command(struct ngene *dev, struct ngene_command *com); | 893 | int ngene_command(struct ngene *dev, struct ngene_command *com); |
| 895 | int ngene_command_gpio_set(struct ngene *dev, u8 select, u8 level); | 894 | int ngene_command_gpio_set(struct ngene *dev, u8 select, u8 level); |
diff --git a/drivers/media/pci/pluto2/pluto2.c b/drivers/media/pci/pluto2/pluto2.c index f148b19a206a..2290faee5852 100644 --- a/drivers/media/pci/pluto2/pluto2.c +++ b/drivers/media/pci/pluto2/pluto2.c | |||
| @@ -240,7 +240,7 @@ static void pluto_set_dma_addr(struct pluto *pluto) | |||
| 240 | pluto_writereg(pluto, REG_PCAR, pluto->dma_addr); | 240 | pluto_writereg(pluto, REG_PCAR, pluto->dma_addr); |
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | static int __devinit pluto_dma_map(struct pluto *pluto) | 243 | static int pluto_dma_map(struct pluto *pluto) |
| 244 | { | 244 | { |
| 245 | pluto->dma_addr = pci_map_single(pluto->pdev, pluto->dma_buf, | 245 | pluto->dma_addr = pci_map_single(pluto->pdev, pluto->dma_buf, |
| 246 | TS_DMA_BYTES, PCI_DMA_FROMDEVICE); | 246 | TS_DMA_BYTES, PCI_DMA_FROMDEVICE); |
| @@ -368,7 +368,7 @@ static irqreturn_t pluto_irq(int irq, void *dev_id) | |||
| 368 | return IRQ_HANDLED; | 368 | return IRQ_HANDLED; |
| 369 | } | 369 | } |
| 370 | 370 | ||
| 371 | static void __devinit pluto_enable_irqs(struct pluto *pluto) | 371 | static void pluto_enable_irqs(struct pluto *pluto) |
| 372 | { | 372 | { |
| 373 | u32 val = pluto_readreg(pluto, REG_TSCR); | 373 | u32 val = pluto_readreg(pluto, REG_TSCR); |
| 374 | 374 | ||
| @@ -394,7 +394,7 @@ static void pluto_disable_irqs(struct pluto *pluto) | |||
| 394 | pluto_write_tscr(pluto, val); | 394 | pluto_write_tscr(pluto, val); |
| 395 | } | 395 | } |
| 396 | 396 | ||
| 397 | static int __devinit pluto_hw_init(struct pluto *pluto) | 397 | static int pluto_hw_init(struct pluto *pluto) |
| 398 | { | 398 | { |
| 399 | pluto_reset_frontend(pluto, 1); | 399 | pluto_reset_frontend(pluto, 1); |
| 400 | 400 | ||
| @@ -505,7 +505,7 @@ static int pluto2_request_firmware(struct dvb_frontend *fe, | |||
| 505 | return request_firmware(fw, name, &pluto->pdev->dev); | 505 | return request_firmware(fw, name, &pluto->pdev->dev); |
| 506 | } | 506 | } |
| 507 | 507 | ||
| 508 | static struct tda1004x_config pluto2_fe_config __devinitdata = { | 508 | static struct tda1004x_config pluto2_fe_config = { |
| 509 | .demod_address = I2C_ADDR_TDA10046 >> 1, | 509 | .demod_address = I2C_ADDR_TDA10046 >> 1, |
| 510 | .invert = 1, | 510 | .invert = 1, |
| 511 | .invert_oclk = 0, | 511 | .invert_oclk = 0, |
| @@ -515,7 +515,7 @@ static struct tda1004x_config pluto2_fe_config __devinitdata = { | |||
| 515 | .request_firmware = pluto2_request_firmware, | 515 | .request_firmware = pluto2_request_firmware, |
| 516 | }; | 516 | }; |
| 517 | 517 | ||
| 518 | static int __devinit frontend_init(struct pluto *pluto) | 518 | static int frontend_init(struct pluto *pluto) |
| 519 | { | 519 | { |
| 520 | int ret; | 520 | int ret; |
| 521 | 521 | ||
| @@ -536,14 +536,14 @@ static int __devinit frontend_init(struct pluto *pluto) | |||
| 536 | return 0; | 536 | return 0; |
| 537 | } | 537 | } |
| 538 | 538 | ||
| 539 | static void __devinit pluto_read_rev(struct pluto *pluto) | 539 | static void pluto_read_rev(struct pluto *pluto) |
| 540 | { | 540 | { |
| 541 | u32 val = pluto_readreg(pluto, REG_MISC) & MISC_DVR; | 541 | u32 val = pluto_readreg(pluto, REG_MISC) & MISC_DVR; |
| 542 | dev_info(&pluto->pdev->dev, "board revision %d.%d\n", | 542 | dev_info(&pluto->pdev->dev, "board revision %d.%d\n", |
| 543 | (val >> 12) & 0x0f, (val >> 4) & 0xff); | 543 | (val >> 12) & 0x0f, (val >> 4) & 0xff); |
| 544 | } | 544 | } |
| 545 | 545 | ||
| 546 | static void __devinit pluto_read_mac(struct pluto *pluto, u8 *mac) | 546 | static void pluto_read_mac(struct pluto *pluto, u8 *mac) |
| 547 | { | 547 | { |
| 548 | u32 val = pluto_readreg(pluto, REG_MMAC); | 548 | u32 val = pluto_readreg(pluto, REG_MMAC); |
| 549 | mac[0] = (val >> 8) & 0xff; | 549 | mac[0] = (val >> 8) & 0xff; |
| @@ -560,7 +560,7 @@ static void __devinit pluto_read_mac(struct pluto *pluto, u8 *mac) | |||
| 560 | dev_info(&pluto->pdev->dev, "MAC %pM\n", mac); | 560 | dev_info(&pluto->pdev->dev, "MAC %pM\n", mac); |
| 561 | } | 561 | } |
| 562 | 562 | ||
| 563 | static int __devinit pluto_read_serial(struct pluto *pluto) | 563 | static int pluto_read_serial(struct pluto *pluto) |
| 564 | { | 564 | { |
| 565 | struct pci_dev *pdev = pluto->pdev; | 565 | struct pci_dev *pdev = pluto->pdev; |
| 566 | unsigned int i, j; | 566 | unsigned int i, j; |
| @@ -588,8 +588,7 @@ out: | |||
| 588 | return 0; | 588 | return 0; |
| 589 | } | 589 | } |
| 590 | 590 | ||
| 591 | static int __devinit pluto2_probe(struct pci_dev *pdev, | 591 | static int pluto2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 592 | const struct pci_device_id *ent) | ||
| 593 | { | 592 | { |
| 594 | struct pluto *pluto; | 593 | struct pluto *pluto; |
| 595 | struct dvb_adapter *dvb_adapter; | 594 | struct dvb_adapter *dvb_adapter; |
| @@ -742,7 +741,7 @@ err_kfree: | |||
| 742 | goto out; | 741 | goto out; |
| 743 | } | 742 | } |
| 744 | 743 | ||
| 745 | static void __devexit pluto2_remove(struct pci_dev *pdev) | 744 | static void pluto2_remove(struct pci_dev *pdev) |
| 746 | { | 745 | { |
| 747 | struct pluto *pluto = pci_get_drvdata(pdev); | 746 | struct pluto *pluto = pci_get_drvdata(pdev); |
| 748 | struct dvb_adapter *dvb_adapter = &pluto->dvb_adapter; | 747 | struct dvb_adapter *dvb_adapter = &pluto->dvb_adapter; |
| @@ -777,7 +776,7 @@ static void __devexit pluto2_remove(struct pci_dev *pdev) | |||
| 777 | #define PCI_DEVICE_ID_PLUTO2 0x0001 | 776 | #define PCI_DEVICE_ID_PLUTO2 0x0001 |
| 778 | #endif | 777 | #endif |
| 779 | 778 | ||
| 780 | static struct pci_device_id pluto2_id_table[] __devinitdata = { | 779 | static struct pci_device_id pluto2_id_table[] = { |
| 781 | { | 780 | { |
| 782 | .vendor = PCI_VENDOR_ID_SCM, | 781 | .vendor = PCI_VENDOR_ID_SCM, |
| 783 | .device = PCI_DEVICE_ID_PLUTO2, | 782 | .device = PCI_DEVICE_ID_PLUTO2, |
| @@ -794,7 +793,7 @@ static struct pci_driver pluto2_driver = { | |||
| 794 | .name = DRIVER_NAME, | 793 | .name = DRIVER_NAME, |
| 795 | .id_table = pluto2_id_table, | 794 | .id_table = pluto2_id_table, |
| 796 | .probe = pluto2_probe, | 795 | .probe = pluto2_probe, |
| 797 | .remove = __devexit_p(pluto2_remove), | 796 | .remove = pluto2_remove, |
| 798 | }; | 797 | }; |
| 799 | 798 | ||
| 800 | static int __init pluto2_init(void) | 799 | static int __init pluto2_init(void) |
diff --git a/drivers/media/pci/pt1/pt1.c b/drivers/media/pci/pt1/pt1.c index 15b35c4725f1..e9211086df49 100644 --- a/drivers/media/pci/pt1/pt1.c +++ b/drivers/media/pci/pt1/pt1.c | |||
| @@ -1058,7 +1058,7 @@ static void pt1_i2c_init(struct pt1 *pt1) | |||
| 1058 | pt1_i2c_emit(pt1, i, 0, 0, 1, 1, 0); | 1058 | pt1_i2c_emit(pt1, i, 0, 0, 1, 1, 0); |
| 1059 | } | 1059 | } |
| 1060 | 1060 | ||
| 1061 | static void __devexit pt1_remove(struct pci_dev *pdev) | 1061 | static void pt1_remove(struct pci_dev *pdev) |
| 1062 | { | 1062 | { |
| 1063 | struct pt1 *pt1; | 1063 | struct pt1 *pt1; |
| 1064 | void __iomem *regs; | 1064 | void __iomem *regs; |
| @@ -1083,8 +1083,7 @@ static void __devexit pt1_remove(struct pci_dev *pdev) | |||
| 1083 | pci_disable_device(pdev); | 1083 | pci_disable_device(pdev); |
| 1084 | } | 1084 | } |
| 1085 | 1085 | ||
| 1086 | static int __devinit | 1086 | static int pt1_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 1087 | pt1_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | ||
| 1088 | { | 1087 | { |
| 1089 | int ret; | 1088 | int ret; |
| 1090 | void __iomem *regs; | 1089 | void __iomem *regs; |
| @@ -1222,7 +1221,7 @@ MODULE_DEVICE_TABLE(pci, pt1_id_table); | |||
| 1222 | static struct pci_driver pt1_driver = { | 1221 | static struct pci_driver pt1_driver = { |
| 1223 | .name = DRIVER_NAME, | 1222 | .name = DRIVER_NAME, |
| 1224 | .probe = pt1_probe, | 1223 | .probe = pt1_probe, |
| 1225 | .remove = __devexit_p(pt1_remove), | 1224 | .remove = pt1_remove, |
| 1226 | .id_table = pt1_id_table, | 1225 | .id_table = pt1_id_table, |
| 1227 | }; | 1226 | }; |
| 1228 | 1227 | ||
diff --git a/drivers/media/pci/saa7134/saa7134-core.c b/drivers/media/pci/saa7134/saa7134-core.c index 8976d0e65813..e359d200d698 100644 --- a/drivers/media/pci/saa7134/saa7134-core.c +++ b/drivers/media/pci/saa7134/saa7134-core.c | |||
| @@ -754,7 +754,7 @@ static int saa7134_hwfini(struct saa7134_dev *dev) | |||
| 754 | return 0; | 754 | return 0; |
| 755 | } | 755 | } |
| 756 | 756 | ||
| 757 | static void __devinit must_configure_manually(int has_eeprom) | 757 | static void must_configure_manually(int has_eeprom) |
| 758 | { | 758 | { |
| 759 | unsigned int i,p; | 759 | unsigned int i,p; |
| 760 | 760 | ||
| @@ -860,8 +860,8 @@ static void mpeg_ops_detach(struct saa7134_mpeg_ops *ops, | |||
| 860 | dev->mops = NULL; | 860 | dev->mops = NULL; |
| 861 | } | 861 | } |
| 862 | 862 | ||
| 863 | static int __devinit saa7134_initdev(struct pci_dev *pci_dev, | 863 | static int saa7134_initdev(struct pci_dev *pci_dev, |
| 864 | const struct pci_device_id *pci_id) | 864 | const struct pci_device_id *pci_id) |
| 865 | { | 865 | { |
| 866 | struct saa7134_dev *dev; | 866 | struct saa7134_dev *dev; |
| 867 | struct saa7134_mpeg_ops *mops; | 867 | struct saa7134_mpeg_ops *mops; |
| @@ -1102,7 +1102,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, | |||
| 1102 | return err; | 1102 | return err; |
| 1103 | } | 1103 | } |
| 1104 | 1104 | ||
| 1105 | static void __devexit saa7134_finidev(struct pci_dev *pci_dev) | 1105 | static void saa7134_finidev(struct pci_dev *pci_dev) |
| 1106 | { | 1106 | { |
| 1107 | struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev); | 1107 | struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev); |
| 1108 | struct saa7134_dev *dev = container_of(v4l2_dev, struct saa7134_dev, v4l2_dev); | 1108 | struct saa7134_dev *dev = container_of(v4l2_dev, struct saa7134_dev, v4l2_dev); |
| @@ -1322,7 +1322,7 @@ static struct pci_driver saa7134_pci_driver = { | |||
| 1322 | .name = "saa7134", | 1322 | .name = "saa7134", |
| 1323 | .id_table = saa7134_pci_tbl, | 1323 | .id_table = saa7134_pci_tbl, |
| 1324 | .probe = saa7134_initdev, | 1324 | .probe = saa7134_initdev, |
| 1325 | .remove = __devexit_p(saa7134_finidev), | 1325 | .remove = saa7134_finidev, |
| 1326 | #ifdef CONFIG_PM | 1326 | #ifdef CONFIG_PM |
| 1327 | .suspend = saa7134_suspend, | 1327 | .suspend = saa7134_suspend, |
| 1328 | .resume = saa7134_resume | 1328 | .resume = saa7134_resume |
diff --git a/drivers/media/pci/saa7134/saa7134.h b/drivers/media/pci/saa7134/saa7134.h index c24b6512bd8f..075908fae4d9 100644 --- a/drivers/media/pci/saa7134/saa7134.h +++ b/drivers/media/pci/saa7134/saa7134.h | |||
| @@ -739,7 +739,7 @@ extern int (*saa7134_dmasound_exit)(struct saa7134_dev *dev); | |||
| 739 | 739 | ||
| 740 | extern struct saa7134_board saa7134_boards[]; | 740 | extern struct saa7134_board saa7134_boards[]; |
| 741 | extern const unsigned int saa7134_bcount; | 741 | extern const unsigned int saa7134_bcount; |
| 742 | extern struct pci_device_id __devinitdata saa7134_pci_tbl[]; | 742 | extern struct pci_device_id saa7134_pci_tbl[]; |
| 743 | 743 | ||
| 744 | extern int saa7134_board_init1(struct saa7134_dev *dev); | 744 | extern int saa7134_board_init1(struct saa7134_dev *dev); |
| 745 | extern int saa7134_board_init2(struct saa7134_dev *dev); | 745 | extern int saa7134_board_init2(struct saa7134_dev *dev); |
diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c index 063047f56766..63502e7a2a76 100644 --- a/drivers/media/pci/saa7164/saa7164-core.c +++ b/drivers/media/pci/saa7164/saa7164-core.c | |||
| @@ -1185,8 +1185,8 @@ static int saa7164_thread_function(void *data) | |||
| 1185 | return 0; | 1185 | return 0; |
| 1186 | } | 1186 | } |
| 1187 | 1187 | ||
| 1188 | static int __devinit saa7164_initdev(struct pci_dev *pci_dev, | 1188 | static int saa7164_initdev(struct pci_dev *pci_dev, |
| 1189 | const struct pci_device_id *pci_id) | 1189 | const struct pci_device_id *pci_id) |
| 1190 | { | 1190 | { |
| 1191 | struct saa7164_dev *dev; | 1191 | struct saa7164_dev *dev; |
| 1192 | int err, i; | 1192 | int err, i; |
| @@ -1376,7 +1376,7 @@ static void saa7164_shutdown(struct saa7164_dev *dev) | |||
| 1376 | dprintk(1, "%s()\n", __func__); | 1376 | dprintk(1, "%s()\n", __func__); |
| 1377 | } | 1377 | } |
| 1378 | 1378 | ||
| 1379 | static void __devexit saa7164_finidev(struct pci_dev *pci_dev) | 1379 | static void saa7164_finidev(struct pci_dev *pci_dev) |
| 1380 | { | 1380 | { |
| 1381 | struct saa7164_dev *dev = pci_get_drvdata(pci_dev); | 1381 | struct saa7164_dev *dev = pci_get_drvdata(pci_dev); |
| 1382 | 1382 | ||
| @@ -1459,7 +1459,7 @@ static struct pci_driver saa7164_pci_driver = { | |||
| 1459 | .name = "saa7164", | 1459 | .name = "saa7164", |
| 1460 | .id_table = saa7164_pci_tbl, | 1460 | .id_table = saa7164_pci_tbl, |
| 1461 | .probe = saa7164_initdev, | 1461 | .probe = saa7164_initdev, |
| 1462 | .remove = __devexit_p(saa7164_finidev), | 1462 | .remove = saa7164_finidev, |
| 1463 | /* TODO */ | 1463 | /* TODO */ |
| 1464 | .suspend = NULL, | 1464 | .suspend = NULL, |
| 1465 | .resume = NULL, | 1465 | .resume = NULL, |
diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index 4c10205264d4..27ae48842656 100644 --- a/drivers/media/pci/sta2x11/sta2x11_vip.c +++ b/drivers/media/pci/sta2x11/sta2x11_vip.c | |||
| @@ -1205,8 +1205,8 @@ static void vip_gpio_release(struct device *dev, int pin, const char *name) | |||
| 1205 | * | 1205 | * |
| 1206 | * -ENODEV, device could not be detected or registered | 1206 | * -ENODEV, device could not be detected or registered |
| 1207 | */ | 1207 | */ |
| 1208 | static int __devinit sta2x11_vip_init_one(struct pci_dev *pdev, | 1208 | static int sta2x11_vip_init_one(struct pci_dev *pdev, |
| 1209 | const struct pci_device_id *ent) | 1209 | const struct pci_device_id *ent) |
| 1210 | { | 1210 | { |
| 1211 | int ret; | 1211 | int ret; |
| 1212 | struct sta2x11_vip *vip; | 1212 | struct sta2x11_vip *vip; |
| @@ -1376,7 +1376,7 @@ disable: | |||
| 1376 | * free memory | 1376 | * free memory |
| 1377 | * free GPIO pins | 1377 | * free GPIO pins |
| 1378 | */ | 1378 | */ |
| 1379 | static void __devexit sta2x11_vip_remove_one(struct pci_dev *pdev) | 1379 | static void sta2x11_vip_remove_one(struct pci_dev *pdev) |
| 1380 | { | 1380 | { |
| 1381 | struct v4l2_device *v4l2_dev = pci_get_drvdata(pdev); | 1381 | struct v4l2_device *v4l2_dev = pci_get_drvdata(pdev); |
| 1382 | struct sta2x11_vip *vip = | 1382 | struct sta2x11_vip *vip = |
| @@ -1517,7 +1517,7 @@ static DEFINE_PCI_DEVICE_TABLE(sta2x11_vip_pci_tbl) = { | |||
| 1517 | static struct pci_driver sta2x11_vip_driver = { | 1517 | static struct pci_driver sta2x11_vip_driver = { |
| 1518 | .name = DRV_NAME, | 1518 | .name = DRV_NAME, |
| 1519 | .probe = sta2x11_vip_init_one, | 1519 | .probe = sta2x11_vip_init_one, |
| 1520 | .remove = __devexit_p(sta2x11_vip_remove_one), | 1520 | .remove = sta2x11_vip_remove_one, |
| 1521 | .id_table = sta2x11_vip_pci_tbl, | 1521 | .id_table = sta2x11_vip_pci_tbl, |
| 1522 | #ifdef CONFIG_PM | 1522 | #ifdef CONFIG_PM |
| 1523 | .suspend = sta2x11_vip_suspend, | 1523 | .suspend = sta2x11_vip_suspend, |
diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media/pci/ttpci/av7110.c index 4bd8bd56befc..4656d4a10af0 100644 --- a/drivers/media/pci/ttpci/av7110.c +++ b/drivers/media/pci/ttpci/av7110.c | |||
| @@ -2367,8 +2367,8 @@ static int frontend_init(struct av7110 *av7110) | |||
| 2367 | * The same behaviour of missing VSYNC can be duplicated on budget | 2367 | * The same behaviour of missing VSYNC can be duplicated on budget |
| 2368 | * cards, by seting DD1_INIT trigger mode 7 in 3rd nibble. | 2368 | * cards, by seting DD1_INIT trigger mode 7 in 3rd nibble. |
| 2369 | */ | 2369 | */ |
| 2370 | static int __devinit av7110_attach(struct saa7146_dev* dev, | 2370 | static int av7110_attach(struct saa7146_dev* dev, |
| 2371 | struct saa7146_pci_extension_data *pci_ext) | 2371 | struct saa7146_pci_extension_data *pci_ext) |
| 2372 | { | 2372 | { |
| 2373 | const int length = TS_WIDTH * TS_HEIGHT; | 2373 | const int length = TS_WIDTH * TS_HEIGHT; |
| 2374 | struct pci_dev *pdev = dev->pci; | 2374 | struct pci_dev *pdev = dev->pci; |
| @@ -2761,7 +2761,7 @@ err_kfree_0: | |||
| 2761 | goto out; | 2761 | goto out; |
| 2762 | } | 2762 | } |
| 2763 | 2763 | ||
| 2764 | static int __devexit av7110_detach(struct saa7146_dev* saa) | 2764 | static int av7110_detach(struct saa7146_dev* saa) |
| 2765 | { | 2765 | { |
| 2766 | struct av7110 *av7110 = saa->ext_priv; | 2766 | struct av7110 *av7110 = saa->ext_priv; |
| 2767 | dprintk(4, "%p\n", av7110); | 2767 | dprintk(4, "%p\n", av7110); |
| @@ -2910,7 +2910,7 @@ static struct saa7146_extension av7110_extension_driver = { | |||
| 2910 | .module = THIS_MODULE, | 2910 | .module = THIS_MODULE, |
| 2911 | .pci_tbl = &pci_tbl[0], | 2911 | .pci_tbl = &pci_tbl[0], |
| 2912 | .attach = av7110_attach, | 2912 | .attach = av7110_attach, |
| 2913 | .detach = __devexit_p(av7110_detach), | 2913 | .detach = av7110_detach, |
| 2914 | 2914 | ||
| 2915 | .irq_mask = MASK_19 | MASK_03 | MASK_10, | 2915 | .irq_mask = MASK_19 | MASK_03 | MASK_10, |
| 2916 | .irq_func = av7110_irq, | 2916 | .irq_func = av7110_irq, |
diff --git a/drivers/media/pci/ttpci/av7110_ir.c b/drivers/media/pci/ttpci/av7110_ir.c index 908f272fe26c..eb822862a646 100644 --- a/drivers/media/pci/ttpci/av7110_ir.c +++ b/drivers/media/pci/ttpci/av7110_ir.c | |||
| @@ -324,7 +324,7 @@ static void ir_handler(struct av7110 *av7110, u32 ircom) | |||
| 324 | } | 324 | } |
| 325 | 325 | ||
| 326 | 326 | ||
| 327 | int __devinit av7110_ir_init(struct av7110 *av7110) | 327 | int av7110_ir_init(struct av7110 *av7110) |
| 328 | { | 328 | { |
| 329 | struct input_dev *input_dev; | 329 | struct input_dev *input_dev; |
| 330 | static struct proc_dir_entry *e; | 330 | static struct proc_dir_entry *e; |
| @@ -385,7 +385,7 @@ int __devinit av7110_ir_init(struct av7110 *av7110) | |||
| 385 | } | 385 | } |
| 386 | 386 | ||
| 387 | 387 | ||
| 388 | void __devexit av7110_ir_exit(struct av7110 *av7110) | 388 | void av7110_ir_exit(struct av7110 *av7110) |
| 389 | { | 389 | { |
| 390 | int i; | 390 | int i; |
| 391 | 391 | ||
diff --git a/drivers/media/pci/zoran/zoran_card.c b/drivers/media/pci/zoran/zoran_card.c index fffc54b452c8..a90a3b9b09bf 100644 --- a/drivers/media/pci/zoran/zoran_card.c +++ b/drivers/media/pci/zoran/zoran_card.c | |||
| @@ -369,7 +369,7 @@ static const unsigned short bt819_addrs[] = { 0x45, I2C_CLIENT_END }; | |||
| 369 | static const unsigned short bt856_addrs[] = { 0x44, I2C_CLIENT_END }; | 369 | static const unsigned short bt856_addrs[] = { 0x44, I2C_CLIENT_END }; |
| 370 | static const unsigned short bt866_addrs[] = { 0x44, I2C_CLIENT_END }; | 370 | static const unsigned short bt866_addrs[] = { 0x44, I2C_CLIENT_END }; |
| 371 | 371 | ||
| 372 | static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { | 372 | static struct card_info zoran_cards[NUM_CARDS] = { |
| 373 | { | 373 | { |
| 374 | .type = DC10_old, | 374 | .type = DC10_old, |
| 375 | .name = "DC10(old)", | 375 | .name = "DC10(old)", |
| @@ -948,8 +948,7 @@ zoran_open_init_params (struct zoran *zr) | |||
| 948 | zr->testing = 0; | 948 | zr->testing = 0; |
| 949 | } | 949 | } |
| 950 | 950 | ||
| 951 | static void __devinit | 951 | static void test_interrupts (struct zoran *zr) |
| 952 | test_interrupts (struct zoran *zr) | ||
| 953 | { | 952 | { |
| 954 | DEFINE_WAIT(wait); | 953 | DEFINE_WAIT(wait); |
| 955 | int timeout, icr; | 954 | int timeout, icr; |
| @@ -974,8 +973,7 @@ test_interrupts (struct zoran *zr) | |||
| 974 | btwrite(icr, ZR36057_ICR); | 973 | btwrite(icr, ZR36057_ICR); |
| 975 | } | 974 | } |
| 976 | 975 | ||
| 977 | static int __devinit | 976 | static int zr36057_init (struct zoran *zr) |
| 978 | zr36057_init (struct zoran *zr) | ||
| 979 | { | 977 | { |
| 980 | int j, err; | 978 | int j, err; |
| 981 | 979 | ||
| @@ -1083,7 +1081,7 @@ exit_free: | |||
| 1083 | return err; | 1081 | return err; |
| 1084 | } | 1082 | } |
| 1085 | 1083 | ||
| 1086 | static void __devexit zoran_remove(struct pci_dev *pdev) | 1084 | static void zoran_remove(struct pci_dev *pdev) |
| 1087 | { | 1085 | { |
| 1088 | struct v4l2_device *v4l2_dev = dev_get_drvdata(&pdev->dev); | 1086 | struct v4l2_device *v4l2_dev = dev_get_drvdata(&pdev->dev); |
| 1089 | struct zoran *zr = to_zoran(v4l2_dev); | 1087 | struct zoran *zr = to_zoran(v4l2_dev); |
| @@ -1129,9 +1127,8 @@ zoran_vdev_release (struct video_device *vdev) | |||
| 1129 | kfree(vdev); | 1127 | kfree(vdev); |
| 1130 | } | 1128 | } |
| 1131 | 1129 | ||
| 1132 | static struct videocodec_master * __devinit | 1130 | static struct videocodec_master *zoran_setup_videocodec(struct zoran *zr, |
| 1133 | zoran_setup_videocodec (struct zoran *zr, | 1131 | int type) |
| 1134 | int type) | ||
| 1135 | { | 1132 | { |
| 1136 | struct videocodec_master *m = NULL; | 1133 | struct videocodec_master *m = NULL; |
| 1137 | 1134 | ||
| @@ -1192,8 +1189,7 @@ static void zoran_subdev_notify(struct v4l2_subdev *sd, unsigned int cmd, void * | |||
| 1192 | * Scan for a Buz card (actually for the PCI controller ZR36057), | 1189 | * Scan for a Buz card (actually for the PCI controller ZR36057), |
| 1193 | * request the irq and map the io memory | 1190 | * request the irq and map the io memory |
| 1194 | */ | 1191 | */ |
| 1195 | static int __devinit zoran_probe(struct pci_dev *pdev, | 1192 | static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 1196 | const struct pci_device_id *ent) | ||
| 1197 | { | 1193 | { |
| 1198 | unsigned char latency, need_latency; | 1194 | unsigned char latency, need_latency; |
| 1199 | struct zoran *zr; | 1195 | struct zoran *zr; |
| @@ -1459,7 +1455,7 @@ static struct pci_driver zoran_driver = { | |||
| 1459 | .name = "zr36067", | 1455 | .name = "zr36067", |
| 1460 | .id_table = zr36067_pci_tbl, | 1456 | .id_table = zr36067_pci_tbl, |
| 1461 | .probe = zoran_probe, | 1457 | .probe = zoran_probe, |
| 1462 | .remove = __devexit_p(zoran_remove), | 1458 | .remove = zoran_remove, |
| 1463 | }; | 1459 | }; |
| 1464 | 1460 | ||
| 1465 | static int __init zoran_init(void) | 1461 | static int __init zoran_init(void) |
diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c index 53f12c7466b0..e60ae41e2319 100644 --- a/drivers/media/pci/zoran/zoran_driver.c +++ b/drivers/media/pci/zoran/zoran_driver.c | |||
| @@ -3080,7 +3080,7 @@ static const struct v4l2_file_operations zoran_fops = { | |||
| 3080 | .poll = zoran_poll, | 3080 | .poll = zoran_poll, |
| 3081 | }; | 3081 | }; |
| 3082 | 3082 | ||
| 3083 | struct video_device zoran_template __devinitdata = { | 3083 | struct video_device zoran_template = { |
| 3084 | .name = ZORAN_NAME, | 3084 | .name = ZORAN_NAME, |
| 3085 | .fops = &zoran_fops, | 3085 | .fops = &zoran_fops, |
| 3086 | .ioctl_ops = &zoran_ioctl_ops, | 3086 | .ioctl_ops = &zoran_ioctl_ops, |
diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c index ec476ef5b709..1aad2a65d2f3 100644 --- a/drivers/media/platform/blackfin/bfin_capture.c +++ b/drivers/media/platform/blackfin/bfin_capture.c | |||
| @@ -862,7 +862,7 @@ static struct v4l2_file_operations bcap_fops = { | |||
| 862 | .poll = bcap_poll | 862 | .poll = bcap_poll |
| 863 | }; | 863 | }; |
| 864 | 864 | ||
| 865 | static int __devinit bcap_probe(struct platform_device *pdev) | 865 | static int bcap_probe(struct platform_device *pdev) |
| 866 | { | 866 | { |
| 867 | struct bcap_device *bcap_dev; | 867 | struct bcap_device *bcap_dev; |
| 868 | struct video_device *vfd; | 868 | struct video_device *vfd; |
| @@ -1026,7 +1026,7 @@ err_free_dev: | |||
| 1026 | return ret; | 1026 | return ret; |
| 1027 | } | 1027 | } |
| 1028 | 1028 | ||
| 1029 | static int __devexit bcap_remove(struct platform_device *pdev) | 1029 | static int bcap_remove(struct platform_device *pdev) |
| 1030 | { | 1030 | { |
| 1031 | struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev); | 1031 | struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev); |
| 1032 | struct bcap_device *bcap_dev = container_of(v4l2_dev, | 1032 | struct bcap_device *bcap_dev = container_of(v4l2_dev, |
| @@ -1048,7 +1048,7 @@ static struct platform_driver bcap_driver = { | |||
| 1048 | .owner = THIS_MODULE, | 1048 | .owner = THIS_MODULE, |
| 1049 | }, | 1049 | }, |
| 1050 | .probe = bcap_probe, | 1050 | .probe = bcap_probe, |
| 1051 | .remove = __devexit_p(bcap_remove), | 1051 | .remove = bcap_remove, |
| 1052 | }; | 1052 | }; |
| 1053 | module_platform_driver(bcap_driver); | 1053 | module_platform_driver(bcap_driver); |
| 1054 | 1054 | ||
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 7b8b547f2d51..1cf8293c0fb0 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c | |||
| @@ -1891,7 +1891,7 @@ static const struct of_device_id coda_dt_ids[] = { | |||
| 1891 | MODULE_DEVICE_TABLE(of, coda_dt_ids); | 1891 | MODULE_DEVICE_TABLE(of, coda_dt_ids); |
| 1892 | #endif | 1892 | #endif |
| 1893 | 1893 | ||
| 1894 | static int __devinit coda_probe(struct platform_device *pdev) | 1894 | static int coda_probe(struct platform_device *pdev) |
| 1895 | { | 1895 | { |
| 1896 | const struct of_device_id *of_id = | 1896 | const struct of_device_id *of_id = |
| 1897 | of_match_device(of_match_ptr(coda_dt_ids), &pdev->dev); | 1897 | of_match_device(of_match_ptr(coda_dt_ids), &pdev->dev); |
| @@ -2033,7 +2033,7 @@ static int coda_remove(struct platform_device *pdev) | |||
| 2033 | 2033 | ||
| 2034 | static struct platform_driver coda_driver = { | 2034 | static struct platform_driver coda_driver = { |
| 2035 | .probe = coda_probe, | 2035 | .probe = coda_probe, |
| 2036 | .remove = __devexit_p(coda_remove), | 2036 | .remove = coda_remove, |
| 2037 | .driver = { | 2037 | .driver = { |
| 2038 | .name = CODA_NAME, | 2038 | .name = CODA_NAME, |
| 2039 | .owner = THIS_MODULE, | 2039 | .owner = THIS_MODULE, |
diff --git a/drivers/media/platform/davinci/dm355_ccdc.c b/drivers/media/platform/davinci/dm355_ccdc.c index 030950dcfb16..f263cabade7a 100644 --- a/drivers/media/platform/davinci/dm355_ccdc.c +++ b/drivers/media/platform/davinci/dm355_ccdc.c | |||
| @@ -965,7 +965,7 @@ static struct ccdc_hw_device ccdc_hw_dev = { | |||
| 965 | }, | 965 | }, |
| 966 | }; | 966 | }; |
| 967 | 967 | ||
| 968 | static int __devinit dm355_ccdc_probe(struct platform_device *pdev) | 968 | static int dm355_ccdc_probe(struct platform_device *pdev) |
| 969 | { | 969 | { |
| 970 | void (*setup_pinmux)(void); | 970 | void (*setup_pinmux)(void); |
| 971 | struct resource *res; | 971 | struct resource *res; |
| @@ -1069,7 +1069,7 @@ static struct platform_driver dm355_ccdc_driver = { | |||
| 1069 | .name = "dm355_ccdc", | 1069 | .name = "dm355_ccdc", |
| 1070 | .owner = THIS_MODULE, | 1070 | .owner = THIS_MODULE, |
| 1071 | }, | 1071 | }, |
| 1072 | .remove = __devexit_p(dm355_ccdc_remove), | 1072 | .remove = dm355_ccdc_remove, |
| 1073 | .probe = dm355_ccdc_probe, | 1073 | .probe = dm355_ccdc_probe, |
| 1074 | }; | 1074 | }; |
| 1075 | 1075 | ||
diff --git a/drivers/media/platform/davinci/dm644x_ccdc.c b/drivers/media/platform/davinci/dm644x_ccdc.c index 0215ab6ebc90..318e80512998 100644 --- a/drivers/media/platform/davinci/dm644x_ccdc.c +++ b/drivers/media/platform/davinci/dm644x_ccdc.c | |||
| @@ -957,7 +957,7 @@ static struct ccdc_hw_device ccdc_hw_dev = { | |||
| 957 | }, | 957 | }, |
| 958 | }; | 958 | }; |
| 959 | 959 | ||
| 960 | static int __devinit dm644x_ccdc_probe(struct platform_device *pdev) | 960 | static int dm644x_ccdc_probe(struct platform_device *pdev) |
| 961 | { | 961 | { |
| 962 | struct resource *res; | 962 | struct resource *res; |
| 963 | int status = 0; | 963 | int status = 0; |
| @@ -1078,7 +1078,7 @@ static struct platform_driver dm644x_ccdc_driver = { | |||
| 1078 | .owner = THIS_MODULE, | 1078 | .owner = THIS_MODULE, |
| 1079 | .pm = &dm644x_ccdc_pm_ops, | 1079 | .pm = &dm644x_ccdc_pm_ops, |
| 1080 | }, | 1080 | }, |
| 1081 | .remove = __devexit_p(dm644x_ccdc_remove), | 1081 | .remove = dm644x_ccdc_remove, |
| 1082 | .probe = dm644x_ccdc_probe, | 1082 | .probe = dm644x_ccdc_probe, |
| 1083 | }; | 1083 | }; |
| 1084 | 1084 | ||
diff --git a/drivers/media/platform/davinci/isif.c b/drivers/media/platform/davinci/isif.c index 2c26c3e1837e..5050f9265f48 100644 --- a/drivers/media/platform/davinci/isif.c +++ b/drivers/media/platform/davinci/isif.c | |||
| @@ -1032,7 +1032,7 @@ static struct ccdc_hw_device isif_hw_dev = { | |||
| 1032 | }, | 1032 | }, |
| 1033 | }; | 1033 | }; |
| 1034 | 1034 | ||
| 1035 | static int __devinit isif_probe(struct platform_device *pdev) | 1035 | static int isif_probe(struct platform_device *pdev) |
| 1036 | { | 1036 | { |
| 1037 | void (*setup_pinmux)(void); | 1037 | void (*setup_pinmux)(void); |
| 1038 | struct resource *res; | 1038 | struct resource *res; |
| @@ -1156,7 +1156,7 @@ static struct platform_driver isif_driver = { | |||
| 1156 | .name = "isif", | 1156 | .name = "isif", |
| 1157 | .owner = THIS_MODULE, | 1157 | .owner = THIS_MODULE, |
| 1158 | }, | 1158 | }, |
| 1159 | .remove = __devexit_p(isif_remove), | 1159 | .remove = isif_remove, |
| 1160 | .probe = isif_probe, | 1160 | .probe = isif_probe, |
| 1161 | }; | 1161 | }; |
| 1162 | 1162 | ||
diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c index 7f5cf9b347b2..841b91a3d255 100644 --- a/drivers/media/platform/davinci/vpbe.c +++ b/drivers/media/platform/davinci/vpbe.c | |||
| @@ -807,7 +807,7 @@ static struct vpbe_device_ops vpbe_dev_ops = { | |||
| 807 | .set_mode = vpbe_set_mode, | 807 | .set_mode = vpbe_set_mode, |
| 808 | }; | 808 | }; |
| 809 | 809 | ||
| 810 | static __devinit int vpbe_probe(struct platform_device *pdev) | 810 | static int vpbe_probe(struct platform_device *pdev) |
| 811 | { | 811 | { |
| 812 | struct vpbe_device *vpbe_dev; | 812 | struct vpbe_device *vpbe_dev; |
| 813 | struct vpbe_config *cfg; | 813 | struct vpbe_config *cfg; |
diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 2bfde7958fef..e707a6f2325b 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c | |||
| @@ -1662,8 +1662,8 @@ static int vpbe_device_get(struct device *dev, void *data) | |||
| 1662 | return 0; | 1662 | return 0; |
| 1663 | } | 1663 | } |
| 1664 | 1664 | ||
| 1665 | static __devinit int init_vpbe_layer(int i, struct vpbe_display *disp_dev, | 1665 | static int init_vpbe_layer(int i, struct vpbe_display *disp_dev, |
| 1666 | struct platform_device *pdev) | 1666 | struct platform_device *pdev) |
| 1667 | { | 1667 | { |
| 1668 | struct vpbe_layer *vpbe_display_layer = NULL; | 1668 | struct vpbe_layer *vpbe_display_layer = NULL; |
| 1669 | struct video_device *vbd = NULL; | 1669 | struct video_device *vbd = NULL; |
| @@ -1718,9 +1718,10 @@ static __devinit int init_vpbe_layer(int i, struct vpbe_display *disp_dev, | |||
| 1718 | return 0; | 1718 | return 0; |
| 1719 | } | 1719 | } |
| 1720 | 1720 | ||
| 1721 | static __devinit int register_device(struct vpbe_layer *vpbe_display_layer, | 1721 | static int register_device(struct vpbe_layer *vpbe_display_layer, |
| 1722 | struct vpbe_display *disp_dev, | 1722 | struct vpbe_display *disp_dev, |
| 1723 | struct platform_device *pdev) { | 1723 | struct platform_device *pdev) |
| 1724 | { | ||
| 1724 | int err; | 1725 | int err; |
| 1725 | 1726 | ||
| 1726 | v4l2_info(&disp_dev->vpbe_dev->v4l2_dev, | 1727 | v4l2_info(&disp_dev->vpbe_dev->v4l2_dev, |
| @@ -1752,7 +1753,7 @@ static __devinit int register_device(struct vpbe_layer *vpbe_display_layer, | |||
| 1752 | * This function creates device entries by register itself to the V4L2 driver | 1753 | * This function creates device entries by register itself to the V4L2 driver |
| 1753 | * and initializes fields of each layer objects | 1754 | * and initializes fields of each layer objects |
| 1754 | */ | 1755 | */ |
| 1755 | static __devinit int vpbe_display_probe(struct platform_device *pdev) | 1756 | static int vpbe_display_probe(struct platform_device *pdev) |
| 1756 | { | 1757 | { |
| 1757 | struct vpbe_layer *vpbe_display_layer; | 1758 | struct vpbe_layer *vpbe_display_layer; |
| 1758 | struct vpbe_display *disp_dev; | 1759 | struct vpbe_display *disp_dev; |
| @@ -1886,7 +1887,7 @@ static struct platform_driver vpbe_display_driver = { | |||
| 1886 | .bus = &platform_bus_type, | 1887 | .bus = &platform_bus_type, |
| 1887 | }, | 1888 | }, |
| 1888 | .probe = vpbe_display_probe, | 1889 | .probe = vpbe_display_probe, |
| 1889 | .remove = __devexit_p(vpbe_display_remove), | 1890 | .remove = vpbe_display_remove, |
| 1890 | }; | 1891 | }; |
| 1891 | 1892 | ||
| 1892 | module_platform_driver(vpbe_display_driver); | 1893 | module_platform_driver(vpbe_display_driver); |
diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index 8be492cd8ed4..be9d3e1b4868 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c | |||
| @@ -1831,7 +1831,7 @@ static struct vpfe_device *vpfe_initialize(void) | |||
| 1831 | * itself to the V4L2 driver and initializes fields of each | 1831 | * itself to the V4L2 driver and initializes fields of each |
| 1832 | * device objects | 1832 | * device objects |
| 1833 | */ | 1833 | */ |
| 1834 | static __devinit int vpfe_probe(struct platform_device *pdev) | 1834 | static int vpfe_probe(struct platform_device *pdev) |
| 1835 | { | 1835 | { |
| 1836 | struct vpfe_subdev_info *sdinfo; | 1836 | struct vpfe_subdev_info *sdinfo; |
| 1837 | struct vpfe_config *vpfe_cfg; | 1837 | struct vpfe_config *vpfe_cfg; |
| @@ -2038,7 +2038,7 @@ probe_free_dev_mem: | |||
| 2038 | /* | 2038 | /* |
| 2039 | * vpfe_remove : It un-register device from V4L2 driver | 2039 | * vpfe_remove : It un-register device from V4L2 driver |
| 2040 | */ | 2040 | */ |
| 2041 | static int __devexit vpfe_remove(struct platform_device *pdev) | 2041 | static int vpfe_remove(struct platform_device *pdev) |
| 2042 | { | 2042 | { |
| 2043 | struct vpfe_device *vpfe_dev = platform_get_drvdata(pdev); | 2043 | struct vpfe_device *vpfe_dev = platform_get_drvdata(pdev); |
| 2044 | 2044 | ||
| @@ -2075,7 +2075,7 @@ static struct platform_driver vpfe_driver = { | |||
| 2075 | .pm = &vpfe_dev_pm_ops, | 2075 | .pm = &vpfe_dev_pm_ops, |
| 2076 | }, | 2076 | }, |
| 2077 | .probe = vpfe_probe, | 2077 | .probe = vpfe_probe, |
| 2078 | .remove = __devexit_p(vpfe_remove), | 2078 | .remove = vpfe_remove, |
| 2079 | }; | 2079 | }; |
| 2080 | 2080 | ||
| 2081 | module_platform_driver(vpfe_driver); | 2081 | module_platform_driver(vpfe_driver); |
diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c index 0d6cc8e4deb2..28638a86f129 100644 --- a/drivers/media/platform/davinci/vpif.c +++ b/drivers/media/platform/davinci/vpif.c | |||
| @@ -419,7 +419,7 @@ int vpif_channel_getfid(u8 channel_id) | |||
| 419 | } | 419 | } |
| 420 | EXPORT_SYMBOL(vpif_channel_getfid); | 420 | EXPORT_SYMBOL(vpif_channel_getfid); |
| 421 | 421 | ||
| 422 | static int __devinit vpif_probe(struct platform_device *pdev) | 422 | static int vpif_probe(struct platform_device *pdev) |
| 423 | { | 423 | { |
| 424 | int status = 0; | 424 | int status = 0; |
| 425 | 425 | ||
| @@ -457,7 +457,7 @@ fail: | |||
| 457 | return status; | 457 | return status; |
| 458 | } | 458 | } |
| 459 | 459 | ||
| 460 | static int __devexit vpif_remove(struct platform_device *pdev) | 460 | static int vpif_remove(struct platform_device *pdev) |
| 461 | { | 461 | { |
| 462 | if (vpif_clk) { | 462 | if (vpif_clk) { |
| 463 | clk_disable_unprepare(vpif_clk); | 463 | clk_disable_unprepare(vpif_clk); |
| @@ -498,7 +498,7 @@ static struct platform_driver vpif_driver = { | |||
| 498 | .owner = THIS_MODULE, | 498 | .owner = THIS_MODULE, |
| 499 | .pm = vpif_pm_ops, | 499 | .pm = vpif_pm_ops, |
| 500 | }, | 500 | }, |
| 501 | .remove = __devexit_p(vpif_remove), | 501 | .remove = vpif_remove, |
| 502 | .probe = vpif_probe, | 502 | .probe = vpif_probe, |
| 503 | }; | 503 | }; |
| 504 | 504 | ||
diff --git a/drivers/media/platform/davinci/vpss.c b/drivers/media/platform/davinci/vpss.c index 146e4b01ac17..cdbff88e0f1e 100644 --- a/drivers/media/platform/davinci/vpss.c +++ b/drivers/media/platform/davinci/vpss.c | |||
| @@ -357,7 +357,7 @@ void dm365_vpss_set_pg_frame_size(struct vpss_pg_frame_size frame_size) | |||
| 357 | } | 357 | } |
| 358 | EXPORT_SYMBOL(dm365_vpss_set_pg_frame_size); | 358 | EXPORT_SYMBOL(dm365_vpss_set_pg_frame_size); |
| 359 | 359 | ||
| 360 | static int __devinit vpss_probe(struct platform_device *pdev) | 360 | static int vpss_probe(struct platform_device *pdev) |
| 361 | { | 361 | { |
| 362 | struct resource *r1, *r2; | 362 | struct resource *r1, *r2; |
| 363 | char *platform_name; | 363 | char *platform_name; |
| @@ -445,7 +445,7 @@ fail1: | |||
| 445 | return status; | 445 | return status; |
| 446 | } | 446 | } |
| 447 | 447 | ||
| 448 | static int __devexit vpss_remove(struct platform_device *pdev) | 448 | static int vpss_remove(struct platform_device *pdev) |
| 449 | { | 449 | { |
| 450 | struct resource *res; | 450 | struct resource *res; |
| 451 | 451 | ||
| @@ -465,7 +465,7 @@ static struct platform_driver vpss_driver = { | |||
| 465 | .name = "vpss", | 465 | .name = "vpss", |
| 466 | .owner = THIS_MODULE, | 466 | .owner = THIS_MODULE, |
| 467 | }, | 467 | }, |
| 468 | .remove = __devexit_p(vpss_remove), | 468 | .remove = vpss_remove, |
| 469 | .probe = vpss_probe, | 469 | .probe = vpss_probe, |
| 470 | }; | 470 | }; |
| 471 | 471 | ||
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index cc7b218d047c..2b1b9f30e1f9 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c | |||
| @@ -1151,7 +1151,7 @@ err_clk: | |||
| 1151 | return ret; | 1151 | return ret; |
| 1152 | } | 1152 | } |
| 1153 | 1153 | ||
| 1154 | static int __devexit gsc_remove(struct platform_device *pdev) | 1154 | static int gsc_remove(struct platform_device *pdev) |
| 1155 | { | 1155 | { |
| 1156 | struct gsc_dev *gsc = platform_get_drvdata(pdev); | 1156 | struct gsc_dev *gsc = platform_get_drvdata(pdev); |
| 1157 | 1157 | ||
| @@ -1237,7 +1237,7 @@ static const struct dev_pm_ops gsc_pm_ops = { | |||
| 1237 | 1237 | ||
| 1238 | static struct platform_driver gsc_driver = { | 1238 | static struct platform_driver gsc_driver = { |
| 1239 | .probe = gsc_probe, | 1239 | .probe = gsc_probe, |
| 1240 | .remove = __devexit_p(gsc_remove), | 1240 | .remove = gsc_remove, |
| 1241 | .id_table = gsc_driver_ids, | 1241 | .id_table = gsc_driver_ids, |
| 1242 | .driver = { | 1242 | .driver = { |
| 1243 | .name = GSC_MODULE_NAME, | 1243 | .name = GSC_MODULE_NAME, |
diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c index a8ddb0cacab8..9115a2c8d075 100644 --- a/drivers/media/platform/fsl-viu.c +++ b/drivers/media/platform/fsl-viu.c | |||
| @@ -1478,7 +1478,7 @@ static struct video_device viu_template = { | |||
| 1478 | .current_norm = V4L2_STD_NTSC_M, | 1478 | .current_norm = V4L2_STD_NTSC_M, |
| 1479 | }; | 1479 | }; |
| 1480 | 1480 | ||
| 1481 | static int __devinit viu_of_probe(struct platform_device *op) | 1481 | static int viu_of_probe(struct platform_device *op) |
| 1482 | { | 1482 | { |
| 1483 | struct viu_dev *viu_dev; | 1483 | struct viu_dev *viu_dev; |
| 1484 | struct video_device *vdev; | 1484 | struct video_device *vdev; |
| @@ -1615,7 +1615,7 @@ err: | |||
| 1615 | return ret; | 1615 | return ret; |
| 1616 | } | 1616 | } |
| 1617 | 1617 | ||
| 1618 | static int __devexit viu_of_remove(struct platform_device *op) | 1618 | static int viu_of_remove(struct platform_device *op) |
| 1619 | { | 1619 | { |
| 1620 | struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev); | 1620 | struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev); |
| 1621 | struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev); | 1621 | struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev); |
| @@ -1668,7 +1668,7 @@ MODULE_DEVICE_TABLE(of, mpc512x_viu_of_match); | |||
| 1668 | 1668 | ||
| 1669 | static struct platform_driver viu_of_platform_driver = { | 1669 | static struct platform_driver viu_of_platform_driver = { |
| 1670 | .probe = viu_of_probe, | 1670 | .probe = viu_of_probe, |
| 1671 | .remove = __devexit_p(viu_of_remove), | 1671 | .remove = viu_of_remove, |
| 1672 | #ifdef CONFIG_PM | 1672 | #ifdef CONFIG_PM |
| 1673 | .suspend = viu_suspend, | 1673 | .suspend = viu_suspend, |
| 1674 | .resume = viu_resume, | 1674 | .resume = viu_resume, |
diff --git a/drivers/media/platform/omap24xxcam.c b/drivers/media/platform/omap24xxcam.c index 70f45c381318..8b7ccea982e7 100644 --- a/drivers/media/platform/omap24xxcam.c +++ b/drivers/media/platform/omap24xxcam.c | |||
| @@ -1736,7 +1736,7 @@ static struct v4l2_int_device omap24xxcam = { | |||
| 1736 | * | 1736 | * |
| 1737 | */ | 1737 | */ |
| 1738 | 1738 | ||
| 1739 | static int __devinit omap24xxcam_probe(struct platform_device *pdev) | 1739 | static int omap24xxcam_probe(struct platform_device *pdev) |
| 1740 | { | 1740 | { |
| 1741 | struct omap24xxcam_device *cam; | 1741 | struct omap24xxcam_device *cam; |
| 1742 | struct resource *mem; | 1742 | struct resource *mem; |
diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index 2e8c0cb79c3d..e4aaee91201d 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c | |||
| @@ -1990,7 +1990,7 @@ error_csiphy: | |||
| 1990 | * | 1990 | * |
| 1991 | * Always returns 0. | 1991 | * Always returns 0. |
| 1992 | */ | 1992 | */ |
| 1993 | static int __devexit isp_remove(struct platform_device *pdev) | 1993 | static int isp_remove(struct platform_device *pdev) |
| 1994 | { | 1994 | { |
| 1995 | struct isp_device *isp = platform_get_drvdata(pdev); | 1995 | struct isp_device *isp = platform_get_drvdata(pdev); |
| 1996 | int i; | 1996 | int i; |
| @@ -2071,7 +2071,7 @@ static int isp_map_mem_resource(struct platform_device *pdev, | |||
| 2071 | * -EINVAL if couldn't install ISR, | 2071 | * -EINVAL if couldn't install ISR, |
| 2072 | * or clk_get return error value. | 2072 | * or clk_get return error value. |
| 2073 | */ | 2073 | */ |
| 2074 | static int __devinit isp_probe(struct platform_device *pdev) | 2074 | static int isp_probe(struct platform_device *pdev) |
| 2075 | { | 2075 | { |
| 2076 | struct isp_platform_data *pdata = pdev->dev.platform_data; | 2076 | struct isp_platform_data *pdata = pdev->dev.platform_data; |
| 2077 | struct isp_device *isp; | 2077 | struct isp_device *isp; |
| @@ -2250,7 +2250,7 @@ MODULE_DEVICE_TABLE(platform, omap3isp_id_table); | |||
| 2250 | 2250 | ||
| 2251 | static struct platform_driver omap3isp_driver = { | 2251 | static struct platform_driver omap3isp_driver = { |
| 2252 | .probe = isp_probe, | 2252 | .probe = isp_probe, |
| 2253 | .remove = __devexit_p(isp_remove), | 2253 | .remove = isp_remove, |
| 2254 | .id_table = omap3isp_id_table, | 2254 | .id_table = omap3isp_id_table, |
| 2255 | .driver = { | 2255 | .driver = { |
| 2256 | .owner = THIS_MODULE, | 2256 | .owner = THIS_MODULE, |
diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c index 0dd65376c067..e2716c35f8f1 100644 --- a/drivers/media/platform/s3c-camif/camif-core.c +++ b/drivers/media/platform/s3c-camif/camif-core.c | |||
| @@ -531,7 +531,7 @@ err_sd: | |||
| 531 | return ret; | 531 | return ret; |
| 532 | } | 532 | } |
| 533 | 533 | ||
| 534 | static int __devexit s3c_camif_remove(struct platform_device *pdev) | 534 | static int s3c_camif_remove(struct platform_device *pdev) |
| 535 | { | 535 | { |
| 536 | struct camif_dev *camif = platform_get_drvdata(pdev); | 536 | struct camif_dev *camif = platform_get_drvdata(pdev); |
| 537 | struct s3c_camif_plat_data *pdata = &camif->pdata; | 537 | struct s3c_camif_plat_data *pdata = &camif->pdata; |
| @@ -645,7 +645,7 @@ static const struct dev_pm_ops s3c_camif_pm_ops = { | |||
| 645 | 645 | ||
| 646 | static struct platform_driver s3c_camif_driver = { | 646 | static struct platform_driver s3c_camif_driver = { |
| 647 | .probe = s3c_camif_probe, | 647 | .probe = s3c_camif_probe, |
| 648 | .remove = __devexit_p(s3c_camif_remove), | 648 | .remove = s3c_camif_remove, |
| 649 | .id_table = s3c_camif_driver_ids, | 649 | .id_table = s3c_camif_driver_ids, |
| 650 | .driver = { | 650 | .driver = { |
| 651 | .name = S3C_CAMIF_DRIVER_NAME, | 651 | .name = S3C_CAMIF_DRIVER_NAME, |
diff --git a/drivers/media/platform/s5p-fimc/fimc-core.c b/drivers/media/platform/s5p-fimc/fimc-core.c index 8d0d2b94a135..545b46ae12a1 100644 --- a/drivers/media/platform/s5p-fimc/fimc-core.c +++ b/drivers/media/platform/s5p-fimc/fimc-core.c | |||
| @@ -1035,7 +1035,7 @@ static int fimc_suspend(struct device *dev) | |||
| 1035 | } | 1035 | } |
| 1036 | #endif /* CONFIG_PM_SLEEP */ | 1036 | #endif /* CONFIG_PM_SLEEP */ |
| 1037 | 1037 | ||
| 1038 | static int __devexit fimc_remove(struct platform_device *pdev) | 1038 | static int fimc_remove(struct platform_device *pdev) |
| 1039 | { | 1039 | { |
| 1040 | struct fimc_dev *fimc = platform_get_drvdata(pdev); | 1040 | struct fimc_dev *fimc = platform_get_drvdata(pdev); |
| 1041 | 1041 | ||
| @@ -1234,7 +1234,7 @@ static const struct dev_pm_ops fimc_pm_ops = { | |||
| 1234 | 1234 | ||
| 1235 | static struct platform_driver fimc_driver = { | 1235 | static struct platform_driver fimc_driver = { |
| 1236 | .probe = fimc_probe, | 1236 | .probe = fimc_probe, |
| 1237 | .remove = __devexit_p(fimc_remove), | 1237 | .remove = fimc_remove, |
| 1238 | .id_table = fimc_driver_ids, | 1238 | .id_table = fimc_driver_ids, |
| 1239 | .driver = { | 1239 | .driver = { |
| 1240 | .name = FIMC_MODULE_NAME, | 1240 | .name = FIMC_MODULE_NAME, |
diff --git a/drivers/media/platform/s5p-fimc/fimc-lite.c b/drivers/media/platform/s5p-fimc/fimc-lite.c index 1b309a72f09f..ed67220d0a64 100644 --- a/drivers/media/platform/s5p-fimc/fimc-lite.c +++ b/drivers/media/platform/s5p-fimc/fimc-lite.c | |||
| @@ -1406,7 +1406,7 @@ static int fimc_lite_clk_get(struct fimc_lite *fimc) | |||
| 1406 | return ret; | 1406 | return ret; |
| 1407 | } | 1407 | } |
| 1408 | 1408 | ||
| 1409 | static int __devinit fimc_lite_probe(struct platform_device *pdev) | 1409 | static int fimc_lite_probe(struct platform_device *pdev) |
| 1410 | { | 1410 | { |
| 1411 | struct flite_drvdata *drv_data = fimc_lite_get_drvdata(pdev); | 1411 | struct flite_drvdata *drv_data = fimc_lite_get_drvdata(pdev); |
| 1412 | struct fimc_lite *fimc; | 1412 | struct fimc_lite *fimc; |
| @@ -1547,7 +1547,7 @@ static int fimc_lite_suspend(struct device *dev) | |||
| 1547 | } | 1547 | } |
| 1548 | #endif /* CONFIG_PM_SLEEP */ | 1548 | #endif /* CONFIG_PM_SLEEP */ |
| 1549 | 1549 | ||
| 1550 | static int __devexit fimc_lite_remove(struct platform_device *pdev) | 1550 | static int fimc_lite_remove(struct platform_device *pdev) |
| 1551 | { | 1551 | { |
| 1552 | struct fimc_lite *fimc = platform_get_drvdata(pdev); | 1552 | struct fimc_lite *fimc = platform_get_drvdata(pdev); |
| 1553 | struct device *dev = &pdev->dev; | 1553 | struct device *dev = &pdev->dev; |
| @@ -1595,7 +1595,7 @@ static const struct dev_pm_ops fimc_lite_pm_ops = { | |||
| 1595 | 1595 | ||
| 1596 | static struct platform_driver fimc_lite_driver = { | 1596 | static struct platform_driver fimc_lite_driver = { |
| 1597 | .probe = fimc_lite_probe, | 1597 | .probe = fimc_lite_probe, |
| 1598 | .remove = __devexit_p(fimc_lite_remove), | 1598 | .remove = fimc_lite_remove, |
| 1599 | .id_table = fimc_lite_driver_ids, | 1599 | .id_table = fimc_lite_driver_ids, |
| 1600 | .driver = { | 1600 | .driver = { |
| 1601 | .name = FIMC_LITE_DRV_NAME, | 1601 | .name = FIMC_LITE_DRV_NAME, |
diff --git a/drivers/media/platform/s5p-fimc/fimc-mdevice.c b/drivers/media/platform/s5p-fimc/fimc-mdevice.c index 1bd5678cfeb9..4ab99f3a7b09 100644 --- a/drivers/media/platform/s5p-fimc/fimc-mdevice.c +++ b/drivers/media/platform/s5p-fimc/fimc-mdevice.c | |||
| @@ -1000,7 +1000,7 @@ err_md: | |||
| 1000 | return ret; | 1000 | return ret; |
| 1001 | } | 1001 | } |
| 1002 | 1002 | ||
| 1003 | static int __devexit fimc_md_remove(struct platform_device *pdev) | 1003 | static int fimc_md_remove(struct platform_device *pdev) |
| 1004 | { | 1004 | { |
| 1005 | struct fimc_md *fmd = platform_get_drvdata(pdev); | 1005 | struct fimc_md *fmd = platform_get_drvdata(pdev); |
| 1006 | 1006 | ||
| @@ -1015,7 +1015,7 @@ static int __devexit fimc_md_remove(struct platform_device *pdev) | |||
| 1015 | 1015 | ||
| 1016 | static struct platform_driver fimc_md_driver = { | 1016 | static struct platform_driver fimc_md_driver = { |
| 1017 | .probe = fimc_md_probe, | 1017 | .probe = fimc_md_probe, |
| 1018 | .remove = __devexit_p(fimc_md_remove), | 1018 | .remove = fimc_md_remove, |
| 1019 | .driver = { | 1019 | .driver = { |
| 1020 | .name = "s5p-fimc-md", | 1020 | .name = "s5p-fimc-md", |
| 1021 | .owner = THIS_MODULE, | 1021 | .owner = THIS_MODULE, |
diff --git a/drivers/media/platform/s5p-fimc/mipi-csis.c b/drivers/media/platform/s5p-fimc/mipi-csis.c index 4c961b1b68e6..ec3fa7d75306 100644 --- a/drivers/media/platform/s5p-fimc/mipi-csis.c +++ b/drivers/media/platform/s5p-fimc/mipi-csis.c | |||
| @@ -654,7 +654,7 @@ static irqreturn_t s5pcsis_irq_handler(int irq, void *dev_id) | |||
| 654 | return IRQ_HANDLED; | 654 | return IRQ_HANDLED; |
| 655 | } | 655 | } |
| 656 | 656 | ||
| 657 | static int __devinit s5pcsis_probe(struct platform_device *pdev) | 657 | static int s5pcsis_probe(struct platform_device *pdev) |
| 658 | { | 658 | { |
| 659 | struct s5p_platform_mipi_csis *pdata; | 659 | struct s5p_platform_mipi_csis *pdata; |
| 660 | struct resource *mem_res; | 660 | struct resource *mem_res; |
| @@ -851,7 +851,7 @@ static int s5pcsis_runtime_resume(struct device *dev) | |||
| 851 | } | 851 | } |
| 852 | #endif | 852 | #endif |
| 853 | 853 | ||
| 854 | static int __devexit s5pcsis_remove(struct platform_device *pdev) | 854 | static int s5pcsis_remove(struct platform_device *pdev) |
| 855 | { | 855 | { |
| 856 | struct v4l2_subdev *sd = platform_get_drvdata(pdev); | 856 | struct v4l2_subdev *sd = platform_get_drvdata(pdev); |
| 857 | struct csis_state *state = sd_to_csis_state(sd); | 857 | struct csis_state *state = sd_to_csis_state(sd); |
| @@ -876,7 +876,7 @@ static const struct dev_pm_ops s5pcsis_pm_ops = { | |||
| 876 | 876 | ||
| 877 | static struct platform_driver s5pcsis_driver = { | 877 | static struct platform_driver s5pcsis_driver = { |
| 878 | .probe = s5pcsis_probe, | 878 | .probe = s5pcsis_probe, |
| 879 | .remove = __devexit_p(s5pcsis_remove), | 879 | .remove = s5pcsis_remove, |
| 880 | .driver = { | 880 | .driver = { |
| 881 | .name = CSIS_DRIVER_NAME, | 881 | .name = CSIS_DRIVER_NAME, |
| 882 | .owner = THIS_MODULE, | 882 | .owner = THIS_MODULE, |
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 3afe879d54d7..379f57433711 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c | |||
| @@ -1203,7 +1203,7 @@ err_res: | |||
| 1203 | } | 1203 | } |
| 1204 | 1204 | ||
| 1205 | /* Remove the driver */ | 1205 | /* Remove the driver */ |
| 1206 | static int __devexit s5p_mfc_remove(struct platform_device *pdev) | 1206 | static int s5p_mfc_remove(struct platform_device *pdev) |
| 1207 | { | 1207 | { |
| 1208 | struct s5p_mfc_dev *dev = platform_get_drvdata(pdev); | 1208 | struct s5p_mfc_dev *dev = platform_get_drvdata(pdev); |
| 1209 | 1209 | ||
| @@ -1368,7 +1368,7 @@ MODULE_DEVICE_TABLE(platform, mfc_driver_ids); | |||
| 1368 | 1368 | ||
| 1369 | static struct platform_driver s5p_mfc_driver = { | 1369 | static struct platform_driver s5p_mfc_driver = { |
| 1370 | .probe = s5p_mfc_probe, | 1370 | .probe = s5p_mfc_probe, |
| 1371 | .remove = __devexit_p(s5p_mfc_remove), | 1371 | .remove = s5p_mfc_remove, |
| 1372 | .id_table = mfc_driver_ids, | 1372 | .id_table = mfc_driver_ids, |
| 1373 | .driver = { | 1373 | .driver = { |
| 1374 | .name = S5P_MFC_NAME, | 1374 | .name = S5P_MFC_NAME, |
diff --git a/drivers/media/platform/s5p-tv/hdmi_drv.c b/drivers/media/platform/s5p-tv/hdmi_drv.c index 8a9cf43018f6..7c1116c73bf3 100644 --- a/drivers/media/platform/s5p-tv/hdmi_drv.c +++ b/drivers/media/platform/s5p-tv/hdmi_drv.c | |||
| @@ -830,7 +830,7 @@ fail: | |||
| 830 | return -ENODEV; | 830 | return -ENODEV; |
| 831 | } | 831 | } |
| 832 | 832 | ||
| 833 | static int __devinit hdmi_probe(struct platform_device *pdev) | 833 | static int hdmi_probe(struct platform_device *pdev) |
| 834 | { | 834 | { |
| 835 | struct device *dev = &pdev->dev; | 835 | struct device *dev = &pdev->dev; |
| 836 | struct resource *res; | 836 | struct resource *res; |
| @@ -979,7 +979,7 @@ fail: | |||
| 979 | return ret; | 979 | return ret; |
| 980 | } | 980 | } |
| 981 | 981 | ||
| 982 | static int __devexit hdmi_remove(struct platform_device *pdev) | 982 | static int hdmi_remove(struct platform_device *pdev) |
| 983 | { | 983 | { |
| 984 | struct device *dev = &pdev->dev; | 984 | struct device *dev = &pdev->dev; |
| 985 | struct v4l2_subdev *sd = dev_get_drvdata(dev); | 985 | struct v4l2_subdev *sd = dev_get_drvdata(dev); |
| @@ -997,7 +997,7 @@ static int __devexit hdmi_remove(struct platform_device *pdev) | |||
| 997 | 997 | ||
| 998 | static struct platform_driver hdmi_driver __refdata = { | 998 | static struct platform_driver hdmi_driver __refdata = { |
| 999 | .probe = hdmi_probe, | 999 | .probe = hdmi_probe, |
| 1000 | .remove = __devexit_p(hdmi_remove), | 1000 | .remove = hdmi_remove, |
| 1001 | .id_table = hdmi_driver_types, | 1001 | .id_table = hdmi_driver_types, |
| 1002 | .driver = { | 1002 | .driver = { |
| 1003 | .name = "s5p-hdmi", | 1003 | .name = "s5p-hdmi", |
diff --git a/drivers/media/platform/s5p-tv/hdmiphy_drv.c b/drivers/media/platform/s5p-tv/hdmiphy_drv.c index f67b38631801..06b5d2dbb2d9 100644 --- a/drivers/media/platform/s5p-tv/hdmiphy_drv.c +++ b/drivers/media/platform/s5p-tv/hdmiphy_drv.c | |||
| @@ -279,8 +279,8 @@ static const struct v4l2_subdev_ops hdmiphy_ops = { | |||
| 279 | .video = &hdmiphy_video_ops, | 279 | .video = &hdmiphy_video_ops, |
| 280 | }; | 280 | }; |
| 281 | 281 | ||
| 282 | static int __devinit hdmiphy_probe(struct i2c_client *client, | 282 | static int hdmiphy_probe(struct i2c_client *client, |
| 283 | const struct i2c_device_id *id) | 283 | const struct i2c_device_id *id) |
| 284 | { | 284 | { |
| 285 | struct hdmiphy_ctx *ctx; | 285 | struct hdmiphy_ctx *ctx; |
| 286 | 286 | ||
| @@ -295,7 +295,7 @@ static int __devinit hdmiphy_probe(struct i2c_client *client, | |||
| 295 | return 0; | 295 | return 0; |
| 296 | } | 296 | } |
| 297 | 297 | ||
| 298 | static int __devexit hdmiphy_remove(struct i2c_client *client) | 298 | static int hdmiphy_remove(struct i2c_client *client) |
| 299 | { | 299 | { |
| 300 | struct v4l2_subdev *sd = i2c_get_clientdata(client); | 300 | struct v4l2_subdev *sd = i2c_get_clientdata(client); |
| 301 | struct hdmiphy_ctx *ctx = sd_to_ctx(sd); | 301 | struct hdmiphy_ctx *ctx = sd_to_ctx(sd); |
| @@ -322,7 +322,7 @@ static struct i2c_driver hdmiphy_driver = { | |||
| 322 | .owner = THIS_MODULE, | 322 | .owner = THIS_MODULE, |
| 323 | }, | 323 | }, |
| 324 | .probe = hdmiphy_probe, | 324 | .probe = hdmiphy_probe, |
| 325 | .remove = __devexit_p(hdmiphy_remove), | 325 | .remove = hdmiphy_remove, |
| 326 | .id_table = hdmiphy_id, | 326 | .id_table = hdmiphy_id, |
| 327 | }; | 327 | }; |
| 328 | 328 | ||
diff --git a/drivers/media/platform/s5p-tv/mixer.h b/drivers/media/platform/s5p-tv/mixer.h index ddb422e23550..b671e20e9318 100644 --- a/drivers/media/platform/s5p-tv/mixer.h +++ b/drivers/media/platform/s5p-tv/mixer.h | |||
| @@ -290,7 +290,7 @@ static inline struct v4l2_subdev *to_outsd(struct mxr_device *mdev) | |||
| 290 | struct mxr_platform_data; | 290 | struct mxr_platform_data; |
| 291 | 291 | ||
| 292 | /** acquiring common video resources */ | 292 | /** acquiring common video resources */ |
| 293 | int __devinit mxr_acquire_video(struct mxr_device *mdev, | 293 | int mxr_acquire_video(struct mxr_device *mdev, |
| 294 | struct mxr_output_conf *output_cont, int output_count); | 294 | struct mxr_output_conf *output_cont, int output_count); |
| 295 | 295 | ||
| 296 | /** releasing common video resources */ | 296 | /** releasing common video resources */ |
diff --git a/drivers/media/platform/s5p-tv/mixer_drv.c b/drivers/media/platform/s5p-tv/mixer_drv.c index ca0f29717448..02faea03aa7d 100644 --- a/drivers/media/platform/s5p-tv/mixer_drv.c +++ b/drivers/media/platform/s5p-tv/mixer_drv.c | |||
| @@ -151,8 +151,8 @@ void mxr_power_put(struct mxr_device *mdev) | |||
| 151 | 151 | ||
| 152 | /* --------- RESOURCE MANAGEMENT -------------*/ | 152 | /* --------- RESOURCE MANAGEMENT -------------*/ |
| 153 | 153 | ||
| 154 | static int __devinit mxr_acquire_plat_resources(struct mxr_device *mdev, | 154 | static int mxr_acquire_plat_resources(struct mxr_device *mdev, |
| 155 | struct platform_device *pdev) | 155 | struct platform_device *pdev) |
| 156 | { | 156 | { |
| 157 | struct resource *res; | 157 | struct resource *res; |
| 158 | int ret; | 158 | int ret; |
| @@ -271,8 +271,8 @@ fail: | |||
| 271 | return -ENODEV; | 271 | return -ENODEV; |
| 272 | } | 272 | } |
| 273 | 273 | ||
| 274 | static int __devinit mxr_acquire_resources(struct mxr_device *mdev, | 274 | static int mxr_acquire_resources(struct mxr_device *mdev, |
| 275 | struct platform_device *pdev) | 275 | struct platform_device *pdev) |
| 276 | { | 276 | { |
| 277 | int ret; | 277 | int ret; |
| 278 | ret = mxr_acquire_plat_resources(mdev, pdev); | 278 | ret = mxr_acquire_plat_resources(mdev, pdev); |
| @@ -310,8 +310,8 @@ static void mxr_release_layers(struct mxr_device *mdev) | |||
| 310 | mxr_layer_release(mdev->layer[i]); | 310 | mxr_layer_release(mdev->layer[i]); |
| 311 | } | 311 | } |
| 312 | 312 | ||
| 313 | static int __devinit mxr_acquire_layers(struct mxr_device *mdev, | 313 | static int mxr_acquire_layers(struct mxr_device *mdev, |
| 314 | struct mxr_platform_data *pdata) | 314 | struct mxr_platform_data *pdata) |
| 315 | { | 315 | { |
| 316 | mdev->layer[0] = mxr_graph_layer_create(mdev, 0); | 316 | mdev->layer[0] = mxr_graph_layer_create(mdev, 0); |
| 317 | mdev->layer[1] = mxr_graph_layer_create(mdev, 1); | 317 | mdev->layer[1] = mxr_graph_layer_create(mdev, 1); |
| @@ -372,7 +372,7 @@ static const struct dev_pm_ops mxr_pm_ops = { | |||
| 372 | 372 | ||
| 373 | /* --------- DRIVER INITIALIZATION ---------- */ | 373 | /* --------- DRIVER INITIALIZATION ---------- */ |
| 374 | 374 | ||
| 375 | static int __devinit mxr_probe(struct platform_device *pdev) | 375 | static int mxr_probe(struct platform_device *pdev) |
| 376 | { | 376 | { |
| 377 | struct device *dev = &pdev->dev; | 377 | struct device *dev = &pdev->dev; |
| 378 | struct mxr_platform_data *pdata = dev->platform_data; | 378 | struct mxr_platform_data *pdata = dev->platform_data; |
| @@ -431,7 +431,7 @@ fail: | |||
| 431 | return ret; | 431 | return ret; |
| 432 | } | 432 | } |
| 433 | 433 | ||
| 434 | static int __devexit mxr_remove(struct platform_device *pdev) | 434 | static int mxr_remove(struct platform_device *pdev) |
| 435 | { | 435 | { |
| 436 | struct device *dev = &pdev->dev; | 436 | struct device *dev = &pdev->dev; |
| 437 | struct mxr_device *mdev = to_mdev(dev); | 437 | struct mxr_device *mdev = to_mdev(dev); |
| @@ -450,7 +450,7 @@ static int __devexit mxr_remove(struct platform_device *pdev) | |||
| 450 | 450 | ||
| 451 | static struct platform_driver mxr_driver __refdata = { | 451 | static struct platform_driver mxr_driver __refdata = { |
| 452 | .probe = mxr_probe, | 452 | .probe = mxr_probe, |
| 453 | .remove = __devexit_p(mxr_remove), | 453 | .remove = mxr_remove, |
| 454 | .driver = { | 454 | .driver = { |
| 455 | .name = MXR_DRIVER_NAME, | 455 | .name = MXR_DRIVER_NAME, |
| 456 | .owner = THIS_MODULE, | 456 | .owner = THIS_MODULE, |
diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c index 7379e77bf4e1..1f3b7436511c 100644 --- a/drivers/media/platform/s5p-tv/mixer_video.c +++ b/drivers/media/platform/s5p-tv/mixer_video.c | |||
| @@ -62,8 +62,8 @@ done: | |||
| 62 | return sd; | 62 | return sd; |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | int __devinit mxr_acquire_video(struct mxr_device *mdev, | 65 | int mxr_acquire_video(struct mxr_device *mdev, |
| 66 | struct mxr_output_conf *output_conf, int output_count) | 66 | struct mxr_output_conf *output_conf, int output_count) |
| 67 | { | 67 | { |
| 68 | struct device *dev = mdev->dev; | 68 | struct device *dev = mdev->dev; |
| 69 | struct v4l2_device *v4l2_dev = &mdev->v4l2_dev; | 69 | struct v4l2_device *v4l2_dev = &mdev->v4l2_dev; |
diff --git a/drivers/media/platform/s5p-tv/sdo_drv.c b/drivers/media/platform/s5p-tv/sdo_drv.c index ad68bbed014e..91a6939a270a 100644 --- a/drivers/media/platform/s5p-tv/sdo_drv.c +++ b/drivers/media/platform/s5p-tv/sdo_drv.c | |||
| @@ -292,7 +292,7 @@ static const struct dev_pm_ops sdo_pm_ops = { | |||
| 292 | .runtime_resume = sdo_runtime_resume, | 292 | .runtime_resume = sdo_runtime_resume, |
| 293 | }; | 293 | }; |
| 294 | 294 | ||
| 295 | static int __devinit sdo_probe(struct platform_device *pdev) | 295 | static int sdo_probe(struct platform_device *pdev) |
| 296 | { | 296 | { |
| 297 | struct device *dev = &pdev->dev; | 297 | struct device *dev = &pdev->dev; |
| 298 | struct sdo_device *sdev; | 298 | struct sdo_device *sdev; |
| @@ -419,7 +419,7 @@ fail: | |||
| 419 | return ret; | 419 | return ret; |
| 420 | } | 420 | } |
| 421 | 421 | ||
| 422 | static int __devexit sdo_remove(struct platform_device *pdev) | 422 | static int sdo_remove(struct platform_device *pdev) |
| 423 | { | 423 | { |
| 424 | struct v4l2_subdev *sd = dev_get_drvdata(&pdev->dev); | 424 | struct v4l2_subdev *sd = dev_get_drvdata(&pdev->dev); |
| 425 | struct sdo_device *sdev = sd_to_sdev(sd); | 425 | struct sdo_device *sdev = sd_to_sdev(sd); |
| @@ -437,7 +437,7 @@ static int __devexit sdo_remove(struct platform_device *pdev) | |||
| 437 | 437 | ||
| 438 | static struct platform_driver sdo_driver __refdata = { | 438 | static struct platform_driver sdo_driver __refdata = { |
| 439 | .probe = sdo_probe, | 439 | .probe = sdo_probe, |
| 440 | .remove = __devexit_p(sdo_remove), | 440 | .remove = sdo_remove, |
| 441 | .driver = { | 441 | .driver = { |
| 442 | .name = "s5p-sdo", | 442 | .name = "s5p-sdo", |
| 443 | .owner = THIS_MODULE, | 443 | .owner = THIS_MODULE, |
diff --git a/drivers/media/platform/s5p-tv/sii9234_drv.c b/drivers/media/platform/s5p-tv/sii9234_drv.c index 716d4846f8bd..49191aac9634 100644 --- a/drivers/media/platform/s5p-tv/sii9234_drv.c +++ b/drivers/media/platform/s5p-tv/sii9234_drv.c | |||
| @@ -315,8 +315,8 @@ static const struct v4l2_subdev_ops sii9234_ops = { | |||
| 315 | .video = &sii9234_video_ops, | 315 | .video = &sii9234_video_ops, |
| 316 | }; | 316 | }; |
| 317 | 317 | ||
| 318 | static int __devinit sii9234_probe(struct i2c_client *client, | 318 | static int sii9234_probe(struct i2c_client *client, |
| 319 | const struct i2c_device_id *id) | 319 | const struct i2c_device_id *id) |
| 320 | { | 320 | { |
| 321 | struct device *dev = &client->dev; | 321 | struct device *dev = &client->dev; |
| 322 | struct sii9234_platform_data *pdata = dev->platform_data; | 322 | struct sii9234_platform_data *pdata = dev->platform_data; |
| @@ -378,7 +378,7 @@ fail: | |||
| 378 | return ret; | 378 | return ret; |
| 379 | } | 379 | } |
| 380 | 380 | ||
| 381 | static int __devexit sii9234_remove(struct i2c_client *client) | 381 | static int sii9234_remove(struct i2c_client *client) |
| 382 | { | 382 | { |
| 383 | struct device *dev = &client->dev; | 383 | struct device *dev = &client->dev; |
| 384 | struct v4l2_subdev *sd = i2c_get_clientdata(client); | 384 | struct v4l2_subdev *sd = i2c_get_clientdata(client); |
| @@ -406,7 +406,7 @@ static struct i2c_driver sii9234_driver = { | |||
| 406 | .pm = &sii9234_pm_ops, | 406 | .pm = &sii9234_pm_ops, |
| 407 | }, | 407 | }, |
| 408 | .probe = sii9234_probe, | 408 | .probe = sii9234_probe, |
| 409 | .remove = __devexit_p(sii9234_remove), | 409 | .remove = sii9234_remove, |
| 410 | .id_table = sii9234_id, | 410 | .id_table = sii9234_id, |
| 411 | }; | 411 | }; |
| 412 | 412 | ||
diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c index a1c87f0ceaab..f3c4571ac01e 100644 --- a/drivers/media/platform/sh_vou.c +++ b/drivers/media/platform/sh_vou.c | |||
| @@ -1326,7 +1326,7 @@ static const struct video_device sh_vou_video_template = { | |||
| 1326 | .vfl_dir = VFL_DIR_TX, | 1326 | .vfl_dir = VFL_DIR_TX, |
| 1327 | }; | 1327 | }; |
| 1328 | 1328 | ||
| 1329 | static int __devinit sh_vou_probe(struct platform_device *pdev) | 1329 | static int sh_vou_probe(struct platform_device *pdev) |
| 1330 | { | 1330 | { |
| 1331 | struct sh_vou_pdata *vou_pdata = pdev->dev.platform_data; | 1331 | struct sh_vou_pdata *vou_pdata = pdev->dev.platform_data; |
| 1332 | struct v4l2_rect *rect; | 1332 | struct v4l2_rect *rect; |
| @@ -1461,7 +1461,7 @@ ereqmemreg: | |||
| 1461 | return ret; | 1461 | return ret; |
| 1462 | } | 1462 | } |
| 1463 | 1463 | ||
| 1464 | static int __devexit sh_vou_remove(struct platform_device *pdev) | 1464 | static int sh_vou_remove(struct platform_device *pdev) |
| 1465 | { | 1465 | { |
| 1466 | int irq = platform_get_irq(pdev, 0); | 1466 | int irq = platform_get_irq(pdev, 0); |
| 1467 | struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev); | 1467 | struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev); |
| @@ -1487,7 +1487,7 @@ static int __devexit sh_vou_remove(struct platform_device *pdev) | |||
| 1487 | } | 1487 | } |
| 1488 | 1488 | ||
| 1489 | static struct platform_driver __refdata sh_vou = { | 1489 | static struct platform_driver __refdata sh_vou = { |
| 1490 | .remove = __devexit_p(sh_vou_remove), | 1490 | .remove = sh_vou_remove, |
| 1491 | .driver = { | 1491 | .driver = { |
| 1492 | .name = "sh-vou", | 1492 | .name = "sh-vou", |
| 1493 | .owner = THIS_MODULE, | 1493 | .owner = THIS_MODULE, |
diff --git a/drivers/media/platform/soc_camera/atmel-isi.c b/drivers/media/platform/soc_camera/atmel-isi.c index 6274a91c25c7..d96c8c7e01d9 100644 --- a/drivers/media/platform/soc_camera/atmel-isi.c +++ b/drivers/media/platform/soc_camera/atmel-isi.c | |||
| @@ -897,7 +897,7 @@ static struct soc_camera_host_ops isi_soc_camera_host_ops = { | |||
| 897 | }; | 897 | }; |
| 898 | 898 | ||
| 899 | /* -----------------------------------------------------------------------*/ | 899 | /* -----------------------------------------------------------------------*/ |
| 900 | static int __devexit atmel_isi_remove(struct platform_device *pdev) | 900 | static int atmel_isi_remove(struct platform_device *pdev) |
| 901 | { | 901 | { |
| 902 | struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); | 902 | struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); |
| 903 | struct atmel_isi *isi = container_of(soc_host, | 903 | struct atmel_isi *isi = container_of(soc_host, |
| @@ -921,7 +921,7 @@ static int __devexit atmel_isi_remove(struct platform_device *pdev) | |||
| 921 | return 0; | 921 | return 0; |
| 922 | } | 922 | } |
| 923 | 923 | ||
| 924 | static int __devinit atmel_isi_probe(struct platform_device *pdev) | 924 | static int atmel_isi_probe(struct platform_device *pdev) |
| 925 | { | 925 | { |
| 926 | unsigned int irq; | 926 | unsigned int irq; |
| 927 | struct atmel_isi *isi; | 927 | struct atmel_isi *isi; |
| @@ -1074,7 +1074,7 @@ err_clk_prepare_pclk: | |||
| 1074 | 1074 | ||
| 1075 | static struct platform_driver atmel_isi_driver = { | 1075 | static struct platform_driver atmel_isi_driver = { |
| 1076 | .probe = atmel_isi_probe, | 1076 | .probe = atmel_isi_probe, |
| 1077 | .remove = __devexit_p(atmel_isi_remove), | 1077 | .remove = atmel_isi_remove, |
| 1078 | .driver = { | 1078 | .driver = { |
| 1079 | .name = "atmel_isi", | 1079 | .name = "atmel_isi", |
| 1080 | .owner = THIS_MODULE, | 1080 | .owner = THIS_MODULE, |
diff --git a/drivers/media/platform/soc_camera/mx2_camera.c b/drivers/media/platform/soc_camera/mx2_camera.c index 791cd1d54a76..8bda2c908aba 100644 --- a/drivers/media/platform/soc_camera/mx2_camera.c +++ b/drivers/media/platform/soc_camera/mx2_camera.c | |||
| @@ -1692,7 +1692,7 @@ static irqreturn_t mx27_camera_emma_irq(int irq_emma, void *data) | |||
| 1692 | return IRQ_HANDLED; | 1692 | return IRQ_HANDLED; |
| 1693 | } | 1693 | } |
| 1694 | 1694 | ||
| 1695 | static int __devinit mx27_camera_emma_init(struct platform_device *pdev) | 1695 | static int mx27_camera_emma_init(struct platform_device *pdev) |
| 1696 | { | 1696 | { |
| 1697 | struct mx2_camera_dev *pcdev = platform_get_drvdata(pdev); | 1697 | struct mx2_camera_dev *pcdev = platform_get_drvdata(pdev); |
| 1698 | struct resource *res_emma; | 1698 | struct resource *res_emma; |
| @@ -1750,7 +1750,7 @@ out: | |||
| 1750 | return err; | 1750 | return err; |
| 1751 | } | 1751 | } |
| 1752 | 1752 | ||
| 1753 | static int __devinit mx2_camera_probe(struct platform_device *pdev) | 1753 | static int mx2_camera_probe(struct platform_device *pdev) |
| 1754 | { | 1754 | { |
| 1755 | struct mx2_camera_dev *pcdev; | 1755 | struct mx2_camera_dev *pcdev; |
| 1756 | struct resource *res_csi; | 1756 | struct resource *res_csi; |
| @@ -1887,7 +1887,7 @@ exit: | |||
| 1887 | return err; | 1887 | return err; |
| 1888 | } | 1888 | } |
| 1889 | 1889 | ||
| 1890 | static int __devexit mx2_camera_remove(struct platform_device *pdev) | 1890 | static int mx2_camera_remove(struct platform_device *pdev) |
| 1891 | { | 1891 | { |
| 1892 | struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); | 1892 | struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); |
| 1893 | struct mx2_camera_dev *pcdev = container_of(soc_host, | 1893 | struct mx2_camera_dev *pcdev = container_of(soc_host, |
| @@ -1912,7 +1912,7 @@ static struct platform_driver mx2_camera_driver = { | |||
| 1912 | .name = MX2_CAM_DRV_NAME, | 1912 | .name = MX2_CAM_DRV_NAME, |
| 1913 | }, | 1913 | }, |
| 1914 | .id_table = mx2_camera_devtype, | 1914 | .id_table = mx2_camera_devtype, |
| 1915 | .remove = __devexit_p(mx2_camera_remove), | 1915 | .remove = mx2_camera_remove, |
| 1916 | }; | 1916 | }; |
| 1917 | 1917 | ||
| 1918 | 1918 | ||
diff --git a/drivers/media/platform/soc_camera/mx3_camera.c b/drivers/media/platform/soc_camera/mx3_camera.c index 06d16de76377..45aef1053a49 100644 --- a/drivers/media/platform/soc_camera/mx3_camera.c +++ b/drivers/media/platform/soc_camera/mx3_camera.c | |||
| @@ -1143,7 +1143,7 @@ static struct soc_camera_host_ops mx3_soc_camera_host_ops = { | |||
| 1143 | .set_bus_param = mx3_camera_set_bus_param, | 1143 | .set_bus_param = mx3_camera_set_bus_param, |
| 1144 | }; | 1144 | }; |
| 1145 | 1145 | ||
| 1146 | static int __devinit mx3_camera_probe(struct platform_device *pdev) | 1146 | static int mx3_camera_probe(struct platform_device *pdev) |
| 1147 | { | 1147 | { |
| 1148 | struct mx3_camera_dev *mx3_cam; | 1148 | struct mx3_camera_dev *mx3_cam; |
| 1149 | struct resource *res; | 1149 | struct resource *res; |
| @@ -1246,7 +1246,7 @@ egetres: | |||
| 1246 | return err; | 1246 | return err; |
| 1247 | } | 1247 | } |
| 1248 | 1248 | ||
| 1249 | static int __devexit mx3_camera_remove(struct platform_device *pdev) | 1249 | static int mx3_camera_remove(struct platform_device *pdev) |
| 1250 | { | 1250 | { |
| 1251 | struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); | 1251 | struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); |
| 1252 | struct mx3_camera_dev *mx3_cam = container_of(soc_host, | 1252 | struct mx3_camera_dev *mx3_cam = container_of(soc_host, |
| @@ -1279,7 +1279,7 @@ static struct platform_driver mx3_camera_driver = { | |||
| 1279 | .name = MX3_CAM_DRV_NAME, | 1279 | .name = MX3_CAM_DRV_NAME, |
| 1280 | }, | 1280 | }, |
| 1281 | .probe = mx3_camera_probe, | 1281 | .probe = mx3_camera_probe, |
| 1282 | .remove = __devexit_p(mx3_camera_remove), | 1282 | .remove = mx3_camera_remove, |
| 1283 | }; | 1283 | }; |
| 1284 | 1284 | ||
| 1285 | module_platform_driver(mx3_camera_driver); | 1285 | module_platform_driver(mx3_camera_driver); |
diff --git a/drivers/media/platform/soc_camera/pxa_camera.c b/drivers/media/platform/soc_camera/pxa_camera.c index 3434ffe79c6e..523330d00dee 100644 --- a/drivers/media/platform/soc_camera/pxa_camera.c +++ b/drivers/media/platform/soc_camera/pxa_camera.c | |||
| @@ -1651,7 +1651,7 @@ static struct soc_camera_host_ops pxa_soc_camera_host_ops = { | |||
| 1651 | .set_bus_param = pxa_camera_set_bus_param, | 1651 | .set_bus_param = pxa_camera_set_bus_param, |
| 1652 | }; | 1652 | }; |
| 1653 | 1653 | ||
| 1654 | static int __devinit pxa_camera_probe(struct platform_device *pdev) | 1654 | static int pxa_camera_probe(struct platform_device *pdev) |
| 1655 | { | 1655 | { |
| 1656 | struct pxa_camera_dev *pcdev; | 1656 | struct pxa_camera_dev *pcdev; |
| 1657 | struct resource *res; | 1657 | struct resource *res; |
| @@ -1801,7 +1801,7 @@ exit: | |||
| 1801 | return err; | 1801 | return err; |
| 1802 | } | 1802 | } |
| 1803 | 1803 | ||
| 1804 | static int __devexit pxa_camera_remove(struct platform_device *pdev) | 1804 | static int pxa_camera_remove(struct platform_device *pdev) |
| 1805 | { | 1805 | { |
| 1806 | struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); | 1806 | struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); |
| 1807 | struct pxa_camera_dev *pcdev = container_of(soc_host, | 1807 | struct pxa_camera_dev *pcdev = container_of(soc_host, |
| @@ -1840,7 +1840,7 @@ static struct platform_driver pxa_camera_driver = { | |||
| 1840 | .pm = &pxa_camera_pm, | 1840 | .pm = &pxa_camera_pm, |
| 1841 | }, | 1841 | }, |
| 1842 | .probe = pxa_camera_probe, | 1842 | .probe = pxa_camera_probe, |
| 1843 | .remove = __devexit_p(pxa_camera_remove), | 1843 | .remove = pxa_camera_remove, |
| 1844 | }; | 1844 | }; |
| 1845 | 1845 | ||
| 1846 | module_platform_driver(pxa_camera_driver); | 1846 | module_platform_driver(pxa_camera_driver); |
diff --git a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c index 2d8861c0e8f2..ebbc126e71a6 100644 --- a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c +++ b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c | |||
| @@ -2071,7 +2071,7 @@ static int bus_notify(struct notifier_block *nb, | |||
| 2071 | return NOTIFY_DONE; | 2071 | return NOTIFY_DONE; |
| 2072 | } | 2072 | } |
| 2073 | 2073 | ||
| 2074 | static int __devinit sh_mobile_ceu_probe(struct platform_device *pdev) | 2074 | static int sh_mobile_ceu_probe(struct platform_device *pdev) |
| 2075 | { | 2075 | { |
| 2076 | struct sh_mobile_ceu_dev *pcdev; | 2076 | struct sh_mobile_ceu_dev *pcdev; |
| 2077 | struct resource *res; | 2077 | struct resource *res; |
| @@ -2258,7 +2258,7 @@ exit: | |||
| 2258 | return err; | 2258 | return err; |
| 2259 | } | 2259 | } |
| 2260 | 2260 | ||
| 2261 | static int __devexit sh_mobile_ceu_remove(struct platform_device *pdev) | 2261 | static int sh_mobile_ceu_remove(struct platform_device *pdev) |
| 2262 | { | 2262 | { |
| 2263 | struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); | 2263 | struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); |
| 2264 | struct sh_mobile_ceu_dev *pcdev = container_of(soc_host, | 2264 | struct sh_mobile_ceu_dev *pcdev = container_of(soc_host, |
| @@ -2307,7 +2307,7 @@ static struct platform_driver sh_mobile_ceu_driver = { | |||
| 2307 | .pm = &sh_mobile_ceu_dev_pm_ops, | 2307 | .pm = &sh_mobile_ceu_dev_pm_ops, |
| 2308 | }, | 2308 | }, |
| 2309 | .probe = sh_mobile_ceu_probe, | 2309 | .probe = sh_mobile_ceu_probe, |
| 2310 | .remove = __devexit_p(sh_mobile_ceu_remove), | 2310 | .remove = sh_mobile_ceu_remove, |
| 2311 | }; | 2311 | }; |
| 2312 | 2312 | ||
| 2313 | static int __init sh_mobile_ceu_init(void) | 2313 | static int __init sh_mobile_ceu_init(void) |
diff --git a/drivers/media/platform/soc_camera/sh_mobile_csi2.c b/drivers/media/platform/soc_camera/sh_mobile_csi2.c index 05286500b4d4..a17aba9a0104 100644 --- a/drivers/media/platform/soc_camera/sh_mobile_csi2.c +++ b/drivers/media/platform/soc_camera/sh_mobile_csi2.c | |||
| @@ -294,7 +294,7 @@ static struct v4l2_subdev_ops sh_csi2_subdev_ops = { | |||
| 294 | .video = &sh_csi2_subdev_video_ops, | 294 | .video = &sh_csi2_subdev_video_ops, |
| 295 | }; | 295 | }; |
| 296 | 296 | ||
| 297 | static __devinit int sh_csi2_probe(struct platform_device *pdev) | 297 | static int sh_csi2_probe(struct platform_device *pdev) |
| 298 | { | 298 | { |
| 299 | struct resource *res; | 299 | struct resource *res; |
| 300 | unsigned int irq; | 300 | unsigned int irq; |
| @@ -366,7 +366,7 @@ ereqreg: | |||
| 366 | return ret; | 366 | return ret; |
| 367 | } | 367 | } |
| 368 | 368 | ||
| 369 | static __devexit int sh_csi2_remove(struct platform_device *pdev) | 369 | static int sh_csi2_remove(struct platform_device *pdev) |
| 370 | { | 370 | { |
| 371 | struct sh_csi2 *priv = platform_get_drvdata(pdev); | 371 | struct sh_csi2 *priv = platform_get_drvdata(pdev); |
| 372 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 372 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| @@ -382,7 +382,7 @@ static __devexit int sh_csi2_remove(struct platform_device *pdev) | |||
| 382 | } | 382 | } |
| 383 | 383 | ||
| 384 | static struct platform_driver __refdata sh_csi2_pdrv = { | 384 | static struct platform_driver __refdata sh_csi2_pdrv = { |
| 385 | .remove = __devexit_p(sh_csi2_remove), | 385 | .remove = sh_csi2_remove, |
| 386 | .probe = sh_csi2_probe, | 386 | .probe = sh_csi2_probe, |
| 387 | .driver = { | 387 | .driver = { |
| 388 | .name = "sh-mobile-csi2", | 388 | .name = "sh-mobile-csi2", |
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index 4e3735679f17..2ec90eae6ba0 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c | |||
| @@ -1530,7 +1530,7 @@ static int soc_camera_video_start(struct soc_camera_device *icd) | |||
| 1530 | return 0; | 1530 | return 0; |
| 1531 | } | 1531 | } |
| 1532 | 1532 | ||
| 1533 | static int __devinit soc_camera_pdrv_probe(struct platform_device *pdev) | 1533 | static int soc_camera_pdrv_probe(struct platform_device *pdev) |
| 1534 | { | 1534 | { |
| 1535 | struct soc_camera_link *icl = pdev->dev.platform_data; | 1535 | struct soc_camera_link *icl = pdev->dev.platform_data; |
| 1536 | struct soc_camera_device *icd; | 1536 | struct soc_camera_device *icd; |
| @@ -1558,7 +1558,7 @@ static int __devinit soc_camera_pdrv_probe(struct platform_device *pdev) | |||
| 1558 | * hot-pluggable. Now we know, that all our users - hosts and devices have | 1558 | * hot-pluggable. Now we know, that all our users - hosts and devices have |
| 1559 | * been unloaded already | 1559 | * been unloaded already |
| 1560 | */ | 1560 | */ |
| 1561 | static int __devexit soc_camera_pdrv_remove(struct platform_device *pdev) | 1561 | static int soc_camera_pdrv_remove(struct platform_device *pdev) |
| 1562 | { | 1562 | { |
| 1563 | struct soc_camera_device *icd = platform_get_drvdata(pdev); | 1563 | struct soc_camera_device *icd = platform_get_drvdata(pdev); |
| 1564 | 1564 | ||
| @@ -1572,7 +1572,7 @@ static int __devexit soc_camera_pdrv_remove(struct platform_device *pdev) | |||
| 1572 | 1572 | ||
| 1573 | static struct platform_driver __refdata soc_camera_pdrv = { | 1573 | static struct platform_driver __refdata soc_camera_pdrv = { |
| 1574 | .probe = soc_camera_pdrv_probe, | 1574 | .probe = soc_camera_pdrv_probe, |
| 1575 | .remove = __devexit_p(soc_camera_pdrv_remove), | 1575 | .remove = soc_camera_pdrv_remove, |
| 1576 | .driver = { | 1576 | .driver = { |
| 1577 | .name = "soc-camera-pdrv", | 1577 | .name = "soc-camera-pdrv", |
| 1578 | .owner = THIS_MODULE, | 1578 | .owner = THIS_MODULE, |
diff --git a/drivers/media/platform/timblogiw.c b/drivers/media/platform/timblogiw.c index 02194c056b00..d854d08a6c7f 100644 --- a/drivers/media/platform/timblogiw.c +++ b/drivers/media/platform/timblogiw.c | |||
| @@ -745,7 +745,7 @@ static int timblogiw_mmap(struct file *file, struct vm_area_struct *vma) | |||
| 745 | 745 | ||
| 746 | /* Platform device functions */ | 746 | /* Platform device functions */ |
| 747 | 747 | ||
| 748 | static __devinitconst struct v4l2_ioctl_ops timblogiw_ioctl_ops = { | 748 | static struct v4l2_ioctl_ops timblogiw_ioctl_ops = { |
| 749 | .vidioc_querycap = timblogiw_querycap, | 749 | .vidioc_querycap = timblogiw_querycap, |
| 750 | .vidioc_enum_fmt_vid_cap = timblogiw_enum_fmt, | 750 | .vidioc_enum_fmt_vid_cap = timblogiw_enum_fmt, |
| 751 | .vidioc_g_fmt_vid_cap = timblogiw_g_fmt, | 751 | .vidioc_g_fmt_vid_cap = timblogiw_g_fmt, |
| @@ -767,7 +767,7 @@ static __devinitconst struct v4l2_ioctl_ops timblogiw_ioctl_ops = { | |||
| 767 | .vidioc_enum_framesizes = timblogiw_enum_framesizes, | 767 | .vidioc_enum_framesizes = timblogiw_enum_framesizes, |
| 768 | }; | 768 | }; |
| 769 | 769 | ||
| 770 | static __devinitconst struct v4l2_file_operations timblogiw_fops = { | 770 | static struct v4l2_file_operations timblogiw_fops = { |
| 771 | .owner = THIS_MODULE, | 771 | .owner = THIS_MODULE, |
| 772 | .open = timblogiw_open, | 772 | .open = timblogiw_open, |
| 773 | .release = timblogiw_close, | 773 | .release = timblogiw_close, |
| @@ -777,7 +777,7 @@ static __devinitconst struct v4l2_file_operations timblogiw_fops = { | |||
| 777 | .poll = timblogiw_poll, | 777 | .poll = timblogiw_poll, |
| 778 | }; | 778 | }; |
| 779 | 779 | ||
| 780 | static __devinitconst struct video_device timblogiw_template = { | 780 | static struct video_device timblogiw_template = { |
| 781 | .name = TIMBLOGIWIN_NAME, | 781 | .name = TIMBLOGIWIN_NAME, |
| 782 | .fops = &timblogiw_fops, | 782 | .fops = &timblogiw_fops, |
| 783 | .ioctl_ops = &timblogiw_ioctl_ops, | 783 | .ioctl_ops = &timblogiw_ioctl_ops, |
| @@ -786,7 +786,7 @@ static __devinitconst struct video_device timblogiw_template = { | |||
| 786 | .tvnorms = V4L2_STD_PAL | V4L2_STD_NTSC | 786 | .tvnorms = V4L2_STD_PAL | V4L2_STD_NTSC |
| 787 | }; | 787 | }; |
| 788 | 788 | ||
| 789 | static int __devinit timblogiw_probe(struct platform_device *pdev) | 789 | static int timblogiw_probe(struct platform_device *pdev) |
| 790 | { | 790 | { |
| 791 | int err; | 791 | int err; |
| 792 | struct timblogiw *lw = NULL; | 792 | struct timblogiw *lw = NULL; |
| @@ -848,7 +848,7 @@ err: | |||
| 848 | return err; | 848 | return err; |
| 849 | } | 849 | } |
| 850 | 850 | ||
| 851 | static int __devexit timblogiw_remove(struct platform_device *pdev) | 851 | static int timblogiw_remove(struct platform_device *pdev) |
| 852 | { | 852 | { |
| 853 | struct timblogiw *lw = platform_get_drvdata(pdev); | 853 | struct timblogiw *lw = platform_get_drvdata(pdev); |
| 854 | 854 | ||
| @@ -869,7 +869,7 @@ static struct platform_driver timblogiw_platform_driver = { | |||
| 869 | .owner = THIS_MODULE, | 869 | .owner = THIS_MODULE, |
| 870 | }, | 870 | }, |
| 871 | .probe = timblogiw_probe, | 871 | .probe = timblogiw_probe, |
| 872 | .remove = __devexit_p(timblogiw_remove), | 872 | .remove = timblogiw_remove, |
| 873 | }; | 873 | }; |
| 874 | 874 | ||
| 875 | module_platform_driver(timblogiw_platform_driver); | 875 | module_platform_driver(timblogiw_platform_driver); |
diff --git a/drivers/media/platform/via-camera.c b/drivers/media/platform/via-camera.c index eb404c2ce270..63e8c3461239 100644 --- a/drivers/media/platform/via-camera.c +++ b/drivers/media/platform/via-camera.c | |||
| @@ -1324,7 +1324,7 @@ static struct video_device viacam_v4l_template = { | |||
| 1324 | #define VIACAM_SERIAL_CREG 0x46 | 1324 | #define VIACAM_SERIAL_CREG 0x46 |
| 1325 | #define VIACAM_SERIAL_BIT 0x40 | 1325 | #define VIACAM_SERIAL_BIT 0x40 |
| 1326 | 1326 | ||
| 1327 | static __devinit bool viacam_serial_is_enabled(void) | 1327 | static bool viacam_serial_is_enabled(void) |
| 1328 | { | 1328 | { |
| 1329 | struct pci_bus *pbus = pci_find_bus(0, 0); | 1329 | struct pci_bus *pbus = pci_find_bus(0, 0); |
| 1330 | u8 cbyte; | 1330 | u8 cbyte; |
| @@ -1353,7 +1353,7 @@ static struct ov7670_config sensor_cfg = { | |||
| 1353 | .clock_speed = 90, | 1353 | .clock_speed = 90, |
| 1354 | }; | 1354 | }; |
| 1355 | 1355 | ||
| 1356 | static __devinit int viacam_probe(struct platform_device *pdev) | 1356 | static int viacam_probe(struct platform_device *pdev) |
| 1357 | { | 1357 | { |
| 1358 | int ret; | 1358 | int ret; |
| 1359 | struct i2c_adapter *sensor_adapter; | 1359 | struct i2c_adapter *sensor_adapter; |
| @@ -1490,7 +1490,7 @@ out_unregister: | |||
| 1490 | return ret; | 1490 | return ret; |
| 1491 | } | 1491 | } |
| 1492 | 1492 | ||
| 1493 | static __devexit int viacam_remove(struct platform_device *pdev) | 1493 | static int viacam_remove(struct platform_device *pdev) |
| 1494 | { | 1494 | { |
| 1495 | struct via_camera *cam = via_cam_info; | 1495 | struct via_camera *cam = via_cam_info; |
| 1496 | struct viafb_dev *viadev = pdev->dev.platform_data; | 1496 | struct viafb_dev *viadev = pdev->dev.platform_data; |
diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c index b415211d0c4b..bd4d3a7cdadd 100644 --- a/drivers/media/radio/radio-maxiradio.c +++ b/drivers/media/radio/radio-maxiradio.c | |||
| @@ -114,7 +114,8 @@ static struct snd_tea575x_ops maxiradio_tea_ops = { | |||
| 114 | .set_direction = maxiradio_tea575x_set_direction, | 114 | .set_direction = maxiradio_tea575x_set_direction, |
| 115 | }; | 115 | }; |
| 116 | 116 | ||
| 117 | static int __devinit maxiradio_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 117 | static int maxiradio_probe(struct pci_dev *pdev, |
| 118 | const struct pci_device_id *ent) | ||
| 118 | { | 119 | { |
| 119 | struct maxiradio *dev; | 120 | struct maxiradio *dev; |
| 120 | struct v4l2_device *v4l2_dev; | 121 | struct v4l2_device *v4l2_dev; |
| @@ -172,7 +173,7 @@ errfr: | |||
| 172 | return retval; | 173 | return retval; |
| 173 | } | 174 | } |
| 174 | 175 | ||
| 175 | static void __devexit maxiradio_remove(struct pci_dev *pdev) | 176 | static void maxiradio_remove(struct pci_dev *pdev) |
| 176 | { | 177 | { |
| 177 | struct v4l2_device *v4l2_dev = dev_get_drvdata(&pdev->dev); | 178 | struct v4l2_device *v4l2_dev = dev_get_drvdata(&pdev->dev); |
| 178 | struct maxiradio *dev = to_maxiradio(v4l2_dev); | 179 | struct maxiradio *dev = to_maxiradio(v4l2_dev); |
| @@ -196,7 +197,7 @@ static struct pci_driver maxiradio_driver = { | |||
| 196 | .name = "radio-maxiradio", | 197 | .name = "radio-maxiradio", |
| 197 | .id_table = maxiradio_pci_tbl, | 198 | .id_table = maxiradio_pci_tbl, |
| 198 | .probe = maxiradio_probe, | 199 | .probe = maxiradio_probe, |
| 199 | .remove = __devexit_p(maxiradio_remove), | 200 | .remove = maxiradio_remove, |
| 200 | }; | 201 | }; |
| 201 | 202 | ||
| 202 | static int __init maxiradio_init(void) | 203 | static int __init maxiradio_init(void) |
diff --git a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c index c260a2a354b1..637a55564958 100644 --- a/drivers/media/radio/radio-sf16fmi.c +++ b/drivers/media/radio/radio-sf16fmi.c | |||
| @@ -265,7 +265,7 @@ static const struct v4l2_ioctl_ops fmi_ioctl_ops = { | |||
| 265 | }; | 265 | }; |
| 266 | 266 | ||
| 267 | /* ladis: this is my card. does any other types exist? */ | 267 | /* ladis: this is my card. does any other types exist? */ |
| 268 | static struct isapnp_device_id id_table[] __devinitdata = { | 268 | static struct isapnp_device_id id_table[] = { |
| 269 | /* SF16-FMI */ | 269 | /* SF16-FMI */ |
| 270 | { ISAPNP_ANY_ID, ISAPNP_ANY_ID, | 270 | { ISAPNP_ANY_ID, ISAPNP_ANY_ID, |
| 271 | ISAPNP_VENDOR('M','F','R'), ISAPNP_FUNCTION(0xad10), 0}, | 271 | ISAPNP_VENDOR('M','F','R'), ISAPNP_FUNCTION(0xad10), 0}, |
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c index 4efcbec74c52..9c0990457a7c 100644 --- a/drivers/media/radio/radio-sf16fmr2.c +++ b/drivers/media/radio/radio-sf16fmr2.c | |||
| @@ -197,13 +197,13 @@ static int fmr2_tea_ext_init(struct snd_tea575x *tea) | |||
| 197 | return 0; | 197 | return 0; |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | static struct pnp_device_id fmr2_pnp_ids[] __devinitdata = { | 200 | static struct pnp_device_id fmr2_pnp_ids[] = { |
| 201 | { .id = "MFRad13" }, /* tuner subdevice of SF16-FMD2 */ | 201 | { .id = "MFRad13" }, /* tuner subdevice of SF16-FMD2 */ |
| 202 | { .id = "" } | 202 | { .id = "" } |
| 203 | }; | 203 | }; |
| 204 | MODULE_DEVICE_TABLE(pnp, fmr2_pnp_ids); | 204 | MODULE_DEVICE_TABLE(pnp, fmr2_pnp_ids); |
| 205 | 205 | ||
| 206 | static int __devinit fmr2_probe(struct fmr2 *fmr2, struct device *pdev, int io) | 206 | static int fmr2_probe(struct fmr2 *fmr2, struct device *pdev, int io) |
| 207 | { | 207 | { |
| 208 | int err, i; | 208 | int err, i; |
| 209 | char *card_name = fmr2->is_fmd2 ? "SF16-FMD2" : "SF16-FMR2"; | 209 | char *card_name = fmr2->is_fmd2 ? "SF16-FMD2" : "SF16-FMR2"; |
| @@ -249,7 +249,7 @@ static int __devinit fmr2_probe(struct fmr2 *fmr2, struct device *pdev, int io) | |||
| 249 | return 0; | 249 | return 0; |
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | static int __devinit fmr2_isa_match(struct device *pdev, unsigned int ndev) | 252 | static int fmr2_isa_match(struct device *pdev, unsigned int ndev) |
| 253 | { | 253 | { |
| 254 | struct fmr2 *fmr2 = kzalloc(sizeof(*fmr2), GFP_KERNEL); | 254 | struct fmr2 *fmr2 = kzalloc(sizeof(*fmr2), GFP_KERNEL); |
| 255 | if (!fmr2) | 255 | if (!fmr2) |
| @@ -265,8 +265,7 @@ static int __devinit fmr2_isa_match(struct device *pdev, unsigned int ndev) | |||
| 265 | return 1; | 265 | return 1; |
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | static int __devinit fmr2_pnp_probe(struct pnp_dev *pdev, | 268 | static int fmr2_pnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *id) |
| 269 | const struct pnp_device_id *id) | ||
| 270 | { | 269 | { |
| 271 | int ret; | 270 | int ret; |
| 272 | struct fmr2 *fmr2 = kzalloc(sizeof(*fmr2), GFP_KERNEL); | 271 | struct fmr2 *fmr2 = kzalloc(sizeof(*fmr2), GFP_KERNEL); |
| @@ -285,7 +284,7 @@ static int __devinit fmr2_pnp_probe(struct pnp_dev *pdev, | |||
| 285 | return 0; | 284 | return 0; |
| 286 | } | 285 | } |
| 287 | 286 | ||
| 288 | static void __devexit fmr2_remove(struct fmr2 *fmr2) | 287 | static void fmr2_remove(struct fmr2 *fmr2) |
| 289 | { | 288 | { |
| 290 | snd_tea575x_exit(&fmr2->tea); | 289 | snd_tea575x_exit(&fmr2->tea); |
| 291 | release_region(fmr2->io, 2); | 290 | release_region(fmr2->io, 2); |
| @@ -293,7 +292,7 @@ static void __devexit fmr2_remove(struct fmr2 *fmr2) | |||
| 293 | kfree(fmr2); | 292 | kfree(fmr2); |
| 294 | } | 293 | } |
| 295 | 294 | ||
| 296 | static int __devexit fmr2_isa_remove(struct device *pdev, unsigned int ndev) | 295 | static int fmr2_isa_remove(struct device *pdev, unsigned int ndev) |
| 297 | { | 296 | { |
| 298 | fmr2_remove(dev_get_drvdata(pdev)); | 297 | fmr2_remove(dev_get_drvdata(pdev)); |
| 299 | dev_set_drvdata(pdev, NULL); | 298 | dev_set_drvdata(pdev, NULL); |
| @@ -301,7 +300,7 @@ static int __devexit fmr2_isa_remove(struct device *pdev, unsigned int ndev) | |||
| 301 | return 0; | 300 | return 0; |
| 302 | } | 301 | } |
| 303 | 302 | ||
| 304 | static void __devexit fmr2_pnp_remove(struct pnp_dev *pdev) | 303 | static void fmr2_pnp_remove(struct pnp_dev *pdev) |
| 305 | { | 304 | { |
| 306 | fmr2_remove(pnp_get_drvdata(pdev)); | 305 | fmr2_remove(pnp_get_drvdata(pdev)); |
| 307 | pnp_set_drvdata(pdev, NULL); | 306 | pnp_set_drvdata(pdev, NULL); |
| @@ -309,7 +308,7 @@ static void __devexit fmr2_pnp_remove(struct pnp_dev *pdev) | |||
| 309 | 308 | ||
| 310 | struct isa_driver fmr2_isa_driver = { | 309 | struct isa_driver fmr2_isa_driver = { |
| 311 | .match = fmr2_isa_match, | 310 | .match = fmr2_isa_match, |
| 312 | .remove = __devexit_p(fmr2_isa_remove), | 311 | .remove = fmr2_isa_remove, |
| 313 | .driver = { | 312 | .driver = { |
| 314 | .name = "radio-sf16fmr2", | 313 | .name = "radio-sf16fmr2", |
| 315 | }, | 314 | }, |
| @@ -319,7 +318,7 @@ struct pnp_driver fmr2_pnp_driver = { | |||
| 319 | .name = "radio-sf16fmr2", | 318 | .name = "radio-sf16fmr2", |
| 320 | .id_table = fmr2_pnp_ids, | 319 | .id_table = fmr2_pnp_ids, |
| 321 | .probe = fmr2_pnp_probe, | 320 | .probe = fmr2_pnp_probe, |
| 322 | .remove = __devexit_p(fmr2_pnp_remove), | 321 | .remove = fmr2_pnp_remove, |
| 323 | }; | 322 | }; |
| 324 | 323 | ||
| 325 | static int __init fmr2_init(void) | 324 | static int __init fmr2_init(void) |
diff --git a/drivers/media/radio/radio-tea5764.c b/drivers/media/radio/radio-tea5764.c index 36aec575e0ec..1978516af67e 100644 --- a/drivers/media/radio/radio-tea5764.c +++ b/drivers/media/radio/radio-tea5764.c | |||
| @@ -493,8 +493,8 @@ static struct video_device tea5764_radio_template = { | |||
| 493 | }; | 493 | }; |
| 494 | 494 | ||
| 495 | /* I2C probe: check if the device exists and register with v4l if it is */ | 495 | /* I2C probe: check if the device exists and register with v4l if it is */ |
| 496 | static int __devinit tea5764_i2c_probe(struct i2c_client *client, | 496 | static int tea5764_i2c_probe(struct i2c_client *client, |
| 497 | const struct i2c_device_id *id) | 497 | const struct i2c_device_id *id) |
| 498 | { | 498 | { |
| 499 | struct tea5764_device *radio; | 499 | struct tea5764_device *radio; |
| 500 | struct tea5764_regs *r; | 500 | struct tea5764_regs *r; |
| @@ -552,7 +552,7 @@ errfr: | |||
| 552 | return ret; | 552 | return ret; |
| 553 | } | 553 | } |
| 554 | 554 | ||
| 555 | static int __devexit tea5764_i2c_remove(struct i2c_client *client) | 555 | static int tea5764_i2c_remove(struct i2c_client *client) |
| 556 | { | 556 | { |
| 557 | struct tea5764_device *radio = i2c_get_clientdata(client); | 557 | struct tea5764_device *radio = i2c_get_clientdata(client); |
| 558 | 558 | ||
| @@ -578,7 +578,7 @@ static struct i2c_driver tea5764_i2c_driver = { | |||
| 578 | .owner = THIS_MODULE, | 578 | .owner = THIS_MODULE, |
| 579 | }, | 579 | }, |
| 580 | .probe = tea5764_i2c_probe, | 580 | .probe = tea5764_i2c_probe, |
| 581 | .remove = __devexit_p(tea5764_i2c_remove), | 581 | .remove = tea5764_i2c_remove, |
| 582 | .id_table = tea5764_id, | 582 | .id_table = tea5764_id, |
| 583 | }; | 583 | }; |
| 584 | 584 | ||
diff --git a/drivers/media/radio/radio-timb.c b/drivers/media/radio/radio-timb.c index 5cf07779f4bb..b87effeb5dc6 100644 --- a/drivers/media/radio/radio-timb.c +++ b/drivers/media/radio/radio-timb.c | |||
| @@ -145,7 +145,7 @@ static const struct v4l2_file_operations timbradio_fops = { | |||
| 145 | .unlocked_ioctl = video_ioctl2, | 145 | .unlocked_ioctl = video_ioctl2, |
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | static int __devinit timbradio_probe(struct platform_device *pdev) | 148 | static int timbradio_probe(struct platform_device *pdev) |
| 149 | { | 149 | { |
| 150 | struct timb_radio_platform_data *pdata = pdev->dev.platform_data; | 150 | struct timb_radio_platform_data *pdata = pdev->dev.platform_data; |
| 151 | struct timbradio *tr; | 151 | struct timbradio *tr; |
| @@ -201,7 +201,7 @@ err: | |||
| 201 | return err; | 201 | return err; |
| 202 | } | 202 | } |
| 203 | 203 | ||
| 204 | static int __devexit timbradio_remove(struct platform_device *pdev) | 204 | static int timbradio_remove(struct platform_device *pdev) |
| 205 | { | 205 | { |
| 206 | struct timbradio *tr = platform_get_drvdata(pdev); | 206 | struct timbradio *tr = platform_get_drvdata(pdev); |
| 207 | 207 | ||
| @@ -219,7 +219,7 @@ static struct platform_driver timbradio_platform_driver = { | |||
| 219 | .owner = THIS_MODULE, | 219 | .owner = THIS_MODULE, |
| 220 | }, | 220 | }, |
| 221 | .probe = timbradio_probe, | 221 | .probe = timbradio_probe, |
| 222 | .remove = __devexit_p(timbradio_remove), | 222 | .remove = timbradio_remove, |
| 223 | }; | 223 | }; |
| 224 | 224 | ||
| 225 | module_platform_driver(timbradio_platform_driver); | 225 | module_platform_driver(timbradio_platform_driver); |
diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c index 9b0c9fa0beb8..c48be195bbad 100644 --- a/drivers/media/radio/radio-wl1273.c +++ b/drivers/media/radio/radio-wl1273.c | |||
| @@ -1990,7 +1990,7 @@ static int wl1273_fm_radio_remove(struct platform_device *pdev) | |||
| 1990 | return 0; | 1990 | return 0; |
| 1991 | } | 1991 | } |
| 1992 | 1992 | ||
| 1993 | static int __devinit wl1273_fm_radio_probe(struct platform_device *pdev) | 1993 | static int wl1273_fm_radio_probe(struct platform_device *pdev) |
| 1994 | { | 1994 | { |
| 1995 | struct wl1273_core **core = pdev->dev.platform_data; | 1995 | struct wl1273_core **core = pdev->dev.platform_data; |
| 1996 | struct wl1273_device *radio; | 1996 | struct wl1273_device *radio; |
| @@ -2145,7 +2145,7 @@ pdata_err: | |||
| 2145 | 2145 | ||
| 2146 | static struct platform_driver wl1273_fm_radio_driver = { | 2146 | static struct platform_driver wl1273_fm_radio_driver = { |
| 2147 | .probe = wl1273_fm_radio_probe, | 2147 | .probe = wl1273_fm_radio_probe, |
| 2148 | .remove = __devexit_p(wl1273_fm_radio_remove), | 2148 | .remove = wl1273_fm_radio_remove, |
| 2149 | .driver = { | 2149 | .driver = { |
| 2150 | .name = "wl1273_fm_radio", | 2150 | .name = "wl1273_fm_radio", |
| 2151 | .owner = THIS_MODULE, | 2151 | .owner = THIS_MODULE, |
diff --git a/drivers/media/radio/saa7706h.c b/drivers/media/radio/saa7706h.c index 54db36ccb9ee..06c06cc9ff25 100644 --- a/drivers/media/radio/saa7706h.c +++ b/drivers/media/radio/saa7706h.c | |||
| @@ -373,8 +373,8 @@ static const struct v4l2_subdev_ops saa7706h_ops = { | |||
| 373 | * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' | 373 | * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' |
| 374 | */ | 374 | */ |
| 375 | 375 | ||
| 376 | static int __devinit saa7706h_probe(struct i2c_client *client, | 376 | static int saa7706h_probe(struct i2c_client *client, |
| 377 | const struct i2c_device_id *id) | 377 | const struct i2c_device_id *id) |
| 378 | { | 378 | { |
| 379 | struct saa7706h_state *state; | 379 | struct saa7706h_state *state; |
| 380 | struct v4l2_subdev *sd; | 380 | struct v4l2_subdev *sd; |
| @@ -418,7 +418,7 @@ err: | |||
| 418 | return err; | 418 | return err; |
| 419 | } | 419 | } |
| 420 | 420 | ||
| 421 | static int __devexit saa7706h_remove(struct i2c_client *client) | 421 | static int saa7706h_remove(struct i2c_client *client) |
| 422 | { | 422 | { |
| 423 | struct v4l2_subdev *sd = i2c_get_clientdata(client); | 423 | struct v4l2_subdev *sd = i2c_get_clientdata(client); |
| 424 | 424 | ||
| @@ -441,7 +441,7 @@ static struct i2c_driver saa7706h_driver = { | |||
| 441 | .name = DRIVER_NAME, | 441 | .name = DRIVER_NAME, |
| 442 | }, | 442 | }, |
| 443 | .probe = saa7706h_probe, | 443 | .probe = saa7706h_probe, |
| 444 | .remove = __devexit_p(saa7706h_remove), | 444 | .remove = saa7706h_remove, |
| 445 | .id_table = saa7706h_id, | 445 | .id_table = saa7706h_id, |
| 446 | }; | 446 | }; |
| 447 | 447 | ||
diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c b/drivers/media/radio/si470x/radio-si470x-i2c.c index 4ef55ec8045e..e5fc9acd0c4f 100644 --- a/drivers/media/radio/si470x/radio-si470x-i2c.c +++ b/drivers/media/radio/si470x/radio-si470x-i2c.c | |||
| @@ -347,8 +347,8 @@ end: | |||
| 347 | /* | 347 | /* |
| 348 | * si470x_i2c_probe - probe for the device | 348 | * si470x_i2c_probe - probe for the device |
| 349 | */ | 349 | */ |
| 350 | static int __devinit si470x_i2c_probe(struct i2c_client *client, | 350 | static int si470x_i2c_probe(struct i2c_client *client, |
| 351 | const struct i2c_device_id *id) | 351 | const struct i2c_device_id *id) |
| 352 | { | 352 | { |
| 353 | struct si470x_device *radio; | 353 | struct si470x_device *radio; |
| 354 | int retval = 0; | 354 | int retval = 0; |
| @@ -451,7 +451,7 @@ err_initial: | |||
| 451 | /* | 451 | /* |
| 452 | * si470x_i2c_remove - remove the device | 452 | * si470x_i2c_remove - remove the device |
| 453 | */ | 453 | */ |
| 454 | static __devexit int si470x_i2c_remove(struct i2c_client *client) | 454 | static int si470x_i2c_remove(struct i2c_client *client) |
| 455 | { | 455 | { |
| 456 | struct si470x_device *radio = i2c_get_clientdata(client); | 456 | struct si470x_device *radio = i2c_get_clientdata(client); |
| 457 | 457 | ||
| @@ -514,7 +514,7 @@ static struct i2c_driver si470x_i2c_driver = { | |||
| 514 | #endif | 514 | #endif |
| 515 | }, | 515 | }, |
| 516 | .probe = si470x_i2c_probe, | 516 | .probe = si470x_i2c_probe, |
| 517 | .remove = __devexit_p(si470x_i2c_remove), | 517 | .remove = si470x_i2c_remove, |
| 518 | .id_table = si470x_i2c_id, | 518 | .id_table = si470x_i2c_id, |
| 519 | }; | 519 | }; |
| 520 | 520 | ||
diff --git a/drivers/media/radio/tef6862.c b/drivers/media/radio/tef6862.c index 06d47e5cce9f..b18c2dc268ba 100644 --- a/drivers/media/radio/tef6862.c +++ b/drivers/media/radio/tef6862.c | |||
| @@ -165,8 +165,8 @@ static const struct v4l2_subdev_ops tef6862_ops = { | |||
| 165 | * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' | 165 | * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' |
| 166 | */ | 166 | */ |
| 167 | 167 | ||
| 168 | static int __devinit tef6862_probe(struct i2c_client *client, | 168 | static int tef6862_probe(struct i2c_client *client, |
| 169 | const struct i2c_device_id *id) | 169 | const struct i2c_device_id *id) |
| 170 | { | 170 | { |
| 171 | struct tef6862_state *state; | 171 | struct tef6862_state *state; |
| 172 | struct v4l2_subdev *sd; | 172 | struct v4l2_subdev *sd; |
| @@ -189,7 +189,7 @@ static int __devinit tef6862_probe(struct i2c_client *client, | |||
| 189 | return 0; | 189 | return 0; |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | static int __devexit tef6862_remove(struct i2c_client *client) | 192 | static int tef6862_remove(struct i2c_client *client) |
| 193 | { | 193 | { |
| 194 | struct v4l2_subdev *sd = i2c_get_clientdata(client); | 194 | struct v4l2_subdev *sd = i2c_get_clientdata(client); |
| 195 | 195 | ||
| @@ -211,7 +211,7 @@ static struct i2c_driver tef6862_driver = { | |||
| 211 | .name = DRIVER_NAME, | 211 | .name = DRIVER_NAME, |
| 212 | }, | 212 | }, |
| 213 | .probe = tef6862_probe, | 213 | .probe = tef6862_probe, |
| 214 | .remove = __devexit_p(tef6862_remove), | 214 | .remove = tef6862_remove, |
| 215 | .id_table = tef6862_id, | 215 | .id_table = tef6862_id, |
| 216 | }; | 216 | }; |
| 217 | 217 | ||
diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c index 22231dd4f62b..cef04786b52f 100644 --- a/drivers/media/rc/ene_ir.c +++ b/drivers/media/rc/ene_ir.c | |||
| @@ -1172,7 +1172,7 @@ static struct pnp_driver ene_driver = { | |||
| 1172 | .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, | 1172 | .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, |
| 1173 | 1173 | ||
| 1174 | .probe = ene_probe, | 1174 | .probe = ene_probe, |
| 1175 | .remove = __devexit_p(ene_remove), | 1175 | .remove = ene_remove, |
| 1176 | #ifdef CONFIG_PM | 1176 | #ifdef CONFIG_PM |
| 1177 | .suspend = ene_suspend, | 1177 | .suspend = ene_suspend, |
| 1178 | .resume = ene_resume, | 1178 | .resume = ene_resume, |
diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c index 936c3f79b62c..1df410e13688 100644 --- a/drivers/media/rc/fintek-cir.c +++ b/drivers/media/rc/fintek-cir.c | |||
| @@ -590,7 +590,7 @@ failure: | |||
| 590 | return ret; | 590 | return ret; |
| 591 | } | 591 | } |
| 592 | 592 | ||
| 593 | static void __devexit fintek_remove(struct pnp_dev *pdev) | 593 | static void fintek_remove(struct pnp_dev *pdev) |
| 594 | { | 594 | { |
| 595 | struct fintek_dev *fintek = pnp_get_drvdata(pdev); | 595 | struct fintek_dev *fintek = pnp_get_drvdata(pdev); |
| 596 | unsigned long flags; | 596 | unsigned long flags; |
| @@ -678,7 +678,7 @@ static struct pnp_driver fintek_driver = { | |||
| 678 | .id_table = fintek_ids, | 678 | .id_table = fintek_ids, |
| 679 | .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, | 679 | .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, |
| 680 | .probe = fintek_probe, | 680 | .probe = fintek_probe, |
| 681 | .remove = __devexit_p(fintek_remove), | 681 | .remove = fintek_remove, |
| 682 | .suspend = fintek_suspend, | 682 | .suspend = fintek_suspend, |
| 683 | .resume = fintek_resume, | 683 | .resume = fintek_resume, |
| 684 | .shutdown = fintek_shutdown, | 684 | .shutdown = fintek_shutdown, |
diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c index ba1a1eb356cf..4f71a7d1f019 100644 --- a/drivers/media/rc/gpio-ir-recv.c +++ b/drivers/media/rc/gpio-ir-recv.c | |||
| @@ -58,7 +58,7 @@ err_get_value: | |||
| 58 | return IRQ_HANDLED; | 58 | return IRQ_HANDLED; |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | static int __devinit gpio_ir_recv_probe(struct platform_device *pdev) | 61 | static int gpio_ir_recv_probe(struct platform_device *pdev) |
| 62 | { | 62 | { |
| 63 | struct gpio_rc_dev *gpio_dev; | 63 | struct gpio_rc_dev *gpio_dev; |
| 64 | struct rc_dev *rcdev; | 64 | struct rc_dev *rcdev; |
| @@ -140,7 +140,7 @@ err_allocate_device: | |||
| 140 | return rc; | 140 | return rc; |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | static int __devexit gpio_ir_recv_remove(struct platform_device *pdev) | 143 | static int gpio_ir_recv_remove(struct platform_device *pdev) |
| 144 | { | 144 | { |
| 145 | struct gpio_rc_dev *gpio_dev = platform_get_drvdata(pdev); | 145 | struct gpio_rc_dev *gpio_dev = platform_get_drvdata(pdev); |
| 146 | 146 | ||
| @@ -188,7 +188,7 @@ static const struct dev_pm_ops gpio_ir_recv_pm_ops = { | |||
| 188 | 188 | ||
| 189 | static struct platform_driver gpio_ir_recv_driver = { | 189 | static struct platform_driver gpio_ir_recv_driver = { |
| 190 | .probe = gpio_ir_recv_probe, | 190 | .probe = gpio_ir_recv_probe, |
| 191 | .remove = __devexit_p(gpio_ir_recv_remove), | 191 | .remove = gpio_ir_recv_remove, |
| 192 | .driver = { | 192 | .driver = { |
| 193 | .name = GPIO_IR_DRIVER_NAME, | 193 | .name = GPIO_IR_DRIVER_NAME, |
| 194 | .owner = THIS_MODULE, | 194 | .owner = THIS_MODULE, |
diff --git a/drivers/media/rc/iguanair.c b/drivers/media/rc/iguanair.c index 5a9163da63c3..b99b096d8a8f 100644 --- a/drivers/media/rc/iguanair.c +++ b/drivers/media/rc/iguanair.c | |||
| @@ -425,8 +425,8 @@ static void iguanair_close(struct rc_dev *rdev) | |||
| 425 | mutex_unlock(&ir->lock); | 425 | mutex_unlock(&ir->lock); |
| 426 | } | 426 | } |
| 427 | 427 | ||
| 428 | static int __devinit iguanair_probe(struct usb_interface *intf, | 428 | static int iguanair_probe(struct usb_interface *intf, |
| 429 | const struct usb_device_id *id) | 429 | const struct usb_device_id *id) |
| 430 | { | 430 | { |
| 431 | struct usb_device *udev = interface_to_usbdev(intf); | 431 | struct usb_device *udev = interface_to_usbdev(intf); |
| 432 | struct iguanair *ir; | 432 | struct iguanair *ir; |
| @@ -538,7 +538,7 @@ out: | |||
| 538 | return ret; | 538 | return ret; |
| 539 | } | 539 | } |
| 540 | 540 | ||
| 541 | static void __devexit iguanair_disconnect(struct usb_interface *intf) | 541 | static void iguanair_disconnect(struct usb_interface *intf) |
| 542 | { | 542 | { |
| 543 | struct iguanair *ir = usb_get_intfdata(intf); | 543 | struct iguanair *ir = usb_get_intfdata(intf); |
| 544 | 544 | ||
| @@ -604,7 +604,7 @@ static const struct usb_device_id iguanair_table[] = { | |||
| 604 | static struct usb_driver iguanair_driver = { | 604 | static struct usb_driver iguanair_driver = { |
| 605 | .name = DRIVER_NAME, | 605 | .name = DRIVER_NAME, |
| 606 | .probe = iguanair_probe, | 606 | .probe = iguanair_probe, |
| 607 | .disconnect = __devexit_p(iguanair_disconnect), | 607 | .disconnect = iguanair_disconnect, |
| 608 | .suspend = iguanair_suspend, | 608 | .suspend = iguanair_suspend, |
| 609 | .resume = iguanair_resume, | 609 | .resume = iguanair_resume, |
| 610 | .reset_resume = iguanair_resume, | 610 | .reset_resume = iguanair_resume, |
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index 8f6a28921ed4..78d109b978dd 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c | |||
| @@ -255,7 +255,7 @@ static struct usb_device_id imon_usb_id_table[] = { | |||
| 255 | static struct usb_driver imon_driver = { | 255 | static struct usb_driver imon_driver = { |
| 256 | .name = MOD_NAME, | 256 | .name = MOD_NAME, |
| 257 | .probe = imon_probe, | 257 | .probe = imon_probe, |
| 258 | .disconnect = __devexit_p(imon_disconnect), | 258 | .disconnect = imon_disconnect, |
| 259 | .suspend = imon_suspend, | 259 | .suspend = imon_suspend, |
| 260 | .resume = imon_resume, | 260 | .resume = imon_resume, |
| 261 | .id_table = imon_usb_id_table, | 261 | .id_table = imon_usb_id_table, |
| @@ -2288,8 +2288,8 @@ static void imon_init_display(struct imon_context *ictx, | |||
| 2288 | /** | 2288 | /** |
| 2289 | * Callback function for USB core API: Probe | 2289 | * Callback function for USB core API: Probe |
| 2290 | */ | 2290 | */ |
| 2291 | static int __devinit imon_probe(struct usb_interface *interface, | 2291 | static int imon_probe(struct usb_interface *interface, |
| 2292 | const struct usb_device_id *id) | 2292 | const struct usb_device_id *id) |
| 2293 | { | 2293 | { |
| 2294 | struct usb_device *usbdev = NULL; | 2294 | struct usb_device *usbdev = NULL; |
| 2295 | struct usb_host_interface *iface_desc = NULL; | 2295 | struct usb_host_interface *iface_desc = NULL; |
| @@ -2372,7 +2372,7 @@ fail: | |||
| 2372 | /** | 2372 | /** |
| 2373 | * Callback function for USB core API: disconnect | 2373 | * Callback function for USB core API: disconnect |
| 2374 | */ | 2374 | */ |
| 2375 | static void __devexit imon_disconnect(struct usb_interface *interface) | 2375 | static void imon_disconnect(struct usb_interface *interface) |
| 2376 | { | 2376 | { |
| 2377 | struct imon_context *ictx; | 2377 | struct imon_context *ictx; |
| 2378 | struct device *dev; | 2378 | struct device *dev; |
diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c index 9e76c7b40af2..8ead492d03aa 100644 --- a/drivers/media/rc/ir-rx51.c +++ b/drivers/media/rc/ir-rx51.c | |||
| @@ -443,7 +443,7 @@ static int lirc_rx51_resume(struct platform_device *dev) | |||
| 443 | 443 | ||
| 444 | #endif /* CONFIG_PM */ | 444 | #endif /* CONFIG_PM */ |
| 445 | 445 | ||
| 446 | static int __devinit lirc_rx51_probe(struct platform_device *dev) | 446 | static int lirc_rx51_probe(struct platform_device *dev) |
| 447 | { | 447 | { |
| 448 | lirc_rx51_driver.features = LIRC_RX51_DRIVER_FEATURES; | 448 | lirc_rx51_driver.features = LIRC_RX51_DRIVER_FEATURES; |
| 449 | lirc_rx51.pdata = dev->dev.platform_data; | 449 | lirc_rx51.pdata = dev->dev.platform_data; |
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c index 5e5a7f2b8184..1b8669b6d042 100644 --- a/drivers/media/rc/ite-cir.c +++ b/drivers/media/rc/ite-cir.c | |||
| @@ -1620,7 +1620,7 @@ failure: | |||
| 1620 | return ret; | 1620 | return ret; |
| 1621 | } | 1621 | } |
| 1622 | 1622 | ||
| 1623 | static void __devexit ite_remove(struct pnp_dev *pdev) | 1623 | static void ite_remove(struct pnp_dev *pdev) |
| 1624 | { | 1624 | { |
| 1625 | struct ite_dev *dev = pnp_get_drvdata(pdev); | 1625 | struct ite_dev *dev = pnp_get_drvdata(pdev); |
| 1626 | unsigned long flags; | 1626 | unsigned long flags; |
| @@ -1702,7 +1702,7 @@ static struct pnp_driver ite_driver = { | |||
| 1702 | .name = ITE_DRIVER_NAME, | 1702 | .name = ITE_DRIVER_NAME, |
| 1703 | .id_table = ite_ids, | 1703 | .id_table = ite_ids, |
| 1704 | .probe = ite_probe, | 1704 | .probe = ite_probe, |
| 1705 | .remove = __devexit_p(ite_remove), | 1705 | .remove = ite_remove, |
| 1706 | .suspend = ite_suspend, | 1706 | .suspend = ite_suspend, |
| 1707 | .resume = ite_resume, | 1707 | .resume = ite_resume, |
| 1708 | .shutdown = ite_shutdown, | 1708 | .shutdown = ite_shutdown, |
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index b2146cd99fd8..9afb9331217d 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c | |||
| @@ -1229,8 +1229,8 @@ out: | |||
| 1229 | return NULL; | 1229 | return NULL; |
| 1230 | } | 1230 | } |
| 1231 | 1231 | ||
| 1232 | static int __devinit mceusb_dev_probe(struct usb_interface *intf, | 1232 | static int mceusb_dev_probe(struct usb_interface *intf, |
| 1233 | const struct usb_device_id *id) | 1233 | const struct usb_device_id *id) |
| 1234 | { | 1234 | { |
| 1235 | struct usb_device *dev = interface_to_usbdev(intf); | 1235 | struct usb_device *dev = interface_to_usbdev(intf); |
| 1236 | struct usb_host_interface *idesc; | 1236 | struct usb_host_interface *idesc; |
| @@ -1393,7 +1393,7 @@ mem_alloc_fail: | |||
| 1393 | } | 1393 | } |
| 1394 | 1394 | ||
| 1395 | 1395 | ||
| 1396 | static void __devexit mceusb_dev_disconnect(struct usb_interface *intf) | 1396 | static void mceusb_dev_disconnect(struct usb_interface *intf) |
| 1397 | { | 1397 | { |
| 1398 | struct usb_device *dev = interface_to_usbdev(intf); | 1398 | struct usb_device *dev = interface_to_usbdev(intf); |
| 1399 | struct mceusb_dev *ir = usb_get_intfdata(intf); | 1399 | struct mceusb_dev *ir = usb_get_intfdata(intf); |
| @@ -1432,7 +1432,7 @@ static int mceusb_dev_resume(struct usb_interface *intf) | |||
| 1432 | static struct usb_driver mceusb_dev_driver = { | 1432 | static struct usb_driver mceusb_dev_driver = { |
| 1433 | .name = DRIVER_NAME, | 1433 | .name = DRIVER_NAME, |
| 1434 | .probe = mceusb_dev_probe, | 1434 | .probe = mceusb_dev_probe, |
| 1435 | .disconnect = __devexit_p(mceusb_dev_disconnect), | 1435 | .disconnect = mceusb_dev_disconnect, |
| 1436 | .suspend = mceusb_dev_suspend, | 1436 | .suspend = mceusb_dev_suspend, |
| 1437 | .resume = mceusb_dev_resume, | 1437 | .resume = mceusb_dev_resume, |
| 1438 | .reset_resume = mceusb_dev_resume, | 1438 | .reset_resume = mceusb_dev_resume, |
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index e4ea89a11eed..b8aa9abb31ff 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c | |||
| @@ -1113,7 +1113,7 @@ failure: | |||
| 1113 | return ret; | 1113 | return ret; |
| 1114 | } | 1114 | } |
| 1115 | 1115 | ||
| 1116 | static void __devexit nvt_remove(struct pnp_dev *pdev) | 1116 | static void nvt_remove(struct pnp_dev *pdev) |
| 1117 | { | 1117 | { |
| 1118 | struct nvt_dev *nvt = pnp_get_drvdata(pdev); | 1118 | struct nvt_dev *nvt = pnp_get_drvdata(pdev); |
| 1119 | unsigned long flags; | 1119 | unsigned long flags; |
| @@ -1211,7 +1211,7 @@ static struct pnp_driver nvt_driver = { | |||
| 1211 | .id_table = nvt_ids, | 1211 | .id_table = nvt_ids, |
| 1212 | .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, | 1212 | .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, |
| 1213 | .probe = nvt_probe, | 1213 | .probe = nvt_probe, |
| 1214 | .remove = __devexit_p(nvt_remove), | 1214 | .remove = nvt_remove, |
| 1215 | .suspend = nvt_suspend, | 1215 | .suspend = nvt_suspend, |
| 1216 | .resume = nvt_resume, | 1216 | .resume = nvt_resume, |
| 1217 | .shutdown = nvt_shutdown, | 1217 | .shutdown = nvt_shutdown, |
diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index a8887aba9faf..1800326f93e6 100644 --- a/drivers/media/rc/redrat3.c +++ b/drivers/media/rc/redrat3.c | |||
| @@ -1102,8 +1102,8 @@ out: | |||
| 1102 | return NULL; | 1102 | return NULL; |
| 1103 | } | 1103 | } |
| 1104 | 1104 | ||
| 1105 | static int __devinit redrat3_dev_probe(struct usb_interface *intf, | 1105 | static int redrat3_dev_probe(struct usb_interface *intf, |
| 1106 | const struct usb_device_id *id) | 1106 | const struct usb_device_id *id) |
| 1107 | { | 1107 | { |
| 1108 | struct usb_device *udev = interface_to_usbdev(intf); | 1108 | struct usb_device *udev = interface_to_usbdev(intf); |
| 1109 | struct device *dev = &intf->dev; | 1109 | struct device *dev = &intf->dev; |
| @@ -1241,7 +1241,7 @@ no_endpoints: | |||
| 1241 | return retval; | 1241 | return retval; |
| 1242 | } | 1242 | } |
| 1243 | 1243 | ||
| 1244 | static void __devexit redrat3_dev_disconnect(struct usb_interface *intf) | 1244 | static void redrat3_dev_disconnect(struct usb_interface *intf) |
| 1245 | { | 1245 | { |
| 1246 | struct usb_device *udev = interface_to_usbdev(intf); | 1246 | struct usb_device *udev = interface_to_usbdev(intf); |
| 1247 | struct redrat3_dev *rr3 = usb_get_intfdata(intf); | 1247 | struct redrat3_dev *rr3 = usb_get_intfdata(intf); |
| @@ -1281,7 +1281,7 @@ static int redrat3_dev_resume(struct usb_interface *intf) | |||
| 1281 | static struct usb_driver redrat3_dev_driver = { | 1281 | static struct usb_driver redrat3_dev_driver = { |
| 1282 | .name = DRIVER_NAME, | 1282 | .name = DRIVER_NAME, |
| 1283 | .probe = redrat3_dev_probe, | 1283 | .probe = redrat3_dev_probe, |
| 1284 | .disconnect = __devexit_p(redrat3_dev_disconnect), | 1284 | .disconnect = redrat3_dev_disconnect, |
| 1285 | .suspend = redrat3_dev_suspend, | 1285 | .suspend = redrat3_dev_suspend, |
| 1286 | .resume = redrat3_dev_resume, | 1286 | .resume = redrat3_dev_resume, |
| 1287 | .reset_resume = redrat3_dev_resume, | 1287 | .reset_resume = redrat3_dev_resume, |
diff --git a/drivers/media/rc/streamzap.c b/drivers/media/rc/streamzap.c index c720f12f661e..d7b11e6a9982 100644 --- a/drivers/media/rc/streamzap.c +++ b/drivers/media/rc/streamzap.c | |||
| @@ -346,8 +346,8 @@ out: | |||
| 346 | * On any failure the return value is the ERROR | 346 | * On any failure the return value is the ERROR |
| 347 | * On success return 0 | 347 | * On success return 0 |
| 348 | */ | 348 | */ |
| 349 | static int __devinit streamzap_probe(struct usb_interface *intf, | 349 | static int streamzap_probe(struct usb_interface *intf, |
| 350 | const struct usb_device_id *id) | 350 | const struct usb_device_id *id) |
| 351 | { | 351 | { |
| 352 | struct usb_device *usbdev = interface_to_usbdev(intf); | 352 | struct usb_device *usbdev = interface_to_usbdev(intf); |
| 353 | struct usb_host_interface *iface_host; | 353 | struct usb_host_interface *iface_host; |
diff --git a/drivers/media/rc/ttusbir.c b/drivers/media/rc/ttusbir.c index f0921b5483eb..78be8a914225 100644 --- a/drivers/media/rc/ttusbir.c +++ b/drivers/media/rc/ttusbir.c | |||
| @@ -194,8 +194,8 @@ static void ttusbir_urb_complete(struct urb *urb) | |||
| 194 | dev_warn(tt->dev, "failed to resubmit urb: %d\n", rc); | 194 | dev_warn(tt->dev, "failed to resubmit urb: %d\n", rc); |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | static int __devinit ttusbir_probe(struct usb_interface *intf, | 197 | static int ttusbir_probe(struct usb_interface *intf, |
| 198 | const struct usb_device_id *id) | 198 | const struct usb_device_id *id) |
| 199 | { | 199 | { |
| 200 | struct ttusbir *tt; | 200 | struct ttusbir *tt; |
| 201 | struct usb_interface_descriptor *idesc; | 201 | struct usb_interface_descriptor *idesc; |
| @@ -367,7 +367,7 @@ out: | |||
| 367 | return ret; | 367 | return ret; |
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | static void __devexit ttusbir_disconnect(struct usb_interface *intf) | 370 | static void ttusbir_disconnect(struct usb_interface *intf) |
| 371 | { | 371 | { |
| 372 | struct ttusbir *tt = usb_get_intfdata(intf); | 372 | struct ttusbir *tt = usb_get_intfdata(intf); |
| 373 | struct usb_device *udev = tt->udev; | 373 | struct usb_device *udev = tt->udev; |
| @@ -435,7 +435,7 @@ static struct usb_driver ttusbir_driver = { | |||
| 435 | .suspend = ttusbir_suspend, | 435 | .suspend = ttusbir_suspend, |
| 436 | .resume = ttusbir_resume, | 436 | .resume = ttusbir_resume, |
| 437 | .reset_resume = ttusbir_resume, | 437 | .reset_resume = ttusbir_resume, |
| 438 | .disconnect = __devexit_p(ttusbir_disconnect) | 438 | .disconnect = ttusbir_disconnect, |
| 439 | }; | 439 | }; |
| 440 | 440 | ||
| 441 | module_usb_driver(ttusbir_driver); | 441 | module_usb_driver(ttusbir_driver); |
diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c index 7f3c476dde05..930c61499037 100644 --- a/drivers/media/rc/winbond-cir.c +++ b/drivers/media/rc/winbond-cir.c | |||
| @@ -1008,7 +1008,7 @@ wbcir_resume(struct pnp_dev *device) | |||
| 1008 | return 0; | 1008 | return 0; |
| 1009 | } | 1009 | } |
| 1010 | 1010 | ||
| 1011 | static int __devinit | 1011 | static int |
| 1012 | wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) | 1012 | wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) |
| 1013 | { | 1013 | { |
| 1014 | struct device *dev = &device->dev; | 1014 | struct device *dev = &device->dev; |
| @@ -1155,7 +1155,7 @@ exit: | |||
| 1155 | return err; | 1155 | return err; |
| 1156 | } | 1156 | } |
| 1157 | 1157 | ||
| 1158 | static void __devexit | 1158 | static void |
| 1159 | wbcir_remove(struct pnp_dev *device) | 1159 | wbcir_remove(struct pnp_dev *device) |
| 1160 | { | 1160 | { |
| 1161 | struct wbcir_data *data = pnp_get_drvdata(device); | 1161 | struct wbcir_data *data = pnp_get_drvdata(device); |
| @@ -1201,7 +1201,7 @@ static struct pnp_driver wbcir_driver = { | |||
| 1201 | .name = WBCIR_NAME, | 1201 | .name = WBCIR_NAME, |
| 1202 | .id_table = wbcir_ids, | 1202 | .id_table = wbcir_ids, |
| 1203 | .probe = wbcir_probe, | 1203 | .probe = wbcir_probe, |
| 1204 | .remove = __devexit_p(wbcir_remove), | 1204 | .remove = wbcir_remove, |
| 1205 | .suspend = wbcir_suspend, | 1205 | .suspend = wbcir_suspend, |
| 1206 | .resume = wbcir_resume, | 1206 | .resume = wbcir_resume, |
| 1207 | .shutdown = wbcir_shutdown | 1207 | .shutdown = wbcir_shutdown |
diff --git a/drivers/media/usb/gspca/spca506.c b/drivers/media/usb/gspca/spca506.c index bab01c86c315..bcd2c04c770e 100644 --- a/drivers/media/usb/gspca/spca506.c +++ b/drivers/media/usb/gspca/spca506.c | |||
| @@ -590,8 +590,7 @@ static const struct usb_device_id device_table[] = { | |||
| 590 | MODULE_DEVICE_TABLE(usb, device_table); | 590 | MODULE_DEVICE_TABLE(usb, device_table); |
| 591 | 591 | ||
| 592 | /* -- device connect -- */ | 592 | /* -- device connect -- */ |
| 593 | static int __devinit sd_probe(struct usb_interface *intf, | 593 | static int sd_probe(struct usb_interface *intf, const struct usb_device_id *id) |
| 594 | const struct usb_device_id *id) | ||
| 595 | { | 594 | { |
| 596 | return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd), | 595 | return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd), |
| 597 | THIS_MODULE); | 596 | THIS_MODULE); |
diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c index aac622200e99..de2c10289eec 100644 --- a/drivers/media/usb/siano/smsusb.c +++ b/drivers/media/usb/siano/smsusb.c | |||
| @@ -389,7 +389,7 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id) | |||
| 389 | return rc; | 389 | return rc; |
| 390 | } | 390 | } |
| 391 | 391 | ||
| 392 | static int __devinit smsusb_probe(struct usb_interface *intf, | 392 | static int smsusb_probe(struct usb_interface *intf, |
| 393 | const struct usb_device_id *id) | 393 | const struct usb_device_id *id) |
| 394 | { | 394 | { |
| 395 | struct usb_device *udev = interface_to_usbdev(intf); | 395 | struct usb_device *udev = interface_to_usbdev(intf); |
diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c index 5c36a57e6590..ad7f7448072e 100644 --- a/drivers/media/usb/usbvision/usbvision-video.c +++ b/drivers/media/usb/usbvision/usbvision-video.c | |||
| @@ -1363,7 +1363,7 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision) | |||
| 1363 | } | 1363 | } |
| 1364 | 1364 | ||
| 1365 | /* register video4linux devices */ | 1365 | /* register video4linux devices */ |
| 1366 | static int __devinit usbvision_register_video(struct usb_usbvision *usbvision) | 1366 | static int usbvision_register_video(struct usb_usbvision *usbvision) |
| 1367 | { | 1367 | { |
| 1368 | /* Video Device: */ | 1368 | /* Video Device: */ |
| 1369 | usbvision->vdev = usbvision_vdev_init(usbvision, | 1369 | usbvision->vdev = usbvision_vdev_init(usbvision, |
| @@ -1510,8 +1510,8 @@ static void usbvision_configure_video(struct usb_usbvision *usbvision) | |||
| 1510 | * if it looks like USBVISION video device | 1510 | * if it looks like USBVISION video device |
| 1511 | * | 1511 | * |
| 1512 | */ | 1512 | */ |
| 1513 | static int __devinit usbvision_probe(struct usb_interface *intf, | 1513 | static int usbvision_probe(struct usb_interface *intf, |
| 1514 | const struct usb_device_id *devid) | 1514 | const struct usb_device_id *devid) |
| 1515 | { | 1515 | { |
| 1516 | struct usb_device *dev = usb_get_dev(interface_to_usbdev(intf)); | 1516 | struct usb_device *dev = usb_get_dev(interface_to_usbdev(intf)); |
| 1517 | struct usb_interface *uif; | 1517 | struct usb_interface *uif; |
| @@ -1619,7 +1619,7 @@ static int __devinit usbvision_probe(struct usb_interface *intf, | |||
| 1619 | * with no ill consequences. | 1619 | * with no ill consequences. |
| 1620 | * | 1620 | * |
| 1621 | */ | 1621 | */ |
| 1622 | static void __devexit usbvision_disconnect(struct usb_interface *intf) | 1622 | static void usbvision_disconnect(struct usb_interface *intf) |
| 1623 | { | 1623 | { |
| 1624 | struct usb_usbvision *usbvision = to_usbvision(usb_get_intfdata(intf)); | 1624 | struct usb_usbvision *usbvision = to_usbvision(usb_get_intfdata(intf)); |
| 1625 | 1625 | ||
| @@ -1664,7 +1664,7 @@ static struct usb_driver usbvision_driver = { | |||
| 1664 | .name = "usbvision", | 1664 | .name = "usbvision", |
| 1665 | .id_table = usbvision_table, | 1665 | .id_table = usbvision_table, |
| 1666 | .probe = usbvision_probe, | 1666 | .probe = usbvision_probe, |
| 1667 | .disconnect = __devexit_p(usbvision_disconnect), | 1667 | .disconnect = usbvision_disconnect, |
| 1668 | }; | 1668 | }; |
| 1669 | 1669 | ||
| 1670 | /* | 1670 | /* |
diff --git a/drivers/memory/tegra20-mc.c b/drivers/memory/tegra20-mc.c index e6764bb41cb9..186f27d9e5f1 100644 --- a/drivers/memory/tegra20-mc.c +++ b/drivers/memory/tegra20-mc.c | |||
| @@ -177,7 +177,7 @@ static void tegra20_mc_decode(struct tegra20_mc *mc, int n) | |||
| 177 | "carveout" : "trustzone") : ""); | 177 | "carveout" : "trustzone") : ""); |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | static const struct of_device_id tegra20_mc_of_match[] __devinitconst = { | 180 | static const struct of_device_id tegra20_mc_of_match[] = { |
| 181 | { .compatible = "nvidia,tegra20-mc", }, | 181 | { .compatible = "nvidia,tegra20-mc", }, |
| 182 | {}, | 182 | {}, |
| 183 | }; | 183 | }; |
| @@ -198,7 +198,7 @@ static irqreturn_t tegra20_mc_isr(int irq, void *data) | |||
| 198 | return IRQ_HANDLED; | 198 | return IRQ_HANDLED; |
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | static int __devinit tegra20_mc_probe(struct platform_device *pdev) | 201 | static int tegra20_mc_probe(struct platform_device *pdev) |
| 202 | { | 202 | { |
| 203 | struct resource *irq; | 203 | struct resource *irq; |
| 204 | struct tegra20_mc *mc; | 204 | struct tegra20_mc *mc; |
diff --git a/drivers/memory/tegra30-mc.c b/drivers/memory/tegra30-mc.c index 802b9ea431fa..0b7ab9332a18 100644 --- a/drivers/memory/tegra30-mc.c +++ b/drivers/memory/tegra30-mc.c | |||
| @@ -295,7 +295,7 @@ static UNIVERSAL_DEV_PM_OPS(tegra30_mc_pm, | |||
| 295 | tegra30_mc_suspend, | 295 | tegra30_mc_suspend, |
| 296 | tegra30_mc_resume, NULL); | 296 | tegra30_mc_resume, NULL); |
| 297 | 297 | ||
| 298 | static const struct of_device_id tegra30_mc_of_match[] __devinitconst = { | 298 | static const struct of_device_id tegra30_mc_of_match[] = { |
| 299 | { .compatible = "nvidia,tegra30-mc", }, | 299 | { .compatible = "nvidia,tegra30-mc", }, |
| 300 | {}, | 300 | {}, |
| 301 | }; | 301 | }; |
| @@ -316,7 +316,7 @@ static irqreturn_t tegra30_mc_isr(int irq, void *data) | |||
| 316 | return IRQ_HANDLED; | 316 | return IRQ_HANDLED; |
| 317 | } | 317 | } |
| 318 | 318 | ||
| 319 | static int __devinit tegra30_mc_probe(struct platform_device *pdev) | 319 | static int tegra30_mc_probe(struct platform_device *pdev) |
| 320 | { | 320 | { |
| 321 | struct resource *irq; | 321 | struct resource *irq; |
| 322 | struct tegra30_mc *mc; | 322 | struct tegra30_mc *mc; |
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index d784c36707c0..c13cd9bc590b 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c | |||
| @@ -100,7 +100,7 @@ static int mptfc_slave_alloc(struct scsi_device *sdev); | |||
| 100 | static int mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt); | 100 | static int mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt); |
| 101 | static void mptfc_target_destroy(struct scsi_target *starget); | 101 | static void mptfc_target_destroy(struct scsi_target *starget); |
| 102 | static void mptfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout); | 102 | static void mptfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout); |
| 103 | static void __devexit mptfc_remove(struct pci_dev *pdev); | 103 | static void mptfc_remove(struct pci_dev *pdev); |
| 104 | static int mptfc_abort(struct scsi_cmnd *SCpnt); | 104 | static int mptfc_abort(struct scsi_cmnd *SCpnt); |
| 105 | static int mptfc_dev_reset(struct scsi_cmnd *SCpnt); | 105 | static int mptfc_dev_reset(struct scsi_cmnd *SCpnt); |
| 106 | static int mptfc_bus_reset(struct scsi_cmnd *SCpnt); | 106 | static int mptfc_bus_reset(struct scsi_cmnd *SCpnt); |
| @@ -1360,7 +1360,7 @@ static struct pci_driver mptfc_driver = { | |||
| 1360 | .name = "mptfc", | 1360 | .name = "mptfc", |
| 1361 | .id_table = mptfc_pci_table, | 1361 | .id_table = mptfc_pci_table, |
| 1362 | .probe = mptfc_probe, | 1362 | .probe = mptfc_probe, |
| 1363 | .remove = __devexit_p(mptfc_remove), | 1363 | .remove = mptfc_remove, |
| 1364 | .shutdown = mptscsih_shutdown, | 1364 | .shutdown = mptscsih_shutdown, |
| 1365 | #ifdef CONFIG_PM | 1365 | #ifdef CONFIG_PM |
| 1366 | .suspend = mptscsih_suspend, | 1366 | .suspend = mptscsih_suspend, |
| @@ -1496,8 +1496,7 @@ mptfc_init(void) | |||
| 1496 | * @pdev: Pointer to pci_dev structure | 1496 | * @pdev: Pointer to pci_dev structure |
| 1497 | * | 1497 | * |
| 1498 | */ | 1498 | */ |
| 1499 | static void __devexit | 1499 | static void mptfc_remove(struct pci_dev *pdev) |
| 1500 | mptfc_remove(struct pci_dev *pdev) | ||
| 1501 | { | 1500 | { |
| 1502 | MPT_ADAPTER *ioc = pci_get_drvdata(pdev); | 1501 | MPT_ADAPTER *ioc = pci_get_drvdata(pdev); |
| 1503 | struct mptfc_rport_info *p, *n; | 1502 | struct mptfc_rport_info *p, *n; |
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 551262e4b96e..fa43c391c8ed 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
| @@ -5332,7 +5332,7 @@ mptsas_shutdown(struct pci_dev *pdev) | |||
| 5332 | mptsas_cleanup_fw_event_q(ioc); | 5332 | mptsas_cleanup_fw_event_q(ioc); |
| 5333 | } | 5333 | } |
| 5334 | 5334 | ||
| 5335 | static void __devexit mptsas_remove(struct pci_dev *pdev) | 5335 | static void mptsas_remove(struct pci_dev *pdev) |
| 5336 | { | 5336 | { |
| 5337 | MPT_ADAPTER *ioc = pci_get_drvdata(pdev); | 5337 | MPT_ADAPTER *ioc = pci_get_drvdata(pdev); |
| 5338 | struct mptsas_portinfo *p, *n; | 5338 | struct mptsas_portinfo *p, *n; |
| @@ -5387,7 +5387,7 @@ static struct pci_driver mptsas_driver = { | |||
| 5387 | .name = "mptsas", | 5387 | .name = "mptsas", |
| 5388 | .id_table = mptsas_pci_table, | 5388 | .id_table = mptsas_pci_table, |
| 5389 | .probe = mptsas_probe, | 5389 | .probe = mptsas_probe, |
| 5390 | .remove = __devexit_p(mptsas_remove), | 5390 | .remove = mptsas_remove, |
| 5391 | .shutdown = mptsas_shutdown, | 5391 | .shutdown = mptsas_shutdown, |
| 5392 | #ifdef CONFIG_PM | 5392 | #ifdef CONFIG_PM |
| 5393 | .suspend = mptscsih_suspend, | 5393 | .suspend = mptscsih_suspend, |
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 8f61ba6aac23..c3aabde2dc4f 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c | |||
| @@ -1550,7 +1550,7 @@ static struct pci_driver mptspi_driver = { | |||
| 1550 | .name = "mptspi", | 1550 | .name = "mptspi", |
| 1551 | .id_table = mptspi_pci_table, | 1551 | .id_table = mptspi_pci_table, |
| 1552 | .probe = mptspi_probe, | 1552 | .probe = mptspi_probe, |
| 1553 | .remove = __devexit_p(mptscsih_remove), | 1553 | .remove = mptscsih_remove, |
| 1554 | .shutdown = mptscsih_shutdown, | 1554 | .shutdown = mptscsih_shutdown, |
| 1555 | #ifdef CONFIG_PM | 1555 | #ifdef CONFIG_PM |
| 1556 | .suspend = mptscsih_suspend, | 1556 | .suspend = mptscsih_suspend, |
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c index 7190d5239b4f..0f9f3e1a2b6b 100644 --- a/drivers/message/i2o/pci.c +++ b/drivers/message/i2o/pci.c | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | #define OSM_DESCRIPTION "I2O-subsystem" | 37 | #define OSM_DESCRIPTION "I2O-subsystem" |
| 38 | 38 | ||
| 39 | /* PCI device id table for all I2O controllers */ | 39 | /* PCI device id table for all I2O controllers */ |
| 40 | static struct pci_device_id __devinitdata i2o_pci_ids[] = { | 40 | static struct pci_device_id i2o_pci_ids[] = { |
| 41 | {PCI_DEVICE_CLASS(PCI_CLASS_INTELLIGENT_I2O << 8, 0xffff00)}, | 41 | {PCI_DEVICE_CLASS(PCI_CLASS_INTELLIGENT_I2O << 8, 0xffff00)}, |
| 42 | {PCI_DEVICE(PCI_VENDOR_ID_DPT, 0xa511)}, | 42 | {PCI_DEVICE(PCI_VENDOR_ID_DPT, 0xa511)}, |
| 43 | {.vendor = PCI_VENDOR_ID_INTEL,.device = 0x1962, | 43 | {.vendor = PCI_VENDOR_ID_INTEL,.device = 0x1962, |
| @@ -84,7 +84,7 @@ static void i2o_pci_free(struct i2o_controller *c) | |||
| 84 | * | 84 | * |
| 85 | * Returns 0 on success or negative error code on failure. | 85 | * Returns 0 on success or negative error code on failure. |
| 86 | */ | 86 | */ |
| 87 | static int __devinit i2o_pci_alloc(struct i2o_controller *c) | 87 | static int i2o_pci_alloc(struct i2o_controller *c) |
| 88 | { | 88 | { |
| 89 | struct pci_dev *pdev = c->pdev; | 89 | struct pci_dev *pdev = c->pdev; |
| 90 | struct device *dev = &pdev->dev; | 90 | struct device *dev = &pdev->dev; |
| @@ -315,8 +315,7 @@ static void i2o_pci_irq_disable(struct i2o_controller *c) | |||
| 315 | * | 315 | * |
| 316 | * Returns 0 on success or negative error code on failure. | 316 | * Returns 0 on success or negative error code on failure. |
| 317 | */ | 317 | */ |
| 318 | static int __devinit i2o_pci_probe(struct pci_dev *pdev, | 318 | static int i2o_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 319 | const struct pci_device_id *id) | ||
| 320 | { | 319 | { |
| 321 | struct i2o_controller *c; | 320 | struct i2o_controller *c; |
| 322 | int rc; | 321 | int rc; |
| @@ -453,7 +452,7 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev, | |||
| 453 | * Reset the I2O controller, disable interrupts and remove all allocated | 452 | * Reset the I2O controller, disable interrupts and remove all allocated |
| 454 | * resources. | 453 | * resources. |
| 455 | */ | 454 | */ |
| 456 | static void __devexit i2o_pci_remove(struct pci_dev *pdev) | 455 | static void i2o_pci_remove(struct pci_dev *pdev) |
| 457 | { | 456 | { |
| 458 | struct i2o_controller *c; | 457 | struct i2o_controller *c; |
| 459 | c = pci_get_drvdata(pdev); | 458 | c = pci_get_drvdata(pdev); |
| @@ -474,7 +473,7 @@ static struct pci_driver i2o_pci_driver = { | |||
| 474 | .name = "PCI_I2O", | 473 | .name = "PCI_I2O", |
| 475 | .id_table = i2o_pci_ids, | 474 | .id_table = i2o_pci_ids, |
| 476 | .probe = i2o_pci_probe, | 475 | .probe = i2o_pci_probe, |
| 477 | .remove = __devexit_p(i2o_pci_remove), | 476 | .remove = i2o_pci_remove, |
| 478 | }; | 477 | }; |
| 479 | 478 | ||
| 480 | /** | 479 | /** |
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 1c0abd4dfc43..47ad4e270877 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig | |||
| @@ -292,6 +292,7 @@ config TWL4030_CORE | |||
| 292 | bool "Texas Instruments TWL4030/TWL5030/TWL6030/TPS659x0 Support" | 292 | bool "Texas Instruments TWL4030/TWL5030/TWL6030/TPS659x0 Support" |
| 293 | depends on I2C=y && GENERIC_HARDIRQS | 293 | depends on I2C=y && GENERIC_HARDIRQS |
| 294 | select IRQ_DOMAIN | 294 | select IRQ_DOMAIN |
| 295 | select REGMAP_I2C | ||
| 295 | help | 296 | help |
| 296 | Say yes here if you have TWL4030 / TWL6030 family chip on your board. | 297 | Say yes here if you have TWL4030 / TWL6030 family chip on your board. |
| 297 | This core driver provides register access and IRQ handling | 298 | This core driver provides register access and IRQ handling |
diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c index abd5c80c7cf5..14714058f2d2 100644 --- a/drivers/mfd/max8997.c +++ b/drivers/mfd/max8997.c | |||
| @@ -50,7 +50,7 @@ static struct mfd_cell max8997_devs[] = { | |||
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | #ifdef CONFIG_OF | 52 | #ifdef CONFIG_OF |
| 53 | static struct of_device_id __devinitdata max8997_pmic_dt_match[] = { | 53 | static struct of_device_id max8997_pmic_dt_match[] = { |
| 54 | { .compatible = "maxim,max8997-pmic", .data = TYPE_MAX8997 }, | 54 | { .compatible = "maxim,max8997-pmic", .data = TYPE_MAX8997 }, |
| 55 | {}, | 55 | {}, |
| 56 | }; | 56 | }; |
diff --git a/drivers/mfd/retu-mfd.c b/drivers/mfd/retu-mfd.c index 7ff4a37ab0c0..3ba048655bf3 100644 --- a/drivers/mfd/retu-mfd.c +++ b/drivers/mfd/retu-mfd.c | |||
| @@ -171,8 +171,7 @@ static struct regmap_config retu_config = { | |||
| 171 | .val_bits = 16, | 171 | .val_bits = 16, |
| 172 | }; | 172 | }; |
| 173 | 173 | ||
| 174 | static int __devinit retu_probe(struct i2c_client *i2c, | 174 | static int retu_probe(struct i2c_client *i2c, const struct i2c_device_id *id) |
| 175 | const struct i2c_device_id *id) | ||
| 176 | { | 175 | { |
| 177 | struct retu_dev *rdev; | 176 | struct retu_dev *rdev; |
| 178 | int ret; | 177 | int ret; |
| @@ -225,7 +224,7 @@ static int __devinit retu_probe(struct i2c_client *i2c, | |||
| 225 | return 0; | 224 | return 0; |
| 226 | } | 225 | } |
| 227 | 226 | ||
| 228 | static int __devexit retu_remove(struct i2c_client *i2c) | 227 | static int retu_remove(struct i2c_client *i2c) |
| 229 | { | 228 | { |
| 230 | struct retu_dev *rdev = i2c_get_clientdata(i2c); | 229 | struct retu_dev *rdev = i2c_get_clientdata(i2c); |
| 231 | 230 | ||
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index 3a44efa29203..7a7b0bda4618 100644 --- a/drivers/mfd/rtsx_pcr.c +++ b/drivers/mfd/rtsx_pcr.c | |||
| @@ -998,8 +998,8 @@ static int rtsx_pci_init_chip(struct rtsx_pcr *pcr) | |||
| 998 | return 0; | 998 | return 0; |
| 999 | } | 999 | } |
| 1000 | 1000 | ||
| 1001 | static int __devinit rtsx_pci_probe(struct pci_dev *pcidev, | 1001 | static int rtsx_pci_probe(struct pci_dev *pcidev, |
| 1002 | const struct pci_device_id *id) | 1002 | const struct pci_device_id *id) |
| 1003 | { | 1003 | { |
| 1004 | struct rtsx_pcr *pcr; | 1004 | struct rtsx_pcr *pcr; |
| 1005 | struct pcr_handle *handle; | 1005 | struct pcr_handle *handle; |
| @@ -1123,7 +1123,7 @@ disable: | |||
| 1123 | return ret; | 1123 | return ret; |
| 1124 | } | 1124 | } |
| 1125 | 1125 | ||
| 1126 | static void __devexit rtsx_pci_remove(struct pci_dev *pcidev) | 1126 | static void rtsx_pci_remove(struct pci_dev *pcidev) |
| 1127 | { | 1127 | { |
| 1128 | struct pcr_handle *handle = pci_get_drvdata(pcidev); | 1128 | struct pcr_handle *handle = pci_get_drvdata(pcidev); |
| 1129 | struct rtsx_pcr *pcr = handle->pcr; | 1129 | struct rtsx_pcr *pcr = handle->pcr; |
| @@ -1241,7 +1241,7 @@ static struct pci_driver rtsx_pci_driver = { | |||
| 1241 | .name = DRV_NAME_RTSX_PCI, | 1241 | .name = DRV_NAME_RTSX_PCI, |
| 1242 | .id_table = rtsx_pci_ids, | 1242 | .id_table = rtsx_pci_ids, |
| 1243 | .probe = rtsx_pci_probe, | 1243 | .probe = rtsx_pci_probe, |
| 1244 | .remove = __devexit_p(rtsx_pci_remove), | 1244 | .remove = rtsx_pci_remove, |
| 1245 | .suspend = rtsx_pci_suspend, | 1245 | .suspend = rtsx_pci_suspend, |
| 1246 | .resume = rtsx_pci_resume, | 1246 | .resume = rtsx_pci_resume, |
| 1247 | }; | 1247 | }; |
diff --git a/drivers/mfd/sta2x11-mfd.c b/drivers/mfd/sta2x11-mfd.c index 1225dcbcfcfc..9bd33169a111 100644 --- a/drivers/mfd/sta2x11-mfd.c +++ b/drivers/mfd/sta2x11-mfd.c | |||
| @@ -510,19 +510,19 @@ enum mfd1_bar1_cells { | |||
| 510 | STA2X11_APB_SOC_REGS = 0, | 510 | STA2X11_APB_SOC_REGS = 0, |
| 511 | }; | 511 | }; |
| 512 | 512 | ||
| 513 | static const __devinitconst struct resource vic_resources[] = { | 513 | static const struct resource vic_resources[] = { |
| 514 | CELL_4K(STA2X11_MFD_VIC_NAME, STA2X11_VIC), | 514 | CELL_4K(STA2X11_MFD_VIC_NAME, STA2X11_VIC), |
| 515 | }; | 515 | }; |
| 516 | 516 | ||
| 517 | static const __devinitconst struct resource apb_soc_regs_resources[] = { | 517 | static const struct resource apb_soc_regs_resources[] = { |
| 518 | CELL_4K(STA2X11_MFD_APB_SOC_REGS_NAME, STA2X11_APB_SOC_REGS), | 518 | CELL_4K(STA2X11_MFD_APB_SOC_REGS_NAME, STA2X11_APB_SOC_REGS), |
| 519 | }; | 519 | }; |
| 520 | 520 | ||
| 521 | static __devinitdata struct mfd_cell sta2x11_mfd1_bar0[] = { | 521 | static struct mfd_cell sta2x11_mfd1_bar0[] = { |
| 522 | DEV(STA2X11_MFD_VIC_NAME, vic_resources), | 522 | DEV(STA2X11_MFD_VIC_NAME, vic_resources), |
| 523 | }; | 523 | }; |
| 524 | 524 | ||
| 525 | static __devinitdata struct mfd_cell sta2x11_mfd1_bar1[] = { | 525 | static struct mfd_cell sta2x11_mfd1_bar1[] = { |
| 526 | DEV(STA2X11_MFD_APB_SOC_REGS_NAME, apb_soc_regs_resources), | 526 | DEV(STA2X11_MFD_APB_SOC_REGS_NAME, apb_soc_regs_resources), |
| 527 | }; | 527 | }; |
| 528 | 528 | ||
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c index 5e8e6927cfcd..4b11202061be 100644 --- a/drivers/mfd/stmpe.c +++ b/drivers/mfd/stmpe.c | |||
| @@ -892,8 +892,7 @@ static struct irq_domain_ops stmpe_irq_ops = { | |||
| 892 | .xlate = irq_domain_xlate_twocell, | 892 | .xlate = irq_domain_xlate_twocell, |
| 893 | }; | 893 | }; |
| 894 | 894 | ||
| 895 | static int __devinit stmpe_irq_init(struct stmpe *stmpe, | 895 | static int stmpe_irq_init(struct stmpe *stmpe, struct device_node *np) |
| 896 | struct device_node *np) | ||
| 897 | { | 896 | { |
| 898 | int base = 0; | 897 | int base = 0; |
| 899 | int num_irqs = stmpe->variant->num_irqs; | 898 | int num_irqs = stmpe->variant->num_irqs; |
| @@ -911,7 +910,7 @@ static int __devinit stmpe_irq_init(struct stmpe *stmpe, | |||
| 911 | return 0; | 910 | return 0; |
| 912 | } | 911 | } |
| 913 | 912 | ||
| 914 | static int __devinit stmpe_chip_init(struct stmpe *stmpe) | 913 | static int stmpe_chip_init(struct stmpe *stmpe) |
| 915 | { | 914 | { |
| 916 | unsigned int irq_trigger = stmpe->pdata->irq_trigger; | 915 | unsigned int irq_trigger = stmpe->pdata->irq_trigger; |
| 917 | int autosleep_timeout = stmpe->pdata->autosleep_timeout; | 916 | int autosleep_timeout = stmpe->pdata->autosleep_timeout; |
| @@ -970,14 +969,13 @@ static int __devinit stmpe_chip_init(struct stmpe *stmpe) | |||
| 970 | return stmpe_reg_write(stmpe, stmpe->regs[STMPE_IDX_ICR_LSB], icr); | 969 | return stmpe_reg_write(stmpe, stmpe->regs[STMPE_IDX_ICR_LSB], icr); |
| 971 | } | 970 | } |
| 972 | 971 | ||
| 973 | static int __devinit stmpe_add_device(struct stmpe *stmpe, | 972 | static int stmpe_add_device(struct stmpe *stmpe, struct mfd_cell *cell) |
| 974 | struct mfd_cell *cell) | ||
| 975 | { | 973 | { |
| 976 | return mfd_add_devices(stmpe->dev, stmpe->pdata->id, cell, 1, | 974 | return mfd_add_devices(stmpe->dev, stmpe->pdata->id, cell, 1, |
| 977 | NULL, stmpe->irq_base, stmpe->domain); | 975 | NULL, stmpe->irq_base, stmpe->domain); |
| 978 | } | 976 | } |
| 979 | 977 | ||
| 980 | static int __devinit stmpe_devices_init(struct stmpe *stmpe) | 978 | static int stmpe_devices_init(struct stmpe *stmpe) |
| 981 | { | 979 | { |
| 982 | struct stmpe_variant_info *variant = stmpe->variant; | 980 | struct stmpe_variant_info *variant = stmpe->variant; |
| 983 | unsigned int platform_blocks = stmpe->pdata->blocks; | 981 | unsigned int platform_blocks = stmpe->pdata->blocks; |
| @@ -1013,8 +1011,7 @@ static int __devinit stmpe_devices_init(struct stmpe *stmpe) | |||
| 1013 | return ret; | 1011 | return ret; |
| 1014 | } | 1012 | } |
| 1015 | 1013 | ||
| 1016 | void __devinit stmpe_of_probe(struct stmpe_platform_data *pdata, | 1014 | void stmpe_of_probe(struct stmpe_platform_data *pdata, struct device_node *np) |
| 1017 | struct device_node *np) | ||
| 1018 | { | 1015 | { |
| 1019 | struct device_node *child; | 1016 | struct device_node *child; |
| 1020 | 1017 | ||
| @@ -1044,7 +1041,7 @@ void __devinit stmpe_of_probe(struct stmpe_platform_data *pdata, | |||
| 1044 | } | 1041 | } |
| 1045 | 1042 | ||
| 1046 | /* Called from client specific probe routines */ | 1043 | /* Called from client specific probe routines */ |
| 1047 | int __devinit stmpe_probe(struct stmpe_client_info *ci, int partnum) | 1044 | int stmpe_probe(struct stmpe_client_info *ci, int partnum) |
| 1048 | { | 1045 | { |
| 1049 | struct stmpe_platform_data *pdata = dev_get_platdata(ci->dev); | 1046 | struct stmpe_platform_data *pdata = dev_get_platdata(ci->dev); |
| 1050 | struct device_node *np = ci->dev->of_node; | 1047 | struct device_node *np = ci->dev->of_node; |
diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c index 8ca3bf023fb2..e9f3fb510b44 100644 --- a/drivers/mfd/ti_am335x_tscadc.c +++ b/drivers/mfd/ti_am335x_tscadc.c | |||
| @@ -58,7 +58,7 @@ static void tscadc_idle_config(struct ti_tscadc_dev *config) | |||
| 58 | tscadc_writel(config, REG_IDLECONFIG, idleconfig); | 58 | tscadc_writel(config, REG_IDLECONFIG, idleconfig); |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | static int __devinit ti_tscadc_probe(struct platform_device *pdev) | 61 | static int ti_tscadc_probe(struct platform_device *pdev) |
| 62 | { | 62 | { |
| 63 | struct ti_tscadc_dev *tscadc; | 63 | struct ti_tscadc_dev *tscadc; |
| 64 | struct resource *res; | 64 | struct resource *res; |
| @@ -202,7 +202,7 @@ ret: | |||
| 202 | return err; | 202 | return err; |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | static int __devexit ti_tscadc_remove(struct platform_device *pdev) | 205 | static int ti_tscadc_remove(struct platform_device *pdev) |
| 206 | { | 206 | { |
| 207 | struct ti_tscadc_dev *tscadc = platform_get_drvdata(pdev); | 207 | struct ti_tscadc_dev *tscadc = platform_get_drvdata(pdev); |
| 208 | 208 | ||
| @@ -263,7 +263,7 @@ static struct platform_driver ti_tscadc_driver = { | |||
| 263 | .pm = TSCADC_PM_OPS, | 263 | .pm = TSCADC_PM_OPS, |
| 264 | }, | 264 | }, |
| 265 | .probe = ti_tscadc_probe, | 265 | .probe = ti_tscadc_probe, |
| 266 | .remove = __devexit_p(ti_tscadc_remove), | 266 | .remove = ti_tscadc_remove, |
| 267 | 267 | ||
| 268 | }; | 268 | }; |
| 269 | 269 | ||
diff --git a/drivers/mfd/tps80031.c b/drivers/mfd/tps80031.c index 10b51f7dfff3..c90a2c450f51 100644 --- a/drivers/mfd/tps80031.c +++ b/drivers/mfd/tps80031.c | |||
| @@ -269,8 +269,7 @@ static int tps80031_init_ext_control(struct tps80031 *tps80031, | |||
| 269 | return ret; | 269 | return ret; |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | static int __devinit tps80031_irq_init(struct tps80031 *tps80031, int irq, | 272 | static int tps80031_irq_init(struct tps80031 *tps80031, int irq, int irq_base) |
| 273 | int irq_base) | ||
| 274 | { | 273 | { |
| 275 | struct device *dev = tps80031->dev; | 274 | struct device *dev = tps80031->dev; |
| 276 | int i, ret; | 275 | int i, ret; |
| @@ -416,8 +415,8 @@ static const struct regmap_config tps80031_regmap_configs[] = { | |||
| 416 | }, | 415 | }, |
| 417 | }; | 416 | }; |
| 418 | 417 | ||
| 419 | static int __devinit tps80031_probe(struct i2c_client *client, | 418 | static int tps80031_probe(struct i2c_client *client, |
| 420 | const struct i2c_device_id *id) | 419 | const struct i2c_device_id *id) |
| 421 | { | 420 | { |
| 422 | struct tps80031_platform_data *pdata = client->dev.platform_data; | 421 | struct tps80031_platform_data *pdata = client->dev.platform_data; |
| 423 | struct tps80031 *tps80031; | 422 | struct tps80031 *tps80031; |
| @@ -519,7 +518,7 @@ fail_client_reg: | |||
| 519 | return ret; | 518 | return ret; |
| 520 | } | 519 | } |
| 521 | 520 | ||
| 522 | static int __devexit tps80031_remove(struct i2c_client *client) | 521 | static int tps80031_remove(struct i2c_client *client) |
| 523 | { | 522 | { |
| 524 | struct tps80031 *tps80031 = i2c_get_clientdata(client); | 523 | struct tps80031 *tps80031 = i2c_get_clientdata(client); |
| 525 | int i; | 524 | int i; |
| @@ -553,7 +552,7 @@ static struct i2c_driver tps80031_driver = { | |||
| 553 | .owner = THIS_MODULE, | 552 | .owner = THIS_MODULE, |
| 554 | }, | 553 | }, |
| 555 | .probe = tps80031_probe, | 554 | .probe = tps80031_probe, |
| 556 | .remove = __devexit_p(tps80031_remove), | 555 | .remove = tps80031_remove, |
| 557 | .id_table = tps80031_id_table, | 556 | .id_table = tps80031_id_table, |
| 558 | }; | 557 | }; |
| 559 | 558 | ||
diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c index 583be76e36a8..f361bf38a0aa 100644 --- a/drivers/mfd/twl6040.c +++ b/drivers/mfd/twl6040.c | |||
| @@ -517,8 +517,8 @@ static struct regmap_irq_chip twl6040_irq_chip = { | |||
| 517 | .mask_base = TWL6040_REG_INTMR, | 517 | .mask_base = TWL6040_REG_INTMR, |
| 518 | }; | 518 | }; |
| 519 | 519 | ||
| 520 | static int __devinit twl6040_probe(struct i2c_client *client, | 520 | static int twl6040_probe(struct i2c_client *client, |
| 521 | const struct i2c_device_id *id) | 521 | const struct i2c_device_id *id) |
| 522 | { | 522 | { |
| 523 | struct twl6040_platform_data *pdata = client->dev.platform_data; | 523 | struct twl6040_platform_data *pdata = client->dev.platform_data; |
| 524 | struct device_node *node = client->dev.of_node; | 524 | struct device_node *node = client->dev.of_node; |
| @@ -699,7 +699,7 @@ err: | |||
| 699 | return ret; | 699 | return ret; |
| 700 | } | 700 | } |
| 701 | 701 | ||
| 702 | static int __devexit twl6040_remove(struct i2c_client *client) | 702 | static int twl6040_remove(struct i2c_client *client) |
| 703 | { | 703 | { |
| 704 | struct twl6040 *twl6040 = i2c_get_clientdata(client); | 704 | struct twl6040 *twl6040 = i2c_get_clientdata(client); |
| 705 | 705 | ||
| @@ -735,7 +735,7 @@ static struct i2c_driver twl6040_driver = { | |||
| 735 | .owner = THIS_MODULE, | 735 | .owner = THIS_MODULE, |
| 736 | }, | 736 | }, |
| 737 | .probe = twl6040_probe, | 737 | .probe = twl6040_probe, |
| 738 | .remove = __devexit_p(twl6040_remove), | 738 | .remove = twl6040_remove, |
| 739 | .id_table = twl6040_i2c_id, | 739 | .id_table = twl6040_i2c_id, |
| 740 | }; | 740 | }; |
| 741 | 741 | ||
diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c index 733c06bd2d17..e5d8f63b252a 100644 --- a/drivers/mfd/vexpress-sysreg.c +++ b/drivers/mfd/vexpress-sysreg.c | |||
| @@ -414,7 +414,7 @@ static ssize_t vexpress_sysreg_sys_id_show(struct device *dev, | |||
| 414 | 414 | ||
| 415 | DEVICE_ATTR(sys_id, S_IRUGO, vexpress_sysreg_sys_id_show, NULL); | 415 | DEVICE_ATTR(sys_id, S_IRUGO, vexpress_sysreg_sys_id_show, NULL); |
| 416 | 416 | ||
| 417 | static int __devinit vexpress_sysreg_probe(struct platform_device *pdev) | 417 | static int vexpress_sysreg_probe(struct platform_device *pdev) |
| 418 | { | 418 | { |
| 419 | int err; | 419 | int err; |
| 420 | struct resource *res = platform_get_resource(pdev, | 420 | struct resource *res = platform_get_resource(pdev, |
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c index 158da5a81a66..3c09cbb70b1d 100644 --- a/drivers/misc/atmel-ssc.c +++ b/drivers/misc/atmel-ssc.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
| 20 | 20 | ||
| 21 | #include <linux/of.h> | 21 | #include <linux/of.h> |
| 22 | #include <linux/pinctrl/consumer.h> | ||
| 22 | 23 | ||
| 23 | /* Serialize access to ssc_list and user count */ | 24 | /* Serialize access to ssc_list and user count */ |
| 24 | static DEFINE_SPINLOCK(user_lock); | 25 | static DEFINE_SPINLOCK(user_lock); |
| @@ -131,6 +132,13 @@ static int ssc_probe(struct platform_device *pdev) | |||
| 131 | struct resource *regs; | 132 | struct resource *regs; |
| 132 | struct ssc_device *ssc; | 133 | struct ssc_device *ssc; |
| 133 | const struct atmel_ssc_platform_data *plat_dat; | 134 | const struct atmel_ssc_platform_data *plat_dat; |
| 135 | struct pinctrl *pinctrl; | ||
| 136 | |||
| 137 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | ||
| 138 | if (IS_ERR(pinctrl)) { | ||
| 139 | dev_err(&pdev->dev, "Failed to request pinctrl\n"); | ||
| 140 | return PTR_ERR(pinctrl); | ||
| 141 | } | ||
| 134 | 142 | ||
| 135 | ssc = devm_kzalloc(&pdev->dev, sizeof(struct ssc_device), GFP_KERNEL); | 143 | ssc = devm_kzalloc(&pdev->dev, sizeof(struct ssc_device), GFP_KERNEL); |
| 136 | if (!ssc) { | 144 | if (!ssc) { |
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c index 18794aea6062..e40ffd9502d1 100644 --- a/drivers/misc/mei/amthif.c +++ b/drivers/misc/mei/amthif.c | |||
| @@ -187,13 +187,13 @@ int mei_amthif_read(struct mei_device *dev, struct file *file, | |||
| 187 | wait_ret = wait_event_interruptible(dev->iamthif_cl.wait, | 187 | wait_ret = wait_event_interruptible(dev->iamthif_cl.wait, |
| 188 | (cb = mei_amthif_find_read_list_entry(dev, file))); | 188 | (cb = mei_amthif_find_read_list_entry(dev, file))); |
| 189 | 189 | ||
| 190 | /* Locking again the Mutex */ | ||
| 191 | mutex_lock(&dev->device_lock); | ||
| 192 | |||
| 190 | if (wait_ret) | 193 | if (wait_ret) |
| 191 | return -ERESTARTSYS; | 194 | return -ERESTARTSYS; |
| 192 | 195 | ||
| 193 | dev_dbg(&dev->pdev->dev, "woke up from sleep\n"); | 196 | dev_dbg(&dev->pdev->dev, "woke up from sleep\n"); |
| 194 | |||
| 195 | /* Locking again the Mutex */ | ||
| 196 | mutex_lock(&dev->device_lock); | ||
| 197 | } | 197 | } |
| 198 | 198 | ||
| 199 | 199 | ||
diff --git a/drivers/mmc/host/dw_mmc-pci.c b/drivers/mmc/host/dw_mmc-pci.c index 8ee0f74f9374..083fcd29c9c6 100644 --- a/drivers/mmc/host/dw_mmc-pci.c +++ b/drivers/mmc/host/dw_mmc-pci.c | |||
| @@ -134,7 +134,7 @@ static struct pci_driver dw_mci_pci_driver = { | |||
| 134 | .name = "dw_mmc_pci", | 134 | .name = "dw_mmc_pci", |
| 135 | .id_table = dw_mci_pci_id, | 135 | .id_table = dw_mci_pci_id, |
| 136 | .probe = dw_mci_pci_probe, | 136 | .probe = dw_mci_pci_probe, |
| 137 | .remove = __devexit_p(dw_mci_pci_remove), | 137 | .remove = dw_mci_pci_remove, |
| 138 | .driver = { | 138 | .driver = { |
| 139 | .pm = &dw_mci_pci_pmops | 139 | .pm = &dw_mci_pci_pmops |
| 140 | }, | 140 | }, |
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c index 222036c9e053..5e1fb1d2c422 100644 --- a/drivers/mmc/host/dw_mmc-pltfm.c +++ b/drivers/mmc/host/dw_mmc-pltfm.c | |||
| @@ -120,7 +120,7 @@ MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match); | |||
| 120 | 120 | ||
| 121 | static struct platform_driver dw_mci_pltfm_driver = { | 121 | static struct platform_driver dw_mci_pltfm_driver = { |
| 122 | .probe = dw_mci_pltfm_probe, | 122 | .probe = dw_mci_pltfm_probe, |
| 123 | .remove = __devexit_p(dw_mci_pltfm_remove), | 123 | .remove = dw_mci_pltfm_remove, |
| 124 | .driver = { | 124 | .driver = { |
| 125 | .name = "dw_mmc", | 125 | .name = "dw_mmc", |
| 126 | .of_match_table = of_match_ptr(dw_mci_pltfm_match), | 126 | .of_match_table = of_match_ptr(dw_mci_pltfm_match), |
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index 12b0a78497f6..2592dddbd965 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c | |||
| @@ -111,7 +111,7 @@ static const struct sdhci_acpi_slot *sdhci_acpi_get_slot(const char *hid) | |||
| 111 | return NULL; | 111 | return NULL; |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | static int __devinit sdhci_acpi_probe(struct platform_device *pdev) | 114 | static int sdhci_acpi_probe(struct platform_device *pdev) |
| 115 | { | 115 | { |
| 116 | struct device *dev = &pdev->dev; | 116 | struct device *dev = &pdev->dev; |
| 117 | acpi_handle handle = ACPI_HANDLE(dev); | 117 | acpi_handle handle = ACPI_HANDLE(dev); |
| @@ -214,7 +214,7 @@ err_free: | |||
| 214 | return err; | 214 | return err; |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | static int __devexit sdhci_acpi_remove(struct platform_device *pdev) | 217 | static int sdhci_acpi_remove(struct platform_device *pdev) |
| 218 | { | 218 | { |
| 219 | struct sdhci_acpi_host *c = platform_get_drvdata(pdev); | 219 | struct sdhci_acpi_host *c = platform_get_drvdata(pdev); |
| 220 | struct device *dev = &pdev->dev; | 220 | struct device *dev = &pdev->dev; |
| @@ -302,7 +302,7 @@ static struct platform_driver sdhci_acpi_driver = { | |||
| 302 | .pm = &sdhci_acpi_pm_ops, | 302 | .pm = &sdhci_acpi_pm_ops, |
| 303 | }, | 303 | }, |
| 304 | .probe = sdhci_acpi_probe, | 304 | .probe = sdhci_acpi_probe, |
| 305 | .remove = __devexit_p(sdhci_acpi_remove), | 305 | .remove = sdhci_acpi_remove, |
| 306 | }; | 306 | }; |
| 307 | 307 | ||
| 308 | module_platform_driver(sdhci_acpi_driver); | 308 | module_platform_driver(sdhci_acpi_driver); |
diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c index 5ba4605e4f80..154f0e8e931c 100644 --- a/drivers/mmc/host/wmt-sdmmc.c +++ b/drivers/mmc/host/wmt-sdmmc.c | |||
| @@ -766,7 +766,7 @@ static struct of_device_id wmt_mci_dt_ids[] = { | |||
| 766 | { /* Sentinel */ }, | 766 | { /* Sentinel */ }, |
| 767 | }; | 767 | }; |
| 768 | 768 | ||
| 769 | static int __devinit wmt_mci_probe(struct platform_device *pdev) | 769 | static int wmt_mci_probe(struct platform_device *pdev) |
| 770 | { | 770 | { |
| 771 | struct mmc_host *mmc; | 771 | struct mmc_host *mmc; |
| 772 | struct wmt_mci_priv *priv; | 772 | struct wmt_mci_priv *priv; |
| @@ -892,7 +892,7 @@ fail1: | |||
| 892 | return ret; | 892 | return ret; |
| 893 | } | 893 | } |
| 894 | 894 | ||
| 895 | static int __devexit wmt_mci_remove(struct platform_device *pdev) | 895 | static int wmt_mci_remove(struct platform_device *pdev) |
| 896 | { | 896 | { |
| 897 | struct mmc_host *mmc; | 897 | struct mmc_host *mmc; |
| 898 | struct wmt_mci_priv *priv; | 898 | struct wmt_mci_priv *priv; |
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index ea7ea7b595d8..945c9f762349 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c | |||
| @@ -618,9 +618,8 @@ static char *otp_setup(struct mtd_info *device, char revision) | |||
| 618 | /* | 618 | /* |
| 619 | * Register DataFlash device with MTD subsystem. | 619 | * Register DataFlash device with MTD subsystem. |
| 620 | */ | 620 | */ |
| 621 | static int | 621 | static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages, |
| 622 | add_dataflash_otp(struct spi_device *spi, char *name, | 622 | int pagesize, int pageoffset, char revision) |
| 623 | int nr_pages, int pagesize, int pageoffset, char revision) | ||
| 624 | { | 623 | { |
| 625 | struct dataflash *priv; | 624 | struct dataflash *priv; |
| 626 | struct mtd_info *device; | 625 | struct mtd_info *device; |
| @@ -679,9 +678,8 @@ add_dataflash_otp(struct spi_device *spi, char *name, | |||
| 679 | return err; | 678 | return err; |
| 680 | } | 679 | } |
| 681 | 680 | ||
| 682 | static inline int | 681 | static inline int add_dataflash(struct spi_device *spi, char *name, |
| 683 | add_dataflash(struct spi_device *spi, char *name, | 682 | int nr_pages, int pagesize, int pageoffset) |
| 684 | int nr_pages, int pagesize, int pageoffset) | ||
| 685 | { | 683 | { |
| 686 | return add_dataflash_otp(spi, name, nr_pages, pagesize, | 684 | return add_dataflash_otp(spi, name, nr_pages, pagesize, |
| 687 | pageoffset, 0); | 685 | pageoffset, 0); |
diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c index 2d2c2a5d4d2a..2aabd96bf0ff 100644 --- a/drivers/mtd/devices/spear_smi.c +++ b/drivers/mtd/devices/spear_smi.c | |||
| @@ -757,7 +757,7 @@ err_probe: | |||
| 757 | 757 | ||
| 758 | #ifdef CONFIG_OF | 758 | #ifdef CONFIG_OF |
| 759 | static int spear_smi_probe_config_dt(struct platform_device *pdev, | 759 | static int spear_smi_probe_config_dt(struct platform_device *pdev, |
| 760 | struct device_node *np) | 760 | struct device_node *np) |
| 761 | { | 761 | { |
| 762 | struct spear_smi_plat_data *pdata = dev_get_platdata(&pdev->dev); | 762 | struct spear_smi_plat_data *pdata = dev_get_platdata(&pdev->dev); |
| 763 | struct device_node *pp = NULL; | 763 | struct device_node *pp = NULL; |
| @@ -800,7 +800,7 @@ static int spear_smi_probe_config_dt(struct platform_device *pdev, | |||
| 800 | } | 800 | } |
| 801 | #else | 801 | #else |
| 802 | static int spear_smi_probe_config_dt(struct platform_device *pdev, | 802 | static int spear_smi_probe_config_dt(struct platform_device *pdev, |
| 803 | struct device_node *np) | 803 | struct device_node *np) |
| 804 | { | 804 | { |
| 805 | return -ENOSYS; | 805 | return -ENOSYS; |
| 806 | } | 806 | } |
diff --git a/drivers/mtd/maps/esb2rom.c b/drivers/mtd/maps/esb2rom.c index ff8681a25831..f784cf0caa13 100644 --- a/drivers/mtd/maps/esb2rom.c +++ b/drivers/mtd/maps/esb2rom.c | |||
| @@ -145,7 +145,7 @@ static void esb2rom_cleanup(struct esb2rom_window *window) | |||
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | static int esb2rom_init_one(struct pci_dev *pdev, | 147 | static int esb2rom_init_one(struct pci_dev *pdev, |
| 148 | const struct pci_device_id *ent) | 148 | const struct pci_device_id *ent) |
| 149 | { | 149 | { |
| 150 | static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL }; | 150 | static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL }; |
| 151 | struct esb2rom_window *window = &esb2rom_window; | 151 | struct esb2rom_window *window = &esb2rom_window; |
diff --git a/drivers/mtd/maps/intel_vr_nor.c b/drivers/mtd/maps/intel_vr_nor.c index 3ee2ad1dcbe7..b14053b25026 100644 --- a/drivers/mtd/maps/intel_vr_nor.c +++ b/drivers/mtd/maps/intel_vr_nor.c | |||
| @@ -189,8 +189,7 @@ static void vr_nor_pci_remove(struct pci_dev *dev) | |||
| 189 | pci_disable_device(dev); | 189 | pci_disable_device(dev); |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | static int | 192 | static int vr_nor_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) |
| 193 | vr_nor_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | ||
| 194 | { | 193 | { |
| 195 | struct vr_nor_mtd *p = NULL; | 194 | struct vr_nor_mtd *p = NULL; |
| 196 | unsigned int exp_timing_cs0; | 195 | unsigned int exp_timing_cs0; |
diff --git a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c index ed82914966f5..c3aebd5da5d6 100644 --- a/drivers/mtd/maps/pci.c +++ b/drivers/mtd/maps/pci.c | |||
| @@ -253,8 +253,7 @@ static struct pci_device_id mtd_pci_ids[] = { | |||
| 253 | * Generic code follows. | 253 | * Generic code follows. |
| 254 | */ | 254 | */ |
| 255 | 255 | ||
| 256 | static int | 256 | static int mtd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) |
| 257 | mtd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | ||
| 258 | { | 257 | { |
| 259 | struct mtd_pci_info *info = (struct mtd_pci_info *)id->driver_data; | 258 | struct mtd_pci_info *info = (struct mtd_pci_info *)id->driver_data; |
| 260 | struct map_pci_info *map = NULL; | 259 | struct map_pci_info *map = NULL; |
| @@ -308,8 +307,7 @@ out: | |||
| 308 | return err; | 307 | return err; |
| 309 | } | 308 | } |
| 310 | 309 | ||
| 311 | static void | 310 | static void mtd_pci_remove(struct pci_dev *dev) |
| 312 | mtd_pci_remove(struct pci_dev *dev) | ||
| 313 | { | 311 | { |
| 314 | struct mtd_info *mtd = pci_get_drvdata(dev); | 312 | struct mtd_info *mtd = pci_get_drvdata(dev); |
| 315 | struct map_pci_info *map = mtd->priv; | 313 | struct map_pci_info *map = mtd->priv; |
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index 37cdc201652f..67cc73c18ddd 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c | |||
| @@ -78,7 +78,7 @@ static int of_flash_remove(struct platform_device *dev) | |||
| 78 | * compatible binding, which has an extra "probe-type" property | 78 | * compatible binding, which has an extra "probe-type" property |
| 79 | * describing the type of flash probe necessary. */ | 79 | * describing the type of flash probe necessary. */ |
| 80 | static struct mtd_info *obsolete_probe(struct platform_device *dev, | 80 | static struct mtd_info *obsolete_probe(struct platform_device *dev, |
| 81 | struct map_info *map) | 81 | struct map_info *map) |
| 82 | { | 82 | { |
| 83 | struct device_node *dp = dev->dev.of_node; | 83 | struct device_node *dp = dev->dev.of_node; |
| 84 | const char *of_probe; | 84 | const char *of_probe; |
diff --git a/drivers/mtd/maps/pismo.c b/drivers/mtd/maps/pismo.c index afea93b515d5..dc6df9abea0b 100644 --- a/drivers/mtd/maps/pismo.c +++ b/drivers/mtd/maps/pismo.c | |||
| @@ -66,8 +66,8 @@ static unsigned int pismo_width_to_bytes(unsigned int width) | |||
| 66 | return 1 << width; | 66 | return 1 << width; |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | static int pismo_eeprom_read(struct i2c_client *client, void *buf, | 69 | static int pismo_eeprom_read(struct i2c_client *client, void *buf, u8 addr, |
| 70 | u8 addr, size_t size) | 70 | size_t size) |
| 71 | { | 71 | { |
| 72 | int ret; | 72 | int ret; |
| 73 | struct i2c_msg msg[] = { | 73 | struct i2c_msg msg[] = { |
| @@ -89,7 +89,8 @@ static int pismo_eeprom_read(struct i2c_client *client, void *buf, | |||
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | static int pismo_add_device(struct pismo_data *pismo, int i, | 91 | static int pismo_add_device(struct pismo_data *pismo, int i, |
| 92 | struct pismo_mem *region, const char *name, void *pdata, size_t psize) | 92 | struct pismo_mem *region, const char *name, |
| 93 | void *pdata, size_t psize) | ||
| 93 | { | 94 | { |
| 94 | struct platform_device *dev; | 95 | struct platform_device *dev; |
| 95 | struct resource res = { }; | 96 | struct resource res = { }; |
| @@ -130,7 +131,7 @@ static int pismo_add_device(struct pismo_data *pismo, int i, | |||
| 130 | } | 131 | } |
| 131 | 132 | ||
| 132 | static int pismo_add_nor(struct pismo_data *pismo, int i, | 133 | static int pismo_add_nor(struct pismo_data *pismo, int i, |
| 133 | struct pismo_mem *region) | 134 | struct pismo_mem *region) |
| 134 | { | 135 | { |
| 135 | struct physmap_flash_data data = { | 136 | struct physmap_flash_data data = { |
| 136 | .width = region->width, | 137 | .width = region->width, |
| @@ -144,7 +145,7 @@ static int pismo_add_nor(struct pismo_data *pismo, int i, | |||
| 144 | } | 145 | } |
| 145 | 146 | ||
| 146 | static int pismo_add_sram(struct pismo_data *pismo, int i, | 147 | static int pismo_add_sram(struct pismo_data *pismo, int i, |
| 147 | struct pismo_mem *region) | 148 | struct pismo_mem *region) |
| 148 | { | 149 | { |
| 149 | struct platdata_mtd_ram data = { | 150 | struct platdata_mtd_ram data = { |
| 150 | .bankwidth = region->width, | 151 | .bankwidth = region->width, |
| @@ -155,7 +156,7 @@ static int pismo_add_sram(struct pismo_data *pismo, int i, | |||
| 155 | } | 156 | } |
| 156 | 157 | ||
| 157 | static void pismo_add_one(struct pismo_data *pismo, int i, | 158 | static void pismo_add_one(struct pismo_data *pismo, int i, |
| 158 | const struct pismo_cs_block *cs, phys_addr_t base) | 159 | const struct pismo_cs_block *cs, phys_addr_t base) |
| 159 | { | 160 | { |
| 160 | struct device *dev = &pismo->client->dev; | 161 | struct device *dev = &pismo->client->dev; |
| 161 | struct pismo_mem region; | 162 | struct pismo_mem region; |
| @@ -211,7 +212,7 @@ static int pismo_remove(struct i2c_client *client) | |||
| 211 | } | 212 | } |
| 212 | 213 | ||
| 213 | static int pismo_probe(struct i2c_client *client, | 214 | static int pismo_probe(struct i2c_client *client, |
| 214 | const struct i2c_device_id *id) | 215 | const struct i2c_device_id *id) |
| 215 | { | 216 | { |
| 216 | struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); | 217 | struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); |
| 217 | struct pismo_pdata *pdata = client->dev.platform_data; | 218 | struct pismo_pdata *pdata = client->dev.platform_data; |
diff --git a/drivers/mtd/maps/scb2_flash.c b/drivers/mtd/maps/scb2_flash.c index 71796137e97b..c77b68c9412f 100644 --- a/drivers/mtd/maps/scb2_flash.c +++ b/drivers/mtd/maps/scb2_flash.c | |||
| @@ -69,8 +69,7 @@ static struct map_info scb2_map = { | |||
| 69 | }; | 69 | }; |
| 70 | static int region_fail; | 70 | static int region_fail; |
| 71 | 71 | ||
| 72 | static int | 72 | static int scb2_fixup_mtd(struct mtd_info *mtd) |
| 73 | scb2_fixup_mtd(struct mtd_info *mtd) | ||
| 74 | { | 73 | { |
| 75 | int i; | 74 | int i; |
| 76 | int done = 0; | 75 | int done = 0; |
| @@ -133,8 +132,8 @@ scb2_fixup_mtd(struct mtd_info *mtd) | |||
| 133 | /* CSB5's 'Function Control Register' has bits for decoding @ >= 0xffc00000 */ | 132 | /* CSB5's 'Function Control Register' has bits for decoding @ >= 0xffc00000 */ |
| 134 | #define CSB5_FCR 0x41 | 133 | #define CSB5_FCR 0x41 |
| 135 | #define CSB5_FCR_DECODE_ALL 0x0e | 134 | #define CSB5_FCR_DECODE_ALL 0x0e |
| 136 | static int | 135 | static int scb2_flash_probe(struct pci_dev *dev, |
| 137 | scb2_flash_probe(struct pci_dev *dev, const struct pci_device_id *ent) | 136 | const struct pci_device_id *ent) |
| 138 | { | 137 | { |
| 139 | u8 reg; | 138 | u8 reg; |
| 140 | 139 | ||
| @@ -197,8 +196,7 @@ scb2_flash_probe(struct pci_dev *dev, const struct pci_device_id *ent) | |||
| 197 | return 0; | 196 | return 0; |
| 198 | } | 197 | } |
| 199 | 198 | ||
| 200 | static void | 199 | static void scb2_flash_remove(struct pci_dev *dev) |
| 201 | scb2_flash_remove(struct pci_dev *dev) | ||
| 202 | { | 200 | { |
| 203 | if (!scb2_mtd) | 201 | if (!scb2_mtd) |
| 204 | return; | 202 | return; |
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 90bdca61c797..c516a9408087 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c | |||
| @@ -338,7 +338,7 @@ static int pmecc_get_ecc_bytes(int cap, int sector_size) | |||
| 338 | } | 338 | } |
| 339 | 339 | ||
| 340 | static void pmecc_config_ecc_layout(struct nand_ecclayout *layout, | 340 | static void pmecc_config_ecc_layout(struct nand_ecclayout *layout, |
| 341 | int oobsize, int ecc_len) | 341 | int oobsize, int ecc_len) |
| 342 | { | 342 | { |
| 343 | int i; | 343 | int i; |
| 344 | 344 | ||
| @@ -1213,7 +1213,7 @@ static void atmel_nand_hwctl(struct mtd_info *mtd, int mode) | |||
| 1213 | 1213 | ||
| 1214 | #if defined(CONFIG_OF) | 1214 | #if defined(CONFIG_OF) |
| 1215 | static int atmel_of_init_port(struct atmel_nand_host *host, | 1215 | static int atmel_of_init_port(struct atmel_nand_host *host, |
| 1216 | struct device_node *np) | 1216 | struct device_node *np) |
| 1217 | { | 1217 | { |
| 1218 | u32 val, table_offset; | 1218 | u32 val, table_offset; |
| 1219 | u32 offset[2]; | 1219 | u32 offset[2]; |
| @@ -1300,7 +1300,7 @@ static int atmel_of_init_port(struct atmel_nand_host *host, | |||
| 1300 | } | 1300 | } |
| 1301 | #else | 1301 | #else |
| 1302 | static int atmel_of_init_port(struct atmel_nand_host *host, | 1302 | static int atmel_of_init_port(struct atmel_nand_host *host, |
| 1303 | struct device_node *np) | 1303 | struct device_node *np) |
| 1304 | { | 1304 | { |
| 1305 | return -EINVAL; | 1305 | return -EINVAL; |
| 1306 | } | 1306 | } |
diff --git a/drivers/mtd/nand/bcm47xxnflash/main.c b/drivers/mtd/nand/bcm47xxnflash/main.c index 2b8b05bec3dd..8363a9a5fa3f 100644 --- a/drivers/mtd/nand/bcm47xxnflash/main.c +++ b/drivers/mtd/nand/bcm47xxnflash/main.c | |||
| @@ -66,7 +66,7 @@ out: | |||
| 66 | return err; | 66 | return err; |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | static int __devexit bcm47xxnflash_remove(struct platform_device *pdev) | 69 | static int bcm47xxnflash_remove(struct platform_device *pdev) |
| 70 | { | 70 | { |
| 71 | struct bcma_nflash *nflash = dev_get_platdata(&pdev->dev); | 71 | struct bcma_nflash *nflash = dev_get_platdata(&pdev->dev); |
| 72 | 72 | ||
| @@ -77,7 +77,7 @@ static int __devexit bcm47xxnflash_remove(struct platform_device *pdev) | |||
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | static struct platform_driver bcm47xxnflash_driver = { | 79 | static struct platform_driver bcm47xxnflash_driver = { |
| 80 | .remove = __devexit_p(bcm47xxnflash_remove), | 80 | .remove = bcm47xxnflash_remove, |
| 81 | .driver = { | 81 | .driver = { |
| 82 | .name = "bcma_nflash", | 82 | .name = "bcma_nflash", |
| 83 | .owner = THIS_MODULE, | 83 | .owner = THIS_MODULE, |
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c index 5a8f5c4ce512..04e07252d74b 100644 --- a/drivers/mtd/nand/fsl_upm.c +++ b/drivers/mtd/nand/fsl_upm.c | |||
| @@ -153,8 +153,8 @@ static void fun_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len) | |||
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | static int fun_chip_init(struct fsl_upm_nand *fun, | 155 | static int fun_chip_init(struct fsl_upm_nand *fun, |
| 156 | const struct device_node *upm_np, | 156 | const struct device_node *upm_np, |
| 157 | const struct resource *io_res) | 157 | const struct resource *io_res) |
| 158 | { | 158 | { |
| 159 | int ret; | 159 | int ret; |
| 160 | struct device_node *flash_np; | 160 | struct device_node *flash_np; |
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c index 1d7446434b0e..67e62d3d495c 100644 --- a/drivers/mtd/nand/fsmc_nand.c +++ b/drivers/mtd/nand/fsmc_nand.c | |||
| @@ -865,7 +865,7 @@ static bool filter(struct dma_chan *chan, void *slave) | |||
| 865 | 865 | ||
| 866 | #ifdef CONFIG_OF | 866 | #ifdef CONFIG_OF |
| 867 | static int fsmc_nand_probe_config_dt(struct platform_device *pdev, | 867 | static int fsmc_nand_probe_config_dt(struct platform_device *pdev, |
| 868 | struct device_node *np) | 868 | struct device_node *np) |
| 869 | { | 869 | { |
| 870 | struct fsmc_nand_platform_data *pdata = dev_get_platdata(&pdev->dev); | 870 | struct fsmc_nand_platform_data *pdata = dev_get_platdata(&pdev->dev); |
| 871 | u32 val; | 871 | u32 val; |
| @@ -887,7 +887,7 @@ static int fsmc_nand_probe_config_dt(struct platform_device *pdev, | |||
| 887 | } | 887 | } |
| 888 | #else | 888 | #else |
| 889 | static int fsmc_nand_probe_config_dt(struct platform_device *pdev, | 889 | static int fsmc_nand_probe_config_dt(struct platform_device *pdev, |
| 890 | struct device_node *np) | 890 | struct device_node *np) |
| 891 | { | 891 | { |
| 892 | return -ENOSYS; | 892 | return -ENOSYS; |
| 893 | } | 893 | } |
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index 5cd141f7bfc2..e9b1c47e3cf9 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c | |||
| @@ -319,8 +319,8 @@ int start_dma_with_bch_irq(struct gpmi_nand_data *this, | |||
| 319 | return 0; | 319 | return 0; |
| 320 | } | 320 | } |
| 321 | 321 | ||
| 322 | static int | 322 | static int acquire_register_block(struct gpmi_nand_data *this, |
| 323 | acquire_register_block(struct gpmi_nand_data *this, const char *res_name) | 323 | const char *res_name) |
| 324 | { | 324 | { |
| 325 | struct platform_device *pdev = this->pdev; | 325 | struct platform_device *pdev = this->pdev; |
| 326 | struct resources *res = &this->resources; | 326 | struct resources *res = &this->resources; |
| @@ -360,8 +360,7 @@ static void release_register_block(struct gpmi_nand_data *this) | |||
| 360 | res->bch_regs = NULL; | 360 | res->bch_regs = NULL; |
| 361 | } | 361 | } |
| 362 | 362 | ||
| 363 | static int | 363 | static int acquire_bch_irq(struct gpmi_nand_data *this, irq_handler_t irq_h) |
| 364 | acquire_bch_irq(struct gpmi_nand_data *this, irq_handler_t irq_h) | ||
| 365 | { | 364 | { |
| 366 | struct platform_device *pdev = this->pdev; | 365 | struct platform_device *pdev = this->pdev; |
| 367 | struct resources *res = &this->resources; | 366 | struct resources *res = &this->resources; |
diff --git a/drivers/mtd/nand/jz4740_nand.c b/drivers/mtd/nand/jz4740_nand.c index 8d415f014e1d..b76460eeaf22 100644 --- a/drivers/mtd/nand/jz4740_nand.c +++ b/drivers/mtd/nand/jz4740_nand.c | |||
| @@ -326,7 +326,8 @@ static inline void jz_nand_iounmap_resource(struct resource *res, | |||
| 326 | static int jz_nand_detect_bank(struct platform_device *pdev, | 326 | static int jz_nand_detect_bank(struct platform_device *pdev, |
| 327 | struct jz_nand *nand, unsigned char bank, | 327 | struct jz_nand *nand, unsigned char bank, |
| 328 | size_t chipnr, uint8_t *nand_maf_id, | 328 | size_t chipnr, uint8_t *nand_maf_id, |
| 329 | uint8_t *nand_dev_id) { | 329 | uint8_t *nand_dev_id) |
| 330 | { | ||
| 330 | int ret; | 331 | int ret; |
| 331 | int gpio; | 332 | int gpio; |
| 332 | char gpio_name[9]; | 333 | char gpio_name[9]; |
diff --git a/drivers/net/ethernet/adi/Kconfig b/drivers/net/ethernet/adi/Kconfig index e49c0eff040b..a9481606bbcd 100644 --- a/drivers/net/ethernet/adi/Kconfig +++ b/drivers/net/ethernet/adi/Kconfig | |||
| @@ -61,6 +61,7 @@ config BFIN_RX_DESC_NUM | |||
| 61 | 61 | ||
| 62 | config BFIN_MAC_USE_HWSTAMP | 62 | config BFIN_MAC_USE_HWSTAMP |
| 63 | bool "Use IEEE 1588 hwstamp" | 63 | bool "Use IEEE 1588 hwstamp" |
| 64 | depends on BFIN_MAC && BF518 | ||
| 64 | select PTP_1588_CLOCK | 65 | select PTP_1588_CLOCK |
| 65 | default y | 66 | default y |
| 66 | ---help--- | 67 | ---help--- |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 01588b66a38c..f771ddfba646 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
| @@ -80,12 +80,37 @@ static inline void bnx2x_move_fp(struct bnx2x *bp, int from, int to) | |||
| 80 | new_txdata_index = new_max_eth_txqs + FCOE_TXQ_IDX_OFFSET; | 80 | new_txdata_index = new_max_eth_txqs + FCOE_TXQ_IDX_OFFSET; |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | memcpy(&bp->bnx2x_txq[old_txdata_index], | 83 | memcpy(&bp->bnx2x_txq[new_txdata_index], |
| 84 | &bp->bnx2x_txq[new_txdata_index], | 84 | &bp->bnx2x_txq[old_txdata_index], |
| 85 | sizeof(struct bnx2x_fp_txdata)); | 85 | sizeof(struct bnx2x_fp_txdata)); |
| 86 | to_fp->txdata_ptr[0] = &bp->bnx2x_txq[new_txdata_index]; | 86 | to_fp->txdata_ptr[0] = &bp->bnx2x_txq[new_txdata_index]; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | /** | ||
| 90 | * bnx2x_shrink_eth_fp - guarantees fastpath structures stay intact | ||
| 91 | * | ||
| 92 | * @bp: driver handle | ||
| 93 | * @delta: number of eth queues which were not allocated | ||
| 94 | */ | ||
| 95 | static void bnx2x_shrink_eth_fp(struct bnx2x *bp, int delta) | ||
| 96 | { | ||
| 97 | int i, cos, old_eth_num = BNX2X_NUM_ETH_QUEUES(bp); | ||
| 98 | |||
| 99 | /* Queue pointer cannot be re-set on an fp-basis, as moving pointer | ||
| 100 | * backward along the array could cause memory to be overriden | ||
| 101 | */ | ||
| 102 | for (cos = 1; cos < bp->max_cos; cos++) { | ||
| 103 | for (i = 0; i < old_eth_num - delta; i++) { | ||
| 104 | struct bnx2x_fastpath *fp = &bp->fp[i]; | ||
| 105 | int new_idx = cos * (old_eth_num - delta) + i; | ||
| 106 | |||
| 107 | memcpy(&bp->bnx2x_txq[new_idx], fp->txdata_ptr[cos], | ||
| 108 | sizeof(struct bnx2x_fp_txdata)); | ||
| 109 | fp->txdata_ptr[cos] = &bp->bnx2x_txq[new_idx]; | ||
| 110 | } | ||
| 111 | } | ||
| 112 | } | ||
| 113 | |||
| 89 | int load_count[2][3] = { {0} }; /* per-path: 0-common, 1-port0, 2-port1 */ | 114 | int load_count[2][3] = { {0} }; /* per-path: 0-common, 1-port0, 2-port1 */ |
| 90 | 115 | ||
| 91 | /* free skb in the packet ring at pos idx | 116 | /* free skb in the packet ring at pos idx |
| @@ -3863,6 +3888,7 @@ int bnx2x_alloc_fp_mem(struct bnx2x *bp) | |||
| 3863 | int delta = BNX2X_NUM_ETH_QUEUES(bp) - i; | 3888 | int delta = BNX2X_NUM_ETH_QUEUES(bp) - i; |
| 3864 | 3889 | ||
| 3865 | WARN_ON(delta < 0); | 3890 | WARN_ON(delta < 0); |
| 3891 | bnx2x_shrink_eth_fp(bp, delta); | ||
| 3866 | if (CNIC_SUPPORT(bp)) | 3892 | if (CNIC_SUPPORT(bp)) |
| 3867 | /* move non eth FPs next to last eth FP | 3893 | /* move non eth FPs next to last eth FP |
| 3868 | * must be done in that order | 3894 | * must be done in that order |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c index 277f17e3c8f8..a427b49a886c 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | |||
| @@ -2777,10 +2777,10 @@ static int bnx2x_set_rss_flags(struct bnx2x *bp, struct ethtool_rxnfc *info) | |||
| 2777 | } else if ((info->flow_type == UDP_V6_FLOW) && | 2777 | } else if ((info->flow_type == UDP_V6_FLOW) && |
| 2778 | (bp->rss_conf_obj.udp_rss_v6 != udp_rss_requested)) { | 2778 | (bp->rss_conf_obj.udp_rss_v6 != udp_rss_requested)) { |
| 2779 | bp->rss_conf_obj.udp_rss_v6 = udp_rss_requested; | 2779 | bp->rss_conf_obj.udp_rss_v6 = udp_rss_requested; |
| 2780 | return bnx2x_config_rss_pf(bp, &bp->rss_conf_obj, 0); | ||
| 2781 | DP(BNX2X_MSG_ETHTOOL, | 2780 | DP(BNX2X_MSG_ETHTOOL, |
| 2782 | "rss re-configured, UDP 4-tupple %s\n", | 2781 | "rss re-configured, UDP 4-tupple %s\n", |
| 2783 | udp_rss_requested ? "enabled" : "disabled"); | 2782 | udp_rss_requested ? "enabled" : "disabled"); |
| 2783 | return bnx2x_config_rss_pf(bp, &bp->rss_conf_obj, 0); | ||
| 2784 | } else { | 2784 | } else { |
| 2785 | return 0; | 2785 | return 0; |
| 2786 | } | 2786 | } |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 940ef859dc60..5523da3afcdc 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
| @@ -127,6 +127,17 @@ MODULE_PARM_DESC(debug, " Default debug msglevel"); | |||
| 127 | 127 | ||
| 128 | struct workqueue_struct *bnx2x_wq; | 128 | struct workqueue_struct *bnx2x_wq; |
| 129 | 129 | ||
| 130 | struct bnx2x_mac_vals { | ||
| 131 | u32 xmac_addr; | ||
| 132 | u32 xmac_val; | ||
| 133 | u32 emac_addr; | ||
| 134 | u32 emac_val; | ||
| 135 | u32 umac_addr; | ||
| 136 | u32 umac_val; | ||
| 137 | u32 bmac_addr; | ||
| 138 | u32 bmac_val[2]; | ||
| 139 | }; | ||
| 140 | |||
| 130 | enum bnx2x_board_type { | 141 | enum bnx2x_board_type { |
| 131 | BCM57710 = 0, | 142 | BCM57710 = 0, |
| 132 | BCM57711, | 143 | BCM57711, |
| @@ -9420,12 +9431,19 @@ static inline void bnx2x_undi_int_disable(struct bnx2x *bp) | |||
| 9420 | bnx2x_undi_int_disable_e1h(bp); | 9431 | bnx2x_undi_int_disable_e1h(bp); |
| 9421 | } | 9432 | } |
| 9422 | 9433 | ||
| 9423 | static void bnx2x_prev_unload_close_mac(struct bnx2x *bp) | 9434 | static void bnx2x_prev_unload_close_mac(struct bnx2x *bp, |
| 9435 | struct bnx2x_mac_vals *vals) | ||
| 9424 | { | 9436 | { |
| 9425 | u32 val, base_addr, offset, mask, reset_reg; | 9437 | u32 val, base_addr, offset, mask, reset_reg; |
| 9426 | bool mac_stopped = false; | 9438 | bool mac_stopped = false; |
| 9427 | u8 port = BP_PORT(bp); | 9439 | u8 port = BP_PORT(bp); |
| 9428 | 9440 | ||
| 9441 | /* reset addresses as they also mark which values were changed */ | ||
| 9442 | vals->bmac_addr = 0; | ||
| 9443 | vals->umac_addr = 0; | ||
| 9444 | vals->xmac_addr = 0; | ||
| 9445 | vals->emac_addr = 0; | ||
| 9446 | |||
| 9429 | reset_reg = REG_RD(bp, MISC_REG_RESET_REG_2); | 9447 | reset_reg = REG_RD(bp, MISC_REG_RESET_REG_2); |
| 9430 | 9448 | ||
| 9431 | if (!CHIP_IS_E3(bp)) { | 9449 | if (!CHIP_IS_E3(bp)) { |
| @@ -9447,14 +9465,18 @@ static void bnx2x_prev_unload_close_mac(struct bnx2x *bp) | |||
| 9447 | */ | 9465 | */ |
| 9448 | wb_data[0] = REG_RD(bp, base_addr + offset); | 9466 | wb_data[0] = REG_RD(bp, base_addr + offset); |
| 9449 | wb_data[1] = REG_RD(bp, base_addr + offset + 0x4); | 9467 | wb_data[1] = REG_RD(bp, base_addr + offset + 0x4); |
| 9468 | vals->bmac_addr = base_addr + offset; | ||
| 9469 | vals->bmac_val[0] = wb_data[0]; | ||
| 9470 | vals->bmac_val[1] = wb_data[1]; | ||
| 9450 | wb_data[0] &= ~BMAC_CONTROL_RX_ENABLE; | 9471 | wb_data[0] &= ~BMAC_CONTROL_RX_ENABLE; |
| 9451 | REG_WR(bp, base_addr + offset, wb_data[0]); | 9472 | REG_WR(bp, vals->bmac_addr, wb_data[0]); |
| 9452 | REG_WR(bp, base_addr + offset + 0x4, wb_data[1]); | 9473 | REG_WR(bp, vals->bmac_addr + 0x4, wb_data[1]); |
| 9453 | 9474 | ||
| 9454 | } | 9475 | } |
| 9455 | BNX2X_DEV_INFO("Disable emac Rx\n"); | 9476 | BNX2X_DEV_INFO("Disable emac Rx\n"); |
| 9456 | REG_WR(bp, NIG_REG_NIG_EMAC0_EN + BP_PORT(bp)*4, 0); | 9477 | vals->emac_addr = NIG_REG_NIG_EMAC0_EN + BP_PORT(bp)*4; |
| 9457 | 9478 | vals->emac_val = REG_RD(bp, vals->emac_addr); | |
| 9479 | REG_WR(bp, vals->emac_addr, 0); | ||
| 9458 | mac_stopped = true; | 9480 | mac_stopped = true; |
| 9459 | } else { | 9481 | } else { |
| 9460 | if (reset_reg & MISC_REGISTERS_RESET_REG_2_XMAC) { | 9482 | if (reset_reg & MISC_REGISTERS_RESET_REG_2_XMAC) { |
| @@ -9465,14 +9487,18 @@ static void bnx2x_prev_unload_close_mac(struct bnx2x *bp) | |||
| 9465 | val & ~(1 << 1)); | 9487 | val & ~(1 << 1)); |
| 9466 | REG_WR(bp, base_addr + XMAC_REG_PFC_CTRL_HI, | 9488 | REG_WR(bp, base_addr + XMAC_REG_PFC_CTRL_HI, |
| 9467 | val | (1 << 1)); | 9489 | val | (1 << 1)); |
| 9468 | REG_WR(bp, base_addr + XMAC_REG_CTRL, 0); | 9490 | vals->xmac_addr = base_addr + XMAC_REG_CTRL; |
| 9491 | vals->xmac_val = REG_RD(bp, vals->xmac_addr); | ||
| 9492 | REG_WR(bp, vals->xmac_addr, 0); | ||
| 9469 | mac_stopped = true; | 9493 | mac_stopped = true; |
| 9470 | } | 9494 | } |
| 9471 | mask = MISC_REGISTERS_RESET_REG_2_UMAC0 << port; | 9495 | mask = MISC_REGISTERS_RESET_REG_2_UMAC0 << port; |
| 9472 | if (mask & reset_reg) { | 9496 | if (mask & reset_reg) { |
| 9473 | BNX2X_DEV_INFO("Disable umac Rx\n"); | 9497 | BNX2X_DEV_INFO("Disable umac Rx\n"); |
| 9474 | base_addr = BP_PORT(bp) ? GRCBASE_UMAC1 : GRCBASE_UMAC0; | 9498 | base_addr = BP_PORT(bp) ? GRCBASE_UMAC1 : GRCBASE_UMAC0; |
| 9475 | REG_WR(bp, base_addr + UMAC_REG_COMMAND_CONFIG, 0); | 9499 | vals->umac_addr = base_addr + UMAC_REG_COMMAND_CONFIG; |
| 9500 | vals->umac_val = REG_RD(bp, vals->umac_addr); | ||
| 9501 | REG_WR(bp, vals->umac_addr, 0); | ||
| 9476 | mac_stopped = true; | 9502 | mac_stopped = true; |
| 9477 | } | 9503 | } |
| 9478 | } | 9504 | } |
| @@ -9664,12 +9690,16 @@ static int bnx2x_prev_unload_common(struct bnx2x *bp) | |||
| 9664 | { | 9690 | { |
| 9665 | u32 reset_reg, tmp_reg = 0, rc; | 9691 | u32 reset_reg, tmp_reg = 0, rc; |
| 9666 | bool prev_undi = false; | 9692 | bool prev_undi = false; |
| 9693 | struct bnx2x_mac_vals mac_vals; | ||
| 9694 | |||
| 9667 | /* It is possible a previous function received 'common' answer, | 9695 | /* It is possible a previous function received 'common' answer, |
| 9668 | * but hasn't loaded yet, therefore creating a scenario of | 9696 | * but hasn't loaded yet, therefore creating a scenario of |
| 9669 | * multiple functions receiving 'common' on the same path. | 9697 | * multiple functions receiving 'common' on the same path. |
| 9670 | */ | 9698 | */ |
| 9671 | BNX2X_DEV_INFO("Common unload Flow\n"); | 9699 | BNX2X_DEV_INFO("Common unload Flow\n"); |
| 9672 | 9700 | ||
| 9701 | memset(&mac_vals, 0, sizeof(mac_vals)); | ||
| 9702 | |||
| 9673 | if (bnx2x_prev_is_path_marked(bp)) | 9703 | if (bnx2x_prev_is_path_marked(bp)) |
| 9674 | return bnx2x_prev_mcp_done(bp); | 9704 | return bnx2x_prev_mcp_done(bp); |
| 9675 | 9705 | ||
| @@ -9680,7 +9710,10 @@ static int bnx2x_prev_unload_common(struct bnx2x *bp) | |||
| 9680 | u32 timer_count = 1000; | 9710 | u32 timer_count = 1000; |
| 9681 | 9711 | ||
| 9682 | /* Close the MAC Rx to prevent BRB from filling up */ | 9712 | /* Close the MAC Rx to prevent BRB from filling up */ |
| 9683 | bnx2x_prev_unload_close_mac(bp); | 9713 | bnx2x_prev_unload_close_mac(bp, &mac_vals); |
| 9714 | |||
| 9715 | /* close LLH filters towards the BRB */ | ||
| 9716 | bnx2x_set_rx_filter(&bp->link_params, 0); | ||
| 9684 | 9717 | ||
| 9685 | /* Check if the UNDI driver was previously loaded | 9718 | /* Check if the UNDI driver was previously loaded |
| 9686 | * UNDI driver initializes CID offset for normal bell to 0x7 | 9719 | * UNDI driver initializes CID offset for normal bell to 0x7 |
| @@ -9727,6 +9760,17 @@ static int bnx2x_prev_unload_common(struct bnx2x *bp) | |||
| 9727 | /* No packets are in the pipeline, path is ready for reset */ | 9760 | /* No packets are in the pipeline, path is ready for reset */ |
| 9728 | bnx2x_reset_common(bp); | 9761 | bnx2x_reset_common(bp); |
| 9729 | 9762 | ||
| 9763 | if (mac_vals.xmac_addr) | ||
| 9764 | REG_WR(bp, mac_vals.xmac_addr, mac_vals.xmac_val); | ||
| 9765 | if (mac_vals.umac_addr) | ||
| 9766 | REG_WR(bp, mac_vals.umac_addr, mac_vals.umac_val); | ||
| 9767 | if (mac_vals.emac_addr) | ||
| 9768 | REG_WR(bp, mac_vals.emac_addr, mac_vals.emac_val); | ||
| 9769 | if (mac_vals.bmac_addr) { | ||
| 9770 | REG_WR(bp, mac_vals.bmac_addr, mac_vals.bmac_val[0]); | ||
| 9771 | REG_WR(bp, mac_vals.bmac_addr + 4, mac_vals.bmac_val[1]); | ||
| 9772 | } | ||
| 9773 | |||
| 9730 | rc = bnx2x_prev_mark_path(bp, prev_undi); | 9774 | rc = bnx2x_prev_mark_path(bp, prev_undi); |
| 9731 | if (rc) { | 9775 | if (rc) { |
| 9732 | bnx2x_prev_mcp_done(bp); | 9776 | bnx2x_prev_mcp_done(bp); |
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index 3bc1912afba9..4eba17b83ba8 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h | |||
| @@ -190,6 +190,7 @@ struct be_eq_obj { | |||
| 190 | 190 | ||
| 191 | u8 idx; /* array index */ | 191 | u8 idx; /* array index */ |
| 192 | u16 tx_budget; | 192 | u16 tx_budget; |
| 193 | u16 spurious_intr; | ||
| 193 | struct napi_struct napi; | 194 | struct napi_struct napi; |
| 194 | struct be_adapter *adapter; | 195 | struct be_adapter *adapter; |
| 195 | } ____cacheline_aligned_in_smp; | 196 | } ____cacheline_aligned_in_smp; |
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 9dca22be8125..5c995700e534 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c | |||
| @@ -2026,19 +2026,30 @@ static irqreturn_t be_intx(int irq, void *dev) | |||
| 2026 | struct be_adapter *adapter = eqo->adapter; | 2026 | struct be_adapter *adapter = eqo->adapter; |
| 2027 | int num_evts = 0; | 2027 | int num_evts = 0; |
| 2028 | 2028 | ||
| 2029 | /* On Lancer, clear-intr bit of the EQ DB does not work. | 2029 | /* IRQ is not expected when NAPI is scheduled as the EQ |
| 2030 | * INTx is de-asserted only on notifying num evts. | 2030 | * will not be armed. |
| 2031 | * But, this can happen on Lancer INTx where it takes | ||
| 2032 | * a while to de-assert INTx or in BE2 where occasionaly | ||
| 2033 | * an interrupt may be raised even when EQ is unarmed. | ||
| 2034 | * If NAPI is already scheduled, then counting & notifying | ||
| 2035 | * events will orphan them. | ||
| 2031 | */ | 2036 | */ |
| 2032 | if (lancer_chip(adapter)) | 2037 | if (napi_schedule_prep(&eqo->napi)) { |
| 2033 | num_evts = events_get(eqo); | 2038 | num_evts = events_get(eqo); |
| 2039 | __napi_schedule(&eqo->napi); | ||
| 2040 | if (num_evts) | ||
| 2041 | eqo->spurious_intr = 0; | ||
| 2042 | } | ||
| 2043 | be_eq_notify(adapter, eqo->q.id, false, true, num_evts); | ||
| 2034 | 2044 | ||
| 2035 | /* The EQ-notify may not de-assert INTx rightaway, causing | 2045 | /* Return IRQ_HANDLED only for the the first spurious intr |
| 2036 | * the ISR to be invoked again. So, return HANDLED even when | 2046 | * after a valid intr to stop the kernel from branding |
| 2037 | * num_evts is zero. | 2047 | * this irq as a bad one! |
| 2038 | */ | 2048 | */ |
| 2039 | be_eq_notify(adapter, eqo->q.id, false, true, num_evts); | 2049 | if (num_evts || eqo->spurious_intr++ == 0) |
| 2040 | napi_schedule(&eqo->napi); | 2050 | return IRQ_HANDLED; |
| 2041 | return IRQ_HANDLED; | 2051 | else |
| 2052 | return IRQ_NONE; | ||
| 2042 | } | 2053 | } |
| 2043 | 2054 | ||
| 2044 | static irqreturn_t be_msix(int irq, void *dev) | 2055 | static irqreturn_t be_msix(int irq, void *dev) |
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c index 653487dc7b52..87fa5919c455 100644 --- a/drivers/net/ethernet/nvidia/forcedeth.c +++ b/drivers/net/ethernet/nvidia/forcedeth.c | |||
| @@ -1821,6 +1821,11 @@ static int nv_alloc_rx(struct net_device *dev) | |||
| 1821 | skb->data, | 1821 | skb->data, |
| 1822 | skb_tailroom(skb), | 1822 | skb_tailroom(skb), |
| 1823 | PCI_DMA_FROMDEVICE); | 1823 | PCI_DMA_FROMDEVICE); |
| 1824 | if (pci_dma_mapping_error(np->pci_dev, | ||
| 1825 | np->put_rx_ctx->dma)) { | ||
| 1826 | kfree_skb(skb); | ||
| 1827 | goto packet_dropped; | ||
| 1828 | } | ||
| 1824 | np->put_rx_ctx->dma_len = skb_tailroom(skb); | 1829 | np->put_rx_ctx->dma_len = skb_tailroom(skb); |
| 1825 | np->put_rx.orig->buf = cpu_to_le32(np->put_rx_ctx->dma); | 1830 | np->put_rx.orig->buf = cpu_to_le32(np->put_rx_ctx->dma); |
| 1826 | wmb(); | 1831 | wmb(); |
| @@ -1830,6 +1835,7 @@ static int nv_alloc_rx(struct net_device *dev) | |||
| 1830 | if (unlikely(np->put_rx_ctx++ == np->last_rx_ctx)) | 1835 | if (unlikely(np->put_rx_ctx++ == np->last_rx_ctx)) |
| 1831 | np->put_rx_ctx = np->first_rx_ctx; | 1836 | np->put_rx_ctx = np->first_rx_ctx; |
| 1832 | } else { | 1837 | } else { |
| 1838 | packet_dropped: | ||
| 1833 | u64_stats_update_begin(&np->swstats_rx_syncp); | 1839 | u64_stats_update_begin(&np->swstats_rx_syncp); |
| 1834 | np->stat_rx_dropped++; | 1840 | np->stat_rx_dropped++; |
| 1835 | u64_stats_update_end(&np->swstats_rx_syncp); | 1841 | u64_stats_update_end(&np->swstats_rx_syncp); |
| @@ -1856,6 +1862,11 @@ static int nv_alloc_rx_optimized(struct net_device *dev) | |||
| 1856 | skb->data, | 1862 | skb->data, |
| 1857 | skb_tailroom(skb), | 1863 | skb_tailroom(skb), |
| 1858 | PCI_DMA_FROMDEVICE); | 1864 | PCI_DMA_FROMDEVICE); |
| 1865 | if (pci_dma_mapping_error(np->pci_dev, | ||
| 1866 | np->put_rx_ctx->dma)) { | ||
| 1867 | kfree_skb(skb); | ||
| 1868 | goto packet_dropped; | ||
| 1869 | } | ||
| 1859 | np->put_rx_ctx->dma_len = skb_tailroom(skb); | 1870 | np->put_rx_ctx->dma_len = skb_tailroom(skb); |
| 1860 | np->put_rx.ex->bufhigh = cpu_to_le32(dma_high(np->put_rx_ctx->dma)); | 1871 | np->put_rx.ex->bufhigh = cpu_to_le32(dma_high(np->put_rx_ctx->dma)); |
| 1861 | np->put_rx.ex->buflow = cpu_to_le32(dma_low(np->put_rx_ctx->dma)); | 1872 | np->put_rx.ex->buflow = cpu_to_le32(dma_low(np->put_rx_ctx->dma)); |
| @@ -1866,6 +1877,7 @@ static int nv_alloc_rx_optimized(struct net_device *dev) | |||
| 1866 | if (unlikely(np->put_rx_ctx++ == np->last_rx_ctx)) | 1877 | if (unlikely(np->put_rx_ctx++ == np->last_rx_ctx)) |
| 1867 | np->put_rx_ctx = np->first_rx_ctx; | 1878 | np->put_rx_ctx = np->first_rx_ctx; |
| 1868 | } else { | 1879 | } else { |
| 1880 | packet_dropped: | ||
| 1869 | u64_stats_update_begin(&np->swstats_rx_syncp); | 1881 | u64_stats_update_begin(&np->swstats_rx_syncp); |
| 1870 | np->stat_rx_dropped++; | 1882 | np->stat_rx_dropped++; |
| 1871 | u64_stats_update_end(&np->swstats_rx_syncp); | 1883 | u64_stats_update_end(&np->swstats_rx_syncp); |
| @@ -2217,6 +2229,15 @@ static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 2217 | bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size; | 2229 | bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size; |
| 2218 | np->put_tx_ctx->dma = pci_map_single(np->pci_dev, skb->data + offset, bcnt, | 2230 | np->put_tx_ctx->dma = pci_map_single(np->pci_dev, skb->data + offset, bcnt, |
| 2219 | PCI_DMA_TODEVICE); | 2231 | PCI_DMA_TODEVICE); |
| 2232 | if (pci_dma_mapping_error(np->pci_dev, | ||
| 2233 | np->put_tx_ctx->dma)) { | ||
| 2234 | /* on DMA mapping error - drop the packet */ | ||
| 2235 | kfree_skb(skb); | ||
| 2236 | u64_stats_update_begin(&np->swstats_tx_syncp); | ||
| 2237 | np->stat_tx_dropped++; | ||
| 2238 | u64_stats_update_end(&np->swstats_tx_syncp); | ||
| 2239 | return NETDEV_TX_OK; | ||
| 2240 | } | ||
| 2220 | np->put_tx_ctx->dma_len = bcnt; | 2241 | np->put_tx_ctx->dma_len = bcnt; |
| 2221 | np->put_tx_ctx->dma_single = 1; | 2242 | np->put_tx_ctx->dma_single = 1; |
| 2222 | put_tx->buf = cpu_to_le32(np->put_tx_ctx->dma); | 2243 | put_tx->buf = cpu_to_le32(np->put_tx_ctx->dma); |
| @@ -2337,6 +2358,15 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb, | |||
| 2337 | bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size; | 2358 | bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size; |
| 2338 | np->put_tx_ctx->dma = pci_map_single(np->pci_dev, skb->data + offset, bcnt, | 2359 | np->put_tx_ctx->dma = pci_map_single(np->pci_dev, skb->data + offset, bcnt, |
| 2339 | PCI_DMA_TODEVICE); | 2360 | PCI_DMA_TODEVICE); |
| 2361 | if (pci_dma_mapping_error(np->pci_dev, | ||
| 2362 | np->put_tx_ctx->dma)) { | ||
| 2363 | /* on DMA mapping error - drop the packet */ | ||
| 2364 | kfree_skb(skb); | ||
| 2365 | u64_stats_update_begin(&np->swstats_tx_syncp); | ||
| 2366 | np->stat_tx_dropped++; | ||
| 2367 | u64_stats_update_end(&np->swstats_tx_syncp); | ||
| 2368 | return NETDEV_TX_OK; | ||
| 2369 | } | ||
| 2340 | np->put_tx_ctx->dma_len = bcnt; | 2370 | np->put_tx_ctx->dma_len = bcnt; |
| 2341 | np->put_tx_ctx->dma_single = 1; | 2371 | np->put_tx_ctx->dma_single = 1; |
| 2342 | put_tx->bufhigh = cpu_to_le32(dma_high(np->put_tx_ctx->dma)); | 2372 | put_tx->bufhigh = cpu_to_le32(dma_high(np->put_tx_ctx->dma)); |
| @@ -5003,6 +5033,11 @@ static int nv_loopback_test(struct net_device *dev) | |||
| 5003 | test_dma_addr = pci_map_single(np->pci_dev, tx_skb->data, | 5033 | test_dma_addr = pci_map_single(np->pci_dev, tx_skb->data, |
| 5004 | skb_tailroom(tx_skb), | 5034 | skb_tailroom(tx_skb), |
| 5005 | PCI_DMA_FROMDEVICE); | 5035 | PCI_DMA_FROMDEVICE); |
| 5036 | if (pci_dma_mapping_error(np->pci_dev, | ||
| 5037 | test_dma_addr)) { | ||
| 5038 | dev_kfree_skb_any(tx_skb); | ||
| 5039 | goto out; | ||
| 5040 | } | ||
| 5006 | pkt_data = skb_put(tx_skb, pkt_len); | 5041 | pkt_data = skb_put(tx_skb, pkt_len); |
| 5007 | for (i = 0; i < pkt_len; i++) | 5042 | for (i = 0; i < pkt_len; i++) |
| 5008 | pkt_data[i] = (u8)(i & 0xff); | 5043 | pkt_data[i] = (u8)(i & 0xff); |
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c index f80cd975daed..3e73742024b0 100644 --- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c +++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c | |||
| @@ -4678,7 +4678,7 @@ static int qlge_probe(struct pci_dev *pdev, | |||
| 4678 | qdev = netdev_priv(ndev); | 4678 | qdev = netdev_priv(ndev); |
| 4679 | SET_NETDEV_DEV(ndev, &pdev->dev); | 4679 | SET_NETDEV_DEV(ndev, &pdev->dev); |
| 4680 | ndev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | | 4680 | ndev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | |
| 4681 | NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN | | 4681 | NETIF_F_TSO | NETIF_F_TSO_ECN | |
| 4682 | NETIF_F_HW_VLAN_TX | NETIF_F_RXCSUM; | 4682 | NETIF_F_HW_VLAN_TX | NETIF_F_RXCSUM; |
| 4683 | ndev->features = ndev->hw_features | | 4683 | ndev->features = ndev->hw_features | |
| 4684 | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER; | 4684 | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER; |
diff --git a/drivers/net/ethernet/xilinx/Kconfig b/drivers/net/ethernet/xilinx/Kconfig index 5778a4ae1164..122d60c0481b 100644 --- a/drivers/net/ethernet/xilinx/Kconfig +++ b/drivers/net/ethernet/xilinx/Kconfig | |||
| @@ -27,7 +27,7 @@ config XILINX_EMACLITE | |||
| 27 | 27 | ||
| 28 | config XILINX_AXI_EMAC | 28 | config XILINX_AXI_EMAC |
| 29 | tristate "Xilinx 10/100/1000 AXI Ethernet support" | 29 | tristate "Xilinx 10/100/1000 AXI Ethernet support" |
| 30 | depends on (PPC32 || MICROBLAZE) | 30 | depends on MICROBLAZE |
| 31 | select PHYLIB | 31 | select PHYLIB |
| 32 | ---help--- | 32 | ---help--- |
| 33 | This driver supports the 10/100/1000 Ethernet from Xilinx for the | 33 | This driver supports the 10/100/1000 Ethernet from Xilinx for the |
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index d9f69b82cc4f..6f47100e58d7 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c | |||
| @@ -1590,7 +1590,7 @@ static int axienet_of_probe(struct platform_device *op) | |||
| 1590 | lp->rx_irq = irq_of_parse_and_map(np, 1); | 1590 | lp->rx_irq = irq_of_parse_and_map(np, 1); |
| 1591 | lp->tx_irq = irq_of_parse_and_map(np, 0); | 1591 | lp->tx_irq = irq_of_parse_and_map(np, 0); |
| 1592 | of_node_put(np); | 1592 | of_node_put(np); |
| 1593 | if ((lp->rx_irq == NO_IRQ) || (lp->tx_irq == NO_IRQ)) { | 1593 | if ((lp->rx_irq <= 0) || (lp->tx_irq <= 0)) { |
| 1594 | dev_err(&op->dev, "could not determine irqs\n"); | 1594 | dev_err(&op->dev, "could not determine irqs\n"); |
| 1595 | ret = -ENOMEM; | 1595 | ret = -ENOMEM; |
| 1596 | goto err_iounmap_2; | 1596 | goto err_iounmap_2; |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index fbd106edbe59..af372d0957fe 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
| @@ -404,8 +404,8 @@ static void __tun_detach(struct tun_file *tfile, bool clean) | |||
| 404 | struct tun_struct *tun; | 404 | struct tun_struct *tun; |
| 405 | struct net_device *dev; | 405 | struct net_device *dev; |
| 406 | 406 | ||
| 407 | tun = rcu_dereference_protected(tfile->tun, | 407 | tun = rtnl_dereference(tfile->tun); |
| 408 | lockdep_rtnl_is_held()); | 408 | |
| 409 | if (tun) { | 409 | if (tun) { |
| 410 | u16 index = tfile->queue_index; | 410 | u16 index = tfile->queue_index; |
| 411 | BUG_ON(index >= tun->numqueues); | 411 | BUG_ON(index >= tun->numqueues); |
| @@ -414,8 +414,7 @@ static void __tun_detach(struct tun_file *tfile, bool clean) | |||
| 414 | rcu_assign_pointer(tun->tfiles[index], | 414 | rcu_assign_pointer(tun->tfiles[index], |
| 415 | tun->tfiles[tun->numqueues - 1]); | 415 | tun->tfiles[tun->numqueues - 1]); |
| 416 | rcu_assign_pointer(tfile->tun, NULL); | 416 | rcu_assign_pointer(tfile->tun, NULL); |
| 417 | ntfile = rcu_dereference_protected(tun->tfiles[index], | 417 | ntfile = rtnl_dereference(tun->tfiles[index]); |
| 418 | lockdep_rtnl_is_held()); | ||
| 419 | ntfile->queue_index = index; | 418 | ntfile->queue_index = index; |
| 420 | 419 | ||
| 421 | --tun->numqueues; | 420 | --tun->numqueues; |
| @@ -429,8 +428,10 @@ static void __tun_detach(struct tun_file *tfile, bool clean) | |||
| 429 | /* Drop read queue */ | 428 | /* Drop read queue */ |
| 430 | skb_queue_purge(&tfile->sk.sk_receive_queue); | 429 | skb_queue_purge(&tfile->sk.sk_receive_queue); |
| 431 | tun_set_real_num_queues(tun); | 430 | tun_set_real_num_queues(tun); |
| 432 | } else if (tfile->detached && clean) | 431 | } else if (tfile->detached && clean) { |
| 433 | tun = tun_enable_queue(tfile); | 432 | tun = tun_enable_queue(tfile); |
| 433 | sock_put(&tfile->sk); | ||
| 434 | } | ||
| 434 | 435 | ||
| 435 | if (clean) { | 436 | if (clean) { |
| 436 | if (tun && tun->numqueues == 0 && tun->numdisabled == 0 && | 437 | if (tun && tun->numqueues == 0 && tun->numdisabled == 0 && |
| @@ -458,8 +459,7 @@ static void tun_detach_all(struct net_device *dev) | |||
| 458 | int i, n = tun->numqueues; | 459 | int i, n = tun->numqueues; |
| 459 | 460 | ||
| 460 | for (i = 0; i < n; i++) { | 461 | for (i = 0; i < n; i++) { |
| 461 | tfile = rcu_dereference_protected(tun->tfiles[i], | 462 | tfile = rtnl_dereference(tun->tfiles[i]); |
| 462 | lockdep_rtnl_is_held()); | ||
| 463 | BUG_ON(!tfile); | 463 | BUG_ON(!tfile); |
| 464 | wake_up_all(&tfile->wq.wait); | 464 | wake_up_all(&tfile->wq.wait); |
| 465 | rcu_assign_pointer(tfile->tun, NULL); | 465 | rcu_assign_pointer(tfile->tun, NULL); |
| @@ -469,8 +469,7 @@ static void tun_detach_all(struct net_device *dev) | |||
| 469 | 469 | ||
| 470 | synchronize_net(); | 470 | synchronize_net(); |
| 471 | for (i = 0; i < n; i++) { | 471 | for (i = 0; i < n; i++) { |
| 472 | tfile = rcu_dereference_protected(tun->tfiles[i], | 472 | tfile = rtnl_dereference(tun->tfiles[i]); |
| 473 | lockdep_rtnl_is_held()); | ||
| 474 | /* Drop read queue */ | 473 | /* Drop read queue */ |
| 475 | skb_queue_purge(&tfile->sk.sk_receive_queue); | 474 | skb_queue_purge(&tfile->sk.sk_receive_queue); |
| 476 | sock_put(&tfile->sk); | 475 | sock_put(&tfile->sk); |
| @@ -481,6 +480,9 @@ static void tun_detach_all(struct net_device *dev) | |||
| 481 | sock_put(&tfile->sk); | 480 | sock_put(&tfile->sk); |
| 482 | } | 481 | } |
| 483 | BUG_ON(tun->numdisabled != 0); | 482 | BUG_ON(tun->numdisabled != 0); |
| 483 | |||
| 484 | if (tun->flags & TUN_PERSIST) | ||
| 485 | module_put(THIS_MODULE); | ||
| 484 | } | 486 | } |
| 485 | 487 | ||
| 486 | static int tun_attach(struct tun_struct *tun, struct file *file) | 488 | static int tun_attach(struct tun_struct *tun, struct file *file) |
| @@ -489,7 +491,7 @@ static int tun_attach(struct tun_struct *tun, struct file *file) | |||
| 489 | int err; | 491 | int err; |
| 490 | 492 | ||
| 491 | err = -EINVAL; | 493 | err = -EINVAL; |
| 492 | if (rcu_dereference_protected(tfile->tun, lockdep_rtnl_is_held())) | 494 | if (rtnl_dereference(tfile->tun)) |
| 493 | goto out; | 495 | goto out; |
| 494 | 496 | ||
| 495 | err = -EBUSY; | 497 | err = -EBUSY; |
| @@ -1544,6 +1546,9 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) | |||
| 1544 | struct net_device *dev; | 1546 | struct net_device *dev; |
| 1545 | int err; | 1547 | int err; |
| 1546 | 1548 | ||
| 1549 | if (tfile->detached) | ||
| 1550 | return -EINVAL; | ||
| 1551 | |||
| 1547 | dev = __dev_get_by_name(net, ifr->ifr_name); | 1552 | dev = __dev_get_by_name(net, ifr->ifr_name); |
| 1548 | if (dev) { | 1553 | if (dev) { |
| 1549 | if (ifr->ifr_flags & IFF_TUN_EXCL) | 1554 | if (ifr->ifr_flags & IFF_TUN_EXCL) |
| @@ -1738,8 +1743,7 @@ static void tun_detach_filter(struct tun_struct *tun, int n) | |||
| 1738 | struct tun_file *tfile; | 1743 | struct tun_file *tfile; |
| 1739 | 1744 | ||
| 1740 | for (i = 0; i < n; i++) { | 1745 | for (i = 0; i < n; i++) { |
| 1741 | tfile = rcu_dereference_protected(tun->tfiles[i], | 1746 | tfile = rtnl_dereference(tun->tfiles[i]); |
| 1742 | lockdep_rtnl_is_held()); | ||
| 1743 | sk_detach_filter(tfile->socket.sk); | 1747 | sk_detach_filter(tfile->socket.sk); |
| 1744 | } | 1748 | } |
| 1745 | 1749 | ||
| @@ -1752,8 +1756,7 @@ static int tun_attach_filter(struct tun_struct *tun) | |||
| 1752 | struct tun_file *tfile; | 1756 | struct tun_file *tfile; |
| 1753 | 1757 | ||
| 1754 | for (i = 0; i < tun->numqueues; i++) { | 1758 | for (i = 0; i < tun->numqueues; i++) { |
| 1755 | tfile = rcu_dereference_protected(tun->tfiles[i], | 1759 | tfile = rtnl_dereference(tun->tfiles[i]); |
| 1756 | lockdep_rtnl_is_held()); | ||
| 1757 | ret = sk_attach_filter(&tun->fprog, tfile->socket.sk); | 1760 | ret = sk_attach_filter(&tun->fprog, tfile->socket.sk); |
| 1758 | if (ret) { | 1761 | if (ret) { |
| 1759 | tun_detach_filter(tun, i); | 1762 | tun_detach_filter(tun, i); |
| @@ -1771,8 +1774,7 @@ static void tun_set_sndbuf(struct tun_struct *tun) | |||
| 1771 | int i; | 1774 | int i; |
| 1772 | 1775 | ||
| 1773 | for (i = 0; i < tun->numqueues; i++) { | 1776 | for (i = 0; i < tun->numqueues; i++) { |
| 1774 | tfile = rcu_dereference_protected(tun->tfiles[i], | 1777 | tfile = rtnl_dereference(tun->tfiles[i]); |
| 1775 | lockdep_rtnl_is_held()); | ||
| 1776 | tfile->socket.sk->sk_sndbuf = tun->sndbuf; | 1778 | tfile->socket.sk->sk_sndbuf = tun->sndbuf; |
| 1777 | } | 1779 | } |
| 1778 | } | 1780 | } |
| @@ -1789,13 +1791,10 @@ static int tun_set_queue(struct file *file, struct ifreq *ifr) | |||
| 1789 | tun = tfile->detached; | 1791 | tun = tfile->detached; |
| 1790 | if (!tun) | 1792 | if (!tun) |
| 1791 | ret = -EINVAL; | 1793 | ret = -EINVAL; |
| 1792 | else if (tun_not_capable(tun)) | ||
| 1793 | ret = -EPERM; | ||
| 1794 | else | 1794 | else |
| 1795 | ret = tun_attach(tun, file); | 1795 | ret = tun_attach(tun, file); |
| 1796 | } else if (ifr->ifr_flags & IFF_DETACH_QUEUE) { | 1796 | } else if (ifr->ifr_flags & IFF_DETACH_QUEUE) { |
| 1797 | tun = rcu_dereference_protected(tfile->tun, | 1797 | tun = rtnl_dereference(tfile->tun); |
| 1798 | lockdep_rtnl_is_held()); | ||
| 1799 | if (!tun || !(tun->flags & TUN_TAP_MQ)) | 1798 | if (!tun || !(tun->flags & TUN_TAP_MQ)) |
| 1800 | ret = -EINVAL; | 1799 | ret = -EINVAL; |
| 1801 | else | 1800 | else |
| @@ -1880,10 +1879,11 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd, | |||
| 1880 | /* Disable/Enable persist mode. Keep an extra reference to the | 1879 | /* Disable/Enable persist mode. Keep an extra reference to the |
| 1881 | * module to prevent the module being unprobed. | 1880 | * module to prevent the module being unprobed. |
| 1882 | */ | 1881 | */ |
| 1883 | if (arg) { | 1882 | if (arg && !(tun->flags & TUN_PERSIST)) { |
| 1884 | tun->flags |= TUN_PERSIST; | 1883 | tun->flags |= TUN_PERSIST; |
| 1885 | __module_get(THIS_MODULE); | 1884 | __module_get(THIS_MODULE); |
| 1886 | } else { | 1885 | } |
| 1886 | if (!arg && (tun->flags & TUN_PERSIST)) { | ||
| 1887 | tun->flags &= ~TUN_PERSIST; | 1887 | tun->flags &= ~TUN_PERSIST; |
| 1888 | module_put(THIS_MODULE); | 1888 | module_put(THIS_MODULE); |
| 1889 | } | 1889 | } |
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 91d7cb9728eb..6a1ca500e612 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c | |||
| @@ -458,6 +458,7 @@ static const struct usb_device_id products[] = { | |||
| 458 | {QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */ | 458 | {QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */ |
| 459 | {QMI_FIXED_INTF(0x1199, 0x68a2, 19)}, /* Sierra Wireless MC7710 in QMI mode */ | 459 | {QMI_FIXED_INTF(0x1199, 0x68a2, 19)}, /* Sierra Wireless MC7710 in QMI mode */ |
| 460 | {QMI_FIXED_INTF(0x1199, 0x901c, 8)}, /* Sierra Wireless EM7700 */ | 460 | {QMI_FIXED_INTF(0x1199, 0x901c, 8)}, /* Sierra Wireless EM7700 */ |
| 461 | {QMI_FIXED_INTF(0x1bbb, 0x011e, 4)}, /* Telekom Speedstick LTE II (Alcatel One Touch L100V LTE) */ | ||
| 461 | 462 | ||
| 462 | /* 4. Gobi 1000 devices */ | 463 | /* 4. Gobi 1000 devices */ |
| 463 | {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */ | 464 | {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */ |
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 40f2cc135a49..656230e0d18c 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c | |||
| @@ -1191,6 +1191,7 @@ static void vxlan_setup(struct net_device *dev) | |||
| 1191 | 1191 | ||
| 1192 | dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_RXCSUM; | 1192 | dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_RXCSUM; |
| 1193 | dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; | 1193 | dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; |
| 1194 | dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; | ||
| 1194 | 1195 | ||
| 1195 | spin_lock_init(&vxlan->hash_lock); | 1196 | spin_lock_init(&vxlan->hash_lock); |
| 1196 | 1197 | ||
diff --git a/drivers/net/wireless/ath/Kconfig b/drivers/net/wireless/ath/Kconfig index 1a67a4f829fe..2c02b4e84094 100644 --- a/drivers/net/wireless/ath/Kconfig +++ b/drivers/net/wireless/ath/Kconfig | |||
| @@ -30,5 +30,6 @@ source "drivers/net/wireless/ath/ath9k/Kconfig" | |||
| 30 | source "drivers/net/wireless/ath/carl9170/Kconfig" | 30 | source "drivers/net/wireless/ath/carl9170/Kconfig" |
| 31 | source "drivers/net/wireless/ath/ath6kl/Kconfig" | 31 | source "drivers/net/wireless/ath/ath6kl/Kconfig" |
| 32 | source "drivers/net/wireless/ath/ar5523/Kconfig" | 32 | source "drivers/net/wireless/ath/ar5523/Kconfig" |
| 33 | source "drivers/net/wireless/ath/wil6210/Kconfig" | ||
| 33 | 34 | ||
| 34 | endif | 35 | endif |
diff --git a/drivers/net/wireless/ath/Makefile b/drivers/net/wireless/ath/Makefile index 1e18621326dc..97b964ded2be 100644 --- a/drivers/net/wireless/ath/Makefile +++ b/drivers/net/wireless/ath/Makefile | |||
| @@ -3,6 +3,7 @@ obj-$(CONFIG_ATH9K_HW) += ath9k/ | |||
| 3 | obj-$(CONFIG_CARL9170) += carl9170/ | 3 | obj-$(CONFIG_CARL9170) += carl9170/ |
| 4 | obj-$(CONFIG_ATH6KL) += ath6kl/ | 4 | obj-$(CONFIG_ATH6KL) += ath6kl/ |
| 5 | obj-$(CONFIG_AR5523) += ar5523/ | 5 | obj-$(CONFIG_AR5523) += ar5523/ |
| 6 | obj-$(CONFIG_WIL6210) += wil6210/ | ||
| 6 | 7 | ||
| 7 | obj-$(CONFIG_ATH_COMMON) += ath.o | 8 | obj-$(CONFIG_ATH_COMMON) += ath.o |
| 8 | 9 | ||
diff --git a/drivers/net/wireless/ath/ath9k/Kconfig b/drivers/net/wireless/ath/ath9k/Kconfig index 5fc15bf8be09..7647ed6b73d7 100644 --- a/drivers/net/wireless/ath/ath9k/Kconfig +++ b/drivers/net/wireless/ath/ath9k/Kconfig | |||
| @@ -2,6 +2,7 @@ config ATH9K_HW | |||
| 2 | tristate | 2 | tristate |
| 3 | config ATH9K_COMMON | 3 | config ATH9K_COMMON |
| 4 | tristate | 4 | tristate |
| 5 | select ATH_COMMON | ||
| 5 | config ATH9K_DFS_DEBUGFS | 6 | config ATH9K_DFS_DEBUGFS |
| 6 | def_bool y | 7 | def_bool y |
| 7 | depends on ATH9K_DEBUGFS && ATH9K_DFS_CERTIFIED | 8 | depends on ATH9K_DEBUGFS && ATH9K_DFS_CERTIFIED |
| @@ -17,7 +18,6 @@ config ATH9K_BTCOEX_SUPPORT | |||
| 17 | config ATH9K | 18 | config ATH9K |
| 18 | tristate "Atheros 802.11n wireless cards support" | 19 | tristate "Atheros 802.11n wireless cards support" |
| 19 | depends on MAC80211 | 20 | depends on MAC80211 |
| 20 | select ATH_COMMON | ||
| 21 | select ATH9K_HW | 21 | select ATH9K_HW |
| 22 | select MAC80211_LEDS | 22 | select MAC80211_LEDS |
| 23 | select LEDS_CLASS | 23 | select LEDS_CLASS |
| @@ -56,7 +56,8 @@ config ATH9K_AHB | |||
| 56 | 56 | ||
| 57 | config ATH9K_DEBUGFS | 57 | config ATH9K_DEBUGFS |
| 58 | bool "Atheros ath9k debugging" | 58 | bool "Atheros ath9k debugging" |
| 59 | depends on ATH9K && DEBUG_FS | 59 | depends on ATH9K |
| 60 | select MAC80211_DEBUGFS | ||
| 60 | ---help--- | 61 | ---help--- |
| 61 | Say Y, if you need access to ath9k's statistics for | 62 | Say Y, if you need access to ath9k's statistics for |
| 62 | interrupts, rate control, etc. | 63 | interrupts, rate control, etc. |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c index 74fd3977feeb..59bf5f31e212 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c | |||
| @@ -544,7 +544,7 @@ static void ar9003_rx_gain_table_mode0(struct ath_hw *ah) | |||
| 544 | ar9340Common_rx_gain_table_1p0); | 544 | ar9340Common_rx_gain_table_1p0); |
| 545 | else if (AR_SREV_9485_11(ah)) | 545 | else if (AR_SREV_9485_11(ah)) |
| 546 | INIT_INI_ARRAY(&ah->iniModesRxGain, | 546 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 547 | ar9485Common_wo_xlna_rx_gain_1_1); | 547 | ar9485_common_rx_gain_1_1); |
| 548 | else if (AR_SREV_9550(ah)) { | 548 | else if (AR_SREV_9550(ah)) { |
| 549 | INIT_INI_ARRAY(&ah->iniModesRxGain, | 549 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 550 | ar955x_1p0_common_rx_gain_table); | 550 | ar955x_1p0_common_rx_gain_table); |
diff --git a/drivers/net/wireless/ath/carl9170/fw.c b/drivers/net/wireless/ath/carl9170/fw.c index aaebecd19e59..63fd9af3fd39 100644 --- a/drivers/net/wireless/ath/carl9170/fw.c +++ b/drivers/net/wireless/ath/carl9170/fw.c | |||
| @@ -336,8 +336,12 @@ static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len) | |||
| 336 | if (SUPP(CARL9170FW_WLANTX_CAB)) { | 336 | if (SUPP(CARL9170FW_WLANTX_CAB)) { |
| 337 | if_comb_types |= | 337 | if_comb_types |= |
| 338 | BIT(NL80211_IFTYPE_AP) | | 338 | BIT(NL80211_IFTYPE_AP) | |
| 339 | BIT(NL80211_IFTYPE_MESH_POINT) | | ||
| 340 | BIT(NL80211_IFTYPE_P2P_GO); | 339 | BIT(NL80211_IFTYPE_P2P_GO); |
| 340 | |||
| 341 | #ifdef CONFIG_MAC80211_MESH | ||
| 342 | if_comb_types |= | ||
| 343 | BIT(NL80211_IFTYPE_MESH_POINT); | ||
| 344 | #endif /* CONFIG_MAC80211_MESH */ | ||
| 341 | } | 345 | } |
| 342 | } | 346 | } |
| 343 | 347 | ||
diff --git a/drivers/net/wireless/ath/wil6210/Kconfig b/drivers/net/wireless/ath/wil6210/Kconfig new file mode 100644 index 000000000000..bac3d98a0cfb --- /dev/null +++ b/drivers/net/wireless/ath/wil6210/Kconfig | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | config WIL6210 | ||
| 2 | tristate "Wilocity 60g WiFi card wil6210 support" | ||
| 3 | depends on CFG80211 | ||
| 4 | depends on PCI | ||
| 5 | default n | ||
| 6 | ---help--- | ||
| 7 | This module adds support for wireless adapter based on | ||
| 8 | wil6210 chip by Wilocity. It supports operation on the | ||
| 9 | 60 GHz band, covered by the IEEE802.11ad standard. | ||
| 10 | |||
| 11 | http://wireless.kernel.org/en/users/Drivers/wil6210 | ||
| 12 | |||
| 13 | If you choose to build it as a module, it will be called | ||
| 14 | wil6210 | ||
| 15 | |||
| 16 | config WIL6210_ISR_COR | ||
| 17 | bool "Use Clear-On-Read mode for ISR registers for wil6210" | ||
| 18 | depends on WIL6210 | ||
| 19 | default y | ||
| 20 | ---help--- | ||
| 21 | ISR registers on wil6210 chip may operate in either | ||
| 22 | COR (Clear-On-Read) or W1C (Write-1-to-Clear) mode. | ||
| 23 | For production code, use COR (say y); is default since | ||
| 24 | it saves extra target transaction; | ||
| 25 | For ISR debug, use W1C (say n); is allows to monitor ISR | ||
| 26 | registers with debugfs. If COR were used, ISR would | ||
| 27 | self-clear when accessed for debug purposes, it makes | ||
| 28 | such monitoring impossible. | ||
| 29 | Say y unless you debug interrupts | ||
diff --git a/drivers/net/wireless/ath/wil6210/Makefile b/drivers/net/wireless/ath/wil6210/Makefile new file mode 100644 index 000000000000..9396dc9fe3c5 --- /dev/null +++ b/drivers/net/wireless/ath/wil6210/Makefile | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | obj-$(CONFIG_WIL6210) += wil6210.o | ||
| 2 | |||
| 3 | wil6210-objs := main.o | ||
| 4 | wil6210-objs += netdev.o | ||
| 5 | wil6210-objs += cfg80211.o | ||
| 6 | wil6210-objs += pcie_bus.o | ||
| 7 | wil6210-objs += debugfs.o | ||
| 8 | wil6210-objs += wmi.o | ||
| 9 | wil6210-objs += interrupt.o | ||
| 10 | wil6210-objs += txrx.o | ||
| 11 | |||
| 12 | subdir-ccflags-y += -Werror | ||
| 13 | subdir-ccflags-y += -D__CHECK_ENDIAN__ | ||
diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c new file mode 100644 index 000000000000..116f4e807ae1 --- /dev/null +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c | |||
| @@ -0,0 +1,573 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012 Qualcomm Atheros, Inc. | ||
| 3 | * | ||
| 4 | * Permission to use, copy, modify, and/or distribute this software for any | ||
| 5 | * purpose with or without fee is hereby granted, provided that the above | ||
| 6 | * copyright notice and this permission notice appear in all copies. | ||
| 7 | * | ||
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <linux/kernel.h> | ||
| 18 | #include <linux/netdevice.h> | ||
| 19 | #include <linux/sched.h> | ||
| 20 | #include <linux/etherdevice.h> | ||
| 21 | #include <linux/wireless.h> | ||
| 22 | #include <linux/ieee80211.h> | ||
| 23 | #include <linux/slab.h> | ||
| 24 | #include <linux/version.h> | ||
| 25 | #include <net/cfg80211.h> | ||
| 26 | |||
| 27 | #include "wil6210.h" | ||
| 28 | #include "wmi.h" | ||
| 29 | |||
| 30 | #define CHAN60G(_channel, _flags) { \ | ||
| 31 | .band = IEEE80211_BAND_60GHZ, \ | ||
| 32 | .center_freq = 56160 + (2160 * (_channel)), \ | ||
| 33 | .hw_value = (_channel), \ | ||
| 34 | .flags = (_flags), \ | ||
| 35 | .max_antenna_gain = 0, \ | ||
| 36 | .max_power = 40, \ | ||
| 37 | } | ||
| 38 | |||
| 39 | static struct ieee80211_channel wil_60ghz_channels[] = { | ||
| 40 | CHAN60G(1, 0), | ||
| 41 | CHAN60G(2, 0), | ||
| 42 | CHAN60G(3, 0), | ||
| 43 | /* channel 4 not supported yet */ | ||
| 44 | }; | ||
| 45 | |||
| 46 | static struct ieee80211_supported_band wil_band_60ghz = { | ||
| 47 | .channels = wil_60ghz_channels, | ||
| 48 | .n_channels = ARRAY_SIZE(wil_60ghz_channels), | ||
| 49 | .ht_cap = { | ||
| 50 | .ht_supported = true, | ||
| 51 | .cap = 0, /* TODO */ | ||
| 52 | .ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K, /* TODO */ | ||
| 53 | .ampdu_density = IEEE80211_HT_MPDU_DENSITY_8, /* TODO */ | ||
| 54 | .mcs = { | ||
| 55 | /* MCS 1..12 - SC PHY */ | ||
| 56 | .rx_mask = {0xfe, 0x1f}, /* 1..12 */ | ||
| 57 | .tx_params = IEEE80211_HT_MCS_TX_DEFINED, /* TODO */ | ||
| 58 | }, | ||
| 59 | }, | ||
| 60 | }; | ||
| 61 | |||
| 62 | static const struct ieee80211_txrx_stypes | ||
| 63 | wil_mgmt_stypes[NUM_NL80211_IFTYPES] = { | ||
| 64 | [NL80211_IFTYPE_STATION] = { | ||
| 65 | .tx = BIT(IEEE80211_STYPE_ACTION >> 4) | | ||
| 66 | BIT(IEEE80211_STYPE_PROBE_RESP >> 4), | ||
| 67 | .rx = BIT(IEEE80211_STYPE_ACTION >> 4) | | ||
| 68 | BIT(IEEE80211_STYPE_PROBE_REQ >> 4) | ||
| 69 | }, | ||
| 70 | [NL80211_IFTYPE_AP] = { | ||
| 71 | .tx = BIT(IEEE80211_STYPE_ACTION >> 4) | | ||
| 72 | BIT(IEEE80211_STYPE_PROBE_RESP >> 4), | ||
| 73 | .rx = BIT(IEEE80211_STYPE_ACTION >> 4) | | ||
| 74 | BIT(IEEE80211_STYPE_PROBE_REQ >> 4) | ||
| 75 | }, | ||
| 76 | [NL80211_IFTYPE_P2P_CLIENT] = { | ||
| 77 | .tx = BIT(IEEE80211_STYPE_ACTION >> 4) | | ||
| 78 | BIT(IEEE80211_STYPE_PROBE_RESP >> 4), | ||
| 79 | .rx = BIT(IEEE80211_STYPE_ACTION >> 4) | | ||
| 80 | BIT(IEEE80211_STYPE_PROBE_REQ >> 4) | ||
| 81 | }, | ||
| 82 | [NL80211_IFTYPE_P2P_GO] = { | ||
| 83 | .tx = BIT(IEEE80211_STYPE_ACTION >> 4) | | ||
| 84 | BIT(IEEE80211_STYPE_PROBE_RESP >> 4), | ||
| 85 | .rx = BIT(IEEE80211_STYPE_ACTION >> 4) | | ||
| 86 | BIT(IEEE80211_STYPE_PROBE_REQ >> 4) | ||
| 87 | }, | ||
| 88 | }; | ||
| 89 | |||
| 90 | static const u32 wil_cipher_suites[] = { | ||
| 91 | WLAN_CIPHER_SUITE_GCMP, | ||
| 92 | }; | ||
| 93 | |||
| 94 | int wil_iftype_nl2wmi(enum nl80211_iftype type) | ||
| 95 | { | ||
| 96 | static const struct { | ||
| 97 | enum nl80211_iftype nl; | ||
| 98 | enum wmi_network_type wmi; | ||
| 99 | } __nl2wmi[] = { | ||
| 100 | {NL80211_IFTYPE_ADHOC, WMI_NETTYPE_ADHOC}, | ||
| 101 | {NL80211_IFTYPE_STATION, WMI_NETTYPE_INFRA}, | ||
| 102 | {NL80211_IFTYPE_AP, WMI_NETTYPE_AP}, | ||
| 103 | {NL80211_IFTYPE_P2P_CLIENT, WMI_NETTYPE_P2P}, | ||
| 104 | {NL80211_IFTYPE_P2P_GO, WMI_NETTYPE_P2P}, | ||
| 105 | {NL80211_IFTYPE_MONITOR, WMI_NETTYPE_ADHOC}, /* FIXME */ | ||
| 106 | }; | ||
| 107 | uint i; | ||
| 108 | |||
| 109 | for (i = 0; i < ARRAY_SIZE(__nl2wmi); i++) { | ||
| 110 | if (__nl2wmi[i].nl == type) | ||
| 111 | return __nl2wmi[i].wmi; | ||
| 112 | } | ||
| 113 | |||
| 114 | return -EOPNOTSUPP; | ||
| 115 | } | ||
| 116 | |||
| 117 | static int wil_cfg80211_get_station(struct wiphy *wiphy, | ||
| 118 | struct net_device *ndev, | ||
| 119 | u8 *mac, struct station_info *sinfo) | ||
| 120 | { | ||
| 121 | struct wil6210_priv *wil = wiphy_to_wil(wiphy); | ||
| 122 | int rc; | ||
| 123 | struct wmi_notify_req_cmd cmd = { | ||
| 124 | .cid = 0, | ||
| 125 | .interval_usec = 0, | ||
| 126 | }; | ||
| 127 | |||
| 128 | if (memcmp(mac, wil->dst_addr[0], ETH_ALEN)) | ||
| 129 | return -ENOENT; | ||
| 130 | |||
| 131 | /* WMI_NOTIFY_REQ_DONE_EVENTID handler fills wil->stats.bf_mcs */ | ||
| 132 | rc = wmi_call(wil, WMI_NOTIFY_REQ_CMDID, &cmd, sizeof(cmd), | ||
| 133 | WMI_NOTIFY_REQ_DONE_EVENTID, NULL, 0, 20); | ||
| 134 | if (rc) | ||
| 135 | return rc; | ||
| 136 | |||
| 137 | sinfo->generation = wil->sinfo_gen; | ||
| 138 | |||
| 139 | sinfo->filled |= STATION_INFO_TX_BITRATE; | ||
| 140 | sinfo->txrate.flags = RATE_INFO_FLAGS_MCS | RATE_INFO_FLAGS_60G; | ||
| 141 | sinfo->txrate.mcs = wil->stats.bf_mcs; | ||
| 142 | sinfo->filled |= STATION_INFO_RX_BITRATE; | ||
| 143 | sinfo->rxrate.flags = RATE_INFO_FLAGS_MCS | RATE_INFO_FLAGS_60G; | ||
| 144 | sinfo->rxrate.mcs = wil->stats.last_mcs_rx; | ||
| 145 | |||
| 146 | if (test_bit(wil_status_fwconnected, &wil->status)) { | ||
| 147 | sinfo->filled |= STATION_INFO_SIGNAL; | ||
| 148 | sinfo->signal = 12; /* TODO: provide real value */ | ||
| 149 | } | ||
| 150 | |||
| 151 | return 0; | ||
| 152 | } | ||
| 153 | |||
| 154 | static int wil_cfg80211_change_iface(struct wiphy *wiphy, | ||
| 155 | struct net_device *ndev, | ||
| 156 | enum nl80211_iftype type, u32 *flags, | ||
| 157 | struct vif_params *params) | ||
| 158 | { | ||
| 159 | struct wil6210_priv *wil = wiphy_to_wil(wiphy); | ||
| 160 | struct wireless_dev *wdev = wil->wdev; | ||
| 161 | |||
| 162 | switch (type) { | ||
| 163 | case NL80211_IFTYPE_STATION: | ||
| 164 | case NL80211_IFTYPE_AP: | ||
| 165 | case NL80211_IFTYPE_P2P_CLIENT: | ||
| 166 | case NL80211_IFTYPE_P2P_GO: | ||
| 167 | break; | ||
| 168 | case NL80211_IFTYPE_MONITOR: | ||
| 169 | if (flags) | ||
| 170 | wil->monitor_flags = *flags; | ||
| 171 | else | ||
| 172 | wil->monitor_flags = 0; | ||
| 173 | |||
| 174 | break; | ||
| 175 | default: | ||
| 176 | return -EOPNOTSUPP; | ||
| 177 | } | ||
| 178 | |||
| 179 | wdev->iftype = type; | ||
| 180 | |||
| 181 | return 0; | ||
| 182 | } | ||
| 183 | |||
| 184 | static int wil_cfg80211_scan(struct wiphy *wiphy, | ||
| 185 | struct cfg80211_scan_request *request) | ||
| 186 | { | ||
| 187 | struct wil6210_priv *wil = wiphy_to_wil(wiphy); | ||
| 188 | struct wireless_dev *wdev = wil->wdev; | ||
| 189 | struct { | ||
| 190 | struct wmi_start_scan_cmd cmd; | ||
| 191 | u16 chnl[4]; | ||
| 192 | } __packed cmd; | ||
| 193 | uint i, n; | ||
| 194 | |||
| 195 | if (wil->scan_request) { | ||
| 196 | wil_err(wil, "Already scanning\n"); | ||
| 197 | return -EAGAIN; | ||
| 198 | } | ||
| 199 | |||
| 200 | /* check we are client side */ | ||
| 201 | switch (wdev->iftype) { | ||
| 202 | case NL80211_IFTYPE_STATION: | ||
| 203 | case NL80211_IFTYPE_P2P_CLIENT: | ||
| 204 | break; | ||
| 205 | default: | ||
| 206 | return -EOPNOTSUPP; | ||
| 207 | |||
| 208 | } | ||
| 209 | |||
| 210 | /* FW don't support scan after connection attempt */ | ||
| 211 | if (test_bit(wil_status_dontscan, &wil->status)) { | ||
| 212 | wil_err(wil, "Scan after connect attempt not supported\n"); | ||
| 213 | return -EBUSY; | ||
| 214 | } | ||
| 215 | |||
| 216 | wil->scan_request = request; | ||
| 217 | |||
| 218 | memset(&cmd, 0, sizeof(cmd)); | ||
| 219 | cmd.cmd.num_channels = 0; | ||
| 220 | n = min(request->n_channels, 4U); | ||
| 221 | for (i = 0; i < n; i++) { | ||
| 222 | int ch = request->channels[i]->hw_value; | ||
| 223 | if (ch == 0) { | ||
| 224 | wil_err(wil, | ||
| 225 | "Scan requested for unknown frequency %dMhz\n", | ||
| 226 | request->channels[i]->center_freq); | ||
| 227 | continue; | ||
| 228 | } | ||
| 229 | /* 0-based channel indexes */ | ||
| 230 | cmd.cmd.channel_list[cmd.cmd.num_channels++].channel = ch - 1; | ||
| 231 | wil_dbg(wil, "Scan for ch %d : %d MHz\n", ch, | ||
| 232 | request->channels[i]->center_freq); | ||
| 233 | } | ||
| 234 | |||
| 235 | return wmi_send(wil, WMI_START_SCAN_CMDID, &cmd, sizeof(cmd.cmd) + | ||
| 236 | cmd.cmd.num_channels * sizeof(cmd.cmd.channel_list[0])); | ||
| 237 | } | ||
| 238 | |||
| 239 | static int wil_cfg80211_connect(struct wiphy *wiphy, | ||
| 240 | struct net_device *ndev, | ||
| 241 | struct cfg80211_connect_params *sme) | ||
| 242 | { | ||
| 243 | struct wil6210_priv *wil = wiphy_to_wil(wiphy); | ||
| 244 | struct cfg80211_bss *bss; | ||
| 245 | struct wmi_connect_cmd conn; | ||
| 246 | const u8 *ssid_eid; | ||
| 247 | const u8 *rsn_eid; | ||
| 248 | int ch; | ||
| 249 | int rc = 0; | ||
| 250 | |||
| 251 | bss = cfg80211_get_bss(wiphy, sme->channel, sme->bssid, | ||
| 252 | sme->ssid, sme->ssid_len, | ||
| 253 | WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS); | ||
| 254 | if (!bss) { | ||
| 255 | wil_err(wil, "Unable to find BSS\n"); | ||
| 256 | return -ENOENT; | ||
| 257 | } | ||
| 258 | |||
| 259 | ssid_eid = ieee80211_bss_get_ie(bss, WLAN_EID_SSID); | ||
| 260 | if (!ssid_eid) { | ||
| 261 | wil_err(wil, "No SSID\n"); | ||
| 262 | rc = -ENOENT; | ||
| 263 | goto out; | ||
| 264 | } | ||
| 265 | |||
| 266 | rsn_eid = sme->ie ? | ||
| 267 | cfg80211_find_ie(WLAN_EID_RSN, sme->ie, sme->ie_len) : | ||
| 268 | NULL; | ||
| 269 | if (rsn_eid) { | ||
| 270 | if (sme->ie_len > WMI_MAX_IE_LEN) { | ||
| 271 | rc = -ERANGE; | ||
| 272 | wil_err(wil, "IE too large (%td bytes)\n", | ||
| 273 | sme->ie_len); | ||
| 274 | goto out; | ||
| 275 | } | ||
| 276 | /* | ||
| 277 | * For secure assoc, send: | ||
| 278 | * (1) WMI_DELETE_CIPHER_KEY_CMD | ||
| 279 | * (2) WMI_SET_APPIE_CMD | ||
| 280 | */ | ||
| 281 | rc = wmi_del_cipher_key(wil, 0, bss->bssid); | ||
| 282 | if (rc) { | ||
| 283 | wil_err(wil, "WMI_DELETE_CIPHER_KEY_CMD failed\n"); | ||
| 284 | goto out; | ||
| 285 | } | ||
| 286 | /* WMI_SET_APPIE_CMD */ | ||
| 287 | rc = wmi_set_ie(wil, WMI_FRAME_ASSOC_REQ, sme->ie_len, sme->ie); | ||
| 288 | if (rc) { | ||
| 289 | wil_err(wil, "WMI_SET_APPIE_CMD failed\n"); | ||
| 290 | goto out; | ||
| 291 | } | ||
| 292 | } | ||
| 293 | |||
| 294 | /* WMI_CONNECT_CMD */ | ||
| 295 | memset(&conn, 0, sizeof(conn)); | ||
| 296 | switch (bss->capability & 0x03) { | ||
| 297 | case WLAN_CAPABILITY_DMG_TYPE_AP: | ||
| 298 | conn.network_type = WMI_NETTYPE_INFRA; | ||
| 299 | break; | ||
| 300 | case WLAN_CAPABILITY_DMG_TYPE_PBSS: | ||
| 301 | conn.network_type = WMI_NETTYPE_P2P; | ||
| 302 | break; | ||
| 303 | default: | ||
| 304 | wil_err(wil, "Unsupported BSS type, capability= 0x%04x\n", | ||
| 305 | bss->capability); | ||
| 306 | goto out; | ||
| 307 | } | ||
| 308 | if (rsn_eid) { | ||
| 309 | conn.dot11_auth_mode = WMI_AUTH11_SHARED; | ||
| 310 | conn.auth_mode = WMI_AUTH_WPA2_PSK; | ||
| 311 | conn.pairwise_crypto_type = WMI_CRYPT_AES_GCMP; | ||
| 312 | conn.pairwise_crypto_len = 16; | ||
| 313 | } else { | ||
| 314 | conn.dot11_auth_mode = WMI_AUTH11_OPEN; | ||
| 315 | conn.auth_mode = WMI_AUTH_NONE; | ||
| 316 | } | ||
| 317 | |||
| 318 | conn.ssid_len = min_t(u8, ssid_eid[1], 32); | ||
| 319 | memcpy(conn.ssid, ssid_eid+2, conn.ssid_len); | ||
| 320 | |||
| 321 | ch = bss->channel->hw_value; | ||
| 322 | if (ch == 0) { | ||
| 323 | wil_err(wil, "BSS at unknown frequency %dMhz\n", | ||
| 324 | bss->channel->center_freq); | ||
| 325 | rc = -EOPNOTSUPP; | ||
| 326 | goto out; | ||
| 327 | } | ||
| 328 | conn.channel = ch - 1; | ||
| 329 | |||
| 330 | memcpy(conn.bssid, bss->bssid, 6); | ||
| 331 | memcpy(conn.dst_mac, bss->bssid, 6); | ||
| 332 | /* | ||
| 333 | * FW don't support scan after connection attempt | ||
| 334 | */ | ||
| 335 | set_bit(wil_status_dontscan, &wil->status); | ||
| 336 | |||
| 337 | rc = wmi_send(wil, WMI_CONNECT_CMDID, &conn, sizeof(conn)); | ||
| 338 | if (rc == 0) { | ||
| 339 | /* Connect can take lots of time */ | ||
| 340 | mod_timer(&wil->connect_timer, | ||
| 341 | jiffies + msecs_to_jiffies(2000)); | ||
| 342 | } | ||
| 343 | |||
| 344 | out: | ||
| 345 | cfg80211_put_bss(bss); | ||
| 346 | |||
| 347 | return rc; | ||
| 348 | } | ||
| 349 | |||
| 350 | static int wil_cfg80211_disconnect(struct wiphy *wiphy, | ||
| 351 | struct net_device *ndev, | ||
| 352 | u16 reason_code) | ||
| 353 | { | ||
| 354 | int rc; | ||
| 355 | struct wil6210_priv *wil = wiphy_to_wil(wiphy); | ||
| 356 | |||
| 357 | rc = wmi_send(wil, WMI_DISCONNECT_CMDID, NULL, 0); | ||
| 358 | |||
| 359 | return rc; | ||
| 360 | } | ||
| 361 | |||
| 362 | static int wil_cfg80211_set_channel(struct wiphy *wiphy, | ||
| 363 | struct cfg80211_chan_def *chandef) | ||
| 364 | { | ||
| 365 | struct wil6210_priv *wil = wiphy_to_wil(wiphy); | ||
| 366 | struct wireless_dev *wdev = wil->wdev; | ||
| 367 | |||
| 368 | wdev->preset_chandef = *chandef; | ||
| 369 | |||
| 370 | return 0; | ||
| 371 | } | ||
| 372 | |||
| 373 | static int wil_cfg80211_add_key(struct wiphy *wiphy, | ||
| 374 | struct net_device *ndev, | ||
| 375 | u8 key_index, bool pairwise, | ||
| 376 | const u8 *mac_addr, | ||
| 377 | struct key_params *params) | ||
| 378 | { | ||
| 379 | struct wil6210_priv *wil = wiphy_to_wil(wiphy); | ||
| 380 | |||
| 381 | /* group key is not used */ | ||
| 382 | if (!pairwise) | ||
| 383 | return 0; | ||
| 384 | |||
| 385 | return wmi_add_cipher_key(wil, key_index, mac_addr, | ||
| 386 | params->key_len, params->key); | ||
| 387 | } | ||
| 388 | |||
| 389 | static int wil_cfg80211_del_key(struct wiphy *wiphy, | ||
| 390 | struct net_device *ndev, | ||
| 391 | u8 key_index, bool pairwise, | ||
| 392 | const u8 *mac_addr) | ||
| 393 | { | ||
| 394 | struct wil6210_priv *wil = wiphy_to_wil(wiphy); | ||
| 395 | |||
| 396 | /* group key is not used */ | ||
| 397 | if (!pairwise) | ||
| 398 | return 0; | ||
| 399 | |||
| 400 | return wmi_del_cipher_key(wil, key_index, mac_addr); | ||
| 401 | } | ||
| 402 | |||
| 403 | /* Need to be present or wiphy_new() will WARN */ | ||
| 404 | static int wil_cfg80211_set_default_key(struct wiphy *wiphy, | ||
| 405 | struct net_device *ndev, | ||
| 406 | u8 key_index, bool unicast, | ||
| 407 | bool multicast) | ||
| 408 | { | ||
| 409 | return 0; | ||
| 410 | } | ||
| 411 | |||
| 412 | static int wil_cfg80211_start_ap(struct wiphy *wiphy, | ||
| 413 | struct net_device *ndev, | ||
| 414 | struct cfg80211_ap_settings *info) | ||
| 415 | { | ||
| 416 | int rc = 0; | ||
| 417 | struct wil6210_priv *wil = wiphy_to_wil(wiphy); | ||
| 418 | struct wireless_dev *wdev = ndev->ieee80211_ptr; | ||
| 419 | struct ieee80211_channel *channel = info->chandef.chan; | ||
| 420 | struct cfg80211_beacon_data *bcon = &info->beacon; | ||
| 421 | u8 wmi_nettype = wil_iftype_nl2wmi(wdev->iftype); | ||
| 422 | |||
| 423 | if (!channel) { | ||
| 424 | wil_err(wil, "AP: No channel???\n"); | ||
| 425 | return -EINVAL; | ||
| 426 | } | ||
| 427 | |||
| 428 | wil_dbg(wil, "AP on Channel %d %d MHz, %s\n", channel->hw_value, | ||
| 429 | channel->center_freq, info->privacy ? "secure" : "open"); | ||
| 430 | print_hex_dump_bytes("SSID ", DUMP_PREFIX_OFFSET, | ||
| 431 | info->ssid, info->ssid_len); | ||
| 432 | |||
| 433 | rc = wil_reset(wil); | ||
| 434 | if (rc) | ||
| 435 | return rc; | ||
| 436 | |||
| 437 | rc = wmi_set_ssid(wil, info->ssid_len, info->ssid); | ||
| 438 | if (rc) | ||
| 439 | return rc; | ||
| 440 | |||
| 441 | rc = wmi_set_channel(wil, channel->hw_value); | ||
| 442 | if (rc) | ||
| 443 | return rc; | ||
| 444 | |||
| 445 | /* MAC address - pre-requisite for other commands */ | ||
| 446 | wmi_set_mac_address(wil, ndev->dev_addr); | ||
| 447 | |||
| 448 | /* IE's */ | ||
| 449 | /* bcon 'head IE's are not relevant for 60g band */ | ||
| 450 | wmi_set_ie(wil, WMI_FRAME_BEACON, bcon->beacon_ies_len, | ||
| 451 | bcon->beacon_ies); | ||
| 452 | wmi_set_ie(wil, WMI_FRAME_PROBE_RESP, bcon->proberesp_ies_len, | ||
| 453 | bcon->proberesp_ies); | ||
| 454 | wmi_set_ie(wil, WMI_FRAME_ASSOC_RESP, bcon->assocresp_ies_len, | ||
| 455 | bcon->assocresp_ies); | ||
| 456 | |||
| 457 | wil->secure_pcp = info->privacy; | ||
| 458 | |||
| 459 | rc = wmi_set_bcon(wil, info->beacon_interval, wmi_nettype); | ||
| 460 | if (rc) | ||
| 461 | return rc; | ||
| 462 | |||
| 463 | /* Rx VRING. After MAC and beacon */ | ||
| 464 | rc = wil_rx_init(wil); | ||
| 465 | |||
| 466 | netif_carrier_on(ndev); | ||
| 467 | |||
| 468 | return rc; | ||
| 469 | } | ||
| 470 | |||
| 471 | static int wil_cfg80211_stop_ap(struct wiphy *wiphy, | ||
| 472 | struct net_device *ndev) | ||
| 473 | { | ||
| 474 | int rc = 0; | ||
| 475 | struct wil6210_priv *wil = wiphy_to_wil(wiphy); | ||
| 476 | struct wireless_dev *wdev = ndev->ieee80211_ptr; | ||
| 477 | u8 wmi_nettype = wil_iftype_nl2wmi(wdev->iftype); | ||
| 478 | |||
| 479 | /* To stop beaconing, set BI to 0 */ | ||
| 480 | rc = wmi_set_bcon(wil, 0, wmi_nettype); | ||
| 481 | |||
| 482 | return rc; | ||
| 483 | } | ||
| 484 | |||
| 485 | static struct cfg80211_ops wil_cfg80211_ops = { | ||
| 486 | .scan = wil_cfg80211_scan, | ||
| 487 | .connect = wil_cfg80211_connect, | ||
| 488 | .disconnect = wil_cfg80211_disconnect, | ||
| 489 | .change_virtual_intf = wil_cfg80211_change_iface, | ||
| 490 | .get_station = wil_cfg80211_get_station, | ||
| 491 | .set_monitor_channel = wil_cfg80211_set_channel, | ||
| 492 | .add_key = wil_cfg80211_add_key, | ||
| 493 | .del_key = wil_cfg80211_del_key, | ||
| 494 | .set_default_key = wil_cfg80211_set_default_key, | ||
| 495 | /* AP mode */ | ||
| 496 | .start_ap = wil_cfg80211_start_ap, | ||
| 497 | .stop_ap = wil_cfg80211_stop_ap, | ||
| 498 | }; | ||
| 499 | |||
| 500 | static void wil_wiphy_init(struct wiphy *wiphy) | ||
| 501 | { | ||
| 502 | /* TODO: set real value */ | ||
| 503 | wiphy->max_scan_ssids = 10; | ||
| 504 | wiphy->max_num_pmkids = 0 /* TODO: */; | ||
| 505 | wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | | ||
| 506 | BIT(NL80211_IFTYPE_AP) | | ||
| 507 | BIT(NL80211_IFTYPE_MONITOR); | ||
| 508 | /* TODO: enable P2P when integrated with supplicant: | ||
| 509 | * BIT(NL80211_IFTYPE_P2P_CLIENT) | BIT(NL80211_IFTYPE_P2P_GO) | ||
| 510 | */ | ||
| 511 | wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME | | ||
| 512 | WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD; | ||
| 513 | dev_warn(wiphy_dev(wiphy), "%s : flags = 0x%08x\n", | ||
| 514 | __func__, wiphy->flags); | ||
| 515 | wiphy->probe_resp_offload = | ||
| 516 | NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS | | ||
| 517 | NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 | | ||
| 518 | NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P; | ||
| 519 | |||
| 520 | wiphy->bands[IEEE80211_BAND_60GHZ] = &wil_band_60ghz; | ||
| 521 | |||
| 522 | /* TODO: figure this out */ | ||
| 523 | wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; | ||
| 524 | |||
| 525 | wiphy->cipher_suites = wil_cipher_suites; | ||
| 526 | wiphy->n_cipher_suites = ARRAY_SIZE(wil_cipher_suites); | ||
| 527 | wiphy->mgmt_stypes = wil_mgmt_stypes; | ||
| 528 | } | ||
| 529 | |||
| 530 | struct wireless_dev *wil_cfg80211_init(struct device *dev) | ||
| 531 | { | ||
| 532 | int rc = 0; | ||
| 533 | struct wireless_dev *wdev; | ||
| 534 | |||
| 535 | wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); | ||
| 536 | if (!wdev) | ||
| 537 | return ERR_PTR(-ENOMEM); | ||
| 538 | |||
| 539 | wdev->wiphy = wiphy_new(&wil_cfg80211_ops, | ||
| 540 | sizeof(struct wil6210_priv)); | ||
| 541 | if (!wdev->wiphy) { | ||
| 542 | rc = -ENOMEM; | ||
| 543 | goto out; | ||
| 544 | } | ||
| 545 | |||
| 546 | set_wiphy_dev(wdev->wiphy, dev); | ||
| 547 | wil_wiphy_init(wdev->wiphy); | ||
| 548 | |||
| 549 | rc = wiphy_register(wdev->wiphy); | ||
| 550 | if (rc < 0) | ||
| 551 | goto out_failed_reg; | ||
| 552 | |||
| 553 | return wdev; | ||
| 554 | |||
| 555 | out_failed_reg: | ||
| 556 | wiphy_free(wdev->wiphy); | ||
| 557 | out: | ||
| 558 | kfree(wdev); | ||
| 559 | |||
| 560 | return ERR_PTR(rc); | ||
| 561 | } | ||
| 562 | |||
| 563 | void wil_wdev_free(struct wil6210_priv *wil) | ||
| 564 | { | ||
| 565 | struct wireless_dev *wdev = wil_to_wdev(wil); | ||
| 566 | |||
| 567 | if (!wdev) | ||
| 568 | return; | ||
| 569 | |||
| 570 | wiphy_unregister(wdev->wiphy); | ||
| 571 | wiphy_free(wdev->wiphy); | ||
| 572 | kfree(wdev); | ||
| 573 | } | ||
diff --git a/drivers/net/wireless/ath/wil6210/dbg_hexdump.h b/drivers/net/wireless/ath/wil6210/dbg_hexdump.h new file mode 100644 index 000000000000..6a315ba5aa7d --- /dev/null +++ b/drivers/net/wireless/ath/wil6210/dbg_hexdump.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | #ifndef WIL_DBG_HEXDUMP_H_ | ||
| 2 | #define WIL_DBG_HEXDUMP_H_ | ||
| 3 | |||
| 4 | #if defined(CONFIG_DYNAMIC_DEBUG) | ||
| 5 | #define wil_dynamic_hex_dump(prefix_str, prefix_type, rowsize, \ | ||
| 6 | groupsize, buf, len, ascii) \ | ||
| 7 | do { \ | ||
| 8 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, \ | ||
| 9 | __builtin_constant_p(prefix_str) ? prefix_str : "hexdump");\ | ||
| 10 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ | ||
| 11 | print_hex_dump(KERN_DEBUG, prefix_str, \ | ||
| 12 | prefix_type, rowsize, groupsize, \ | ||
| 13 | buf, len, ascii); \ | ||
| 14 | } while (0) | ||
| 15 | |||
| 16 | #define wil_print_hex_dump_debug(prefix_str, prefix_type, rowsize, \ | ||
| 17 | groupsize, buf, len, ascii) \ | ||
| 18 | wil_dynamic_hex_dump(prefix_str, prefix_type, rowsize, \ | ||
| 19 | groupsize, buf, len, ascii) | ||
| 20 | |||
| 21 | #define print_hex_dump_bytes(prefix_str, prefix_type, buf, len) \ | ||
| 22 | wil_dynamic_hex_dump(prefix_str, prefix_type, 16, 1, buf, len, true) | ||
| 23 | #else /* defined(CONFIG_DYNAMIC_DEBUG) */ | ||
| 24 | #define wil_print_hex_dump_debug(prefix_str, prefix_type, rowsize, \ | ||
| 25 | groupsize, buf, len, ascii) \ | ||
| 26 | print_hex_dump(KERN_DEBUG, prefix_str, prefix_type, rowsize, \ | ||
| 27 | groupsize, buf, len, ascii) | ||
| 28 | #endif /* defined(CONFIG_DYNAMIC_DEBUG) */ | ||
| 29 | |||
| 30 | #endif /* WIL_DBG_HEXDUMP_H_ */ | ||
diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c new file mode 100644 index 000000000000..65fc9683bfd8 --- /dev/null +++ b/drivers/net/wireless/ath/wil6210/debugfs.c | |||
| @@ -0,0 +1,603 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012 Qualcomm Atheros, Inc. | ||
| 3 | * | ||
| 4 | * Permission to use, copy, modify, and/or distribute this software for any | ||
| 5 | * purpose with or without fee is hereby granted, provided that the above | ||
| 6 | * copyright notice and this permission notice appear in all copies. | ||
| 7 | * | ||
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <linux/module.h> | ||
| 18 | #include <linux/debugfs.h> | ||
| 19 | #include <linux/seq_file.h> | ||
| 20 | #include <linux/pci.h> | ||
| 21 | #include <linux/rtnetlink.h> | ||
| 22 | |||
| 23 | #include "wil6210.h" | ||
| 24 | #include "txrx.h" | ||
| 25 | |||
| 26 | /* Nasty hack. Better have per device instances */ | ||
| 27 | static u32 mem_addr; | ||
| 28 | static u32 dbg_txdesc_index; | ||
| 29 | |||
| 30 | static void wil_print_vring(struct seq_file *s, struct wil6210_priv *wil, | ||
| 31 | const char *name, struct vring *vring) | ||
| 32 | { | ||
| 33 | void __iomem *x = wmi_addr(wil, vring->hwtail); | ||
| 34 | |||
| 35 | seq_printf(s, "VRING %s = {\n", name); | ||
| 36 | seq_printf(s, " pa = 0x%016llx\n", (unsigned long long)vring->pa); | ||
| 37 | seq_printf(s, " va = 0x%p\n", vring->va); | ||
| 38 | seq_printf(s, " size = %d\n", vring->size); | ||
| 39 | seq_printf(s, " swtail = %d\n", vring->swtail); | ||
| 40 | seq_printf(s, " swhead = %d\n", vring->swhead); | ||
| 41 | seq_printf(s, " hwtail = [0x%08x] -> ", vring->hwtail); | ||
| 42 | if (x) | ||
| 43 | seq_printf(s, "0x%08x\n", ioread32(x)); | ||
| 44 | else | ||
| 45 | seq_printf(s, "???\n"); | ||
| 46 | |||
| 47 | if (vring->va && (vring->size < 1025)) { | ||
| 48 | uint i; | ||
| 49 | for (i = 0; i < vring->size; i++) { | ||
| 50 | volatile struct vring_tx_desc *d = &vring->va[i].tx; | ||
| 51 | if ((i % 64) == 0 && (i != 0)) | ||
| 52 | seq_printf(s, "\n"); | ||
| 53 | seq_printf(s, "%s", (d->dma.status & BIT(0)) ? | ||
| 54 | "S" : (vring->ctx[i] ? "H" : "h")); | ||
| 55 | } | ||
| 56 | seq_printf(s, "\n"); | ||
| 57 | } | ||
| 58 | seq_printf(s, "}\n"); | ||
| 59 | } | ||
| 60 | |||
| 61 | static int wil_vring_debugfs_show(struct seq_file *s, void *data) | ||
| 62 | { | ||
| 63 | uint i; | ||
| 64 | struct wil6210_priv *wil = s->private; | ||
| 65 | |||
| 66 | wil_print_vring(s, wil, "rx", &wil->vring_rx); | ||
| 67 | |||
| 68 | for (i = 0; i < ARRAY_SIZE(wil->vring_tx); i++) { | ||
| 69 | struct vring *vring = &(wil->vring_tx[i]); | ||
| 70 | if (vring->va) { | ||
| 71 | char name[10]; | ||
| 72 | snprintf(name, sizeof(name), "tx_%2d", i); | ||
| 73 | wil_print_vring(s, wil, name, vring); | ||
| 74 | } | ||
| 75 | } | ||
| 76 | |||
| 77 | return 0; | ||
| 78 | } | ||
| 79 | |||
| 80 | static int wil_vring_seq_open(struct inode *inode, struct file *file) | ||
| 81 | { | ||
| 82 | return single_open(file, wil_vring_debugfs_show, inode->i_private); | ||
| 83 | } | ||
| 84 | |||
| 85 | static const struct file_operations fops_vring = { | ||
| 86 | .open = wil_vring_seq_open, | ||
| 87 | .release = single_release, | ||
| 88 | .read = seq_read, | ||
| 89 | .llseek = seq_lseek, | ||
| 90 | }; | ||
| 91 | |||
| 92 | static void wil_print_ring(struct seq_file *s, const char *prefix, | ||
| 93 | void __iomem *off) | ||
| 94 | { | ||
| 95 | struct wil6210_priv *wil = s->private; | ||
| 96 | struct wil6210_mbox_ring r; | ||
| 97 | int rsize; | ||
| 98 | uint i; | ||
| 99 | |||
| 100 | wil_memcpy_fromio_32(&r, off, sizeof(r)); | ||
| 101 | wil_mbox_ring_le2cpus(&r); | ||
| 102 | /* | ||
| 103 | * we just read memory block from NIC. This memory may be | ||
| 104 | * garbage. Check validity before using it. | ||
| 105 | */ | ||
| 106 | rsize = r.size / sizeof(struct wil6210_mbox_ring_desc); | ||
| 107 | |||
| 108 | seq_printf(s, "ring %s = {\n", prefix); | ||
| 109 | seq_printf(s, " base = 0x%08x\n", r.base); | ||
| 110 | seq_printf(s, " size = 0x%04x bytes -> %d entries\n", r.size, rsize); | ||
| 111 | seq_printf(s, " tail = 0x%08x\n", r.tail); | ||
| 112 | seq_printf(s, " head = 0x%08x\n", r.head); | ||
| 113 | seq_printf(s, " entry size = %d\n", r.entry_size); | ||
| 114 | |||
| 115 | if (r.size % sizeof(struct wil6210_mbox_ring_desc)) { | ||
| 116 | seq_printf(s, " ??? size is not multiple of %zd, garbage?\n", | ||
| 117 | sizeof(struct wil6210_mbox_ring_desc)); | ||
| 118 | goto out; | ||
| 119 | } | ||
| 120 | |||
| 121 | if (!wmi_addr(wil, r.base) || | ||
| 122 | !wmi_addr(wil, r.tail) || | ||
| 123 | !wmi_addr(wil, r.head)) { | ||
| 124 | seq_printf(s, " ??? pointers are garbage?\n"); | ||
| 125 | goto out; | ||
| 126 | } | ||
| 127 | |||
| 128 | for (i = 0; i < rsize; i++) { | ||
| 129 | struct wil6210_mbox_ring_desc d; | ||
| 130 | struct wil6210_mbox_hdr hdr; | ||
| 131 | size_t delta = i * sizeof(d); | ||
| 132 | void __iomem *x = wil->csr + HOSTADDR(r.base) + delta; | ||
| 133 | |||
| 134 | wil_memcpy_fromio_32(&d, x, sizeof(d)); | ||
| 135 | |||
| 136 | seq_printf(s, " [%2x] %s %s%s 0x%08x", i, | ||
| 137 | d.sync ? "F" : "E", | ||
| 138 | (r.tail - r.base == delta) ? "t" : " ", | ||
| 139 | (r.head - r.base == delta) ? "h" : " ", | ||
| 140 | le32_to_cpu(d.addr)); | ||
| 141 | if (0 == wmi_read_hdr(wil, d.addr, &hdr)) { | ||
| 142 | u16 len = le16_to_cpu(hdr.len); | ||
| 143 | seq_printf(s, " -> %04x %04x %04x %02x\n", | ||
| 144 | le16_to_cpu(hdr.seq), len, | ||
| 145 | le16_to_cpu(hdr.type), hdr.flags); | ||
| 146 | if (len <= MAX_MBOXITEM_SIZE) { | ||
| 147 | int n = 0; | ||
| 148 | unsigned char printbuf[16 * 3 + 2]; | ||
| 149 | unsigned char databuf[MAX_MBOXITEM_SIZE]; | ||
| 150 | void __iomem *src = wmi_buffer(wil, d.addr) + | ||
| 151 | sizeof(struct wil6210_mbox_hdr); | ||
| 152 | /* | ||
| 153 | * No need to check @src for validity - | ||
| 154 | * we already validated @d.addr while | ||
| 155 | * reading header | ||
| 156 | */ | ||
| 157 | wil_memcpy_fromio_32(databuf, src, len); | ||
| 158 | while (n < len) { | ||
| 159 | int l = min(len - n, 16); | ||
| 160 | hex_dump_to_buffer(databuf + n, l, | ||
| 161 | 16, 1, printbuf, | ||
| 162 | sizeof(printbuf), | ||
| 163 | false); | ||
| 164 | seq_printf(s, " : %s\n", printbuf); | ||
| 165 | n += l; | ||
| 166 | } | ||
| 167 | } | ||
| 168 | } else { | ||
| 169 | seq_printf(s, "\n"); | ||
| 170 | } | ||
| 171 | } | ||
| 172 | out: | ||
| 173 | seq_printf(s, "}\n"); | ||
| 174 | } | ||
| 175 | |||
| 176 | static int wil_mbox_debugfs_show(struct seq_file *s, void *data) | ||
| 177 | { | ||
| 178 | struct wil6210_priv *wil = s->private; | ||
| 179 | |||
| 180 | wil_print_ring(s, "tx", wil->csr + HOST_MBOX + | ||
| 181 | offsetof(struct wil6210_mbox_ctl, tx)); | ||
| 182 | wil_print_ring(s, "rx", wil->csr + HOST_MBOX + | ||
| 183 | offsetof(struct wil6210_mbox_ctl, rx)); | ||
| 184 | |||
| 185 | return 0; | ||
| 186 | } | ||
| 187 | |||
| 188 | static int wil_mbox_seq_open(struct inode *inode, struct file *file) | ||
| 189 | { | ||
| 190 | return single_open(file, wil_mbox_debugfs_show, inode->i_private); | ||
| 191 | } | ||
| 192 | |||
| 193 | static const struct file_operations fops_mbox = { | ||
| 194 | .open = wil_mbox_seq_open, | ||
| 195 | .release = single_release, | ||
| 196 | .read = seq_read, | ||
| 197 | .llseek = seq_lseek, | ||
| 198 | }; | ||
| 199 | |||
| 200 | static int wil_debugfs_iomem_x32_set(void *data, u64 val) | ||
| 201 | { | ||
| 202 | iowrite32(val, (void __iomem *)data); | ||
| 203 | wmb(); /* make sure write propagated to HW */ | ||
| 204 | |||
| 205 | return 0; | ||
| 206 | } | ||
| 207 | |||
| 208 | static int wil_debugfs_iomem_x32_get(void *data, u64 *val) | ||
| 209 | { | ||
| 210 | *val = ioread32((void __iomem *)data); | ||
| 211 | |||
| 212 | return 0; | ||
| 213 | } | ||
| 214 | |||
| 215 | DEFINE_SIMPLE_ATTRIBUTE(fops_iomem_x32, wil_debugfs_iomem_x32_get, | ||
| 216 | wil_debugfs_iomem_x32_set, "0x%08llx\n"); | ||
| 217 | |||
| 218 | static struct dentry *wil_debugfs_create_iomem_x32(const char *name, | ||
| 219 | mode_t mode, | ||
| 220 | struct dentry *parent, | ||
| 221 | void __iomem *value) | ||
| 222 | { | ||
| 223 | return debugfs_create_file(name, mode, parent, (void * __force)value, | ||
| 224 | &fops_iomem_x32); | ||
| 225 | } | ||
| 226 | |||
| 227 | static int wil6210_debugfs_create_ISR(struct wil6210_priv *wil, | ||
| 228 | const char *name, | ||
| 229 | struct dentry *parent, u32 off) | ||
| 230 | { | ||
| 231 | struct dentry *d = debugfs_create_dir(name, parent); | ||
| 232 | |||
| 233 | if (IS_ERR_OR_NULL(d)) | ||
| 234 | return -ENODEV; | ||
| 235 | |||
| 236 | wil_debugfs_create_iomem_x32("ICC", S_IRUGO | S_IWUSR, d, | ||
| 237 | wil->csr + off); | ||
| 238 | wil_debugfs_create_iomem_x32("ICR", S_IRUGO | S_IWUSR, d, | ||
| 239 | wil->csr + off + 4); | ||
| 240 | wil_debugfs_create_iomem_x32("ICM", S_IRUGO | S_IWUSR, d, | ||
| 241 | wil->csr + off + 8); | ||
| 242 | wil_debugfs_create_iomem_x32("ICS", S_IWUSR, d, | ||
| 243 | wil->csr + off + 12); | ||
| 244 | wil_debugfs_create_iomem_x32("IMV", S_IRUGO | S_IWUSR, d, | ||
| 245 | wil->csr + off + 16); | ||
| 246 | wil_debugfs_create_iomem_x32("IMS", S_IWUSR, d, | ||
| 247 | wil->csr + off + 20); | ||
| 248 | wil_debugfs_create_iomem_x32("IMC", S_IWUSR, d, | ||
| 249 | wil->csr + off + 24); | ||
| 250 | |||
| 251 | return 0; | ||
| 252 | } | ||
| 253 | |||
| 254 | static int wil6210_debugfs_create_pseudo_ISR(struct wil6210_priv *wil, | ||
| 255 | struct dentry *parent) | ||
| 256 | { | ||
| 257 | struct dentry *d = debugfs_create_dir("PSEUDO_ISR", parent); | ||
| 258 | |||
| 259 | if (IS_ERR_OR_NULL(d)) | ||
| 260 | return -ENODEV; | ||
| 261 | |||
| 262 | wil_debugfs_create_iomem_x32("CAUSE", S_IRUGO, d, wil->csr + | ||
| 263 | HOSTADDR(RGF_DMA_PSEUDO_CAUSE)); | ||
| 264 | wil_debugfs_create_iomem_x32("MASK_SW", S_IRUGO, d, wil->csr + | ||
| 265 | HOSTADDR(RGF_DMA_PSEUDO_CAUSE_MASK_SW)); | ||
| 266 | wil_debugfs_create_iomem_x32("MASK_FW", S_IRUGO, d, wil->csr + | ||
| 267 | HOSTADDR(RGF_DMA_PSEUDO_CAUSE_MASK_FW)); | ||
| 268 | |||
| 269 | return 0; | ||
| 270 | } | ||
| 271 | |||
| 272 | static int wil6210_debugfs_create_ITR_CNT(struct wil6210_priv *wil, | ||
| 273 | struct dentry *parent) | ||
| 274 | { | ||
| 275 | struct dentry *d = debugfs_create_dir("ITR_CNT", parent); | ||
| 276 | |||
| 277 | if (IS_ERR_OR_NULL(d)) | ||
| 278 | return -ENODEV; | ||
| 279 | |||
| 280 | wil_debugfs_create_iomem_x32("TRSH", S_IRUGO, d, wil->csr + | ||
| 281 | HOSTADDR(RGF_DMA_ITR_CNT_TRSH)); | ||
| 282 | wil_debugfs_create_iomem_x32("DATA", S_IRUGO, d, wil->csr + | ||
| 283 | HOSTADDR(RGF_DMA_ITR_CNT_DATA)); | ||
| 284 | wil_debugfs_create_iomem_x32("CTL", S_IRUGO, d, wil->csr + | ||
| 285 | HOSTADDR(RGF_DMA_ITR_CNT_CRL)); | ||
| 286 | |||
| 287 | return 0; | ||
| 288 | } | ||
| 289 | |||
| 290 | static int wil_memread_debugfs_show(struct seq_file *s, void *data) | ||
| 291 | { | ||
| 292 | struct wil6210_priv *wil = s->private; | ||
| 293 | void __iomem *a = wmi_buffer(wil, cpu_to_le32(mem_addr)); | ||
| 294 | |||
| 295 | if (a) | ||
| 296 | seq_printf(s, "[0x%08x] = 0x%08x\n", mem_addr, ioread32(a)); | ||
| 297 | else | ||
| 298 | seq_printf(s, "[0x%08x] = INVALID\n", mem_addr); | ||
| 299 | |||
| 300 | return 0; | ||
| 301 | } | ||
| 302 | |||
| 303 | static int wil_memread_seq_open(struct inode *inode, struct file *file) | ||
| 304 | { | ||
| 305 | return single_open(file, wil_memread_debugfs_show, inode->i_private); | ||
| 306 | } | ||
| 307 | |||
| 308 | static const struct file_operations fops_memread = { | ||
| 309 | .open = wil_memread_seq_open, | ||
| 310 | .release = single_release, | ||
| 311 | .read = seq_read, | ||
| 312 | .llseek = seq_lseek, | ||
| 313 | }; | ||
| 314 | |||
| 315 | static int wil_default_open(struct inode *inode, struct file *file) | ||
| 316 | { | ||
| 317 | if (inode->i_private) | ||
| 318 | file->private_data = inode->i_private; | ||
| 319 | |||
| 320 | return 0; | ||
| 321 | } | ||
| 322 | |||
| 323 | static ssize_t wil_read_file_ioblob(struct file *file, char __user *user_buf, | ||
| 324 | size_t count, loff_t *ppos) | ||
| 325 | { | ||
| 326 | enum { max_count = 4096 }; | ||
| 327 | struct debugfs_blob_wrapper *blob = file->private_data; | ||
| 328 | loff_t pos = *ppos; | ||
| 329 | size_t available = blob->size; | ||
| 330 | void *buf; | ||
| 331 | size_t ret; | ||
| 332 | |||
| 333 | if (pos < 0) | ||
| 334 | return -EINVAL; | ||
| 335 | |||
| 336 | if (pos >= available || !count) | ||
| 337 | return 0; | ||
| 338 | |||
| 339 | if (count > available - pos) | ||
| 340 | count = available - pos; | ||
| 341 | if (count > max_count) | ||
| 342 | count = max_count; | ||
| 343 | |||
| 344 | buf = kmalloc(count, GFP_KERNEL); | ||
| 345 | if (!buf) | ||
| 346 | return -ENOMEM; | ||
| 347 | |||
| 348 | wil_memcpy_fromio_32(buf, (const volatile void __iomem *)blob->data + | ||
| 349 | pos, count); | ||
| 350 | |||
| 351 | ret = copy_to_user(user_buf, buf, count); | ||
| 352 | kfree(buf); | ||
| 353 | if (ret == count) | ||
| 354 | return -EFAULT; | ||
| 355 | |||
| 356 | count -= ret; | ||
| 357 | *ppos = pos + count; | ||
| 358 | |||
| 359 | return count; | ||
| 360 | } | ||
| 361 | |||
| 362 | static const struct file_operations fops_ioblob = { | ||
| 363 | .read = wil_read_file_ioblob, | ||
| 364 | .open = wil_default_open, | ||
| 365 | .llseek = default_llseek, | ||
| 366 | }; | ||
| 367 | |||
| 368 | static | ||
| 369 | struct dentry *wil_debugfs_create_ioblob(const char *name, | ||
| 370 | mode_t mode, | ||
| 371 | struct dentry *parent, | ||
| 372 | struct debugfs_blob_wrapper *blob) | ||
| 373 | { | ||
| 374 | return debugfs_create_file(name, mode, parent, blob, &fops_ioblob); | ||
| 375 | } | ||
| 376 | /*---reset---*/ | ||
| 377 | static ssize_t wil_write_file_reset(struct file *file, const char __user *buf, | ||
| 378 | size_t len, loff_t *ppos) | ||
| 379 | { | ||
| 380 | struct wil6210_priv *wil = file->private_data; | ||
| 381 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 382 | |||
| 383 | /** | ||
| 384 | * BUG: | ||
| 385 | * this code does NOT sync device state with the rest of system | ||
| 386 | * use with care, debug only!!! | ||
| 387 | */ | ||
| 388 | rtnl_lock(); | ||
| 389 | dev_close(ndev); | ||
| 390 | ndev->flags &= ~IFF_UP; | ||
| 391 | rtnl_unlock(); | ||
| 392 | wil_reset(wil); | ||
| 393 | |||
| 394 | return len; | ||
| 395 | } | ||
| 396 | |||
| 397 | static const struct file_operations fops_reset = { | ||
| 398 | .write = wil_write_file_reset, | ||
| 399 | .open = wil_default_open, | ||
| 400 | }; | ||
| 401 | /*---------Tx descriptor------------*/ | ||
| 402 | |||
| 403 | static int wil_txdesc_debugfs_show(struct seq_file *s, void *data) | ||
| 404 | { | ||
| 405 | struct wil6210_priv *wil = s->private; | ||
| 406 | struct vring *vring = &(wil->vring_tx[0]); | ||
| 407 | |||
| 408 | if (!vring->va) { | ||
| 409 | seq_printf(s, "No Tx VRING\n"); | ||
| 410 | return 0; | ||
| 411 | } | ||
| 412 | |||
| 413 | if (dbg_txdesc_index < vring->size) { | ||
| 414 | volatile struct vring_tx_desc *d = | ||
| 415 | &(vring->va[dbg_txdesc_index].tx); | ||
| 416 | volatile u32 *u = (volatile u32 *)d; | ||
| 417 | struct sk_buff *skb = vring->ctx[dbg_txdesc_index]; | ||
| 418 | |||
| 419 | seq_printf(s, "Tx[%3d] = {\n", dbg_txdesc_index); | ||
| 420 | seq_printf(s, " MAC = 0x%08x 0x%08x 0x%08x 0x%08x\n", | ||
| 421 | u[0], u[1], u[2], u[3]); | ||
| 422 | seq_printf(s, " DMA = 0x%08x 0x%08x 0x%08x 0x%08x\n", | ||
| 423 | u[4], u[5], u[6], u[7]); | ||
| 424 | seq_printf(s, " SKB = %p\n", skb); | ||
| 425 | |||
| 426 | if (skb) { | ||
| 427 | unsigned char printbuf[16 * 3 + 2]; | ||
| 428 | int i = 0; | ||
| 429 | int len = skb_headlen(skb); | ||
| 430 | void *p = skb->data; | ||
| 431 | |||
| 432 | seq_printf(s, " len = %d\n", len); | ||
| 433 | |||
| 434 | while (i < len) { | ||
| 435 | int l = min(len - i, 16); | ||
| 436 | hex_dump_to_buffer(p + i, l, 16, 1, printbuf, | ||
| 437 | sizeof(printbuf), false); | ||
| 438 | seq_printf(s, " : %s\n", printbuf); | ||
| 439 | i += l; | ||
| 440 | } | ||
| 441 | } | ||
| 442 | seq_printf(s, "}\n"); | ||
| 443 | } else { | ||
| 444 | seq_printf(s, "TxDesc index (%d) >= size (%d)\n", | ||
| 445 | dbg_txdesc_index, vring->size); | ||
| 446 | } | ||
| 447 | |||
| 448 | return 0; | ||
| 449 | } | ||
| 450 | |||
| 451 | static int wil_txdesc_seq_open(struct inode *inode, struct file *file) | ||
| 452 | { | ||
| 453 | return single_open(file, wil_txdesc_debugfs_show, inode->i_private); | ||
| 454 | } | ||
| 455 | |||
| 456 | static const struct file_operations fops_txdesc = { | ||
| 457 | .open = wil_txdesc_seq_open, | ||
| 458 | .release = single_release, | ||
| 459 | .read = seq_read, | ||
| 460 | .llseek = seq_lseek, | ||
| 461 | }; | ||
| 462 | |||
| 463 | /*---------beamforming------------*/ | ||
| 464 | static int wil_bf_debugfs_show(struct seq_file *s, void *data) | ||
| 465 | { | ||
| 466 | struct wil6210_priv *wil = s->private; | ||
| 467 | seq_printf(s, | ||
| 468 | "TSF : 0x%016llx\n" | ||
| 469 | "TxMCS : %d\n" | ||
| 470 | "Sectors(rx:tx) my %2d:%2d peer %2d:%2d\n", | ||
| 471 | wil->stats.tsf, wil->stats.bf_mcs, | ||
| 472 | wil->stats.my_rx_sector, wil->stats.my_tx_sector, | ||
| 473 | wil->stats.peer_rx_sector, wil->stats.peer_tx_sector); | ||
| 474 | return 0; | ||
| 475 | } | ||
| 476 | |||
| 477 | static int wil_bf_seq_open(struct inode *inode, struct file *file) | ||
| 478 | { | ||
| 479 | return single_open(file, wil_bf_debugfs_show, inode->i_private); | ||
| 480 | } | ||
| 481 | |||
| 482 | static const struct file_operations fops_bf = { | ||
| 483 | .open = wil_bf_seq_open, | ||
| 484 | .release = single_release, | ||
| 485 | .read = seq_read, | ||
| 486 | .llseek = seq_lseek, | ||
| 487 | }; | ||
| 488 | /*---------SSID------------*/ | ||
| 489 | static ssize_t wil_read_file_ssid(struct file *file, char __user *user_buf, | ||
| 490 | size_t count, loff_t *ppos) | ||
| 491 | { | ||
| 492 | struct wil6210_priv *wil = file->private_data; | ||
| 493 | struct wireless_dev *wdev = wil_to_wdev(wil); | ||
| 494 | |||
| 495 | return simple_read_from_buffer(user_buf, count, ppos, | ||
| 496 | wdev->ssid, wdev->ssid_len); | ||
| 497 | } | ||
| 498 | |||
| 499 | static ssize_t wil_write_file_ssid(struct file *file, const char __user *buf, | ||
| 500 | size_t count, loff_t *ppos) | ||
| 501 | { | ||
| 502 | struct wil6210_priv *wil = file->private_data; | ||
| 503 | struct wireless_dev *wdev = wil_to_wdev(wil); | ||
| 504 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 505 | |||
| 506 | if (*ppos != 0) { | ||
| 507 | wil_err(wil, "Unable to set SSID substring from [%d]\n", | ||
| 508 | (int)*ppos); | ||
| 509 | return -EINVAL; | ||
| 510 | } | ||
| 511 | |||
| 512 | if (count > sizeof(wdev->ssid)) { | ||
| 513 | wil_err(wil, "SSID too long, len = %d\n", (int)count); | ||
| 514 | return -EINVAL; | ||
| 515 | } | ||
| 516 | if (netif_running(ndev)) { | ||
| 517 | wil_err(wil, "Unable to change SSID on running interface\n"); | ||
| 518 | return -EINVAL; | ||
| 519 | } | ||
| 520 | |||
| 521 | wdev->ssid_len = count; | ||
| 522 | return simple_write_to_buffer(wdev->ssid, wdev->ssid_len, ppos, | ||
| 523 | buf, count); | ||
| 524 | } | ||
| 525 | |||
| 526 | static const struct file_operations fops_ssid = { | ||
| 527 | .read = wil_read_file_ssid, | ||
| 528 | .write = wil_write_file_ssid, | ||
| 529 | .open = wil_default_open, | ||
| 530 | }; | ||
| 531 | |||
| 532 | /*----------------*/ | ||
| 533 | int wil6210_debugfs_init(struct wil6210_priv *wil) | ||
| 534 | { | ||
| 535 | struct dentry *dbg = wil->debug = debugfs_create_dir(WIL_NAME, | ||
| 536 | wil_to_wiphy(wil)->debugfsdir); | ||
| 537 | |||
| 538 | if (IS_ERR_OR_NULL(dbg)) | ||
| 539 | return -ENODEV; | ||
| 540 | |||
| 541 | debugfs_create_file("mbox", S_IRUGO, dbg, wil, &fops_mbox); | ||
| 542 | debugfs_create_file("vrings", S_IRUGO, dbg, wil, &fops_vring); | ||
| 543 | debugfs_create_file("txdesc", S_IRUGO, dbg, wil, &fops_txdesc); | ||
| 544 | debugfs_create_u32("txdesc_index", S_IRUGO | S_IWUSR, dbg, | ||
| 545 | &dbg_txdesc_index); | ||
| 546 | debugfs_create_file("bf", S_IRUGO, dbg, wil, &fops_bf); | ||
| 547 | debugfs_create_file("ssid", S_IRUGO | S_IWUSR, dbg, wil, &fops_ssid); | ||
| 548 | debugfs_create_u32("secure_pcp", S_IRUGO | S_IWUSR, dbg, | ||
| 549 | &wil->secure_pcp); | ||
| 550 | |||
| 551 | wil6210_debugfs_create_ISR(wil, "USER_ICR", dbg, | ||
| 552 | HOSTADDR(RGF_USER_USER_ICR)); | ||
| 553 | wil6210_debugfs_create_ISR(wil, "DMA_EP_TX_ICR", dbg, | ||
| 554 | HOSTADDR(RGF_DMA_EP_TX_ICR)); | ||
| 555 | wil6210_debugfs_create_ISR(wil, "DMA_EP_RX_ICR", dbg, | ||
| 556 | HOSTADDR(RGF_DMA_EP_RX_ICR)); | ||
| 557 | wil6210_debugfs_create_ISR(wil, "DMA_EP_MISC_ICR", dbg, | ||
| 558 | HOSTADDR(RGF_DMA_EP_MISC_ICR)); | ||
| 559 | wil6210_debugfs_create_pseudo_ISR(wil, dbg); | ||
| 560 | wil6210_debugfs_create_ITR_CNT(wil, dbg); | ||
| 561 | |||
| 562 | debugfs_create_u32("mem_addr", S_IRUGO | S_IWUSR, dbg, &mem_addr); | ||
| 563 | debugfs_create_file("mem_val", S_IRUGO, dbg, wil, &fops_memread); | ||
| 564 | |||
| 565 | debugfs_create_file("reset", S_IWUSR, dbg, wil, &fops_reset); | ||
| 566 | |||
| 567 | wil->rgf_blob.data = (void * __force)wil->csr + 0; | ||
| 568 | wil->rgf_blob.size = 0xa000; | ||
| 569 | wil_debugfs_create_ioblob("blob_rgf", S_IRUGO, dbg, &wil->rgf_blob); | ||
| 570 | |||
| 571 | wil->fw_code_blob.data = (void * __force)wil->csr + 0x40000; | ||
| 572 | wil->fw_code_blob.size = 0x40000; | ||
| 573 | wil_debugfs_create_ioblob("blob_fw_code", S_IRUGO, dbg, | ||
| 574 | &wil->fw_code_blob); | ||
| 575 | |||
| 576 | wil->fw_data_blob.data = (void * __force)wil->csr + 0x80000; | ||
| 577 | wil->fw_data_blob.size = 0x8000; | ||
| 578 | wil_debugfs_create_ioblob("blob_fw_data", S_IRUGO, dbg, | ||
| 579 | &wil->fw_data_blob); | ||
| 580 | |||
| 581 | wil->fw_peri_blob.data = (void * __force)wil->csr + 0x88000; | ||
| 582 | wil->fw_peri_blob.size = 0x18000; | ||
| 583 | wil_debugfs_create_ioblob("blob_fw_peri", S_IRUGO, dbg, | ||
| 584 | &wil->fw_peri_blob); | ||
| 585 | |||
| 586 | wil->uc_code_blob.data = (void * __force)wil->csr + 0xa0000; | ||
| 587 | wil->uc_code_blob.size = 0x10000; | ||
| 588 | wil_debugfs_create_ioblob("blob_uc_code", S_IRUGO, dbg, | ||
| 589 | &wil->uc_code_blob); | ||
| 590 | |||
| 591 | wil->uc_data_blob.data = (void * __force)wil->csr + 0xb0000; | ||
| 592 | wil->uc_data_blob.size = 0x4000; | ||
| 593 | wil_debugfs_create_ioblob("blob_uc_data", S_IRUGO, dbg, | ||
| 594 | &wil->uc_data_blob); | ||
| 595 | |||
| 596 | return 0; | ||
| 597 | } | ||
| 598 | |||
| 599 | void wil6210_debugfs_remove(struct wil6210_priv *wil) | ||
| 600 | { | ||
| 601 | debugfs_remove_recursive(wil->debug); | ||
| 602 | wil->debug = NULL; | ||
| 603 | } | ||
diff --git a/drivers/net/wireless/ath/wil6210/interrupt.c b/drivers/net/wireless/ath/wil6210/interrupt.c new file mode 100644 index 000000000000..38049da71049 --- /dev/null +++ b/drivers/net/wireless/ath/wil6210/interrupt.c | |||
| @@ -0,0 +1,471 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012 Qualcomm Atheros, Inc. | ||
| 3 | * | ||
| 4 | * Permission to use, copy, modify, and/or distribute this software for any | ||
| 5 | * purpose with or without fee is hereby granted, provided that the above | ||
| 6 | * copyright notice and this permission notice appear in all copies. | ||
| 7 | * | ||
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <linux/interrupt.h> | ||
| 18 | |||
| 19 | #include "wil6210.h" | ||
| 20 | |||
| 21 | /** | ||
| 22 | * Theory of operation: | ||
| 23 | * | ||
| 24 | * There is ISR pseudo-cause register, | ||
| 25 | * dma_rgf->DMA_RGF.PSEUDO_CAUSE.PSEUDO_CAUSE | ||
| 26 | * Its bits represents OR'ed bits from 3 real ISR registers: | ||
| 27 | * TX, RX, and MISC. | ||
| 28 | * | ||
| 29 | * Registers may be configured to either "write 1 to clear" or | ||
| 30 | * "clear on read" mode | ||
| 31 | * | ||
| 32 | * When handling interrupt, one have to mask/unmask interrupts for the | ||
| 33 | * real ISR registers, or hardware may malfunction. | ||
| 34 | * | ||
| 35 | */ | ||
| 36 | |||
| 37 | #define WIL6210_IRQ_DISABLE (0xFFFFFFFFUL) | ||
| 38 | #define WIL6210_IMC_RX BIT_DMA_EP_RX_ICR_RX_DONE | ||
| 39 | #define WIL6210_IMC_TX (BIT_DMA_EP_TX_ICR_TX_DONE | \ | ||
| 40 | BIT_DMA_EP_TX_ICR_TX_DONE_N(0)) | ||
| 41 | #define WIL6210_IMC_MISC (ISR_MISC_FW_READY | ISR_MISC_MBOX_EVT) | ||
| 42 | |||
| 43 | #define WIL6210_IRQ_PSEUDO_MASK (u32)(~(BIT_DMA_PSEUDO_CAUSE_RX | \ | ||
| 44 | BIT_DMA_PSEUDO_CAUSE_TX | \ | ||
| 45 | BIT_DMA_PSEUDO_CAUSE_MISC)) | ||
| 46 | |||
| 47 | #if defined(CONFIG_WIL6210_ISR_COR) | ||
| 48 | /* configure to Clear-On-Read mode */ | ||
| 49 | #define WIL_ICR_ICC_VALUE (0xFFFFFFFFUL) | ||
| 50 | |||
| 51 | static inline void wil_icr_clear(u32 x, void __iomem *addr) | ||
| 52 | { | ||
| 53 | |||
| 54 | } | ||
| 55 | #else /* defined(CONFIG_WIL6210_ISR_COR) */ | ||
| 56 | /* configure to Write-1-to-Clear mode */ | ||
| 57 | #define WIL_ICR_ICC_VALUE (0UL) | ||
| 58 | |||
| 59 | static inline void wil_icr_clear(u32 x, void __iomem *addr) | ||
| 60 | { | ||
| 61 | iowrite32(x, addr); | ||
| 62 | } | ||
| 63 | #endif /* defined(CONFIG_WIL6210_ISR_COR) */ | ||
| 64 | |||
| 65 | static inline u32 wil_ioread32_and_clear(void __iomem *addr) | ||
| 66 | { | ||
| 67 | u32 x = ioread32(addr); | ||
| 68 | |||
| 69 | wil_icr_clear(x, addr); | ||
| 70 | |||
| 71 | return x; | ||
| 72 | } | ||
| 73 | |||
| 74 | static void wil6210_mask_irq_tx(struct wil6210_priv *wil) | ||
| 75 | { | ||
| 76 | iowrite32(WIL6210_IRQ_DISABLE, wil->csr + | ||
| 77 | HOSTADDR(RGF_DMA_EP_TX_ICR) + | ||
| 78 | offsetof(struct RGF_ICR, IMS)); | ||
| 79 | } | ||
| 80 | |||
| 81 | static void wil6210_mask_irq_rx(struct wil6210_priv *wil) | ||
| 82 | { | ||
| 83 | iowrite32(WIL6210_IRQ_DISABLE, wil->csr + | ||
| 84 | HOSTADDR(RGF_DMA_EP_RX_ICR) + | ||
| 85 | offsetof(struct RGF_ICR, IMS)); | ||
| 86 | } | ||
| 87 | |||
| 88 | static void wil6210_mask_irq_misc(struct wil6210_priv *wil) | ||
| 89 | { | ||
| 90 | iowrite32(WIL6210_IRQ_DISABLE, wil->csr + | ||
| 91 | HOSTADDR(RGF_DMA_EP_MISC_ICR) + | ||
| 92 | offsetof(struct RGF_ICR, IMS)); | ||
| 93 | } | ||
| 94 | |||
| 95 | static void wil6210_mask_irq_pseudo(struct wil6210_priv *wil) | ||
| 96 | { | ||
| 97 | wil_dbg_IRQ(wil, "%s()\n", __func__); | ||
| 98 | |||
| 99 | iowrite32(WIL6210_IRQ_DISABLE, wil->csr + | ||
| 100 | HOSTADDR(RGF_DMA_PSEUDO_CAUSE_MASK_SW)); | ||
| 101 | |||
| 102 | clear_bit(wil_status_irqen, &wil->status); | ||
| 103 | } | ||
| 104 | |||
| 105 | static void wil6210_unmask_irq_tx(struct wil6210_priv *wil) | ||
| 106 | { | ||
| 107 | iowrite32(WIL6210_IMC_TX, wil->csr + | ||
| 108 | HOSTADDR(RGF_DMA_EP_TX_ICR) + | ||
| 109 | offsetof(struct RGF_ICR, IMC)); | ||
| 110 | } | ||
| 111 | |||
| 112 | static void wil6210_unmask_irq_rx(struct wil6210_priv *wil) | ||
| 113 | { | ||
| 114 | iowrite32(WIL6210_IMC_RX, wil->csr + | ||
| 115 | HOSTADDR(RGF_DMA_EP_RX_ICR) + | ||
| 116 | offsetof(struct RGF_ICR, IMC)); | ||
| 117 | } | ||
| 118 | |||
| 119 | static void wil6210_unmask_irq_misc(struct wil6210_priv *wil) | ||
| 120 | { | ||
| 121 | iowrite32(WIL6210_IMC_MISC, wil->csr + | ||
| 122 | HOSTADDR(RGF_DMA_EP_MISC_ICR) + | ||
| 123 | offsetof(struct RGF_ICR, IMC)); | ||
| 124 | } | ||
| 125 | |||
| 126 | static void wil6210_unmask_irq_pseudo(struct wil6210_priv *wil) | ||
| 127 | { | ||
| 128 | wil_dbg_IRQ(wil, "%s()\n", __func__); | ||
| 129 | |||
| 130 | set_bit(wil_status_irqen, &wil->status); | ||
| 131 | |||
| 132 | iowrite32(WIL6210_IRQ_PSEUDO_MASK, wil->csr + | ||
| 133 | HOSTADDR(RGF_DMA_PSEUDO_CAUSE_MASK_SW)); | ||
| 134 | } | ||
| 135 | |||
| 136 | void wil6210_disable_irq(struct wil6210_priv *wil) | ||
| 137 | { | ||
| 138 | wil_dbg_IRQ(wil, "%s()\n", __func__); | ||
| 139 | |||
| 140 | wil6210_mask_irq_tx(wil); | ||
| 141 | wil6210_mask_irq_rx(wil); | ||
| 142 | wil6210_mask_irq_misc(wil); | ||
| 143 | wil6210_mask_irq_pseudo(wil); | ||
| 144 | } | ||
| 145 | |||
| 146 | void wil6210_enable_irq(struct wil6210_priv *wil) | ||
| 147 | { | ||
| 148 | wil_dbg_IRQ(wil, "%s()\n", __func__); | ||
| 149 | |||
| 150 | iowrite32(WIL_ICR_ICC_VALUE, wil->csr + HOSTADDR(RGF_DMA_EP_RX_ICR) + | ||
| 151 | offsetof(struct RGF_ICR, ICC)); | ||
| 152 | iowrite32(WIL_ICR_ICC_VALUE, wil->csr + HOSTADDR(RGF_DMA_EP_TX_ICR) + | ||
| 153 | offsetof(struct RGF_ICR, ICC)); | ||
| 154 | iowrite32(WIL_ICR_ICC_VALUE, wil->csr + HOSTADDR(RGF_DMA_EP_MISC_ICR) + | ||
| 155 | offsetof(struct RGF_ICR, ICC)); | ||
| 156 | |||
| 157 | wil6210_unmask_irq_pseudo(wil); | ||
| 158 | wil6210_unmask_irq_tx(wil); | ||
| 159 | wil6210_unmask_irq_rx(wil); | ||
| 160 | wil6210_unmask_irq_misc(wil); | ||
| 161 | } | ||
| 162 | |||
| 163 | static irqreturn_t wil6210_irq_rx(int irq, void *cookie) | ||
| 164 | { | ||
| 165 | struct wil6210_priv *wil = cookie; | ||
| 166 | u32 isr = wil_ioread32_and_clear(wil->csr + | ||
| 167 | HOSTADDR(RGF_DMA_EP_RX_ICR) + | ||
| 168 | offsetof(struct RGF_ICR, ICR)); | ||
| 169 | |||
| 170 | wil_dbg_IRQ(wil, "ISR RX 0x%08x\n", isr); | ||
| 171 | |||
| 172 | if (!isr) { | ||
| 173 | wil_err(wil, "spurious IRQ: RX\n"); | ||
| 174 | return IRQ_NONE; | ||
| 175 | } | ||
| 176 | |||
| 177 | wil6210_mask_irq_rx(wil); | ||
| 178 | |||
| 179 | if (isr & BIT_DMA_EP_RX_ICR_RX_DONE) { | ||
| 180 | wil_dbg_IRQ(wil, "RX done\n"); | ||
| 181 | isr &= ~BIT_DMA_EP_RX_ICR_RX_DONE; | ||
| 182 | wil_rx_handle(wil); | ||
| 183 | } | ||
| 184 | |||
| 185 | if (isr) | ||
| 186 | wil_err(wil, "un-handled RX ISR bits 0x%08x\n", isr); | ||
| 187 | |||
| 188 | wil6210_unmask_irq_rx(wil); | ||
| 189 | |||
| 190 | return IRQ_HANDLED; | ||
| 191 | } | ||
| 192 | |||
| 193 | static irqreturn_t wil6210_irq_tx(int irq, void *cookie) | ||
| 194 | { | ||
| 195 | struct wil6210_priv *wil = cookie; | ||
| 196 | u32 isr = wil_ioread32_and_clear(wil->csr + | ||
| 197 | HOSTADDR(RGF_DMA_EP_TX_ICR) + | ||
| 198 | offsetof(struct RGF_ICR, ICR)); | ||
| 199 | |||
| 200 | wil_dbg_IRQ(wil, "ISR TX 0x%08x\n", isr); | ||
| 201 | |||
| 202 | if (!isr) { | ||
| 203 | wil_err(wil, "spurious IRQ: TX\n"); | ||
| 204 | return IRQ_NONE; | ||
| 205 | } | ||
| 206 | |||
| 207 | wil6210_mask_irq_tx(wil); | ||
| 208 | |||
| 209 | if (isr & BIT_DMA_EP_TX_ICR_TX_DONE) { | ||
| 210 | uint i; | ||
| 211 | wil_dbg_IRQ(wil, "TX done\n"); | ||
| 212 | isr &= ~BIT_DMA_EP_TX_ICR_TX_DONE; | ||
| 213 | for (i = 0; i < 24; i++) { | ||
| 214 | u32 mask = BIT_DMA_EP_TX_ICR_TX_DONE_N(i); | ||
| 215 | if (isr & mask) { | ||
| 216 | isr &= ~mask; | ||
| 217 | wil_dbg_IRQ(wil, "TX done(%i)\n", i); | ||
| 218 | wil_tx_complete(wil, i); | ||
| 219 | } | ||
| 220 | } | ||
| 221 | } | ||
| 222 | |||
| 223 | if (isr) | ||
| 224 | wil_err(wil, "un-handled TX ISR bits 0x%08x\n", isr); | ||
| 225 | |||
| 226 | wil6210_unmask_irq_tx(wil); | ||
| 227 | |||
| 228 | return IRQ_HANDLED; | ||
| 229 | } | ||
| 230 | |||
| 231 | static irqreturn_t wil6210_irq_misc(int irq, void *cookie) | ||
| 232 | { | ||
| 233 | struct wil6210_priv *wil = cookie; | ||
| 234 | u32 isr = wil_ioread32_and_clear(wil->csr + | ||
| 235 | HOSTADDR(RGF_DMA_EP_MISC_ICR) + | ||
| 236 | offsetof(struct RGF_ICR, ICR)); | ||
| 237 | |||
| 238 | wil_dbg_IRQ(wil, "ISR MISC 0x%08x\n", isr); | ||
| 239 | |||
| 240 | if (!isr) { | ||
| 241 | wil_err(wil, "spurious IRQ: MISC\n"); | ||
| 242 | return IRQ_NONE; | ||
| 243 | } | ||
| 244 | |||
| 245 | wil6210_mask_irq_misc(wil); | ||
| 246 | |||
| 247 | if (isr & ISR_MISC_FW_READY) { | ||
| 248 | wil_dbg_IRQ(wil, "IRQ: FW ready\n"); | ||
| 249 | /** | ||
| 250 | * Actual FW ready indicated by the | ||
| 251 | * WMI_FW_READY_EVENTID | ||
| 252 | */ | ||
| 253 | isr &= ~ISR_MISC_FW_READY; | ||
| 254 | } | ||
| 255 | |||
| 256 | wil->isr_misc = isr; | ||
| 257 | |||
| 258 | if (isr) { | ||
| 259 | return IRQ_WAKE_THREAD; | ||
| 260 | } else { | ||
| 261 | wil6210_unmask_irq_misc(wil); | ||
| 262 | return IRQ_HANDLED; | ||
| 263 | } | ||
| 264 | } | ||
| 265 | |||
| 266 | static irqreturn_t wil6210_irq_misc_thread(int irq, void *cookie) | ||
| 267 | { | ||
| 268 | struct wil6210_priv *wil = cookie; | ||
| 269 | u32 isr = wil->isr_misc; | ||
| 270 | |||
| 271 | wil_dbg_IRQ(wil, "Thread ISR MISC 0x%08x\n", isr); | ||
| 272 | |||
| 273 | if (isr & ISR_MISC_MBOX_EVT) { | ||
| 274 | wil_dbg_IRQ(wil, "MBOX event\n"); | ||
| 275 | wmi_recv_cmd(wil); | ||
| 276 | isr &= ~ISR_MISC_MBOX_EVT; | ||
| 277 | } | ||
| 278 | |||
| 279 | if (isr) | ||
| 280 | wil_err(wil, "un-handled MISC ISR bits 0x%08x\n", isr); | ||
| 281 | |||
| 282 | wil->isr_misc = 0; | ||
| 283 | |||
| 284 | wil6210_unmask_irq_misc(wil); | ||
| 285 | |||
| 286 | return IRQ_HANDLED; | ||
| 287 | } | ||
| 288 | |||
| 289 | /** | ||
| 290 | * thread IRQ handler | ||
| 291 | */ | ||
| 292 | static irqreturn_t wil6210_thread_irq(int irq, void *cookie) | ||
| 293 | { | ||
| 294 | struct wil6210_priv *wil = cookie; | ||
| 295 | |||
| 296 | wil_dbg_IRQ(wil, "Thread IRQ\n"); | ||
| 297 | /* Discover real IRQ cause */ | ||
| 298 | if (wil->isr_misc) | ||
| 299 | wil6210_irq_misc_thread(irq, cookie); | ||
| 300 | |||
| 301 | wil6210_unmask_irq_pseudo(wil); | ||
| 302 | |||
| 303 | return IRQ_HANDLED; | ||
| 304 | } | ||
| 305 | |||
| 306 | /* DEBUG | ||
| 307 | * There is subtle bug in hardware that causes IRQ to raise when it should be | ||
| 308 | * masked. It is quite rare and hard to debug. | ||
| 309 | * | ||
| 310 | * Catch irq issue if it happens and print all I can. | ||
| 311 | */ | ||
| 312 | static int wil6210_debug_irq_mask(struct wil6210_priv *wil, u32 pseudo_cause) | ||
| 313 | { | ||
| 314 | if (!test_bit(wil_status_irqen, &wil->status)) { | ||
| 315 | u32 icm_rx = wil_ioread32_and_clear(wil->csr + | ||
| 316 | HOSTADDR(RGF_DMA_EP_RX_ICR) + | ||
| 317 | offsetof(struct RGF_ICR, ICM)); | ||
| 318 | u32 icr_rx = wil_ioread32_and_clear(wil->csr + | ||
| 319 | HOSTADDR(RGF_DMA_EP_RX_ICR) + | ||
| 320 | offsetof(struct RGF_ICR, ICR)); | ||
| 321 | u32 imv_rx = ioread32(wil->csr + | ||
| 322 | HOSTADDR(RGF_DMA_EP_RX_ICR) + | ||
| 323 | offsetof(struct RGF_ICR, IMV)); | ||
| 324 | u32 icm_tx = wil_ioread32_and_clear(wil->csr + | ||
| 325 | HOSTADDR(RGF_DMA_EP_TX_ICR) + | ||
| 326 | offsetof(struct RGF_ICR, ICM)); | ||
| 327 | u32 icr_tx = wil_ioread32_and_clear(wil->csr + | ||
| 328 | HOSTADDR(RGF_DMA_EP_TX_ICR) + | ||
| 329 | offsetof(struct RGF_ICR, ICR)); | ||
| 330 | u32 imv_tx = ioread32(wil->csr + | ||
| 331 | HOSTADDR(RGF_DMA_EP_TX_ICR) + | ||
| 332 | offsetof(struct RGF_ICR, IMV)); | ||
| 333 | u32 icm_misc = wil_ioread32_and_clear(wil->csr + | ||
| 334 | HOSTADDR(RGF_DMA_EP_MISC_ICR) + | ||
| 335 | offsetof(struct RGF_ICR, ICM)); | ||
| 336 | u32 icr_misc = wil_ioread32_and_clear(wil->csr + | ||
| 337 | HOSTADDR(RGF_DMA_EP_MISC_ICR) + | ||
| 338 | offsetof(struct RGF_ICR, ICR)); | ||
| 339 | u32 imv_misc = ioread32(wil->csr + | ||
| 340 | HOSTADDR(RGF_DMA_EP_MISC_ICR) + | ||
| 341 | offsetof(struct RGF_ICR, IMV)); | ||
| 342 | wil_err(wil, "IRQ when it should be masked: pseudo 0x%08x\n" | ||
| 343 | "Rx icm:icr:imv 0x%08x 0x%08x 0x%08x\n" | ||
| 344 | "Tx icm:icr:imv 0x%08x 0x%08x 0x%08x\n" | ||
| 345 | "Misc icm:icr:imv 0x%08x 0x%08x 0x%08x\n", | ||
| 346 | pseudo_cause, | ||
| 347 | icm_rx, icr_rx, imv_rx, | ||
| 348 | icm_tx, icr_tx, imv_tx, | ||
| 349 | icm_misc, icr_misc, imv_misc); | ||
| 350 | |||
| 351 | return -EINVAL; | ||
| 352 | } | ||
| 353 | |||
| 354 | return 0; | ||
| 355 | } | ||
| 356 | |||
| 357 | static irqreturn_t wil6210_hardirq(int irq, void *cookie) | ||
| 358 | { | ||
| 359 | irqreturn_t rc = IRQ_HANDLED; | ||
| 360 | struct wil6210_priv *wil = cookie; | ||
| 361 | u32 pseudo_cause = ioread32(wil->csr + HOSTADDR(RGF_DMA_PSEUDO_CAUSE)); | ||
| 362 | |||
| 363 | /** | ||
| 364 | * pseudo_cause is Clear-On-Read, no need to ACK | ||
| 365 | */ | ||
| 366 | if ((pseudo_cause == 0) || ((pseudo_cause & 0xff) == 0xff)) | ||
| 367 | return IRQ_NONE; | ||
| 368 | |||
| 369 | /* FIXME: IRQ mask debug */ | ||
| 370 | if (wil6210_debug_irq_mask(wil, pseudo_cause)) | ||
| 371 | return IRQ_NONE; | ||
| 372 | |||
| 373 | wil6210_mask_irq_pseudo(wil); | ||
| 374 | |||
| 375 | /* Discover real IRQ cause | ||
| 376 | * There are 2 possible phases for every IRQ: | ||
| 377 | * - hard IRQ handler called right here | ||
| 378 | * - threaded handler called later | ||
| 379 | * | ||
| 380 | * Hard IRQ handler reads and clears ISR. | ||
| 381 | * | ||
| 382 | * If threaded handler requested, hard IRQ handler | ||
| 383 | * returns IRQ_WAKE_THREAD and saves ISR register value | ||
| 384 | * for the threaded handler use. | ||
| 385 | * | ||
| 386 | * voting for wake thread - need at least 1 vote | ||
| 387 | */ | ||
| 388 | if ((pseudo_cause & BIT_DMA_PSEUDO_CAUSE_RX) && | ||
| 389 | (wil6210_irq_rx(irq, cookie) == IRQ_WAKE_THREAD)) | ||
| 390 | rc = IRQ_WAKE_THREAD; | ||
| 391 | |||
| 392 | if ((pseudo_cause & BIT_DMA_PSEUDO_CAUSE_TX) && | ||
| 393 | (wil6210_irq_tx(irq, cookie) == IRQ_WAKE_THREAD)) | ||
| 394 | rc = IRQ_WAKE_THREAD; | ||
| 395 | |||
| 396 | if ((pseudo_cause & BIT_DMA_PSEUDO_CAUSE_MISC) && | ||
| 397 | (wil6210_irq_misc(irq, cookie) == IRQ_WAKE_THREAD)) | ||
| 398 | rc = IRQ_WAKE_THREAD; | ||
| 399 | |||
| 400 | /* if thread is requested, it will unmask IRQ */ | ||
| 401 | if (rc != IRQ_WAKE_THREAD) | ||
| 402 | wil6210_unmask_irq_pseudo(wil); | ||
| 403 | |||
| 404 | wil_dbg_IRQ(wil, "Hard IRQ 0x%08x\n", pseudo_cause); | ||
| 405 | |||
| 406 | return rc; | ||
| 407 | } | ||
| 408 | |||
| 409 | static int wil6210_request_3msi(struct wil6210_priv *wil, int irq) | ||
| 410 | { | ||
| 411 | int rc; | ||
| 412 | /* | ||
| 413 | * IRQ's are in the following order: | ||
| 414 | * - Tx | ||
| 415 | * - Rx | ||
| 416 | * - Misc | ||
| 417 | */ | ||
| 418 | |||
| 419 | rc = request_irq(irq, wil6210_irq_tx, IRQF_SHARED, | ||
| 420 | WIL_NAME"_tx", wil); | ||
| 421 | if (rc) | ||
| 422 | return rc; | ||
| 423 | |||
| 424 | rc = request_irq(irq + 1, wil6210_irq_rx, IRQF_SHARED, | ||
| 425 | WIL_NAME"_rx", wil); | ||
| 426 | if (rc) | ||
| 427 | goto free0; | ||
| 428 | |||
| 429 | rc = request_threaded_irq(irq + 2, wil6210_irq_misc, | ||
| 430 | wil6210_irq_misc_thread, | ||
| 431 | IRQF_SHARED, WIL_NAME"_misc", wil); | ||
| 432 | if (rc) | ||
| 433 | goto free1; | ||
| 434 | |||
| 435 | return 0; | ||
| 436 | /* error branch */ | ||
| 437 | free1: | ||
| 438 | free_irq(irq + 1, wil); | ||
| 439 | free0: | ||
| 440 | free_irq(irq, wil); | ||
| 441 | |||
| 442 | return rc; | ||
| 443 | } | ||
| 444 | |||
| 445 | int wil6210_init_irq(struct wil6210_priv *wil, int irq) | ||
| 446 | { | ||
| 447 | int rc; | ||
| 448 | if (wil->n_msi == 3) | ||
| 449 | rc = wil6210_request_3msi(wil, irq); | ||
| 450 | else | ||
| 451 | rc = request_threaded_irq(irq, wil6210_hardirq, | ||
| 452 | wil6210_thread_irq, | ||
| 453 | wil->n_msi ? 0 : IRQF_SHARED, | ||
| 454 | WIL_NAME, wil); | ||
| 455 | if (rc) | ||
| 456 | return rc; | ||
| 457 | |||
| 458 | wil6210_enable_irq(wil); | ||
| 459 | |||
| 460 | return 0; | ||
| 461 | } | ||
| 462 | |||
| 463 | void wil6210_fini_irq(struct wil6210_priv *wil, int irq) | ||
| 464 | { | ||
| 465 | wil6210_disable_irq(wil); | ||
| 466 | free_irq(irq, wil); | ||
| 467 | if (wil->n_msi == 3) { | ||
| 468 | free_irq(irq + 1, wil); | ||
| 469 | free_irq(irq + 2, wil); | ||
| 470 | } | ||
| 471 | } | ||
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c new file mode 100644 index 000000000000..95fcd361322b --- /dev/null +++ b/drivers/net/wireless/ath/wil6210/main.c | |||
| @@ -0,0 +1,407 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012 Qualcomm Atheros, Inc. | ||
| 3 | * | ||
| 4 | * Permission to use, copy, modify, and/or distribute this software for any | ||
| 5 | * purpose with or without fee is hereby granted, provided that the above | ||
| 6 | * copyright notice and this permission notice appear in all copies. | ||
| 7 | * | ||
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <linux/kernel.h> | ||
| 18 | #include <linux/netdevice.h> | ||
| 19 | #include <linux/sched.h> | ||
| 20 | #include <linux/ieee80211.h> | ||
| 21 | #include <linux/wireless.h> | ||
| 22 | #include <linux/slab.h> | ||
| 23 | #include <linux/moduleparam.h> | ||
| 24 | #include <linux/if_arp.h> | ||
| 25 | |||
| 26 | #include "wil6210.h" | ||
| 27 | |||
| 28 | /* | ||
| 29 | * Due to a hardware issue, | ||
| 30 | * one has to read/write to/from NIC in 32-bit chunks; | ||
| 31 | * regular memcpy_fromio and siblings will | ||
| 32 | * not work on 64-bit platform - it uses 64-bit transactions | ||
| 33 | * | ||
| 34 | * Force 32-bit transactions to enable NIC on 64-bit platforms | ||
| 35 | * | ||
| 36 | * To avoid byte swap on big endian host, __raw_{read|write}l | ||
| 37 | * should be used - {read|write}l would swap bytes to provide | ||
| 38 | * little endian on PCI value in host endianness. | ||
| 39 | */ | ||
| 40 | void wil_memcpy_fromio_32(void *dst, const volatile void __iomem *src, | ||
| 41 | size_t count) | ||
| 42 | { | ||
| 43 | u32 *d = dst; | ||
| 44 | const volatile u32 __iomem *s = src; | ||
| 45 | |||
| 46 | /* size_t is unsigned, if (count%4 != 0) it will wrap */ | ||
| 47 | for (count += 4; count > 4; count -= 4) | ||
| 48 | *d++ = __raw_readl(s++); | ||
| 49 | } | ||
| 50 | |||
| 51 | void wil_memcpy_toio_32(volatile void __iomem *dst, const void *src, | ||
| 52 | size_t count) | ||
| 53 | { | ||
| 54 | volatile u32 __iomem *d = dst; | ||
| 55 | const u32 *s = src; | ||
| 56 | |||
| 57 | for (count += 4; count > 4; count -= 4) | ||
| 58 | __raw_writel(*s++, d++); | ||
| 59 | } | ||
| 60 | |||
| 61 | static void _wil6210_disconnect(struct wil6210_priv *wil, void *bssid) | ||
| 62 | { | ||
| 63 | uint i; | ||
| 64 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 65 | struct wireless_dev *wdev = wil->wdev; | ||
| 66 | |||
| 67 | wil_dbg(wil, "%s()\n", __func__); | ||
| 68 | |||
| 69 | wil_link_off(wil); | ||
| 70 | clear_bit(wil_status_fwconnected, &wil->status); | ||
| 71 | |||
| 72 | switch (wdev->sme_state) { | ||
| 73 | case CFG80211_SME_CONNECTED: | ||
| 74 | cfg80211_disconnected(ndev, WLAN_STATUS_UNSPECIFIED_FAILURE, | ||
| 75 | NULL, 0, GFP_KERNEL); | ||
| 76 | break; | ||
| 77 | case CFG80211_SME_CONNECTING: | ||
| 78 | cfg80211_connect_result(ndev, bssid, NULL, 0, NULL, 0, | ||
| 79 | WLAN_STATUS_UNSPECIFIED_FAILURE, | ||
| 80 | GFP_KERNEL); | ||
| 81 | break; | ||
| 82 | default: | ||
| 83 | ; | ||
| 84 | } | ||
| 85 | |||
| 86 | for (i = 0; i < ARRAY_SIZE(wil->vring_tx); i++) | ||
| 87 | wil_vring_fini_tx(wil, i); | ||
| 88 | } | ||
| 89 | |||
| 90 | static void wil_disconnect_worker(struct work_struct *work) | ||
| 91 | { | ||
| 92 | struct wil6210_priv *wil = container_of(work, | ||
| 93 | struct wil6210_priv, disconnect_worker); | ||
| 94 | |||
| 95 | _wil6210_disconnect(wil, NULL); | ||
| 96 | } | ||
| 97 | |||
| 98 | static void wil_connect_timer_fn(ulong x) | ||
| 99 | { | ||
| 100 | struct wil6210_priv *wil = (void *)x; | ||
| 101 | |||
| 102 | wil_dbg(wil, "Connect timeout\n"); | ||
| 103 | |||
| 104 | /* reschedule to thread context - disconnect won't | ||
| 105 | * run from atomic context | ||
| 106 | */ | ||
| 107 | schedule_work(&wil->disconnect_worker); | ||
| 108 | } | ||
| 109 | |||
| 110 | int wil_priv_init(struct wil6210_priv *wil) | ||
| 111 | { | ||
| 112 | wil_dbg(wil, "%s()\n", __func__); | ||
| 113 | |||
| 114 | mutex_init(&wil->mutex); | ||
| 115 | mutex_init(&wil->wmi_mutex); | ||
| 116 | |||
| 117 | init_completion(&wil->wmi_ready); | ||
| 118 | |||
| 119 | wil->pending_connect_cid = -1; | ||
| 120 | setup_timer(&wil->connect_timer, wil_connect_timer_fn, (ulong)wil); | ||
| 121 | |||
| 122 | INIT_WORK(&wil->wmi_connect_worker, wmi_connect_worker); | ||
| 123 | INIT_WORK(&wil->disconnect_worker, wil_disconnect_worker); | ||
| 124 | INIT_WORK(&wil->wmi_event_worker, wmi_event_worker); | ||
| 125 | |||
| 126 | INIT_LIST_HEAD(&wil->pending_wmi_ev); | ||
| 127 | spin_lock_init(&wil->wmi_ev_lock); | ||
| 128 | |||
| 129 | wil->wmi_wq = create_singlethread_workqueue(WIL_NAME"_wmi"); | ||
| 130 | if (!wil->wmi_wq) | ||
| 131 | return -EAGAIN; | ||
| 132 | |||
| 133 | wil->wmi_wq_conn = create_singlethread_workqueue(WIL_NAME"_connect"); | ||
| 134 | if (!wil->wmi_wq_conn) { | ||
| 135 | destroy_workqueue(wil->wmi_wq); | ||
| 136 | return -EAGAIN; | ||
| 137 | } | ||
| 138 | |||
| 139 | /* make shadow copy of registers that should not change on run time */ | ||
| 140 | wil_memcpy_fromio_32(&wil->mbox_ctl, wil->csr + HOST_MBOX, | ||
| 141 | sizeof(struct wil6210_mbox_ctl)); | ||
| 142 | wil_mbox_ring_le2cpus(&wil->mbox_ctl.rx); | ||
| 143 | wil_mbox_ring_le2cpus(&wil->mbox_ctl.tx); | ||
| 144 | |||
| 145 | return 0; | ||
| 146 | } | ||
| 147 | |||
| 148 | void wil6210_disconnect(struct wil6210_priv *wil, void *bssid) | ||
| 149 | { | ||
| 150 | del_timer_sync(&wil->connect_timer); | ||
| 151 | _wil6210_disconnect(wil, bssid); | ||
| 152 | } | ||
| 153 | |||
| 154 | void wil_priv_deinit(struct wil6210_priv *wil) | ||
| 155 | { | ||
| 156 | cancel_work_sync(&wil->disconnect_worker); | ||
| 157 | wil6210_disconnect(wil, NULL); | ||
| 158 | wmi_event_flush(wil); | ||
| 159 | destroy_workqueue(wil->wmi_wq_conn); | ||
| 160 | destroy_workqueue(wil->wmi_wq); | ||
| 161 | } | ||
| 162 | |||
| 163 | static void wil_target_reset(struct wil6210_priv *wil) | ||
| 164 | { | ||
| 165 | wil_dbg(wil, "Resetting...\n"); | ||
| 166 | |||
| 167 | /* register write */ | ||
| 168 | #define W(a, v) iowrite32(v, wil->csr + HOSTADDR(a)) | ||
| 169 | /* register set = read, OR, write */ | ||
| 170 | #define S(a, v) iowrite32(ioread32(wil->csr + HOSTADDR(a)) | v, \ | ||
| 171 | wil->csr + HOSTADDR(a)) | ||
| 172 | |||
| 173 | /* hpal_perst_from_pad_src_n_mask */ | ||
| 174 | S(RGF_USER_CLKS_CTL_SW_RST_MASK_0, BIT(6)); | ||
| 175 | /* car_perst_rst_src_n_mask */ | ||
| 176 | S(RGF_USER_CLKS_CTL_SW_RST_MASK_0, BIT(7)); | ||
| 177 | |||
| 178 | W(RGF_USER_MAC_CPU_0, BIT(1)); /* mac_cpu_man_rst */ | ||
| 179 | W(RGF_USER_USER_CPU_0, BIT(1)); /* user_cpu_man_rst */ | ||
| 180 | |||
| 181 | msleep(100); | ||
| 182 | |||
| 183 | W(RGF_USER_CLKS_CTL_SW_RST_VEC_2, 0xFE000000); | ||
| 184 | W(RGF_USER_CLKS_CTL_SW_RST_VEC_1, 0x0000003F); | ||
| 185 | W(RGF_USER_CLKS_CTL_SW_RST_VEC_3, 0x00000170); | ||
| 186 | W(RGF_USER_CLKS_CTL_SW_RST_VEC_0, 0xFFE7FC00); | ||
| 187 | |||
| 188 | msleep(100); | ||
| 189 | |||
| 190 | W(RGF_USER_CLKS_CTL_SW_RST_VEC_3, 0); | ||
| 191 | W(RGF_USER_CLKS_CTL_SW_RST_VEC_2, 0); | ||
| 192 | W(RGF_USER_CLKS_CTL_SW_RST_VEC_1, 0); | ||
| 193 | W(RGF_USER_CLKS_CTL_SW_RST_VEC_0, 0); | ||
| 194 | |||
| 195 | W(RGF_USER_CLKS_CTL_SW_RST_VEC_3, 0x00000001); | ||
| 196 | W(RGF_USER_CLKS_CTL_SW_RST_VEC_2, 0x00000080); | ||
| 197 | W(RGF_USER_CLKS_CTL_SW_RST_VEC_0, 0); | ||
| 198 | |||
| 199 | msleep(2000); | ||
| 200 | |||
| 201 | W(RGF_USER_USER_CPU_0, BIT(0)); /* user_cpu_man_de_rst */ | ||
| 202 | |||
| 203 | msleep(2000); | ||
| 204 | |||
| 205 | wil_dbg(wil, "Reset completed\n"); | ||
| 206 | |||
| 207 | #undef W | ||
| 208 | #undef S | ||
| 209 | } | ||
| 210 | |||
| 211 | void wil_mbox_ring_le2cpus(struct wil6210_mbox_ring *r) | ||
| 212 | { | ||
| 213 | le32_to_cpus(&r->base); | ||
| 214 | le16_to_cpus(&r->entry_size); | ||
| 215 | le16_to_cpus(&r->size); | ||
| 216 | le32_to_cpus(&r->tail); | ||
| 217 | le32_to_cpus(&r->head); | ||
| 218 | } | ||
| 219 | |||
| 220 | static int wil_wait_for_fw_ready(struct wil6210_priv *wil) | ||
| 221 | { | ||
| 222 | ulong to = msecs_to_jiffies(1000); | ||
| 223 | ulong left = wait_for_completion_timeout(&wil->wmi_ready, to); | ||
| 224 | if (0 == left) { | ||
| 225 | wil_err(wil, "Firmware not ready\n"); | ||
| 226 | return -ETIME; | ||
| 227 | } else { | ||
| 228 | wil_dbg(wil, "FW ready after %d ms\n", | ||
| 229 | jiffies_to_msecs(to-left)); | ||
| 230 | } | ||
| 231 | return 0; | ||
| 232 | } | ||
| 233 | |||
| 234 | /* | ||
| 235 | * We reset all the structures, and we reset the UMAC. | ||
| 236 | * After calling this routine, you're expected to reload | ||
| 237 | * the firmware. | ||
| 238 | */ | ||
| 239 | int wil_reset(struct wil6210_priv *wil) | ||
| 240 | { | ||
| 241 | int rc; | ||
| 242 | |||
| 243 | cancel_work_sync(&wil->disconnect_worker); | ||
| 244 | wil6210_disconnect(wil, NULL); | ||
| 245 | |||
| 246 | wmi_event_flush(wil); | ||
| 247 | |||
| 248 | flush_workqueue(wil->wmi_wq); | ||
| 249 | flush_workqueue(wil->wmi_wq_conn); | ||
| 250 | |||
| 251 | wil6210_disable_irq(wil); | ||
| 252 | wil->status = 0; | ||
| 253 | |||
| 254 | /* TODO: put MAC in reset */ | ||
| 255 | wil_target_reset(wil); | ||
| 256 | |||
| 257 | /* init after reset */ | ||
| 258 | wil->pending_connect_cid = -1; | ||
| 259 | INIT_COMPLETION(wil->wmi_ready); | ||
| 260 | |||
| 261 | /* make shadow copy of registers that should not change on run time */ | ||
| 262 | wil_memcpy_fromio_32(&wil->mbox_ctl, wil->csr + HOST_MBOX, | ||
| 263 | sizeof(struct wil6210_mbox_ctl)); | ||
| 264 | wil_mbox_ring_le2cpus(&wil->mbox_ctl.rx); | ||
| 265 | wil_mbox_ring_le2cpus(&wil->mbox_ctl.tx); | ||
| 266 | |||
| 267 | /* TODO: release MAC reset */ | ||
| 268 | wil6210_enable_irq(wil); | ||
| 269 | |||
| 270 | /* we just started MAC, wait for FW ready */ | ||
| 271 | rc = wil_wait_for_fw_ready(wil); | ||
| 272 | |||
| 273 | return rc; | ||
| 274 | } | ||
| 275 | |||
| 276 | |||
| 277 | void wil_link_on(struct wil6210_priv *wil) | ||
| 278 | { | ||
| 279 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 280 | |||
| 281 | wil_dbg(wil, "%s()\n", __func__); | ||
| 282 | |||
| 283 | netif_carrier_on(ndev); | ||
| 284 | netif_tx_wake_all_queues(ndev); | ||
| 285 | } | ||
| 286 | |||
| 287 | void wil_link_off(struct wil6210_priv *wil) | ||
| 288 | { | ||
| 289 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 290 | |||
| 291 | wil_dbg(wil, "%s()\n", __func__); | ||
| 292 | |||
| 293 | netif_tx_stop_all_queues(ndev); | ||
| 294 | netif_carrier_off(ndev); | ||
| 295 | } | ||
| 296 | |||
| 297 | static int __wil_up(struct wil6210_priv *wil) | ||
| 298 | { | ||
| 299 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 300 | struct wireless_dev *wdev = wil->wdev; | ||
| 301 | struct ieee80211_channel *channel = wdev->preset_chandef.chan; | ||
| 302 | int rc; | ||
| 303 | int bi; | ||
| 304 | u16 wmi_nettype = wil_iftype_nl2wmi(wdev->iftype); | ||
| 305 | |||
| 306 | rc = wil_reset(wil); | ||
| 307 | if (rc) | ||
| 308 | return rc; | ||
| 309 | |||
| 310 | /* FIXME Firmware works now in PBSS mode(ToDS=0, FromDS=0) */ | ||
| 311 | wmi_nettype = wil_iftype_nl2wmi(NL80211_IFTYPE_ADHOC); | ||
| 312 | switch (wdev->iftype) { | ||
| 313 | case NL80211_IFTYPE_STATION: | ||
| 314 | wil_dbg(wil, "type: STATION\n"); | ||
| 315 | bi = 0; | ||
| 316 | ndev->type = ARPHRD_ETHER; | ||
| 317 | break; | ||
| 318 | case NL80211_IFTYPE_AP: | ||
| 319 | wil_dbg(wil, "type: AP\n"); | ||
| 320 | bi = 100; | ||
| 321 | ndev->type = ARPHRD_ETHER; | ||
| 322 | break; | ||
| 323 | case NL80211_IFTYPE_P2P_CLIENT: | ||
| 324 | wil_dbg(wil, "type: P2P_CLIENT\n"); | ||
| 325 | bi = 0; | ||
| 326 | ndev->type = ARPHRD_ETHER; | ||
| 327 | break; | ||
| 328 | case NL80211_IFTYPE_P2P_GO: | ||
| 329 | wil_dbg(wil, "type: P2P_GO\n"); | ||
| 330 | bi = 100; | ||
| 331 | ndev->type = ARPHRD_ETHER; | ||
| 332 | break; | ||
| 333 | case NL80211_IFTYPE_MONITOR: | ||
| 334 | wil_dbg(wil, "type: Monitor\n"); | ||
| 335 | bi = 0; | ||
| 336 | ndev->type = ARPHRD_IEEE80211_RADIOTAP; | ||
| 337 | /* ARPHRD_IEEE80211 or ARPHRD_IEEE80211_RADIOTAP ? */ | ||
| 338 | break; | ||
| 339 | default: | ||
| 340 | return -EOPNOTSUPP; | ||
| 341 | } | ||
| 342 | |||
| 343 | /* Apply profile in the following order: */ | ||
| 344 | /* SSID and channel for the AP */ | ||
| 345 | switch (wdev->iftype) { | ||
| 346 | case NL80211_IFTYPE_AP: | ||
| 347 | case NL80211_IFTYPE_P2P_GO: | ||
| 348 | if (wdev->ssid_len == 0) { | ||
| 349 | wil_err(wil, "SSID not set\n"); | ||
| 350 | return -EINVAL; | ||
| 351 | } | ||
| 352 | wmi_set_ssid(wil, wdev->ssid_len, wdev->ssid); | ||
| 353 | if (channel) | ||
| 354 | wmi_set_channel(wil, channel->hw_value); | ||
| 355 | break; | ||
| 356 | default: | ||
| 357 | ; | ||
| 358 | } | ||
| 359 | |||
| 360 | /* MAC address - pre-requisite for other commands */ | ||
| 361 | wmi_set_mac_address(wil, ndev->dev_addr); | ||
| 362 | |||
| 363 | /* Set up beaconing if required. */ | ||
| 364 | rc = wmi_set_bcon(wil, bi, wmi_nettype); | ||
| 365 | if (rc) | ||
| 366 | return rc; | ||
| 367 | |||
| 368 | /* Rx VRING. After MAC and beacon */ | ||
| 369 | wil_rx_init(wil); | ||
| 370 | |||
| 371 | return 0; | ||
| 372 | } | ||
| 373 | |||
| 374 | int wil_up(struct wil6210_priv *wil) | ||
| 375 | { | ||
| 376 | int rc; | ||
| 377 | |||
| 378 | mutex_lock(&wil->mutex); | ||
| 379 | rc = __wil_up(wil); | ||
| 380 | mutex_unlock(&wil->mutex); | ||
| 381 | |||
| 382 | return rc; | ||
| 383 | } | ||
| 384 | |||
| 385 | static int __wil_down(struct wil6210_priv *wil) | ||
| 386 | { | ||
| 387 | if (wil->scan_request) { | ||
| 388 | cfg80211_scan_done(wil->scan_request, true); | ||
| 389 | wil->scan_request = NULL; | ||
| 390 | } | ||
| 391 | |||
| 392 | wil6210_disconnect(wil, NULL); | ||
| 393 | wil_rx_fini(wil); | ||
| 394 | |||
| 395 | return 0; | ||
| 396 | } | ||
| 397 | |||
| 398 | int wil_down(struct wil6210_priv *wil) | ||
| 399 | { | ||
| 400 | int rc; | ||
| 401 | |||
| 402 | mutex_lock(&wil->mutex); | ||
| 403 | rc = __wil_down(wil); | ||
| 404 | mutex_unlock(&wil->mutex); | ||
| 405 | |||
| 406 | return rc; | ||
| 407 | } | ||
diff --git a/drivers/net/wireless/ath/wil6210/netdev.c b/drivers/net/wireless/ath/wil6210/netdev.c new file mode 100644 index 000000000000..3068b5cb53a7 --- /dev/null +++ b/drivers/net/wireless/ath/wil6210/netdev.c | |||
| @@ -0,0 +1,157 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012 Qualcomm Atheros, Inc. | ||
| 3 | * | ||
| 4 | * Permission to use, copy, modify, and/or distribute this software for any | ||
| 5 | * purpose with or without fee is hereby granted, provided that the above | ||
| 6 | * copyright notice and this permission notice appear in all copies. | ||
| 7 | * | ||
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <linux/module.h> | ||
| 18 | #include <linux/netdevice.h> | ||
| 19 | #include <linux/etherdevice.h> | ||
| 20 | #include <linux/slab.h> | ||
| 21 | |||
| 22 | #include "wil6210.h" | ||
| 23 | |||
| 24 | static int wil_open(struct net_device *ndev) | ||
| 25 | { | ||
| 26 | struct wil6210_priv *wil = ndev_to_wil(ndev); | ||
| 27 | |||
| 28 | return wil_up(wil); | ||
| 29 | } | ||
| 30 | |||
| 31 | static int wil_stop(struct net_device *ndev) | ||
| 32 | { | ||
| 33 | struct wil6210_priv *wil = ndev_to_wil(ndev); | ||
| 34 | |||
| 35 | return wil_down(wil); | ||
| 36 | } | ||
| 37 | |||
| 38 | /* | ||
| 39 | * AC to queue mapping | ||
| 40 | * | ||
| 41 | * AC_VO -> queue 3 | ||
| 42 | * AC_VI -> queue 2 | ||
| 43 | * AC_BE -> queue 1 | ||
| 44 | * AC_BK -> queue 0 | ||
| 45 | */ | ||
| 46 | static u16 wil_select_queue(struct net_device *ndev, struct sk_buff *skb) | ||
| 47 | { | ||
| 48 | static const u16 wil_1d_to_queue[8] = { 1, 0, 0, 1, 2, 2, 3, 3 }; | ||
| 49 | struct wil6210_priv *wil = ndev_to_wil(ndev); | ||
| 50 | u16 rc; | ||
| 51 | |||
| 52 | skb->priority = cfg80211_classify8021d(skb); | ||
| 53 | |||
| 54 | rc = wil_1d_to_queue[skb->priority]; | ||
| 55 | |||
| 56 | wil_dbg_TXRX(wil, "%s() %d -> %d\n", __func__, (int)skb->priority, | ||
| 57 | (int)rc); | ||
| 58 | |||
| 59 | return rc; | ||
| 60 | } | ||
| 61 | |||
| 62 | static const struct net_device_ops wil_netdev_ops = { | ||
| 63 | .ndo_open = wil_open, | ||
| 64 | .ndo_stop = wil_stop, | ||
| 65 | .ndo_start_xmit = wil_start_xmit, | ||
| 66 | .ndo_select_queue = wil_select_queue, | ||
| 67 | .ndo_set_mac_address = eth_mac_addr, | ||
| 68 | .ndo_validate_addr = eth_validate_addr, | ||
| 69 | }; | ||
| 70 | |||
| 71 | void *wil_if_alloc(struct device *dev, void __iomem *csr) | ||
| 72 | { | ||
| 73 | struct net_device *ndev; | ||
| 74 | struct wireless_dev *wdev; | ||
| 75 | struct wil6210_priv *wil; | ||
| 76 | struct ieee80211_channel *ch; | ||
| 77 | int rc = 0; | ||
| 78 | |||
| 79 | wdev = wil_cfg80211_init(dev); | ||
| 80 | if (IS_ERR(wdev)) { | ||
| 81 | dev_err(dev, "wil_cfg80211_init failed\n"); | ||
| 82 | return wdev; | ||
| 83 | } | ||
| 84 | |||
| 85 | wil = wdev_to_wil(wdev); | ||
| 86 | wil->csr = csr; | ||
| 87 | wil->wdev = wdev; | ||
| 88 | |||
| 89 | rc = wil_priv_init(wil); | ||
| 90 | if (rc) { | ||
| 91 | dev_err(dev, "wil_priv_init failed\n"); | ||
| 92 | goto out_wdev; | ||
| 93 | } | ||
| 94 | |||
| 95 | wdev->iftype = NL80211_IFTYPE_STATION; /* TODO */ | ||
| 96 | /* default monitor channel */ | ||
| 97 | ch = wdev->wiphy->bands[IEEE80211_BAND_60GHZ]->channels; | ||
| 98 | cfg80211_chandef_create(&wdev->preset_chandef, ch, NL80211_CHAN_NO_HT); | ||
| 99 | |||
| 100 | ndev = alloc_netdev_mqs(0, "wlan%d", ether_setup, WIL6210_TX_QUEUES, 1); | ||
| 101 | if (!ndev) { | ||
| 102 | dev_err(dev, "alloc_netdev_mqs failed\n"); | ||
| 103 | rc = -ENOMEM; | ||
| 104 | goto out_priv; | ||
| 105 | } | ||
| 106 | |||
| 107 | ndev->netdev_ops = &wil_netdev_ops; | ||
| 108 | ndev->ieee80211_ptr = wdev; | ||
| 109 | SET_NETDEV_DEV(ndev, wiphy_dev(wdev->wiphy)); | ||
| 110 | wdev->netdev = ndev; | ||
| 111 | |||
| 112 | wil_link_off(wil); | ||
| 113 | |||
| 114 | return wil; | ||
| 115 | |||
| 116 | out_priv: | ||
| 117 | wil_priv_deinit(wil); | ||
| 118 | |||
| 119 | out_wdev: | ||
| 120 | wil_wdev_free(wil); | ||
| 121 | |||
| 122 | return ERR_PTR(rc); | ||
| 123 | } | ||
| 124 | |||
| 125 | void wil_if_free(struct wil6210_priv *wil) | ||
| 126 | { | ||
| 127 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 128 | if (!ndev) | ||
| 129 | return; | ||
| 130 | |||
| 131 | free_netdev(ndev); | ||
| 132 | wil_priv_deinit(wil); | ||
| 133 | wil_wdev_free(wil); | ||
| 134 | } | ||
| 135 | |||
| 136 | int wil_if_add(struct wil6210_priv *wil) | ||
| 137 | { | ||
| 138 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 139 | int rc; | ||
| 140 | |||
| 141 | rc = register_netdev(ndev); | ||
| 142 | if (rc < 0) { | ||
| 143 | dev_err(&ndev->dev, "Failed to register netdev: %d\n", rc); | ||
| 144 | return rc; | ||
| 145 | } | ||
| 146 | |||
| 147 | wil_link_off(wil); | ||
| 148 | |||
| 149 | return 0; | ||
| 150 | } | ||
| 151 | |||
| 152 | void wil_if_remove(struct wil6210_priv *wil) | ||
| 153 | { | ||
| 154 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 155 | |||
| 156 | unregister_netdev(ndev); | ||
| 157 | } | ||
diff --git a/drivers/net/wireless/ath/wil6210/pcie_bus.c b/drivers/net/wireless/ath/wil6210/pcie_bus.c new file mode 100644 index 000000000000..0fc83edd6bad --- /dev/null +++ b/drivers/net/wireless/ath/wil6210/pcie_bus.c | |||
| @@ -0,0 +1,223 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012 Qualcomm Atheros, Inc. | ||
| 3 | * | ||
| 4 | * Permission to use, copy, modify, and/or distribute this software for any | ||
| 5 | * purpose with or without fee is hereby granted, provided that the above | ||
| 6 | * copyright notice and this permission notice appear in all copies. | ||
| 7 | * | ||
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <linux/kernel.h> | ||
| 18 | #include <linux/module.h> | ||
| 19 | #include <linux/slab.h> | ||
| 20 | #include <linux/netdevice.h> | ||
| 21 | #include <linux/debugfs.h> | ||
| 22 | #include <linux/pci.h> | ||
| 23 | #include <linux/moduleparam.h> | ||
| 24 | |||
| 25 | #include "wil6210.h" | ||
| 26 | |||
| 27 | static int use_msi = 1; | ||
| 28 | module_param(use_msi, int, S_IRUGO); | ||
| 29 | MODULE_PARM_DESC(use_msi, | ||
| 30 | " Use MSI interrupt: " | ||
| 31 | "0 - don't, 1 - (default) - single, or 3"); | ||
| 32 | |||
| 33 | /* Bus ops */ | ||
| 34 | static int wil_if_pcie_enable(struct wil6210_priv *wil) | ||
| 35 | { | ||
| 36 | struct pci_dev *pdev = wil->pdev; | ||
| 37 | int rc; | ||
| 38 | |||
| 39 | pci_set_master(pdev); | ||
| 40 | |||
| 41 | /* | ||
| 42 | * how many MSI interrupts to request? | ||
| 43 | */ | ||
| 44 | switch (use_msi) { | ||
| 45 | case 3: | ||
| 46 | case 1: | ||
| 47 | case 0: | ||
| 48 | break; | ||
| 49 | default: | ||
| 50 | wil_err(wil, "Invalid use_msi=%d, default to 1\n", | ||
| 51 | use_msi); | ||
| 52 | use_msi = 1; | ||
| 53 | } | ||
| 54 | wil->n_msi = use_msi; | ||
| 55 | if (wil->n_msi) { | ||
| 56 | wil_dbg(wil, "Setup %d MSI interrupts\n", use_msi); | ||
| 57 | rc = pci_enable_msi_block(pdev, wil->n_msi); | ||
| 58 | if (rc && (wil->n_msi == 3)) { | ||
| 59 | wil_err(wil, "3 MSI mode failed, try 1 MSI\n"); | ||
| 60 | wil->n_msi = 1; | ||
| 61 | rc = pci_enable_msi_block(pdev, wil->n_msi); | ||
| 62 | } | ||
| 63 | if (rc) { | ||
| 64 | wil_err(wil, "pci_enable_msi failed, use INTx\n"); | ||
| 65 | wil->n_msi = 0; | ||
| 66 | } | ||
| 67 | } else { | ||
| 68 | wil_dbg(wil, "MSI interrupts disabled, use INTx\n"); | ||
| 69 | } | ||
| 70 | |||
| 71 | rc = wil6210_init_irq(wil, pdev->irq); | ||
| 72 | if (rc) | ||
| 73 | goto stop_master; | ||
| 74 | |||
| 75 | /* need reset here to obtain MAC */ | ||
| 76 | rc = wil_reset(wil); | ||
| 77 | if (rc) | ||
| 78 | goto release_irq; | ||
| 79 | |||
| 80 | return 0; | ||
| 81 | |||
| 82 | release_irq: | ||
| 83 | wil6210_fini_irq(wil, pdev->irq); | ||
| 84 | /* safe to call if no MSI */ | ||
| 85 | pci_disable_msi(pdev); | ||
| 86 | stop_master: | ||
| 87 | pci_clear_master(pdev); | ||
| 88 | return rc; | ||
| 89 | } | ||
| 90 | |||
| 91 | static int wil_if_pcie_disable(struct wil6210_priv *wil) | ||
| 92 | { | ||
| 93 | struct pci_dev *pdev = wil->pdev; | ||
| 94 | |||
| 95 | pci_clear_master(pdev); | ||
| 96 | /* disable and release IRQ */ | ||
| 97 | wil6210_fini_irq(wil, pdev->irq); | ||
| 98 | /* safe to call if no MSI */ | ||
| 99 | pci_disable_msi(pdev); | ||
| 100 | /* TODO: disable HW */ | ||
| 101 | |||
| 102 | return 0; | ||
| 103 | } | ||
| 104 | |||
| 105 | static int wil_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) | ||
| 106 | { | ||
| 107 | struct wil6210_priv *wil; | ||
| 108 | struct device *dev = &pdev->dev; | ||
| 109 | void __iomem *csr; | ||
| 110 | int rc; | ||
| 111 | |||
| 112 | /* check HW */ | ||
| 113 | dev_info(&pdev->dev, WIL_NAME " device found [%04x:%04x] (rev %x)\n", | ||
| 114 | (int)pdev->vendor, (int)pdev->device, (int)pdev->revision); | ||
| 115 | |||
| 116 | if (pci_resource_len(pdev, 0) != WIL6210_MEM_SIZE) { | ||
| 117 | dev_err(&pdev->dev, "Not " WIL_NAME "? " | ||
| 118 | "BAR0 size is %lu while expecting %lu\n", | ||
| 119 | (ulong)pci_resource_len(pdev, 0), WIL6210_MEM_SIZE); | ||
| 120 | return -ENODEV; | ||
| 121 | } | ||
| 122 | |||
| 123 | rc = pci_enable_device(pdev); | ||
| 124 | if (rc) { | ||
| 125 | dev_err(&pdev->dev, "pci_enable_device failed\n"); | ||
| 126 | return -ENODEV; | ||
| 127 | } | ||
| 128 | /* rollback to err_disable_pdev */ | ||
| 129 | |||
| 130 | rc = pci_request_region(pdev, 0, WIL_NAME); | ||
| 131 | if (rc) { | ||
| 132 | dev_err(&pdev->dev, "pci_request_region failed\n"); | ||
| 133 | goto err_disable_pdev; | ||
| 134 | } | ||
| 135 | /* rollback to err_release_reg */ | ||
| 136 | |||
| 137 | csr = pci_ioremap_bar(pdev, 0); | ||
| 138 | if (!csr) { | ||
| 139 | dev_err(&pdev->dev, "pci_ioremap_bar failed\n"); | ||
| 140 | rc = -ENODEV; | ||
| 141 | goto err_release_reg; | ||
| 142 | } | ||
| 143 | /* rollback to err_iounmap */ | ||
| 144 | dev_info(&pdev->dev, "CSR at %pR -> %p\n", &pdev->resource[0], csr); | ||
| 145 | |||
| 146 | wil = wil_if_alloc(dev, csr); | ||
| 147 | if (IS_ERR(wil)) { | ||
| 148 | rc = (int)PTR_ERR(wil); | ||
| 149 | dev_err(dev, "wil_if_alloc failed: %d\n", rc); | ||
| 150 | goto err_iounmap; | ||
| 151 | } | ||
| 152 | /* rollback to if_free */ | ||
| 153 | |||
| 154 | pci_set_drvdata(pdev, wil); | ||
| 155 | wil->pdev = pdev; | ||
| 156 | |||
| 157 | /* FW should raise IRQ when ready */ | ||
| 158 | rc = wil_if_pcie_enable(wil); | ||
| 159 | if (rc) { | ||
| 160 | wil_err(wil, "Enable device failed\n"); | ||
| 161 | goto if_free; | ||
| 162 | } | ||
| 163 | /* rollback to bus_disable */ | ||
| 164 | |||
| 165 | rc = wil_if_add(wil); | ||
| 166 | if (rc) { | ||
| 167 | wil_err(wil, "wil_if_add failed: %d\n", rc); | ||
| 168 | goto bus_disable; | ||
| 169 | } | ||
| 170 | |||
| 171 | wil6210_debugfs_init(wil); | ||
| 172 | |||
| 173 | /* check FW is alive */ | ||
| 174 | wmi_echo(wil); | ||
| 175 | |||
| 176 | return 0; | ||
| 177 | |||
| 178 | bus_disable: | ||
| 179 | wil_if_pcie_disable(wil); | ||
| 180 | if_free: | ||
| 181 | wil_if_free(wil); | ||
| 182 | err_iounmap: | ||
| 183 | pci_iounmap(pdev, csr); | ||
| 184 | err_release_reg: | ||
| 185 | pci_release_region(pdev, 0); | ||
| 186 | err_disable_pdev: | ||
| 187 | pci_disable_device(pdev); | ||
| 188 | |||
| 189 | return rc; | ||
| 190 | } | ||
| 191 | |||
| 192 | static void wil_pcie_remove(struct pci_dev *pdev) | ||
| 193 | { | ||
| 194 | struct wil6210_priv *wil = pci_get_drvdata(pdev); | ||
| 195 | |||
| 196 | wil6210_debugfs_remove(wil); | ||
| 197 | wil_if_pcie_disable(wil); | ||
| 198 | wil_if_remove(wil); | ||
| 199 | wil_if_free(wil); | ||
| 200 | pci_iounmap(pdev, wil->csr); | ||
| 201 | pci_release_region(pdev, 0); | ||
| 202 | pci_disable_device(pdev); | ||
| 203 | pci_set_drvdata(pdev, NULL); | ||
| 204 | } | ||
| 205 | |||
| 206 | static DEFINE_PCI_DEVICE_TABLE(wil6210_pcie_ids) = { | ||
| 207 | { PCI_DEVICE(0x1ae9, 0x0301) }, | ||
| 208 | { /* end: all zeroes */ }, | ||
| 209 | }; | ||
| 210 | MODULE_DEVICE_TABLE(pci, wil6210_pcie_ids); | ||
| 211 | |||
| 212 | static struct pci_driver wil6210_driver = { | ||
| 213 | .probe = wil_pcie_probe, | ||
| 214 | .remove = wil_pcie_remove, | ||
| 215 | .id_table = wil6210_pcie_ids, | ||
| 216 | .name = WIL_NAME, | ||
| 217 | }; | ||
| 218 | |||
| 219 | module_pci_driver(wil6210_driver); | ||
| 220 | |||
| 221 | MODULE_LICENSE("Dual BSD/GPL"); | ||
| 222 | MODULE_AUTHOR("Qualcomm Atheros <wil6210@qca.qualcomm.com>"); | ||
| 223 | MODULE_DESCRIPTION("Driver for 60g WiFi WIL6210 card"); | ||
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c new file mode 100644 index 000000000000..f29c294413cf --- /dev/null +++ b/drivers/net/wireless/ath/wil6210/txrx.c | |||
| @@ -0,0 +1,871 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012 Qualcomm Atheros, Inc. | ||
| 3 | * | ||
| 4 | * Permission to use, copy, modify, and/or distribute this software for any | ||
| 5 | * purpose with or without fee is hereby granted, provided that the above | ||
| 6 | * copyright notice and this permission notice appear in all copies. | ||
| 7 | * | ||
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <linux/kernel.h> | ||
| 18 | #include <linux/netdevice.h> | ||
| 19 | #include <linux/etherdevice.h> | ||
| 20 | #include <linux/hardirq.h> | ||
| 21 | #include <net/ieee80211_radiotap.h> | ||
| 22 | #include <linux/if_arp.h> | ||
| 23 | #include <linux/moduleparam.h> | ||
| 24 | |||
| 25 | #include "wil6210.h" | ||
| 26 | #include "wmi.h" | ||
| 27 | #include "txrx.h" | ||
| 28 | |||
| 29 | static bool rtap_include_phy_info; | ||
| 30 | module_param(rtap_include_phy_info, bool, S_IRUGO); | ||
| 31 | MODULE_PARM_DESC(rtap_include_phy_info, | ||
| 32 | " Include PHY info in the radiotap header, default - no"); | ||
| 33 | |||
| 34 | static inline int wil_vring_is_empty(struct vring *vring) | ||
| 35 | { | ||
| 36 | return vring->swhead == vring->swtail; | ||
| 37 | } | ||
| 38 | |||
| 39 | static inline u32 wil_vring_next_tail(struct vring *vring) | ||
| 40 | { | ||
| 41 | return (vring->swtail + 1) % vring->size; | ||
| 42 | } | ||
| 43 | |||
| 44 | static inline void wil_vring_advance_head(struct vring *vring, int n) | ||
| 45 | { | ||
| 46 | vring->swhead = (vring->swhead + n) % vring->size; | ||
| 47 | } | ||
| 48 | |||
| 49 | static inline int wil_vring_is_full(struct vring *vring) | ||
| 50 | { | ||
| 51 | return wil_vring_next_tail(vring) == vring->swhead; | ||
| 52 | } | ||
| 53 | /* | ||
| 54 | * Available space in Tx Vring | ||
| 55 | */ | ||
| 56 | static inline int wil_vring_avail_tx(struct vring *vring) | ||
| 57 | { | ||
| 58 | u32 swhead = vring->swhead; | ||
| 59 | u32 swtail = vring->swtail; | ||
| 60 | int used = (vring->size + swhead - swtail) % vring->size; | ||
| 61 | |||
| 62 | return vring->size - used - 1; | ||
| 63 | } | ||
| 64 | |||
| 65 | static int wil_vring_alloc(struct wil6210_priv *wil, struct vring *vring) | ||
| 66 | { | ||
| 67 | struct device *dev = wil_to_dev(wil); | ||
| 68 | size_t sz = vring->size * sizeof(vring->va[0]); | ||
| 69 | uint i; | ||
| 70 | |||
| 71 | BUILD_BUG_ON(sizeof(vring->va[0]) != 32); | ||
| 72 | |||
| 73 | vring->swhead = 0; | ||
| 74 | vring->swtail = 0; | ||
| 75 | vring->ctx = kzalloc(vring->size * sizeof(vring->ctx[0]), GFP_KERNEL); | ||
| 76 | if (!vring->ctx) { | ||
| 77 | wil_err(wil, "vring_alloc [%d] failed to alloc ctx mem\n", | ||
| 78 | vring->size); | ||
| 79 | vring->va = NULL; | ||
| 80 | return -ENOMEM; | ||
| 81 | } | ||
| 82 | /* | ||
| 83 | * vring->va should be aligned on its size rounded up to power of 2 | ||
| 84 | * This is granted by the dma_alloc_coherent | ||
| 85 | */ | ||
| 86 | vring->va = dma_alloc_coherent(dev, sz, &vring->pa, GFP_KERNEL); | ||
| 87 | if (!vring->va) { | ||
| 88 | wil_err(wil, "vring_alloc [%d] failed to alloc DMA mem\n", | ||
| 89 | vring->size); | ||
| 90 | kfree(vring->ctx); | ||
| 91 | vring->ctx = NULL; | ||
| 92 | return -ENOMEM; | ||
| 93 | } | ||
| 94 | /* initially, all descriptors are SW owned | ||
| 95 | * For Tx and Rx, ownership bit is at the same location, thus | ||
| 96 | * we can use any | ||
| 97 | */ | ||
| 98 | for (i = 0; i < vring->size; i++) { | ||
| 99 | volatile struct vring_tx_desc *d = &(vring->va[i].tx); | ||
| 100 | d->dma.status = TX_DMA_STATUS_DU; | ||
| 101 | } | ||
| 102 | |||
| 103 | wil_dbg(wil, "vring[%d] 0x%p:0x%016llx 0x%p\n", vring->size, | ||
| 104 | vring->va, (unsigned long long)vring->pa, vring->ctx); | ||
| 105 | |||
| 106 | return 0; | ||
| 107 | } | ||
| 108 | |||
| 109 | static void wil_vring_free(struct wil6210_priv *wil, struct vring *vring, | ||
| 110 | int tx) | ||
| 111 | { | ||
| 112 | struct device *dev = wil_to_dev(wil); | ||
| 113 | size_t sz = vring->size * sizeof(vring->va[0]); | ||
| 114 | |||
| 115 | while (!wil_vring_is_empty(vring)) { | ||
| 116 | if (tx) { | ||
| 117 | volatile struct vring_tx_desc *d = | ||
| 118 | &vring->va[vring->swtail].tx; | ||
| 119 | dma_addr_t pa = d->dma.addr_low | | ||
| 120 | ((u64)d->dma.addr_high << 32); | ||
| 121 | struct sk_buff *skb = vring->ctx[vring->swtail]; | ||
| 122 | if (skb) { | ||
| 123 | dma_unmap_single(dev, pa, d->dma.length, | ||
| 124 | DMA_TO_DEVICE); | ||
| 125 | dev_kfree_skb_any(skb); | ||
| 126 | vring->ctx[vring->swtail] = NULL; | ||
| 127 | } else { | ||
| 128 | dma_unmap_page(dev, pa, d->dma.length, | ||
| 129 | DMA_TO_DEVICE); | ||
| 130 | } | ||
| 131 | vring->swtail = wil_vring_next_tail(vring); | ||
| 132 | } else { /* rx */ | ||
| 133 | volatile struct vring_rx_desc *d = | ||
| 134 | &vring->va[vring->swtail].rx; | ||
| 135 | dma_addr_t pa = d->dma.addr_low | | ||
| 136 | ((u64)d->dma.addr_high << 32); | ||
| 137 | struct sk_buff *skb = vring->ctx[vring->swhead]; | ||
| 138 | dma_unmap_single(dev, pa, d->dma.length, | ||
| 139 | DMA_FROM_DEVICE); | ||
| 140 | kfree_skb(skb); | ||
| 141 | wil_vring_advance_head(vring, 1); | ||
| 142 | } | ||
| 143 | } | ||
| 144 | dma_free_coherent(dev, sz, (void *)vring->va, vring->pa); | ||
| 145 | kfree(vring->ctx); | ||
| 146 | vring->pa = 0; | ||
| 147 | vring->va = NULL; | ||
| 148 | vring->ctx = NULL; | ||
| 149 | } | ||
| 150 | |||
| 151 | /** | ||
| 152 | * Allocate one skb for Rx VRING | ||
| 153 | * | ||
| 154 | * Safe to call from IRQ | ||
| 155 | */ | ||
| 156 | static int wil_vring_alloc_skb(struct wil6210_priv *wil, struct vring *vring, | ||
| 157 | u32 i, int headroom) | ||
| 158 | { | ||
| 159 | struct device *dev = wil_to_dev(wil); | ||
| 160 | unsigned int sz = RX_BUF_LEN; | ||
| 161 | volatile struct vring_rx_desc *d = &(vring->va[i].rx); | ||
| 162 | dma_addr_t pa; | ||
| 163 | |||
| 164 | /* TODO align */ | ||
| 165 | struct sk_buff *skb = dev_alloc_skb(sz + headroom); | ||
| 166 | if (unlikely(!skb)) | ||
| 167 | return -ENOMEM; | ||
| 168 | |||
| 169 | skb_reserve(skb, headroom); | ||
| 170 | skb_put(skb, sz); | ||
| 171 | |||
| 172 | pa = dma_map_single(dev, skb->data, skb->len, DMA_FROM_DEVICE); | ||
| 173 | if (unlikely(dma_mapping_error(dev, pa))) { | ||
| 174 | kfree_skb(skb); | ||
| 175 | return -ENOMEM; | ||
| 176 | } | ||
| 177 | |||
| 178 | d->dma.d0 = BIT(9) | RX_DMA_D0_CMD_DMA_IT; | ||
| 179 | d->dma.addr_low = lower_32_bits(pa); | ||
| 180 | d->dma.addr_high = (u16)upper_32_bits(pa); | ||
| 181 | /* ip_length don't care */ | ||
| 182 | /* b11 don't care */ | ||
| 183 | /* error don't care */ | ||
| 184 | d->dma.status = 0; /* BIT(0) should be 0 for HW_OWNED */ | ||
| 185 | d->dma.length = sz; | ||
| 186 | vring->ctx[i] = skb; | ||
| 187 | |||
| 188 | return 0; | ||
| 189 | } | ||
| 190 | |||
| 191 | /** | ||
| 192 | * Adds radiotap header | ||
| 193 | * | ||
| 194 | * Any error indicated as "Bad FCS" | ||
| 195 | * | ||
| 196 | * Vendor data for 04:ce:14-1 (Wilocity-1) consists of: | ||
| 197 | * - Rx descriptor: 32 bytes | ||
| 198 | * - Phy info | ||
| 199 | */ | ||
| 200 | static void wil_rx_add_radiotap_header(struct wil6210_priv *wil, | ||
| 201 | struct sk_buff *skb, | ||
| 202 | volatile struct vring_rx_desc *d) | ||
| 203 | { | ||
| 204 | struct wireless_dev *wdev = wil->wdev; | ||
| 205 | struct wil6210_rtap { | ||
| 206 | struct ieee80211_radiotap_header rthdr; | ||
| 207 | /* fields should be in the order of bits in rthdr.it_present */ | ||
| 208 | /* flags */ | ||
| 209 | u8 flags; | ||
| 210 | /* channel */ | ||
| 211 | __le16 chnl_freq __aligned(2); | ||
| 212 | __le16 chnl_flags; | ||
| 213 | /* MCS */ | ||
| 214 | u8 mcs_present; | ||
| 215 | u8 mcs_flags; | ||
| 216 | u8 mcs_index; | ||
| 217 | } __packed; | ||
| 218 | struct wil6210_rtap_vendor { | ||
| 219 | struct wil6210_rtap rtap; | ||
| 220 | /* vendor */ | ||
| 221 | u8 vendor_oui[3] __aligned(2); | ||
| 222 | u8 vendor_ns; | ||
| 223 | __le16 vendor_skip; | ||
| 224 | u8 vendor_data[0]; | ||
| 225 | } __packed; | ||
| 226 | struct wil6210_rtap_vendor *rtap_vendor; | ||
| 227 | int rtap_len = sizeof(struct wil6210_rtap); | ||
| 228 | int phy_length = 0; /* phy info header size, bytes */ | ||
| 229 | static char phy_data[128]; | ||
| 230 | struct ieee80211_channel *ch = wdev->preset_chandef.chan; | ||
| 231 | |||
| 232 | if (rtap_include_phy_info) { | ||
| 233 | rtap_len = sizeof(*rtap_vendor) + sizeof(*d); | ||
| 234 | /* calculate additional length */ | ||
| 235 | if (d->dma.status & RX_DMA_STATUS_PHY_INFO) { | ||
| 236 | /** | ||
| 237 | * PHY info starts from 8-byte boundary | ||
| 238 | * there are 8-byte lines, last line may be partially | ||
| 239 | * written (HW bug), thus FW configures for last line | ||
| 240 | * to be excessive. Driver skips this last line. | ||
| 241 | */ | ||
| 242 | int len = min_t(int, 8 + sizeof(phy_data), | ||
| 243 | wil_rxdesc_phy_length(d)); | ||
| 244 | if (len > 8) { | ||
| 245 | void *p = skb_tail_pointer(skb); | ||
| 246 | void *pa = PTR_ALIGN(p, 8); | ||
| 247 | if (skb_tailroom(skb) >= len + (pa - p)) { | ||
| 248 | phy_length = len - 8; | ||
| 249 | memcpy(phy_data, pa, phy_length); | ||
| 250 | } | ||
| 251 | } | ||
| 252 | } | ||
| 253 | rtap_len += phy_length; | ||
| 254 | } | ||
| 255 | |||
| 256 | if (skb_headroom(skb) < rtap_len && | ||
| 257 | pskb_expand_head(skb, rtap_len, 0, GFP_ATOMIC)) { | ||
| 258 | wil_err(wil, "Unable to expand headrom to %d\n", rtap_len); | ||
| 259 | return; | ||
| 260 | } | ||
| 261 | |||
| 262 | rtap_vendor = (void *)skb_push(skb, rtap_len); | ||
| 263 | memset(rtap_vendor, 0, rtap_len); | ||
| 264 | |||
| 265 | rtap_vendor->rtap.rthdr.it_version = PKTHDR_RADIOTAP_VERSION; | ||
| 266 | rtap_vendor->rtap.rthdr.it_len = cpu_to_le16(rtap_len); | ||
| 267 | rtap_vendor->rtap.rthdr.it_present = cpu_to_le32( | ||
| 268 | (1 << IEEE80211_RADIOTAP_FLAGS) | | ||
| 269 | (1 << IEEE80211_RADIOTAP_CHANNEL) | | ||
| 270 | (1 << IEEE80211_RADIOTAP_MCS)); | ||
| 271 | if (d->dma.status & RX_DMA_STATUS_ERROR) | ||
| 272 | rtap_vendor->rtap.flags |= IEEE80211_RADIOTAP_F_BADFCS; | ||
| 273 | |||
| 274 | rtap_vendor->rtap.chnl_freq = cpu_to_le16(ch ? ch->center_freq : 58320); | ||
| 275 | rtap_vendor->rtap.chnl_flags = cpu_to_le16(0); | ||
| 276 | |||
| 277 | rtap_vendor->rtap.mcs_present = IEEE80211_RADIOTAP_MCS_HAVE_MCS; | ||
| 278 | rtap_vendor->rtap.mcs_flags = 0; | ||
| 279 | rtap_vendor->rtap.mcs_index = wil_rxdesc_mcs(d); | ||
| 280 | |||
| 281 | if (rtap_include_phy_info) { | ||
| 282 | rtap_vendor->rtap.rthdr.it_present |= cpu_to_le32(1 << | ||
| 283 | IEEE80211_RADIOTAP_VENDOR_NAMESPACE); | ||
| 284 | /* OUI for Wilocity 04:ce:14 */ | ||
| 285 | rtap_vendor->vendor_oui[0] = 0x04; | ||
| 286 | rtap_vendor->vendor_oui[1] = 0xce; | ||
| 287 | rtap_vendor->vendor_oui[2] = 0x14; | ||
| 288 | rtap_vendor->vendor_ns = 1; | ||
| 289 | /* Rx descriptor + PHY data */ | ||
| 290 | rtap_vendor->vendor_skip = cpu_to_le16(sizeof(*d) + | ||
| 291 | phy_length); | ||
| 292 | memcpy(rtap_vendor->vendor_data, (void *)d, sizeof(*d)); | ||
| 293 | memcpy(rtap_vendor->vendor_data + sizeof(*d), phy_data, | ||
| 294 | phy_length); | ||
| 295 | } | ||
| 296 | } | ||
| 297 | |||
| 298 | /* | ||
| 299 | * Fast swap in place between 2 registers | ||
| 300 | */ | ||
| 301 | static void wil_swap_u16(u16 *a, u16 *b) | ||
| 302 | { | ||
| 303 | *a ^= *b; | ||
| 304 | *b ^= *a; | ||
| 305 | *a ^= *b; | ||
| 306 | } | ||
| 307 | |||
| 308 | static void wil_swap_ethaddr(void *data) | ||
| 309 | { | ||
| 310 | struct ethhdr *eth = data; | ||
| 311 | u16 *s = (u16 *)eth->h_source; | ||
| 312 | u16 *d = (u16 *)eth->h_dest; | ||
| 313 | |||
| 314 | wil_swap_u16(s++, d++); | ||
| 315 | wil_swap_u16(s++, d++); | ||
| 316 | wil_swap_u16(s, d); | ||
| 317 | } | ||
| 318 | |||
| 319 | /** | ||
| 320 | * reap 1 frame from @swhead | ||
| 321 | * | ||
| 322 | * Safe to call from IRQ | ||
| 323 | */ | ||
| 324 | static struct sk_buff *wil_vring_reap_rx(struct wil6210_priv *wil, | ||
| 325 | struct vring *vring) | ||
| 326 | { | ||
| 327 | struct device *dev = wil_to_dev(wil); | ||
| 328 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 329 | volatile struct vring_rx_desc *d; | ||
| 330 | struct sk_buff *skb; | ||
| 331 | dma_addr_t pa; | ||
| 332 | unsigned int sz = RX_BUF_LEN; | ||
| 333 | u8 ftype; | ||
| 334 | u8 ds_bits; | ||
| 335 | |||
| 336 | if (wil_vring_is_empty(vring)) | ||
| 337 | return NULL; | ||
| 338 | |||
| 339 | d = &(vring->va[vring->swhead].rx); | ||
| 340 | if (!(d->dma.status & RX_DMA_STATUS_DU)) { | ||
| 341 | /* it is not error, we just reached end of Rx done area */ | ||
| 342 | return NULL; | ||
| 343 | } | ||
| 344 | |||
| 345 | pa = d->dma.addr_low | ((u64)d->dma.addr_high << 32); | ||
| 346 | skb = vring->ctx[vring->swhead]; | ||
| 347 | dma_unmap_single(dev, pa, sz, DMA_FROM_DEVICE); | ||
| 348 | skb_trim(skb, d->dma.length); | ||
| 349 | |||
| 350 | wil->stats.last_mcs_rx = wil_rxdesc_mcs(d); | ||
| 351 | |||
| 352 | /* use radiotap header only if required */ | ||
| 353 | if (ndev->type == ARPHRD_IEEE80211_RADIOTAP) | ||
| 354 | wil_rx_add_radiotap_header(wil, skb, d); | ||
| 355 | |||
| 356 | wil_dbg_TXRX(wil, "Rx[%3d] : %d bytes\n", vring->swhead, d->dma.length); | ||
| 357 | wil_hex_dump_TXRX("Rx ", DUMP_PREFIX_NONE, 32, 4, | ||
| 358 | (const void *)d, sizeof(*d), false); | ||
| 359 | |||
| 360 | wil_vring_advance_head(vring, 1); | ||
| 361 | |||
| 362 | /* no extra checks if in sniffer mode */ | ||
| 363 | if (ndev->type != ARPHRD_ETHER) | ||
| 364 | return skb; | ||
| 365 | /* | ||
| 366 | * Non-data frames may be delivered through Rx DMA channel (ex: BAR) | ||
| 367 | * Driver should recognize it by frame type, that is found | ||
| 368 | * in Rx descriptor. If type is not data, it is 802.11 frame as is | ||
| 369 | */ | ||
| 370 | ftype = wil_rxdesc_ftype(d) << 2; | ||
| 371 | if (ftype != IEEE80211_FTYPE_DATA) { | ||
| 372 | wil_dbg_TXRX(wil, "Non-data frame ftype 0x%08x\n", ftype); | ||
| 373 | /* TODO: process it */ | ||
| 374 | kfree_skb(skb); | ||
| 375 | return NULL; | ||
| 376 | } | ||
| 377 | |||
| 378 | if (skb->len < ETH_HLEN) { | ||
| 379 | wil_err(wil, "Short frame, len = %d\n", skb->len); | ||
| 380 | /* TODO: process it (i.e. BAR) */ | ||
| 381 | kfree_skb(skb); | ||
| 382 | return NULL; | ||
| 383 | } | ||
| 384 | |||
| 385 | ds_bits = wil_rxdesc_ds_bits(d); | ||
| 386 | if (ds_bits == 1) { | ||
| 387 | /* | ||
| 388 | * HW bug - in ToDS mode, i.e. Rx on AP side, | ||
| 389 | * addresses get swapped | ||
| 390 | */ | ||
| 391 | wil_swap_ethaddr(skb->data); | ||
| 392 | } | ||
| 393 | |||
| 394 | return skb; | ||
| 395 | } | ||
| 396 | |||
| 397 | /** | ||
| 398 | * allocate and fill up to @count buffers in rx ring | ||
| 399 | * buffers posted at @swtail | ||
| 400 | */ | ||
| 401 | static int wil_rx_refill(struct wil6210_priv *wil, int count) | ||
| 402 | { | ||
| 403 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 404 | struct vring *v = &wil->vring_rx; | ||
| 405 | u32 next_tail; | ||
| 406 | int rc = 0; | ||
| 407 | int headroom = ndev->type == ARPHRD_IEEE80211_RADIOTAP ? | ||
| 408 | WIL6210_RTAP_SIZE : 0; | ||
| 409 | |||
| 410 | for (; next_tail = wil_vring_next_tail(v), | ||
| 411 | (next_tail != v->swhead) && (count-- > 0); | ||
| 412 | v->swtail = next_tail) { | ||
| 413 | rc = wil_vring_alloc_skb(wil, v, v->swtail, headroom); | ||
| 414 | if (rc) { | ||
| 415 | wil_err(wil, "Error %d in wil_rx_refill[%d]\n", | ||
| 416 | rc, v->swtail); | ||
| 417 | break; | ||
| 418 | } | ||
| 419 | } | ||
| 420 | iowrite32(v->swtail, wil->csr + HOSTADDR(v->hwtail)); | ||
| 421 | |||
| 422 | return rc; | ||
| 423 | } | ||
| 424 | |||
| 425 | /* | ||
| 426 | * Pass Rx packet to the netif. Update statistics. | ||
| 427 | */ | ||
| 428 | static void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev) | ||
| 429 | { | ||
| 430 | int rc; | ||
| 431 | unsigned int len = skb->len; | ||
| 432 | |||
| 433 | if (in_interrupt()) | ||
| 434 | rc = netif_rx(skb); | ||
| 435 | else | ||
| 436 | rc = netif_rx_ni(skb); | ||
| 437 | |||
| 438 | if (likely(rc == NET_RX_SUCCESS)) { | ||
| 439 | ndev->stats.rx_packets++; | ||
| 440 | ndev->stats.rx_bytes += len; | ||
| 441 | |||
| 442 | } else { | ||
| 443 | ndev->stats.rx_dropped++; | ||
| 444 | } | ||
| 445 | } | ||
| 446 | |||
| 447 | /** | ||
| 448 | * Proceed all completed skb's from Rx VRING | ||
| 449 | * | ||
| 450 | * Safe to call from IRQ | ||
| 451 | */ | ||
| 452 | void wil_rx_handle(struct wil6210_priv *wil) | ||
| 453 | { | ||
| 454 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 455 | struct vring *v = &wil->vring_rx; | ||
| 456 | struct sk_buff *skb; | ||
| 457 | |||
| 458 | if (!v->va) { | ||
| 459 | wil_err(wil, "Rx IRQ while Rx not yet initialized\n"); | ||
| 460 | return; | ||
| 461 | } | ||
| 462 | wil_dbg_TXRX(wil, "%s()\n", __func__); | ||
| 463 | while (NULL != (skb = wil_vring_reap_rx(wil, v))) { | ||
| 464 | wil_hex_dump_TXRX("Rx ", DUMP_PREFIX_OFFSET, 16, 1, | ||
| 465 | skb->data, skb_headlen(skb), false); | ||
| 466 | |||
| 467 | skb_orphan(skb); | ||
| 468 | |||
| 469 | if (wil->wdev->iftype == NL80211_IFTYPE_MONITOR) { | ||
| 470 | skb->dev = ndev; | ||
| 471 | skb_reset_mac_header(skb); | ||
| 472 | skb->ip_summed = CHECKSUM_UNNECESSARY; | ||
| 473 | skb->pkt_type = PACKET_OTHERHOST; | ||
| 474 | skb->protocol = htons(ETH_P_802_2); | ||
| 475 | |||
| 476 | } else { | ||
| 477 | skb->protocol = eth_type_trans(skb, ndev); | ||
| 478 | } | ||
| 479 | |||
| 480 | wil_netif_rx_any(skb, ndev); | ||
| 481 | } | ||
| 482 | wil_rx_refill(wil, v->size); | ||
| 483 | } | ||
| 484 | |||
| 485 | int wil_rx_init(struct wil6210_priv *wil) | ||
| 486 | { | ||
| 487 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 488 | struct wireless_dev *wdev = wil->wdev; | ||
| 489 | struct vring *vring = &wil->vring_rx; | ||
| 490 | int rc; | ||
| 491 | struct wmi_cfg_rx_chain_cmd cmd = { | ||
| 492 | .action = WMI_RX_CHAIN_ADD, | ||
| 493 | .rx_sw_ring = { | ||
| 494 | .max_mpdu_size = cpu_to_le16(RX_BUF_LEN), | ||
| 495 | }, | ||
| 496 | .mid = 0, /* TODO - what is it? */ | ||
| 497 | .decap_trans_type = WMI_DECAP_TYPE_802_3, | ||
| 498 | }; | ||
| 499 | struct { | ||
| 500 | struct wil6210_mbox_hdr_wmi wmi; | ||
| 501 | struct wmi_cfg_rx_chain_done_event evt; | ||
| 502 | } __packed evt; | ||
| 503 | |||
| 504 | vring->size = WIL6210_RX_RING_SIZE; | ||
| 505 | rc = wil_vring_alloc(wil, vring); | ||
| 506 | if (rc) | ||
| 507 | return rc; | ||
| 508 | |||
| 509 | cmd.rx_sw_ring.ring_mem_base = cpu_to_le64(vring->pa); | ||
| 510 | cmd.rx_sw_ring.ring_size = cpu_to_le16(vring->size); | ||
| 511 | if (wdev->iftype == NL80211_IFTYPE_MONITOR) { | ||
| 512 | struct ieee80211_channel *ch = wdev->preset_chandef.chan; | ||
| 513 | |||
| 514 | cmd.sniffer_cfg.mode = cpu_to_le32(WMI_SNIFFER_ON); | ||
| 515 | if (ch) | ||
| 516 | cmd.sniffer_cfg.channel = ch->hw_value - 1; | ||
| 517 | cmd.sniffer_cfg.phy_info_mode = | ||
| 518 | cpu_to_le32(ndev->type == ARPHRD_IEEE80211_RADIOTAP); | ||
| 519 | cmd.sniffer_cfg.phy_support = | ||
| 520 | cpu_to_le32((wil->monitor_flags & MONITOR_FLAG_CONTROL) | ||
| 521 | ? WMI_SNIFFER_CP : WMI_SNIFFER_DP); | ||
| 522 | } | ||
| 523 | /* typical time for secure PCP is 840ms */ | ||
| 524 | rc = wmi_call(wil, WMI_CFG_RX_CHAIN_CMDID, &cmd, sizeof(cmd), | ||
| 525 | WMI_CFG_RX_CHAIN_DONE_EVENTID, &evt, sizeof(evt), 2000); | ||
| 526 | if (rc) | ||
| 527 | goto err_free; | ||
| 528 | |||
| 529 | vring->hwtail = le32_to_cpu(evt.evt.rx_ring_tail_ptr); | ||
| 530 | |||
| 531 | wil_dbg(wil, "Rx init: status %d tail 0x%08x\n", | ||
| 532 | le32_to_cpu(evt.evt.status), vring->hwtail); | ||
| 533 | |||
| 534 | rc = wil_rx_refill(wil, vring->size); | ||
| 535 | if (rc) | ||
| 536 | goto err_free; | ||
| 537 | |||
| 538 | return 0; | ||
| 539 | err_free: | ||
| 540 | wil_vring_free(wil, vring, 0); | ||
| 541 | |||
| 542 | return rc; | ||
| 543 | } | ||
| 544 | |||
| 545 | void wil_rx_fini(struct wil6210_priv *wil) | ||
| 546 | { | ||
| 547 | struct vring *vring = &wil->vring_rx; | ||
| 548 | |||
| 549 | if (vring->va) { | ||
| 550 | int rc; | ||
| 551 | struct wmi_cfg_rx_chain_cmd cmd = { | ||
| 552 | .action = cpu_to_le32(WMI_RX_CHAIN_DEL), | ||
| 553 | .rx_sw_ring = { | ||
| 554 | .max_mpdu_size = cpu_to_le16(RX_BUF_LEN), | ||
| 555 | }, | ||
| 556 | }; | ||
| 557 | struct { | ||
| 558 | struct wil6210_mbox_hdr_wmi wmi; | ||
| 559 | struct wmi_cfg_rx_chain_done_event cfg; | ||
| 560 | } __packed wmi_rx_cfg_reply; | ||
| 561 | |||
| 562 | rc = wmi_call(wil, WMI_CFG_RX_CHAIN_CMDID, &cmd, sizeof(cmd), | ||
| 563 | WMI_CFG_RX_CHAIN_DONE_EVENTID, | ||
| 564 | &wmi_rx_cfg_reply, sizeof(wmi_rx_cfg_reply), | ||
| 565 | 100); | ||
| 566 | wil_vring_free(wil, vring, 0); | ||
| 567 | } | ||
| 568 | } | ||
| 569 | |||
| 570 | int wil_vring_init_tx(struct wil6210_priv *wil, int id, int size, | ||
| 571 | int cid, int tid) | ||
| 572 | { | ||
| 573 | int rc; | ||
| 574 | struct wmi_vring_cfg_cmd cmd = { | ||
| 575 | .action = cpu_to_le32(WMI_VRING_CMD_ADD), | ||
| 576 | .vring_cfg = { | ||
| 577 | .tx_sw_ring = { | ||
| 578 | .max_mpdu_size = cpu_to_le16(TX_BUF_LEN), | ||
| 579 | }, | ||
| 580 | .ringid = id, | ||
| 581 | .cidxtid = (cid & 0xf) | ((tid & 0xf) << 4), | ||
| 582 | .encap_trans_type = WMI_VRING_ENC_TYPE_802_3, | ||
| 583 | .mac_ctrl = 0, | ||
| 584 | .to_resolution = 0, | ||
| 585 | .agg_max_wsize = 16, | ||
| 586 | .schd_params = { | ||
| 587 | .priority = cpu_to_le16(0), | ||
| 588 | .timeslot_us = cpu_to_le16(0xfff), | ||
| 589 | }, | ||
| 590 | }, | ||
| 591 | }; | ||
| 592 | struct { | ||
| 593 | struct wil6210_mbox_hdr_wmi wmi; | ||
| 594 | struct wmi_vring_cfg_done_event cmd; | ||
| 595 | } __packed reply; | ||
| 596 | struct vring *vring = &wil->vring_tx[id]; | ||
| 597 | |||
| 598 | if (vring->va) { | ||
| 599 | wil_err(wil, "Tx ring [%d] already allocated\n", id); | ||
| 600 | rc = -EINVAL; | ||
| 601 | goto out; | ||
| 602 | } | ||
| 603 | |||
| 604 | vring->size = size; | ||
| 605 | rc = wil_vring_alloc(wil, vring); | ||
| 606 | if (rc) | ||
| 607 | goto out; | ||
| 608 | |||
| 609 | cmd.vring_cfg.tx_sw_ring.ring_mem_base = cpu_to_le64(vring->pa); | ||
| 610 | cmd.vring_cfg.tx_sw_ring.ring_size = cpu_to_le16(vring->size); | ||
| 611 | |||
| 612 | rc = wmi_call(wil, WMI_VRING_CFG_CMDID, &cmd, sizeof(cmd), | ||
| 613 | WMI_VRING_CFG_DONE_EVENTID, &reply, sizeof(reply), 100); | ||
| 614 | if (rc) | ||
| 615 | goto out_free; | ||
| 616 | |||
| 617 | if (reply.cmd.status != WMI_VRING_CFG_SUCCESS) { | ||
| 618 | wil_err(wil, "Tx config failed, status 0x%02x\n", | ||
| 619 | reply.cmd.status); | ||
| 620 | goto out_free; | ||
| 621 | } | ||
| 622 | vring->hwtail = le32_to_cpu(reply.cmd.tx_vring_tail_ptr); | ||
| 623 | |||
| 624 | return 0; | ||
| 625 | out_free: | ||
| 626 | wil_vring_free(wil, vring, 1); | ||
| 627 | out: | ||
| 628 | |||
| 629 | return rc; | ||
| 630 | } | ||
| 631 | |||
| 632 | void wil_vring_fini_tx(struct wil6210_priv *wil, int id) | ||
| 633 | { | ||
| 634 | struct vring *vring = &wil->vring_tx[id]; | ||
| 635 | |||
| 636 | if (!vring->va) | ||
| 637 | return; | ||
| 638 | |||
| 639 | wil_vring_free(wil, vring, 1); | ||
| 640 | } | ||
| 641 | |||
| 642 | static struct vring *wil_find_tx_vring(struct wil6210_priv *wil, | ||
| 643 | struct sk_buff *skb) | ||
| 644 | { | ||
| 645 | struct vring *v = &wil->vring_tx[0]; | ||
| 646 | |||
| 647 | if (v->va) | ||
| 648 | return v; | ||
| 649 | |||
| 650 | return NULL; | ||
| 651 | } | ||
| 652 | |||
| 653 | static int wil_tx_desc_map(volatile struct vring_tx_desc *d, | ||
| 654 | dma_addr_t pa, u32 len) | ||
| 655 | { | ||
| 656 | d->dma.addr_low = lower_32_bits(pa); | ||
| 657 | d->dma.addr_high = (u16)upper_32_bits(pa); | ||
| 658 | d->dma.ip_length = 0; | ||
| 659 | /* 0..6: mac_length; 7:ip_version 0-IP6 1-IP4*/ | ||
| 660 | d->dma.b11 = 0/*14 | BIT(7)*/; | ||
| 661 | d->dma.error = 0; | ||
| 662 | d->dma.status = 0; /* BIT(0) should be 0 for HW_OWNED */ | ||
| 663 | d->dma.length = len; | ||
| 664 | d->dma.d0 = 0; | ||
| 665 | d->mac.d[0] = 0; | ||
| 666 | d->mac.d[1] = 0; | ||
| 667 | d->mac.d[2] = 0; | ||
| 668 | d->mac.ucode_cmd = 0; | ||
| 669 | /* use dst index 0 */ | ||
| 670 | d->mac.d[1] |= BIT(MAC_CFG_DESC_TX_1_DST_INDEX_EN_POS) | | ||
| 671 | (0 << MAC_CFG_DESC_TX_1_DST_INDEX_POS); | ||
| 672 | /* translation type: 0 - bypass; 1 - 802.3; 2 - native wifi */ | ||
| 673 | d->mac.d[2] = BIT(MAC_CFG_DESC_TX_2_SNAP_HDR_INSERTION_EN_POS) | | ||
| 674 | (1 << MAC_CFG_DESC_TX_2_L2_TRANSLATION_TYPE_POS); | ||
| 675 | |||
| 676 | return 0; | ||
| 677 | } | ||
| 678 | |||
| 679 | static int wil_tx_vring(struct wil6210_priv *wil, struct vring *vring, | ||
| 680 | struct sk_buff *skb) | ||
| 681 | { | ||
| 682 | struct device *dev = wil_to_dev(wil); | ||
| 683 | volatile struct vring_tx_desc *d; | ||
| 684 | u32 swhead = vring->swhead; | ||
| 685 | int avail = wil_vring_avail_tx(vring); | ||
| 686 | int nr_frags = skb_shinfo(skb)->nr_frags; | ||
| 687 | uint f; | ||
| 688 | int vring_index = vring - wil->vring_tx; | ||
| 689 | uint i = swhead; | ||
| 690 | dma_addr_t pa; | ||
| 691 | |||
| 692 | wil_dbg_TXRX(wil, "%s()\n", __func__); | ||
| 693 | |||
| 694 | if (avail < vring->size/8) | ||
| 695 | netif_tx_stop_all_queues(wil_to_ndev(wil)); | ||
| 696 | if (avail < 1 + nr_frags) { | ||
| 697 | wil_err(wil, "Tx ring full. No space for %d fragments\n", | ||
| 698 | 1 + nr_frags); | ||
| 699 | return -ENOMEM; | ||
| 700 | } | ||
| 701 | d = &(vring->va[i].tx); | ||
| 702 | |||
| 703 | /* FIXME FW can accept only unicast frames for the peer */ | ||
| 704 | memcpy(skb->data, wil->dst_addr[vring_index], ETH_ALEN); | ||
| 705 | |||
| 706 | pa = dma_map_single(dev, skb->data, | ||
| 707 | skb_headlen(skb), DMA_TO_DEVICE); | ||
| 708 | |||
| 709 | wil_dbg_TXRX(wil, "Tx skb %d bytes %p -> %#08llx\n", skb_headlen(skb), | ||
| 710 | skb->data, (unsigned long long)pa); | ||
| 711 | wil_hex_dump_TXRX("Tx ", DUMP_PREFIX_OFFSET, 16, 1, | ||
| 712 | skb->data, skb_headlen(skb), false); | ||
| 713 | |||
| 714 | if (unlikely(dma_mapping_error(dev, pa))) | ||
| 715 | return -EINVAL; | ||
| 716 | /* 1-st segment */ | ||
| 717 | wil_tx_desc_map(d, pa, skb_headlen(skb)); | ||
| 718 | d->mac.d[2] |= ((nr_frags + 1) << | ||
| 719 | MAC_CFG_DESC_TX_2_NUM_OF_DESCRIPTORS_POS); | ||
| 720 | /* middle segments */ | ||
| 721 | for (f = 0; f < nr_frags; f++) { | ||
| 722 | const struct skb_frag_struct *frag = | ||
| 723 | &skb_shinfo(skb)->frags[f]; | ||
| 724 | int len = skb_frag_size(frag); | ||
| 725 | i = (swhead + f + 1) % vring->size; | ||
| 726 | d = &(vring->va[i].tx); | ||
| 727 | pa = skb_frag_dma_map(dev, frag, 0, skb_frag_size(frag), | ||
| 728 | DMA_TO_DEVICE); | ||
| 729 | if (unlikely(dma_mapping_error(dev, pa))) | ||
| 730 | goto dma_error; | ||
| 731 | wil_tx_desc_map(d, pa, len); | ||
| 732 | vring->ctx[i] = NULL; | ||
| 733 | } | ||
| 734 | /* for the last seg only */ | ||
| 735 | d->dma.d0 |= BIT(DMA_CFG_DESC_TX_0_CMD_EOP_POS); | ||
| 736 | d->dma.d0 |= BIT(9); /* BUG: undocumented bit */ | ||
| 737 | d->dma.d0 |= BIT(DMA_CFG_DESC_TX_0_CMD_DMA_IT_POS); | ||
| 738 | d->dma.d0 |= (vring_index << DMA_CFG_DESC_TX_0_QID_POS); | ||
| 739 | |||
| 740 | wil_hex_dump_TXRX("Tx ", DUMP_PREFIX_NONE, 32, 4, | ||
| 741 | (const void *)d, sizeof(*d), false); | ||
| 742 | |||
| 743 | /* advance swhead */ | ||
| 744 | wil_vring_advance_head(vring, nr_frags + 1); | ||
| 745 | wil_dbg_TXRX(wil, "Tx swhead %d -> %d\n", swhead, vring->swhead); | ||
| 746 | iowrite32(vring->swhead, wil->csr + HOSTADDR(vring->hwtail)); | ||
| 747 | /* hold reference to skb | ||
| 748 | * to prevent skb release before accounting | ||
| 749 | * in case of immediate "tx done" | ||
| 750 | */ | ||
| 751 | vring->ctx[i] = skb_get(skb); | ||
| 752 | |||
| 753 | return 0; | ||
| 754 | dma_error: | ||
| 755 | /* unmap what we have mapped */ | ||
| 756 | /* Note: increment @f to operate with positive index */ | ||
| 757 | for (f++; f > 0; f--) { | ||
| 758 | i = (swhead + f) % vring->size; | ||
| 759 | d = &(vring->va[i].tx); | ||
| 760 | d->dma.status = TX_DMA_STATUS_DU; | ||
| 761 | pa = d->dma.addr_low | ((u64)d->dma.addr_high << 32); | ||
| 762 | if (vring->ctx[i]) | ||
| 763 | dma_unmap_single(dev, pa, d->dma.length, DMA_TO_DEVICE); | ||
| 764 | else | ||
| 765 | dma_unmap_page(dev, pa, d->dma.length, DMA_TO_DEVICE); | ||
| 766 | } | ||
| 767 | |||
| 768 | return -EINVAL; | ||
| 769 | } | ||
| 770 | |||
| 771 | |||
| 772 | netdev_tx_t wil_start_xmit(struct sk_buff *skb, struct net_device *ndev) | ||
| 773 | { | ||
| 774 | struct wil6210_priv *wil = ndev_to_wil(ndev); | ||
| 775 | struct vring *vring; | ||
| 776 | int rc; | ||
| 777 | |||
| 778 | wil_dbg_TXRX(wil, "%s()\n", __func__); | ||
| 779 | if (!test_bit(wil_status_fwready, &wil->status)) { | ||
| 780 | wil_err(wil, "FW not ready\n"); | ||
| 781 | goto drop; | ||
| 782 | } | ||
| 783 | if (!test_bit(wil_status_fwconnected, &wil->status)) { | ||
| 784 | wil_err(wil, "FW not connected\n"); | ||
| 785 | goto drop; | ||
| 786 | } | ||
| 787 | if (wil->wdev->iftype == NL80211_IFTYPE_MONITOR) { | ||
| 788 | wil_err(wil, "Xmit in monitor mode not supported\n"); | ||
| 789 | goto drop; | ||
| 790 | } | ||
| 791 | if (skb->protocol == cpu_to_be16(ETH_P_PAE)) { | ||
| 792 | rc = wmi_tx_eapol(wil, skb); | ||
| 793 | } else { | ||
| 794 | /* find vring */ | ||
| 795 | vring = wil_find_tx_vring(wil, skb); | ||
| 796 | if (!vring) { | ||
| 797 | wil_err(wil, "No Tx VRING available\n"); | ||
| 798 | goto drop; | ||
| 799 | } | ||
| 800 | /* set up vring entry */ | ||
| 801 | rc = wil_tx_vring(wil, vring, skb); | ||
| 802 | } | ||
| 803 | switch (rc) { | ||
| 804 | case 0: | ||
| 805 | ndev->stats.tx_packets++; | ||
| 806 | ndev->stats.tx_bytes += skb->len; | ||
| 807 | dev_kfree_skb_any(skb); | ||
| 808 | return NETDEV_TX_OK; | ||
| 809 | case -ENOMEM: | ||
| 810 | return NETDEV_TX_BUSY; | ||
| 811 | default: | ||
| 812 | ; /* goto drop; */ | ||
| 813 | break; | ||
| 814 | } | ||
| 815 | drop: | ||
| 816 | netif_tx_stop_all_queues(ndev); | ||
| 817 | ndev->stats.tx_dropped++; | ||
| 818 | dev_kfree_skb_any(skb); | ||
| 819 | |||
| 820 | return NET_XMIT_DROP; | ||
| 821 | } | ||
| 822 | |||
| 823 | /** | ||
| 824 | * Clean up transmitted skb's from the Tx VRING | ||
| 825 | * | ||
| 826 | * Safe to call from IRQ | ||
| 827 | */ | ||
| 828 | void wil_tx_complete(struct wil6210_priv *wil, int ringid) | ||
| 829 | { | ||
| 830 | struct device *dev = wil_to_dev(wil); | ||
| 831 | struct vring *vring = &wil->vring_tx[ringid]; | ||
| 832 | |||
| 833 | if (!vring->va) { | ||
| 834 | wil_err(wil, "Tx irq[%d]: vring not initialized\n", ringid); | ||
| 835 | return; | ||
| 836 | } | ||
| 837 | |||
| 838 | wil_dbg_TXRX(wil, "%s(%d)\n", __func__, ringid); | ||
| 839 | |||
| 840 | while (!wil_vring_is_empty(vring)) { | ||
| 841 | volatile struct vring_tx_desc *d = &vring->va[vring->swtail].tx; | ||
| 842 | dma_addr_t pa; | ||
| 843 | struct sk_buff *skb; | ||
| 844 | if (!(d->dma.status & TX_DMA_STATUS_DU)) | ||
| 845 | break; | ||
| 846 | |||
| 847 | wil_dbg_TXRX(wil, | ||
| 848 | "Tx[%3d] : %d bytes, status 0x%02x err 0x%02x\n", | ||
| 849 | vring->swtail, d->dma.length, d->dma.status, | ||
| 850 | d->dma.error); | ||
| 851 | wil_hex_dump_TXRX("TxC ", DUMP_PREFIX_NONE, 32, 4, | ||
| 852 | (const void *)d, sizeof(*d), false); | ||
| 853 | |||
| 854 | pa = d->dma.addr_low | ((u64)d->dma.addr_high << 32); | ||
| 855 | skb = vring->ctx[vring->swtail]; | ||
| 856 | if (skb) { | ||
| 857 | dma_unmap_single(dev, pa, d->dma.length, DMA_TO_DEVICE); | ||
| 858 | dev_kfree_skb_any(skb); | ||
| 859 | vring->ctx[vring->swtail] = NULL; | ||
| 860 | } else { | ||
| 861 | dma_unmap_page(dev, pa, d->dma.length, DMA_TO_DEVICE); | ||
| 862 | } | ||
| 863 | d->dma.addr_low = 0; | ||
| 864 | d->dma.addr_high = 0; | ||
| 865 | d->dma.length = 0; | ||
| 866 | d->dma.status = TX_DMA_STATUS_DU; | ||
| 867 | vring->swtail = wil_vring_next_tail(vring); | ||
| 868 | } | ||
| 869 | if (wil_vring_avail_tx(vring) > vring->size/4) | ||
| 870 | netif_tx_wake_all_queues(wil_to_ndev(wil)); | ||
| 871 | } | ||
diff --git a/drivers/net/wireless/ath/wil6210/txrx.h b/drivers/net/wireless/ath/wil6210/txrx.h new file mode 100644 index 000000000000..45a61f597c5c --- /dev/null +++ b/drivers/net/wireless/ath/wil6210/txrx.h | |||
| @@ -0,0 +1,362 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012 Qualcomm Atheros, Inc. | ||
| 3 | * | ||
| 4 | * Permission to use, copy, modify, and/or distribute this software for any | ||
| 5 | * purpose with or without fee is hereby granted, provided that the above | ||
| 6 | * copyright notice and this permission notice appear in all copies. | ||
| 7 | * | ||
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef WIL6210_TXRX_H | ||
| 18 | #define WIL6210_TXRX_H | ||
| 19 | |||
| 20 | #define BUF_SW_OWNED (1) | ||
| 21 | #define BUF_HW_OWNED (0) | ||
| 22 | |||
| 23 | /* size of max. Rx packet */ | ||
| 24 | #define RX_BUF_LEN (2048) | ||
| 25 | #define TX_BUF_LEN (2048) | ||
| 26 | /* how many bytes to reserve for rtap header? */ | ||
| 27 | #define WIL6210_RTAP_SIZE (128) | ||
| 28 | |||
| 29 | /* Tx/Rx path */ | ||
| 30 | /* | ||
| 31 | * Tx descriptor - MAC part | ||
| 32 | * [dword 0] | ||
| 33 | * bit 0.. 9 : lifetime_expiry_value:10 | ||
| 34 | * bit 10 : interrup_en:1 | ||
| 35 | * bit 11 : status_en:1 | ||
| 36 | * bit 12..13 : txss_override:2 | ||
| 37 | * bit 14 : timestamp_insertion:1 | ||
| 38 | * bit 15 : duration_preserve:1 | ||
| 39 | * bit 16..21 : reserved0:6 | ||
| 40 | * bit 22..26 : mcs_index:5 | ||
| 41 | * bit 27 : mcs_en:1 | ||
| 42 | * bit 28..29 : reserved1:2 | ||
| 43 | * bit 30 : reserved2:1 | ||
| 44 | * bit 31 : sn_preserved:1 | ||
| 45 | * [dword 1] | ||
| 46 | * bit 0.. 3 : pkt_mode:4 | ||
| 47 | * bit 4 : pkt_mode_en:1 | ||
| 48 | * bit 5.. 7 : reserved0:3 | ||
| 49 | * bit 8..13 : reserved1:6 | ||
| 50 | * bit 14 : reserved2:1 | ||
| 51 | * bit 15 : ack_policy_en:1 | ||
| 52 | * bit 16..19 : dst_index:4 | ||
| 53 | * bit 20 : dst_index_en:1 | ||
| 54 | * bit 21..22 : ack_policy:2 | ||
| 55 | * bit 23 : lifetime_en:1 | ||
| 56 | * bit 24..30 : max_retry:7 | ||
| 57 | * bit 31 : max_retry_en:1 | ||
| 58 | * [dword 2] | ||
| 59 | * bit 0.. 7 : num_of_descriptors:8 | ||
| 60 | * bit 8..17 : reserved:10 | ||
| 61 | * bit 18..19 : l2_translation_type:2 | ||
| 62 | * bit 20 : snap_hdr_insertion_en:1 | ||
| 63 | * bit 21 : vlan_removal_en:1 | ||
| 64 | * bit 22..31 : reserved0:10 | ||
| 65 | * [dword 3] | ||
| 66 | * bit 0.. 31: ucode_cmd:32 | ||
| 67 | */ | ||
| 68 | struct vring_tx_mac { | ||
| 69 | u32 d[3]; | ||
| 70 | u32 ucode_cmd; | ||
| 71 | } __packed; | ||
| 72 | |||
| 73 | /* TX MAC Dword 0 */ | ||
| 74 | #define MAC_CFG_DESC_TX_0_LIFETIME_EXPIRY_VALUE_POS 0 | ||
| 75 | #define MAC_CFG_DESC_TX_0_LIFETIME_EXPIRY_VALUE_LEN 10 | ||
| 76 | #define MAC_CFG_DESC_TX_0_LIFETIME_EXPIRY_VALUE_MSK 0x3FF | ||
| 77 | |||
| 78 | #define MAC_CFG_DESC_TX_0_INTERRUP_EN_POS 10 | ||
| 79 | #define MAC_CFG_DESC_TX_0_INTERRUP_EN_LEN 1 | ||
| 80 | #define MAC_CFG_DESC_TX_0_INTERRUP_EN_MSK 0x400 | ||
| 81 | |||
| 82 | #define MAC_CFG_DESC_TX_0_STATUS_EN_POS 11 | ||
| 83 | #define MAC_CFG_DESC_TX_0_STATUS_EN_LEN 1 | ||
| 84 | #define MAC_CFG_DESC_TX_0_STATUS_EN_MSK 0x800 | ||
| 85 | |||
| 86 | #define MAC_CFG_DESC_TX_0_TXSS_OVERRIDE_POS 12 | ||
| 87 | #define MAC_CFG_DESC_TX_0_TXSS_OVERRIDE_LEN 2 | ||
| 88 | #define MAC_CFG_DESC_TX_0_TXSS_OVERRIDE_MSK 0x3000 | ||
| 89 | |||
| 90 | #define MAC_CFG_DESC_TX_0_TIMESTAMP_INSERTION_POS 14 | ||
| 91 | #define MAC_CFG_DESC_TX_0_TIMESTAMP_INSERTION_LEN 1 | ||
| 92 | #define MAC_CFG_DESC_TX_0_TIMESTAMP_INSERTION_MSK 0x4000 | ||
| 93 | |||
| 94 | #define MAC_CFG_DESC_TX_0_DURATION_PRESERVE_POS 15 | ||
| 95 | #define MAC_CFG_DESC_TX_0_DURATION_PRESERVE_LEN 1 | ||
| 96 | #define MAC_CFG_DESC_TX_0_DURATION_PRESERVE_MSK 0x8000 | ||
| 97 | |||
| 98 | #define MAC_CFG_DESC_TX_0_MCS_INDEX_POS 22 | ||
| 99 | #define MAC_CFG_DESC_TX_0_MCS_INDEX_LEN 5 | ||
| 100 | #define MAC_CFG_DESC_TX_0_MCS_INDEX_MSK 0x7C00000 | ||
| 101 | |||
| 102 | #define MAC_CFG_DESC_TX_0_MCS_EN_POS 27 | ||
| 103 | #define MAC_CFG_DESC_TX_0_MCS_EN_LEN 1 | ||
| 104 | #define MAC_CFG_DESC_TX_0_MCS_EN_MSK 0x8000000 | ||
| 105 | |||
| 106 | #define MAC_CFG_DESC_TX_0_SN_PRESERVED_POS 31 | ||
| 107 | #define MAC_CFG_DESC_TX_0_SN_PRESERVED_LEN 1 | ||
| 108 | #define MAC_CFG_DESC_TX_0_SN_PRESERVED_MSK 0x80000000 | ||
| 109 | |||
| 110 | /* TX MAC Dword 1 */ | ||
| 111 | #define MAC_CFG_DESC_TX_1_PKT_MODE_POS 0 | ||
| 112 | #define MAC_CFG_DESC_TX_1_PKT_MODE_LEN 4 | ||
| 113 | #define MAC_CFG_DESC_TX_1_PKT_MODE_MSK 0xF | ||
| 114 | |||
| 115 | #define MAC_CFG_DESC_TX_1_PKT_MODE_EN_POS 4 | ||
| 116 | #define MAC_CFG_DESC_TX_1_PKT_MODE_EN_LEN 1 | ||
| 117 | #define MAC_CFG_DESC_TX_1_PKT_MODE_EN_MSK 0x10 | ||
| 118 | |||
| 119 | #define MAC_CFG_DESC_TX_1_ACK_POLICY_EN_POS 15 | ||
| 120 | #define MAC_CFG_DESC_TX_1_ACK_POLICY_EN_LEN 1 | ||
| 121 | #define MAC_CFG_DESC_TX_1_ACK_POLICY_EN_MSK 0x8000 | ||
| 122 | |||
| 123 | #define MAC_CFG_DESC_TX_1_DST_INDEX_POS 16 | ||
| 124 | #define MAC_CFG_DESC_TX_1_DST_INDEX_LEN 4 | ||
| 125 | #define MAC_CFG_DESC_TX_1_DST_INDEX_MSK 0xF0000 | ||
| 126 | |||
| 127 | #define MAC_CFG_DESC_TX_1_DST_INDEX_EN_POS 20 | ||
| 128 | #define MAC_CFG_DESC_TX_1_DST_INDEX_EN_LEN 1 | ||
| 129 | #define MAC_CFG_DESC_TX_1_DST_INDEX_EN_MSK 0x100000 | ||
| 130 | |||
| 131 | #define MAC_CFG_DESC_TX_1_ACK_POLICY_POS 21 | ||
| 132 | #define MAC_CFG_DESC_TX_1_ACK_POLICY_LEN 2 | ||
| 133 | #define MAC_CFG_DESC_TX_1_ACK_POLICY_MSK 0x600000 | ||
| 134 | |||
| 135 | #define MAC_CFG_DESC_TX_1_LIFETIME_EN_POS 23 | ||
| 136 | #define MAC_CFG_DESC_TX_1_LIFETIME_EN_LEN 1 | ||
| 137 | #define MAC_CFG_DESC_TX_1_LIFETIME_EN_MSK 0x800000 | ||
| 138 | |||
| 139 | #define MAC_CFG_DESC_TX_1_MAX_RETRY_POS 24 | ||
| 140 | #define MAC_CFG_DESC_TX_1_MAX_RETRY_LEN 7 | ||
| 141 | #define MAC_CFG_DESC_TX_1_MAX_RETRY_MSK 0x7F000000 | ||
| 142 | |||
| 143 | #define MAC_CFG_DESC_TX_1_MAX_RETRY_EN_POS 31 | ||
| 144 | #define MAC_CFG_DESC_TX_1_MAX_RETRY_EN_LEN 1 | ||
| 145 | #define MAC_CFG_DESC_TX_1_MAX_RETRY_EN_MSK 0x80000000 | ||
| 146 | |||
| 147 | /* TX MAC Dword 2 */ | ||
| 148 | #define MAC_CFG_DESC_TX_2_NUM_OF_DESCRIPTORS_POS 0 | ||
| 149 | #define MAC_CFG_DESC_TX_2_NUM_OF_DESCRIPTORS_LEN 8 | ||
| 150 | #define MAC_CFG_DESC_TX_2_NUM_OF_DESCRIPTORS_MSK 0xFF | ||
| 151 | |||
| 152 | #define MAC_CFG_DESC_TX_2_RESERVED_POS 8 | ||
| 153 | #define MAC_CFG_DESC_TX_2_RESERVED_LEN 10 | ||
| 154 | #define MAC_CFG_DESC_TX_2_RESERVED_MSK 0x3FF00 | ||
| 155 | |||
| 156 | #define MAC_CFG_DESC_TX_2_L2_TRANSLATION_TYPE_POS 18 | ||
| 157 | #define MAC_CFG_DESC_TX_2_L2_TRANSLATION_TYPE_LEN 2 | ||
| 158 | #define MAC_CFG_DESC_TX_2_L2_TRANSLATION_TYPE_MSK 0xC0000 | ||
| 159 | |||
| 160 | #define MAC_CFG_DESC_TX_2_SNAP_HDR_INSERTION_EN_POS 20 | ||
| 161 | #define MAC_CFG_DESC_TX_2_SNAP_HDR_INSERTION_EN_LEN 1 | ||
| 162 | #define MAC_CFG_DESC_TX_2_SNAP_HDR_INSERTION_EN_MSK 0x100000 | ||
| 163 | |||
| 164 | #define MAC_CFG_DESC_TX_2_VLAN_REMOVAL_EN_POS 21 | ||
| 165 | #define MAC_CFG_DESC_TX_2_VLAN_REMOVAL_EN_LEN 1 | ||
| 166 | #define MAC_CFG_DESC_TX_2_VLAN_REMOVAL_EN_MSK 0x200000 | ||
| 167 | |||
| 168 | /* TX MAC Dword 3 */ | ||
| 169 | #define MAC_CFG_DESC_TX_3_UCODE_CMD_POS 0 | ||
| 170 | #define MAC_CFG_DESC_TX_3_UCODE_CMD_LEN 32 | ||
| 171 | #define MAC_CFG_DESC_TX_3_UCODE_CMD_MSK 0xFFFFFFFF | ||
| 172 | |||
| 173 | /* TX DMA Dword 0 */ | ||
| 174 | #define DMA_CFG_DESC_TX_0_L4_LENGTH_POS 0 | ||
| 175 | #define DMA_CFG_DESC_TX_0_L4_LENGTH_LEN 8 | ||
| 176 | #define DMA_CFG_DESC_TX_0_L4_LENGTH_MSK 0xFF | ||
| 177 | |||
| 178 | #define DMA_CFG_DESC_TX_0_CMD_EOP_POS 8 | ||
| 179 | #define DMA_CFG_DESC_TX_0_CMD_EOP_LEN 1 | ||
| 180 | #define DMA_CFG_DESC_TX_0_CMD_EOP_MSK 0x100 | ||
| 181 | |||
| 182 | #define DMA_CFG_DESC_TX_0_CMD_DMA_IT_POS 10 | ||
| 183 | #define DMA_CFG_DESC_TX_0_CMD_DMA_IT_LEN 1 | ||
| 184 | #define DMA_CFG_DESC_TX_0_CMD_DMA_IT_MSK 0x400 | ||
| 185 | |||
| 186 | #define DMA_CFG_DESC_TX_0_SEGMENT_BUF_DETAILS_POS 11 | ||
| 187 | #define DMA_CFG_DESC_TX_0_SEGMENT_BUF_DETAILS_LEN 2 | ||
| 188 | #define DMA_CFG_DESC_TX_0_SEGMENT_BUF_DETAILS_MSK 0x1800 | ||
| 189 | |||
| 190 | #define DMA_CFG_DESC_TX_0_TCP_SEG_EN_POS 13 | ||
| 191 | #define DMA_CFG_DESC_TX_0_TCP_SEG_EN_LEN 1 | ||
| 192 | #define DMA_CFG_DESC_TX_0_TCP_SEG_EN_MSK 0x2000 | ||
| 193 | |||
| 194 | #define DMA_CFG_DESC_TX_0_IPV4_CHECKSUM_EN_POS 14 | ||
| 195 | #define DMA_CFG_DESC_TX_0_IPV4_CHECKSUM_EN_LEN 1 | ||
| 196 | #define DMA_CFG_DESC_TX_0_IPV4_CHECKSUM_EN_MSK 0x4000 | ||
| 197 | |||
| 198 | #define DMA_CFG_DESC_TX_0_TCP_UDP_CHECKSUM_EN_POS 15 | ||
| 199 | #define DMA_CFG_DESC_TX_0_TCP_UDP_CHECKSUM_EN_LEN 1 | ||
| 200 | #define DMA_CFG_DESC_TX_0_TCP_UDP_CHECKSUM_EN_MSK 0x8000 | ||
| 201 | |||
| 202 | #define DMA_CFG_DESC_TX_0_QID_POS 16 | ||
| 203 | #define DMA_CFG_DESC_TX_0_QID_LEN 5 | ||
| 204 | #define DMA_CFG_DESC_TX_0_QID_MSK 0x1F0000 | ||
| 205 | |||
| 206 | #define DMA_CFG_DESC_TX_0_PSEUDO_HEADER_CALC_EN_POS 21 | ||
| 207 | #define DMA_CFG_DESC_TX_0_PSEUDO_HEADER_CALC_EN_LEN 1 | ||
| 208 | #define DMA_CFG_DESC_TX_0_PSEUDO_HEADER_CALC_EN_MSK 0x200000 | ||
| 209 | |||
| 210 | #define DMA_CFG_DESC_TX_0_L4_TYPE_POS 30 | ||
| 211 | #define DMA_CFG_DESC_TX_0_L4_TYPE_LEN 2 | ||
| 212 | #define DMA_CFG_DESC_TX_0_L4_TYPE_MSK 0xC0000000 | ||
| 213 | |||
| 214 | |||
| 215 | #define TX_DMA_STATUS_DU BIT(0) | ||
| 216 | |||
| 217 | struct vring_tx_dma { | ||
| 218 | u32 d0; | ||
| 219 | u32 addr_low; | ||
| 220 | u16 addr_high; | ||
| 221 | u8 ip_length; | ||
| 222 | u8 b11; /* 0..6: mac_length; 7:ip_version */ | ||
| 223 | u8 error; /* 0..2: err; 3..7: reserved; */ | ||
| 224 | u8 status; /* 0: used; 1..7; reserved */ | ||
| 225 | u16 length; | ||
| 226 | } __packed; | ||
| 227 | |||
| 228 | /* | ||
| 229 | * Rx descriptor - MAC part | ||
| 230 | * [dword 0] | ||
| 231 | * bit 0.. 3 : tid:4 The QoS (b3-0) TID Field | ||
| 232 | * bit 4.. 6 : connection_id:3 :The Source index that was found during | ||
| 233 | * Parsing the TA. This field is used to define the source of the packet | ||
| 234 | * bit 7 : reserved:1 | ||
| 235 | * bit 8.. 9 : mac_id:2 : The MAC virtual Ring number (always zero) | ||
| 236 | * bit 10..11 : frame_type:2 : The FC Control (b3-2) - MPDU Type | ||
| 237 | * (management, data, control and extension) | ||
| 238 | * bit 12..15 : frame_subtype:4 : The FC Control (b7-4) - Frame Subtype | ||
| 239 | * bit 16..27 : seq_number:12 The received Sequence number field | ||
| 240 | * bit 28..31 : extended:4 extended subtype | ||
| 241 | * [dword 1] | ||
| 242 | * bit 0.. 3 : reserved | ||
| 243 | * bit 4.. 5 : key_id:2 | ||
| 244 | * bit 6 : decrypt_bypass:1 | ||
| 245 | * bit 7 : security:1 | ||
| 246 | * bit 8.. 9 : ds_bits:2 | ||
| 247 | * bit 10 : a_msdu_present:1 from qos header | ||
| 248 | * bit 11 : a_msdu_type:1 from qos header | ||
| 249 | * bit 12 : a_mpdu:1 part of AMPDU aggregation | ||
| 250 | * bit 13 : broadcast:1 | ||
| 251 | * bit 14 : mutlicast:1 | ||
| 252 | * bit 15 : reserved:1 | ||
| 253 | * bit 16..20 : rx_mac_qid:5 The Queue Identifier that the packet | ||
| 254 | * is received from | ||
| 255 | * bit 21..24 : mcs:4 | ||
| 256 | * bit 25..28 : mic_icr:4 | ||
| 257 | * bit 29..31 : reserved:3 | ||
| 258 | * [dword 2] | ||
| 259 | * bit 0.. 2 : time_slot:3 The timeslot that the MPDU is received | ||
| 260 | * bit 3 : fc_protocol_ver:1 The FC Control (b0) - Protocol Version | ||
| 261 | * bit 4 : fc_order:1 The FC Control (b15) -Order | ||
| 262 | * bit 5.. 7 : qos_ack_policy:3 The QoS (b6-5) ack policy Field | ||
| 263 | * bit 8 : esop:1 The QoS (b4) ESOP field | ||
| 264 | * bit 9 : qos_rdg_more_ppdu:1 The QoS (b9) RDG field | ||
| 265 | * bit 10..14 : qos_reserved:5 The QoS (b14-10) Reserved field | ||
| 266 | * bit 15 : qos_ac_constraint:1 | ||
| 267 | * bit 16..31 : pn_15_0:16 low 2 bytes of PN | ||
| 268 | * [dword 3] | ||
| 269 | * bit 0..31 : pn_47_16:32 high 4 bytes of PN | ||
| 270 | */ | ||
| 271 | struct vring_rx_mac { | ||
| 272 | u32 d0; | ||
| 273 | u32 d1; | ||
| 274 | u16 w4; | ||
| 275 | u16 pn_15_0; | ||
| 276 | u32 pn_47_16; | ||
| 277 | } __packed; | ||
| 278 | |||
| 279 | /* | ||
| 280 | * Rx descriptor - DMA part | ||
| 281 | * [dword 0] | ||
| 282 | * bit 0.. 7 : l4_length:8 layer 4 length | ||
| 283 | * bit 8.. 9 : reserved:2 | ||
| 284 | * bit 10 : cmd_dma_it:1 | ||
| 285 | * bit 11..15 : reserved:5 | ||
| 286 | * bit 16..29 : phy_info_length:14 | ||
| 287 | * bit 30..31 : l4_type:2 valid if the L4I bit is set in the status field | ||
| 288 | * [dword 1] | ||
| 289 | * bit 0..31 : addr_low:32 The payload buffer low address | ||
| 290 | * [dword 2] | ||
| 291 | * bit 0..15 : addr_high:16 The payload buffer high address | ||
| 292 | * bit 16..23 : ip_length:8 | ||
| 293 | * bit 24..30 : mac_length:7 | ||
| 294 | * bit 31 : ip_version:1 | ||
| 295 | * [dword 3] | ||
| 296 | * [byte 12] error | ||
| 297 | * [byte 13] status | ||
| 298 | * bit 0 : du:1 | ||
| 299 | * bit 1 : eop:1 | ||
| 300 | * bit 2 : error:1 | ||
| 301 | * bit 3 : mi:1 | ||
| 302 | * bit 4 : l3_identified:1 | ||
| 303 | * bit 5 : l4_identified:1 | ||
| 304 | * bit 6 : phy_info_included:1 | ||
| 305 | * bit 7 : reserved:1 | ||
| 306 | * [word 7] length | ||
| 307 | * | ||
| 308 | */ | ||
| 309 | |||
| 310 | #define RX_DMA_D0_CMD_DMA_IT BIT(10) | ||
| 311 | |||
| 312 | #define RX_DMA_STATUS_DU BIT(0) | ||
| 313 | #define RX_DMA_STATUS_ERROR BIT(2) | ||
| 314 | #define RX_DMA_STATUS_PHY_INFO BIT(6) | ||
| 315 | |||
| 316 | struct vring_rx_dma { | ||
| 317 | u32 d0; | ||
| 318 | u32 addr_low; | ||
| 319 | u16 addr_high; | ||
| 320 | u8 ip_length; | ||
| 321 | u8 b11; | ||
| 322 | u8 error; | ||
| 323 | u8 status; | ||
| 324 | u16 length; | ||
| 325 | } __packed; | ||
| 326 | |||
| 327 | struct vring_tx_desc { | ||
| 328 | struct vring_tx_mac mac; | ||
| 329 | struct vring_tx_dma dma; | ||
| 330 | } __packed; | ||
| 331 | |||
| 332 | struct vring_rx_desc { | ||
| 333 | struct vring_rx_mac mac; | ||
| 334 | struct vring_rx_dma dma; | ||
| 335 | } __packed; | ||
| 336 | |||
| 337 | union vring_desc { | ||
| 338 | struct vring_tx_desc tx; | ||
| 339 | struct vring_rx_desc rx; | ||
| 340 | } __packed; | ||
| 341 | |||
| 342 | static inline int wil_rxdesc_phy_length(volatile struct vring_rx_desc *d) | ||
| 343 | { | ||
| 344 | return WIL_GET_BITS(d->dma.d0, 16, 29); | ||
| 345 | } | ||
| 346 | |||
| 347 | static inline int wil_rxdesc_mcs(volatile struct vring_rx_desc *d) | ||
| 348 | { | ||
| 349 | return WIL_GET_BITS(d->mac.d1, 21, 24); | ||
| 350 | } | ||
| 351 | |||
| 352 | static inline int wil_rxdesc_ds_bits(volatile struct vring_rx_desc *d) | ||
| 353 | { | ||
| 354 | return WIL_GET_BITS(d->mac.d1, 8, 9); | ||
| 355 | } | ||
| 356 | |||
| 357 | static inline int wil_rxdesc_ftype(volatile struct vring_rx_desc *d) | ||
| 358 | { | ||
| 359 | return WIL_GET_BITS(d->mac.d0, 10, 11); | ||
| 360 | } | ||
| 361 | |||
| 362 | #endif /* WIL6210_TXRX_H */ | ||
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h new file mode 100644 index 000000000000..9bcfffa4006c --- /dev/null +++ b/drivers/net/wireless/ath/wil6210/wil6210.h | |||
| @@ -0,0 +1,363 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012 Qualcomm Atheros, Inc. | ||
| 3 | * | ||
| 4 | * Permission to use, copy, modify, and/or distribute this software for any | ||
| 5 | * purpose with or without fee is hereby granted, provided that the above | ||
| 6 | * copyright notice and this permission notice appear in all copies. | ||
| 7 | * | ||
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef __WIL6210_H__ | ||
| 18 | #define __WIL6210_H__ | ||
| 19 | |||
| 20 | #include <linux/netdevice.h> | ||
| 21 | #include <linux/wireless.h> | ||
| 22 | #include <net/cfg80211.h> | ||
| 23 | |||
| 24 | #include "dbg_hexdump.h" | ||
| 25 | |||
| 26 | #define WIL_NAME "wil6210" | ||
| 27 | |||
| 28 | /** | ||
| 29 | * extract bits [@b0:@b1] (inclusive) from the value @x | ||
| 30 | * it should be @b0 <= @b1, or result is incorrect | ||
| 31 | */ | ||
| 32 | static inline u32 WIL_GET_BITS(u32 x, int b0, int b1) | ||
| 33 | { | ||
| 34 | return (x >> b0) & ((1 << (b1 - b0 + 1)) - 1); | ||
| 35 | } | ||
| 36 | |||
| 37 | #define WIL6210_MEM_SIZE (2*1024*1024UL) | ||
| 38 | |||
| 39 | #define WIL6210_TX_QUEUES (4) | ||
| 40 | |||
| 41 | #define WIL6210_RX_RING_SIZE (128) | ||
| 42 | #define WIL6210_TX_RING_SIZE (128) | ||
| 43 | #define WIL6210_MAX_TX_RINGS (24) | ||
| 44 | |||
| 45 | /* Hardware definitions begin */ | ||
| 46 | |||
| 47 | /* | ||
| 48 | * Mapping | ||
| 49 | * RGF File | Host addr | FW addr | ||
| 50 | * | | | ||
| 51 | * user_rgf | 0x000000 | 0x880000 | ||
| 52 | * dma_rgf | 0x001000 | 0x881000 | ||
| 53 | * pcie_rgf | 0x002000 | 0x882000 | ||
| 54 | * | | | ||
| 55 | */ | ||
| 56 | |||
| 57 | /* Where various structures placed in host address space */ | ||
| 58 | #define WIL6210_FW_HOST_OFF (0x880000UL) | ||
| 59 | |||
| 60 | #define HOSTADDR(fwaddr) (fwaddr - WIL6210_FW_HOST_OFF) | ||
| 61 | |||
| 62 | /* | ||
| 63 | * Interrupt control registers block | ||
| 64 | * | ||
| 65 | * each interrupt controlled by the same bit in all registers | ||
| 66 | */ | ||
| 67 | struct RGF_ICR { | ||
| 68 | u32 ICC; /* Cause Control, RW: 0 - W1C, 1 - COR */ | ||
| 69 | u32 ICR; /* Cause, W1C/COR depending on ICC */ | ||
| 70 | u32 ICM; /* Cause masked (ICR & ~IMV), W1C/COR depending on ICC */ | ||
| 71 | u32 ICS; /* Cause Set, WO */ | ||
| 72 | u32 IMV; /* Mask, RW+S/C */ | ||
| 73 | u32 IMS; /* Mask Set, write 1 to set */ | ||
| 74 | u32 IMC; /* Mask Clear, write 1 to clear */ | ||
| 75 | } __packed; | ||
| 76 | |||
| 77 | /* registers - FW addresses */ | ||
| 78 | #define RGF_USER_USER_SCRATCH_PAD (0x8802bc) | ||
| 79 | #define RGF_USER_USER_ICR (0x880b4c) /* struct RGF_ICR */ | ||
| 80 | #define BIT_USER_USER_ICR_SW_INT_2 BIT(18) | ||
| 81 | #define RGF_USER_CLKS_CTL_SW_RST_MASK_0 (0x880b14) | ||
| 82 | #define RGF_USER_MAC_CPU_0 (0x8801fc) | ||
| 83 | #define RGF_USER_USER_CPU_0 (0x8801e0) | ||
| 84 | #define RGF_USER_CLKS_CTL_SW_RST_VEC_0 (0x880b04) | ||
| 85 | #define RGF_USER_CLKS_CTL_SW_RST_VEC_1 (0x880b08) | ||
| 86 | #define RGF_USER_CLKS_CTL_SW_RST_VEC_2 (0x880b0c) | ||
| 87 | #define RGF_USER_CLKS_CTL_SW_RST_VEC_3 (0x880b10) | ||
| 88 | |||
| 89 | #define RGF_DMA_PSEUDO_CAUSE (0x881c68) | ||
| 90 | #define RGF_DMA_PSEUDO_CAUSE_MASK_SW (0x881c6c) | ||
| 91 | #define RGF_DMA_PSEUDO_CAUSE_MASK_FW (0x881c70) | ||
| 92 | #define BIT_DMA_PSEUDO_CAUSE_RX BIT(0) | ||
| 93 | #define BIT_DMA_PSEUDO_CAUSE_TX BIT(1) | ||
| 94 | #define BIT_DMA_PSEUDO_CAUSE_MISC BIT(2) | ||
| 95 | |||
| 96 | #define RGF_DMA_EP_TX_ICR (0x881bb4) /* struct RGF_ICR */ | ||
| 97 | #define BIT_DMA_EP_TX_ICR_TX_DONE BIT(0) | ||
| 98 | #define BIT_DMA_EP_TX_ICR_TX_DONE_N(n) BIT(n+1) /* n = [0..23] */ | ||
| 99 | #define RGF_DMA_EP_RX_ICR (0x881bd0) /* struct RGF_ICR */ | ||
| 100 | #define BIT_DMA_EP_RX_ICR_RX_DONE BIT(0) | ||
| 101 | #define RGF_DMA_EP_MISC_ICR (0x881bec) /* struct RGF_ICR */ | ||
| 102 | #define BIT_DMA_EP_MISC_ICR_RX_HTRSH BIT(0) | ||
| 103 | #define BIT_DMA_EP_MISC_ICR_TX_NO_ACT BIT(1) | ||
| 104 | #define BIT_DMA_EP_MISC_ICR_FW_INT0 BIT(28) | ||
| 105 | #define BIT_DMA_EP_MISC_ICR_FW_INT1 BIT(29) | ||
| 106 | |||
| 107 | /* Interrupt moderation control */ | ||
| 108 | #define RGF_DMA_ITR_CNT_TRSH (0x881c5c) | ||
| 109 | #define RGF_DMA_ITR_CNT_DATA (0x881c60) | ||
| 110 | #define RGF_DMA_ITR_CNT_CRL (0x881C64) | ||
| 111 | #define BIT_DMA_ITR_CNT_CRL_EN BIT(0) | ||
| 112 | #define BIT_DMA_ITR_CNT_CRL_EXT_TICK BIT(1) | ||
| 113 | #define BIT_DMA_ITR_CNT_CRL_FOREVER BIT(2) | ||
| 114 | #define BIT_DMA_ITR_CNT_CRL_CLR BIT(3) | ||
| 115 | #define BIT_DMA_ITR_CNT_CRL_REACH_TRSH BIT(4) | ||
| 116 | |||
| 117 | /* popular locations */ | ||
| 118 | #define HOST_MBOX HOSTADDR(RGF_USER_USER_SCRATCH_PAD) | ||
| 119 | #define HOST_SW_INT (HOSTADDR(RGF_USER_USER_ICR) + \ | ||
| 120 | offsetof(struct RGF_ICR, ICS)) | ||
| 121 | #define SW_INT_MBOX BIT_USER_USER_ICR_SW_INT_2 | ||
| 122 | |||
| 123 | /* ISR register bits */ | ||
| 124 | #define ISR_MISC_FW_READY BIT_DMA_EP_MISC_ICR_FW_INT0 | ||
| 125 | #define ISR_MISC_MBOX_EVT BIT_DMA_EP_MISC_ICR_FW_INT1 | ||
| 126 | |||
| 127 | /* Hardware definitions end */ | ||
| 128 | |||
| 129 | struct wil6210_mbox_ring { | ||
| 130 | u32 base; | ||
| 131 | u16 entry_size; /* max. size of mbox entry, incl. all headers */ | ||
| 132 | u16 size; | ||
| 133 | u32 tail; | ||
| 134 | u32 head; | ||
| 135 | } __packed; | ||
| 136 | |||
| 137 | struct wil6210_mbox_ring_desc { | ||
| 138 | __le32 sync; | ||
| 139 | __le32 addr; | ||
| 140 | } __packed; | ||
| 141 | |||
| 142 | /* at HOST_OFF_WIL6210_MBOX_CTL */ | ||
| 143 | struct wil6210_mbox_ctl { | ||
| 144 | struct wil6210_mbox_ring tx; | ||
| 145 | struct wil6210_mbox_ring rx; | ||
| 146 | } __packed; | ||
| 147 | |||
| 148 | struct wil6210_mbox_hdr { | ||
| 149 | __le16 seq; | ||
| 150 | __le16 len; /* payload, bytes after this header */ | ||
| 151 | __le16 type; | ||
| 152 | u8 flags; | ||
| 153 | u8 reserved; | ||
| 154 | } __packed; | ||
| 155 | |||
| 156 | #define WIL_MBOX_HDR_TYPE_WMI (0) | ||
| 157 | |||
| 158 | /* max. value for wil6210_mbox_hdr.len */ | ||
| 159 | #define MAX_MBOXITEM_SIZE (240) | ||
| 160 | |||
| 161 | struct wil6210_mbox_hdr_wmi { | ||
| 162 | u8 reserved0[2]; | ||
| 163 | __le16 id; | ||
| 164 | __le16 info1; /* bits [0..3] - device_id, rest - unused */ | ||
| 165 | u8 reserved1[2]; | ||
| 166 | } __packed; | ||
| 167 | |||
| 168 | struct pending_wmi_event { | ||
| 169 | struct list_head list; | ||
| 170 | struct { | ||
| 171 | struct wil6210_mbox_hdr hdr; | ||
| 172 | struct wil6210_mbox_hdr_wmi wmi; | ||
| 173 | u8 data[0]; | ||
| 174 | } __packed event; | ||
| 175 | }; | ||
| 176 | |||
| 177 | union vring_desc; | ||
| 178 | |||
| 179 | struct vring { | ||
| 180 | dma_addr_t pa; | ||
| 181 | volatile union vring_desc *va; /* vring_desc[size], WriteBack by DMA */ | ||
| 182 | u16 size; /* number of vring_desc elements */ | ||
| 183 | u32 swtail; | ||
| 184 | u32 swhead; | ||
| 185 | u32 hwtail; /* write here to inform hw */ | ||
| 186 | void **ctx; /* void *ctx[size] - software context */ | ||
| 187 | }; | ||
| 188 | |||
| 189 | enum { /* for wil6210_priv.status */ | ||
| 190 | wil_status_fwready = 0, | ||
| 191 | wil_status_fwconnected, | ||
| 192 | wil_status_dontscan, | ||
| 193 | wil_status_irqen, /* FIXME: interrupts enabled - for debug */ | ||
| 194 | }; | ||
| 195 | |||
| 196 | struct pci_dev; | ||
| 197 | |||
| 198 | struct wil6210_stats { | ||
| 199 | u64 tsf; | ||
| 200 | u32 snr; | ||
| 201 | u16 last_mcs_rx; | ||
| 202 | u16 bf_mcs; /* last BF, used for Tx */ | ||
| 203 | u16 my_rx_sector; | ||
| 204 | u16 my_tx_sector; | ||
| 205 | u16 peer_rx_sector; | ||
| 206 | u16 peer_tx_sector; | ||
| 207 | }; | ||
| 208 | |||
| 209 | struct wil6210_priv { | ||
| 210 | struct pci_dev *pdev; | ||
| 211 | int n_msi; | ||
| 212 | struct wireless_dev *wdev; | ||
| 213 | void __iomem *csr; | ||
| 214 | ulong status; | ||
| 215 | /* profile */ | ||
| 216 | u32 monitor_flags; | ||
| 217 | u32 secure_pcp; /* create secure PCP? */ | ||
| 218 | int sinfo_gen; | ||
| 219 | /* cached ISR registers */ | ||
| 220 | u32 isr_misc; | ||
| 221 | /* mailbox related */ | ||
| 222 | struct mutex wmi_mutex; | ||
| 223 | struct wil6210_mbox_ctl mbox_ctl; | ||
| 224 | struct completion wmi_ready; | ||
| 225 | u16 wmi_seq; | ||
| 226 | u16 reply_id; /**< wait for this WMI event */ | ||
| 227 | void *reply_buf; | ||
| 228 | u16 reply_size; | ||
| 229 | struct workqueue_struct *wmi_wq; /* for deferred calls */ | ||
| 230 | struct work_struct wmi_event_worker; | ||
| 231 | struct workqueue_struct *wmi_wq_conn; /* for connect worker */ | ||
| 232 | struct work_struct wmi_connect_worker; | ||
| 233 | struct work_struct disconnect_worker; | ||
| 234 | struct timer_list connect_timer; | ||
| 235 | int pending_connect_cid; | ||
| 236 | struct list_head pending_wmi_ev; | ||
| 237 | /* | ||
| 238 | * protect pending_wmi_ev | ||
| 239 | * - fill in IRQ from wil6210_irq_misc, | ||
| 240 | * - consumed in thread by wmi_event_worker | ||
| 241 | */ | ||
| 242 | spinlock_t wmi_ev_lock; | ||
| 243 | /* DMA related */ | ||
| 244 | struct vring vring_rx; | ||
| 245 | struct vring vring_tx[WIL6210_MAX_TX_RINGS]; | ||
| 246 | u8 dst_addr[WIL6210_MAX_TX_RINGS][ETH_ALEN]; | ||
| 247 | /* scan */ | ||
| 248 | struct cfg80211_scan_request *scan_request; | ||
| 249 | |||
| 250 | struct mutex mutex; /* for wil6210_priv access in wil_{up|down} */ | ||
| 251 | /* statistics */ | ||
| 252 | struct wil6210_stats stats; | ||
| 253 | /* debugfs */ | ||
| 254 | struct dentry *debug; | ||
| 255 | struct debugfs_blob_wrapper fw_code_blob; | ||
| 256 | struct debugfs_blob_wrapper fw_data_blob; | ||
| 257 | struct debugfs_blob_wrapper fw_peri_blob; | ||
| 258 | struct debugfs_blob_wrapper uc_code_blob; | ||
| 259 | struct debugfs_blob_wrapper uc_data_blob; | ||
| 260 | struct debugfs_blob_wrapper rgf_blob; | ||
| 261 | }; | ||
| 262 | |||
| 263 | #define wil_to_wiphy(i) (i->wdev->wiphy) | ||
| 264 | #define wil_to_dev(i) (wiphy_dev(wil_to_wiphy(i))) | ||
| 265 | #define wiphy_to_wil(w) (struct wil6210_priv *)(wiphy_priv(w)) | ||
| 266 | #define wil_to_wdev(i) (i->wdev) | ||
| 267 | #define wdev_to_wil(w) (struct wil6210_priv *)(wdev_priv(w)) | ||
| 268 | #define wil_to_ndev(i) (wil_to_wdev(i)->netdev) | ||
| 269 | #define ndev_to_wil(n) (wdev_to_wil(n->ieee80211_ptr)) | ||
| 270 | |||
| 271 | #define wil_dbg(wil, fmt, arg...) netdev_dbg(wil_to_ndev(wil), fmt, ##arg) | ||
| 272 | #define wil_info(wil, fmt, arg...) netdev_info(wil_to_ndev(wil), fmt, ##arg) | ||
| 273 | #define wil_err(wil, fmt, arg...) netdev_err(wil_to_ndev(wil), fmt, ##arg) | ||
| 274 | |||
| 275 | #define wil_dbg_IRQ(wil, fmt, arg...) wil_dbg(wil, "DBG[ IRQ]" fmt, ##arg) | ||
| 276 | #define wil_dbg_TXRX(wil, fmt, arg...) wil_dbg(wil, "DBG[TXRX]" fmt, ##arg) | ||
| 277 | #define wil_dbg_WMI(wil, fmt, arg...) wil_dbg(wil, "DBG[ WMI]" fmt, ##arg) | ||
| 278 | |||
| 279 | #define wil_hex_dump_TXRX(prefix_str, prefix_type, rowsize, \ | ||
| 280 | groupsize, buf, len, ascii) \ | ||
| 281 | wil_print_hex_dump_debug("DBG[TXRX]" prefix_str,\ | ||
| 282 | prefix_type, rowsize, \ | ||
| 283 | groupsize, buf, len, ascii) | ||
| 284 | |||
| 285 | #define wil_hex_dump_WMI(prefix_str, prefix_type, rowsize, \ | ||
| 286 | groupsize, buf, len, ascii) \ | ||
| 287 | wil_print_hex_dump_debug("DBG[ WMI]" prefix_str,\ | ||
| 288 | prefix_type, rowsize, \ | ||
| 289 | groupsize, buf, len, ascii) | ||
| 290 | |||
| 291 | void wil_memcpy_fromio_32(void *dst, const volatile void __iomem *src, | ||
| 292 | size_t count); | ||
| 293 | void wil_memcpy_toio_32(volatile void __iomem *dst, const void *src, | ||
| 294 | size_t count); | ||
| 295 | |||
| 296 | void *wil_if_alloc(struct device *dev, void __iomem *csr); | ||
| 297 | void wil_if_free(struct wil6210_priv *wil); | ||
| 298 | int wil_if_add(struct wil6210_priv *wil); | ||
| 299 | void wil_if_remove(struct wil6210_priv *wil); | ||
| 300 | int wil_priv_init(struct wil6210_priv *wil); | ||
| 301 | void wil_priv_deinit(struct wil6210_priv *wil); | ||
| 302 | int wil_reset(struct wil6210_priv *wil); | ||
| 303 | void wil_link_on(struct wil6210_priv *wil); | ||
| 304 | void wil_link_off(struct wil6210_priv *wil); | ||
| 305 | int wil_up(struct wil6210_priv *wil); | ||
| 306 | int wil_down(struct wil6210_priv *wil); | ||
| 307 | void wil_mbox_ring_le2cpus(struct wil6210_mbox_ring *r); | ||
| 308 | |||
| 309 | void __iomem *wmi_buffer(struct wil6210_priv *wil, __le32 ptr); | ||
| 310 | void __iomem *wmi_addr(struct wil6210_priv *wil, u32 ptr); | ||
| 311 | int wmi_read_hdr(struct wil6210_priv *wil, __le32 ptr, | ||
| 312 | struct wil6210_mbox_hdr *hdr); | ||
| 313 | int wmi_send(struct wil6210_priv *wil, u16 cmdid, void *buf, u16 len); | ||
| 314 | void wmi_recv_cmd(struct wil6210_priv *wil); | ||
| 315 | int wmi_call(struct wil6210_priv *wil, u16 cmdid, void *buf, u16 len, | ||
| 316 | u16 reply_id, void *reply, u8 reply_size, int to_msec); | ||
| 317 | void wmi_connect_worker(struct work_struct *work); | ||
| 318 | void wmi_event_worker(struct work_struct *work); | ||
| 319 | void wmi_event_flush(struct wil6210_priv *wil); | ||
| 320 | int wmi_set_ssid(struct wil6210_priv *wil, u8 ssid_len, const void *ssid); | ||
| 321 | int wmi_get_ssid(struct wil6210_priv *wil, u8 *ssid_len, void *ssid); | ||
| 322 | int wmi_set_channel(struct wil6210_priv *wil, int channel); | ||
| 323 | int wmi_get_channel(struct wil6210_priv *wil, int *channel); | ||
| 324 | int wmi_tx_eapol(struct wil6210_priv *wil, struct sk_buff *skb); | ||
| 325 | int wmi_del_cipher_key(struct wil6210_priv *wil, u8 key_index, | ||
| 326 | const void *mac_addr); | ||
| 327 | int wmi_add_cipher_key(struct wil6210_priv *wil, u8 key_index, | ||
| 328 | const void *mac_addr, int key_len, const void *key); | ||
| 329 | int wmi_echo(struct wil6210_priv *wil); | ||
| 330 | int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie); | ||
| 331 | |||
| 332 | int wil6210_init_irq(struct wil6210_priv *wil, int irq); | ||
| 333 | void wil6210_fini_irq(struct wil6210_priv *wil, int irq); | ||
| 334 | void wil6210_disable_irq(struct wil6210_priv *wil); | ||
| 335 | void wil6210_enable_irq(struct wil6210_priv *wil); | ||
| 336 | |||
| 337 | int wil6210_debugfs_init(struct wil6210_priv *wil); | ||
| 338 | void wil6210_debugfs_remove(struct wil6210_priv *wil); | ||
| 339 | |||
| 340 | struct wireless_dev *wil_cfg80211_init(struct device *dev); | ||
| 341 | void wil_wdev_free(struct wil6210_priv *wil); | ||
| 342 | |||
| 343 | int wmi_set_mac_address(struct wil6210_priv *wil, void *addr); | ||
| 344 | int wmi_set_bcon(struct wil6210_priv *wil, int bi, u8 wmi_nettype); | ||
| 345 | void wil6210_disconnect(struct wil6210_priv *wil, void *bssid); | ||
| 346 | |||
| 347 | int wil_rx_init(struct wil6210_priv *wil); | ||
| 348 | void wil_rx_fini(struct wil6210_priv *wil); | ||
| 349 | |||
| 350 | /* TX API */ | ||
| 351 | int wil_vring_init_tx(struct wil6210_priv *wil, int id, int size, | ||
| 352 | int cid, int tid); | ||
| 353 | void wil_vring_fini_tx(struct wil6210_priv *wil, int id); | ||
| 354 | |||
| 355 | netdev_tx_t wil_start_xmit(struct sk_buff *skb, struct net_device *ndev); | ||
| 356 | void wil_tx_complete(struct wil6210_priv *wil, int ringid); | ||
| 357 | |||
| 358 | /* RX API */ | ||
| 359 | void wil_rx_handle(struct wil6210_priv *wil); | ||
| 360 | |||
| 361 | int wil_iftype_nl2wmi(enum nl80211_iftype type); | ||
| 362 | |||
| 363 | #endif /* __WIL6210_H__ */ | ||
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c new file mode 100644 index 000000000000..12915f6e7617 --- /dev/null +++ b/drivers/net/wireless/ath/wil6210/wmi.c | |||
| @@ -0,0 +1,975 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012 Qualcomm Atheros, Inc. | ||
| 3 | * | ||
| 4 | * Permission to use, copy, modify, and/or distribute this software for any | ||
| 5 | * purpose with or without fee is hereby granted, provided that the above | ||
| 6 | * copyright notice and this permission notice appear in all copies. | ||
| 7 | * | ||
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <linux/pci.h> | ||
| 18 | #include <linux/io.h> | ||
| 19 | #include <linux/list.h> | ||
| 20 | #include <linux/etherdevice.h> | ||
| 21 | |||
| 22 | #include "wil6210.h" | ||
| 23 | #include "wmi.h" | ||
| 24 | |||
| 25 | /** | ||
| 26 | * WMI event receiving - theory of operations | ||
| 27 | * | ||
| 28 | * When firmware about to report WMI event, it fills memory area | ||
| 29 | * in the mailbox and raises misc. IRQ. Thread interrupt handler invoked for | ||
| 30 | * the misc IRQ, function @wmi_recv_cmd called by thread IRQ handler. | ||
| 31 | * | ||
| 32 | * @wmi_recv_cmd reads event, allocates memory chunk and attaches it to the | ||
| 33 | * event list @wil->pending_wmi_ev. Then, work queue @wil->wmi_wq wakes up | ||
| 34 | * and handles events within the @wmi_event_worker. Every event get detached | ||
| 35 | * from list, processed and deleted. | ||
| 36 | * | ||
| 37 | * Purpose for this mechanism is to release IRQ thread; otherwise, | ||
| 38 | * if WMI event handling involves another WMI command flow, this 2-nd flow | ||
| 39 | * won't be completed because of blocked IRQ thread. | ||
| 40 | */ | ||
| 41 | |||
| 42 | /** | ||
| 43 | * Addressing - theory of operations | ||
| 44 | * | ||
| 45 | * There are several buses present on the WIL6210 card. | ||
| 46 | * Same memory areas are visible at different address on | ||
| 47 | * the different busses. There are 3 main bus masters: | ||
| 48 | * - MAC CPU (ucode) | ||
| 49 | * - User CPU (firmware) | ||
| 50 | * - AHB (host) | ||
| 51 | * | ||
| 52 | * On the PCI bus, there is one BAR (BAR0) of 2Mb size, exposing | ||
| 53 | * AHB addresses starting from 0x880000 | ||
| 54 | * | ||
| 55 | * Internally, firmware uses addresses that allows faster access but | ||
| 56 | * are invisible from the host. To read from these addresses, alternative | ||
| 57 | * AHB address must be used. | ||
| 58 | * | ||
| 59 | * Memory mapping | ||
| 60 | * Linker address PCI/Host address | ||
| 61 | * 0x880000 .. 0xa80000 2Mb BAR0 | ||
| 62 | * 0x800000 .. 0x807000 0x900000 .. 0x907000 28k DCCM | ||
| 63 | * 0x840000 .. 0x857000 0x908000 .. 0x91f000 92k PERIPH | ||
| 64 | */ | ||
| 65 | |||
| 66 | /** | ||
| 67 | * @fw_mapping provides memory remapping table | ||
| 68 | */ | ||
| 69 | static const struct { | ||
| 70 | u32 from; /* linker address - from, inclusive */ | ||
| 71 | u32 to; /* linker address - to, exclusive */ | ||
| 72 | u32 host; /* PCI/Host address - BAR0 + 0x880000 */ | ||
| 73 | } fw_mapping[] = { | ||
| 74 | {0x000000, 0x040000, 0x8c0000}, /* FW code RAM 256k */ | ||
| 75 | {0x800000, 0x808000, 0x900000}, /* FW data RAM 32k */ | ||
| 76 | {0x840000, 0x860000, 0x908000}, /* peripheral data RAM 128k/96k used */ | ||
| 77 | {0x880000, 0x88a000, 0x880000}, /* various RGF */ | ||
| 78 | {0x8c0000, 0x932000, 0x8c0000}, /* trivial mapping for upper area */ | ||
| 79 | /* | ||
| 80 | * 920000..930000 ucode code RAM | ||
| 81 | * 930000..932000 ucode data RAM | ||
| 82 | */ | ||
| 83 | }; | ||
| 84 | |||
| 85 | /** | ||
| 86 | * return AHB address for given firmware/ucode internal (linker) address | ||
| 87 | * @x - internal address | ||
| 88 | * If address have no valid AHB mapping, return 0 | ||
| 89 | */ | ||
| 90 | static u32 wmi_addr_remap(u32 x) | ||
| 91 | { | ||
| 92 | uint i; | ||
| 93 | |||
| 94 | for (i = 0; i < ARRAY_SIZE(fw_mapping); i++) { | ||
| 95 | if ((x >= fw_mapping[i].from) && (x < fw_mapping[i].to)) | ||
| 96 | return x + fw_mapping[i].host - fw_mapping[i].from; | ||
| 97 | } | ||
| 98 | |||
| 99 | return 0; | ||
| 100 | } | ||
| 101 | |||
| 102 | /** | ||
| 103 | * Check address validity for WMI buffer; remap if needed | ||
| 104 | * @ptr - internal (linker) fw/ucode address | ||
| 105 | * | ||
| 106 | * Valid buffer should be DWORD aligned | ||
| 107 | * | ||
| 108 | * return address for accessing buffer from the host; | ||
| 109 | * if buffer is not valid, return NULL. | ||
| 110 | */ | ||
| 111 | void __iomem *wmi_buffer(struct wil6210_priv *wil, __le32 ptr_) | ||
| 112 | { | ||
| 113 | u32 off; | ||
| 114 | u32 ptr = le32_to_cpu(ptr_); | ||
| 115 | |||
| 116 | if (ptr % 4) | ||
| 117 | return NULL; | ||
| 118 | |||
| 119 | ptr = wmi_addr_remap(ptr); | ||
| 120 | if (ptr < WIL6210_FW_HOST_OFF) | ||
| 121 | return NULL; | ||
| 122 | |||
| 123 | off = HOSTADDR(ptr); | ||
| 124 | if (off > WIL6210_MEM_SIZE - 4) | ||
| 125 | return NULL; | ||
| 126 | |||
| 127 | return wil->csr + off; | ||
| 128 | } | ||
| 129 | |||
| 130 | /** | ||
| 131 | * Check address validity | ||
| 132 | */ | ||
| 133 | void __iomem *wmi_addr(struct wil6210_priv *wil, u32 ptr) | ||
| 134 | { | ||
| 135 | u32 off; | ||
| 136 | |||
| 137 | if (ptr % 4) | ||
| 138 | return NULL; | ||
| 139 | |||
| 140 | if (ptr < WIL6210_FW_HOST_OFF) | ||
| 141 | return NULL; | ||
| 142 | |||
| 143 | off = HOSTADDR(ptr); | ||
| 144 | if (off > WIL6210_MEM_SIZE - 4) | ||
| 145 | return NULL; | ||
| 146 | |||
| 147 | return wil->csr + off; | ||
| 148 | } | ||
| 149 | |||
| 150 | int wmi_read_hdr(struct wil6210_priv *wil, __le32 ptr, | ||
| 151 | struct wil6210_mbox_hdr *hdr) | ||
| 152 | { | ||
| 153 | void __iomem *src = wmi_buffer(wil, ptr); | ||
| 154 | if (!src) | ||
| 155 | return -EINVAL; | ||
| 156 | |||
| 157 | wil_memcpy_fromio_32(hdr, src, sizeof(*hdr)); | ||
| 158 | |||
| 159 | return 0; | ||
| 160 | } | ||
| 161 | |||
| 162 | static int __wmi_send(struct wil6210_priv *wil, u16 cmdid, void *buf, u16 len) | ||
| 163 | { | ||
| 164 | struct { | ||
| 165 | struct wil6210_mbox_hdr hdr; | ||
| 166 | struct wil6210_mbox_hdr_wmi wmi; | ||
| 167 | } __packed cmd = { | ||
| 168 | .hdr = { | ||
| 169 | .type = WIL_MBOX_HDR_TYPE_WMI, | ||
| 170 | .flags = 0, | ||
| 171 | .len = cpu_to_le16(sizeof(cmd.wmi) + len), | ||
| 172 | }, | ||
| 173 | .wmi = { | ||
| 174 | .id = cpu_to_le16(cmdid), | ||
| 175 | .info1 = 0, | ||
| 176 | }, | ||
| 177 | }; | ||
| 178 | struct wil6210_mbox_ring *r = &wil->mbox_ctl.tx; | ||
| 179 | struct wil6210_mbox_ring_desc d_head; | ||
| 180 | u32 next_head; | ||
| 181 | void __iomem *dst; | ||
| 182 | void __iomem *head = wmi_addr(wil, r->head); | ||
| 183 | uint retry; | ||
| 184 | |||
| 185 | if (sizeof(cmd) + len > r->entry_size) { | ||
| 186 | wil_err(wil, "WMI size too large: %d bytes, max is %d\n", | ||
| 187 | (int)(sizeof(cmd) + len), r->entry_size); | ||
| 188 | return -ERANGE; | ||
| 189 | |||
| 190 | } | ||
| 191 | |||
| 192 | might_sleep(); | ||
| 193 | |||
| 194 | if (!test_bit(wil_status_fwready, &wil->status)) { | ||
| 195 | wil_err(wil, "FW not ready\n"); | ||
| 196 | return -EAGAIN; | ||
| 197 | } | ||
| 198 | |||
| 199 | if (!head) { | ||
| 200 | wil_err(wil, "WMI head is garbage: 0x%08x\n", r->head); | ||
| 201 | return -EINVAL; | ||
| 202 | } | ||
| 203 | /* read Tx head till it is not busy */ | ||
| 204 | for (retry = 5; retry > 0; retry--) { | ||
| 205 | wil_memcpy_fromio_32(&d_head, head, sizeof(d_head)); | ||
| 206 | if (d_head.sync == 0) | ||
| 207 | break; | ||
| 208 | msleep(20); | ||
| 209 | } | ||
| 210 | if (d_head.sync != 0) { | ||
| 211 | wil_err(wil, "WMI head busy\n"); | ||
| 212 | return -EBUSY; | ||
| 213 | } | ||
| 214 | /* next head */ | ||
| 215 | next_head = r->base + ((r->head - r->base + sizeof(d_head)) % r->size); | ||
| 216 | wil_dbg_WMI(wil, "Head 0x%08x -> 0x%08x\n", r->head, next_head); | ||
| 217 | /* wait till FW finish with previous command */ | ||
| 218 | for (retry = 5; retry > 0; retry--) { | ||
| 219 | r->tail = ioread32(wil->csr + HOST_MBOX + | ||
| 220 | offsetof(struct wil6210_mbox_ctl, tx.tail)); | ||
| 221 | if (next_head != r->tail) | ||
| 222 | break; | ||
| 223 | msleep(20); | ||
| 224 | } | ||
| 225 | if (next_head == r->tail) { | ||
| 226 | wil_err(wil, "WMI ring full\n"); | ||
| 227 | return -EBUSY; | ||
| 228 | } | ||
| 229 | dst = wmi_buffer(wil, d_head.addr); | ||
| 230 | if (!dst) { | ||
| 231 | wil_err(wil, "invalid WMI buffer: 0x%08x\n", | ||
| 232 | le32_to_cpu(d_head.addr)); | ||
| 233 | return -EINVAL; | ||
| 234 | } | ||
| 235 | cmd.hdr.seq = cpu_to_le16(++wil->wmi_seq); | ||
| 236 | /* set command */ | ||
| 237 | wil_dbg_WMI(wil, "WMI command 0x%04x [%d]\n", cmdid, len); | ||
| 238 | wil_hex_dump_WMI("Cmd ", DUMP_PREFIX_OFFSET, 16, 1, &cmd, | ||
| 239 | sizeof(cmd), true); | ||
| 240 | wil_hex_dump_WMI("cmd ", DUMP_PREFIX_OFFSET, 16, 1, buf, | ||
| 241 | len, true); | ||
| 242 | wil_memcpy_toio_32(dst, &cmd, sizeof(cmd)); | ||
| 243 | wil_memcpy_toio_32(dst + sizeof(cmd), buf, len); | ||
| 244 | /* mark entry as full */ | ||
| 245 | iowrite32(1, wil->csr + HOSTADDR(r->head) + | ||
| 246 | offsetof(struct wil6210_mbox_ring_desc, sync)); | ||
| 247 | /* advance next ptr */ | ||
| 248 | iowrite32(r->head = next_head, wil->csr + HOST_MBOX + | ||
| 249 | offsetof(struct wil6210_mbox_ctl, tx.head)); | ||
| 250 | |||
| 251 | /* interrupt to FW */ | ||
| 252 | iowrite32(SW_INT_MBOX, wil->csr + HOST_SW_INT); | ||
| 253 | |||
| 254 | return 0; | ||
| 255 | } | ||
| 256 | |||
| 257 | int wmi_send(struct wil6210_priv *wil, u16 cmdid, void *buf, u16 len) | ||
| 258 | { | ||
| 259 | int rc; | ||
| 260 | |||
| 261 | mutex_lock(&wil->wmi_mutex); | ||
| 262 | rc = __wmi_send(wil, cmdid, buf, len); | ||
| 263 | mutex_unlock(&wil->wmi_mutex); | ||
| 264 | |||
| 265 | return rc; | ||
| 266 | } | ||
| 267 | |||
| 268 | /*=== Event handlers ===*/ | ||
| 269 | static void wmi_evt_ready(struct wil6210_priv *wil, int id, void *d, int len) | ||
| 270 | { | ||
| 271 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 272 | struct wireless_dev *wdev = wil->wdev; | ||
| 273 | struct wmi_ready_event *evt = d; | ||
| 274 | u32 ver = le32_to_cpu(evt->sw_version); | ||
| 275 | |||
| 276 | wil_dbg_WMI(wil, "FW ver. %d; MAC %pM\n", ver, evt->mac); | ||
| 277 | |||
| 278 | if (!is_valid_ether_addr(ndev->dev_addr)) { | ||
| 279 | memcpy(ndev->dev_addr, evt->mac, ETH_ALEN); | ||
| 280 | memcpy(ndev->perm_addr, evt->mac, ETH_ALEN); | ||
| 281 | } | ||
| 282 | snprintf(wdev->wiphy->fw_version, sizeof(wdev->wiphy->fw_version), | ||
| 283 | "%d", ver); | ||
| 284 | } | ||
| 285 | |||
| 286 | static void wmi_evt_fw_ready(struct wil6210_priv *wil, int id, void *d, | ||
| 287 | int len) | ||
| 288 | { | ||
| 289 | wil_dbg_WMI(wil, "WMI: FW ready\n"); | ||
| 290 | |||
| 291 | set_bit(wil_status_fwready, &wil->status); | ||
| 292 | /* reuse wmi_ready for the firmware ready indication */ | ||
| 293 | complete(&wil->wmi_ready); | ||
| 294 | } | ||
| 295 | |||
| 296 | static void wmi_evt_rx_mgmt(struct wil6210_priv *wil, int id, void *d, int len) | ||
| 297 | { | ||
| 298 | struct wmi_rx_mgmt_packet_event *data = d; | ||
| 299 | struct wiphy *wiphy = wil_to_wiphy(wil); | ||
| 300 | struct ieee80211_mgmt *rx_mgmt_frame = | ||
| 301 | (struct ieee80211_mgmt *)data->payload; | ||
| 302 | int ch_no = data->info.channel+1; | ||
| 303 | u32 freq = ieee80211_channel_to_frequency(ch_no, | ||
| 304 | IEEE80211_BAND_60GHZ); | ||
| 305 | struct ieee80211_channel *channel = ieee80211_get_channel(wiphy, freq); | ||
| 306 | /* TODO convert LE to CPU */ | ||
| 307 | s32 signal = 0; /* TODO */ | ||
| 308 | __le16 fc = rx_mgmt_frame->frame_control; | ||
| 309 | u32 d_len = le32_to_cpu(data->info.len); | ||
| 310 | u16 d_status = le16_to_cpu(data->info.status); | ||
| 311 | |||
| 312 | wil_dbg_WMI(wil, "MGMT: channel %d MCS %d SNR %d\n", | ||
| 313 | data->info.channel, data->info.mcs, data->info.snr); | ||
| 314 | wil_dbg_WMI(wil, "status 0x%04x len %d stype %04x\n", d_status, d_len, | ||
| 315 | le16_to_cpu(data->info.stype)); | ||
| 316 | wil_dbg_WMI(wil, "qid %d mid %d cid %d\n", | ||
| 317 | data->info.qid, data->info.mid, data->info.cid); | ||
| 318 | |||
| 319 | if (!channel) { | ||
| 320 | wil_err(wil, "Frame on unsupported channel\n"); | ||
| 321 | return; | ||
| 322 | } | ||
| 323 | |||
| 324 | if (ieee80211_is_beacon(fc) || ieee80211_is_probe_resp(fc)) { | ||
| 325 | struct cfg80211_bss *bss; | ||
| 326 | u64 tsf = le64_to_cpu(rx_mgmt_frame->u.beacon.timestamp); | ||
| 327 | u16 cap = le16_to_cpu(rx_mgmt_frame->u.beacon.capab_info); | ||
| 328 | u16 bi = le16_to_cpu(rx_mgmt_frame->u.beacon.beacon_int); | ||
| 329 | const u8 *ie_buf = rx_mgmt_frame->u.beacon.variable; | ||
| 330 | size_t ie_len = d_len - offsetof(struct ieee80211_mgmt, | ||
| 331 | u.beacon.variable); | ||
| 332 | wil_dbg_WMI(wil, "Capability info : 0x%04x\n", cap); | ||
| 333 | |||
| 334 | bss = cfg80211_inform_bss(wiphy, channel, rx_mgmt_frame->bssid, | ||
| 335 | tsf, cap, bi, ie_buf, ie_len, | ||
| 336 | signal, GFP_KERNEL); | ||
| 337 | if (bss) { | ||
| 338 | wil_dbg_WMI(wil, "Added BSS %pM\n", | ||
| 339 | rx_mgmt_frame->bssid); | ||
| 340 | cfg80211_put_bss(bss); | ||
| 341 | } else { | ||
| 342 | wil_err(wil, "cfg80211_inform_bss() failed\n"); | ||
| 343 | } | ||
| 344 | } | ||
| 345 | } | ||
| 346 | |||
| 347 | static void wmi_evt_scan_complete(struct wil6210_priv *wil, int id, | ||
| 348 | void *d, int len) | ||
| 349 | { | ||
| 350 | if (wil->scan_request) { | ||
| 351 | struct wmi_scan_complete_event *data = d; | ||
| 352 | bool aborted = (data->status != 0); | ||
| 353 | |||
| 354 | wil_dbg_WMI(wil, "SCAN_COMPLETE(0x%08x)\n", data->status); | ||
| 355 | cfg80211_scan_done(wil->scan_request, aborted); | ||
| 356 | wil->scan_request = NULL; | ||
| 357 | } else { | ||
| 358 | wil_err(wil, "SCAN_COMPLETE while not scanning\n"); | ||
| 359 | } | ||
| 360 | } | ||
| 361 | |||
| 362 | static void wmi_evt_connect(struct wil6210_priv *wil, int id, void *d, int len) | ||
| 363 | { | ||
| 364 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 365 | struct wireless_dev *wdev = wil->wdev; | ||
| 366 | struct wmi_connect_event *evt = d; | ||
| 367 | int ch; /* channel number */ | ||
| 368 | struct station_info sinfo; | ||
| 369 | u8 *assoc_req_ie, *assoc_resp_ie; | ||
| 370 | size_t assoc_req_ielen, assoc_resp_ielen; | ||
| 371 | /* capinfo(u16) + listen_interval(u16) + IEs */ | ||
| 372 | const size_t assoc_req_ie_offset = sizeof(u16) * 2; | ||
| 373 | /* capinfo(u16) + status_code(u16) + associd(u16) + IEs */ | ||
| 374 | const size_t assoc_resp_ie_offset = sizeof(u16) * 3; | ||
| 375 | |||
| 376 | if (len < sizeof(*evt)) { | ||
| 377 | wil_err(wil, "Connect event too short : %d bytes\n", len); | ||
| 378 | return; | ||
| 379 | } | ||
| 380 | if (len != sizeof(*evt) + evt->beacon_ie_len + evt->assoc_req_len + | ||
| 381 | evt->assoc_resp_len) { | ||
| 382 | wil_err(wil, | ||
| 383 | "Connect event corrupted : %d != %d + %d + %d + %d\n", | ||
| 384 | len, (int)sizeof(*evt), evt->beacon_ie_len, | ||
| 385 | evt->assoc_req_len, evt->assoc_resp_len); | ||
| 386 | return; | ||
| 387 | } | ||
| 388 | ch = evt->channel + 1; | ||
| 389 | wil_dbg_WMI(wil, "Connect %pM channel [%d] cid %d\n", | ||
| 390 | evt->bssid, ch, evt->cid); | ||
| 391 | wil_hex_dump_WMI("connect AI : ", DUMP_PREFIX_OFFSET, 16, 1, | ||
| 392 | evt->assoc_info, len - sizeof(*evt), true); | ||
| 393 | |||
| 394 | /* figure out IE's */ | ||
| 395 | assoc_req_ie = &evt->assoc_info[evt->beacon_ie_len + | ||
| 396 | assoc_req_ie_offset]; | ||
| 397 | assoc_req_ielen = evt->assoc_req_len - assoc_req_ie_offset; | ||
| 398 | if (evt->assoc_req_len <= assoc_req_ie_offset) { | ||
| 399 | assoc_req_ie = NULL; | ||
| 400 | assoc_req_ielen = 0; | ||
| 401 | } | ||
| 402 | |||
| 403 | assoc_resp_ie = &evt->assoc_info[evt->beacon_ie_len + | ||
| 404 | evt->assoc_req_len + | ||
| 405 | assoc_resp_ie_offset]; | ||
| 406 | assoc_resp_ielen = evt->assoc_resp_len - assoc_resp_ie_offset; | ||
| 407 | if (evt->assoc_resp_len <= assoc_resp_ie_offset) { | ||
| 408 | assoc_resp_ie = NULL; | ||
| 409 | assoc_resp_ielen = 0; | ||
| 410 | } | ||
| 411 | |||
| 412 | if ((wdev->iftype == NL80211_IFTYPE_STATION) || | ||
| 413 | (wdev->iftype == NL80211_IFTYPE_P2P_CLIENT)) { | ||
| 414 | if (wdev->sme_state != CFG80211_SME_CONNECTING) { | ||
| 415 | wil_err(wil, "Not in connecting state\n"); | ||
| 416 | return; | ||
| 417 | } | ||
| 418 | del_timer_sync(&wil->connect_timer); | ||
| 419 | cfg80211_connect_result(ndev, evt->bssid, | ||
| 420 | assoc_req_ie, assoc_req_ielen, | ||
| 421 | assoc_resp_ie, assoc_resp_ielen, | ||
| 422 | WLAN_STATUS_SUCCESS, GFP_KERNEL); | ||
| 423 | |||
| 424 | } else if ((wdev->iftype == NL80211_IFTYPE_AP) || | ||
| 425 | (wdev->iftype == NL80211_IFTYPE_P2P_GO)) { | ||
| 426 | memset(&sinfo, 0, sizeof(sinfo)); | ||
| 427 | |||
| 428 | sinfo.generation = wil->sinfo_gen++; | ||
| 429 | |||
| 430 | if (assoc_req_ie) { | ||
| 431 | sinfo.assoc_req_ies = assoc_req_ie; | ||
| 432 | sinfo.assoc_req_ies_len = assoc_req_ielen; | ||
| 433 | sinfo.filled |= STATION_INFO_ASSOC_REQ_IES; | ||
| 434 | } | ||
| 435 | |||
| 436 | cfg80211_new_sta(ndev, evt->bssid, &sinfo, GFP_KERNEL); | ||
| 437 | } | ||
| 438 | set_bit(wil_status_fwconnected, &wil->status); | ||
| 439 | |||
| 440 | /* FIXME FW can transmit only ucast frames to peer */ | ||
| 441 | /* FIXME real ring_id instead of hard coded 0 */ | ||
| 442 | memcpy(wil->dst_addr[0], evt->bssid, ETH_ALEN); | ||
| 443 | |||
| 444 | wil->pending_connect_cid = evt->cid; | ||
| 445 | queue_work(wil->wmi_wq_conn, &wil->wmi_connect_worker); | ||
| 446 | } | ||
| 447 | |||
| 448 | static void wmi_evt_disconnect(struct wil6210_priv *wil, int id, | ||
| 449 | void *d, int len) | ||
| 450 | { | ||
| 451 | struct wmi_disconnect_event *evt = d; | ||
| 452 | |||
| 453 | wil_dbg_WMI(wil, "Disconnect %pM reason %d proto %d wmi\n", | ||
| 454 | evt->bssid, | ||
| 455 | evt->protocol_reason_status, evt->disconnect_reason); | ||
| 456 | |||
| 457 | wil->sinfo_gen++; | ||
| 458 | |||
| 459 | wil6210_disconnect(wil, evt->bssid); | ||
| 460 | clear_bit(wil_status_dontscan, &wil->status); | ||
| 461 | } | ||
| 462 | |||
| 463 | static void wmi_evt_notify(struct wil6210_priv *wil, int id, void *d, int len) | ||
| 464 | { | ||
| 465 | struct wmi_notify_req_done_event *evt = d; | ||
| 466 | |||
| 467 | if (len < sizeof(*evt)) { | ||
| 468 | wil_err(wil, "Short NOTIFY event\n"); | ||
| 469 | return; | ||
| 470 | } | ||
| 471 | |||
| 472 | wil->stats.tsf = le64_to_cpu(evt->tsf); | ||
| 473 | wil->stats.snr = le32_to_cpu(evt->snr_val); | ||
| 474 | wil->stats.bf_mcs = le16_to_cpu(evt->bf_mcs); | ||
| 475 | wil->stats.my_rx_sector = le16_to_cpu(evt->my_rx_sector); | ||
| 476 | wil->stats.my_tx_sector = le16_to_cpu(evt->my_tx_sector); | ||
| 477 | wil->stats.peer_rx_sector = le16_to_cpu(evt->other_rx_sector); | ||
| 478 | wil->stats.peer_tx_sector = le16_to_cpu(evt->other_tx_sector); | ||
| 479 | wil_dbg_WMI(wil, "Link status, MCS %d TSF 0x%016llx\n" | ||
| 480 | "BF status 0x%08x SNR 0x%08x\n" | ||
| 481 | "Tx Tpt %d goodput %d Rx goodput %d\n" | ||
| 482 | "Sectors(rx:tx) my %d:%d peer %d:%d\n", | ||
| 483 | wil->stats.bf_mcs, wil->stats.tsf, evt->status, | ||
| 484 | wil->stats.snr, le32_to_cpu(evt->tx_tpt), | ||
| 485 | le32_to_cpu(evt->tx_goodput), le32_to_cpu(evt->rx_goodput), | ||
| 486 | wil->stats.my_rx_sector, wil->stats.my_tx_sector, | ||
| 487 | wil->stats.peer_rx_sector, wil->stats.peer_tx_sector); | ||
| 488 | } | ||
| 489 | |||
| 490 | /* | ||
| 491 | * Firmware reports EAPOL frame using WME event. | ||
| 492 | * Reconstruct Ethernet frame and deliver it via normal Rx | ||
| 493 | */ | ||
| 494 | static void wmi_evt_eapol_rx(struct wil6210_priv *wil, int id, | ||
| 495 | void *d, int len) | ||
| 496 | { | ||
| 497 | struct net_device *ndev = wil_to_ndev(wil); | ||
| 498 | struct wmi_eapol_rx_event *evt = d; | ||
| 499 | u16 eapol_len = le16_to_cpu(evt->eapol_len); | ||
| 500 | int sz = eapol_len + ETH_HLEN; | ||
| 501 | struct sk_buff *skb; | ||
| 502 | struct ethhdr *eth; | ||
| 503 | |||
| 504 | wil_dbg_WMI(wil, "EAPOL len %d from %pM\n", eapol_len, | ||
| 505 | evt->src_mac); | ||
| 506 | |||
| 507 | if (eapol_len > 196) { /* TODO: revisit size limit */ | ||
| 508 | wil_err(wil, "EAPOL too large\n"); | ||
| 509 | return; | ||
| 510 | } | ||
| 511 | |||
| 512 | skb = alloc_skb(sz, GFP_KERNEL); | ||
| 513 | if (!skb) { | ||
| 514 | wil_err(wil, "Failed to allocate skb\n"); | ||
| 515 | return; | ||
| 516 | } | ||
| 517 | eth = (struct ethhdr *)skb_put(skb, ETH_HLEN); | ||
| 518 | memcpy(eth->h_dest, ndev->dev_addr, ETH_ALEN); | ||
| 519 | memcpy(eth->h_source, evt->src_mac, ETH_ALEN); | ||
| 520 | eth->h_proto = cpu_to_be16(ETH_P_PAE); | ||
| 521 | memcpy(skb_put(skb, eapol_len), evt->eapol, eapol_len); | ||
| 522 | skb->protocol = eth_type_trans(skb, ndev); | ||
| 523 | if (likely(netif_rx_ni(skb) == NET_RX_SUCCESS)) { | ||
| 524 | ndev->stats.rx_packets++; | ||
| 525 | ndev->stats.rx_bytes += skb->len; | ||
| 526 | } else { | ||
| 527 | ndev->stats.rx_dropped++; | ||
| 528 | } | ||
| 529 | } | ||
| 530 | |||
| 531 | static const struct { | ||
| 532 | int eventid; | ||
| 533 | void (*handler)(struct wil6210_priv *wil, int eventid, | ||
| 534 | void *data, int data_len); | ||
| 535 | } wmi_evt_handlers[] = { | ||
| 536 | {WMI_READY_EVENTID, wmi_evt_ready}, | ||
| 537 | {WMI_FW_READY_EVENTID, wmi_evt_fw_ready}, | ||
| 538 | {WMI_RX_MGMT_PACKET_EVENTID, wmi_evt_rx_mgmt}, | ||
| 539 | {WMI_SCAN_COMPLETE_EVENTID, wmi_evt_scan_complete}, | ||
| 540 | {WMI_CONNECT_EVENTID, wmi_evt_connect}, | ||
| 541 | {WMI_DISCONNECT_EVENTID, wmi_evt_disconnect}, | ||
| 542 | {WMI_NOTIFY_REQ_DONE_EVENTID, wmi_evt_notify}, | ||
| 543 | {WMI_EAPOL_RX_EVENTID, wmi_evt_eapol_rx}, | ||
| 544 | }; | ||
| 545 | |||
| 546 | /* | ||
| 547 | * Run in IRQ context | ||
| 548 | * Extract WMI command from mailbox. Queue it to the @wil->pending_wmi_ev | ||
| 549 | * that will be eventually handled by the @wmi_event_worker in the thread | ||
| 550 | * context of thread "wil6210_wmi" | ||
| 551 | */ | ||
| 552 | void wmi_recv_cmd(struct wil6210_priv *wil) | ||
| 553 | { | ||
| 554 | struct wil6210_mbox_ring_desc d_tail; | ||
| 555 | struct wil6210_mbox_hdr hdr; | ||
| 556 | struct wil6210_mbox_ring *r = &wil->mbox_ctl.rx; | ||
| 557 | struct pending_wmi_event *evt; | ||
| 558 | u8 *cmd; | ||
| 559 | void __iomem *src; | ||
| 560 | ulong flags; | ||
| 561 | |||
| 562 | for (;;) { | ||
| 563 | u16 len; | ||
| 564 | |||
| 565 | r->head = ioread32(wil->csr + HOST_MBOX + | ||
| 566 | offsetof(struct wil6210_mbox_ctl, rx.head)); | ||
| 567 | if (r->tail == r->head) | ||
| 568 | return; | ||
| 569 | |||
| 570 | /* read cmd from tail */ | ||
| 571 | wil_memcpy_fromio_32(&d_tail, wil->csr + HOSTADDR(r->tail), | ||
| 572 | sizeof(struct wil6210_mbox_ring_desc)); | ||
| 573 | if (d_tail.sync == 0) { | ||
| 574 | wil_err(wil, "Mbox evt not owned by FW?\n"); | ||
| 575 | return; | ||
| 576 | } | ||
| 577 | |||
| 578 | if (0 != wmi_read_hdr(wil, d_tail.addr, &hdr)) { | ||
| 579 | wil_err(wil, "Mbox evt at 0x%08x?\n", | ||
| 580 | le32_to_cpu(d_tail.addr)); | ||
| 581 | return; | ||
| 582 | } | ||
| 583 | |||
| 584 | len = le16_to_cpu(hdr.len); | ||
| 585 | src = wmi_buffer(wil, d_tail.addr) + | ||
| 586 | sizeof(struct wil6210_mbox_hdr); | ||
| 587 | evt = kmalloc(ALIGN(offsetof(struct pending_wmi_event, | ||
| 588 | event.wmi) + len, 4), | ||
| 589 | GFP_KERNEL); | ||
| 590 | if (!evt) { | ||
| 591 | wil_err(wil, "kmalloc for WMI event (%d) failed\n", | ||
| 592 | len); | ||
| 593 | return; | ||
| 594 | } | ||
| 595 | evt->event.hdr = hdr; | ||
| 596 | cmd = (void *)&evt->event.wmi; | ||
| 597 | wil_memcpy_fromio_32(cmd, src, len); | ||
| 598 | /* mark entry as empty */ | ||
| 599 | iowrite32(0, wil->csr + HOSTADDR(r->tail) + | ||
| 600 | offsetof(struct wil6210_mbox_ring_desc, sync)); | ||
| 601 | /* indicate */ | ||
| 602 | wil_dbg_WMI(wil, "Mbox evt %04x %04x %04x %02x\n", | ||
| 603 | le16_to_cpu(hdr.seq), len, le16_to_cpu(hdr.type), | ||
| 604 | hdr.flags); | ||
| 605 | if ((hdr.type == WIL_MBOX_HDR_TYPE_WMI) && | ||
| 606 | (len >= sizeof(struct wil6210_mbox_hdr_wmi))) { | ||
| 607 | wil_dbg_WMI(wil, "WMI event 0x%04x\n", | ||
| 608 | evt->event.wmi.id); | ||
| 609 | } | ||
| 610 | wil_hex_dump_WMI("evt ", DUMP_PREFIX_OFFSET, 16, 1, | ||
| 611 | &evt->event.hdr, sizeof(hdr) + len, true); | ||
| 612 | |||
| 613 | /* advance tail */ | ||
| 614 | r->tail = r->base + ((r->tail - r->base + | ||
| 615 | sizeof(struct wil6210_mbox_ring_desc)) % r->size); | ||
| 616 | iowrite32(r->tail, wil->csr + HOST_MBOX + | ||
| 617 | offsetof(struct wil6210_mbox_ctl, rx.tail)); | ||
| 618 | |||
| 619 | /* add to the pending list */ | ||
| 620 | spin_lock_irqsave(&wil->wmi_ev_lock, flags); | ||
| 621 | list_add_tail(&evt->list, &wil->pending_wmi_ev); | ||
| 622 | spin_unlock_irqrestore(&wil->wmi_ev_lock, flags); | ||
| 623 | { | ||
| 624 | int q = queue_work(wil->wmi_wq, | ||
| 625 | &wil->wmi_event_worker); | ||
| 626 | wil_dbg_WMI(wil, "queue_work -> %d\n", q); | ||
| 627 | } | ||
| 628 | } | ||
| 629 | } | ||
| 630 | |||
| 631 | int wmi_call(struct wil6210_priv *wil, u16 cmdid, void *buf, u16 len, | ||
| 632 | u16 reply_id, void *reply, u8 reply_size, int to_msec) | ||
| 633 | { | ||
| 634 | int rc; | ||
| 635 | int remain; | ||
| 636 | |||
| 637 | mutex_lock(&wil->wmi_mutex); | ||
| 638 | |||
| 639 | rc = __wmi_send(wil, cmdid, buf, len); | ||
| 640 | if (rc) | ||
| 641 | goto out; | ||
| 642 | |||
| 643 | wil->reply_id = reply_id; | ||
| 644 | wil->reply_buf = reply; | ||
| 645 | wil->reply_size = reply_size; | ||
| 646 | remain = wait_for_completion_timeout(&wil->wmi_ready, | ||
| 647 | msecs_to_jiffies(to_msec)); | ||
| 648 | if (0 == remain) { | ||
| 649 | wil_err(wil, "wmi_call(0x%04x->0x%04x) timeout %d msec\n", | ||
| 650 | cmdid, reply_id, to_msec); | ||
| 651 | rc = -ETIME; | ||
| 652 | } else { | ||
| 653 | wil_dbg_WMI(wil, | ||
| 654 | "wmi_call(0x%04x->0x%04x) completed in %d msec\n", | ||
| 655 | cmdid, reply_id, | ||
| 656 | to_msec - jiffies_to_msecs(remain)); | ||
| 657 | } | ||
| 658 | wil->reply_id = 0; | ||
| 659 | wil->reply_buf = NULL; | ||
| 660 | wil->reply_size = 0; | ||
| 661 | out: | ||
| 662 | mutex_unlock(&wil->wmi_mutex); | ||
| 663 | |||
| 664 | return rc; | ||
| 665 | } | ||
| 666 | |||
| 667 | int wmi_echo(struct wil6210_priv *wil) | ||
| 668 | { | ||
| 669 | struct wmi_echo_cmd cmd = { | ||
| 670 | .value = cpu_to_le32(0x12345678), | ||
| 671 | }; | ||
| 672 | |||
| 673 | return wmi_call(wil, WMI_ECHO_CMDID, &cmd, sizeof(cmd), | ||
| 674 | WMI_ECHO_RSP_EVENTID, NULL, 0, 20); | ||
| 675 | } | ||
| 676 | |||
| 677 | int wmi_set_mac_address(struct wil6210_priv *wil, void *addr) | ||
| 678 | { | ||
| 679 | struct wmi_set_mac_address_cmd cmd; | ||
| 680 | |||
| 681 | memcpy(cmd.mac, addr, ETH_ALEN); | ||
| 682 | |||
| 683 | wil_dbg_WMI(wil, "Set MAC %pM\n", addr); | ||
| 684 | |||
| 685 | return wmi_send(wil, WMI_SET_MAC_ADDRESS_CMDID, &cmd, sizeof(cmd)); | ||
| 686 | } | ||
| 687 | |||
| 688 | int wmi_set_bcon(struct wil6210_priv *wil, int bi, u8 wmi_nettype) | ||
| 689 | { | ||
| 690 | struct wmi_bcon_ctrl_cmd cmd = { | ||
| 691 | .bcon_interval = cpu_to_le16(bi), | ||
| 692 | .network_type = wmi_nettype, | ||
| 693 | .disable_sec_offload = 1, | ||
| 694 | }; | ||
| 695 | |||
| 696 | if (!wil->secure_pcp) | ||
| 697 | cmd.disable_sec = 1; | ||
| 698 | |||
| 699 | return wmi_send(wil, WMI_BCON_CTRL_CMDID, &cmd, sizeof(cmd)); | ||
| 700 | } | ||
| 701 | |||
| 702 | int wmi_set_ssid(struct wil6210_priv *wil, u8 ssid_len, const void *ssid) | ||
| 703 | { | ||
| 704 | struct wmi_set_ssid_cmd cmd = { | ||
| 705 | .ssid_len = cpu_to_le32(ssid_len), | ||
| 706 | }; | ||
| 707 | |||
| 708 | if (ssid_len > sizeof(cmd.ssid)) | ||
| 709 | return -EINVAL; | ||
| 710 | |||
| 711 | memcpy(cmd.ssid, ssid, ssid_len); | ||
| 712 | |||
| 713 | return wmi_send(wil, WMI_SET_SSID_CMDID, &cmd, sizeof(cmd)); | ||
| 714 | } | ||
| 715 | |||
| 716 | int wmi_get_ssid(struct wil6210_priv *wil, u8 *ssid_len, void *ssid) | ||
| 717 | { | ||
| 718 | int rc; | ||
| 719 | struct { | ||
| 720 | struct wil6210_mbox_hdr_wmi wmi; | ||
| 721 | struct wmi_set_ssid_cmd cmd; | ||
| 722 | } __packed reply; | ||
| 723 | int len; /* reply.cmd.ssid_len in CPU order */ | ||
| 724 | |||
| 725 | rc = wmi_call(wil, WMI_GET_SSID_CMDID, NULL, 0, WMI_GET_SSID_EVENTID, | ||
| 726 | &reply, sizeof(reply), 20); | ||
| 727 | if (rc) | ||
| 728 | return rc; | ||
| 729 | |||
| 730 | len = le32_to_cpu(reply.cmd.ssid_len); | ||
| 731 | if (len > sizeof(reply.cmd.ssid)) | ||
| 732 | return -EINVAL; | ||
| 733 | |||
| 734 | *ssid_len = len; | ||
| 735 | memcpy(ssid, reply.cmd.ssid, len); | ||
| 736 | |||
| 737 | return 0; | ||
| 738 | } | ||
| 739 | |||
| 740 | int wmi_set_channel(struct wil6210_priv *wil, int channel) | ||
| 741 | { | ||
| 742 | struct wmi_set_pcp_channel_cmd cmd = { | ||
| 743 | .channel = channel - 1, | ||
| 744 | }; | ||
| 745 | |||
| 746 | return wmi_send(wil, WMI_SET_PCP_CHANNEL_CMDID, &cmd, sizeof(cmd)); | ||
| 747 | } | ||
| 748 | |||
| 749 | int wmi_get_channel(struct wil6210_priv *wil, int *channel) | ||
| 750 | { | ||
| 751 | int rc; | ||
| 752 | struct { | ||
| 753 | struct wil6210_mbox_hdr_wmi wmi; | ||
| 754 | struct wmi_set_pcp_channel_cmd cmd; | ||
| 755 | } __packed reply; | ||
| 756 | |||
| 757 | rc = wmi_call(wil, WMI_GET_PCP_CHANNEL_CMDID, NULL, 0, | ||
| 758 | WMI_GET_PCP_CHANNEL_EVENTID, &reply, sizeof(reply), 20); | ||
| 759 | if (rc) | ||
| 760 | return rc; | ||
| 761 | |||
| 762 | if (reply.cmd.channel > 3) | ||
| 763 | return -EINVAL; | ||
| 764 | |||
| 765 | *channel = reply.cmd.channel + 1; | ||
| 766 | |||
| 767 | return 0; | ||
| 768 | } | ||
| 769 | |||
| 770 | int wmi_tx_eapol(struct wil6210_priv *wil, struct sk_buff *skb) | ||
| 771 | { | ||
| 772 | struct wmi_eapol_tx_cmd *cmd; | ||
| 773 | struct ethhdr *eth; | ||
| 774 | u16 eapol_len = skb->len - ETH_HLEN; | ||
| 775 | void *eapol = skb->data + ETH_HLEN; | ||
| 776 | uint i; | ||
| 777 | int rc; | ||
| 778 | |||
| 779 | skb_set_mac_header(skb, 0); | ||
| 780 | eth = eth_hdr(skb); | ||
| 781 | wil_dbg_WMI(wil, "EAPOL %d bytes to %pM\n", eapol_len, eth->h_dest); | ||
| 782 | for (i = 0; i < ARRAY_SIZE(wil->vring_tx); i++) { | ||
| 783 | if (memcmp(wil->dst_addr[i], eth->h_dest, ETH_ALEN) == 0) | ||
| 784 | goto found_dest; | ||
| 785 | } | ||
| 786 | |||
| 787 | return -EINVAL; | ||
| 788 | |||
| 789 | found_dest: | ||
| 790 | /* find out eapol data & len */ | ||
| 791 | cmd = kzalloc(sizeof(*cmd) + eapol_len, GFP_KERNEL); | ||
| 792 | if (!cmd) | ||
| 793 | return -EINVAL; | ||
| 794 | |||
| 795 | memcpy(cmd->dst_mac, eth->h_dest, ETH_ALEN); | ||
| 796 | cmd->eapol_len = cpu_to_le16(eapol_len); | ||
| 797 | memcpy(cmd->eapol, eapol, eapol_len); | ||
| 798 | rc = wmi_send(wil, WMI_EAPOL_TX_CMDID, cmd, sizeof(*cmd) + eapol_len); | ||
| 799 | kfree(cmd); | ||
| 800 | |||
| 801 | return rc; | ||
| 802 | } | ||
| 803 | |||
| 804 | int wmi_del_cipher_key(struct wil6210_priv *wil, u8 key_index, | ||
| 805 | const void *mac_addr) | ||
| 806 | { | ||
| 807 | struct wmi_delete_cipher_key_cmd cmd = { | ||
| 808 | .key_index = key_index, | ||
| 809 | }; | ||
| 810 | |||
| 811 | if (mac_addr) | ||
| 812 | memcpy(cmd.mac, mac_addr, WMI_MAC_LEN); | ||
| 813 | |||
| 814 | return wmi_send(wil, WMI_DELETE_CIPHER_KEY_CMDID, &cmd, sizeof(cmd)); | ||
| 815 | } | ||
| 816 | |||
| 817 | int wmi_add_cipher_key(struct wil6210_priv *wil, u8 key_index, | ||
| 818 | const void *mac_addr, int key_len, const void *key) | ||
| 819 | { | ||
| 820 | struct wmi_add_cipher_key_cmd cmd = { | ||
| 821 | .key_index = key_index, | ||
| 822 | .key_usage = WMI_KEY_USE_PAIRWISE, | ||
| 823 | .key_len = key_len, | ||
| 824 | }; | ||
| 825 | |||
| 826 | if (!key || (key_len > sizeof(cmd.key))) | ||
| 827 | return -EINVAL; | ||
| 828 | |||
| 829 | memcpy(cmd.key, key, key_len); | ||
| 830 | if (mac_addr) | ||
| 831 | memcpy(cmd.mac, mac_addr, WMI_MAC_LEN); | ||
| 832 | |||
| 833 | return wmi_send(wil, WMI_ADD_CIPHER_KEY_CMDID, &cmd, sizeof(cmd)); | ||
| 834 | } | ||
| 835 | |||
| 836 | int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie) | ||
| 837 | { | ||
| 838 | int rc; | ||
| 839 | u16 len = sizeof(struct wmi_set_appie_cmd) + ie_len; | ||
| 840 | struct wmi_set_appie_cmd *cmd = kzalloc(len, GFP_KERNEL); | ||
| 841 | if (!cmd) { | ||
| 842 | wil_err(wil, "kmalloc(%d) failed\n", len); | ||
| 843 | return -ENOMEM; | ||
| 844 | } | ||
| 845 | |||
| 846 | cmd->mgmt_frm_type = type; | ||
| 847 | /* BUG: FW API define ieLen as u8. Will fix FW */ | ||
| 848 | cmd->ie_len = cpu_to_le16(ie_len); | ||
| 849 | memcpy(cmd->ie_info, ie, ie_len); | ||
| 850 | rc = wmi_send(wil, WMI_SET_APPIE_CMDID, &cmd, len); | ||
| 851 | kfree(cmd); | ||
| 852 | |||
| 853 | return rc; | ||
| 854 | } | ||
| 855 | |||
| 856 | void wmi_event_flush(struct wil6210_priv *wil) | ||
| 857 | { | ||
| 858 | struct pending_wmi_event *evt, *t; | ||
| 859 | |||
| 860 | wil_dbg_WMI(wil, "%s()\n", __func__); | ||
| 861 | |||
| 862 | list_for_each_entry_safe(evt, t, &wil->pending_wmi_ev, list) { | ||
| 863 | list_del(&evt->list); | ||
| 864 | kfree(evt); | ||
| 865 | } | ||
| 866 | } | ||
| 867 | |||
| 868 | static bool wmi_evt_call_handler(struct wil6210_priv *wil, int id, | ||
| 869 | void *d, int len) | ||
| 870 | { | ||
| 871 | uint i; | ||
| 872 | |||
| 873 | for (i = 0; i < ARRAY_SIZE(wmi_evt_handlers); i++) { | ||
| 874 | if (wmi_evt_handlers[i].eventid == id) { | ||
| 875 | wmi_evt_handlers[i].handler(wil, id, d, len); | ||
| 876 | return true; | ||
| 877 | } | ||
| 878 | } | ||
| 879 | |||
| 880 | return false; | ||
| 881 | } | ||
| 882 | |||
| 883 | static void wmi_event_handle(struct wil6210_priv *wil, | ||
| 884 | struct wil6210_mbox_hdr *hdr) | ||
| 885 | { | ||
| 886 | u16 len = le16_to_cpu(hdr->len); | ||
| 887 | |||
| 888 | if ((hdr->type == WIL_MBOX_HDR_TYPE_WMI) && | ||
| 889 | (len >= sizeof(struct wil6210_mbox_hdr_wmi))) { | ||
| 890 | struct wil6210_mbox_hdr_wmi *wmi = (void *)(&hdr[1]); | ||
| 891 | void *evt_data = (void *)(&wmi[1]); | ||
| 892 | u16 id = le16_to_cpu(wmi->id); | ||
| 893 | /* check if someone waits for this event */ | ||
| 894 | if (wil->reply_id && wil->reply_id == id) { | ||
| 895 | if (wil->reply_buf) { | ||
| 896 | memcpy(wil->reply_buf, wmi, | ||
| 897 | min(len, wil->reply_size)); | ||
| 898 | } else { | ||
| 899 | wmi_evt_call_handler(wil, id, evt_data, | ||
| 900 | len - sizeof(*wmi)); | ||
| 901 | } | ||
| 902 | wil_dbg_WMI(wil, "Complete WMI 0x%04x\n", id); | ||
| 903 | complete(&wil->wmi_ready); | ||
| 904 | return; | ||
| 905 | } | ||
| 906 | /* unsolicited event */ | ||
| 907 | /* search for handler */ | ||
| 908 | if (!wmi_evt_call_handler(wil, id, evt_data, | ||
| 909 | len - sizeof(*wmi))) { | ||
| 910 | wil_err(wil, "Unhandled event 0x%04x\n", id); | ||
| 911 | } | ||
| 912 | } else { | ||
| 913 | wil_err(wil, "Unknown event type\n"); | ||
| 914 | print_hex_dump(KERN_ERR, "evt?? ", DUMP_PREFIX_OFFSET, 16, 1, | ||
| 915 | hdr, sizeof(*hdr) + len, true); | ||
| 916 | } | ||
| 917 | } | ||
| 918 | |||
| 919 | /* | ||
| 920 | * Retrieve next WMI event from the pending list | ||
| 921 | */ | ||
| 922 | static struct list_head *next_wmi_ev(struct wil6210_priv *wil) | ||
| 923 | { | ||
| 924 | ulong flags; | ||
| 925 | struct list_head *ret = NULL; | ||
| 926 | |||
| 927 | spin_lock_irqsave(&wil->wmi_ev_lock, flags); | ||
| 928 | |||
| 929 | if (!list_empty(&wil->pending_wmi_ev)) { | ||
| 930 | ret = wil->pending_wmi_ev.next; | ||
| 931 | list_del(ret); | ||
| 932 | } | ||
| 933 | |||
| 934 | spin_unlock_irqrestore(&wil->wmi_ev_lock, flags); | ||
| 935 | |||
| 936 | return ret; | ||
| 937 | } | ||
| 938 | |||
| 939 | /* | ||
| 940 | * Handler for the WMI events | ||
| 941 | */ | ||
| 942 | void wmi_event_worker(struct work_struct *work) | ||
| 943 | { | ||
| 944 | struct wil6210_priv *wil = container_of(work, struct wil6210_priv, | ||
| 945 | wmi_event_worker); | ||
| 946 | struct pending_wmi_event *evt; | ||
| 947 | struct list_head *lh; | ||
| 948 | |||
| 949 | while ((lh = next_wmi_ev(wil)) != NULL) { | ||
| 950 | evt = list_entry(lh, struct pending_wmi_event, list); | ||
| 951 | wmi_event_handle(wil, &evt->event.hdr); | ||
| 952 | kfree(evt); | ||
| 953 | } | ||
| 954 | } | ||
| 955 | |||
| 956 | void wmi_connect_worker(struct work_struct *work) | ||
| 957 | { | ||
| 958 | int rc; | ||
| 959 | struct wil6210_priv *wil = container_of(work, struct wil6210_priv, | ||
| 960 | wmi_connect_worker); | ||
| 961 | |||
| 962 | if (wil->pending_connect_cid < 0) { | ||
| 963 | wil_err(wil, "No connection pending\n"); | ||
| 964 | return; | ||
| 965 | } | ||
| 966 | |||
| 967 | wil_dbg_WMI(wil, "Configure for connection CID %d\n", | ||
| 968 | wil->pending_connect_cid); | ||
| 969 | |||
| 970 | rc = wil_vring_init_tx(wil, 0, WIL6210_TX_RING_SIZE, | ||
| 971 | wil->pending_connect_cid, 0); | ||
| 972 | wil->pending_connect_cid = -1; | ||
| 973 | if (rc == 0) | ||
| 974 | wil_link_on(wil); | ||
| 975 | } | ||
diff --git a/drivers/net/wireless/ath/wil6210/wmi.h b/drivers/net/wireless/ath/wil6210/wmi.h new file mode 100644 index 000000000000..3bbf87572b07 --- /dev/null +++ b/drivers/net/wireless/ath/wil6210/wmi.h | |||
| @@ -0,0 +1,1116 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012 Qualcomm Atheros, Inc. | ||
| 3 | * Copyright (c) 2006-2012 Wilocity . | ||
| 4 | * | ||
| 5 | * Permission to use, copy, modify, and/or distribute this software for any | ||
| 6 | * purpose with or without fee is hereby granted, provided that the above | ||
| 7 | * copyright notice and this permission notice appear in all copies. | ||
| 8 | * | ||
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | */ | ||
| 17 | |||
| 18 | /* | ||
| 19 | * This file contains the definitions of the WMI protocol specified in the | ||
| 20 | * Wireless Module Interface (WMI) for the Wilocity | ||
| 21 | * MARLON 60 Gigabit wireless solution. | ||
| 22 | * It includes definitions of all the commands and events. | ||
| 23 | * Commands are messages from the host to the WM. | ||
| 24 | * Events are messages from the WM to the host. | ||
| 25 | */ | ||
| 26 | |||
| 27 | #ifndef __WILOCITY_WMI_H__ | ||
| 28 | #define __WILOCITY_WMI_H__ | ||
| 29 | |||
| 30 | /* General */ | ||
| 31 | |||
| 32 | #define WMI_MAC_LEN (6) | ||
| 33 | #define WMI_PROX_RANGE_NUM (3) | ||
| 34 | |||
| 35 | /* List of Commands */ | ||
| 36 | enum wmi_command_id { | ||
| 37 | WMI_CONNECT_CMDID = 0x0001, | ||
| 38 | WMI_DISCONNECT_CMDID = 0x0003, | ||
| 39 | WMI_START_SCAN_CMDID = 0x0007, | ||
| 40 | WMI_SET_BSS_FILTER_CMDID = 0x0009, | ||
| 41 | WMI_SET_PROBED_SSID_CMDID = 0x000a, | ||
| 42 | WMI_SET_LISTEN_INT_CMDID = 0x000b, | ||
| 43 | WMI_BCON_CTRL_CMDID = 0x000f, | ||
| 44 | WMI_ADD_CIPHER_KEY_CMDID = 0x0016, | ||
| 45 | WMI_DELETE_CIPHER_KEY_CMDID = 0x0017, | ||
| 46 | WMI_SET_APPIE_CMDID = 0x003f, | ||
| 47 | WMI_GET_APPIE_CMDID = 0x0040, | ||
| 48 | WMI_SET_WSC_STATUS_CMDID = 0x0041, | ||
| 49 | WMI_PXMT_RANGE_CFG_CMDID = 0x0042, | ||
| 50 | WMI_PXMT_SNR2_RANGE_CFG_CMDID = 0x0043, | ||
| 51 | WMI_FAST_MEM_ACC_MODE_CMDID = 0x0300, | ||
| 52 | WMI_MEM_READ_CMDID = 0x0800, | ||
| 53 | WMI_MEM_WR_CMDID = 0x0801, | ||
| 54 | WMI_ECHO_CMDID = 0x0803, | ||
| 55 | WMI_DEEP_ECHO_CMDID = 0x0804, | ||
| 56 | WMI_CONFIG_MAC_CMDID = 0x0805, | ||
| 57 | WMI_CONFIG_PHY_DEBUG_CMDID = 0x0806, | ||
| 58 | WMI_ADD_STATION_CMDID = 0x0807, | ||
| 59 | WMI_ADD_DEBUG_TX_PCKT_CMDID = 0x0808, | ||
| 60 | WMI_PHY_GET_STATISTICS_CMDID = 0x0809, | ||
| 61 | WMI_FS_TUNE_CMDID = 0x080a, | ||
| 62 | WMI_CORR_MEASURE_CMDID = 0x080b, | ||
| 63 | WMI_TEMP_SENSE_CMDID = 0x080e, | ||
| 64 | WMI_DC_CALIB_CMDID = 0x080f, | ||
| 65 | WMI_SEND_TONE_CMDID = 0x0810, | ||
| 66 | WMI_IQ_TX_CALIB_CMDID = 0x0811, | ||
| 67 | WMI_IQ_RX_CALIB_CMDID = 0x0812, | ||
| 68 | WMI_SET_UCODE_IDLE_CMDID = 0x0813, | ||
| 69 | WMI_SET_WORK_MODE_CMDID = 0x0815, | ||
| 70 | WMI_LO_LEAKAGE_CALIB_CMDID = 0x0816, | ||
| 71 | WMI_MARLON_R_ACTIVATE_CMDID = 0x0817, | ||
| 72 | WMI_MARLON_R_READ_CMDID = 0x0818, | ||
| 73 | WMI_MARLON_R_WRITE_CMDID = 0x0819, | ||
| 74 | WMI_MARLON_R_TXRX_SEL_CMDID = 0x081a, | ||
| 75 | MAC_IO_STATIC_PARAMS_CMDID = 0x081b, | ||
| 76 | MAC_IO_DYNAMIC_PARAMS_CMDID = 0x081c, | ||
| 77 | WMI_SILENT_RSSI_CALIB_CMDID = 0x081d, | ||
| 78 | WMI_CFG_RX_CHAIN_CMDID = 0x0820, | ||
| 79 | WMI_VRING_CFG_CMDID = 0x0821, | ||
| 80 | WMI_RX_ON_CMDID = 0x0822, | ||
| 81 | WMI_VRING_BA_EN_CMDID = 0x0823, | ||
| 82 | WMI_VRING_BA_DIS_CMDID = 0x0824, | ||
| 83 | WMI_RCP_ADDBA_RESP_CMDID = 0x0825, | ||
| 84 | WMI_RCP_DELBA_CMDID = 0x0826, | ||
| 85 | WMI_SET_SSID_CMDID = 0x0827, | ||
| 86 | WMI_GET_SSID_CMDID = 0x0828, | ||
| 87 | WMI_SET_PCP_CHANNEL_CMDID = 0x0829, | ||
| 88 | WMI_GET_PCP_CHANNEL_CMDID = 0x082a, | ||
| 89 | WMI_SW_TX_REQ_CMDID = 0x082b, | ||
| 90 | WMI_RX_OFF_CMDID = 0x082c, | ||
| 91 | WMI_READ_MAC_RXQ_CMDID = 0x0830, | ||
| 92 | WMI_READ_MAC_TXQ_CMDID = 0x0831, | ||
| 93 | WMI_WRITE_MAC_RXQ_CMDID = 0x0832, | ||
| 94 | WMI_WRITE_MAC_TXQ_CMDID = 0x0833, | ||
| 95 | WMI_WRITE_MAC_XQ_FIELD_CMDID = 0x0834, | ||
| 96 | WMI_MLME_PUSH_CMDID = 0x0835, | ||
| 97 | WMI_BEAMFORMING_MGMT_CMDID = 0x0836, | ||
| 98 | WMI_BF_TXSS_MGMT_CMDID = 0x0837, | ||
| 99 | WMI_BF_SM_MGMT_CMDID = 0x0838, | ||
| 100 | WMI_BF_RXSS_MGMT_CMDID = 0x0839, | ||
| 101 | WMI_SET_SECTORS_CMDID = 0x0849, | ||
| 102 | WMI_MAINTAIN_PAUSE_CMDID = 0x0850, | ||
| 103 | WMI_MAINTAIN_RESUME_CMDID = 0x0851, | ||
| 104 | WMI_RS_MGMT_CMDID = 0x0852, | ||
| 105 | WMI_RF_MGMT_CMDID = 0x0853, | ||
| 106 | /* Performance monitoring commands */ | ||
| 107 | WMI_BF_CTRL_CMDID = 0x0862, | ||
| 108 | WMI_NOTIFY_REQ_CMDID = 0x0863, | ||
| 109 | WMI_GET_STATUS_CMDID = 0x0864, | ||
| 110 | WMI_UNIT_TEST_CMDID = 0x0900, | ||
| 111 | WMI_HICCUP_CMDID = 0x0901, | ||
| 112 | WMI_FLASH_READ_CMDID = 0x0902, | ||
| 113 | WMI_FLASH_WRITE_CMDID = 0x0903, | ||
| 114 | WMI_SECURITY_UNIT_TEST_CMDID = 0x0904, | ||
| 115 | |||
| 116 | WMI_SET_MAC_ADDRESS_CMDID = 0xf003, | ||
| 117 | WMI_ABORT_SCAN_CMDID = 0xf007, | ||
| 118 | WMI_SET_PMK_CMDID = 0xf028, | ||
| 119 | |||
| 120 | WMI_SET_PROMISCUOUS_MODE_CMDID = 0xf041, | ||
| 121 | WMI_GET_PMK_CMDID = 0xf048, | ||
| 122 | WMI_SET_PASSPHRASE_CMDID = 0xf049, | ||
| 123 | WMI_SEND_ASSOC_RES_CMDID = 0xf04a, | ||
| 124 | WMI_SET_ASSOC_REQ_RELAY_CMDID = 0xf04b, | ||
| 125 | WMI_EAPOL_TX_CMDID = 0xf04c, | ||
| 126 | WMI_MAC_ADDR_REQ_CMDID = 0xf04d, | ||
| 127 | WMI_FW_VER_CMDID = 0xf04e, | ||
| 128 | }; | ||
| 129 | |||
| 130 | /* | ||
| 131 | * Commands data structures | ||
| 132 | */ | ||
| 133 | |||
| 134 | /* | ||
| 135 | * Frame Types | ||
| 136 | */ | ||
| 137 | enum wmi_mgmt_frame_type { | ||
| 138 | WMI_FRAME_BEACON = 0, | ||
| 139 | WMI_FRAME_PROBE_REQ = 1, | ||
| 140 | WMI_FRAME_PROBE_RESP = 2, | ||
| 141 | WMI_FRAME_ASSOC_REQ = 3, | ||
| 142 | WMI_FRAME_ASSOC_RESP = 4, | ||
| 143 | WMI_NUM_MGMT_FRAME, | ||
| 144 | }; | ||
| 145 | |||
| 146 | /* | ||
| 147 | * WMI_CONNECT_CMDID | ||
| 148 | */ | ||
| 149 | enum wmi_network_type { | ||
| 150 | WMI_NETTYPE_INFRA = 0x01, | ||
| 151 | WMI_NETTYPE_ADHOC = 0x02, | ||
| 152 | WMI_NETTYPE_ADHOC_CREATOR = 0x04, | ||
| 153 | WMI_NETTYPE_AP = 0x10, | ||
| 154 | WMI_NETTYPE_P2P = 0x20, | ||
| 155 | WMI_NETTYPE_WBE = 0x40, /* PCIE over 60g */ | ||
| 156 | }; | ||
| 157 | |||
| 158 | enum wmi_dot11_auth_mode { | ||
| 159 | WMI_AUTH11_OPEN = 0x01, | ||
| 160 | WMI_AUTH11_SHARED = 0x02, | ||
| 161 | WMI_AUTH11_LEAP = 0x04, | ||
| 162 | WMI_AUTH11_WSC = 0x08, | ||
| 163 | }; | ||
| 164 | |||
| 165 | enum wmi_auth_mode { | ||
| 166 | WMI_AUTH_NONE = 0x01, | ||
| 167 | WMI_AUTH_WPA = 0x02, | ||
| 168 | WMI_AUTH_WPA2 = 0x04, | ||
| 169 | WMI_AUTH_WPA_PSK = 0x08, | ||
| 170 | WMI_AUTH_WPA2_PSK = 0x10, | ||
| 171 | WMI_AUTH_WPA_CCKM = 0x20, | ||
| 172 | WMI_AUTH_WPA2_CCKM = 0x40, | ||
| 173 | }; | ||
| 174 | |||
| 175 | enum wmi_crypto_type { | ||
| 176 | WMI_CRYPT_NONE = 0x01, | ||
| 177 | WMI_CRYPT_WEP = 0x02, | ||
| 178 | WMI_CRYPT_TKIP = 0x04, | ||
| 179 | WMI_CRYPT_AES = 0x08, | ||
| 180 | WMI_CRYPT_AES_GCMP = 0x20, | ||
| 181 | }; | ||
| 182 | |||
| 183 | |||
| 184 | enum wmi_connect_ctrl_flag_bits { | ||
| 185 | WMI_CONNECT_ASSOC_POLICY_USER = 0x0001, | ||
| 186 | WMI_CONNECT_SEND_REASSOC = 0x0002, | ||
| 187 | WMI_CONNECT_IGNORE_WPAx_GROUP_CIPHER = 0x0004, | ||
| 188 | WMI_CONNECT_PROFILE_MATCH_DONE = 0x0008, | ||
| 189 | WMI_CONNECT_IGNORE_AAC_BEACON = 0x0010, | ||
| 190 | WMI_CONNECT_CSA_FOLLOW_BSS = 0x0020, | ||
| 191 | WMI_CONNECT_DO_WPA_OFFLOAD = 0x0040, | ||
| 192 | WMI_CONNECT_DO_NOT_DEAUTH = 0x0080, | ||
| 193 | }; | ||
| 194 | |||
| 195 | #define WMI_MAX_SSID_LEN (32) | ||
| 196 | |||
| 197 | struct wmi_connect_cmd { | ||
| 198 | u8 network_type; | ||
| 199 | u8 dot11_auth_mode; | ||
| 200 | u8 auth_mode; | ||
| 201 | u8 pairwise_crypto_type; | ||
| 202 | u8 pairwise_crypto_len; | ||
| 203 | u8 group_crypto_type; | ||
| 204 | u8 group_crypto_len; | ||
| 205 | u8 ssid_len; | ||
| 206 | u8 ssid[WMI_MAX_SSID_LEN]; | ||
| 207 | u8 channel; | ||
| 208 | u8 reserved0; | ||
| 209 | u8 bssid[WMI_MAC_LEN]; | ||
| 210 | __le32 ctrl_flags; | ||
| 211 | u8 dst_mac[WMI_MAC_LEN]; | ||
| 212 | u8 reserved1[2]; | ||
| 213 | } __packed; | ||
| 214 | |||
| 215 | |||
| 216 | /* | ||
| 217 | * WMI_RECONNECT_CMDID | ||
| 218 | */ | ||
| 219 | struct wmi_reconnect_cmd { | ||
| 220 | u8 channel; /* hint */ | ||
| 221 | u8 reserved; | ||
| 222 | u8 bssid[WMI_MAC_LEN]; /* mandatory if set */ | ||
| 223 | } __packed; | ||
| 224 | |||
| 225 | |||
| 226 | /* | ||
| 227 | * WMI_SET_PMK_CMDID | ||
| 228 | */ | ||
| 229 | |||
| 230 | #define WMI_MIN_KEY_INDEX (0) | ||
| 231 | #define WMI_MAX_KEY_INDEX (3) | ||
| 232 | #define WMI_MAX_KEY_LEN (32) | ||
| 233 | #define WMI_PASSPHRASE_LEN (64) | ||
| 234 | #define WMI_PMK_LEN (32) | ||
| 235 | |||
| 236 | struct wmi_set_pmk_cmd { | ||
| 237 | u8 pmk[WMI_PMK_LEN]; | ||
| 238 | } __packed; | ||
| 239 | |||
| 240 | |||
| 241 | /* | ||
| 242 | * WMI_SET_PASSPHRASE_CMDID | ||
| 243 | */ | ||
| 244 | struct wmi_set_passphrase_cmd { | ||
| 245 | u8 ssid[WMI_MAX_SSID_LEN]; | ||
| 246 | u8 passphrase[WMI_PASSPHRASE_LEN]; | ||
| 247 | u8 ssid_len; | ||
| 248 | u8 passphrase_len; | ||
| 249 | } __packed; | ||
| 250 | |||
| 251 | /* | ||
| 252 | * WMI_ADD_CIPHER_KEY_CMDID | ||
| 253 | */ | ||
| 254 | enum wmi_key_usage { | ||
| 255 | WMI_KEY_USE_PAIRWISE = 0, | ||
| 256 | WMI_KEY_USE_GROUP = 1, | ||
| 257 | WMI_KEY_USE_TX = 2, /* default Tx Key - Static WEP only */ | ||
| 258 | }; | ||
| 259 | |||
| 260 | struct wmi_add_cipher_key_cmd { | ||
| 261 | u8 key_index; | ||
| 262 | u8 key_type; | ||
| 263 | u8 key_usage; /* enum wmi_key_usage */ | ||
| 264 | u8 key_len; | ||
| 265 | u8 key_rsc[8]; /* key replay sequence counter */ | ||
| 266 | u8 key[WMI_MAX_KEY_LEN]; | ||
| 267 | u8 key_op_ctrl; /* Additional Key Control information */ | ||
| 268 | u8 mac[WMI_MAC_LEN]; | ||
| 269 | } __packed; | ||
| 270 | |||
| 271 | /* | ||
| 272 | * WMI_DELETE_CIPHER_KEY_CMDID | ||
| 273 | */ | ||
| 274 | struct wmi_delete_cipher_key_cmd { | ||
| 275 | u8 key_index; | ||
| 276 | u8 mac[WMI_MAC_LEN]; | ||
| 277 | } __packed; | ||
| 278 | |||
| 279 | |||
| 280 | /* | ||
| 281 | * WMI_START_SCAN_CMDID | ||
| 282 | * | ||
| 283 | * Start L1 scan operation | ||
| 284 | * | ||
| 285 | * Returned events: | ||
| 286 | * - WMI_RX_MGMT_PACKET_EVENTID - for every probe resp. | ||
| 287 | * - WMI_SCAN_COMPLETE_EVENTID | ||
| 288 | */ | ||
| 289 | enum wmi_scan_type { | ||
| 290 | WMI_LONG_SCAN = 0, | ||
| 291 | WMI_SHORT_SCAN = 1, | ||
| 292 | }; | ||
| 293 | |||
| 294 | struct wmi_start_scan_cmd { | ||
| 295 | u8 reserved[8]; | ||
| 296 | __le32 home_dwell_time; /* Max duration in the home channel(ms) */ | ||
| 297 | __le32 force_scan_interval; /* Time interval between scans (ms)*/ | ||
| 298 | u8 scan_type; /* wmi_scan_type */ | ||
| 299 | u8 num_channels; /* how many channels follow */ | ||
| 300 | struct { | ||
| 301 | u8 channel; | ||
| 302 | u8 reserved; | ||
| 303 | } channel_list[0]; /* channels ID's */ | ||
| 304 | /* 0 - 58320 MHz */ | ||
| 305 | /* 1 - 60480 MHz */ | ||
| 306 | /* 2 - 62640 MHz */ | ||
| 307 | } __packed; | ||
| 308 | |||
| 309 | /* | ||
| 310 | * WMI_SET_PROBED_SSID_CMDID | ||
| 311 | */ | ||
| 312 | #define MAX_PROBED_SSID_INDEX (15) | ||
| 313 | |||
| 314 | enum wmi_ssid_flag { | ||
| 315 | WMI_SSID_FLAG_DISABLE = 0, /* disables entry */ | ||
| 316 | WMI_SSID_FLAG_SPECIFIC = 1, /* probes specified ssid */ | ||
| 317 | WMI_SSID_FLAG_ANY = 2, /* probes for any ssid */ | ||
| 318 | }; | ||
| 319 | |||
| 320 | struct wmi_probed_ssid_cmd { | ||
| 321 | u8 entry_index; /* 0 to MAX_PROBED_SSID_INDEX */ | ||
| 322 | u8 flag; /* enum wmi_ssid_flag */ | ||
| 323 | u8 ssid_len; | ||
| 324 | u8 ssid[WMI_MAX_SSID_LEN]; | ||
| 325 | } __packed; | ||
| 326 | |||
| 327 | /* | ||
| 328 | * WMI_SET_APPIE_CMDID | ||
| 329 | * Add Application specified IE to a management frame | ||
| 330 | */ | ||
| 331 | struct wmi_set_appie_cmd { | ||
| 332 | u8 mgmt_frm_type; /* enum wmi_mgmt_frame_type */ | ||
| 333 | u8 reserved; | ||
| 334 | __le16 ie_len; /* Length of the IE to be added to MGMT frame */ | ||
| 335 | u8 ie_info[0]; | ||
| 336 | } __packed; | ||
| 337 | |||
| 338 | #define WMI_MAX_IE_LEN (1024) | ||
| 339 | |||
| 340 | struct wmi_pxmt_range_cfg_cmd { | ||
| 341 | u8 dst_mac[WMI_MAC_LEN]; | ||
| 342 | __le16 range; | ||
| 343 | } __packed; | ||
| 344 | |||
| 345 | struct wmi_pxmt_snr2_range_cfg_cmd { | ||
| 346 | s8 snr2range_arr[WMI_PROX_RANGE_NUM-1]; | ||
| 347 | } __packed; | ||
| 348 | |||
| 349 | /* | ||
| 350 | * WMI_RF_MGMT_CMDID | ||
| 351 | */ | ||
| 352 | enum wmi_rf_mgmt_type { | ||
| 353 | WMI_RF_MGMT_W_DISABLE = 0, | ||
| 354 | WMI_RF_MGMT_W_ENABLE = 1, | ||
| 355 | WMI_RF_MGMT_GET_STATUS = 2, | ||
| 356 | }; | ||
| 357 | |||
| 358 | struct wmi_rf_mgmt_cmd { | ||
| 359 | __le32 rf_mgmt_type; | ||
| 360 | } __packed; | ||
| 361 | |||
| 362 | /* | ||
| 363 | * WMI_SET_SSID_CMDID | ||
| 364 | */ | ||
| 365 | struct wmi_set_ssid_cmd { | ||
| 366 | __le32 ssid_len; | ||
| 367 | u8 ssid[WMI_MAX_SSID_LEN]; | ||
| 368 | } __packed; | ||
| 369 | |||
| 370 | /* | ||
| 371 | * WMI_SET_PCP_CHANNEL_CMDID | ||
| 372 | */ | ||
| 373 | struct wmi_set_pcp_channel_cmd { | ||
| 374 | u8 channel; | ||
| 375 | u8 reserved[3]; | ||
| 376 | } __packed; | ||
| 377 | |||
| 378 | /* | ||
| 379 | * WMI_BCON_CTRL_CMDID | ||
| 380 | */ | ||
| 381 | struct wmi_bcon_ctrl_cmd { | ||
| 382 | __le16 bcon_interval; | ||
| 383 | __le16 frag_num; | ||
| 384 | __le64 ss_mask; | ||
| 385 | u8 network_type; | ||
| 386 | u8 reserved; | ||
| 387 | u8 disable_sec_offload; | ||
| 388 | u8 disable_sec; | ||
| 389 | } __packed; | ||
| 390 | |||
| 391 | /* | ||
| 392 | * WMI_SW_TX_REQ_CMDID | ||
| 393 | */ | ||
| 394 | struct wmi_sw_tx_req_cmd { | ||
| 395 | u8 dst_mac[WMI_MAC_LEN]; | ||
| 396 | __le16 len; | ||
| 397 | u8 payload[0]; | ||
| 398 | } __packed; | ||
| 399 | |||
| 400 | /* | ||
| 401 | * WMI_VRING_CFG_CMDID | ||
| 402 | */ | ||
| 403 | |||
| 404 | struct wmi_sw_ring_cfg { | ||
| 405 | __le64 ring_mem_base; | ||
| 406 | __le16 ring_size; | ||
| 407 | __le16 max_mpdu_size; | ||
| 408 | } __packed; | ||
| 409 | |||
| 410 | struct wmi_vring_cfg_schd { | ||
| 411 | __le16 priority; | ||
| 412 | __le16 timeslot_us; | ||
| 413 | } __packed; | ||
| 414 | |||
| 415 | enum wmi_vring_cfg_encap_trans_type { | ||
| 416 | WMI_VRING_ENC_TYPE_802_3 = 0, | ||
| 417 | WMI_VRING_ENC_TYPE_NATIVE_WIFI = 1, | ||
| 418 | }; | ||
| 419 | |||
| 420 | enum wmi_vring_cfg_ds_cfg { | ||
| 421 | WMI_VRING_DS_PBSS = 0, | ||
| 422 | WMI_VRING_DS_STATION = 1, | ||
| 423 | WMI_VRING_DS_AP = 2, | ||
| 424 | WMI_VRING_DS_ADDR4 = 3, | ||
| 425 | }; | ||
| 426 | |||
| 427 | enum wmi_vring_cfg_nwifi_ds_trans_type { | ||
| 428 | WMI_NWIFI_TX_TRANS_MODE_NO = 0, | ||
| 429 | WMI_NWIFI_TX_TRANS_MODE_AP2PBSS = 1, | ||
| 430 | WMI_NWIFI_TX_TRANS_MODE_STA2PBSS = 2, | ||
| 431 | }; | ||
| 432 | |||
| 433 | enum wmi_vring_cfg_schd_params_priority { | ||
| 434 | WMI_SCH_PRIO_REGULAR = 0, | ||
| 435 | WMI_SCH_PRIO_HIGH = 1, | ||
| 436 | }; | ||
| 437 | |||
| 438 | struct wmi_vring_cfg { | ||
| 439 | struct wmi_sw_ring_cfg tx_sw_ring; | ||
| 440 | u8 ringid; /* 0-23 vrings */ | ||
| 441 | |||
| 442 | #define CIDXTID_CID_POS (0) | ||
| 443 | #define CIDXTID_CID_LEN (4) | ||
| 444 | #define CIDXTID_CID_MSK (0xF) | ||
| 445 | #define CIDXTID_TID_POS (4) | ||
| 446 | #define CIDXTID_TID_LEN (4) | ||
| 447 | #define CIDXTID_TID_MSK (0xF0) | ||
| 448 | u8 cidxtid; | ||
| 449 | |||
| 450 | u8 encap_trans_type; | ||
| 451 | u8 ds_cfg; /* 802.3 DS cfg */ | ||
| 452 | u8 nwifi_ds_trans_type; | ||
| 453 | |||
| 454 | #define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS (0) | ||
| 455 | #define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN (1) | ||
| 456 | #define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK (0x1) | ||
| 457 | #define VRING_CFG_MAC_CTRL_AGGR_EN_POS (1) | ||
| 458 | #define VRING_CFG_MAC_CTRL_AGGR_EN_LEN (1) | ||
| 459 | #define VRING_CFG_MAC_CTRL_AGGR_EN_MSK (0x2) | ||
| 460 | u8 mac_ctrl; | ||
| 461 | |||
| 462 | #define VRING_CFG_TO_RESOLUTION_VALUE_POS (0) | ||
| 463 | #define VRING_CFG_TO_RESOLUTION_VALUE_LEN (6) | ||
| 464 | #define VRING_CFG_TO_RESOLUTION_VALUE_MSK (0x3F) | ||
| 465 | u8 to_resolution; | ||
| 466 | u8 agg_max_wsize; | ||
| 467 | struct wmi_vring_cfg_schd schd_params; | ||
| 468 | } __packed; | ||
| 469 | |||
| 470 | enum wmi_vring_cfg_cmd_action { | ||
| 471 | WMI_VRING_CMD_ADD = 0, | ||
| 472 | WMI_VRING_CMD_MODIFY = 1, | ||
| 473 | WMI_VRING_CMD_DELETE = 2, | ||
| 474 | }; | ||
| 475 | |||
| 476 | struct wmi_vring_cfg_cmd { | ||
| 477 | __le32 action; | ||
| 478 | struct wmi_vring_cfg vring_cfg; | ||
| 479 | } __packed; | ||
| 480 | |||
| 481 | /* | ||
| 482 | * WMI_VRING_BA_EN_CMDID | ||
| 483 | */ | ||
| 484 | struct wmi_vring_ba_en_cmd { | ||
| 485 | u8 ringid; | ||
| 486 | u8 agg_max_wsize; | ||
| 487 | __le16 ba_timeout; | ||
| 488 | } __packed; | ||
| 489 | |||
| 490 | /* | ||
| 491 | * WMI_VRING_BA_DIS_CMDID | ||
| 492 | */ | ||
| 493 | struct wmi_vring_ba_dis_cmd { | ||
| 494 | u8 ringid; | ||
| 495 | u8 reserved; | ||
| 496 | __le16 reason; | ||
| 497 | } __packed; | ||
| 498 | |||
| 499 | /* | ||
| 500 | * WMI_NOTIFY_REQ_CMDID | ||
| 501 | */ | ||
| 502 | struct wmi_notify_req_cmd { | ||
| 503 | u8 cid; | ||
| 504 | u8 reserved[3]; | ||
| 505 | __le32 interval_usec; | ||
| 506 | } __packed; | ||
| 507 | |||
| 508 | /* | ||
| 509 | * WMI_CFG_RX_CHAIN_CMDID | ||
| 510 | */ | ||
| 511 | enum wmi_sniffer_cfg_mode { | ||
| 512 | WMI_SNIFFER_OFF = 0, | ||
| 513 | WMI_SNIFFER_ON = 1, | ||
| 514 | }; | ||
| 515 | |||
| 516 | enum wmi_sniffer_cfg_phy_info_mode { | ||
| 517 | WMI_SNIFFER_PHY_INFO_DISABLED = 0, | ||
| 518 | WMI_SNIFFER_PHY_INFO_ENABLED = 1, | ||
| 519 | }; | ||
| 520 | |||
| 521 | enum wmi_sniffer_cfg_phy_support { | ||
| 522 | WMI_SNIFFER_CP = 0, | ||
| 523 | WMI_SNIFFER_DP = 1, | ||
| 524 | WMI_SNIFFER_BOTH_PHYS = 2, | ||
| 525 | }; | ||
| 526 | |||
| 527 | struct wmi_sniffer_cfg { | ||
| 528 | __le32 mode; /* enum wmi_sniffer_cfg_mode */ | ||
| 529 | __le32 phy_info_mode; /* enum wmi_sniffer_cfg_phy_info_mode */ | ||
| 530 | __le32 phy_support; /* enum wmi_sniffer_cfg_phy_support */ | ||
| 531 | u8 channel; | ||
| 532 | u8 reserved[3]; | ||
| 533 | } __packed; | ||
| 534 | |||
| 535 | enum wmi_cfg_rx_chain_cmd_action { | ||
| 536 | WMI_RX_CHAIN_ADD = 0, | ||
| 537 | WMI_RX_CHAIN_DEL = 1, | ||
| 538 | }; | ||
| 539 | |||
| 540 | enum wmi_cfg_rx_chain_cmd_decap_trans_type { | ||
| 541 | WMI_DECAP_TYPE_802_3 = 0, | ||
| 542 | WMI_DECAP_TYPE_NATIVE_WIFI = 1, | ||
| 543 | }; | ||
| 544 | |||
| 545 | enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type { | ||
| 546 | WMI_NWIFI_RX_TRANS_MODE_NO = 0, | ||
| 547 | WMI_NWIFI_RX_TRANS_MODE_PBSS2AP = 1, | ||
| 548 | WMI_NWIFI_RX_TRANS_MODE_PBSS2STA = 2, | ||
| 549 | }; | ||
| 550 | |||
| 551 | struct wmi_cfg_rx_chain_cmd { | ||
| 552 | __le32 action; | ||
| 553 | struct wmi_sw_ring_cfg rx_sw_ring; | ||
| 554 | u8 mid; | ||
| 555 | u8 decap_trans_type; | ||
| 556 | |||
| 557 | #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS (0) | ||
| 558 | #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN (1) | ||
| 559 | #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK (0x1) | ||
| 560 | u8 l2_802_3_offload_ctrl; | ||
| 561 | |||
| 562 | #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS (0) | ||
| 563 | #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN (1) | ||
| 564 | #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK (0x1) | ||
| 565 | #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS (1) | ||
| 566 | #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN (1) | ||
| 567 | #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK (0x2) | ||
| 568 | u8 l2_nwifi_offload_ctrl; | ||
| 569 | |||
| 570 | u8 vlan_id; | ||
| 571 | u8 nwifi_ds_trans_type; | ||
| 572 | |||
| 573 | #define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS (0) | ||
| 574 | #define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN (1) | ||
| 575 | #define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK (0x1) | ||
| 576 | #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS (1) | ||
| 577 | #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN (1) | ||
| 578 | #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK (0x2) | ||
| 579 | u8 l3_l4_ctrl; | ||
| 580 | |||
| 581 | #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS (0) | ||
| 582 | #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN (1) | ||
| 583 | #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK (0x1) | ||
| 584 | #define RING_CTRL_OVERRIDE_WB_THRSH_POS (1) | ||
| 585 | #define RING_CTRL_OVERRIDE_WB_THRSH_LEN (1) | ||
| 586 | #define RING_CTRL_OVERRIDE_WB_THRSH_MSK (0x2) | ||
| 587 | #define RING_CTRL_OVERRIDE_ITR_THRSH_POS (2) | ||
| 588 | #define RING_CTRL_OVERRIDE_ITR_THRSH_LEN (1) | ||
| 589 | #define RING_CTRL_OVERRIDE_ITR_THRSH_MSK (0x4) | ||
| 590 | #define RING_CTRL_OVERRIDE_HOST_THRSH_POS (3) | ||
| 591 | #define RING_CTRL_OVERRIDE_HOST_THRSH_LEN (1) | ||
| 592 | #define RING_CTRL_OVERRIDE_HOST_THRSH_MSK (0x8) | ||
| 593 | u8 ring_ctrl; | ||
| 594 | |||
| 595 | __le16 prefetch_thrsh; | ||
| 596 | __le16 wb_thrsh; | ||
| 597 | __le32 itr_value; | ||
| 598 | __le16 host_thrsh; | ||
| 599 | u8 reserved[2]; | ||
| 600 | struct wmi_sniffer_cfg sniffer_cfg; | ||
| 601 | } __packed; | ||
| 602 | |||
| 603 | /* | ||
| 604 | * WMI_RCP_ADDBA_RESP_CMDID | ||
| 605 | */ | ||
| 606 | struct wmi_rcp_addba_resp_cmd { | ||
| 607 | |||
| 608 | #define CIDXTID_CID_POS (0) | ||
| 609 | #define CIDXTID_CID_LEN (4) | ||
| 610 | #define CIDXTID_CID_MSK (0xF) | ||
| 611 | #define CIDXTID_TID_POS (4) | ||
| 612 | #define CIDXTID_TID_LEN (4) | ||
| 613 | #define CIDXTID_TID_MSK (0xF0) | ||
| 614 | u8 cidxtid; | ||
| 615 | |||
| 616 | u8 dialog_token; | ||
| 617 | __le16 status_code; | ||
| 618 | __le16 ba_param_set; /* ieee80211_ba_parameterset field to send */ | ||
| 619 | __le16 ba_timeout; | ||
| 620 | } __packed; | ||
| 621 | |||
| 622 | /* | ||
| 623 | * WMI_RCP_DELBA_CMDID | ||
| 624 | */ | ||
| 625 | struct wmi_rcp_delba_cmd { | ||
| 626 | |||
| 627 | #define CIDXTID_CID_POS (0) | ||
| 628 | #define CIDXTID_CID_LEN (4) | ||
| 629 | #define CIDXTID_CID_MSK (0xF) | ||
| 630 | #define CIDXTID_TID_POS (4) | ||
| 631 | #define CIDXTID_TID_LEN (4) | ||
| 632 | #define CIDXTID_TID_MSK (0xF0) | ||
| 633 | u8 cidxtid; | ||
| 634 | |||
| 635 | u8 reserved; | ||
| 636 | __le16 reason; | ||
| 637 | } __packed; | ||
| 638 | |||
| 639 | /* | ||
| 640 | * WMI_RCP_ADDBA_REQ_CMDID | ||
| 641 | */ | ||
| 642 | struct wmi_rcp_addba_req_cmd { | ||
| 643 | |||
| 644 | #define CIDXTID_CID_POS (0) | ||
| 645 | #define CIDXTID_CID_LEN (4) | ||
| 646 | #define CIDXTID_CID_MSK (0xF) | ||
| 647 | #define CIDXTID_TID_POS (4) | ||
| 648 | #define CIDXTID_TID_LEN (4) | ||
| 649 | #define CIDXTID_TID_MSK (0xF0) | ||
| 650 | u8 cidxtid; | ||
| 651 | |||
| 652 | u8 dialog_token; | ||
| 653 | /* ieee80211_ba_parameterset field as it received */ | ||
| 654 | __le16 ba_param_set; | ||
| 655 | __le16 ba_timeout; | ||
| 656 | /* ieee80211_ba_seqstrl field as it received */ | ||
| 657 | __le16 ba_seq_ctrl; | ||
| 658 | } __packed; | ||
| 659 | |||
| 660 | /* | ||
| 661 | * WMI_SET_MAC_ADDRESS_CMDID | ||
| 662 | */ | ||
| 663 | struct wmi_set_mac_address_cmd { | ||
| 664 | u8 mac[WMI_MAC_LEN]; | ||
| 665 | u8 reserved[2]; | ||
| 666 | } __packed; | ||
| 667 | |||
| 668 | |||
| 669 | /* | ||
| 670 | * WMI_EAPOL_TX_CMDID | ||
| 671 | */ | ||
| 672 | struct wmi_eapol_tx_cmd { | ||
| 673 | u8 dst_mac[WMI_MAC_LEN]; | ||
| 674 | __le16 eapol_len; | ||
| 675 | u8 eapol[0]; | ||
| 676 | } __packed; | ||
| 677 | |||
| 678 | /* | ||
| 679 | * WMI_ECHO_CMDID | ||
| 680 | * | ||
| 681 | * Check FW is alive | ||
| 682 | * | ||
| 683 | * WMI_DEEP_ECHO_CMDID | ||
| 684 | * | ||
| 685 | * Check FW and ucode are alive | ||
| 686 | * | ||
| 687 | * Returned event: WMI_ECHO_RSP_EVENTID | ||
| 688 | * same event for both commands | ||
| 689 | */ | ||
| 690 | struct wmi_echo_cmd { | ||
| 691 | __le32 value; | ||
| 692 | } __packed; | ||
| 693 | |||
| 694 | /* | ||
| 695 | * WMI Events | ||
| 696 | */ | ||
| 697 | |||
| 698 | /* | ||
| 699 | * List of Events (target to host) | ||
| 700 | */ | ||
| 701 | enum wmi_event_id { | ||
| 702 | WMI_IMM_RSP_EVENTID = 0x0000, | ||
| 703 | WMI_READY_EVENTID = 0x1001, | ||
| 704 | WMI_CONNECT_EVENTID = 0x1002, | ||
| 705 | WMI_DISCONNECT_EVENTID = 0x1003, | ||
| 706 | WMI_SCAN_COMPLETE_EVENTID = 0x100a, | ||
| 707 | WMI_REPORT_STATISTICS_EVENTID = 0x100b, | ||
| 708 | WMI_RD_MEM_RSP_EVENTID = 0x1800, | ||
| 709 | WMI_FW_READY_EVENTID = 0x1801, | ||
| 710 | WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID = 0x0200, | ||
| 711 | WMI_ECHO_RSP_EVENTID = 0x1803, | ||
| 712 | WMI_CONFIG_MAC_DONE_EVENTID = 0x1805, | ||
| 713 | WMI_CONFIG_PHY_DEBUG_DONE_EVENTID = 0x1806, | ||
| 714 | WMI_ADD_STATION_DONE_EVENTID = 0x1807, | ||
| 715 | WMI_ADD_DEBUG_TX_PCKT_DONE_EVENTID = 0x1808, | ||
| 716 | WMI_PHY_GET_STATISTICS_EVENTID = 0x1809, | ||
| 717 | WMI_FS_TUNE_DONE_EVENTID = 0x180a, | ||
| 718 | WMI_CORR_MEASURE_DONE_EVENTID = 0x180b, | ||
| 719 | WMI_TEMP_SENSE_DONE_EVENTID = 0x180e, | ||
| 720 | WMI_DC_CALIB_DONE_EVENTID = 0x180f, | ||
| 721 | WMI_IQ_TX_CALIB_DONE_EVENTID = 0x1811, | ||
| 722 | WMI_IQ_RX_CALIB_DONE_EVENTID = 0x1812, | ||
| 723 | WMI_SET_WORK_MODE_DONE_EVENTID = 0x1815, | ||
| 724 | WMI_LO_LEAKAGE_CALIB_DONE_EVENTID = 0x1816, | ||
| 725 | WMI_MARLON_R_ACTIVATE_DONE_EVENTID = 0x1817, | ||
| 726 | WMI_MARLON_R_READ_DONE_EVENTID = 0x1818, | ||
| 727 | WMI_MARLON_R_WRITE_DONE_EVENTID = 0x1819, | ||
| 728 | WMI_MARLON_R_TXRX_SEL_DONE_EVENTID = 0x181a, | ||
| 729 | WMI_SILENT_RSSI_CALIB_DONE_EVENTID = 0x181d, | ||
| 730 | |||
| 731 | WMI_CFG_RX_CHAIN_DONE_EVENTID = 0x1820, | ||
| 732 | WMI_VRING_CFG_DONE_EVENTID = 0x1821, | ||
| 733 | WMI_RX_ON_DONE_EVENTID = 0x1822, | ||
| 734 | WMI_BA_STATUS_EVENTID = 0x1823, | ||
| 735 | WMI_RCP_ADDBA_REQ_EVENTID = 0x1824, | ||
| 736 | WMI_ADDBA_RESP_SENT_EVENTID = 0x1825, | ||
| 737 | WMI_DELBA_EVENTID = 0x1826, | ||
| 738 | WMI_GET_SSID_EVENTID = 0x1828, | ||
| 739 | WMI_GET_PCP_CHANNEL_EVENTID = 0x182a, | ||
| 740 | WMI_SW_TX_COMPLETE_EVENTID = 0x182b, | ||
| 741 | WMI_RX_OFF_DONE_EVENTID = 0x182c, | ||
| 742 | |||
| 743 | WMI_READ_MAC_RXQ_EVENTID = 0x1830, | ||
| 744 | WMI_READ_MAC_TXQ_EVENTID = 0x1831, | ||
| 745 | WMI_WRITE_MAC_RXQ_EVENTID = 0x1832, | ||
| 746 | WMI_WRITE_MAC_TXQ_EVENTID = 0x1833, | ||
| 747 | WMI_WRITE_MAC_XQ_FIELD_EVENTID = 0x1834, | ||
| 748 | |||
| 749 | WMI_BEAFORMING_MGMT_DONE_EVENTID = 0x1836, | ||
| 750 | WMI_BF_TXSS_MGMT_DONE_EVENTID = 0x1837, | ||
| 751 | WMI_BF_RXSS_MGMT_DONE_EVENTID = 0x1839, | ||
| 752 | WMI_RS_MGMT_DONE_EVENTID = 0x1852, | ||
| 753 | WMI_RF_MGMT_STATUS_EVENTID = 0x1853, | ||
| 754 | WMI_BF_SM_MGMT_DONE_EVENTID = 0x1838, | ||
| 755 | WMI_RX_MGMT_PACKET_EVENTID = 0x1840, | ||
| 756 | |||
| 757 | /* Performance monitoring events */ | ||
| 758 | WMI_DATA_PORT_OPEN_EVENTID = 0x1860, | ||
| 759 | WMI_WBE_LINKDOWN_EVENTID = 0x1861, | ||
| 760 | |||
| 761 | WMI_BF_CTRL_DONE_EVENTID = 0x1862, | ||
| 762 | WMI_NOTIFY_REQ_DONE_EVENTID = 0x1863, | ||
| 763 | WMI_GET_STATUS_DONE_EVENTID = 0x1864, | ||
| 764 | |||
| 765 | WMI_UNIT_TEST_EVENTID = 0x1900, | ||
| 766 | WMI_FLASH_READ_DONE_EVENTID = 0x1902, | ||
| 767 | WMI_FLASH_WRITE_DONE_EVENTID = 0x1903, | ||
| 768 | |||
| 769 | WMI_SET_CHANNEL_EVENTID = 0x9000, | ||
| 770 | WMI_ASSOC_REQ_EVENTID = 0x9001, | ||
| 771 | WMI_EAPOL_RX_EVENTID = 0x9002, | ||
| 772 | WMI_MAC_ADDR_RESP_EVENTID = 0x9003, | ||
| 773 | WMI_FW_VER_EVENTID = 0x9004, | ||
| 774 | }; | ||
| 775 | |||
| 776 | /* | ||
| 777 | * Events data structures | ||
| 778 | */ | ||
| 779 | |||
| 780 | /* | ||
| 781 | * WMI_RF_MGMT_STATUS_EVENTID | ||
| 782 | */ | ||
| 783 | enum wmi_rf_status { | ||
| 784 | WMI_RF_ENABLED = 0, | ||
| 785 | WMI_RF_DISABLED_HW = 1, | ||
| 786 | WMI_RF_DISABLED_SW = 2, | ||
| 787 | WMI_RF_DISABLED_HW_SW = 3, | ||
| 788 | }; | ||
| 789 | |||
| 790 | struct wmi_rf_mgmt_status_event { | ||
| 791 | __le32 rf_status; | ||
| 792 | } __packed; | ||
| 793 | |||
| 794 | /* | ||
| 795 | * WMI_GET_STATUS_DONE_EVENTID | ||
| 796 | */ | ||
| 797 | struct wmi_get_status_done_event { | ||
| 798 | __le32 is_associated; | ||
| 799 | u8 cid; | ||
| 800 | u8 reserved0[3]; | ||
| 801 | u8 bssid[WMI_MAC_LEN]; | ||
| 802 | u8 channel; | ||
| 803 | u8 reserved1; | ||
| 804 | u8 network_type; | ||
| 805 | u8 reserved2[3]; | ||
| 806 | __le32 ssid_len; | ||
| 807 | u8 ssid[WMI_MAX_SSID_LEN]; | ||
| 808 | __le32 rf_status; | ||
| 809 | __le32 is_secured; | ||
| 810 | } __packed; | ||
| 811 | |||
| 812 | /* | ||
| 813 | * WMI_FW_VER_EVENTID | ||
| 814 | */ | ||
| 815 | struct wmi_fw_ver_event { | ||
| 816 | u8 major; | ||
| 817 | u8 minor; | ||
| 818 | __le16 subminor; | ||
| 819 | __le16 build; | ||
| 820 | } __packed; | ||
| 821 | |||
| 822 | /* | ||
| 823 | * WMI_MAC_ADDR_RESP_EVENTID | ||
| 824 | */ | ||
| 825 | struct wmi_mac_addr_resp_event { | ||
| 826 | u8 mac[WMI_MAC_LEN]; | ||
| 827 | u8 auth_mode; | ||
| 828 | u8 crypt_mode; | ||
| 829 | __le32 offload_mode; | ||
| 830 | } __packed; | ||
| 831 | |||
| 832 | /* | ||
| 833 | * WMI_EAPOL_RX_EVENTID | ||
| 834 | */ | ||
| 835 | struct wmi_eapol_rx_event { | ||
| 836 | u8 src_mac[WMI_MAC_LEN]; | ||
| 837 | __le16 eapol_len; | ||
| 838 | u8 eapol[0]; | ||
| 839 | } __packed; | ||
| 840 | |||
| 841 | /* | ||
| 842 | * WMI_READY_EVENTID | ||
| 843 | */ | ||
| 844 | enum wmi_phy_capability { | ||
| 845 | WMI_11A_CAPABILITY = 1, | ||
| 846 | WMI_11G_CAPABILITY = 2, | ||
| 847 | WMI_11AG_CAPABILITY = 3, | ||
| 848 | WMI_11NA_CAPABILITY = 4, | ||
| 849 | WMI_11NG_CAPABILITY = 5, | ||
| 850 | WMI_11NAG_CAPABILITY = 6, | ||
| 851 | WMI_11AD_CAPABILITY = 7, | ||
| 852 | WMI_11N_CAPABILITY_OFFSET = WMI_11NA_CAPABILITY - WMI_11A_CAPABILITY, | ||
| 853 | }; | ||
| 854 | |||
| 855 | struct wmi_ready_event { | ||
| 856 | __le32 sw_version; | ||
| 857 | __le32 abi_version; | ||
| 858 | u8 mac[WMI_MAC_LEN]; | ||
| 859 | u8 phy_capability; /* enum wmi_phy_capability */ | ||
| 860 | u8 reserved; | ||
| 861 | } __packed; | ||
| 862 | |||
| 863 | /* | ||
| 864 | * WMI_NOTIFY_REQ_DONE_EVENTID | ||
| 865 | */ | ||
| 866 | struct wmi_notify_req_done_event { | ||
| 867 | __le32 status; | ||
| 868 | __le64 tsf; | ||
| 869 | __le32 snr_val; | ||
| 870 | __le32 tx_tpt; | ||
| 871 | __le32 tx_goodput; | ||
| 872 | __le32 rx_goodput; | ||
| 873 | __le16 bf_mcs; | ||
| 874 | __le16 my_rx_sector; | ||
| 875 | __le16 my_tx_sector; | ||
| 876 | __le16 other_rx_sector; | ||
| 877 | __le16 other_tx_sector; | ||
| 878 | __le16 range; | ||
| 879 | } __packed; | ||
| 880 | |||
| 881 | /* | ||
| 882 | * WMI_CONNECT_EVENTID | ||
| 883 | */ | ||
| 884 | struct wmi_connect_event { | ||
| 885 | u8 channel; | ||
| 886 | u8 reserved0; | ||
| 887 | u8 bssid[WMI_MAC_LEN]; | ||
| 888 | __le16 listen_interval; | ||
| 889 | __le16 beacon_interval; | ||
| 890 | u8 network_type; | ||
| 891 | u8 reserved1[3]; | ||
| 892 | u8 beacon_ie_len; | ||
| 893 | u8 assoc_req_len; | ||
| 894 | u8 assoc_resp_len; | ||
| 895 | u8 cid; | ||
| 896 | u8 reserved2[3]; | ||
| 897 | u8 assoc_info[0]; | ||
| 898 | } __packed; | ||
| 899 | |||
| 900 | /* | ||
| 901 | * WMI_DISCONNECT_EVENTID | ||
| 902 | */ | ||
| 903 | enum wmi_disconnect_reason { | ||
| 904 | WMI_DIS_REASON_NO_NETWORK_AVAIL = 1, | ||
| 905 | WMI_DIS_REASON_LOST_LINK = 2, /* bmiss */ | ||
| 906 | WMI_DIS_REASON_DISCONNECT_CMD = 3, | ||
| 907 | WMI_DIS_REASON_BSS_DISCONNECTED = 4, | ||
| 908 | WMI_DIS_REASON_AUTH_FAILED = 5, | ||
| 909 | WMI_DIS_REASON_ASSOC_FAILED = 6, | ||
| 910 | WMI_DIS_REASON_NO_RESOURCES_AVAIL = 7, | ||
| 911 | WMI_DIS_REASON_CSERV_DISCONNECT = 8, | ||
| 912 | WMI_DIS_REASON_INVALID_PROFILE = 10, | ||
| 913 | WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH = 11, | ||
| 914 | WMI_DIS_REASON_PROFILE_MISMATCH = 12, | ||
| 915 | WMI_DIS_REASON_CONNECTION_EVICTED = 13, | ||
| 916 | WMI_DIS_REASON_IBSS_MERGE = 14, | ||
| 917 | }; | ||
| 918 | |||
| 919 | struct wmi_disconnect_event { | ||
| 920 | __le16 protocol_reason_status; /* reason code, see 802.11 spec. */ | ||
| 921 | u8 bssid[WMI_MAC_LEN]; /* set if known */ | ||
| 922 | u8 disconnect_reason; /* see wmi_disconnect_reason_e */ | ||
| 923 | u8 assoc_resp_len; | ||
| 924 | u8 assoc_info[0]; | ||
| 925 | } __packed; | ||
| 926 | |||
| 927 | /* | ||
| 928 | * WMI_SCAN_COMPLETE_EVENTID | ||
| 929 | */ | ||
| 930 | struct wmi_scan_complete_event { | ||
| 931 | __le32 status; | ||
| 932 | } __packed; | ||
| 933 | |||
| 934 | /* | ||
| 935 | * WMI_BA_STATUS_EVENTID | ||
| 936 | */ | ||
| 937 | enum wmi_vring_ba_status { | ||
| 938 | WMI_BA_AGREED = 0, | ||
| 939 | WMI_BA_NON_AGREED = 1, | ||
| 940 | }; | ||
| 941 | |||
| 942 | struct wmi_vring_ba_status_event { | ||
| 943 | __le16 status; | ||
| 944 | u8 reserved[2]; | ||
| 945 | u8 ringid; | ||
| 946 | u8 agg_wsize; | ||
| 947 | __le16 ba_timeout; | ||
| 948 | } __packed; | ||
| 949 | |||
| 950 | /* | ||
| 951 | * WMI_DELBA_EVENTID | ||
| 952 | */ | ||
| 953 | struct wmi_delba_event { | ||
| 954 | |||
| 955 | #define CIDXTID_CID_POS (0) | ||
| 956 | #define CIDXTID_CID_LEN (4) | ||
| 957 | #define CIDXTID_CID_MSK (0xF) | ||
| 958 | #define CIDXTID_TID_POS (4) | ||
| 959 | #define CIDXTID_TID_LEN (4) | ||
| 960 | #define CIDXTID_TID_MSK (0xF0) | ||
| 961 | u8 cidxtid; | ||
| 962 | |||
| 963 | u8 from_initiator; | ||
| 964 | __le16 reason; | ||
| 965 | } __packed; | ||
| 966 | |||
| 967 | /* | ||
| 968 | * WMI_VRING_CFG_DONE_EVENTID | ||
| 969 | */ | ||
| 970 | enum wmi_vring_cfg_done_event_status { | ||
| 971 | WMI_VRING_CFG_SUCCESS = 0, | ||
| 972 | WMI_VRING_CFG_FAILURE = 1, | ||
| 973 | }; | ||
| 974 | |||
| 975 | struct wmi_vring_cfg_done_event { | ||
| 976 | u8 ringid; | ||
| 977 | u8 status; | ||
| 978 | u8 reserved[2]; | ||
| 979 | __le32 tx_vring_tail_ptr; | ||
| 980 | } __packed; | ||
| 981 | |||
| 982 | /* | ||
| 983 | * WMI_ADDBA_RESP_SENT_EVENTID | ||
| 984 | */ | ||
| 985 | enum wmi_rcp_addba_resp_sent_event_status { | ||
| 986 | WMI_ADDBA_SUCCESS = 0, | ||
| 987 | WMI_ADDBA_FAIL = 1, | ||
| 988 | }; | ||
| 989 | |||
| 990 | struct wmi_rcp_addba_resp_sent_event { | ||
| 991 | |||
| 992 | #define CIDXTID_CID_POS (0) | ||
| 993 | #define CIDXTID_CID_LEN (4) | ||
| 994 | #define CIDXTID_CID_MSK (0xF) | ||
| 995 | #define CIDXTID_TID_POS (4) | ||
| 996 | #define CIDXTID_TID_LEN (4) | ||
| 997 | #define CIDXTID_TID_MSK (0xF0) | ||
| 998 | u8 cidxtid; | ||
| 999 | |||
| 1000 | u8 reserved; | ||
| 1001 | __le16 status; | ||
| 1002 | } __packed; | ||
| 1003 | |||
| 1004 | /* | ||
| 1005 | * WMI_RCP_ADDBA_REQ_EVENTID | ||
| 1006 | */ | ||
| 1007 | struct wmi_rcp_addba_req_event { | ||
| 1008 | |||
| 1009 | #define CIDXTID_CID_POS (0) | ||
| 1010 | #define CIDXTID_CID_LEN (4) | ||
| 1011 | #define CIDXTID_CID_MSK (0xF) | ||
| 1012 | #define CIDXTID_TID_POS (4) | ||
| 1013 | #define CIDXTID_TID_LEN (4) | ||
| 1014 | #define CIDXTID_TID_MSK (0xF0) | ||
| 1015 | u8 cidxtid; | ||
| 1016 | |||
| 1017 | u8 dialog_token; | ||
| 1018 | __le16 ba_param_set; /* ieee80211_ba_parameterset as it received */ | ||
| 1019 | __le16 ba_timeout; | ||
| 1020 | __le16 ba_seq_ctrl; /* ieee80211_ba_seqstrl field as it received */ | ||
| 1021 | } __packed; | ||
| 1022 | |||
| 1023 | /* | ||
| 1024 | * WMI_CFG_RX_CHAIN_DONE_EVENTID | ||
| 1025 | */ | ||
| 1026 | enum wmi_cfg_rx_chain_done_event_status { | ||
| 1027 | WMI_CFG_RX_CHAIN_SUCCESS = 1, | ||
| 1028 | }; | ||
| 1029 | |||
| 1030 | struct wmi_cfg_rx_chain_done_event { | ||
| 1031 | __le32 rx_ring_tail_ptr; /* Rx V-Ring Tail pointer */ | ||
| 1032 | __le32 status; | ||
| 1033 | } __packed; | ||
| 1034 | |||
| 1035 | /* | ||
| 1036 | * WMI_WBE_LINKDOWN_EVENTID | ||
| 1037 | */ | ||
| 1038 | enum wmi_wbe_link_down_event_reason { | ||
| 1039 | WMI_WBE_REASON_USER_REQUEST = 0, | ||
| 1040 | WMI_WBE_REASON_RX_DISASSOC = 1, | ||
| 1041 | WMI_WBE_REASON_BAD_PHY_LINK = 2, | ||
| 1042 | }; | ||
| 1043 | |||
| 1044 | struct wmi_wbe_link_down_event { | ||
| 1045 | u8 cid; | ||
| 1046 | u8 reserved[3]; | ||
| 1047 | __le32 reason; | ||
| 1048 | } __packed; | ||
| 1049 | |||
| 1050 | /* | ||
| 1051 | * WMI_DATA_PORT_OPEN_EVENTID | ||
| 1052 | */ | ||
| 1053 | struct wmi_data_port_open_event { | ||
| 1054 | u8 cid; | ||
| 1055 | u8 reserved[3]; | ||
| 1056 | } __packed; | ||
| 1057 | |||
| 1058 | /* | ||
| 1059 | * WMI_GET_PCP_CHANNEL_EVENTID | ||
| 1060 | */ | ||
| 1061 | struct wmi_get_pcp_channel_event { | ||
| 1062 | u8 channel; | ||
| 1063 | u8 reserved[3]; | ||
| 1064 | } __packed; | ||
| 1065 | |||
| 1066 | /* | ||
| 1067 | * WMI_SW_TX_COMPLETE_EVENTID | ||
| 1068 | */ | ||
| 1069 | enum wmi_sw_tx_status { | ||
| 1070 | WMI_TX_SW_STATUS_SUCCESS = 0, | ||
| 1071 | WMI_TX_SW_STATUS_FAILED_NO_RESOURCES = 1, | ||
| 1072 | WMI_TX_SW_STATUS_FAILED_TX = 2, | ||
| 1073 | }; | ||
| 1074 | |||
| 1075 | struct wmi_sw_tx_complete_event { | ||
| 1076 | u8 status; /* enum wmi_sw_tx_status */ | ||
| 1077 | u8 reserved[3]; | ||
| 1078 | } __packed; | ||
| 1079 | |||
| 1080 | /* | ||
| 1081 | * WMI_GET_SSID_EVENTID | ||
| 1082 | */ | ||
| 1083 | struct wmi_get_ssid_event { | ||
| 1084 | __le32 ssid_len; | ||
| 1085 | u8 ssid[WMI_MAX_SSID_LEN]; | ||
| 1086 | } __packed; | ||
| 1087 | |||
| 1088 | /* | ||
| 1089 | * WMI_RX_MGMT_PACKET_EVENTID | ||
| 1090 | */ | ||
| 1091 | struct wmi_rx_mgmt_info { | ||
| 1092 | u8 mcs; | ||
| 1093 | s8 snr; | ||
| 1094 | __le16 range; | ||
| 1095 | __le16 stype; | ||
| 1096 | __le16 status; | ||
| 1097 | __le32 len; | ||
| 1098 | u8 qid; | ||
| 1099 | u8 mid; | ||
| 1100 | u8 cid; | ||
| 1101 | u8 channel; /* From Radio MNGR */ | ||
| 1102 | } __packed; | ||
| 1103 | |||
| 1104 | struct wmi_rx_mgmt_packet_event { | ||
| 1105 | struct wmi_rx_mgmt_info info; | ||
| 1106 | u8 payload[0]; | ||
| 1107 | } __packed; | ||
| 1108 | |||
| 1109 | /* | ||
| 1110 | * WMI_ECHO_RSP_EVENTID | ||
| 1111 | */ | ||
| 1112 | struct wmi_echo_event { | ||
| 1113 | __le32 echoed_value; | ||
| 1114 | } __packed; | ||
| 1115 | |||
| 1116 | #endif /* __WILOCITY_WMI_H__ */ | ||
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index b298e5d68be2..10e288d470e7 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include <linux/hw_random.h> | 7 | #include <linux/hw_random.h> |
| 8 | #include <linux/bcma/bcma.h> | 8 | #include <linux/bcma/bcma.h> |
| 9 | #include <linux/ssb/ssb.h> | 9 | #include <linux/ssb/ssb.h> |
| 10 | #include <linux/completion.h> | ||
| 10 | #include <net/mac80211.h> | 11 | #include <net/mac80211.h> |
| 11 | 12 | ||
| 12 | #include "debugfs.h" | 13 | #include "debugfs.h" |
| @@ -722,6 +723,10 @@ enum b43_firmware_file_type { | |||
| 722 | struct b43_request_fw_context { | 723 | struct b43_request_fw_context { |
| 723 | /* The device we are requesting the fw for. */ | 724 | /* The device we are requesting the fw for. */ |
| 724 | struct b43_wldev *dev; | 725 | struct b43_wldev *dev; |
| 726 | /* a completion event structure needed if this call is asynchronous */ | ||
| 727 | struct completion fw_load_complete; | ||
| 728 | /* a pointer to the firmware object */ | ||
| 729 | const struct firmware *blob; | ||
| 725 | /* The type of firmware to request. */ | 730 | /* The type of firmware to request. */ |
| 726 | enum b43_firmware_file_type req_type; | 731 | enum b43_firmware_file_type req_type; |
| 727 | /* Error messages for each firmware type. */ | 732 | /* Error messages for each firmware type. */ |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 16ab280359bd..806e34c19281 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
| @@ -2088,11 +2088,18 @@ static void b43_print_fw_helptext(struct b43_wl *wl, bool error) | |||
| 2088 | b43warn(wl, text); | 2088 | b43warn(wl, text); |
| 2089 | } | 2089 | } |
| 2090 | 2090 | ||
| 2091 | static void b43_fw_cb(const struct firmware *firmware, void *context) | ||
| 2092 | { | ||
| 2093 | struct b43_request_fw_context *ctx = context; | ||
| 2094 | |||
| 2095 | ctx->blob = firmware; | ||
| 2096 | complete(&ctx->fw_load_complete); | ||
| 2097 | } | ||
| 2098 | |||
| 2091 | int b43_do_request_fw(struct b43_request_fw_context *ctx, | 2099 | int b43_do_request_fw(struct b43_request_fw_context *ctx, |
| 2092 | const char *name, | 2100 | const char *name, |
| 2093 | struct b43_firmware_file *fw) | 2101 | struct b43_firmware_file *fw, bool async) |
| 2094 | { | 2102 | { |
| 2095 | const struct firmware *blob; | ||
| 2096 | struct b43_fw_header *hdr; | 2103 | struct b43_fw_header *hdr; |
| 2097 | u32 size; | 2104 | u32 size; |
| 2098 | int err; | 2105 | int err; |
| @@ -2131,11 +2138,31 @@ int b43_do_request_fw(struct b43_request_fw_context *ctx, | |||
| 2131 | B43_WARN_ON(1); | 2138 | B43_WARN_ON(1); |
| 2132 | return -ENOSYS; | 2139 | return -ENOSYS; |
| 2133 | } | 2140 | } |
| 2134 | err = request_firmware(&blob, ctx->fwname, ctx->dev->dev->dev); | 2141 | if (async) { |
| 2142 | /* do this part asynchronously */ | ||
| 2143 | init_completion(&ctx->fw_load_complete); | ||
| 2144 | err = request_firmware_nowait(THIS_MODULE, 1, ctx->fwname, | ||
| 2145 | ctx->dev->dev->dev, GFP_KERNEL, | ||
| 2146 | ctx, b43_fw_cb); | ||
| 2147 | if (err < 0) { | ||
| 2148 | pr_err("Unable to load firmware\n"); | ||
| 2149 | return err; | ||
| 2150 | } | ||
| 2151 | /* stall here until fw ready */ | ||
| 2152 | wait_for_completion(&ctx->fw_load_complete); | ||
| 2153 | if (ctx->blob) | ||
| 2154 | goto fw_ready; | ||
| 2155 | /* On some ARM systems, the async request will fail, but the next sync | ||
| 2156 | * request works. For this reason, we dall through here | ||
| 2157 | */ | ||
| 2158 | } | ||
| 2159 | err = request_firmware(&ctx->blob, ctx->fwname, | ||
| 2160 | ctx->dev->dev->dev); | ||
| 2135 | if (err == -ENOENT) { | 2161 | if (err == -ENOENT) { |
| 2136 | snprintf(ctx->errors[ctx->req_type], | 2162 | snprintf(ctx->errors[ctx->req_type], |
| 2137 | sizeof(ctx->errors[ctx->req_type]), | 2163 | sizeof(ctx->errors[ctx->req_type]), |
| 2138 | "Firmware file \"%s\" not found\n", ctx->fwname); | 2164 | "Firmware file \"%s\" not found\n", |
| 2165 | ctx->fwname); | ||
| 2139 | return err; | 2166 | return err; |
| 2140 | } else if (err) { | 2167 | } else if (err) { |
| 2141 | snprintf(ctx->errors[ctx->req_type], | 2168 | snprintf(ctx->errors[ctx->req_type], |
| @@ -2144,14 +2171,15 @@ int b43_do_request_fw(struct b43_request_fw_context *ctx, | |||
| 2144 | ctx->fwname, err); | 2171 | ctx->fwname, err); |
| 2145 | return err; | 2172 | return err; |
| 2146 | } | 2173 | } |
| 2147 | if (blob->size < sizeof(struct b43_fw_header)) | 2174 | fw_ready: |
| 2175 | if (ctx->blob->size < sizeof(struct b43_fw_header)) | ||
| 2148 | goto err_format; | 2176 | goto err_format; |
| 2149 | hdr = (struct b43_fw_header *)(blob->data); | 2177 | hdr = (struct b43_fw_header *)(ctx->blob->data); |
| 2150 | switch (hdr->type) { | 2178 | switch (hdr->type) { |
| 2151 | case B43_FW_TYPE_UCODE: | 2179 | case B43_FW_TYPE_UCODE: |
| 2152 | case B43_FW_TYPE_PCM: | 2180 | case B43_FW_TYPE_PCM: |
| 2153 | size = be32_to_cpu(hdr->size); | 2181 | size = be32_to_cpu(hdr->size); |
| 2154 | if (size != blob->size - sizeof(struct b43_fw_header)) | 2182 | if (size != ctx->blob->size - sizeof(struct b43_fw_header)) |
| 2155 | goto err_format; | 2183 | goto err_format; |
| 2156 | /* fallthrough */ | 2184 | /* fallthrough */ |
| 2157 | case B43_FW_TYPE_IV: | 2185 | case B43_FW_TYPE_IV: |
| @@ -2162,7 +2190,7 @@ int b43_do_request_fw(struct b43_request_fw_context *ctx, | |||
| 2162 | goto err_format; | 2190 | goto err_format; |
| 2163 | } | 2191 | } |
| 2164 | 2192 | ||
| 2165 | fw->data = blob; | 2193 | fw->data = ctx->blob; |
| 2166 | fw->filename = name; | 2194 | fw->filename = name; |
| 2167 | fw->type = ctx->req_type; | 2195 | fw->type = ctx->req_type; |
| 2168 | 2196 | ||
| @@ -2172,7 +2200,7 @@ err_format: | |||
| 2172 | snprintf(ctx->errors[ctx->req_type], | 2200 | snprintf(ctx->errors[ctx->req_type], |
| 2173 | sizeof(ctx->errors[ctx->req_type]), | 2201 | sizeof(ctx->errors[ctx->req_type]), |
| 2174 | "Firmware file \"%s\" format error.\n", ctx->fwname); | 2202 | "Firmware file \"%s\" format error.\n", ctx->fwname); |
| 2175 | release_firmware(blob); | 2203 | release_firmware(ctx->blob); |
| 2176 | 2204 | ||
| 2177 | return -EPROTO; | 2205 | return -EPROTO; |
| 2178 | } | 2206 | } |
| @@ -2223,7 +2251,7 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx) | |||
| 2223 | goto err_no_ucode; | 2251 | goto err_no_ucode; |
| 2224 | } | 2252 | } |
| 2225 | } | 2253 | } |
| 2226 | err = b43_do_request_fw(ctx, filename, &fw->ucode); | 2254 | err = b43_do_request_fw(ctx, filename, &fw->ucode, true); |
| 2227 | if (err) | 2255 | if (err) |
| 2228 | goto err_load; | 2256 | goto err_load; |
| 2229 | 2257 | ||
| @@ -2235,7 +2263,7 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx) | |||
| 2235 | else | 2263 | else |
| 2236 | goto err_no_pcm; | 2264 | goto err_no_pcm; |
| 2237 | fw->pcm_request_failed = false; | 2265 | fw->pcm_request_failed = false; |
| 2238 | err = b43_do_request_fw(ctx, filename, &fw->pcm); | 2266 | err = b43_do_request_fw(ctx, filename, &fw->pcm, false); |
| 2239 | if (err == -ENOENT) { | 2267 | if (err == -ENOENT) { |
| 2240 | /* We did not find a PCM file? Not fatal, but | 2268 | /* We did not find a PCM file? Not fatal, but |
| 2241 | * core rev <= 10 must do without hwcrypto then. */ | 2269 | * core rev <= 10 must do without hwcrypto then. */ |
| @@ -2296,7 +2324,7 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx) | |||
| 2296 | default: | 2324 | default: |
| 2297 | goto err_no_initvals; | 2325 | goto err_no_initvals; |
| 2298 | } | 2326 | } |
| 2299 | err = b43_do_request_fw(ctx, filename, &fw->initvals); | 2327 | err = b43_do_request_fw(ctx, filename, &fw->initvals, false); |
| 2300 | if (err) | 2328 | if (err) |
| 2301 | goto err_load; | 2329 | goto err_load; |
| 2302 | 2330 | ||
| @@ -2355,7 +2383,7 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx) | |||
| 2355 | default: | 2383 | default: |
| 2356 | goto err_no_initvals; | 2384 | goto err_no_initvals; |
| 2357 | } | 2385 | } |
| 2358 | err = b43_do_request_fw(ctx, filename, &fw->initvals_band); | 2386 | err = b43_do_request_fw(ctx, filename, &fw->initvals_band, false); |
| 2359 | if (err) | 2387 | if (err) |
| 2360 | goto err_load; | 2388 | goto err_load; |
| 2361 | 2389 | ||
diff --git a/drivers/net/wireless/b43/main.h b/drivers/net/wireless/b43/main.h index 8c684cd33529..abac25ee958d 100644 --- a/drivers/net/wireless/b43/main.h +++ b/drivers/net/wireless/b43/main.h | |||
| @@ -137,9 +137,8 @@ void b43_mac_phy_clock_set(struct b43_wldev *dev, bool on); | |||
| 137 | 137 | ||
| 138 | 138 | ||
| 139 | struct b43_request_fw_context; | 139 | struct b43_request_fw_context; |
| 140 | int b43_do_request_fw(struct b43_request_fw_context *ctx, | 140 | int b43_do_request_fw(struct b43_request_fw_context *ctx, const char *name, |
| 141 | const char *name, | 141 | struct b43_firmware_file *fw, bool async); |
| 142 | struct b43_firmware_file *fw); | ||
| 143 | void b43_do_release_fw(struct b43_firmware_file *fw); | 142 | void b43_do_release_fw(struct b43_firmware_file *fw); |
| 144 | 143 | ||
| 145 | #endif /* B43_MAIN_H_ */ | 144 | #endif /* B43_MAIN_H_ */ |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index 1261a9b84e04..75464ad4fbd1 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | |||
| @@ -3091,10 +3091,11 @@ brcmf_configure_wpaie(struct net_device *ndev, struct brcmf_vs_tlv *wpa_ie, | |||
| 3091 | 3091 | ||
| 3092 | len = wpa_ie->len + TLV_HDR_LEN; | 3092 | len = wpa_ie->len + TLV_HDR_LEN; |
| 3093 | data = (u8 *)wpa_ie; | 3093 | data = (u8 *)wpa_ie; |
| 3094 | offset = 0; | 3094 | offset = TLV_HDR_LEN; |
| 3095 | if (!is_rsn_ie) | 3095 | if (!is_rsn_ie) |
| 3096 | offset += VS_IE_FIXED_HDR_LEN; | 3096 | offset += VS_IE_FIXED_HDR_LEN; |
| 3097 | offset += WPA_IE_VERSION_LEN; | 3097 | else |
| 3098 | offset += WPA_IE_VERSION_LEN; | ||
| 3098 | 3099 | ||
| 3099 | /* check for multicast cipher suite */ | 3100 | /* check for multicast cipher suite */ |
| 3100 | if (offset + WPA_IE_MIN_OUI_LEN > len) { | 3101 | if (offset + WPA_IE_MIN_OUI_LEN > len) { |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/debug.h b/drivers/net/wireless/brcm80211/brcmsmac/debug.h index 796836b0f469..822781cf15d4 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/debug.h +++ b/drivers/net/wireless/brcm80211/brcmsmac/debug.h | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2012 Broadcom Corporation | 2 | * Copyright (c) 2012 Broadcom Corporation |
| 3 | * Copyright (c) 2012 Canonical Ltd. | ||
| 3 | * | 4 | * |
| 4 | * Permission to use, copy, modify, and/or distribute this software for any | 5 | * Permission to use, copy, modify, and/or distribute this software for any |
| 5 | * purpose with or without fee is hereby granted, provided that the above | 6 | * purpose with or without fee is hereby granted, provided that the above |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c index 606b534347bc..21a824232478 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c | |||
| @@ -1343,13 +1343,13 @@ static bool wlc_lcnphy_rx_iq_cal_gain(struct brcms_phy *pi, u16 biq1_gain, | |||
| 1343 | 1343 | ||
| 1344 | wlc_lcnphy_rx_gain_override_enable(pi, true); | 1344 | wlc_lcnphy_rx_gain_override_enable(pi, true); |
| 1345 | wlc_lcnphy_start_tx_tone(pi, 2000, (40 >> 1), 0); | 1345 | wlc_lcnphy_start_tx_tone(pi, 2000, (40 >> 1), 0); |
| 1346 | usleep_range(500, 500); | 1346 | udelay(500); |
| 1347 | write_radio_reg(pi, RADIO_2064_REG112, 0); | 1347 | write_radio_reg(pi, RADIO_2064_REG112, 0); |
| 1348 | if (!wlc_lcnphy_rx_iq_est(pi, 1024, 32, &iq_est_l)) | 1348 | if (!wlc_lcnphy_rx_iq_est(pi, 1024, 32, &iq_est_l)) |
| 1349 | return false; | 1349 | return false; |
| 1350 | 1350 | ||
| 1351 | wlc_lcnphy_start_tx_tone(pi, 2000, 40, 0); | 1351 | wlc_lcnphy_start_tx_tone(pi, 2000, 40, 0); |
| 1352 | usleep_range(500, 500); | 1352 | udelay(500); |
| 1353 | write_radio_reg(pi, RADIO_2064_REG112, 0); | 1353 | write_radio_reg(pi, RADIO_2064_REG112, 0); |
| 1354 | if (!wlc_lcnphy_rx_iq_est(pi, 1024, 32, &iq_est_h)) | 1354 | if (!wlc_lcnphy_rx_iq_est(pi, 1024, 32, &iq_est_h)) |
| 1355 | return false; | 1355 | return false; |
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c index d604b4036a76..3726cd6fcd75 100644 --- a/drivers/net/wireless/iwlegacy/3945-mac.c +++ b/drivers/net/wireless/iwlegacy/3945-mac.c | |||
| @@ -3273,7 +3273,7 @@ il3945_store_measurement(struct device *d, struct device_attribute *attr, | |||
| 3273 | 3273 | ||
| 3274 | if (count) { | 3274 | if (count) { |
| 3275 | char *p = buffer; | 3275 | char *p = buffer; |
| 3276 | strncpy(buffer, buf, min(sizeof(buffer), count)); | 3276 | strlcpy(buffer, buf, sizeof(buffer)); |
| 3277 | channel = simple_strtoul(p, NULL, 0); | 3277 | channel = simple_strtoul(p, NULL, 0); |
| 3278 | if (channel) | 3278 | if (channel) |
| 3279 | params.channel = channel; | 3279 | params.channel = channel; |
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c index da21328ca8ed..a790599fe2c2 100644 --- a/drivers/net/wireless/iwlwifi/dvm/tx.c +++ b/drivers/net/wireless/iwlwifi/dvm/tx.c | |||
| @@ -1151,13 +1151,6 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb, | |||
| 1151 | next_reclaimed = ssn; | 1151 | next_reclaimed = ssn; |
| 1152 | } | 1152 | } |
| 1153 | 1153 | ||
| 1154 | if (tid != IWL_TID_NON_QOS) { | ||
| 1155 | priv->tid_data[sta_id][tid].next_reclaimed = | ||
| 1156 | next_reclaimed; | ||
| 1157 | IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n", | ||
| 1158 | next_reclaimed); | ||
| 1159 | } | ||
| 1160 | |||
| 1161 | iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs); | 1154 | iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs); |
| 1162 | 1155 | ||
| 1163 | iwlagn_check_ratid_empty(priv, sta_id, tid); | 1156 | iwlagn_check_ratid_empty(priv, sta_id, tid); |
| @@ -1208,11 +1201,28 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb, | |||
| 1208 | if (!is_agg) | 1201 | if (!is_agg) |
| 1209 | iwlagn_non_agg_tx_status(priv, ctx, hdr->addr1); | 1202 | iwlagn_non_agg_tx_status(priv, ctx, hdr->addr1); |
| 1210 | 1203 | ||
| 1204 | /* | ||
| 1205 | * W/A for FW bug - the seq_ctl isn't updated when the | ||
| 1206 | * queues are flushed. Fetch it from the packet itself | ||
| 1207 | */ | ||
| 1208 | if (!is_agg && status == TX_STATUS_FAIL_FIFO_FLUSHED) { | ||
| 1209 | next_reclaimed = le16_to_cpu(hdr->seq_ctrl); | ||
| 1210 | next_reclaimed = | ||
| 1211 | SEQ_TO_SN(next_reclaimed + 0x10); | ||
| 1212 | } | ||
| 1213 | |||
| 1211 | is_offchannel_skb = | 1214 | is_offchannel_skb = |
| 1212 | (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN); | 1215 | (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN); |
| 1213 | freed++; | 1216 | freed++; |
| 1214 | } | 1217 | } |
| 1215 | 1218 | ||
| 1219 | if (tid != IWL_TID_NON_QOS) { | ||
| 1220 | priv->tid_data[sta_id][tid].next_reclaimed = | ||
| 1221 | next_reclaimed; | ||
| 1222 | IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n", | ||
| 1223 | next_reclaimed); | ||
| 1224 | } | ||
| 1225 | |||
| 1216 | WARN_ON(!is_agg && freed != 1); | 1226 | WARN_ON(!is_agg && freed != 1); |
| 1217 | 1227 | ||
| 1218 | /* | 1228 | /* |
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c index dad4c4aad91f..8389cd38338b 100644 --- a/drivers/net/wireless/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/iwlwifi/pcie/rx.c | |||
| @@ -1166,6 +1166,7 @@ static irqreturn_t iwl_pcie_isr(int irq, void *data) | |||
| 1166 | else if (test_bit(STATUS_INT_ENABLED, &trans_pcie->status) && | 1166 | else if (test_bit(STATUS_INT_ENABLED, &trans_pcie->status) && |
| 1167 | !trans_pcie->inta) | 1167 | !trans_pcie->inta) |
| 1168 | iwl_enable_interrupts(trans); | 1168 | iwl_enable_interrupts(trans); |
| 1169 | return IRQ_HANDLED; | ||
| 1169 | 1170 | ||
| 1170 | none: | 1171 | none: |
| 1171 | /* re-enable interrupts here since we don't have anything to service. */ | 1172 | /* re-enable interrupts here since we don't have anything to service. */ |
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index a875499f8945..efe525be27dd 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
| @@ -1709,7 +1709,7 @@ static int mwifiex_set_ibss_params(struct mwifiex_private *priv, | |||
| 1709 | NL80211_CHAN_NO_HT) | 1709 | NL80211_CHAN_NO_HT) |
| 1710 | config_bands |= BAND_GN; | 1710 | config_bands |= BAND_GN; |
| 1711 | } else { | 1711 | } else { |
| 1712 | if (cfg80211_get_chandef_type(¶ms->chandef) != | 1712 | if (cfg80211_get_chandef_type(¶ms->chandef) == |
| 1713 | NL80211_CHAN_NO_HT) | 1713 | NL80211_CHAN_NO_HT) |
| 1714 | config_bands = BAND_A; | 1714 | config_bands = BAND_A; |
| 1715 | else | 1715 | else |
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c index cb682561c438..60e88b58039d 100644 --- a/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c | |||
| @@ -56,7 +56,6 @@ int mwifiex_copy_mcast_addr(struct mwifiex_multicast_list *mlist, | |||
| 56 | */ | 56 | */ |
| 57 | int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter) | 57 | int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter) |
| 58 | { | 58 | { |
| 59 | bool cancel_flag = false; | ||
| 60 | int status; | 59 | int status; |
| 61 | struct cmd_ctrl_node *cmd_queued; | 60 | struct cmd_ctrl_node *cmd_queued; |
| 62 | 61 | ||
| @@ -70,14 +69,11 @@ int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter) | |||
| 70 | atomic_inc(&adapter->cmd_pending); | 69 | atomic_inc(&adapter->cmd_pending); |
| 71 | 70 | ||
| 72 | /* Wait for completion */ | 71 | /* Wait for completion */ |
| 73 | wait_event_interruptible(adapter->cmd_wait_q.wait, | 72 | status = wait_event_interruptible(adapter->cmd_wait_q.wait, |
| 74 | *(cmd_queued->condition)); | 73 | *(cmd_queued->condition)); |
| 75 | if (!*(cmd_queued->condition)) | 74 | if (status) { |
| 76 | cancel_flag = true; | 75 | dev_err(adapter->dev, "cmd_wait_q terminated: %d\n", status); |
| 77 | 76 | return status; | |
| 78 | if (cancel_flag) { | ||
| 79 | mwifiex_cancel_pending_ioctl(adapter); | ||
| 80 | dev_dbg(adapter->dev, "cmd cancel\n"); | ||
| 81 | } | 77 | } |
| 82 | 78 | ||
| 83 | status = adapter->cmd_wait_q.status; | 79 | status = adapter->cmd_wait_q.status; |
| @@ -496,8 +492,11 @@ int mwifiex_enable_hs(struct mwifiex_adapter *adapter) | |||
| 496 | return false; | 492 | return false; |
| 497 | } | 493 | } |
| 498 | 494 | ||
| 499 | wait_event_interruptible(adapter->hs_activate_wait_q, | 495 | if (wait_event_interruptible(adapter->hs_activate_wait_q, |
| 500 | adapter->hs_activate_wait_q_woken); | 496 | adapter->hs_activate_wait_q_woken)) { |
| 497 | dev_err(adapter->dev, "hs_activate_wait_q terminated\n"); | ||
| 498 | return false; | ||
| 499 | } | ||
| 501 | 500 | ||
| 502 | return true; | 501 | return true; |
| 503 | } | 502 | } |
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index f221b95b90b3..83564d36e801 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
| @@ -4250,9 +4250,11 @@ static int mwl8k_cmd_update_stadb_add(struct ieee80211_hw *hw, | |||
| 4250 | p->amsdu_enabled = 0; | 4250 | p->amsdu_enabled = 0; |
| 4251 | 4251 | ||
| 4252 | rc = mwl8k_post_cmd(hw, &cmd->header); | 4252 | rc = mwl8k_post_cmd(hw, &cmd->header); |
| 4253 | if (!rc) | ||
| 4254 | rc = p->station_id; | ||
| 4253 | kfree(cmd); | 4255 | kfree(cmd); |
| 4254 | 4256 | ||
| 4255 | return rc ? rc : p->station_id; | 4257 | return rc; |
| 4256 | } | 4258 | } |
| 4257 | 4259 | ||
| 4258 | static int mwl8k_cmd_update_stadb_del(struct ieee80211_hw *hw, | 4260 | static int mwl8k_cmd_update_stadb_del(struct ieee80211_hw *hw, |
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index e71c702e2eb1..800a16526c8e 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c | |||
| @@ -47,6 +47,7 @@ static struct usb_device_id p54u_table[] = { | |||
| 47 | {USB_DEVICE(0x0411, 0x0050)}, /* Buffalo WLI2-USB2-G54 */ | 47 | {USB_DEVICE(0x0411, 0x0050)}, /* Buffalo WLI2-USB2-G54 */ |
| 48 | {USB_DEVICE(0x045e, 0x00c2)}, /* Microsoft MN-710 */ | 48 | {USB_DEVICE(0x045e, 0x00c2)}, /* Microsoft MN-710 */ |
| 49 | {USB_DEVICE(0x0506, 0x0a11)}, /* 3COM 3CRWE254G72 */ | 49 | {USB_DEVICE(0x0506, 0x0a11)}, /* 3COM 3CRWE254G72 */ |
| 50 | {USB_DEVICE(0x0675, 0x0530)}, /* DrayTek Vigor 530 */ | ||
| 50 | {USB_DEVICE(0x06b9, 0x0120)}, /* Thomson SpeedTouch 120g */ | 51 | {USB_DEVICE(0x06b9, 0x0120)}, /* Thomson SpeedTouch 120g */ |
| 51 | {USB_DEVICE(0x0707, 0xee06)}, /* SMC 2862W-G */ | 52 | {USB_DEVICE(0x0707, 0xee06)}, /* SMC 2862W-G */ |
| 52 | {USB_DEVICE(0x07aa, 0x001c)}, /* Corega CG-WLUSB2GT */ | 53 | {USB_DEVICE(0x07aa, 0x001c)}, /* Corega CG-WLUSB2GT */ |
| @@ -82,6 +83,8 @@ static struct usb_device_id p54u_table[] = { | |||
| 82 | {USB_DEVICE(0x06a9, 0x000e)}, /* Westell 802.11g USB (A90-211WG-01) */ | 83 | {USB_DEVICE(0x06a9, 0x000e)}, /* Westell 802.11g USB (A90-211WG-01) */ |
| 83 | {USB_DEVICE(0x06b9, 0x0121)}, /* Thomson SpeedTouch 121g */ | 84 | {USB_DEVICE(0x06b9, 0x0121)}, /* Thomson SpeedTouch 121g */ |
| 84 | {USB_DEVICE(0x0707, 0xee13)}, /* SMC 2862W-G version 2 */ | 85 | {USB_DEVICE(0x0707, 0xee13)}, /* SMC 2862W-G version 2 */ |
| 86 | {USB_DEVICE(0x0803, 0x4310)}, /* Zoom 4410a */ | ||
| 87 | {USB_DEVICE(0x083a, 0x4503)}, /* T-Com Sinus 154 data II */ | ||
| 85 | {USB_DEVICE(0x083a, 0x4521)}, /* Siemens Gigaset USB Adapter 54 version 2 */ | 88 | {USB_DEVICE(0x083a, 0x4521)}, /* Siemens Gigaset USB Adapter 54 version 2 */ |
| 86 | {USB_DEVICE(0x083a, 0xc501)}, /* Zoom Wireless-G 4410 */ | 89 | {USB_DEVICE(0x083a, 0xc501)}, /* Zoom Wireless-G 4410 */ |
| 87 | {USB_DEVICE(0x083a, 0xf503)}, /* Accton FD7050E ver 1010ec */ | 90 | {USB_DEVICE(0x083a, 0xf503)}, /* Accton FD7050E ver 1010ec */ |
| @@ -101,6 +104,7 @@ static struct usb_device_id p54u_table[] = { | |||
| 101 | {USB_DEVICE(0x13B1, 0x000C)}, /* Linksys WUSB54AG */ | 104 | {USB_DEVICE(0x13B1, 0x000C)}, /* Linksys WUSB54AG */ |
| 102 | {USB_DEVICE(0x1413, 0x5400)}, /* Telsey 802.11g USB2.0 Adapter */ | 105 | {USB_DEVICE(0x1413, 0x5400)}, /* Telsey 802.11g USB2.0 Adapter */ |
| 103 | {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */ | 106 | {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */ |
| 107 | /* {USB_DEVICE(0x15a9, 0x0002)}, * Also SparkLAN WL-682 with 3887 */ | ||
| 104 | {USB_DEVICE(0x1668, 0x1050)}, /* Actiontec 802UIG-1 */ | 108 | {USB_DEVICE(0x1668, 0x1050)}, /* Actiontec 802UIG-1 */ |
| 105 | {USB_DEVICE(0x1740, 0x1000)}, /* Senao NUB-350 */ | 109 | {USB_DEVICE(0x1740, 0x1000)}, /* Senao NUB-350 */ |
| 106 | {USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */ | 110 | {USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */ |
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 3deacafdcd5e..4261e8ecc4c3 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
| @@ -743,6 +743,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
| 743 | 743 | ||
| 744 | done: | 744 | done: |
| 745 | bufferaddress = (*((dma_addr_t *)skb->cb)); | 745 | bufferaddress = (*((dma_addr_t *)skb->cb)); |
| 746 | if (pci_dma_mapping_error(rtlpci->pdev, bufferaddress)) | ||
| 747 | return; | ||
| 746 | tmp_one = 1; | 748 | tmp_one = 1; |
| 747 | rtlpriv->cfg->ops->set_desc((u8 *) pdesc, false, | 749 | rtlpriv->cfg->ops->set_desc((u8 *) pdesc, false, |
| 748 | HW_DESC_RXBUFF_ADDR, | 750 | HW_DESC_RXBUFF_ADDR, |
| @@ -1115,6 +1117,10 @@ static int _rtl_pci_init_rx_ring(struct ieee80211_hw *hw) | |||
| 1115 | PCI_DMA_FROMDEVICE); | 1117 | PCI_DMA_FROMDEVICE); |
| 1116 | 1118 | ||
| 1117 | bufferaddress = (*((dma_addr_t *)skb->cb)); | 1119 | bufferaddress = (*((dma_addr_t *)skb->cb)); |
| 1120 | if (pci_dma_mapping_error(rtlpci->pdev, bufferaddress)) { | ||
| 1121 | dev_kfree_skb_any(skb); | ||
| 1122 | return 1; | ||
| 1123 | } | ||
| 1118 | rtlpriv->cfg->ops->set_desc((u8 *)entry, false, | 1124 | rtlpriv->cfg->ops->set_desc((u8 *)entry, false, |
| 1119 | HW_DESC_RXBUFF_ADDR, | 1125 | HW_DESC_RXBUFF_ADDR, |
| 1120 | (u8 *)&bufferaddress); | 1126 | (u8 *)&bufferaddress); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c index 1d5d3604e3e0..246e5352f2e1 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c +++ b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c | |||
| @@ -692,7 +692,7 @@ u8 rtl92c_phy_sw_chnl(struct ieee80211_hw *hw) | |||
| 692 | if (!(is_hal_stop(rtlhal)) && !(RT_CANNOT_IO(hw))) { | 692 | if (!(is_hal_stop(rtlhal)) && !(RT_CANNOT_IO(hw))) { |
| 693 | rtl92c_phy_sw_chnl_callback(hw); | 693 | rtl92c_phy_sw_chnl_callback(hw); |
| 694 | RT_TRACE(rtlpriv, COMP_CHAN, DBG_LOUD, | 694 | RT_TRACE(rtlpriv, COMP_CHAN, DBG_LOUD, |
| 695 | "sw_chnl_inprogress false schdule workitem\n"); | 695 | "sw_chnl_inprogress false schedule workitem\n"); |
| 696 | rtlphy->sw_chnl_inprogress = false; | 696 | rtlphy->sw_chnl_inprogress = false; |
| 697 | } else { | 697 | } else { |
| 698 | RT_TRACE(rtlpriv, COMP_CHAN, DBG_LOUD, | 698 | RT_TRACE(rtlpriv, COMP_CHAN, DBG_LOUD, |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c index 173424756149..c31795e379f7 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | |||
| @@ -611,8 +611,14 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, | |||
| 611 | dma_addr_t mapping = pci_map_single(rtlpci->pdev, | 611 | dma_addr_t mapping = pci_map_single(rtlpci->pdev, |
| 612 | skb->data, skb->len, | 612 | skb->data, skb->len, |
| 613 | PCI_DMA_TODEVICE); | 613 | PCI_DMA_TODEVICE); |
| 614 | |||
| 614 | u8 bw_40 = 0; | 615 | u8 bw_40 = 0; |
| 615 | 616 | ||
| 617 | if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { | ||
| 618 | RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, | ||
| 619 | "DMA mapping error"); | ||
| 620 | return; | ||
| 621 | } | ||
| 616 | rcu_read_lock(); | 622 | rcu_read_lock(); |
| 617 | sta = get_sta(hw, mac->vif, mac->bssid); | 623 | sta = get_sta(hw, mac->vif, mac->bssid); |
| 618 | if (mac->opmode == NL80211_IFTYPE_STATION) { | 624 | if (mac->opmode == NL80211_IFTYPE_STATION) { |
| @@ -774,6 +780,11 @@ void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, | |||
| 774 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); | 780 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); |
| 775 | __le16 fc = hdr->frame_control; | 781 | __le16 fc = hdr->frame_control; |
| 776 | 782 | ||
| 783 | if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { | ||
| 784 | RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, | ||
| 785 | "DMA mapping error"); | ||
| 786 | return; | ||
| 787 | } | ||
| 777 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE); | 788 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE); |
| 778 | 789 | ||
| 779 | if (firstseg) | 790 | if (firstseg) |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c index f9f3861046c1..a0fbf284420e 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c | |||
| @@ -587,6 +587,11 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw, | |||
| 587 | buf_len = skb->len; | 587 | buf_len = skb->len; |
| 588 | mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len, | 588 | mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len, |
| 589 | PCI_DMA_TODEVICE); | 589 | PCI_DMA_TODEVICE); |
| 590 | if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { | ||
| 591 | RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, | ||
| 592 | "DMA mapping error"); | ||
| 593 | return; | ||
| 594 | } | ||
| 590 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, sizeof(struct tx_desc_92d)); | 595 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, sizeof(struct tx_desc_92d)); |
| 591 | if (ieee80211_is_nullfunc(fc) || ieee80211_is_ctl(fc)) { | 596 | if (ieee80211_is_nullfunc(fc) || ieee80211_is_ctl(fc)) { |
| 592 | firstseg = true; | 597 | firstseg = true; |
| @@ -740,6 +745,11 @@ void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, | |||
| 740 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); | 745 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); |
| 741 | __le16 fc = hdr->frame_control; | 746 | __le16 fc = hdr->frame_control; |
| 742 | 747 | ||
| 748 | if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { | ||
| 749 | RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, | ||
| 750 | "DMA mapping error"); | ||
| 751 | return; | ||
| 752 | } | ||
| 743 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE); | 753 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE); |
| 744 | if (firstseg) | 754 | if (firstseg) |
| 745 | SET_TX_DESC_OFFSET(pdesc, USB_HWDESC_HEADER_LEN); | 755 | SET_TX_DESC_OFFSET(pdesc, USB_HWDESC_HEADER_LEN); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c index 0e9f6ebf078a..206561d7282f 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c | |||
| @@ -611,6 +611,11 @@ void rtl92se_tx_fill_desc(struct ieee80211_hw *hw, | |||
| 611 | PCI_DMA_TODEVICE); | 611 | PCI_DMA_TODEVICE); |
| 612 | u8 bw_40 = 0; | 612 | u8 bw_40 = 0; |
| 613 | 613 | ||
| 614 | if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { | ||
| 615 | RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, | ||
| 616 | "DMA mapping error"); | ||
| 617 | return; | ||
| 618 | } | ||
| 614 | if (mac->opmode == NL80211_IFTYPE_STATION) { | 619 | if (mac->opmode == NL80211_IFTYPE_STATION) { |
| 615 | bw_40 = mac->bw_40; | 620 | bw_40 = mac->bw_40; |
| 616 | } else if (mac->opmode == NL80211_IFTYPE_AP || | 621 | } else if (mac->opmode == NL80211_IFTYPE_AP || |
| @@ -763,6 +768,7 @@ void rtl92se_tx_fill_desc(struct ieee80211_hw *hw, | |||
| 763 | void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, | 768 | void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, |
| 764 | bool firstseg, bool lastseg, struct sk_buff *skb) | 769 | bool firstseg, bool lastseg, struct sk_buff *skb) |
| 765 | { | 770 | { |
| 771 | struct rtl_priv *rtlpriv = rtl_priv(hw); | ||
| 766 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); | 772 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); |
| 767 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); | 773 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); |
| 768 | struct rtl_tcb_desc *tcb_desc = (struct rtl_tcb_desc *)(skb->cb); | 774 | struct rtl_tcb_desc *tcb_desc = (struct rtl_tcb_desc *)(skb->cb); |
| @@ -770,7 +776,12 @@ void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, | |||
| 770 | dma_addr_t mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len, | 776 | dma_addr_t mapping = pci_map_single(rtlpci->pdev, skb->data, skb->len, |
| 771 | PCI_DMA_TODEVICE); | 777 | PCI_DMA_TODEVICE); |
| 772 | 778 | ||
| 773 | /* Clear all status */ | 779 | if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { |
| 780 | RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, | ||
| 781 | "DMA mapping error"); | ||
| 782 | return; | ||
| 783 | } | ||
| 784 | /* Clear all status */ | ||
| 774 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_CMDDESC_SIZE_RTL8192S); | 785 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_CMDDESC_SIZE_RTL8192S); |
| 775 | 786 | ||
| 776 | /* This bit indicate this packet is used for FW download. */ | 787 | /* This bit indicate this packet is used for FW download. */ |
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/phy.c b/drivers/net/wireless/rtlwifi/rtl8723ae/phy.c index 39cc7938eedf..3d8536bb0d2b 100644 --- a/drivers/net/wireless/rtlwifi/rtl8723ae/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/phy.c | |||
| @@ -1106,7 +1106,7 @@ u8 rtl8723ae_phy_sw_chnl(struct ieee80211_hw *hw) | |||
| 1106 | if (!(is_hal_stop(rtlhal)) && !(RT_CANNOT_IO(hw))) { | 1106 | if (!(is_hal_stop(rtlhal)) && !(RT_CANNOT_IO(hw))) { |
| 1107 | rtl8723ae_phy_sw_chnl_callback(hw); | 1107 | rtl8723ae_phy_sw_chnl_callback(hw); |
| 1108 | RT_TRACE(rtlpriv, COMP_CHAN, DBG_LOUD, | 1108 | RT_TRACE(rtlpriv, COMP_CHAN, DBG_LOUD, |
| 1109 | "sw_chnl_inprogress false schdule workitem\n"); | 1109 | "sw_chnl_inprogress false schedule workitem\n"); |
| 1110 | rtlphy->sw_chnl_inprogress = false; | 1110 | rtlphy->sw_chnl_inprogress = false; |
| 1111 | } else { | 1111 | } else { |
| 1112 | RT_TRACE(rtlpriv, COMP_CHAN, DBG_LOUD, | 1112 | RT_TRACE(rtlpriv, COMP_CHAN, DBG_LOUD, |
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c b/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c index 87331d826d73..a313be8c21d2 100644 --- a/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c | |||
| @@ -387,6 +387,11 @@ void rtl8723ae_tx_fill_desc(struct ieee80211_hw *hw, | |||
| 387 | PCI_DMA_TODEVICE); | 387 | PCI_DMA_TODEVICE); |
| 388 | u8 bw_40 = 0; | 388 | u8 bw_40 = 0; |
| 389 | 389 | ||
| 390 | if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { | ||
| 391 | RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, | ||
| 392 | "DMA mapping error"); | ||
| 393 | return; | ||
| 394 | } | ||
| 390 | if (mac->opmode == NL80211_IFTYPE_STATION) { | 395 | if (mac->opmode == NL80211_IFTYPE_STATION) { |
| 391 | bw_40 = mac->bw_40; | 396 | bw_40 = mac->bw_40; |
| 392 | } else if (mac->opmode == NL80211_IFTYPE_AP || | 397 | } else if (mac->opmode == NL80211_IFTYPE_AP || |
| @@ -542,6 +547,11 @@ void rtl8723ae_tx_fill_cmddesc(struct ieee80211_hw *hw, | |||
| 542 | PCI_DMA_TODEVICE); | 547 | PCI_DMA_TODEVICE); |
| 543 | __le16 fc = hdr->frame_control; | 548 | __le16 fc = hdr->frame_control; |
| 544 | 549 | ||
| 550 | if (pci_dma_mapping_error(rtlpci->pdev, mapping)) { | ||
| 551 | RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, | ||
| 552 | "DMA mapping error"); | ||
| 553 | return; | ||
| 554 | } | ||
| 545 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE); | 555 | CLEAR_PCI_TX_DESC_CONTENT(pdesc, TX_DESC_SIZE); |
| 546 | 556 | ||
| 547 | if (firstseg) | 557 | if (firstseg) |
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c index 29f0969e4ba0..f2ecdeb3a90d 100644 --- a/drivers/net/wireless/rtlwifi/usb.c +++ b/drivers/net/wireless/rtlwifi/usb.c | |||
| @@ -210,17 +210,16 @@ static void _usb_writeN_sync(struct rtl_priv *rtlpriv, u32 addr, void *data, | |||
| 210 | u16 index = REALTEK_USB_VENQT_CMD_IDX; | 210 | u16 index = REALTEK_USB_VENQT_CMD_IDX; |
| 211 | int pipe = usb_sndctrlpipe(udev, 0); /* write_out */ | 211 | int pipe = usb_sndctrlpipe(udev, 0); /* write_out */ |
| 212 | u8 *buffer; | 212 | u8 *buffer; |
| 213 | dma_addr_t dma_addr; | ||
| 214 | 213 | ||
| 215 | wvalue = (u16)(addr&0x0000ffff); | 214 | wvalue = (u16)(addr & 0x0000ffff); |
| 216 | buffer = usb_alloc_coherent(udev, (size_t)len, GFP_ATOMIC, &dma_addr); | 215 | buffer = kmalloc(len, GFP_ATOMIC); |
| 217 | if (!buffer) | 216 | if (!buffer) |
| 218 | return; | 217 | return; |
| 219 | memcpy(buffer, data, len); | 218 | memcpy(buffer, data, len); |
| 220 | usb_control_msg(udev, pipe, request, reqtype, wvalue, | 219 | usb_control_msg(udev, pipe, request, reqtype, wvalue, |
| 221 | index, buffer, len, 50); | 220 | index, buffer, len, 50); |
| 222 | 221 | ||
| 223 | usb_free_coherent(udev, (size_t)len, buffer, dma_addr); | 222 | kfree(buffer); |
| 224 | } | 223 | } |
| 225 | 224 | ||
| 226 | static void _rtl_usb_io_handler_init(struct device *dev, | 225 | static void _rtl_usb_io_handler_init(struct device *dev, |
| @@ -640,6 +639,7 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw) | |||
| 640 | RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, | 639 | RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, |
| 641 | "Failed to prep_rx_urb!!\n"); | 640 | "Failed to prep_rx_urb!!\n"); |
| 642 | err = PTR_ERR(skb); | 641 | err = PTR_ERR(skb); |
| 642 | usb_free_urb(urb); | ||
| 643 | goto err_out; | 643 | goto err_out; |
| 644 | } | 644 | } |
| 645 | 645 | ||
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index c26e28b4bd9f..7ffa43bd7cf9 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c | |||
| @@ -1015,29 +1015,10 @@ err: | |||
| 1015 | i = xennet_fill_frags(np, skb, &tmpq); | 1015 | i = xennet_fill_frags(np, skb, &tmpq); |
| 1016 | 1016 | ||
| 1017 | /* | 1017 | /* |
| 1018 | * Truesize approximates the size of true data plus | 1018 | * Truesize is the actual allocation size, even if the |
| 1019 | * any supervisor overheads. Adding hypervisor | 1019 | * allocation is only partially used. |
| 1020 | * overheads has been shown to significantly reduce | 1020 | */ |
| 1021 | * achievable bandwidth with the default receive | 1021 | skb->truesize += PAGE_SIZE * skb_shinfo(skb)->nr_frags; |
| 1022 | * buffer size. It is therefore not wise to account | ||
| 1023 | * for it here. | ||
| 1024 | * | ||
| 1025 | * After alloc_skb(RX_COPY_THRESHOLD), truesize is set | ||
| 1026 | * to RX_COPY_THRESHOLD + the supervisor | ||
| 1027 | * overheads. Here, we add the size of the data pulled | ||
| 1028 | * in xennet_fill_frags(). | ||
| 1029 | * | ||
| 1030 | * We also adjust for any unused space in the main | ||
| 1031 | * data area by subtracting (RX_COPY_THRESHOLD - | ||
| 1032 | * len). This is especially important with drivers | ||
| 1033 | * which split incoming packets into header and data, | ||
| 1034 | * using only 66 bytes of the main data area (see the | ||
| 1035 | * e1000 driver for example.) On such systems, | ||
| 1036 | * without this last adjustement, our achievable | ||
| 1037 | * receive throughout using the standard receive | ||
| 1038 | * buffer size was cut by 25%(!!!). | ||
| 1039 | */ | ||
| 1040 | skb->truesize += skb->data_len - RX_COPY_THRESHOLD; | ||
| 1041 | skb->len += skb->data_len; | 1022 | skb->len += skb->data_len; |
| 1042 | 1023 | ||
| 1043 | if (rx->flags & XEN_NETRXF_csum_blank) | 1024 | if (rx->flags & XEN_NETRXF_csum_blank) |
diff --git a/drivers/nfc/pn544/i2c.c b/drivers/nfc/pn544/i2c.c index 7da9071b68b6..2a9c8d93d2e8 100644 --- a/drivers/nfc/pn544/i2c.c +++ b/drivers/nfc/pn544/i2c.c | |||
| @@ -361,8 +361,8 @@ static struct nfc_phy_ops i2c_phy_ops = { | |||
| 361 | .disable = pn544_hci_i2c_disable, | 361 | .disable = pn544_hci_i2c_disable, |
| 362 | }; | 362 | }; |
| 363 | 363 | ||
| 364 | static int __devinit pn544_hci_i2c_probe(struct i2c_client *client, | 364 | static int pn544_hci_i2c_probe(struct i2c_client *client, |
| 365 | const struct i2c_device_id *id) | 365 | const struct i2c_device_id *id) |
| 366 | { | 366 | { |
| 367 | struct pn544_i2c_phy *phy; | 367 | struct pn544_i2c_phy *phy; |
| 368 | struct pn544_nfc_platform_data *pdata; | 368 | struct pn544_nfc_platform_data *pdata; |
| @@ -442,7 +442,7 @@ err_phy_alloc: | |||
| 442 | return r; | 442 | return r; |
| 443 | } | 443 | } |
| 444 | 444 | ||
| 445 | static __devexit int pn544_hci_i2c_remove(struct i2c_client *client) | 445 | static int pn544_hci_i2c_remove(struct i2c_client *client) |
| 446 | { | 446 | { |
| 447 | struct pn544_i2c_phy *phy = i2c_get_clientdata(client); | 447 | struct pn544_i2c_phy *phy = i2c_get_clientdata(client); |
| 448 | struct pn544_nfc_platform_data *pdata = client->dev.platform_data; | 448 | struct pn544_nfc_platform_data *pdata = client->dev.platform_data; |
| @@ -469,7 +469,7 @@ static struct i2c_driver pn544_hci_i2c_driver = { | |||
| 469 | }, | 469 | }, |
| 470 | .probe = pn544_hci_i2c_probe, | 470 | .probe = pn544_hci_i2c_probe, |
| 471 | .id_table = pn544_hci_i2c_id_table, | 471 | .id_table = pn544_hci_i2c_id_table, |
| 472 | .remove = __devexit_p(pn544_hci_i2c_remove), | 472 | .remove = pn544_hci_i2c_remove, |
| 473 | }; | 473 | }; |
| 474 | 474 | ||
| 475 | static int __init pn544_hci_i2c_init(void) | 475 | static int __init pn544_hci_i2c_init(void) |
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index fb6a1fe21b93..8e4e86b78428 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c | |||
| @@ -430,7 +430,7 @@ static void dino_choose_irq(struct parisc_device *dev, void *ctrl) | |||
| 430 | * Cirrus 6832 Cardbus reports wrong irq on RDI Tadpole PARISC Laptop (deller@gmx.de) | 430 | * Cirrus 6832 Cardbus reports wrong irq on RDI Tadpole PARISC Laptop (deller@gmx.de) |
| 431 | * (the irqs are off-by-one, not sure yet if this is a cirrus, dino-hardware or dino-driver problem...) | 431 | * (the irqs are off-by-one, not sure yet if this is a cirrus, dino-hardware or dino-driver problem...) |
| 432 | */ | 432 | */ |
| 433 | static void __devinit quirk_cirrus_cardbus(struct pci_dev *dev) | 433 | static void quirk_cirrus_cardbus(struct pci_dev *dev) |
| 434 | { | 434 | { |
| 435 | u8 new_irq = dev->irq - 1; | 435 | u8 new_irq = dev->irq - 1; |
| 436 | printk(KERN_INFO "PCI: Cirrus Cardbus IRQ fixup for %s, from %d to %d\n", | 436 | printk(KERN_INFO "PCI: Cirrus Cardbus IRQ fixup for %s, from %d to %d\n", |
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index fdd63a6a62d6..2ef7103270bb 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | #include <linux/types.h> | 34 | #include <linux/types.h> |
| 35 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
| 36 | #include <linux/spinlock.h> | 36 | #include <linux/spinlock.h> |
| 37 | #include <linux/init.h> /* for __init and __devinit */ | 37 | #include <linux/init.h> /* for __init */ |
| 38 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
| 39 | #include <linux/ioport.h> | 39 | #include <linux/ioport.h> |
| 40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
diff --git a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c index 352f96180bc7..050773c36823 100644 --- a/drivers/parport/parport_gsc.c +++ b/drivers/parport/parport_gsc.c | |||
| @@ -137,7 +137,7 @@ struct parport_operations parport_gsc_ops = | |||
| 137 | /* | 137 | /* |
| 138 | * Checks for port existence, all ports support SPP MODE | 138 | * Checks for port existence, all ports support SPP MODE |
| 139 | */ | 139 | */ |
| 140 | static int __devinit parport_SPP_supported(struct parport *pb) | 140 | static int parport_SPP_supported(struct parport *pb) |
| 141 | { | 141 | { |
| 142 | unsigned char r, w; | 142 | unsigned char r, w; |
| 143 | 143 | ||
| @@ -201,7 +201,7 @@ static int __devinit parport_SPP_supported(struct parport *pb) | |||
| 201 | * be misdetected here is rather academic. | 201 | * be misdetected here is rather academic. |
| 202 | */ | 202 | */ |
| 203 | 203 | ||
| 204 | static int __devinit parport_PS2_supported(struct parport *pb) | 204 | static int parport_PS2_supported(struct parport *pb) |
| 205 | { | 205 | { |
| 206 | int ok = 0; | 206 | int ok = 0; |
| 207 | 207 | ||
| @@ -232,10 +232,9 @@ static int __devinit parport_PS2_supported(struct parport *pb) | |||
| 232 | 232 | ||
| 233 | /* --- Initialisation code -------------------------------- */ | 233 | /* --- Initialisation code -------------------------------- */ |
| 234 | 234 | ||
| 235 | struct parport *__devinit parport_gsc_probe_port (unsigned long base, | 235 | struct parport *parport_gsc_probe_port(unsigned long base, |
| 236 | unsigned long base_hi, | 236 | unsigned long base_hi, int irq, |
| 237 | int irq, int dma, | 237 | int dma, struct pci_dev *dev) |
| 238 | struct pci_dev *dev) | ||
| 239 | { | 238 | { |
| 240 | struct parport_gsc_private *priv; | 239 | struct parport_gsc_private *priv; |
| 241 | struct parport_operations *ops; | 240 | struct parport_operations *ops; |
| @@ -345,9 +344,9 @@ struct parport *__devinit parport_gsc_probe_port (unsigned long base, | |||
| 345 | 344 | ||
| 346 | #define PARPORT_GSC_OFFSET 0x800 | 345 | #define PARPORT_GSC_OFFSET 0x800 |
| 347 | 346 | ||
| 348 | static int __devinitdata parport_count; | 347 | static int parport_count; |
| 349 | 348 | ||
| 350 | static int __devinit parport_init_chip(struct parisc_device *dev) | 349 | static int parport_init_chip(struct parisc_device *dev) |
| 351 | { | 350 | { |
| 352 | struct parport *p; | 351 | struct parport *p; |
| 353 | unsigned long port; | 352 | unsigned long port; |
| @@ -382,7 +381,7 @@ static int __devinit parport_init_chip(struct parisc_device *dev) | |||
| 382 | return 0; | 381 | return 0; |
| 383 | } | 382 | } |
| 384 | 383 | ||
| 385 | static int __devexit parport_remove_chip(struct parisc_device *dev) | 384 | static int parport_remove_chip(struct parisc_device *dev) |
| 386 | { | 385 | { |
| 387 | struct parport *p = dev_get_drvdata(&dev->dev); | 386 | struct parport *p = dev_get_drvdata(&dev->dev); |
| 388 | if (p) { | 387 | if (p) { |
| @@ -415,15 +414,15 @@ static struct parisc_driver parport_driver = { | |||
| 415 | .name = "Parallel", | 414 | .name = "Parallel", |
| 416 | .id_table = parport_tbl, | 415 | .id_table = parport_tbl, |
| 417 | .probe = parport_init_chip, | 416 | .probe = parport_init_chip, |
| 418 | .remove = __devexit_p(parport_remove_chip), | 417 | .remove = parport_remove_chip, |
| 419 | }; | 418 | }; |
| 420 | 419 | ||
| 421 | int __devinit parport_gsc_init(void) | 420 | int parport_gsc_init(void) |
| 422 | { | 421 | { |
| 423 | return register_parisc_driver(&parport_driver); | 422 | return register_parisc_driver(&parport_driver); |
| 424 | } | 423 | } |
| 425 | 424 | ||
| 426 | static void __devexit parport_gsc_exit(void) | 425 | static void parport_gsc_exit(void) |
| 427 | { | 426 | { |
| 428 | unregister_parisc_driver(&parport_driver); | 427 | unregister_parisc_driver(&parport_driver); |
| 429 | } | 428 | } |
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index 5abffe58a9d2..903e1285fda0 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c | |||
| @@ -953,7 +953,7 @@ static struct superio_struct *find_free_superio(void) | |||
| 953 | 953 | ||
| 954 | 954 | ||
| 955 | /* Super-IO chipset detection, Winbond, SMSC */ | 955 | /* Super-IO chipset detection, Winbond, SMSC */ |
| 956 | static void __devinit show_parconfig_smsc37c669(int io, int key) | 956 | static void show_parconfig_smsc37c669(int io, int key) |
| 957 | { | 957 | { |
| 958 | int cr1, cr4, cra, cr23, cr26, cr27; | 958 | int cr1, cr4, cra, cr23, cr26, cr27; |
| 959 | struct superio_struct *s; | 959 | struct superio_struct *s; |
| @@ -1038,7 +1038,7 @@ static void __devinit show_parconfig_smsc37c669(int io, int key) | |||
| 1038 | } | 1038 | } |
| 1039 | 1039 | ||
| 1040 | 1040 | ||
| 1041 | static void __devinit show_parconfig_winbond(int io, int key) | 1041 | static void show_parconfig_winbond(int io, int key) |
| 1042 | { | 1042 | { |
| 1043 | int cr30, cr60, cr61, cr70, cr74, crf0; | 1043 | int cr30, cr60, cr61, cr70, cr74, crf0; |
| 1044 | struct superio_struct *s; | 1044 | struct superio_struct *s; |
| @@ -1106,8 +1106,7 @@ static void __devinit show_parconfig_winbond(int io, int key) | |||
| 1106 | } | 1106 | } |
| 1107 | } | 1107 | } |
| 1108 | 1108 | ||
| 1109 | static void __devinit decode_winbond(int efer, int key, int devid, | 1109 | static void decode_winbond(int efer, int key, int devid, int devrev, int oldid) |
| 1110 | int devrev, int oldid) | ||
| 1111 | { | 1110 | { |
| 1112 | const char *type = "unknown"; | 1111 | const char *type = "unknown"; |
| 1113 | int id, progif = 2; | 1112 | int id, progif = 2; |
| @@ -1159,7 +1158,7 @@ static void __devinit decode_winbond(int efer, int key, int devid, | |||
| 1159 | show_parconfig_winbond(efer, key); | 1158 | show_parconfig_winbond(efer, key); |
| 1160 | } | 1159 | } |
| 1161 | 1160 | ||
| 1162 | static void __devinit decode_smsc(int efer, int key, int devid, int devrev) | 1161 | static void decode_smsc(int efer, int key, int devid, int devrev) |
| 1163 | { | 1162 | { |
| 1164 | const char *type = "unknown"; | 1163 | const char *type = "unknown"; |
| 1165 | void (*func)(int io, int key); | 1164 | void (*func)(int io, int key); |
| @@ -1193,7 +1192,7 @@ static void __devinit decode_smsc(int efer, int key, int devid, int devrev) | |||
| 1193 | } | 1192 | } |
| 1194 | 1193 | ||
| 1195 | 1194 | ||
| 1196 | static void __devinit winbond_check(int io, int key) | 1195 | static void winbond_check(int io, int key) |
| 1197 | { | 1196 | { |
| 1198 | int origval, devid, devrev, oldid, x_devid, x_devrev, x_oldid; | 1197 | int origval, devid, devrev, oldid, x_devid, x_devrev, x_oldid; |
| 1199 | 1198 | ||
| @@ -1231,7 +1230,7 @@ out: | |||
| 1231 | release_region(io, 3); | 1230 | release_region(io, 3); |
| 1232 | } | 1231 | } |
| 1233 | 1232 | ||
| 1234 | static void __devinit winbond_check2(int io, int key) | 1233 | static void winbond_check2(int io, int key) |
| 1235 | { | 1234 | { |
| 1236 | int origval[3], devid, devrev, oldid, x_devid, x_devrev, x_oldid; | 1235 | int origval[3], devid, devrev, oldid, x_devid, x_devrev, x_oldid; |
| 1237 | 1236 | ||
| @@ -1272,7 +1271,7 @@ out: | |||
| 1272 | release_region(io, 3); | 1271 | release_region(io, 3); |
| 1273 | } | 1272 | } |
| 1274 | 1273 | ||
| 1275 | static void __devinit smsc_check(int io, int key) | 1274 | static void smsc_check(int io, int key) |
| 1276 | { | 1275 | { |
| 1277 | int origval, id, rev, oldid, oldrev, x_id, x_rev, x_oldid, x_oldrev; | 1276 | int origval, id, rev, oldid, oldrev, x_id, x_rev, x_oldid, x_oldrev; |
| 1278 | 1277 | ||
| @@ -1316,7 +1315,7 @@ out: | |||
| 1316 | } | 1315 | } |
| 1317 | 1316 | ||
| 1318 | 1317 | ||
| 1319 | static void __devinit detect_and_report_winbond(void) | 1318 | static void detect_and_report_winbond(void) |
| 1320 | { | 1319 | { |
| 1321 | if (verbose_probing) | 1320 | if (verbose_probing) |
| 1322 | printk(KERN_DEBUG "Winbond Super-IO detection, now testing ports 3F0,370,250,4E,2E ...\n"); | 1321 | printk(KERN_DEBUG "Winbond Super-IO detection, now testing ports 3F0,370,250,4E,2E ...\n"); |
| @@ -1329,7 +1328,7 @@ static void __devinit detect_and_report_winbond(void) | |||
| 1329 | winbond_check2(0x250, 0x89); | 1328 | winbond_check2(0x250, 0x89); |
| 1330 | } | 1329 | } |
| 1331 | 1330 | ||
| 1332 | static void __devinit detect_and_report_smsc(void) | 1331 | static void detect_and_report_smsc(void) |
| 1333 | { | 1332 | { |
| 1334 | if (verbose_probing) | 1333 | if (verbose_probing) |
| 1335 | printk(KERN_DEBUG "SMSC Super-IO detection, now testing Ports 2F0, 370 ...\n"); | 1334 | printk(KERN_DEBUG "SMSC Super-IO detection, now testing Ports 2F0, 370 ...\n"); |
| @@ -1339,7 +1338,7 @@ static void __devinit detect_and_report_smsc(void) | |||
| 1339 | smsc_check(0x370, 0x44); | 1338 | smsc_check(0x370, 0x44); |
| 1340 | } | 1339 | } |
| 1341 | 1340 | ||
| 1342 | static void __devinit detect_and_report_it87(void) | 1341 | static void detect_and_report_it87(void) |
| 1343 | { | 1342 | { |
| 1344 | u16 dev; | 1343 | u16 dev; |
| 1345 | u8 origval, r; | 1344 | u8 origval, r; |
| @@ -1796,24 +1795,24 @@ static int parport_ECPEPP_supported(struct parport *pb) | |||
| 1796 | #else /* No IEEE 1284 support */ | 1795 | #else /* No IEEE 1284 support */ |
| 1797 | 1796 | ||
| 1798 | /* Don't bother probing for modes we know we won't use. */ | 1797 | /* Don't bother probing for modes we know we won't use. */ |
| 1799 | static int __devinit parport_PS2_supported(struct parport *pb) { return 0; } | 1798 | static int parport_PS2_supported(struct parport *pb) { return 0; } |
| 1800 | #ifdef CONFIG_PARPORT_PC_FIFO | 1799 | #ifdef CONFIG_PARPORT_PC_FIFO |
| 1801 | static int parport_ECP_supported(struct parport *pb) | 1800 | static int parport_ECP_supported(struct parport *pb) |
| 1802 | { | 1801 | { |
| 1803 | return 0; | 1802 | return 0; |
| 1804 | } | 1803 | } |
| 1805 | #endif | 1804 | #endif |
| 1806 | static int __devinit parport_EPP_supported(struct parport *pb) | 1805 | static int parport_EPP_supported(struct parport *pb) |
| 1807 | { | 1806 | { |
| 1808 | return 0; | 1807 | return 0; |
| 1809 | } | 1808 | } |
| 1810 | 1809 | ||
| 1811 | static int __devinit parport_ECPEPP_supported(struct parport *pb) | 1810 | static int parport_ECPEPP_supported(struct parport *pb) |
| 1812 | { | 1811 | { |
| 1813 | return 0; | 1812 | return 0; |
| 1814 | } | 1813 | } |
| 1815 | 1814 | ||
| 1816 | static int __devinit parport_ECPPS2_supported(struct parport *pb) | 1815 | static int parport_ECPPS2_supported(struct parport *pb) |
| 1817 | { | 1816 | { |
| 1818 | return 0; | 1817 | return 0; |
| 1819 | } | 1818 | } |
| @@ -2269,9 +2268,8 @@ EXPORT_SYMBOL(parport_pc_unregister_port); | |||
| 2269 | #ifdef CONFIG_PCI | 2268 | #ifdef CONFIG_PCI |
| 2270 | 2269 | ||
| 2271 | /* ITE support maintained by Rich Liu <richliu@poorman.org> */ | 2270 | /* ITE support maintained by Rich Liu <richliu@poorman.org> */ |
| 2272 | static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq, | 2271 | static int sio_ite_8872_probe(struct pci_dev *pdev, int autoirq, int autodma, |
| 2273 | int autodma, | 2272 | const struct parport_pc_via_data *via) |
| 2274 | const struct parport_pc_via_data *via) | ||
| 2275 | { | 2273 | { |
| 2276 | short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 }; | 2274 | short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 }; |
| 2277 | u32 ite8872set; | 2275 | u32 ite8872set; |
| @@ -2377,10 +2375,10 @@ static int __devinit sio_ite_8872_probe(struct pci_dev *pdev, int autoirq, | |||
| 2377 | 2375 | ||
| 2378 | /* VIA 8231 support by Pavel Fedin <sonic_amiga@rambler.ru> | 2376 | /* VIA 8231 support by Pavel Fedin <sonic_amiga@rambler.ru> |
| 2379 | based on VIA 686a support code by Jeff Garzik <jgarzik@pobox.com> */ | 2377 | based on VIA 686a support code by Jeff Garzik <jgarzik@pobox.com> */ |
| 2380 | static int __devinitdata parport_init_mode; | 2378 | static int parport_init_mode; |
| 2381 | 2379 | ||
| 2382 | /* Data for two known VIA chips */ | 2380 | /* Data for two known VIA chips */ |
| 2383 | static struct parport_pc_via_data via_686a_data __devinitdata = { | 2381 | static struct parport_pc_via_data via_686a_data = { |
| 2384 | 0x51, | 2382 | 0x51, |
| 2385 | 0x50, | 2383 | 0x50, |
| 2386 | 0x85, | 2384 | 0x85, |
| @@ -2389,7 +2387,7 @@ static struct parport_pc_via_data via_686a_data __devinitdata = { | |||
| 2389 | 0xF0, | 2387 | 0xF0, |
| 2390 | 0xE6 | 2388 | 0xE6 |
| 2391 | }; | 2389 | }; |
| 2392 | static struct parport_pc_via_data via_8231_data __devinitdata = { | 2390 | static struct parport_pc_via_data via_8231_data = { |
| 2393 | 0x45, | 2391 | 0x45, |
| 2394 | 0x44, | 2392 | 0x44, |
| 2395 | 0x50, | 2393 | 0x50, |
| @@ -2399,9 +2397,8 @@ static struct parport_pc_via_data via_8231_data __devinitdata = { | |||
| 2399 | 0xF6 | 2397 | 0xF6 |
| 2400 | }; | 2398 | }; |
| 2401 | 2399 | ||
| 2402 | static int __devinit sio_via_probe(struct pci_dev *pdev, int autoirq, | 2400 | static int sio_via_probe(struct pci_dev *pdev, int autoirq, int autodma, |
| 2403 | int autodma, | 2401 | const struct parport_pc_via_data *via) |
| 2404 | const struct parport_pc_via_data *via) | ||
| 2405 | { | 2402 | { |
| 2406 | u8 tmp, tmp2, siofunc; | 2403 | u8 tmp, tmp2, siofunc; |
| 2407 | u8 ppcontrol = 0; | 2404 | u8 ppcontrol = 0; |
| @@ -2575,7 +2572,7 @@ static struct parport_pc_superio { | |||
| 2575 | int (*probe) (struct pci_dev *pdev, int autoirq, int autodma, | 2572 | int (*probe) (struct pci_dev *pdev, int autoirq, int autodma, |
| 2576 | const struct parport_pc_via_data *via); | 2573 | const struct parport_pc_via_data *via); |
| 2577 | const struct parport_pc_via_data *via; | 2574 | const struct parport_pc_via_data *via; |
| 2578 | } parport_pc_superio_info[] __devinitdata = { | 2575 | } parport_pc_superio_info[] = { |
| 2579 | { sio_via_probe, &via_686a_data, }, | 2576 | { sio_via_probe, &via_686a_data, }, |
| 2580 | { sio_via_probe, &via_8231_data, }, | 2577 | { sio_via_probe, &via_8231_data, }, |
| 2581 | { sio_ite_8872_probe, NULL, }, | 2578 | { sio_ite_8872_probe, NULL, }, |
| @@ -2860,7 +2857,7 @@ static int parport_pc_pci_probe(struct pci_dev *dev, | |||
| 2860 | return -ENODEV; | 2857 | return -ENODEV; |
| 2861 | } | 2858 | } |
| 2862 | 2859 | ||
| 2863 | static void __devexit parport_pc_pci_remove(struct pci_dev *dev) | 2860 | static void parport_pc_pci_remove(struct pci_dev *dev) |
| 2864 | { | 2861 | { |
| 2865 | struct pci_parport_data *data = pci_get_drvdata(dev); | 2862 | struct pci_parport_data *data = pci_get_drvdata(dev); |
| 2866 | int i; | 2863 | int i; |
| @@ -2879,7 +2876,7 @@ static struct pci_driver parport_pc_pci_driver = { | |||
| 2879 | .name = "parport_pc", | 2876 | .name = "parport_pc", |
| 2880 | .id_table = parport_pc_pci_tbl, | 2877 | .id_table = parport_pc_pci_tbl, |
| 2881 | .probe = parport_pc_pci_probe, | 2878 | .probe = parport_pc_pci_probe, |
| 2882 | .remove = __devexit_p(parport_pc_pci_remove), | 2879 | .remove = parport_pc_pci_remove, |
| 2883 | }; | 2880 | }; |
| 2884 | 2881 | ||
| 2885 | static int __init parport_pc_init_superio(int autoirq, int autodma) | 2882 | static int __init parport_pc_init_superio(int autoirq, int autodma) |
| @@ -2983,7 +2980,7 @@ static struct pnp_driver parport_pc_pnp_driver = { | |||
| 2983 | static struct pnp_driver parport_pc_pnp_driver; | 2980 | static struct pnp_driver parport_pc_pnp_driver; |
| 2984 | #endif /* CONFIG_PNP */ | 2981 | #endif /* CONFIG_PNP */ |
| 2985 | 2982 | ||
| 2986 | static int __devinit parport_pc_platform_probe(struct platform_device *pdev) | 2983 | static int parport_pc_platform_probe(struct platform_device *pdev) |
| 2987 | { | 2984 | { |
| 2988 | /* Always succeed, the actual probing is done in | 2985 | /* Always succeed, the actual probing is done in |
| 2989 | * parport_pc_probe_port(). */ | 2986 | * parport_pc_probe_port(). */ |
| @@ -2999,7 +2996,7 @@ static struct platform_driver parport_pc_platform_driver = { | |||
| 2999 | }; | 2996 | }; |
| 3000 | 2997 | ||
| 3001 | /* This is called by parport_pc_find_nonpci_ports (in asm/parport.h) */ | 2998 | /* This is called by parport_pc_find_nonpci_ports (in asm/parport.h) */ |
| 3002 | static int __devinit __attribute__((unused)) | 2999 | static int __attribute__((unused)) |
| 3003 | parport_pc_find_isa_ports(int autoirq, int autodma) | 3000 | parport_pc_find_isa_ports(int autoirq, int autodma) |
| 3004 | { | 3001 | { |
| 3005 | int count = 0; | 3002 | int count = 0; |
diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c index 1631eeaf440e..ef6169adb845 100644 --- a/drivers/parport/parport_serial.c +++ b/drivers/parport/parport_serial.c | |||
| @@ -87,7 +87,8 @@ struct parport_pc_pci { | |||
| 87 | struct parport_pc_pci *card, int failed); | 87 | struct parport_pc_pci *card, int failed); |
| 88 | }; | 88 | }; |
| 89 | 89 | ||
| 90 | static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc_pci *par, int autoirq, int autodma) | 90 | static int netmos_parallel_init(struct pci_dev *dev, struct parport_pc_pci *par, |
| 91 | int autoirq, int autodma) | ||
| 91 | { | 92 | { |
| 92 | /* the rule described below doesn't hold for this device */ | 93 | /* the rule described below doesn't hold for this device */ |
| 93 | if (dev->device == PCI_DEVICE_ID_NETMOS_9835 && | 94 | if (dev->device == PCI_DEVICE_ID_NETMOS_9835 && |
| @@ -111,7 +112,7 @@ static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc | |||
| 111 | return 0; | 112 | return 0; |
| 112 | } | 113 | } |
| 113 | 114 | ||
| 114 | static struct parport_pc_pci cards[] __devinitdata = { | 115 | static struct parport_pc_pci cards[] = { |
| 115 | /* titan_110l */ { 1, { { 3, -1 }, } }, | 116 | /* titan_110l */ { 1, { { 3, -1 }, } }, |
| 116 | /* titan_210l */ { 1, { { 3, -1 }, } }, | 117 | /* titan_210l */ { 1, { { 3, -1 }, } }, |
| 117 | /* netmos_9xx5_combo */ { 1, { { 2, -1 }, }, netmos_parallel_init }, | 118 | /* netmos_9xx5_combo */ { 1, { { 2, -1 }, }, netmos_parallel_init }, |
| @@ -258,7 +259,7 @@ MODULE_DEVICE_TABLE(pci,parport_serial_pci_tbl); | |||
| 258 | * Cards not tested are marked n/t | 259 | * Cards not tested are marked n/t |
| 259 | * If you have one of these cards and it works for you, please tell me.. | 260 | * If you have one of these cards and it works for you, please tell me.. |
| 260 | */ | 261 | */ |
| 261 | static struct pciserial_board pci_parport_serial_boards[] __devinitdata = { | 262 | static struct pciserial_board pci_parport_serial_boards[] = { |
| 262 | [titan_110l] = { | 263 | [titan_110l] = { |
| 263 | .flags = FL_BASE1 | FL_BASE_BARS, | 264 | .flags = FL_BASE1 | FL_BASE_BARS, |
| 264 | .num_ports = 1, | 265 | .num_ports = 1, |
| @@ -479,8 +480,7 @@ struct parport_serial_private { | |||
| 479 | }; | 480 | }; |
| 480 | 481 | ||
| 481 | /* Register the serial port(s) of a PCI card. */ | 482 | /* Register the serial port(s) of a PCI card. */ |
| 482 | static int __devinit serial_register (struct pci_dev *dev, | 483 | static int serial_register(struct pci_dev *dev, const struct pci_device_id *id) |
| 483 | const struct pci_device_id *id) | ||
| 484 | { | 484 | { |
| 485 | struct parport_serial_private *priv = pci_get_drvdata (dev); | 485 | struct parport_serial_private *priv = pci_get_drvdata (dev); |
| 486 | struct pciserial_board *board; | 486 | struct pciserial_board *board; |
| @@ -501,8 +501,7 @@ static int __devinit serial_register (struct pci_dev *dev, | |||
| 501 | } | 501 | } |
| 502 | 502 | ||
| 503 | /* Register the parallel port(s) of a PCI card. */ | 503 | /* Register the parallel port(s) of a PCI card. */ |
| 504 | static int __devinit parport_register (struct pci_dev *dev, | 504 | static int parport_register(struct pci_dev *dev, const struct pci_device_id *id) |
| 505 | const struct pci_device_id *id) | ||
| 506 | { | 505 | { |
| 507 | struct parport_pc_pci *card; | 506 | struct parport_pc_pci *card; |
| 508 | struct parport_serial_private *priv = pci_get_drvdata (dev); | 507 | struct parport_serial_private *priv = pci_get_drvdata (dev); |
| @@ -563,8 +562,8 @@ static int __devinit parport_register (struct pci_dev *dev, | |||
| 563 | return 0; | 562 | return 0; |
| 564 | } | 563 | } |
| 565 | 564 | ||
| 566 | static int __devinit parport_serial_pci_probe (struct pci_dev *dev, | 565 | static int parport_serial_pci_probe(struct pci_dev *dev, |
| 567 | const struct pci_device_id *id) | 566 | const struct pci_device_id *id) |
| 568 | { | 567 | { |
| 569 | struct parport_serial_private *priv; | 568 | struct parport_serial_private *priv; |
| 570 | int err; | 569 | int err; |
| @@ -599,7 +598,7 @@ static int __devinit parport_serial_pci_probe (struct pci_dev *dev, | |||
| 599 | return 0; | 598 | return 0; |
| 600 | } | 599 | } |
| 601 | 600 | ||
| 602 | static void __devexit parport_serial_pci_remove (struct pci_dev *dev) | 601 | static void parport_serial_pci_remove(struct pci_dev *dev) |
| 603 | { | 602 | { |
| 604 | struct parport_serial_private *priv = pci_get_drvdata (dev); | 603 | struct parport_serial_private *priv = pci_get_drvdata (dev); |
| 605 | int i; | 604 | int i; |
| @@ -664,7 +663,7 @@ static struct pci_driver parport_serial_pci_driver = { | |||
| 664 | .name = "parport_serial", | 663 | .name = "parport_serial", |
| 665 | .id_table = parport_serial_pci_tbl, | 664 | .id_table = parport_serial_pci_tbl, |
| 666 | .probe = parport_serial_pci_probe, | 665 | .probe = parport_serial_pci_probe, |
| 667 | .remove = __devexit_p(parport_serial_pci_remove), | 666 | .remove = parport_serial_pci_remove, |
| 668 | #ifdef CONFIG_PM | 667 | #ifdef CONFIG_PM |
| 669 | .suspend = parport_serial_pci_suspend, | 668 | .suspend = parport_serial_pci_suspend, |
| 670 | .resume = parport_serial_pci_resume, | 669 | .resume = parport_serial_pci_resume, |
diff --git a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c index 983a2d2df659..5c4b6a1db6ca 100644 --- a/drivers/parport/parport_sunbpp.c +++ b/drivers/parport/parport_sunbpp.c | |||
| @@ -265,7 +265,7 @@ static struct parport_operations parport_sunbpp_ops = | |||
| 265 | .owner = THIS_MODULE, | 265 | .owner = THIS_MODULE, |
| 266 | }; | 266 | }; |
| 267 | 267 | ||
| 268 | static int __devinit bpp_probe(struct platform_device *op) | 268 | static int bpp_probe(struct platform_device *op) |
| 269 | { | 269 | { |
| 270 | struct parport_operations *ops; | 270 | struct parport_operations *ops; |
| 271 | struct bpp_regs __iomem *regs; | 271 | struct bpp_regs __iomem *regs; |
| @@ -330,7 +330,7 @@ out_unmap: | |||
| 330 | return err; | 330 | return err; |
| 331 | } | 331 | } |
| 332 | 332 | ||
| 333 | static int __devexit bpp_remove(struct platform_device *op) | 333 | static int bpp_remove(struct platform_device *op) |
| 334 | { | 334 | { |
| 335 | struct parport *p = dev_get_drvdata(&op->dev); | 335 | struct parport *p = dev_get_drvdata(&op->dev); |
| 336 | struct parport_operations *ops = p->ops; | 336 | struct parport_operations *ops = p->ops; |
| @@ -367,7 +367,7 @@ static struct platform_driver bpp_sbus_driver = { | |||
| 367 | .of_match_table = bpp_match, | 367 | .of_match_table = bpp_match, |
| 368 | }, | 368 | }, |
| 369 | .probe = bpp_probe, | 369 | .probe = bpp_probe, |
| 370 | .remove = __devexit_p(bpp_remove), | 370 | .remove = bpp_remove, |
| 371 | }; | 371 | }; |
| 372 | 372 | ||
| 373 | module_platform_driver(bpp_sbus_driver); | 373 | module_platform_driver(bpp_sbus_driver); |
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index bafd2bbcaf65..c18e5bf444fa 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c | |||
| @@ -739,7 +739,7 @@ EXPORT_SYMBOL_GPL(pci_num_vf); | |||
| 739 | /** | 739 | /** |
| 740 | * pci_sriov_set_totalvfs -- reduce the TotalVFs available | 740 | * pci_sriov_set_totalvfs -- reduce the TotalVFs available |
| 741 | * @dev: the PCI PF device | 741 | * @dev: the PCI PF device |
| 742 | * numvfs: number that should be used for TotalVFs supported | 742 | * @numvfs: number that should be used for TotalVFs supported |
| 743 | * | 743 | * |
| 744 | * Should be called from PF driver's probe routine with | 744 | * Should be called from PF driver's probe routine with |
| 745 | * device's mutex held. | 745 | * device's mutex held. |
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 5cdee8669ea3..59f5a965bdc4 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c | |||
| @@ -700,7 +700,7 @@ static struct pinctrl *create_pinctrl(struct device *dev) | |||
| 700 | } | 700 | } |
| 701 | } | 701 | } |
| 702 | 702 | ||
| 703 | /* Add the pinmux to the global list */ | 703 | /* Add the pinctrl handle to the global list */ |
| 704 | list_add_tail(&p->node, &pinctrl_list); | 704 | list_add_tail(&p->node, &pinctrl_list); |
| 705 | 705 | ||
| 706 | return p; | 706 | return p; |
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-370.c b/drivers/pinctrl/mvebu/pinctrl-armada-370.c index c907647de6ad..48e21a229483 100644 --- a/drivers/pinctrl/mvebu/pinctrl-armada-370.c +++ b/drivers/pinctrl/mvebu/pinctrl-armada-370.c | |||
| @@ -367,7 +367,7 @@ static struct mvebu_mpp_mode mv88f6710_mpp_modes[] = { | |||
| 367 | 367 | ||
| 368 | static struct mvebu_pinctrl_soc_info armada_370_pinctrl_info; | 368 | static struct mvebu_pinctrl_soc_info armada_370_pinctrl_info; |
| 369 | 369 | ||
| 370 | static struct of_device_id armada_370_pinctrl_of_match[] __devinitdata = { | 370 | static struct of_device_id armada_370_pinctrl_of_match[] = { |
| 371 | { .compatible = "marvell,mv88f6710-pinctrl" }, | 371 | { .compatible = "marvell,mv88f6710-pinctrl" }, |
| 372 | { }, | 372 | { }, |
| 373 | }; | 373 | }; |
| @@ -382,7 +382,7 @@ static struct pinctrl_gpio_range mv88f6710_mpp_gpio_ranges[] = { | |||
| 382 | MPP_GPIO_RANGE(2, 64, 64, 2), | 382 | MPP_GPIO_RANGE(2, 64, 64, 2), |
| 383 | }; | 383 | }; |
| 384 | 384 | ||
| 385 | static int __devinit armada_370_pinctrl_probe(struct platform_device *pdev) | 385 | static int armada_370_pinctrl_probe(struct platform_device *pdev) |
| 386 | { | 386 | { |
| 387 | struct mvebu_pinctrl_soc_info *soc = &armada_370_pinctrl_info; | 387 | struct mvebu_pinctrl_soc_info *soc = &armada_370_pinctrl_info; |
| 388 | 388 | ||
| @@ -399,7 +399,7 @@ static int __devinit armada_370_pinctrl_probe(struct platform_device *pdev) | |||
| 399 | return mvebu_pinctrl_probe(pdev); | 399 | return mvebu_pinctrl_probe(pdev); |
| 400 | } | 400 | } |
| 401 | 401 | ||
| 402 | static int __devexit armada_370_pinctrl_remove(struct platform_device *pdev) | 402 | static int armada_370_pinctrl_remove(struct platform_device *pdev) |
| 403 | { | 403 | { |
| 404 | return mvebu_pinctrl_remove(pdev); | 404 | return mvebu_pinctrl_remove(pdev); |
| 405 | } | 405 | } |
| @@ -411,7 +411,7 @@ static struct platform_driver armada_370_pinctrl_driver = { | |||
| 411 | .of_match_table = of_match_ptr(armada_370_pinctrl_of_match), | 411 | .of_match_table = of_match_ptr(armada_370_pinctrl_of_match), |
| 412 | }, | 412 | }, |
| 413 | .probe = armada_370_pinctrl_probe, | 413 | .probe = armada_370_pinctrl_probe, |
| 414 | .remove = __devexit_p(armada_370_pinctrl_remove), | 414 | .remove = armada_370_pinctrl_remove, |
| 415 | }; | 415 | }; |
| 416 | 416 | ||
| 417 | module_platform_driver(armada_370_pinctrl_driver); | 417 | module_platform_driver(armada_370_pinctrl_driver); |
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-xp.c b/drivers/pinctrl/mvebu/pinctrl-armada-xp.c index 40bd52a46b4e..ab5dc04b3e8a 100644 --- a/drivers/pinctrl/mvebu/pinctrl-armada-xp.c +++ b/drivers/pinctrl/mvebu/pinctrl-armada-xp.c | |||
| @@ -349,7 +349,7 @@ static struct mvebu_mpp_mode armada_xp_mpp_modes[] = { | |||
| 349 | 349 | ||
| 350 | static struct mvebu_pinctrl_soc_info armada_xp_pinctrl_info; | 350 | static struct mvebu_pinctrl_soc_info armada_xp_pinctrl_info; |
| 351 | 351 | ||
| 352 | static struct of_device_id armada_xp_pinctrl_of_match[] __devinitdata = { | 352 | static struct of_device_id armada_xp_pinctrl_of_match[] = { |
| 353 | { | 353 | { |
| 354 | .compatible = "marvell,mv78230-pinctrl", | 354 | .compatible = "marvell,mv78230-pinctrl", |
| 355 | .data = (void *) V_MV78230, | 355 | .data = (void *) V_MV78230, |
| @@ -394,7 +394,7 @@ static struct pinctrl_gpio_range mv78460_mpp_gpio_ranges[] = { | |||
| 394 | MPP_GPIO_RANGE(2, 64, 64, 3), | 394 | MPP_GPIO_RANGE(2, 64, 64, 3), |
| 395 | }; | 395 | }; |
| 396 | 396 | ||
| 397 | static int __devinit armada_xp_pinctrl_probe(struct platform_device *pdev) | 397 | static int armada_xp_pinctrl_probe(struct platform_device *pdev) |
| 398 | { | 398 | { |
| 399 | struct mvebu_pinctrl_soc_info *soc = &armada_xp_pinctrl_info; | 399 | struct mvebu_pinctrl_soc_info *soc = &armada_xp_pinctrl_info; |
| 400 | const struct of_device_id *match = | 400 | const struct of_device_id *match = |
| @@ -446,7 +446,7 @@ static int __devinit armada_xp_pinctrl_probe(struct platform_device *pdev) | |||
| 446 | return mvebu_pinctrl_probe(pdev); | 446 | return mvebu_pinctrl_probe(pdev); |
| 447 | } | 447 | } |
| 448 | 448 | ||
| 449 | static int __devexit armada_xp_pinctrl_remove(struct platform_device *pdev) | 449 | static int armada_xp_pinctrl_remove(struct platform_device *pdev) |
| 450 | { | 450 | { |
| 451 | return mvebu_pinctrl_remove(pdev); | 451 | return mvebu_pinctrl_remove(pdev); |
| 452 | } | 452 | } |
| @@ -458,7 +458,7 @@ static struct platform_driver armada_xp_pinctrl_driver = { | |||
| 458 | .of_match_table = of_match_ptr(armada_xp_pinctrl_of_match), | 458 | .of_match_table = of_match_ptr(armada_xp_pinctrl_of_match), |
| 459 | }, | 459 | }, |
| 460 | .probe = armada_xp_pinctrl_probe, | 460 | .probe = armada_xp_pinctrl_probe, |
| 461 | .remove = __devexit_p(armada_xp_pinctrl_remove), | 461 | .remove = armada_xp_pinctrl_remove, |
| 462 | }; | 462 | }; |
| 463 | 463 | ||
| 464 | module_platform_driver(armada_xp_pinctrl_driver); | 464 | module_platform_driver(armada_xp_pinctrl_driver); |
diff --git a/drivers/pinctrl/mvebu/pinctrl-dove.c b/drivers/pinctrl/mvebu/pinctrl-dove.c index 40c9c3eecd94..69aba3697287 100644 --- a/drivers/pinctrl/mvebu/pinctrl-dove.c +++ b/drivers/pinctrl/mvebu/pinctrl-dove.c | |||
| @@ -579,12 +579,12 @@ static struct mvebu_pinctrl_soc_info dove_pinctrl_info = { | |||
| 579 | 579 | ||
| 580 | static struct clk *clk; | 580 | static struct clk *clk; |
| 581 | 581 | ||
| 582 | static struct of_device_id dove_pinctrl_of_match[] __devinitdata = { | 582 | static struct of_device_id dove_pinctrl_of_match[] = { |
| 583 | { .compatible = "marvell,dove-pinctrl", .data = &dove_pinctrl_info }, | 583 | { .compatible = "marvell,dove-pinctrl", .data = &dove_pinctrl_info }, |
| 584 | { } | 584 | { } |
| 585 | }; | 585 | }; |
| 586 | 586 | ||
| 587 | static int __devinit dove_pinctrl_probe(struct platform_device *pdev) | 587 | static int dove_pinctrl_probe(struct platform_device *pdev) |
| 588 | { | 588 | { |
| 589 | const struct of_device_id *match = | 589 | const struct of_device_id *match = |
| 590 | of_match_device(dove_pinctrl_of_match, &pdev->dev); | 590 | of_match_device(dove_pinctrl_of_match, &pdev->dev); |
| @@ -595,13 +595,16 @@ static int __devinit dove_pinctrl_probe(struct platform_device *pdev) | |||
| 595 | * grab clk to make sure it is ticking. | 595 | * grab clk to make sure it is ticking. |
| 596 | */ | 596 | */ |
| 597 | clk = devm_clk_get(&pdev->dev, NULL); | 597 | clk = devm_clk_get(&pdev->dev, NULL); |
| 598 | if (!IS_ERR(clk)) | 598 | if (IS_ERR(clk)) { |
| 599 | clk_prepare_enable(clk); | 599 | dev_err(&pdev->dev, "Unable to get pdma clock"); |
| 600 | return PTR_RET(clk); | ||
| 601 | } | ||
| 602 | clk_prepare_enable(clk); | ||
| 600 | 603 | ||
| 601 | return mvebu_pinctrl_probe(pdev); | 604 | return mvebu_pinctrl_probe(pdev); |
| 602 | } | 605 | } |
| 603 | 606 | ||
| 604 | static int __devexit dove_pinctrl_remove(struct platform_device *pdev) | 607 | static int dove_pinctrl_remove(struct platform_device *pdev) |
| 605 | { | 608 | { |
| 606 | int ret; | 609 | int ret; |
| 607 | 610 | ||
| @@ -618,7 +621,7 @@ static struct platform_driver dove_pinctrl_driver = { | |||
| 618 | .of_match_table = of_match_ptr(dove_pinctrl_of_match), | 621 | .of_match_table = of_match_ptr(dove_pinctrl_of_match), |
| 619 | }, | 622 | }, |
| 620 | .probe = dove_pinctrl_probe, | 623 | .probe = dove_pinctrl_probe, |
| 621 | .remove = __devexit_p(dove_pinctrl_remove), | 624 | .remove = dove_pinctrl_remove, |
| 622 | }; | 625 | }; |
| 623 | 626 | ||
| 624 | module_platform_driver(dove_pinctrl_driver); | 627 | module_platform_driver(dove_pinctrl_driver); |
diff --git a/drivers/pinctrl/mvebu/pinctrl-kirkwood.c b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c index fa6ce31c94d9..f12084e18057 100644 --- a/drivers/pinctrl/mvebu/pinctrl-kirkwood.c +++ b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c | |||
| @@ -444,7 +444,7 @@ static struct mvebu_pinctrl_soc_info mv98dx4122_info = { | |||
| 444 | .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), | 444 | .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), |
| 445 | }; | 445 | }; |
| 446 | 446 | ||
| 447 | static struct of_device_id kirkwood_pinctrl_of_match[] __devinitdata = { | 447 | static struct of_device_id kirkwood_pinctrl_of_match[] = { |
| 448 | { .compatible = "marvell,88f6180-pinctrl", .data = &mv88f6180_info }, | 448 | { .compatible = "marvell,88f6180-pinctrl", .data = &mv88f6180_info }, |
| 449 | { .compatible = "marvell,88f6190-pinctrl", .data = &mv88f6190_info }, | 449 | { .compatible = "marvell,88f6190-pinctrl", .data = &mv88f6190_info }, |
| 450 | { .compatible = "marvell,88f6192-pinctrl", .data = &mv88f6192_info }, | 450 | { .compatible = "marvell,88f6192-pinctrl", .data = &mv88f6192_info }, |
| @@ -454,7 +454,7 @@ static struct of_device_id kirkwood_pinctrl_of_match[] __devinitdata = { | |||
| 454 | { } | 454 | { } |
| 455 | }; | 455 | }; |
| 456 | 456 | ||
| 457 | static int __devinit kirkwood_pinctrl_probe(struct platform_device *pdev) | 457 | static int kirkwood_pinctrl_probe(struct platform_device *pdev) |
| 458 | { | 458 | { |
| 459 | const struct of_device_id *match = | 459 | const struct of_device_id *match = |
| 460 | of_match_device(kirkwood_pinctrl_of_match, &pdev->dev); | 460 | of_match_device(kirkwood_pinctrl_of_match, &pdev->dev); |
| @@ -462,7 +462,7 @@ static int __devinit kirkwood_pinctrl_probe(struct platform_device *pdev) | |||
| 462 | return mvebu_pinctrl_probe(pdev); | 462 | return mvebu_pinctrl_probe(pdev); |
| 463 | } | 463 | } |
| 464 | 464 | ||
| 465 | static int __devexit kirkwood_pinctrl_remove(struct platform_device *pdev) | 465 | static int kirkwood_pinctrl_remove(struct platform_device *pdev) |
| 466 | { | 466 | { |
| 467 | return mvebu_pinctrl_remove(pdev); | 467 | return mvebu_pinctrl_remove(pdev); |
| 468 | } | 468 | } |
| @@ -474,7 +474,7 @@ static struct platform_driver kirkwood_pinctrl_driver = { | |||
| 474 | .of_match_table = of_match_ptr(kirkwood_pinctrl_of_match), | 474 | .of_match_table = of_match_ptr(kirkwood_pinctrl_of_match), |
| 475 | }, | 475 | }, |
| 476 | .probe = kirkwood_pinctrl_probe, | 476 | .probe = kirkwood_pinctrl_probe, |
| 477 | .remove = __devexit_p(kirkwood_pinctrl_remove), | 477 | .remove = kirkwood_pinctrl_remove, |
| 478 | }; | 478 | }; |
| 479 | 479 | ||
| 480 | module_platform_driver(kirkwood_pinctrl_driver); | 480 | module_platform_driver(kirkwood_pinctrl_driver); |
diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c index 6c44b7e8964c..c689c04a4f52 100644 --- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c +++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c | |||
| @@ -478,8 +478,7 @@ static struct pinctrl_ops mvebu_pinctrl_ops = { | |||
| 478 | .dt_free_map = mvebu_pinctrl_dt_free_map, | 478 | .dt_free_map = mvebu_pinctrl_dt_free_map, |
| 479 | }; | 479 | }; |
| 480 | 480 | ||
| 481 | static int __devinit _add_function(struct mvebu_pinctrl_function *funcs, | 481 | static int _add_function(struct mvebu_pinctrl_function *funcs, const char *name) |
| 482 | const char *name) | ||
| 483 | { | 482 | { |
| 484 | while (funcs->num_groups) { | 483 | while (funcs->num_groups) { |
| 485 | /* function already there */ | 484 | /* function already there */ |
| @@ -494,8 +493,8 @@ static int __devinit _add_function(struct mvebu_pinctrl_function *funcs, | |||
| 494 | return 0; | 493 | return 0; |
| 495 | } | 494 | } |
| 496 | 495 | ||
| 497 | static int __devinit mvebu_pinctrl_build_functions(struct platform_device *pdev, | 496 | static int mvebu_pinctrl_build_functions(struct platform_device *pdev, |
| 498 | struct mvebu_pinctrl *pctl) | 497 | struct mvebu_pinctrl *pctl) |
| 499 | { | 498 | { |
| 500 | struct mvebu_pinctrl_function *funcs; | 499 | struct mvebu_pinctrl_function *funcs; |
| 501 | int num = 0; | 500 | int num = 0; |
| @@ -568,7 +567,7 @@ static int __devinit mvebu_pinctrl_build_functions(struct platform_device *pdev, | |||
| 568 | return 0; | 567 | return 0; |
| 569 | } | 568 | } |
| 570 | 569 | ||
| 571 | int __devinit mvebu_pinctrl_probe(struct platform_device *pdev) | 570 | int mvebu_pinctrl_probe(struct platform_device *pdev) |
| 572 | { | 571 | { |
| 573 | struct mvebu_pinctrl_soc_info *soc = dev_get_platdata(&pdev->dev); | 572 | struct mvebu_pinctrl_soc_info *soc = dev_get_platdata(&pdev->dev); |
| 574 | struct device_node *np = pdev->dev.of_node; | 573 | struct device_node *np = pdev->dev.of_node; |
| @@ -745,7 +744,7 @@ int __devinit mvebu_pinctrl_probe(struct platform_device *pdev) | |||
| 745 | return 0; | 744 | return 0; |
| 746 | } | 745 | } |
| 747 | 746 | ||
| 748 | int __devexit mvebu_pinctrl_remove(struct platform_device *pdev) | 747 | int mvebu_pinctrl_remove(struct platform_device *pdev) |
| 749 | { | 748 | { |
| 750 | struct mvebu_pinctrl *pctl = platform_get_drvdata(pdev); | 749 | struct mvebu_pinctrl *pctl = platform_get_drvdata(pdev); |
| 751 | pinctrl_unregister(pctl->pctldev); | 750 | pinctrl_unregister(pctl->pctldev); |
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index c5e757157183..471c71f7f8b6 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c | |||
| @@ -265,7 +265,7 @@ static int at91_dt_node_to_map(struct pinctrl_dev *pctldev, | |||
| 265 | /* create mux map */ | 265 | /* create mux map */ |
| 266 | parent = of_get_parent(np); | 266 | parent = of_get_parent(np); |
| 267 | if (!parent) { | 267 | if (!parent) { |
| 268 | kfree(new_map); | 268 | devm_kfree(pctldev->dev, new_map); |
| 269 | return -EINVAL; | 269 | return -EINVAL; |
| 270 | } | 270 | } |
| 271 | new_map[0].type = PIN_MAP_TYPE_MUX_GROUP; | 271 | new_map[0].type = PIN_MAP_TYPE_MUX_GROUP; |
| @@ -792,8 +792,8 @@ static struct pinctrl_desc at91_pinctrl_desc = { | |||
| 792 | 792 | ||
| 793 | static const char *gpio_compat = "atmel,at91rm9200-gpio"; | 793 | static const char *gpio_compat = "atmel,at91rm9200-gpio"; |
| 794 | 794 | ||
| 795 | static void __devinit at91_pinctrl_child_count(struct at91_pinctrl *info, | 795 | static void at91_pinctrl_child_count(struct at91_pinctrl *info, |
| 796 | struct device_node *np) | 796 | struct device_node *np) |
| 797 | { | 797 | { |
| 798 | struct device_node *child; | 798 | struct device_node *child; |
| 799 | 799 | ||
| @@ -807,8 +807,8 @@ static void __devinit at91_pinctrl_child_count(struct at91_pinctrl *info, | |||
| 807 | } | 807 | } |
| 808 | } | 808 | } |
| 809 | 809 | ||
| 810 | static int __devinit at91_pinctrl_mux_mask(struct at91_pinctrl *info, | 810 | static int at91_pinctrl_mux_mask(struct at91_pinctrl *info, |
| 811 | struct device_node *np) | 811 | struct device_node *np) |
| 812 | { | 812 | { |
| 813 | int ret = 0; | 813 | int ret = 0; |
| 814 | int size; | 814 | int size; |
| @@ -840,10 +840,9 @@ static int __devinit at91_pinctrl_mux_mask(struct at91_pinctrl *info, | |||
| 840 | return ret; | 840 | return ret; |
| 841 | } | 841 | } |
| 842 | 842 | ||
| 843 | static int __devinit at91_pinctrl_parse_groups(struct device_node *np, | 843 | static int at91_pinctrl_parse_groups(struct device_node *np, |
| 844 | struct at91_pin_group *grp, | 844 | struct at91_pin_group *grp, |
| 845 | struct at91_pinctrl *info, | 845 | struct at91_pinctrl *info, u32 index) |
| 846 | u32 index) | ||
| 847 | { | 846 | { |
| 848 | struct at91_pmx_pin *pin; | 847 | struct at91_pmx_pin *pin; |
| 849 | int size; | 848 | int size; |
| @@ -889,8 +888,8 @@ static int __devinit at91_pinctrl_parse_groups(struct device_node *np, | |||
| 889 | return 0; | 888 | return 0; |
| 890 | } | 889 | } |
| 891 | 890 | ||
| 892 | static int __devinit at91_pinctrl_parse_functions(struct device_node *np, | 891 | static int at91_pinctrl_parse_functions(struct device_node *np, |
| 893 | struct at91_pinctrl *info, u32 index) | 892 | struct at91_pinctrl *info, u32 index) |
| 894 | { | 893 | { |
| 895 | struct device_node *child; | 894 | struct device_node *child; |
| 896 | struct at91_pmx_func *func; | 895 | struct at91_pmx_func *func; |
| @@ -926,14 +925,14 @@ static int __devinit at91_pinctrl_parse_functions(struct device_node *np, | |||
| 926 | return 0; | 925 | return 0; |
| 927 | } | 926 | } |
| 928 | 927 | ||
| 929 | static struct of_device_id at91_pinctrl_of_match[] __devinitdata = { | 928 | static struct of_device_id at91_pinctrl_of_match[] = { |
| 930 | { .compatible = "atmel,at91sam9x5-pinctrl", .data = &at91sam9x5_ops }, | 929 | { .compatible = "atmel,at91sam9x5-pinctrl", .data = &at91sam9x5_ops }, |
| 931 | { .compatible = "atmel,at91rm9200-pinctrl", .data = &at91rm9200_ops }, | 930 | { .compatible = "atmel,at91rm9200-pinctrl", .data = &at91rm9200_ops }, |
| 932 | { /* sentinel */ } | 931 | { /* sentinel */ } |
| 933 | }; | 932 | }; |
| 934 | 933 | ||
| 935 | static int __devinit at91_pinctrl_probe_dt(struct platform_device *pdev, | 934 | static int at91_pinctrl_probe_dt(struct platform_device *pdev, |
| 936 | struct at91_pinctrl *info) | 935 | struct at91_pinctrl *info) |
| 937 | { | 936 | { |
| 938 | int ret = 0; | 937 | int ret = 0; |
| 939 | int i, j; | 938 | int i, j; |
| @@ -999,7 +998,7 @@ static int __devinit at91_pinctrl_probe_dt(struct platform_device *pdev, | |||
| 999 | return 0; | 998 | return 0; |
| 1000 | } | 999 | } |
| 1001 | 1000 | ||
| 1002 | static int __devinit at91_pinctrl_probe(struct platform_device *pdev) | 1001 | static int at91_pinctrl_probe(struct platform_device *pdev) |
| 1003 | { | 1002 | { |
| 1004 | struct at91_pinctrl *info; | 1003 | struct at91_pinctrl *info; |
| 1005 | struct pinctrl_pin_desc *pdesc; | 1004 | struct pinctrl_pin_desc *pdesc; |
| @@ -1063,7 +1062,7 @@ err: | |||
| 1063 | return ret; | 1062 | return ret; |
| 1064 | } | 1063 | } |
| 1065 | 1064 | ||
| 1066 | static int __devexit at91_pinctrl_remove(struct platform_device *pdev) | 1065 | static int at91_pinctrl_remove(struct platform_device *pdev) |
| 1067 | { | 1066 | { |
| 1068 | struct at91_pinctrl *info = platform_get_drvdata(pdev); | 1067 | struct at91_pinctrl *info = platform_get_drvdata(pdev); |
| 1069 | 1068 | ||
| @@ -1443,7 +1442,7 @@ static struct gpio_chip at91_gpio_template = { | |||
| 1443 | .ngpio = MAX_NB_GPIO_PER_BANK, | 1442 | .ngpio = MAX_NB_GPIO_PER_BANK, |
| 1444 | }; | 1443 | }; |
| 1445 | 1444 | ||
| 1446 | static void __devinit at91_gpio_probe_fixup(void) | 1445 | static void at91_gpio_probe_fixup(void) |
| 1447 | { | 1446 | { |
| 1448 | unsigned i; | 1447 | unsigned i; |
| 1449 | struct at91_gpio_chip *at91_gpio, *last = NULL; | 1448 | struct at91_gpio_chip *at91_gpio, *last = NULL; |
| @@ -1461,13 +1460,13 @@ static void __devinit at91_gpio_probe_fixup(void) | |||
| 1461 | } | 1460 | } |
| 1462 | } | 1461 | } |
| 1463 | 1462 | ||
| 1464 | static struct of_device_id at91_gpio_of_match[] __devinitdata = { | 1463 | static struct of_device_id at91_gpio_of_match[] = { |
| 1465 | { .compatible = "atmel,at91sam9x5-gpio", .data = &at91sam9x5_ops, }, | 1464 | { .compatible = "atmel,at91sam9x5-gpio", .data = &at91sam9x5_ops, }, |
| 1466 | { .compatible = "atmel,at91rm9200-gpio", .data = &at91rm9200_ops }, | 1465 | { .compatible = "atmel,at91rm9200-gpio", .data = &at91rm9200_ops }, |
| 1467 | { /* sentinel */ } | 1466 | { /* sentinel */ } |
| 1468 | }; | 1467 | }; |
| 1469 | 1468 | ||
| 1470 | static int __devinit at91_gpio_probe(struct platform_device *pdev) | 1469 | static int at91_gpio_probe(struct platform_device *pdev) |
| 1471 | { | 1470 | { |
| 1472 | struct device_node *np = pdev->dev.of_node; | 1471 | struct device_node *np = pdev->dev.of_node; |
| 1473 | struct resource *res; | 1472 | struct resource *res; |
| @@ -1609,7 +1608,7 @@ static struct platform_driver at91_pinctrl_driver = { | |||
| 1609 | .of_match_table = of_match_ptr(at91_pinctrl_of_match), | 1608 | .of_match_table = of_match_ptr(at91_pinctrl_of_match), |
| 1610 | }, | 1609 | }, |
| 1611 | .probe = at91_pinctrl_probe, | 1610 | .probe = at91_pinctrl_probe, |
| 1612 | .remove = __devexit_p(at91_pinctrl_remove), | 1611 | .remove = at91_pinctrl_remove, |
| 1613 | }; | 1612 | }; |
| 1614 | 1613 | ||
| 1615 | static int __init at91_pinctrl_init(void) | 1614 | static int __init at91_pinctrl_init(void) |
diff --git a/drivers/pinctrl/pinctrl-bcm2835.c b/drivers/pinctrl/pinctrl-bcm2835.c index 0b0e9b49a1b5..d347b9f2eae3 100644 --- a/drivers/pinctrl/pinctrl-bcm2835.c +++ b/drivers/pinctrl/pinctrl-bcm2835.c | |||
| @@ -936,7 +936,7 @@ static struct pinctrl_gpio_range bcm2835_pinctrl_gpio_range = { | |||
| 936 | .npins = BCM2835_NUM_GPIOS, | 936 | .npins = BCM2835_NUM_GPIOS, |
| 937 | }; | 937 | }; |
| 938 | 938 | ||
| 939 | static int __devinit bcm2835_pinctrl_probe(struct platform_device *pdev) | 939 | static int bcm2835_pinctrl_probe(struct platform_device *pdev) |
| 940 | { | 940 | { |
| 941 | struct device *dev = &pdev->dev; | 941 | struct device *dev = &pdev->dev; |
| 942 | struct device_node *np = dev->of_node; | 942 | struct device_node *np = dev->of_node; |
diff --git a/drivers/pinctrl/pinctrl-exynos5440.c b/drivers/pinctrl/pinctrl-exynos5440.c index 07db89528dc3..de05b64f0da6 100644 --- a/drivers/pinctrl/pinctrl-exynos5440.c +++ b/drivers/pinctrl/pinctrl-exynos5440.c | |||
| @@ -842,7 +842,7 @@ static int __init exynos5440_gpiolib_unregister(struct platform_device *pdev, | |||
| 842 | return 0; | 842 | return 0; |
| 843 | } | 843 | } |
| 844 | 844 | ||
| 845 | static int __devinit exynos5440_pinctrl_probe(struct platform_device *pdev) | 845 | static int exynos5440_pinctrl_probe(struct platform_device *pdev) |
| 846 | { | 846 | { |
| 847 | struct device *dev = &pdev->dev; | 847 | struct device *dev = &pdev->dev; |
| 848 | struct exynos5440_pinctrl_priv_data *priv; | 848 | struct exynos5440_pinctrl_priv_data *priv; |
diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c index 131d86d7c2a5..43a6f1ffc786 100644 --- a/drivers/pinctrl/pinctrl-imx.c +++ b/drivers/pinctrl/pinctrl-imx.c | |||
| @@ -425,10 +425,10 @@ static int imx_pinctrl_get_pin_id_and_mux(const struct imx_pinctrl_soc_info *inf | |||
| 425 | return 0; | 425 | return 0; |
| 426 | } | 426 | } |
| 427 | 427 | ||
| 428 | static int __devinit imx_pinctrl_parse_groups(struct device_node *np, | 428 | static int imx_pinctrl_parse_groups(struct device_node *np, |
| 429 | struct imx_pin_group *grp, | 429 | struct imx_pin_group *grp, |
| 430 | struct imx_pinctrl_soc_info *info, | 430 | struct imx_pinctrl_soc_info *info, |
| 431 | u32 index) | 431 | u32 index) |
| 432 | { | 432 | { |
| 433 | unsigned int pin_func_id; | 433 | unsigned int pin_func_id; |
| 434 | int ret, size; | 434 | int ret, size; |
| @@ -482,8 +482,9 @@ static int __devinit imx_pinctrl_parse_groups(struct device_node *np, | |||
| 482 | return 0; | 482 | return 0; |
| 483 | } | 483 | } |
| 484 | 484 | ||
| 485 | static int __devinit imx_pinctrl_parse_functions(struct device_node *np, | 485 | static int imx_pinctrl_parse_functions(struct device_node *np, |
| 486 | struct imx_pinctrl_soc_info *info, u32 index) | 486 | struct imx_pinctrl_soc_info *info, |
| 487 | u32 index) | ||
| 487 | { | 488 | { |
| 488 | struct device_node *child; | 489 | struct device_node *child; |
| 489 | struct imx_pmx_func *func; | 490 | struct imx_pmx_func *func; |
| @@ -517,7 +518,7 @@ static int __devinit imx_pinctrl_parse_functions(struct device_node *np, | |||
| 517 | return 0; | 518 | return 0; |
| 518 | } | 519 | } |
| 519 | 520 | ||
| 520 | static int __devinit imx_pinctrl_probe_dt(struct platform_device *pdev, | 521 | static int imx_pinctrl_probe_dt(struct platform_device *pdev, |
| 521 | struct imx_pinctrl_soc_info *info) | 522 | struct imx_pinctrl_soc_info *info) |
| 522 | { | 523 | { |
| 523 | struct device_node *np = pdev->dev.of_node; | 524 | struct device_node *np = pdev->dev.of_node; |
| @@ -560,8 +561,8 @@ static int __devinit imx_pinctrl_probe_dt(struct platform_device *pdev, | |||
| 560 | return 0; | 561 | return 0; |
| 561 | } | 562 | } |
| 562 | 563 | ||
| 563 | int __devinit imx_pinctrl_probe(struct platform_device *pdev, | 564 | int imx_pinctrl_probe(struct platform_device *pdev, |
| 564 | struct imx_pinctrl_soc_info *info) | 565 | struct imx_pinctrl_soc_info *info) |
| 565 | { | 566 | { |
| 566 | struct imx_pinctrl *ipctl; | 567 | struct imx_pinctrl *ipctl; |
| 567 | struct resource *res; | 568 | struct resource *res; |
diff --git a/drivers/pinctrl/pinctrl-imx23.c b/drivers/pinctrl/pinctrl-imx23.c index 04364f7822b7..e76d75c9d1ba 100644 --- a/drivers/pinctrl/pinctrl-imx23.c +++ b/drivers/pinctrl/pinctrl-imx23.c | |||
| @@ -267,7 +267,7 @@ static struct mxs_pinctrl_soc_data imx23_pinctrl_data = { | |||
| 267 | .npins = ARRAY_SIZE(imx23_pins), | 267 | .npins = ARRAY_SIZE(imx23_pins), |
| 268 | }; | 268 | }; |
| 269 | 269 | ||
| 270 | static int __devinit imx23_pinctrl_probe(struct platform_device *pdev) | 270 | static int imx23_pinctrl_probe(struct platform_device *pdev) |
| 271 | { | 271 | { |
| 272 | return mxs_pinctrl_probe(pdev, &imx23_pinctrl_data); | 272 | return mxs_pinctrl_probe(pdev, &imx23_pinctrl_data); |
| 273 | } | 273 | } |
diff --git a/drivers/pinctrl/pinctrl-imx28.c b/drivers/pinctrl/pinctrl-imx28.c index e1af2ba89004..79c9c8d296af 100644 --- a/drivers/pinctrl/pinctrl-imx28.c +++ b/drivers/pinctrl/pinctrl-imx28.c | |||
| @@ -383,7 +383,7 @@ static struct mxs_pinctrl_soc_data imx28_pinctrl_data = { | |||
| 383 | .npins = ARRAY_SIZE(imx28_pins), | 383 | .npins = ARRAY_SIZE(imx28_pins), |
| 384 | }; | 384 | }; |
| 385 | 385 | ||
| 386 | static int __devinit imx28_pinctrl_probe(struct platform_device *pdev) | 386 | static int imx28_pinctrl_probe(struct platform_device *pdev) |
| 387 | { | 387 | { |
| 388 | return mxs_pinctrl_probe(pdev, &imx28_pinctrl_data); | 388 | return mxs_pinctrl_probe(pdev, &imx28_pinctrl_data); |
| 389 | } | 389 | } |
diff --git a/drivers/pinctrl/pinctrl-imx35.c b/drivers/pinctrl/pinctrl-imx35.c index 1dbf5278acec..6e214110e3d5 100644 --- a/drivers/pinctrl/pinctrl-imx35.c +++ b/drivers/pinctrl/pinctrl-imx35.c | |||
| @@ -1564,7 +1564,7 @@ static struct of_device_id imx35_pinctrl_of_match[] = { | |||
| 1564 | { /* sentinel */ } | 1564 | { /* sentinel */ } |
| 1565 | }; | 1565 | }; |
| 1566 | 1566 | ||
| 1567 | static int __devinit imx35_pinctrl_probe(struct platform_device *pdev) | 1567 | static int imx35_pinctrl_probe(struct platform_device *pdev) |
| 1568 | { | 1568 | { |
| 1569 | return imx_pinctrl_probe(pdev, &imx35_pinctrl_info); | 1569 | return imx_pinctrl_probe(pdev, &imx35_pinctrl_info); |
| 1570 | } | 1570 | } |
diff --git a/drivers/pinctrl/pinctrl-imx51.c b/drivers/pinctrl/pinctrl-imx51.c index 131216558a7b..9a92aaad150f 100644 --- a/drivers/pinctrl/pinctrl-imx51.c +++ b/drivers/pinctrl/pinctrl-imx51.c | |||
| @@ -1291,7 +1291,7 @@ static struct of_device_id imx51_pinctrl_of_match[] = { | |||
| 1291 | { /* sentinel */ } | 1291 | { /* sentinel */ } |
| 1292 | }; | 1292 | }; |
| 1293 | 1293 | ||
| 1294 | static int __devinit imx51_pinctrl_probe(struct platform_device *pdev) | 1294 | static int imx51_pinctrl_probe(struct platform_device *pdev) |
| 1295 | { | 1295 | { |
| 1296 | return imx_pinctrl_probe(pdev, &imx51_pinctrl_info); | 1296 | return imx_pinctrl_probe(pdev, &imx51_pinctrl_info); |
| 1297 | } | 1297 | } |
diff --git a/drivers/pinctrl/pinctrl-imx53.c b/drivers/pinctrl/pinctrl-imx53.c index ec4048691775..2c9c8e2334da 100644 --- a/drivers/pinctrl/pinctrl-imx53.c +++ b/drivers/pinctrl/pinctrl-imx53.c | |||
| @@ -1371,7 +1371,7 @@ static struct imx_pin_reg imx53_pin_regs[] = { | |||
| 1371 | IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 0, 0x7F8, 1), /* MX53_PAD_GPIO_8__ESAI1_TX5_RX0 */ | 1371 | IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 0, 0x7F8, 1), /* MX53_PAD_GPIO_8__ESAI1_TX5_RX0 */ |
| 1372 | IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 1, 0x000, 0), /* MX53_PAD_GPIO_8__GPIO1_8 */ | 1372 | IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 1, 0x000, 0), /* MX53_PAD_GPIO_8__GPIO1_8 */ |
| 1373 | IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 2, 0x000, 0), /* MX53_PAD_GPIO_8__EPIT2_EPITO */ | 1373 | IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 2, 0x000, 0), /* MX53_PAD_GPIO_8__EPIT2_EPITO */ |
| 1374 | IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 3, 0x760, 3), /* MX53_PAD_GPIO_8__CAN1_RXCAN */ | 1374 | IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 3, 0x760, 2), /* MX53_PAD_GPIO_8__CAN1_RXCAN */ |
| 1375 | IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 4, 0x880, 5), /* MX53_PAD_GPIO_8__UART2_RXD_MUX */ | 1375 | IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 4, 0x880, 5), /* MX53_PAD_GPIO_8__UART2_RXD_MUX */ |
| 1376 | IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 5, 0x000, 0), /* MX53_PAD_GPIO_8__FIRI_TXD */ | 1376 | IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 5, 0x000, 0), /* MX53_PAD_GPIO_8__FIRI_TXD */ |
| 1377 | IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 6, 0x000, 0), /* MX53_PAD_GPIO_8__SPDIF_SRCLK */ | 1377 | IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 6, 0x000, 0), /* MX53_PAD_GPIO_8__SPDIF_SRCLK */ |
| @@ -1618,7 +1618,7 @@ static struct of_device_id imx53_pinctrl_of_match[] = { | |||
| 1618 | { /* sentinel */ } | 1618 | { /* sentinel */ } |
| 1619 | }; | 1619 | }; |
| 1620 | 1620 | ||
| 1621 | static int __devinit imx53_pinctrl_probe(struct platform_device *pdev) | 1621 | static int imx53_pinctrl_probe(struct platform_device *pdev) |
| 1622 | { | 1622 | { |
| 1623 | return imx_pinctrl_probe(pdev, &imx53_pinctrl_info); | 1623 | return imx_pinctrl_probe(pdev, &imx53_pinctrl_info); |
| 1624 | } | 1624 | } |
diff --git a/drivers/pinctrl/pinctrl-imx6q.c b/drivers/pinctrl/pinctrl-imx6q.c index 844ab13c93a3..663346bb765e 100644 --- a/drivers/pinctrl/pinctrl-imx6q.c +++ b/drivers/pinctrl/pinctrl-imx6q.c | |||
| @@ -2302,7 +2302,7 @@ static struct of_device_id imx6q_pinctrl_of_match[] = { | |||
| 2302 | { /* sentinel */ } | 2302 | { /* sentinel */ } |
| 2303 | }; | 2303 | }; |
| 2304 | 2304 | ||
| 2305 | static int __devinit imx6q_pinctrl_probe(struct platform_device *pdev) | 2305 | static int imx6q_pinctrl_probe(struct platform_device *pdev) |
| 2306 | { | 2306 | { |
| 2307 | return imx_pinctrl_probe(pdev, &imx6q_pinctrl_info); | 2307 | return imx_pinctrl_probe(pdev, &imx6q_pinctrl_info); |
| 2308 | } | 2308 | } |
diff --git a/drivers/pinctrl/pinctrl-mmp2.c b/drivers/pinctrl/pinctrl-mmp2.c index 4fbb3db3f1c1..4afa56a3a51d 100644 --- a/drivers/pinctrl/pinctrl-mmp2.c +++ b/drivers/pinctrl/pinctrl-mmp2.c | |||
| @@ -686,7 +686,7 @@ static struct pxa3xx_pinmux_info mmp2_info = { | |||
| 686 | .ds_shift = MMP2_DS_SHIFT, | 686 | .ds_shift = MMP2_DS_SHIFT, |
| 687 | }; | 687 | }; |
| 688 | 688 | ||
| 689 | static int __devinit mmp2_pinmux_probe(struct platform_device *pdev) | 689 | static int mmp2_pinmux_probe(struct platform_device *pdev) |
| 690 | { | 690 | { |
| 691 | return pxa3xx_pinctrl_register(pdev, &mmp2_info); | 691 | return pxa3xx_pinctrl_register(pdev, &mmp2_info); |
| 692 | } | 692 | } |
diff --git a/drivers/pinctrl/pinctrl-mxs.c b/drivers/pinctrl/pinctrl-mxs.c index 180f16379ec1..dd227d21dcf2 100644 --- a/drivers/pinctrl/pinctrl-mxs.c +++ b/drivers/pinctrl/pinctrl-mxs.c | |||
| @@ -335,9 +335,9 @@ static struct pinctrl_desc mxs_pinctrl_desc = { | |||
| 335 | .owner = THIS_MODULE, | 335 | .owner = THIS_MODULE, |
| 336 | }; | 336 | }; |
| 337 | 337 | ||
| 338 | static int __devinit mxs_pinctrl_parse_group(struct platform_device *pdev, | 338 | static int mxs_pinctrl_parse_group(struct platform_device *pdev, |
| 339 | struct device_node *np, int idx, | 339 | struct device_node *np, int idx, |
| 340 | const char **out_name) | 340 | const char **out_name) |
| 341 | { | 341 | { |
| 342 | struct mxs_pinctrl_data *d = platform_get_drvdata(pdev); | 342 | struct mxs_pinctrl_data *d = platform_get_drvdata(pdev); |
| 343 | struct mxs_group *g = &d->soc->groups[idx]; | 343 | struct mxs_group *g = &d->soc->groups[idx]; |
| @@ -384,8 +384,8 @@ static int __devinit mxs_pinctrl_parse_group(struct platform_device *pdev, | |||
| 384 | return 0; | 384 | return 0; |
| 385 | } | 385 | } |
| 386 | 386 | ||
| 387 | static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, | 387 | static int mxs_pinctrl_probe_dt(struct platform_device *pdev, |
| 388 | struct mxs_pinctrl_data *d) | 388 | struct mxs_pinctrl_data *d) |
| 389 | { | 389 | { |
| 390 | struct mxs_pinctrl_soc_data *soc = d->soc; | 390 | struct mxs_pinctrl_soc_data *soc = d->soc; |
| 391 | struct device_node *np = pdev->dev.of_node; | 391 | struct device_node *np = pdev->dev.of_node; |
| @@ -476,8 +476,8 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, | |||
| 476 | return 0; | 476 | return 0; |
| 477 | } | 477 | } |
| 478 | 478 | ||
| 479 | int __devinit mxs_pinctrl_probe(struct platform_device *pdev, | 479 | int mxs_pinctrl_probe(struct platform_device *pdev, |
| 480 | struct mxs_pinctrl_soc_data *soc) | 480 | struct mxs_pinctrl_soc_data *soc) |
| 481 | { | 481 | { |
| 482 | struct device_node *np = pdev->dev.of_node; | 482 | struct device_node *np = pdev->dev.of_node; |
| 483 | struct mxs_pinctrl_data *d; | 483 | struct mxs_pinctrl_data *d; |
diff --git a/drivers/pinctrl/pinctrl-nomadik-db8500.c b/drivers/pinctrl/pinctrl-nomadik-db8500.c index 7d88ae352119..30b4da91ef7e 100644 --- a/drivers/pinctrl/pinctrl-nomadik-db8500.c +++ b/drivers/pinctrl/pinctrl-nomadik-db8500.c | |||
| @@ -1251,8 +1251,7 @@ static const struct nmk_pinctrl_soc_data nmk_db8500_soc = { | |||
| 1251 | .prcm_gpiocr_registers = db8500_prcm_gpiocr_regs, | 1251 | .prcm_gpiocr_registers = db8500_prcm_gpiocr_regs, |
| 1252 | }; | 1252 | }; |
| 1253 | 1253 | ||
| 1254 | void __devinit | 1254 | void nmk_pinctrl_db8500_init(const struct nmk_pinctrl_soc_data **soc) |
| 1255 | nmk_pinctrl_db8500_init(const struct nmk_pinctrl_soc_data **soc) | ||
| 1256 | { | 1255 | { |
| 1257 | *soc = &nmk_db8500_soc; | 1256 | *soc = &nmk_db8500_soc; |
| 1258 | } | 1257 | } |
diff --git a/drivers/pinctrl/pinctrl-nomadik-db8540.c b/drivers/pinctrl/pinctrl-nomadik-db8540.c index bb6a4016322a..d7ba5443bae0 100644 --- a/drivers/pinctrl/pinctrl-nomadik-db8540.c +++ b/drivers/pinctrl/pinctrl-nomadik-db8540.c | |||
| @@ -1260,8 +1260,7 @@ static const struct nmk_pinctrl_soc_data nmk_db8540_soc = { | |||
| 1260 | .prcm_gpiocr_registers = db8540_prcm_gpiocr_regs, | 1260 | .prcm_gpiocr_registers = db8540_prcm_gpiocr_regs, |
| 1261 | }; | 1261 | }; |
| 1262 | 1262 | ||
| 1263 | void __devinit | 1263 | void nmk_pinctrl_db8540_init(const struct nmk_pinctrl_soc_data **soc) |
| 1264 | nmk_pinctrl_db8540_init(const struct nmk_pinctrl_soc_data **soc) | ||
| 1265 | { | 1264 | { |
| 1266 | *soc = &nmk_db8540_soc; | 1265 | *soc = &nmk_db8540_soc; |
| 1267 | } | 1266 | } |
diff --git a/drivers/pinctrl/pinctrl-nomadik-stn8815.c b/drivers/pinctrl/pinctrl-nomadik-stn8815.c index 7d432c3bc359..924a3393fa82 100644 --- a/drivers/pinctrl/pinctrl-nomadik-stn8815.c +++ b/drivers/pinctrl/pinctrl-nomadik-stn8815.c | |||
| @@ -350,8 +350,7 @@ static const struct nmk_pinctrl_soc_data nmk_stn8815_soc = { | |||
| 350 | .ngroups = ARRAY_SIZE(nmk_stn8815_groups), | 350 | .ngroups = ARRAY_SIZE(nmk_stn8815_groups), |
| 351 | }; | 351 | }; |
| 352 | 352 | ||
| 353 | void __devinit | 353 | void nmk_pinctrl_stn8815_init(const struct nmk_pinctrl_soc_data **soc) |
| 354 | nmk_pinctrl_stn8815_init(const struct nmk_pinctrl_soc_data **soc) | ||
| 355 | { | 354 | { |
| 356 | *soc = &nmk_stn8815_soc; | 355 | *soc = &nmk_stn8815_soc; |
| 357 | } | 356 | } |
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index ef66f98e9202..1bb16ffb4e41 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c | |||
| @@ -259,6 +259,9 @@ static void nmk_prcm_altcx_set_mode(struct nmk_pinctrl *npct, | |||
| 259 | const struct prcm_gpiocr_altcx_pin_desc *pin_desc; | 259 | const struct prcm_gpiocr_altcx_pin_desc *pin_desc; |
| 260 | const u16 *gpiocr_regs; | 260 | const u16 *gpiocr_regs; |
| 261 | 261 | ||
| 262 | if (!npct->prcm_base) | ||
| 263 | return; | ||
| 264 | |||
| 262 | if (alt_num > PRCM_IDX_GPIOCR_ALTC_MAX) { | 265 | if (alt_num > PRCM_IDX_GPIOCR_ALTC_MAX) { |
| 263 | dev_err(npct->dev, "PRCM GPIOCR: alternate-C%i is invalid\n", | 266 | dev_err(npct->dev, "PRCM GPIOCR: alternate-C%i is invalid\n", |
| 264 | alt_num); | 267 | alt_num); |
| @@ -682,6 +685,9 @@ static int nmk_prcm_gpiocr_get_mode(struct pinctrl_dev *pctldev, int gpio) | |||
| 682 | const struct prcm_gpiocr_altcx_pin_desc *pin_desc; | 685 | const struct prcm_gpiocr_altcx_pin_desc *pin_desc; |
| 683 | const u16 *gpiocr_regs; | 686 | const u16 *gpiocr_regs; |
| 684 | 687 | ||
| 688 | if (!npct->prcm_base) | ||
| 689 | return NMK_GPIO_ALT_C; | ||
| 690 | |||
| 685 | for (i = 0; i < npct->soc->npins_altcx; i++) { | 691 | for (i = 0; i < npct->soc->npins_altcx; i++) { |
| 686 | if (npct->soc->altcx_pins[i].pin == gpio) | 692 | if (npct->soc->altcx_pins[i].pin == gpio) |
| 687 | break; | 693 | break; |
| @@ -1306,7 +1312,7 @@ const struct irq_domain_ops nmk_gpio_irq_simple_ops = { | |||
| 1306 | .xlate = irq_domain_xlate_twocell, | 1312 | .xlate = irq_domain_xlate_twocell, |
| 1307 | }; | 1313 | }; |
| 1308 | 1314 | ||
| 1309 | static int __devinit nmk_gpio_probe(struct platform_device *dev) | 1315 | static int nmk_gpio_probe(struct platform_device *dev) |
| 1310 | { | 1316 | { |
| 1311 | struct nmk_gpio_platform_data *pdata = dev->dev.platform_data; | 1317 | struct nmk_gpio_platform_data *pdata = dev->dev.platform_data; |
| 1312 | struct device_node *np = dev->dev.of_node; | 1318 | struct device_node *np = dev->dev.of_node; |
| @@ -1846,7 +1852,7 @@ static const struct of_device_id nmk_pinctrl_match[] = { | |||
| 1846 | {}, | 1852 | {}, |
| 1847 | }; | 1853 | }; |
| 1848 | 1854 | ||
| 1849 | static int __devinit nmk_pinctrl_probe(struct platform_device *pdev) | 1855 | static int nmk_pinctrl_probe(struct platform_device *pdev) |
| 1850 | { | 1856 | { |
| 1851 | const struct platform_device_id *platid = platform_get_device_id(pdev); | 1857 | const struct platform_device_id *platid = platform_get_device_id(pdev); |
| 1852 | struct device_node *np = pdev->dev.of_node; | 1858 | struct device_node *np = pdev->dev.of_node; |
| @@ -1887,9 +1893,12 @@ static int __devinit nmk_pinctrl_probe(struct platform_device *pdev) | |||
| 1887 | "failed to ioremap PRCM registers\n"); | 1893 | "failed to ioremap PRCM registers\n"); |
| 1888 | return -ENOMEM; | 1894 | return -ENOMEM; |
| 1889 | } | 1895 | } |
| 1890 | } else { | 1896 | } else if (version == PINCTRL_NMK_STN8815) { |
| 1891 | dev_info(&pdev->dev, | 1897 | dev_info(&pdev->dev, |
| 1892 | "No PRCM base, assume no ALT-Cx control is available\n"); | 1898 | "No PRCM base, assume no ALT-Cx control is available\n"); |
| 1899 | } else { | ||
| 1900 | dev_err(&pdev->dev, "missing PRCM base address\n"); | ||
| 1901 | return -EINVAL; | ||
| 1893 | } | 1902 | } |
| 1894 | 1903 | ||
| 1895 | /* | 1904 | /* |
diff --git a/drivers/pinctrl/pinctrl-pxa168.c b/drivers/pinctrl/pinctrl-pxa168.c index cb771e4a6355..d9cd2b457484 100644 --- a/drivers/pinctrl/pinctrl-pxa168.c +++ b/drivers/pinctrl/pinctrl-pxa168.c | |||
| @@ -615,7 +615,7 @@ static struct pxa3xx_pinmux_info pxa168_info = { | |||
| 615 | .ds_shift = PXA168_DS_SHIFT, | 615 | .ds_shift = PXA168_DS_SHIFT, |
| 616 | }; | 616 | }; |
| 617 | 617 | ||
| 618 | static int __devinit pxa168_pinmux_probe(struct platform_device *pdev) | 618 | static int pxa168_pinmux_probe(struct platform_device *pdev) |
| 619 | { | 619 | { |
| 620 | return pxa3xx_pinctrl_register(pdev, &pxa168_info); | 620 | return pxa3xx_pinctrl_register(pdev, &pxa168_info); |
| 621 | } | 621 | } |
diff --git a/drivers/pinctrl/pinctrl-pxa910.c b/drivers/pinctrl/pinctrl-pxa910.c index 5fecd221b830..a2f917b847fb 100644 --- a/drivers/pinctrl/pinctrl-pxa910.c +++ b/drivers/pinctrl/pinctrl-pxa910.c | |||
| @@ -971,7 +971,7 @@ static struct pxa3xx_pinmux_info pxa910_info = { | |||
| 971 | .ds_shift = PXA910_DS_SHIFT, | 971 | .ds_shift = PXA910_DS_SHIFT, |
| 972 | }; | 972 | }; |
| 973 | 973 | ||
| 974 | static int __devinit pxa910_pinmux_probe(struct platform_device *pdev) | 974 | static int pxa910_pinmux_probe(struct platform_device *pdev) |
| 975 | { | 975 | { |
| 976 | return pxa3xx_pinctrl_register(pdev, &pxa910_info); | 976 | return pxa3xx_pinctrl_register(pdev, &pxa910_info); |
| 977 | } | 977 | } |
diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c index 864fed822f9d..fd7b24cd8908 100644 --- a/drivers/pinctrl/pinctrl-samsung.c +++ b/drivers/pinctrl/pinctrl-samsung.c | |||
| @@ -549,9 +549,11 @@ static int samsung_gpio_to_irq(struct gpio_chip *gc, unsigned offset) | |||
| 549 | * Parse the pin names listed in the 'samsung,pins' property and convert it | 549 | * Parse the pin names listed in the 'samsung,pins' property and convert it |
| 550 | * into a list of gpio numbers are create a pin group from it. | 550 | * into a list of gpio numbers are create a pin group from it. |
| 551 | */ | 551 | */ |
| 552 | static int __devinit samsung_pinctrl_parse_dt_pins(struct platform_device *pdev, | 552 | static int samsung_pinctrl_parse_dt_pins(struct platform_device *pdev, |
| 553 | struct device_node *cfg_np, struct pinctrl_desc *pctl, | 553 | struct device_node *cfg_np, |
| 554 | unsigned int **pin_list, unsigned int *npins) | 554 | struct pinctrl_desc *pctl, |
| 555 | unsigned int **pin_list, | ||
| 556 | unsigned int *npins) | ||
| 555 | { | 557 | { |
| 556 | struct device *dev = &pdev->dev; | 558 | struct device *dev = &pdev->dev; |
| 557 | struct property *prop; | 559 | struct property *prop; |
| @@ -596,8 +598,8 @@ static int __devinit samsung_pinctrl_parse_dt_pins(struct platform_device *pdev, | |||
| 596 | * from device node of the pin-controller. A pin group is formed with all | 598 | * from device node of the pin-controller. A pin group is formed with all |
| 597 | * the pins listed in the "samsung,pins" property. | 599 | * the pins listed in the "samsung,pins" property. |
| 598 | */ | 600 | */ |
| 599 | static int __devinit samsung_pinctrl_parse_dt(struct platform_device *pdev, | 601 | static int samsung_pinctrl_parse_dt(struct platform_device *pdev, |
| 600 | struct samsung_pinctrl_drv_data *drvdata) | 602 | struct samsung_pinctrl_drv_data *drvdata) |
| 601 | { | 603 | { |
| 602 | struct device *dev = &pdev->dev; | 604 | struct device *dev = &pdev->dev; |
| 603 | struct device_node *dev_np = dev->of_node; | 605 | struct device_node *dev_np = dev->of_node; |
| @@ -691,8 +693,8 @@ static int __devinit samsung_pinctrl_parse_dt(struct platform_device *pdev, | |||
| 691 | } | 693 | } |
| 692 | 694 | ||
| 693 | /* register the pinctrl interface with the pinctrl subsystem */ | 695 | /* register the pinctrl interface with the pinctrl subsystem */ |
| 694 | static int __devinit samsung_pinctrl_register(struct platform_device *pdev, | 696 | static int samsung_pinctrl_register(struct platform_device *pdev, |
| 695 | struct samsung_pinctrl_drv_data *drvdata) | 697 | struct samsung_pinctrl_drv_data *drvdata) |
| 696 | { | 698 | { |
| 697 | struct pinctrl_desc *ctrldesc = &drvdata->pctl; | 699 | struct pinctrl_desc *ctrldesc = &drvdata->pctl; |
| 698 | struct pinctrl_pin_desc *pindesc, *pdesc; | 700 | struct pinctrl_pin_desc *pindesc, *pdesc; |
| @@ -778,8 +780,8 @@ static const struct gpio_chip samsung_gpiolib_chip = { | |||
| 778 | }; | 780 | }; |
| 779 | 781 | ||
| 780 | /* register the gpiolib interface with the gpiolib subsystem */ | 782 | /* register the gpiolib interface with the gpiolib subsystem */ |
| 781 | static int __devinit samsung_gpiolib_register(struct platform_device *pdev, | 783 | static int samsung_gpiolib_register(struct platform_device *pdev, |
| 782 | struct samsung_pinctrl_drv_data *drvdata) | 784 | struct samsung_pinctrl_drv_data *drvdata) |
| 783 | { | 785 | { |
| 784 | struct samsung_pin_ctrl *ctrl = drvdata->ctrl; | 786 | struct samsung_pin_ctrl *ctrl = drvdata->ctrl; |
| 785 | struct samsung_pin_bank *bank = ctrl->pin_banks; | 787 | struct samsung_pin_bank *bank = ctrl->pin_banks; |
| @@ -816,8 +818,8 @@ fail: | |||
| 816 | } | 818 | } |
| 817 | 819 | ||
| 818 | /* unregister the gpiolib interface with the gpiolib subsystem */ | 820 | /* unregister the gpiolib interface with the gpiolib subsystem */ |
| 819 | static int __devinit samsung_gpiolib_unregister(struct platform_device *pdev, | 821 | static int samsung_gpiolib_unregister(struct platform_device *pdev, |
| 820 | struct samsung_pinctrl_drv_data *drvdata) | 822 | struct samsung_pinctrl_drv_data *drvdata) |
| 821 | { | 823 | { |
| 822 | struct samsung_pin_ctrl *ctrl = drvdata->ctrl; | 824 | struct samsung_pin_ctrl *ctrl = drvdata->ctrl; |
| 823 | struct samsung_pin_bank *bank = ctrl->pin_banks; | 825 | struct samsung_pin_bank *bank = ctrl->pin_banks; |
| @@ -881,7 +883,7 @@ static struct samsung_pin_ctrl *samsung_pinctrl_get_soc_data( | |||
| 881 | return ctrl; | 883 | return ctrl; |
| 882 | } | 884 | } |
| 883 | 885 | ||
| 884 | static int __devinit samsung_pinctrl_probe(struct platform_device *pdev) | 886 | static int samsung_pinctrl_probe(struct platform_device *pdev) |
| 885 | { | 887 | { |
| 886 | struct samsung_pinctrl_drv_data *drvdata; | 888 | struct samsung_pinctrl_drv_data *drvdata; |
| 887 | struct device *dev = &pdev->dev; | 889 | struct device *dev = &pdev->dev; |
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 79642831bba2..f6a360b86eb6 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c | |||
| @@ -493,7 +493,7 @@ static struct pinconf_ops pcs_pinconf_ops = { | |||
| 493 | * @pcs: pcs driver instance | 493 | * @pcs: pcs driver instance |
| 494 | * @offset: register offset from base | 494 | * @offset: register offset from base |
| 495 | */ | 495 | */ |
| 496 | static int __devinit pcs_add_pin(struct pcs_device *pcs, unsigned offset) | 496 | static int pcs_add_pin(struct pcs_device *pcs, unsigned offset) |
| 497 | { | 497 | { |
| 498 | struct pinctrl_pin_desc *pin; | 498 | struct pinctrl_pin_desc *pin; |
| 499 | struct pcs_name *pn; | 499 | struct pcs_name *pn; |
| @@ -526,7 +526,7 @@ static int __devinit pcs_add_pin(struct pcs_device *pcs, unsigned offset) | |||
| 526 | * If your hardware needs holes in the address space, then just set | 526 | * If your hardware needs holes in the address space, then just set |
| 527 | * up multiple driver instances. | 527 | * up multiple driver instances. |
| 528 | */ | 528 | */ |
| 529 | static int __devinit pcs_allocate_pin_table(struct pcs_device *pcs) | 529 | static int pcs_allocate_pin_table(struct pcs_device *pcs) |
| 530 | { | 530 | { |
| 531 | int mux_bytes, nr_pins, i; | 531 | int mux_bytes, nr_pins, i; |
| 532 | 532 | ||
| @@ -907,8 +907,7 @@ static void pcs_free_resources(struct pcs_device *pcs) | |||
| 907 | 907 | ||
| 908 | static struct of_device_id pcs_of_match[]; | 908 | static struct of_device_id pcs_of_match[]; |
| 909 | 909 | ||
| 910 | static int __devinit pcs_add_gpio_range(struct device_node *node, | 910 | static int pcs_add_gpio_range(struct device_node *node, struct pcs_device *pcs) |
| 911 | struct pcs_device *pcs) | ||
| 912 | { | 911 | { |
| 913 | struct pcs_gpio_range *gpio; | 912 | struct pcs_gpio_range *gpio; |
| 914 | struct device_node *child; | 913 | struct device_node *child; |
| @@ -951,7 +950,7 @@ static int __devinit pcs_add_gpio_range(struct device_node *node, | |||
| 951 | return 0; | 950 | return 0; |
| 952 | } | 951 | } |
| 953 | 952 | ||
| 954 | static int __devinit pcs_probe(struct platform_device *pdev) | 953 | static int pcs_probe(struct platform_device *pdev) |
| 955 | { | 954 | { |
| 956 | struct device_node *np = pdev->dev.of_node; | 955 | struct device_node *np = pdev->dev.of_node; |
| 957 | const struct of_device_id *match; | 956 | const struct of_device_id *match; |
diff --git a/drivers/pinctrl/pinctrl-sirf.c b/drivers/pinctrl/pinctrl-sirf.c index a4f0c5e487d5..498b2ba905de 100644 --- a/drivers/pinctrl/pinctrl-sirf.c +++ b/drivers/pinctrl/pinctrl-sirf.c | |||
| @@ -1246,7 +1246,7 @@ static void __iomem *sirfsoc_rsc_of_iomap(void) | |||
| 1246 | return of_iomap(np, 0); | 1246 | return of_iomap(np, 0); |
| 1247 | } | 1247 | } |
| 1248 | 1248 | ||
| 1249 | static int __devinit sirfsoc_pinmux_probe(struct platform_device *pdev) | 1249 | static int sirfsoc_pinmux_probe(struct platform_device *pdev) |
| 1250 | { | 1250 | { |
| 1251 | int ret; | 1251 | int ret; |
| 1252 | struct sirfsoc_pmx *spmx; | 1252 | struct sirfsoc_pmx *spmx; |
| @@ -1663,7 +1663,45 @@ const struct irq_domain_ops sirfsoc_gpio_irq_simple_ops = { | |||
| 1663 | .xlate = irq_domain_xlate_twocell, | 1663 | .xlate = irq_domain_xlate_twocell, |
| 1664 | }; | 1664 | }; |
| 1665 | 1665 | ||
| 1666 | static int __devinit sirfsoc_gpio_probe(struct device_node *np) | 1666 | static void sirfsoc_gpio_set_pullup(const u32 *pullups) |
| 1667 | { | ||
| 1668 | int i, n; | ||
| 1669 | const unsigned long *p = (const unsigned long *)pullups; | ||
| 1670 | |||
| 1671 | for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) { | ||
| 1672 | n = find_first_bit(p + i, BITS_PER_LONG); | ||
| 1673 | while (n < BITS_PER_LONG) { | ||
| 1674 | u32 offset = SIRFSOC_GPIO_CTRL(i, n); | ||
| 1675 | u32 val = readl(sgpio_bank[i].chip.regs + offset); | ||
| 1676 | val |= SIRFSOC_GPIO_CTL_PULL_MASK; | ||
| 1677 | val |= SIRFSOC_GPIO_CTL_PULL_HIGH; | ||
| 1678 | writel(val, sgpio_bank[i].chip.regs + offset); | ||
| 1679 | |||
| 1680 | n = find_next_bit(p + i, BITS_PER_LONG, n + 1); | ||
| 1681 | } | ||
| 1682 | } | ||
| 1683 | } | ||
| 1684 | |||
| 1685 | static void sirfsoc_gpio_set_pulldown(const u32 *pulldowns) | ||
| 1686 | { | ||
| 1687 | int i, n; | ||
| 1688 | const unsigned long *p = (const unsigned long *)pulldowns; | ||
| 1689 | |||
| 1690 | for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) { | ||
| 1691 | n = find_first_bit(p + i, BITS_PER_LONG); | ||
| 1692 | while (n < BITS_PER_LONG) { | ||
| 1693 | u32 offset = SIRFSOC_GPIO_CTRL(i, n); | ||
| 1694 | u32 val = readl(sgpio_bank[i].chip.regs + offset); | ||
| 1695 | val |= SIRFSOC_GPIO_CTL_PULL_MASK; | ||
| 1696 | val &= ~SIRFSOC_GPIO_CTL_PULL_HIGH; | ||
| 1697 | writel(val, sgpio_bank[i].chip.regs + offset); | ||
| 1698 | |||
| 1699 | n = find_next_bit(p + i, BITS_PER_LONG, n + 1); | ||
| 1700 | } | ||
| 1701 | } | ||
| 1702 | } | ||
| 1703 | |||
| 1704 | static int sirfsoc_gpio_probe(struct device_node *np) | ||
| 1667 | { | 1705 | { |
| 1668 | int i, err = 0; | 1706 | int i, err = 0; |
| 1669 | struct sirfsoc_gpio_bank *bank; | 1707 | struct sirfsoc_gpio_bank *bank; |
| @@ -1671,6 +1709,8 @@ static int __devinit sirfsoc_gpio_probe(struct device_node *np) | |||
| 1671 | struct platform_device *pdev; | 1709 | struct platform_device *pdev; |
| 1672 | bool is_marco = false; | 1710 | bool is_marco = false; |
| 1673 | 1711 | ||
| 1712 | u32 pullups[SIRFSOC_GPIO_NO_OF_BANKS], pulldowns[SIRFSOC_GPIO_NO_OF_BANKS]; | ||
| 1713 | |||
| 1674 | pdev = of_find_device_by_node(np); | 1714 | pdev = of_find_device_by_node(np); |
| 1675 | if (!pdev) | 1715 | if (!pdev) |
| 1676 | return -ENODEV; | 1716 | return -ENODEV; |
| @@ -1726,6 +1766,14 @@ static int __devinit sirfsoc_gpio_probe(struct device_node *np) | |||
| 1726 | irq_set_handler_data(bank->parent_irq, bank); | 1766 | irq_set_handler_data(bank->parent_irq, bank); |
| 1727 | } | 1767 | } |
| 1728 | 1768 | ||
| 1769 | if (!of_property_read_u32_array(np, "sirf,pullups", pullups, | ||
| 1770 | SIRFSOC_GPIO_NO_OF_BANKS)) | ||
| 1771 | sirfsoc_gpio_set_pullup(pullups); | ||
| 1772 | |||
| 1773 | if (!of_property_read_u32_array(np, "sirf,pulldowns", pulldowns, | ||
| 1774 | SIRFSOC_GPIO_NO_OF_BANKS)) | ||
| 1775 | sirfsoc_gpio_set_pulldown(pulldowns); | ||
| 1776 | |||
| 1729 | return 0; | 1777 | return 0; |
| 1730 | 1778 | ||
| 1731 | out: | 1779 | out: |
diff --git a/drivers/pinctrl/pinctrl-tegra.c b/drivers/pinctrl/pinctrl-tegra.c index e356b0380fa7..ae1e4bb3259d 100644 --- a/drivers/pinctrl/pinctrl-tegra.c +++ b/drivers/pinctrl/pinctrl-tegra.c | |||
| @@ -687,7 +687,7 @@ static struct pinctrl_desc tegra_pinctrl_desc = { | |||
| 687 | .owner = THIS_MODULE, | 687 | .owner = THIS_MODULE, |
| 688 | }; | 688 | }; |
| 689 | 689 | ||
| 690 | int __devinit tegra_pinctrl_probe(struct platform_device *pdev, | 690 | int tegra_pinctrl_probe(struct platform_device *pdev, |
| 691 | const struct tegra_pinctrl_soc_data *soc_data) | 691 | const struct tegra_pinctrl_soc_data *soc_data) |
| 692 | { | 692 | { |
| 693 | struct tegra_pmx *pmx; | 693 | struct tegra_pmx *pmx; |
diff --git a/drivers/pinctrl/pinctrl-tegra20.c b/drivers/pinctrl/pinctrl-tegra20.c index 1524bfd66602..e848189038f0 100644 --- a/drivers/pinctrl/pinctrl-tegra20.c +++ b/drivers/pinctrl/pinctrl-tegra20.c | |||
| @@ -2856,7 +2856,7 @@ static const struct tegra_pinctrl_soc_data tegra20_pinctrl = { | |||
| 2856 | .ngroups = ARRAY_SIZE(tegra20_groups), | 2856 | .ngroups = ARRAY_SIZE(tegra20_groups), |
| 2857 | }; | 2857 | }; |
| 2858 | 2858 | ||
| 2859 | static int __devinit tegra20_pinctrl_probe(struct platform_device *pdev) | 2859 | static int tegra20_pinctrl_probe(struct platform_device *pdev) |
| 2860 | { | 2860 | { |
| 2861 | return tegra_pinctrl_probe(pdev, &tegra20_pinctrl); | 2861 | return tegra_pinctrl_probe(pdev, &tegra20_pinctrl); |
| 2862 | } | 2862 | } |
diff --git a/drivers/pinctrl/pinctrl-tegra30.c b/drivers/pinctrl/pinctrl-tegra30.c index cf579ebf346f..9ad87ea735d4 100644 --- a/drivers/pinctrl/pinctrl-tegra30.c +++ b/drivers/pinctrl/pinctrl-tegra30.c | |||
| @@ -3722,7 +3722,7 @@ static const struct tegra_pinctrl_soc_data tegra30_pinctrl = { | |||
| 3722 | .ngroups = ARRAY_SIZE(tegra30_groups), | 3722 | .ngroups = ARRAY_SIZE(tegra30_groups), |
| 3723 | }; | 3723 | }; |
| 3724 | 3724 | ||
| 3725 | static int __devinit tegra30_pinctrl_probe(struct platform_device *pdev) | 3725 | static int tegra30_pinctrl_probe(struct platform_device *pdev) |
| 3726 | { | 3726 | { |
| 3727 | return tegra_pinctrl_probe(pdev, &tegra30_pinctrl); | 3727 | return tegra_pinctrl_probe(pdev, &tegra30_pinctrl); |
| 3728 | } | 3728 | } |
diff --git a/drivers/pinctrl/pinctrl-u300.c b/drivers/pinctrl/pinctrl-u300.c index 8c039ad22baf..718ec5762683 100644 --- a/drivers/pinctrl/pinctrl-u300.c +++ b/drivers/pinctrl/pinctrl-u300.c | |||
| @@ -1062,7 +1062,7 @@ static struct pinctrl_desc u300_pmx_desc = { | |||
| 1062 | .owner = THIS_MODULE, | 1062 | .owner = THIS_MODULE, |
| 1063 | }; | 1063 | }; |
| 1064 | 1064 | ||
| 1065 | static int __devinit u300_pmx_probe(struct platform_device *pdev) | 1065 | static int u300_pmx_probe(struct platform_device *pdev) |
| 1066 | { | 1066 | { |
| 1067 | struct u300_pmx *upmx; | 1067 | struct u300_pmx *upmx; |
| 1068 | struct resource *res; | 1068 | struct resource *res; |
diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c index ad90984ec500..5f0eb04c2336 100644 --- a/drivers/pinctrl/pinctrl-xway.c +++ b/drivers/pinctrl/pinctrl-xway.c | |||
| @@ -674,7 +674,7 @@ static const struct of_device_id xway_match[] = { | |||
| 674 | }; | 674 | }; |
| 675 | MODULE_DEVICE_TABLE(of, xway_match); | 675 | MODULE_DEVICE_TABLE(of, xway_match); |
| 676 | 676 | ||
| 677 | static int __devinit pinmux_xway_probe(struct platform_device *pdev) | 677 | static int pinmux_xway_probe(struct platform_device *pdev) |
| 678 | { | 678 | { |
| 679 | const struct of_device_id *match; | 679 | const struct of_device_id *match; |
| 680 | const struct pinctrl_xway_soc *xway_soc; | 680 | const struct pinctrl_xway_soc *xway_soc; |
diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c index 4c045053bbdd..3cf4ecd9302c 100644 --- a/drivers/pinctrl/spear/pinctrl-plgpio.c +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c | |||
| @@ -451,8 +451,7 @@ int spear310_o2p(int offset) | |||
| 451 | return offset + 2; | 451 | return offset + 2; |
| 452 | } | 452 | } |
| 453 | 453 | ||
| 454 | static int __devinit plgpio_probe_dt(struct platform_device *pdev, | 454 | static int plgpio_probe_dt(struct platform_device *pdev, struct plgpio *plgpio) |
| 455 | struct plgpio *plgpio) | ||
| 456 | { | 455 | { |
| 457 | struct device_node *np = pdev->dev.of_node; | 456 | struct device_node *np = pdev->dev.of_node; |
| 458 | int ret = -EINVAL; | 457 | int ret = -EINVAL; |
| @@ -522,7 +521,7 @@ static int __devinit plgpio_probe_dt(struct platform_device *pdev, | |||
| 522 | end: | 521 | end: |
| 523 | return ret; | 522 | return ret; |
| 524 | } | 523 | } |
| 525 | static int __devinit plgpio_probe(struct platform_device *pdev) | 524 | static int plgpio_probe(struct platform_device *pdev) |
| 526 | { | 525 | { |
| 527 | struct device_node *np = pdev->dev.of_node; | 526 | struct device_node *np = pdev->dev.of_node; |
| 528 | struct plgpio *plgpio; | 527 | struct plgpio *plgpio; |
diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c index 922c057521a1..6a7dae70db08 100644 --- a/drivers/pinctrl/spear/pinctrl-spear.c +++ b/drivers/pinctrl/spear/pinctrl-spear.c | |||
| @@ -82,9 +82,8 @@ static int set_mode(struct spear_pmx *pmx, int mode) | |||
| 82 | return 0; | 82 | return 0; |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | void __devinit | 85 | void pmx_init_gpio_pingroup_addr(struct spear_gpio_pingroup *gpio_pingroup, |
| 86 | pmx_init_gpio_pingroup_addr(struct spear_gpio_pingroup *gpio_pingroup, | 86 | unsigned count, u16 reg) |
| 87 | unsigned count, u16 reg) | ||
| 88 | { | 87 | { |
| 89 | int i, j; | 88 | int i, j; |
| 90 | 89 | ||
| @@ -93,7 +92,7 @@ pmx_init_gpio_pingroup_addr(struct spear_gpio_pingroup *gpio_pingroup, | |||
| 93 | gpio_pingroup[i].muxregs[j].reg = reg; | 92 | gpio_pingroup[i].muxregs[j].reg = reg; |
| 94 | } | 93 | } |
| 95 | 94 | ||
| 96 | void __devinit pmx_init_addr(struct spear_pinctrl_machdata *machdata, u16 reg) | 95 | void pmx_init_addr(struct spear_pinctrl_machdata *machdata, u16 reg) |
| 97 | { | 96 | { |
| 98 | struct spear_pingroup *pgroup; | 97 | struct spear_pingroup *pgroup; |
| 99 | struct spear_modemux *modemux; | 98 | struct spear_modemux *modemux; |
| @@ -358,8 +357,8 @@ static struct pinctrl_desc spear_pinctrl_desc = { | |||
| 358 | .owner = THIS_MODULE, | 357 | .owner = THIS_MODULE, |
| 359 | }; | 358 | }; |
| 360 | 359 | ||
| 361 | int __devinit spear_pinctrl_probe(struct platform_device *pdev, | 360 | int spear_pinctrl_probe(struct platform_device *pdev, |
| 362 | struct spear_pinctrl_machdata *machdata) | 361 | struct spear_pinctrl_machdata *machdata) |
| 363 | { | 362 | { |
| 364 | struct device_node *np = pdev->dev.of_node; | 363 | struct device_node *np = pdev->dev.of_node; |
| 365 | struct resource *res; | 364 | struct resource *res; |
diff --git a/drivers/pinctrl/spear/pinctrl-spear.h b/drivers/pinctrl/spear/pinctrl-spear.h index 1be46ecc6d91..dc8bf85ecb2a 100644 --- a/drivers/pinctrl/spear/pinctrl-spear.h +++ b/drivers/pinctrl/spear/pinctrl-spear.h | |||
| @@ -192,12 +192,11 @@ static inline void pmx_writel(struct spear_pmx *pmx, u32 val, u32 reg) | |||
| 192 | writel_relaxed(val, pmx->vbase + reg); | 192 | writel_relaxed(val, pmx->vbase + reg); |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | void __devinit pmx_init_addr(struct spear_pinctrl_machdata *machdata, u16 reg); | 195 | void pmx_init_addr(struct spear_pinctrl_machdata *machdata, u16 reg); |
| 196 | void __devinit | 196 | void pmx_init_gpio_pingroup_addr(struct spear_gpio_pingroup *gpio_pingroup, |
| 197 | pmx_init_gpio_pingroup_addr(struct spear_gpio_pingroup *gpio_pingroup, | 197 | unsigned count, u16 reg); |
| 198 | unsigned count, u16 reg); | 198 | int spear_pinctrl_probe(struct platform_device *pdev, |
| 199 | int __devinit spear_pinctrl_probe(struct platform_device *pdev, | 199 | struct spear_pinctrl_machdata *machdata); |
| 200 | struct spear_pinctrl_machdata *machdata); | ||
| 201 | int spear_pinctrl_remove(struct platform_device *pdev); | 200 | int spear_pinctrl_remove(struct platform_device *pdev); |
| 202 | 201 | ||
| 203 | #define SPEAR_PIN_0_TO_101 \ | 202 | #define SPEAR_PIN_0_TO_101 \ |
diff --git a/drivers/pinctrl/spear/pinctrl-spear1310.c b/drivers/pinctrl/spear/pinctrl-spear1310.c index e40d785a3fc2..1a8bbfec60ca 100644 --- a/drivers/pinctrl/spear/pinctrl-spear1310.c +++ b/drivers/pinctrl/spear/pinctrl-spear1310.c | |||
| @@ -2699,7 +2699,7 @@ static struct of_device_id spear1310_pinctrl_of_match[] = { | |||
| 2699 | {}, | 2699 | {}, |
| 2700 | }; | 2700 | }; |
| 2701 | 2701 | ||
| 2702 | static int __devinit spear1310_pinctrl_probe(struct platform_device *pdev) | 2702 | static int spear1310_pinctrl_probe(struct platform_device *pdev) |
| 2703 | { | 2703 | { |
| 2704 | return spear_pinctrl_probe(pdev, &spear1310_machdata); | 2704 | return spear_pinctrl_probe(pdev, &spear1310_machdata); |
| 2705 | } | 2705 | } |
diff --git a/drivers/pinctrl/spear/pinctrl-spear1340.c b/drivers/pinctrl/spear/pinctrl-spear1340.c index 8deaaff3156c..873966e2b99f 100644 --- a/drivers/pinctrl/spear/pinctrl-spear1340.c +++ b/drivers/pinctrl/spear/pinctrl-spear1340.c | |||
| @@ -2015,7 +2015,7 @@ static struct of_device_id spear1340_pinctrl_of_match[] = { | |||
| 2015 | {}, | 2015 | {}, |
| 2016 | }; | 2016 | }; |
| 2017 | 2017 | ||
| 2018 | static int __devinit spear1340_pinctrl_probe(struct platform_device *pdev) | 2018 | static int spear1340_pinctrl_probe(struct platform_device *pdev) |
| 2019 | { | 2019 | { |
| 2020 | return spear_pinctrl_probe(pdev, &spear1340_machdata); | 2020 | return spear_pinctrl_probe(pdev, &spear1340_machdata); |
| 2021 | } | 2021 | } |
diff --git a/drivers/pinctrl/spear/pinctrl-spear300.c b/drivers/pinctrl/spear/pinctrl-spear300.c index f48e466e605a..4777c0d0e730 100644 --- a/drivers/pinctrl/spear/pinctrl-spear300.c +++ b/drivers/pinctrl/spear/pinctrl-spear300.c | |||
| @@ -653,7 +653,7 @@ static struct of_device_id spear300_pinctrl_of_match[] = { | |||
| 653 | {}, | 653 | {}, |
| 654 | }; | 654 | }; |
| 655 | 655 | ||
| 656 | static int __devinit spear300_pinctrl_probe(struct platform_device *pdev) | 656 | static int spear300_pinctrl_probe(struct platform_device *pdev) |
| 657 | { | 657 | { |
| 658 | int ret; | 658 | int ret; |
| 659 | 659 | ||
diff --git a/drivers/pinctrl/spear/pinctrl-spear310.c b/drivers/pinctrl/spear/pinctrl-spear310.c index 5b954c19a6d2..06c7e6f1c7f2 100644 --- a/drivers/pinctrl/spear/pinctrl-spear310.c +++ b/drivers/pinctrl/spear/pinctrl-spear310.c | |||
| @@ -378,7 +378,7 @@ static struct of_device_id spear310_pinctrl_of_match[] = { | |||
| 378 | {}, | 378 | {}, |
| 379 | }; | 379 | }; |
| 380 | 380 | ||
| 381 | static int __devinit spear310_pinctrl_probe(struct platform_device *pdev) | 381 | static int spear310_pinctrl_probe(struct platform_device *pdev) |
| 382 | { | 382 | { |
| 383 | int ret; | 383 | int ret; |
| 384 | 384 | ||
diff --git a/drivers/pinctrl/spear/pinctrl-spear320.c b/drivers/pinctrl/spear/pinctrl-spear320.c index e9a5e6d39242..b8e290a8c8c9 100644 --- a/drivers/pinctrl/spear/pinctrl-spear320.c +++ b/drivers/pinctrl/spear/pinctrl-spear320.c | |||
| @@ -3417,7 +3417,7 @@ static struct of_device_id spear320_pinctrl_of_match[] = { | |||
| 3417 | {}, | 3417 | {}, |
| 3418 | }; | 3418 | }; |
| 3419 | 3419 | ||
| 3420 | static int __devinit spear320_pinctrl_probe(struct platform_device *pdev) | 3420 | static int spear320_pinctrl_probe(struct platform_device *pdev) |
| 3421 | { | 3421 | { |
| 3422 | int ret; | 3422 | int ret; |
| 3423 | 3423 | ||
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 934d861a3235..afed7018a2b5 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c | |||
| @@ -125,8 +125,11 @@ static const struct key_entry acer_wmi_keymap[] = { | |||
| 125 | {KE_IGNORE, 0x63, {KEY_BRIGHTNESSDOWN} }, | 125 | {KE_IGNORE, 0x63, {KEY_BRIGHTNESSDOWN} }, |
| 126 | {KE_KEY, 0x64, {KEY_SWITCHVIDEOMODE} }, /* Display Switch */ | 126 | {KE_KEY, 0x64, {KEY_SWITCHVIDEOMODE} }, /* Display Switch */ |
| 127 | {KE_IGNORE, 0x81, {KEY_SLEEP} }, | 127 | {KE_IGNORE, 0x81, {KEY_SLEEP} }, |
| 128 | {KE_KEY, 0x82, {KEY_TOUCHPAD_TOGGLE} }, /* Touch Pad On/Off */ | 128 | {KE_KEY, 0x82, {KEY_TOUCHPAD_TOGGLE} }, /* Touch Pad Toggle */ |
| 129 | {KE_KEY, KEY_TOUCHPAD_ON, {KEY_TOUCHPAD_ON} }, | ||
| 130 | {KE_KEY, KEY_TOUCHPAD_OFF, {KEY_TOUCHPAD_OFF} }, | ||
| 129 | {KE_IGNORE, 0x83, {KEY_TOUCHPAD_TOGGLE} }, | 131 | {KE_IGNORE, 0x83, {KEY_TOUCHPAD_TOGGLE} }, |
| 132 | {KE_KEY, 0x85, {KEY_TOUCHPAD_TOGGLE} }, | ||
| 130 | {KE_END, 0} | 133 | {KE_END, 0} |
| 131 | }; | 134 | }; |
| 132 | 135 | ||
| @@ -147,6 +150,7 @@ struct event_return_value { | |||
| 147 | #define ACER_WMID3_GDS_THREEG (1<<6) /* 3G */ | 150 | #define ACER_WMID3_GDS_THREEG (1<<6) /* 3G */ |
| 148 | #define ACER_WMID3_GDS_WIMAX (1<<7) /* WiMAX */ | 151 | #define ACER_WMID3_GDS_WIMAX (1<<7) /* WiMAX */ |
| 149 | #define ACER_WMID3_GDS_BLUETOOTH (1<<11) /* BT */ | 152 | #define ACER_WMID3_GDS_BLUETOOTH (1<<11) /* BT */ |
| 153 | #define ACER_WMID3_GDS_TOUCHPAD (1<<1) /* Touchpad */ | ||
| 150 | 154 | ||
| 151 | struct lm_input_params { | 155 | struct lm_input_params { |
| 152 | u8 function_num; /* Function Number */ | 156 | u8 function_num; /* Function Number */ |
| @@ -335,7 +339,7 @@ static struct quirk_entry quirk_lenovo_ideapad_s205 = { | |||
| 335 | }; | 339 | }; |
| 336 | 340 | ||
| 337 | /* The Aspire One has a dummy ACPI-WMI interface - disable it */ | 341 | /* The Aspire One has a dummy ACPI-WMI interface - disable it */ |
| 338 | static struct dmi_system_id __devinitdata acer_blacklist[] = { | 342 | static struct dmi_system_id acer_blacklist[] = { |
| 339 | { | 343 | { |
| 340 | .ident = "Acer Aspire One (SSD)", | 344 | .ident = "Acer Aspire One (SSD)", |
| 341 | .matches = { | 345 | .matches = { |
| @@ -875,7 +879,7 @@ WMI_execute_u32(u32 method_id, u32 in, u32 *out) | |||
| 875 | struct acpi_buffer input = { (acpi_size) sizeof(u32), (void *)(&in) }; | 879 | struct acpi_buffer input = { (acpi_size) sizeof(u32), (void *)(&in) }; |
| 876 | struct acpi_buffer result = { ACPI_ALLOCATE_BUFFER, NULL }; | 880 | struct acpi_buffer result = { ACPI_ALLOCATE_BUFFER, NULL }; |
| 877 | union acpi_object *obj; | 881 | union acpi_object *obj; |
| 878 | u32 tmp; | 882 | u32 tmp = 0; |
| 879 | acpi_status status; | 883 | acpi_status status; |
| 880 | 884 | ||
| 881 | status = wmi_evaluate_method(WMID_GUID1, 1, method_id, &input, &result); | 885 | status = wmi_evaluate_method(WMID_GUID1, 1, method_id, &input, &result); |
| @@ -884,14 +888,14 @@ WMI_execute_u32(u32 method_id, u32 in, u32 *out) | |||
| 884 | return status; | 888 | return status; |
| 885 | 889 | ||
| 886 | obj = (union acpi_object *) result.pointer; | 890 | obj = (union acpi_object *) result.pointer; |
| 887 | if (obj && obj->type == ACPI_TYPE_BUFFER && | 891 | if (obj) { |
| 888 | (obj->buffer.length == sizeof(u32) || | 892 | if (obj->type == ACPI_TYPE_BUFFER && |
| 889 | obj->buffer.length == sizeof(u64))) { | 893 | (obj->buffer.length == sizeof(u32) || |
| 890 | tmp = *((u32 *) obj->buffer.pointer); | 894 | obj->buffer.length == sizeof(u64))) { |
| 891 | } else if (obj->type == ACPI_TYPE_INTEGER) { | 895 | tmp = *((u32 *) obj->buffer.pointer); |
| 892 | tmp = (u32) obj->integer.value; | 896 | } else if (obj->type == ACPI_TYPE_INTEGER) { |
| 893 | } else { | 897 | tmp = (u32) obj->integer.value; |
| 894 | tmp = 0; | 898 | } |
| 895 | } | 899 | } |
| 896 | 900 | ||
| 897 | if (out) | 901 | if (out) |
| @@ -1193,12 +1197,14 @@ static acpi_status WMID_set_capabilities(void) | |||
| 1193 | return status; | 1197 | return status; |
| 1194 | 1198 | ||
| 1195 | obj = (union acpi_object *) out.pointer; | 1199 | obj = (union acpi_object *) out.pointer; |
| 1196 | if (obj && obj->type == ACPI_TYPE_BUFFER && | 1200 | if (obj) { |
| 1197 | (obj->buffer.length == sizeof(u32) || | 1201 | if (obj->type == ACPI_TYPE_BUFFER && |
| 1198 | obj->buffer.length == sizeof(u64))) { | 1202 | (obj->buffer.length == sizeof(u32) || |
| 1199 | devices = *((u32 *) obj->buffer.pointer); | 1203 | obj->buffer.length == sizeof(u64))) { |
| 1200 | } else if (obj->type == ACPI_TYPE_INTEGER) { | 1204 | devices = *((u32 *) obj->buffer.pointer); |
| 1201 | devices = (u32) obj->integer.value; | 1205 | } else if (obj->type == ACPI_TYPE_INTEGER) { |
| 1206 | devices = (u32) obj->integer.value; | ||
| 1207 | } | ||
| 1202 | } else { | 1208 | } else { |
| 1203 | kfree(out.pointer); | 1209 | kfree(out.pointer); |
| 1204 | return AE_ERROR; | 1210 | return AE_ERROR; |
| @@ -1330,7 +1336,7 @@ static struct led_classdev mail_led = { | |||
| 1330 | .brightness_set = mail_led_set, | 1336 | .brightness_set = mail_led_set, |
| 1331 | }; | 1337 | }; |
| 1332 | 1338 | ||
| 1333 | static int __devinit acer_led_init(struct device *dev) | 1339 | static int acer_led_init(struct device *dev) |
| 1334 | { | 1340 | { |
| 1335 | return led_classdev_register(dev, &mail_led); | 1341 | return led_classdev_register(dev, &mail_led); |
| 1336 | } | 1342 | } |
| @@ -1372,7 +1378,7 @@ static const struct backlight_ops acer_bl_ops = { | |||
| 1372 | .update_status = update_bl_status, | 1378 | .update_status = update_bl_status, |
| 1373 | }; | 1379 | }; |
| 1374 | 1380 | ||
| 1375 | static int __devinit acer_backlight_init(struct device *dev) | 1381 | static int acer_backlight_init(struct device *dev) |
| 1376 | { | 1382 | { |
| 1377 | struct backlight_properties props; | 1383 | struct backlight_properties props; |
| 1378 | struct backlight_device *bd; | 1384 | struct backlight_device *bd; |
| @@ -1676,6 +1682,7 @@ static void acer_wmi_notify(u32 value, void *context) | |||
| 1676 | acpi_status status; | 1682 | acpi_status status; |
| 1677 | u16 device_state; | 1683 | u16 device_state; |
| 1678 | const struct key_entry *key; | 1684 | const struct key_entry *key; |
| 1685 | u32 scancode; | ||
| 1679 | 1686 | ||
| 1680 | status = wmi_get_event_data(value, &response); | 1687 | status = wmi_get_event_data(value, &response); |
| 1681 | if (status != AE_OK) { | 1688 | if (status != AE_OK) { |
| @@ -1712,6 +1719,7 @@ static void acer_wmi_notify(u32 value, void *context) | |||
| 1712 | pr_warn("Unknown key number - 0x%x\n", | 1719 | pr_warn("Unknown key number - 0x%x\n", |
| 1713 | return_value.key_num); | 1720 | return_value.key_num); |
| 1714 | } else { | 1721 | } else { |
| 1722 | scancode = return_value.key_num; | ||
| 1715 | switch (key->keycode) { | 1723 | switch (key->keycode) { |
| 1716 | case KEY_WLAN: | 1724 | case KEY_WLAN: |
| 1717 | case KEY_BLUETOOTH: | 1725 | case KEY_BLUETOOTH: |
| @@ -1725,9 +1733,11 @@ static void acer_wmi_notify(u32 value, void *context) | |||
| 1725 | rfkill_set_sw_state(bluetooth_rfkill, | 1733 | rfkill_set_sw_state(bluetooth_rfkill, |
| 1726 | !(device_state & ACER_WMID3_GDS_BLUETOOTH)); | 1734 | !(device_state & ACER_WMID3_GDS_BLUETOOTH)); |
| 1727 | break; | 1735 | break; |
| 1736 | case KEY_TOUCHPAD_TOGGLE: | ||
| 1737 | scancode = (device_state & ACER_WMID3_GDS_TOUCHPAD) ? | ||
| 1738 | KEY_TOUCHPAD_ON : KEY_TOUCHPAD_OFF; | ||
| 1728 | } | 1739 | } |
| 1729 | sparse_keymap_report_entry(acer_wmi_input_dev, key, | 1740 | sparse_keymap_report_event(acer_wmi_input_dev, scancode, 1, true); |
| 1730 | 1, true); | ||
| 1731 | } | 1741 | } |
| 1732 | break; | 1742 | break; |
| 1733 | case WMID_ACCEL_EVENT: | 1743 | case WMID_ACCEL_EVENT: |
| @@ -1946,12 +1956,14 @@ static u32 get_wmid_devices(void) | |||
| 1946 | return 0; | 1956 | return 0; |
| 1947 | 1957 | ||
| 1948 | obj = (union acpi_object *) out.pointer; | 1958 | obj = (union acpi_object *) out.pointer; |
| 1949 | if (obj && obj->type == ACPI_TYPE_BUFFER && | 1959 | if (obj) { |
| 1950 | (obj->buffer.length == sizeof(u32) || | 1960 | if (obj->type == ACPI_TYPE_BUFFER && |
| 1951 | obj->buffer.length == sizeof(u64))) { | 1961 | (obj->buffer.length == sizeof(u32) || |
| 1952 | devices = *((u32 *) obj->buffer.pointer); | 1962 | obj->buffer.length == sizeof(u64))) { |
| 1953 | } else if (obj->type == ACPI_TYPE_INTEGER) { | 1963 | devices = *((u32 *) obj->buffer.pointer); |
| 1954 | devices = (u32) obj->integer.value; | 1964 | } else if (obj->type == ACPI_TYPE_INTEGER) { |
| 1965 | devices = (u32) obj->integer.value; | ||
| 1966 | } | ||
| 1955 | } | 1967 | } |
| 1956 | 1968 | ||
| 1957 | kfree(out.pointer); | 1969 | kfree(out.pointer); |
| @@ -1961,7 +1973,7 @@ static u32 get_wmid_devices(void) | |||
| 1961 | /* | 1973 | /* |
| 1962 | * Platform device | 1974 | * Platform device |
| 1963 | */ | 1975 | */ |
| 1964 | static int __devinit acer_platform_probe(struct platform_device *device) | 1976 | static int acer_platform_probe(struct platform_device *device) |
| 1965 | { | 1977 | { |
| 1966 | int err; | 1978 | int err; |
| 1967 | 1979 | ||
diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c index c2e3e63d2c15..f94467c05225 100644 --- a/drivers/platform/x86/acerhdf.c +++ b/drivers/platform/x86/acerhdf.c | |||
| @@ -515,7 +515,7 @@ static int acerhdf_suspend(struct device *dev) | |||
| 515 | return 0; | 515 | return 0; |
| 516 | } | 516 | } |
| 517 | 517 | ||
| 518 | static int __devinit acerhdf_probe(struct platform_device *device) | 518 | static int acerhdf_probe(struct platform_device *device) |
| 519 | { | 519 | { |
| 520 | return 0; | 520 | return 0; |
| 521 | } | 521 | } |
diff --git a/drivers/platform/x86/amilo-rfkill.c b/drivers/platform/x86/amilo-rfkill.c index 1deca7f6c4ea..6296f078b7bc 100644 --- a/drivers/platform/x86/amilo-rfkill.c +++ b/drivers/platform/x86/amilo-rfkill.c | |||
| @@ -74,7 +74,7 @@ static const struct rfkill_ops amilo_m7440_rfkill_ops = { | |||
| 74 | .set_block = amilo_m7440_rfkill_set_block | 74 | .set_block = amilo_m7440_rfkill_set_block |
| 75 | }; | 75 | }; |
| 76 | 76 | ||
| 77 | static const struct dmi_system_id __devinitconst amilo_rfkill_id_table[] = { | 77 | static const struct dmi_system_id amilo_rfkill_id_table[] = { |
| 78 | { | 78 | { |
| 79 | .matches = { | 79 | .matches = { |
| 80 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | 80 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), |
| @@ -95,7 +95,7 @@ static const struct dmi_system_id __devinitconst amilo_rfkill_id_table[] = { | |||
| 95 | static struct platform_device *amilo_rfkill_pdev; | 95 | static struct platform_device *amilo_rfkill_pdev; |
| 96 | static struct rfkill *amilo_rfkill_dev; | 96 | static struct rfkill *amilo_rfkill_dev; |
| 97 | 97 | ||
| 98 | static int __devinit amilo_rfkill_probe(struct platform_device *device) | 98 | static int amilo_rfkill_probe(struct platform_device *device) |
| 99 | { | 99 | { |
| 100 | int rc; | 100 | int rc; |
| 101 | const struct dmi_system_id *system_id = | 101 | const struct dmi_system_id *system_id = |
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c index db8f63841b42..f74bfcbb7bad 100644 --- a/drivers/platform/x86/apple-gmux.c +++ b/drivers/platform/x86/apple-gmux.c | |||
| @@ -411,8 +411,7 @@ static int gmux_resume(struct pnp_dev *pnp) | |||
| 411 | return 0; | 411 | return 0; |
| 412 | } | 412 | } |
| 413 | 413 | ||
| 414 | static int __devinit gmux_probe(struct pnp_dev *pnp, | 414 | static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id) |
| 415 | const struct pnp_device_id *id) | ||
| 416 | { | 415 | { |
| 417 | struct apple_gmux_data *gmux_data; | 416 | struct apple_gmux_data *gmux_data; |
| 418 | struct resource *res; | 417 | struct resource *res; |
| @@ -577,7 +576,7 @@ err_free: | |||
| 577 | return ret; | 576 | return ret; |
| 578 | } | 577 | } |
| 579 | 578 | ||
| 580 | static void __devexit gmux_remove(struct pnp_dev *pnp) | 579 | static void gmux_remove(struct pnp_dev *pnp) |
| 581 | { | 580 | { |
| 582 | struct apple_gmux_data *gmux_data = pnp_get_drvdata(pnp); | 581 | struct apple_gmux_data *gmux_data = pnp_get_drvdata(pnp); |
| 583 | 582 | ||
| @@ -609,7 +608,7 @@ static const struct pnp_device_id gmux_device_ids[] = { | |||
| 609 | static struct pnp_driver gmux_pnp_driver = { | 608 | static struct pnp_driver gmux_pnp_driver = { |
| 610 | .name = "apple-gmux", | 609 | .name = "apple-gmux", |
| 611 | .probe = gmux_probe, | 610 | .probe = gmux_probe, |
| 612 | .remove = __devexit_p(gmux_remove), | 611 | .remove = gmux_remove, |
| 613 | .id_table = gmux_device_ids, | 612 | .id_table = gmux_device_ids, |
| 614 | .suspend = gmux_suspend, | 613 | .suspend = gmux_suspend, |
| 615 | .resume = gmux_resume | 614 | .resume = gmux_resume |
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 4b568df56643..fcde4e528819 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c | |||
| @@ -860,8 +860,10 @@ static ssize_t show_infos(struct device *dev, | |||
| 860 | /* | 860 | /* |
| 861 | * The HWRS method return informations about the hardware. | 861 | * The HWRS method return informations about the hardware. |
| 862 | * 0x80 bit is for WLAN, 0x100 for Bluetooth. | 862 | * 0x80 bit is for WLAN, 0x100 for Bluetooth. |
| 863 | * 0x40 for WWAN, 0x10 for WIMAX. | ||
| 863 | * The significance of others is yet to be found. | 864 | * The significance of others is yet to be found. |
| 864 | * If we don't find the method, we assume the device are present. | 865 | * We don't currently use this for device detection, and it |
| 866 | * takes several seconds to run on some systems. | ||
| 865 | */ | 867 | */ |
| 866 | rv = acpi_evaluate_integer(asus->handle, "HWRS", NULL, &temp); | 868 | rv = acpi_evaluate_integer(asus->handle, "HWRS", NULL, &temp); |
| 867 | if (!ACPI_FAILURE(rv)) | 869 | if (!ACPI_FAILURE(rv)) |
| @@ -1682,7 +1684,7 @@ static int asus_laptop_get_info(struct asus_laptop *asus) | |||
| 1682 | { | 1684 | { |
| 1683 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 1685 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
| 1684 | union acpi_object *model = NULL; | 1686 | union acpi_object *model = NULL; |
| 1685 | unsigned long long bsts_result, hwrs_result; | 1687 | unsigned long long bsts_result; |
| 1686 | char *string = NULL; | 1688 | char *string = NULL; |
| 1687 | acpi_status status; | 1689 | acpi_status status; |
| 1688 | 1690 | ||
| @@ -1741,20 +1743,9 @@ static int asus_laptop_get_info(struct asus_laptop *asus) | |||
| 1741 | return -ENOMEM; | 1743 | return -ENOMEM; |
| 1742 | } | 1744 | } |
| 1743 | 1745 | ||
| 1744 | if (*string) | 1746 | if (string) |
| 1745 | pr_notice(" %s model detected\n", string); | 1747 | pr_notice(" %s model detected\n", string); |
| 1746 | 1748 | ||
| 1747 | /* | ||
| 1748 | * The HWRS method return informations about the hardware. | ||
| 1749 | * 0x80 bit is for WLAN, 0x100 for Bluetooth, | ||
| 1750 | * 0x40 for WWAN, 0x10 for WIMAX. | ||
| 1751 | * The significance of others is yet to be found. | ||
| 1752 | */ | ||
| 1753 | status = | ||
| 1754 | acpi_evaluate_integer(asus->handle, "HWRS", NULL, &hwrs_result); | ||
| 1755 | if (!ACPI_FAILURE(status)) | ||
| 1756 | pr_notice(" HWRS returned %x", (int)hwrs_result); | ||
| 1757 | |||
| 1758 | if (!acpi_check_handle(asus->handle, METHOD_WL_STATUS, NULL)) | 1749 | if (!acpi_check_handle(asus->handle, METHOD_WL_STATUS, NULL)) |
| 1759 | asus->have_rsts = true; | 1750 | asus->have_rsts = true; |
| 1760 | 1751 | ||
| @@ -1763,7 +1754,7 @@ static int asus_laptop_get_info(struct asus_laptop *asus) | |||
| 1763 | return AE_OK; | 1754 | return AE_OK; |
| 1764 | } | 1755 | } |
| 1765 | 1756 | ||
| 1766 | static int __devinit asus_acpi_init(struct asus_laptop *asus) | 1757 | static int asus_acpi_init(struct asus_laptop *asus) |
| 1767 | { | 1758 | { |
| 1768 | int result = 0; | 1759 | int result = 0; |
| 1769 | 1760 | ||
| @@ -1823,7 +1814,7 @@ static int __devinit asus_acpi_init(struct asus_laptop *asus) | |||
| 1823 | return result; | 1814 | return result; |
| 1824 | } | 1815 | } |
| 1825 | 1816 | ||
| 1826 | static void __devinit asus_dmi_check(void) | 1817 | static void asus_dmi_check(void) |
| 1827 | { | 1818 | { |
| 1828 | const char *model; | 1819 | const char *model; |
| 1829 | 1820 | ||
| @@ -1839,7 +1830,7 @@ static void __devinit asus_dmi_check(void) | |||
| 1839 | 1830 | ||
| 1840 | static bool asus_device_present; | 1831 | static bool asus_device_present; |
| 1841 | 1832 | ||
| 1842 | static int __devinit asus_acpi_add(struct acpi_device *device) | 1833 | static int asus_acpi_add(struct acpi_device *device) |
| 1843 | { | 1834 | { |
| 1844 | struct asus_laptop *asus; | 1835 | struct asus_laptop *asus; |
| 1845 | int result; | 1836 | int result; |
diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c index 1887e2f166a4..475cc5242511 100644 --- a/drivers/platform/x86/compal-laptop.c +++ b/drivers/platform/x86/compal-laptop.c | |||
| @@ -713,15 +713,15 @@ static struct attribute_group compal_attribute_group = { | |||
| 713 | .attrs = compal_attributes | 713 | .attrs = compal_attributes |
| 714 | }; | 714 | }; |
| 715 | 715 | ||
| 716 | static int __devinit compal_probe(struct platform_device *); | 716 | static int compal_probe(struct platform_device *); |
| 717 | static int __devexit compal_remove(struct platform_device *); | 717 | static int compal_remove(struct platform_device *); |
| 718 | static struct platform_driver compal_driver = { | 718 | static struct platform_driver compal_driver = { |
| 719 | .driver = { | 719 | .driver = { |
| 720 | .name = DRIVER_NAME, | 720 | .name = DRIVER_NAME, |
| 721 | .owner = THIS_MODULE, | 721 | .owner = THIS_MODULE, |
| 722 | }, | 722 | }, |
| 723 | .probe = compal_probe, | 723 | .probe = compal_probe, |
| 724 | .remove = __devexit_p(compal_remove) | 724 | .remove = compal_remove, |
| 725 | }; | 725 | }; |
| 726 | 726 | ||
| 727 | static enum power_supply_property compal_bat_properties[] = { | 727 | static enum power_supply_property compal_bat_properties[] = { |
| @@ -1015,7 +1015,7 @@ err_backlight: | |||
| 1015 | return ret; | 1015 | return ret; |
| 1016 | } | 1016 | } |
| 1017 | 1017 | ||
| 1018 | static int __devinit compal_probe(struct platform_device *pdev) | 1018 | static int compal_probe(struct platform_device *pdev) |
| 1019 | { | 1019 | { |
| 1020 | int err; | 1020 | int err; |
| 1021 | struct compal_data *data; | 1021 | struct compal_data *data; |
| @@ -1067,7 +1067,7 @@ static void __exit compal_cleanup(void) | |||
| 1067 | pr_info("Driver unloaded\n"); | 1067 | pr_info("Driver unloaded\n"); |
| 1068 | } | 1068 | } |
| 1069 | 1069 | ||
| 1070 | static int __devexit compal_remove(struct platform_device *pdev) | 1070 | static int compal_remove(struct platform_device *pdev) |
| 1071 | { | 1071 | { |
| 1072 | struct compal_data *data; | 1072 | struct compal_data *data; |
| 1073 | 1073 | ||
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index 927c33af67ec..fa3ee6209572 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c | |||
| @@ -115,7 +115,7 @@ static const struct dmi_system_id dell_device_table[] __initconst = { | |||
| 115 | }; | 115 | }; |
| 116 | MODULE_DEVICE_TABLE(dmi, dell_device_table); | 116 | MODULE_DEVICE_TABLE(dmi, dell_device_table); |
| 117 | 117 | ||
| 118 | static struct dmi_system_id __devinitdata dell_quirks[] = { | 118 | static struct dmi_system_id dell_quirks[] = { |
| 119 | { | 119 | { |
| 120 | .callback = dmi_matched, | 120 | .callback = dmi_matched, |
| 121 | .ident = "Dell Vostro V130", | 121 | .ident = "Dell Vostro V130", |
| @@ -503,7 +503,7 @@ static struct led_classdev touchpad_led = { | |||
| 503 | .flags = LED_CORE_SUSPENDRESUME, | 503 | .flags = LED_CORE_SUSPENDRESUME, |
| 504 | }; | 504 | }; |
| 505 | 505 | ||
| 506 | static int __devinit touchpad_led_init(struct device *dev) | 506 | static int touchpad_led_init(struct device *dev) |
| 507 | { | 507 | { |
| 508 | return led_classdev_register(dev, &touchpad_led); | 508 | return led_classdev_register(dev, &touchpad_led); |
| 509 | } | 509 | } |
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 5ca264179f4e..528e9495458d 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
| @@ -1375,7 +1375,7 @@ static void cmsg_quirks(struct eeepc_laptop *eeepc) | |||
| 1375 | cmsg_quirk(eeepc, CM_ASL_TPD, "TPD"); | 1375 | cmsg_quirk(eeepc, CM_ASL_TPD, "TPD"); |
| 1376 | } | 1376 | } |
| 1377 | 1377 | ||
| 1378 | static int __devinit eeepc_acpi_init(struct eeepc_laptop *eeepc) | 1378 | static int eeepc_acpi_init(struct eeepc_laptop *eeepc) |
| 1379 | { | 1379 | { |
| 1380 | unsigned int init_flags; | 1380 | unsigned int init_flags; |
| 1381 | int result; | 1381 | int result; |
| @@ -1407,7 +1407,7 @@ static int __devinit eeepc_acpi_init(struct eeepc_laptop *eeepc) | |||
| 1407 | return 0; | 1407 | return 0; |
| 1408 | } | 1408 | } |
| 1409 | 1409 | ||
| 1410 | static void __devinit eeepc_enable_camera(struct eeepc_laptop *eeepc) | 1410 | static void eeepc_enable_camera(struct eeepc_laptop *eeepc) |
| 1411 | { | 1411 | { |
| 1412 | /* | 1412 | /* |
| 1413 | * If the following call to set_acpi() fails, it's because there's no | 1413 | * If the following call to set_acpi() fails, it's because there's no |
| @@ -1419,7 +1419,7 @@ static void __devinit eeepc_enable_camera(struct eeepc_laptop *eeepc) | |||
| 1419 | 1419 | ||
| 1420 | static bool eeepc_device_present; | 1420 | static bool eeepc_device_present; |
| 1421 | 1421 | ||
| 1422 | static int __devinit eeepc_acpi_add(struct acpi_device *device) | 1422 | static int eeepc_acpi_add(struct acpi_device *device) |
| 1423 | { | 1423 | { |
| 1424 | struct eeepc_laptop *eeepc; | 1424 | struct eeepc_laptop *eeepc; |
| 1425 | int result; | 1425 | int result; |
diff --git a/drivers/platform/x86/fujitsu-tablet.c b/drivers/platform/x86/fujitsu-tablet.c index f77484528b1b..174ca01c4aa7 100644 --- a/drivers/platform/x86/fujitsu-tablet.c +++ b/drivers/platform/x86/fujitsu-tablet.c | |||
| @@ -192,8 +192,8 @@ static void fujitsu_reset(void) | |||
| 192 | fujitsu_send_state(); | 192 | fujitsu_send_state(); |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | static int __devinit input_fujitsu_setup(struct device *parent, | 195 | static int input_fujitsu_setup(struct device *parent, const char *name, |
| 196 | const char *name, const char *phys) | 196 | const char *phys) |
| 197 | { | 197 | { |
| 198 | struct input_dev *idev; | 198 | struct input_dev *idev; |
| 199 | int error; | 199 | int error; |
| @@ -277,21 +277,21 @@ static irqreturn_t fujitsu_interrupt(int irq, void *dev_id) | |||
| 277 | return IRQ_HANDLED; | 277 | return IRQ_HANDLED; |
| 278 | } | 278 | } |
| 279 | 279 | ||
| 280 | static void __devinit fujitsu_dmi_common(const struct dmi_system_id *dmi) | 280 | static void fujitsu_dmi_common(const struct dmi_system_id *dmi) |
| 281 | { | 281 | { |
| 282 | pr_info("%s\n", dmi->ident); | 282 | pr_info("%s\n", dmi->ident); |
| 283 | memcpy(fujitsu.config.keymap, dmi->driver_data, | 283 | memcpy(fujitsu.config.keymap, dmi->driver_data, |
| 284 | sizeof(fujitsu.config.keymap)); | 284 | sizeof(fujitsu.config.keymap)); |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | static int __devinit fujitsu_dmi_lifebook(const struct dmi_system_id *dmi) | 287 | static int fujitsu_dmi_lifebook(const struct dmi_system_id *dmi) |
| 288 | { | 288 | { |
| 289 | fujitsu_dmi_common(dmi); | 289 | fujitsu_dmi_common(dmi); |
| 290 | fujitsu.config.quirks |= INVERT_TABLET_MODE_BIT; | 290 | fujitsu.config.quirks |= INVERT_TABLET_MODE_BIT; |
| 291 | return 1; | 291 | return 1; |
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | static int __devinit fujitsu_dmi_stylistic(const struct dmi_system_id *dmi) | 294 | static int fujitsu_dmi_stylistic(const struct dmi_system_id *dmi) |
| 295 | { | 295 | { |
| 296 | fujitsu_dmi_common(dmi); | 296 | fujitsu_dmi_common(dmi); |
| 297 | fujitsu.config.quirks |= FORCE_TABLET_MODE_IF_UNDOCK; | 297 | fujitsu.config.quirks |= FORCE_TABLET_MODE_IF_UNDOCK; |
| @@ -366,8 +366,7 @@ static const struct dmi_system_id dmi_ids[] __initconst = { | |||
| 366 | { NULL } | 366 | { NULL } |
| 367 | }; | 367 | }; |
| 368 | 368 | ||
| 369 | static acpi_status __devinit | 369 | static acpi_status fujitsu_walk_resources(struct acpi_resource *res, void *data) |
| 370 | fujitsu_walk_resources(struct acpi_resource *res, void *data) | ||
| 371 | { | 370 | { |
| 372 | switch (res->type) { | 371 | switch (res->type) { |
| 373 | case ACPI_RESOURCE_TYPE_IRQ: | 372 | case ACPI_RESOURCE_TYPE_IRQ: |
| @@ -390,7 +389,7 @@ fujitsu_walk_resources(struct acpi_resource *res, void *data) | |||
| 390 | } | 389 | } |
| 391 | } | 390 | } |
| 392 | 391 | ||
| 393 | static int __devinit acpi_fujitsu_add(struct acpi_device *adev) | 392 | static int acpi_fujitsu_add(struct acpi_device *adev) |
| 394 | { | 393 | { |
| 395 | acpi_status status; | 394 | acpi_status status; |
| 396 | int error; | 395 | int error; |
| @@ -432,7 +431,7 @@ static int __devinit acpi_fujitsu_add(struct acpi_device *adev) | |||
| 432 | return 0; | 431 | return 0; |
| 433 | } | 432 | } |
| 434 | 433 | ||
| 435 | static int __devexit acpi_fujitsu_remove(struct acpi_device *adev, int type) | 434 | static int acpi_fujitsu_remove(struct acpi_device *adev, int type) |
| 436 | { | 435 | { |
| 437 | free_irq(fujitsu.irq, fujitsu_interrupt); | 436 | free_irq(fujitsu.irq, fujitsu_interrupt); |
| 438 | release_region(fujitsu.io_base, fujitsu.io_length); | 437 | release_region(fujitsu.io_base, fujitsu.io_length); |
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index 387183a2d6dd..1dde7accf27c 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c | |||
| @@ -72,7 +72,7 @@ enum hp_wmi_event_ids { | |||
| 72 | HPWMI_LOCK_SWITCH = 7, | 72 | HPWMI_LOCK_SWITCH = 7, |
| 73 | }; | 73 | }; |
| 74 | 74 | ||
| 75 | static int __devinit hp_wmi_bios_setup(struct platform_device *device); | 75 | static int hp_wmi_bios_setup(struct platform_device *device); |
| 76 | static int __exit hp_wmi_bios_remove(struct platform_device *device); | 76 | static int __exit hp_wmi_bios_remove(struct platform_device *device); |
| 77 | static int hp_wmi_resume_handler(struct device *device); | 77 | static int hp_wmi_resume_handler(struct device *device); |
| 78 | 78 | ||
| @@ -619,7 +619,7 @@ static void cleanup_sysfs(struct platform_device *device) | |||
| 619 | device_remove_file(&device->dev, &dev_attr_tablet); | 619 | device_remove_file(&device->dev, &dev_attr_tablet); |
| 620 | } | 620 | } |
| 621 | 621 | ||
| 622 | static int __devinit hp_wmi_rfkill_setup(struct platform_device *device) | 622 | static int hp_wmi_rfkill_setup(struct platform_device *device) |
| 623 | { | 623 | { |
| 624 | int err; | 624 | int err; |
| 625 | int wireless = 0; | 625 | int wireless = 0; |
| @@ -698,7 +698,7 @@ register_wifi_error: | |||
| 698 | return err; | 698 | return err; |
| 699 | } | 699 | } |
| 700 | 700 | ||
| 701 | static int __devinit hp_wmi_rfkill2_setup(struct platform_device *device) | 701 | static int hp_wmi_rfkill2_setup(struct platform_device *device) |
| 702 | { | 702 | { |
| 703 | int err, i; | 703 | int err, i; |
| 704 | struct bios_rfkill2_state state; | 704 | struct bios_rfkill2_state state; |
| @@ -778,7 +778,7 @@ fail: | |||
| 778 | return err; | 778 | return err; |
| 779 | } | 779 | } |
| 780 | 780 | ||
| 781 | static int __devinit hp_wmi_bios_setup(struct platform_device *device) | 781 | static int hp_wmi_bios_setup(struct platform_device *device) |
| 782 | { | 782 | { |
| 783 | int err; | 783 | int err; |
| 784 | 784 | ||
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index 5ff4f2e314d2..64bfb30a52e9 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c | |||
| @@ -298,7 +298,7 @@ static const struct file_operations debugfs_cfg_fops = { | |||
| 298 | .release = single_release, | 298 | .release = single_release, |
| 299 | }; | 299 | }; |
| 300 | 300 | ||
| 301 | static int __devinit ideapad_debugfs_init(struct ideapad_private *priv) | 301 | static int ideapad_debugfs_init(struct ideapad_private *priv) |
| 302 | { | 302 | { |
| 303 | struct dentry *node; | 303 | struct dentry *node; |
| 304 | 304 | ||
| @@ -468,8 +468,7 @@ static void ideapad_sync_rfk_state(struct ideapad_private *priv) | |||
| 468 | rfkill_set_hw_state(priv->rfk[i], hw_blocked); | 468 | rfkill_set_hw_state(priv->rfk[i], hw_blocked); |
| 469 | } | 469 | } |
| 470 | 470 | ||
| 471 | static int __devinit ideapad_register_rfkill(struct acpi_device *adevice, | 471 | static int ideapad_register_rfkill(struct acpi_device *adevice, int dev) |
| 472 | int dev) | ||
| 473 | { | 472 | { |
| 474 | struct ideapad_private *priv = dev_get_drvdata(&adevice->dev); | 473 | struct ideapad_private *priv = dev_get_drvdata(&adevice->dev); |
| 475 | int ret; | 474 | int ret; |
| @@ -519,7 +518,7 @@ static void ideapad_unregister_rfkill(struct acpi_device *adevice, int dev) | |||
| 519 | /* | 518 | /* |
| 520 | * Platform device | 519 | * Platform device |
| 521 | */ | 520 | */ |
| 522 | static int __devinit ideapad_platform_init(struct ideapad_private *priv) | 521 | static int ideapad_platform_init(struct ideapad_private *priv) |
| 523 | { | 522 | { |
| 524 | int result; | 523 | int result; |
| 525 | 524 | ||
| @@ -569,7 +568,7 @@ static const struct key_entry ideapad_keymap[] = { | |||
| 569 | { KE_END, 0 }, | 568 | { KE_END, 0 }, |
| 570 | }; | 569 | }; |
| 571 | 570 | ||
| 572 | static int __devinit ideapad_input_init(struct ideapad_private *priv) | 571 | static int ideapad_input_init(struct ideapad_private *priv) |
| 573 | { | 572 | { |
| 574 | struct input_dev *inputdev; | 573 | struct input_dev *inputdev; |
| 575 | int error; | 574 | int error; |
| @@ -776,7 +775,7 @@ static void ideapad_sync_touchpad_state(struct acpi_device *adevice) | |||
| 776 | } | 775 | } |
| 777 | } | 776 | } |
| 778 | 777 | ||
| 779 | static int __devinit ideapad_acpi_add(struct acpi_device *adevice) | 778 | static int ideapad_acpi_add(struct acpi_device *adevice) |
| 780 | { | 779 | { |
| 781 | int ret, i; | 780 | int ret, i; |
| 782 | int cfg; | 781 | int cfg; |
| @@ -835,7 +834,7 @@ platform_failed: | |||
| 835 | return ret; | 834 | return ret; |
| 836 | } | 835 | } |
| 837 | 836 | ||
| 838 | static int __devexit ideapad_acpi_remove(struct acpi_device *adevice, int type) | 837 | static int ideapad_acpi_remove(struct acpi_device *adevice, int type) |
| 839 | { | 838 | { |
| 840 | struct ideapad_private *priv = dev_get_drvdata(&adevice->dev); | 839 | struct ideapad_private *priv = dev_get_drvdata(&adevice->dev); |
| 841 | int i; | 840 | int i; |
diff --git a/drivers/platform/x86/intel_mid_powerbtn.c b/drivers/platform/x86/intel_mid_powerbtn.c index bcbad8452a6f..f59683aa13d5 100644 --- a/drivers/platform/x86/intel_mid_powerbtn.c +++ b/drivers/platform/x86/intel_mid_powerbtn.c | |||
| @@ -56,7 +56,7 @@ static irqreturn_t mfld_pb_isr(int irq, void *dev_id) | |||
| 56 | return IRQ_HANDLED; | 56 | return IRQ_HANDLED; |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | static int __devinit mfld_pb_probe(struct platform_device *pdev) | 59 | static int mfld_pb_probe(struct platform_device *pdev) |
| 60 | { | 60 | { |
| 61 | struct input_dev *input; | 61 | struct input_dev *input; |
| 62 | int irq = platform_get_irq(pdev, 0); | 62 | int irq = platform_get_irq(pdev, 0); |
| @@ -121,7 +121,7 @@ err_free_input: | |||
| 121 | return error; | 121 | return error; |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | static int __devexit mfld_pb_remove(struct platform_device *pdev) | 124 | static int mfld_pb_remove(struct platform_device *pdev) |
| 125 | { | 125 | { |
| 126 | struct input_dev *input = platform_get_drvdata(pdev); | 126 | struct input_dev *input = platform_get_drvdata(pdev); |
| 127 | int irq = platform_get_irq(pdev, 0); | 127 | int irq = platform_get_irq(pdev, 0); |
| @@ -139,7 +139,7 @@ static struct platform_driver mfld_pb_driver = { | |||
| 139 | .owner = THIS_MODULE, | 139 | .owner = THIS_MODULE, |
| 140 | }, | 140 | }, |
| 141 | .probe = mfld_pb_probe, | 141 | .probe = mfld_pb_probe, |
| 142 | .remove = __devexit_p(mfld_pb_remove), | 142 | .remove = mfld_pb_remove, |
| 143 | }; | 143 | }; |
| 144 | 144 | ||
| 145 | module_platform_driver(mfld_pb_driver); | 145 | module_platform_driver(mfld_pb_driver); |
diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x86/intel_mid_thermal.c index 93de09019d1d..81c491e74b34 100644 --- a/drivers/platform/x86/intel_mid_thermal.c +++ b/drivers/platform/x86/intel_mid_thermal.c | |||
| @@ -563,7 +563,7 @@ static struct platform_driver mid_thermal_driver = { | |||
| 563 | .pm = &mid_thermal_pm, | 563 | .pm = &mid_thermal_pm, |
| 564 | }, | 564 | }, |
| 565 | .probe = mid_thermal_probe, | 565 | .probe = mid_thermal_probe, |
| 566 | .remove = __devexit_p(mid_thermal_remove), | 566 | .remove = mid_thermal_remove, |
| 567 | .id_table = therm_id_table, | 567 | .id_table = therm_id_table, |
| 568 | }; | 568 | }; |
| 569 | 569 | ||
diff --git a/drivers/platform/x86/intel_oaktrail.c b/drivers/platform/x86/intel_oaktrail.c index 79a0c2f6be53..f6f18cde0f11 100644 --- a/drivers/platform/x86/intel_oaktrail.c +++ b/drivers/platform/x86/intel_oaktrail.c | |||
| @@ -278,12 +278,12 @@ static void oaktrail_backlight_exit(void) | |||
| 278 | backlight_device_unregister(oaktrail_bl_device); | 278 | backlight_device_unregister(oaktrail_bl_device); |
| 279 | } | 279 | } |
| 280 | 280 | ||
| 281 | static int __devinit oaktrail_probe(struct platform_device *pdev) | 281 | static int oaktrail_probe(struct platform_device *pdev) |
| 282 | { | 282 | { |
| 283 | return 0; | 283 | return 0; |
| 284 | } | 284 | } |
| 285 | 285 | ||
| 286 | static int __devexit oaktrail_remove(struct platform_device *pdev) | 286 | static int oaktrail_remove(struct platform_device *pdev) |
| 287 | { | 287 | { |
| 288 | return 0; | 288 | return 0; |
| 289 | } | 289 | } |
| @@ -294,7 +294,7 @@ static struct platform_driver oaktrail_driver = { | |||
| 294 | .owner = THIS_MODULE, | 294 | .owner = THIS_MODULE, |
| 295 | }, | 295 | }, |
| 296 | .probe = oaktrail_probe, | 296 | .probe = oaktrail_probe, |
| 297 | .remove = __devexit_p(oaktrail_remove) | 297 | .remove = oaktrail_remove, |
| 298 | }; | 298 | }; |
| 299 | 299 | ||
| 300 | static int dmi_check_cb(const struct dmi_system_id *id) | 300 | static int dmi_check_cb(const struct dmi_system_id *id) |
diff --git a/drivers/platform/x86/intel_pmic_gpio.c b/drivers/platform/x86/intel_pmic_gpio.c index 1686c1e07d5d..6f4b7289a059 100644 --- a/drivers/platform/x86/intel_pmic_gpio.c +++ b/drivers/platform/x86/intel_pmic_gpio.c | |||
| @@ -230,7 +230,7 @@ static irqreturn_t pmic_irq_handler(int irq, void *data) | |||
| 230 | return ret; | 230 | return ret; |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | static int __devinit platform_pmic_gpio_probe(struct platform_device *pdev) | 233 | static int platform_pmic_gpio_probe(struct platform_device *pdev) |
| 234 | { | 234 | { |
| 235 | struct device *dev = &pdev->dev; | 235 | struct device *dev = &pdev->dev; |
| 236 | int irq = platform_get_irq(pdev, 0); | 236 | int irq = platform_get_irq(pdev, 0); |
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index dd90d15f5210..71623a2ff3e8 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c | |||
| @@ -1523,6 +1523,16 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = { | |||
| 1523 | }, | 1523 | }, |
| 1524 | .driver_data = &samsung_broken_acpi_video, | 1524 | .driver_data = &samsung_broken_acpi_video, |
| 1525 | }, | 1525 | }, |
| 1526 | { | ||
| 1527 | .callback = samsung_dmi_matched, | ||
| 1528 | .ident = "N250P", | ||
| 1529 | .matches = { | ||
| 1530 | DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 1531 | DMI_MATCH(DMI_PRODUCT_NAME, "N250P"), | ||
| 1532 | DMI_MATCH(DMI_BOARD_NAME, "N250P"), | ||
| 1533 | }, | ||
| 1534 | .driver_data = &samsung_broken_acpi_video, | ||
| 1535 | }, | ||
| 1526 | { }, | 1536 | { }, |
| 1527 | }; | 1537 | }; |
| 1528 | MODULE_DEVICE_TABLE(dmi, samsung_dmi_table); | 1538 | MODULE_DEVICE_TABLE(dmi, samsung_dmi_table); |
diff --git a/drivers/platform/x86/samsung-q10.c b/drivers/platform/x86/samsung-q10.c index 1e54ae74274c..5f770059fd4d 100644 --- a/drivers/platform/x86/samsung-q10.c +++ b/drivers/platform/x86/samsung-q10.c | |||
| @@ -77,7 +77,7 @@ static int samsungq10_resume(struct device *dev) | |||
| 77 | static SIMPLE_DEV_PM_OPS(samsungq10_pm_ops, | 77 | static SIMPLE_DEV_PM_OPS(samsungq10_pm_ops, |
| 78 | samsungq10_suspend, samsungq10_resume); | 78 | samsungq10_suspend, samsungq10_resume); |
| 79 | 79 | ||
| 80 | static int __devinit samsungq10_probe(struct platform_device *pdev) | 80 | static int samsungq10_probe(struct platform_device *pdev) |
| 81 | { | 81 | { |
| 82 | 82 | ||
| 83 | struct backlight_properties props; | 83 | struct backlight_properties props; |
| @@ -99,7 +99,7 @@ static int __devinit samsungq10_probe(struct platform_device *pdev) | |||
| 99 | return 0; | 99 | return 0; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | static int __devexit samsungq10_remove(struct platform_device *pdev) | 102 | static int samsungq10_remove(struct platform_device *pdev) |
| 103 | { | 103 | { |
| 104 | 104 | ||
| 105 | struct backlight_device *bd = platform_get_drvdata(pdev); | 105 | struct backlight_device *bd = platform_get_drvdata(pdev); |
| @@ -119,7 +119,7 @@ static struct platform_driver samsungq10_driver = { | |||
| 119 | .pm = &samsungq10_pm_ops, | 119 | .pm = &samsungq10_pm_ops, |
| 120 | }, | 120 | }, |
| 121 | .probe = samsungq10_probe, | 121 | .probe = samsungq10_probe, |
| 122 | .remove = __devexit_p(samsungq10_remove), | 122 | .remove = samsungq10_remove, |
| 123 | }; | 123 | }; |
| 124 | 124 | ||
| 125 | static struct platform_device *samsungq10_device; | 125 | static struct platform_device *samsungq10_device; |
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index daaddec68def..b8ad71f7863f 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
| @@ -786,28 +786,29 @@ static int sony_nc_int_call(acpi_handle handle, char *name, int *value, | |||
| 786 | static int sony_nc_buffer_call(acpi_handle handle, char *name, u64 *value, | 786 | static int sony_nc_buffer_call(acpi_handle handle, char *name, u64 *value, |
| 787 | void *buffer, size_t buflen) | 787 | void *buffer, size_t buflen) |
| 788 | { | 788 | { |
| 789 | int ret = 0; | ||
| 789 | size_t len = len; | 790 | size_t len = len; |
| 790 | union acpi_object *object = __call_snc_method(handle, name, value); | 791 | union acpi_object *object = __call_snc_method(handle, name, value); |
| 791 | 792 | ||
| 792 | if (!object) | 793 | if (!object) |
| 793 | return -EINVAL; | 794 | return -EINVAL; |
| 794 | 795 | ||
| 795 | if (object->type == ACPI_TYPE_BUFFER) | 796 | if (object->type == ACPI_TYPE_BUFFER) { |
| 796 | len = MIN(buflen, object->buffer.length); | 797 | len = MIN(buflen, object->buffer.length); |
| 798 | memcpy(buffer, object->buffer.pointer, len); | ||
| 797 | 799 | ||
| 798 | else if (object->type == ACPI_TYPE_INTEGER) | 800 | } else if (object->type == ACPI_TYPE_INTEGER) { |
| 799 | len = MIN(buflen, sizeof(object->integer.value)); | 801 | len = MIN(buflen, sizeof(object->integer.value)); |
| 802 | memcpy(buffer, &object->integer.value, len); | ||
| 800 | 803 | ||
| 801 | else { | 804 | } else { |
| 802 | pr_warn("Invalid acpi_object: expected 0x%x got 0x%x\n", | 805 | pr_warn("Invalid acpi_object: expected 0x%x got 0x%x\n", |
| 803 | ACPI_TYPE_BUFFER, object->type); | 806 | ACPI_TYPE_BUFFER, object->type); |
| 804 | kfree(object); | 807 | ret = -EINVAL; |
| 805 | return -EINVAL; | ||
| 806 | } | 808 | } |
| 807 | 809 | ||
| 808 | memcpy(buffer, object->buffer.pointer, len); | ||
| 809 | kfree(object); | 810 | kfree(object); |
| 810 | return 0; | 811 | return ret; |
| 811 | } | 812 | } |
| 812 | 813 | ||
| 813 | struct sony_nc_handles { | 814 | struct sony_nc_handles { |
diff --git a/drivers/platform/x86/tc1100-wmi.c b/drivers/platform/x86/tc1100-wmi.c index e24f5ae475af..9b93fdb61ed7 100644 --- a/drivers/platform/x86/tc1100-wmi.c +++ b/drivers/platform/x86/tc1100-wmi.c | |||
| @@ -187,7 +187,7 @@ static int __init tc1100_probe(struct platform_device *device) | |||
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | 189 | ||
| 190 | static int __devexit tc1100_remove(struct platform_device *device) | 190 | static int tc1100_remove(struct platform_device *device) |
| 191 | { | 191 | { |
| 192 | sysfs_remove_group(&device->dev.kobj, &tc1100_attribute_group); | 192 | sysfs_remove_group(&device->dev.kobj, &tc1100_attribute_group); |
| 193 | 193 | ||
| @@ -241,7 +241,7 @@ static struct platform_driver tc1100_driver = { | |||
| 241 | .pm = &tc1100_pm_ops, | 241 | .pm = &tc1100_pm_ops, |
| 242 | #endif | 242 | #endif |
| 243 | }, | 243 | }, |
| 244 | .remove = __devexit_p(tc1100_remove), | 244 | .remove = tc1100_remove, |
| 245 | }; | 245 | }; |
| 246 | 246 | ||
| 247 | static int __init tc1100_init(void) | 247 | static int __init tc1100_init(void) |
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 75dd651664ae..f946ca7cb762 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
| @@ -6732,7 +6732,7 @@ static int volume_alsa_mute_put(struct snd_kcontrol *kcontrol, | |||
| 6732 | return volume_alsa_set_mute(!ucontrol->value.integer.value[0]); | 6732 | return volume_alsa_set_mute(!ucontrol->value.integer.value[0]); |
| 6733 | } | 6733 | } |
| 6734 | 6734 | ||
| 6735 | static struct snd_kcontrol_new volume_alsa_control_vol __devinitdata = { | 6735 | static struct snd_kcontrol_new volume_alsa_control_vol = { |
| 6736 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 6736 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
| 6737 | .name = "Console Playback Volume", | 6737 | .name = "Console Playback Volume", |
| 6738 | .index = 0, | 6738 | .index = 0, |
| @@ -6741,7 +6741,7 @@ static struct snd_kcontrol_new volume_alsa_control_vol __devinitdata = { | |||
| 6741 | .get = volume_alsa_vol_get, | 6741 | .get = volume_alsa_vol_get, |
| 6742 | }; | 6742 | }; |
| 6743 | 6743 | ||
| 6744 | static struct snd_kcontrol_new volume_alsa_control_mute __devinitdata = { | 6744 | static struct snd_kcontrol_new volume_alsa_control_mute = { |
| 6745 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 6745 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
| 6746 | .name = "Console Playback Switch", | 6746 | .name = "Console Playback Switch", |
| 6747 | .index = 0, | 6747 | .index = 0, |
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 5f1256d5e933..c2727895794c 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c | |||
| @@ -150,7 +150,7 @@ static const struct acpi_device_id toshiba_device_ids[] = { | |||
| 150 | }; | 150 | }; |
| 151 | MODULE_DEVICE_TABLE(acpi, toshiba_device_ids); | 151 | MODULE_DEVICE_TABLE(acpi, toshiba_device_ids); |
| 152 | 152 | ||
| 153 | static const struct key_entry toshiba_acpi_keymap[] __devinitconst = { | 153 | static const struct key_entry toshiba_acpi_keymap[] = { |
| 154 | { KE_KEY, 0x101, { KEY_MUTE } }, | 154 | { KE_KEY, 0x101, { KEY_MUTE } }, |
| 155 | { KE_KEY, 0x102, { KEY_ZOOMOUT } }, | 155 | { KE_KEY, 0x102, { KEY_ZOOMOUT } }, |
| 156 | { KE_KEY, 0x103, { KEY_ZOOMIN } }, | 156 | { KE_KEY, 0x103, { KEY_ZOOMIN } }, |
| @@ -875,8 +875,7 @@ static const struct file_operations version_proc_fops = { | |||
| 875 | 875 | ||
| 876 | #define PROC_TOSHIBA "toshiba" | 876 | #define PROC_TOSHIBA "toshiba" |
| 877 | 877 | ||
| 878 | static void __devinit | 878 | static void create_toshiba_proc_entries(struct toshiba_acpi_dev *dev) |
| 879 | create_toshiba_proc_entries(struct toshiba_acpi_dev *dev) | ||
| 880 | { | 879 | { |
| 881 | if (dev->backlight_dev) | 880 | if (dev->backlight_dev) |
| 882 | proc_create_data("lcd", S_IRUGO | S_IWUSR, toshiba_proc_dir, | 881 | proc_create_data("lcd", S_IRUGO | S_IWUSR, toshiba_proc_dir, |
| @@ -979,7 +978,7 @@ static void toshiba_acpi_report_hotkey(struct toshiba_acpi_dev *dev, | |||
| 979 | pr_info("Unknown key %x\n", scancode); | 978 | pr_info("Unknown key %x\n", scancode); |
| 980 | } | 979 | } |
| 981 | 980 | ||
| 982 | static int __devinit toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev) | 981 | static int toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev) |
| 983 | { | 982 | { |
| 984 | acpi_status status; | 983 | acpi_status status; |
| 985 | acpi_handle ec_handle, handle; | 984 | acpi_handle ec_handle, handle; |
| @@ -1069,7 +1068,7 @@ static int __devinit toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev) | |||
| 1069 | return error; | 1068 | return error; |
| 1070 | } | 1069 | } |
| 1071 | 1070 | ||
| 1072 | static int __devinit toshiba_acpi_setup_backlight(struct toshiba_acpi_dev *dev) | 1071 | static int toshiba_acpi_setup_backlight(struct toshiba_acpi_dev *dev) |
| 1073 | { | 1072 | { |
| 1074 | struct backlight_properties props; | 1073 | struct backlight_properties props; |
| 1075 | int brightness; | 1074 | int brightness; |
| @@ -1154,7 +1153,7 @@ static int toshiba_acpi_remove(struct acpi_device *acpi_dev, int type) | |||
| 1154 | return 0; | 1153 | return 0; |
| 1155 | } | 1154 | } |
| 1156 | 1155 | ||
| 1157 | static const char * __devinit find_hci_method(acpi_handle handle) | 1156 | static const char *find_hci_method(acpi_handle handle) |
| 1158 | { | 1157 | { |
| 1159 | acpi_status status; | 1158 | acpi_status status; |
| 1160 | acpi_handle hci_handle; | 1159 | acpi_handle hci_handle; |
| @@ -1170,7 +1169,7 @@ static const char * __devinit find_hci_method(acpi_handle handle) | |||
| 1170 | return NULL; | 1169 | return NULL; |
| 1171 | } | 1170 | } |
| 1172 | 1171 | ||
| 1173 | static int __devinit toshiba_acpi_add(struct acpi_device *acpi_dev) | 1172 | static int toshiba_acpi_add(struct acpi_device *acpi_dev) |
| 1174 | { | 1173 | { |
| 1175 | struct toshiba_acpi_dev *dev; | 1174 | struct toshiba_acpi_dev *dev; |
| 1176 | const char *hci_method; | 1175 | const char *hci_method; |
diff --git a/drivers/platform/x86/xo1-rfkill.c b/drivers/platform/x86/xo1-rfkill.c index 1da13ed34b04..4bd17248dfc6 100644 --- a/drivers/platform/x86/xo1-rfkill.c +++ b/drivers/platform/x86/xo1-rfkill.c | |||
| @@ -40,7 +40,7 @@ static const struct rfkill_ops rfkill_ops = { | |||
| 40 | .set_block = rfkill_set_block, | 40 | .set_block = rfkill_set_block, |
| 41 | }; | 41 | }; |
| 42 | 42 | ||
| 43 | static int __devinit xo1_rfkill_probe(struct platform_device *pdev) | 43 | static int xo1_rfkill_probe(struct platform_device *pdev) |
| 44 | { | 44 | { |
| 45 | struct rfkill *rfk; | 45 | struct rfkill *rfk; |
| 46 | int r; | 46 | int r; |
| @@ -60,7 +60,7 @@ static int __devinit xo1_rfkill_probe(struct platform_device *pdev) | |||
| 60 | return 0; | 60 | return 0; |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | static int __devexit xo1_rfkill_remove(struct platform_device *pdev) | 63 | static int xo1_rfkill_remove(struct platform_device *pdev) |
| 64 | { | 64 | { |
| 65 | struct rfkill *rfk = platform_get_drvdata(pdev); | 65 | struct rfkill *rfk = platform_get_drvdata(pdev); |
| 66 | rfkill_unregister(rfk); | 66 | rfkill_unregister(rfk); |
| @@ -74,7 +74,7 @@ static struct platform_driver xo1_rfkill_driver = { | |||
| 74 | .owner = THIS_MODULE, | 74 | .owner = THIS_MODULE, |
| 75 | }, | 75 | }, |
| 76 | .probe = xo1_rfkill_probe, | 76 | .probe = xo1_rfkill_probe, |
| 77 | .remove = __devexit_p(xo1_rfkill_remove), | 77 | .remove = xo1_rfkill_remove, |
| 78 | }; | 78 | }; |
| 79 | 79 | ||
| 80 | module_platform_driver(xo1_rfkill_driver); | 80 | module_platform_driver(xo1_rfkill_driver); |
diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c index cfaf5b73540b..0c201317284b 100644 --- a/drivers/pnp/interface.c +++ b/drivers/pnp/interface.c | |||
| @@ -298,6 +298,39 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, | |||
| 298 | return ret; | 298 | return ret; |
| 299 | } | 299 | } |
| 300 | 300 | ||
| 301 | static char *pnp_get_resource_value(char *buf, | ||
| 302 | unsigned long type, | ||
| 303 | resource_size_t *start, | ||
| 304 | resource_size_t *end, | ||
| 305 | unsigned long *flags) | ||
| 306 | { | ||
| 307 | if (start) | ||
| 308 | *start = 0; | ||
| 309 | if (end) | ||
| 310 | *end = 0; | ||
| 311 | if (flags) | ||
| 312 | *flags = 0; | ||
| 313 | |||
| 314 | /* TBD: allow for disabled resources */ | ||
| 315 | |||
| 316 | buf = skip_spaces(buf); | ||
| 317 | if (start) { | ||
| 318 | *start = simple_strtoull(buf, &buf, 0); | ||
| 319 | if (end) { | ||
| 320 | buf = skip_spaces(buf); | ||
| 321 | if (*buf == '-') { | ||
| 322 | buf = skip_spaces(buf + 1); | ||
| 323 | *end = simple_strtoull(buf, &buf, 0); | ||
| 324 | } else | ||
| 325 | *end = *start; | ||
| 326 | } | ||
| 327 | } | ||
| 328 | |||
| 329 | /* TBD: allow for additional flags, e.g., IORESOURCE_WINDOW */ | ||
| 330 | |||
| 331 | return buf; | ||
| 332 | } | ||
| 333 | |||
| 301 | static ssize_t pnp_set_current_resources(struct device *dmdev, | 334 | static ssize_t pnp_set_current_resources(struct device *dmdev, |
| 302 | struct device_attribute *attr, | 335 | struct device_attribute *attr, |
| 303 | const char *ubuf, size_t count) | 336 | const char *ubuf, size_t count) |
| @@ -305,7 +338,6 @@ static ssize_t pnp_set_current_resources(struct device *dmdev, | |||
| 305 | struct pnp_dev *dev = to_pnp_dev(dmdev); | 338 | struct pnp_dev *dev = to_pnp_dev(dmdev); |
| 306 | char *buf = (void *)ubuf; | 339 | char *buf = (void *)ubuf; |
| 307 | int retval = 0; | 340 | int retval = 0; |
| 308 | resource_size_t start, end; | ||
| 309 | 341 | ||
| 310 | if (dev->status & PNP_ATTACHED) { | 342 | if (dev->status & PNP_ATTACHED) { |
| 311 | retval = -EBUSY; | 343 | retval = -EBUSY; |
| @@ -349,6 +381,10 @@ static ssize_t pnp_set_current_resources(struct device *dmdev, | |||
| 349 | goto done; | 381 | goto done; |
| 350 | } | 382 | } |
| 351 | if (!strnicmp(buf, "set", 3)) { | 383 | if (!strnicmp(buf, "set", 3)) { |
| 384 | resource_size_t start; | ||
| 385 | resource_size_t end; | ||
| 386 | unsigned long flags; | ||
| 387 | |||
| 352 | if (dev->active) | 388 | if (dev->active) |
| 353 | goto done; | 389 | goto done; |
| 354 | buf += 3; | 390 | buf += 3; |
| @@ -357,42 +393,37 @@ static ssize_t pnp_set_current_resources(struct device *dmdev, | |||
| 357 | while (1) { | 393 | while (1) { |
| 358 | buf = skip_spaces(buf); | 394 | buf = skip_spaces(buf); |
| 359 | if (!strnicmp(buf, "io", 2)) { | 395 | if (!strnicmp(buf, "io", 2)) { |
| 360 | buf = skip_spaces(buf + 2); | 396 | buf = pnp_get_resource_value(buf + 2, |
| 361 | start = simple_strtoul(buf, &buf, 0); | 397 | IORESOURCE_IO, |
| 362 | buf = skip_spaces(buf); | 398 | &start, &end, |
| 363 | if (*buf == '-') { | 399 | &flags); |
| 364 | buf = skip_spaces(buf + 1); | 400 | pnp_add_io_resource(dev, start, end, flags); |
| 365 | end = simple_strtoul(buf, &buf, 0); | 401 | } else if (!strnicmp(buf, "mem", 3)) { |
| 366 | } else | 402 | buf = pnp_get_resource_value(buf + 3, |
| 367 | end = start; | 403 | IORESOURCE_MEM, |
| 368 | pnp_add_io_resource(dev, start, end, 0); | 404 | &start, &end, |
| 369 | continue; | 405 | &flags); |
| 370 | } | 406 | pnp_add_mem_resource(dev, start, end, flags); |
| 371 | if (!strnicmp(buf, "mem", 3)) { | 407 | } else if (!strnicmp(buf, "irq", 3)) { |
| 372 | buf = skip_spaces(buf + 3); | 408 | buf = pnp_get_resource_value(buf + 3, |
| 373 | start = simple_strtoul(buf, &buf, 0); | 409 | IORESOURCE_IRQ, |
| 374 | buf = skip_spaces(buf); | 410 | &start, NULL, |
| 375 | if (*buf == '-') { | 411 | &flags); |
| 376 | buf = skip_spaces(buf + 1); | 412 | pnp_add_irq_resource(dev, start, flags); |
| 377 | end = simple_strtoul(buf, &buf, 0); | 413 | } else if (!strnicmp(buf, "dma", 3)) { |
| 378 | } else | 414 | buf = pnp_get_resource_value(buf + 3, |
| 379 | end = start; | 415 | IORESOURCE_DMA, |
| 380 | pnp_add_mem_resource(dev, start, end, 0); | 416 | &start, NULL, |
| 381 | continue; | 417 | &flags); |
| 382 | } | 418 | pnp_add_dma_resource(dev, start, flags); |
| 383 | if (!strnicmp(buf, "irq", 3)) { | 419 | } else if (!strnicmp(buf, "bus", 3)) { |
| 384 | buf = skip_spaces(buf + 3); | 420 | buf = pnp_get_resource_value(buf + 3, |
| 385 | start = simple_strtoul(buf, &buf, 0); | 421 | IORESOURCE_BUS, |
| 386 | pnp_add_irq_resource(dev, start, 0); | 422 | &start, &end, |
| 387 | continue; | 423 | NULL); |
| 388 | } | 424 | pnp_add_bus_resource(dev, start, end); |
| 389 | if (!strnicmp(buf, "dma", 3)) { | 425 | } else |
| 390 | buf = skip_spaces(buf + 3); | 426 | break; |
| 391 | start = simple_strtoul(buf, &buf, 0); | ||
| 392 | pnp_add_dma_resource(dev, start, 0); | ||
| 393 | continue; | ||
| 394 | } | ||
| 395 | break; | ||
| 396 | } | 427 | } |
| 397 | mutex_unlock(&pnp_res_mutex); | 428 | mutex_unlock(&pnp_res_mutex); |
| 398 | goto done; | 429 | goto done; |
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c index ed9ce507149a..95cebf0185de 100644 --- a/drivers/pnp/manager.c +++ b/drivers/pnp/manager.c | |||
| @@ -18,11 +18,27 @@ | |||
| 18 | 18 | ||
| 19 | DEFINE_MUTEX(pnp_res_mutex); | 19 | DEFINE_MUTEX(pnp_res_mutex); |
| 20 | 20 | ||
| 21 | static struct resource *pnp_find_resource(struct pnp_dev *dev, | ||
| 22 | unsigned char rule, | ||
| 23 | unsigned long type, | ||
| 24 | unsigned int bar) | ||
| 25 | { | ||
| 26 | struct resource *res = pnp_get_resource(dev, type, bar); | ||
| 27 | |||
| 28 | /* when the resource already exists, set its resource bits from rule */ | ||
| 29 | if (res) { | ||
| 30 | res->flags &= ~IORESOURCE_BITS; | ||
| 31 | res->flags |= rule & IORESOURCE_BITS; | ||
| 32 | } | ||
| 33 | |||
| 34 | return res; | ||
| 35 | } | ||
| 36 | |||
| 21 | static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx) | 37 | static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx) |
| 22 | { | 38 | { |
| 23 | struct resource *res, local_res; | 39 | struct resource *res, local_res; |
| 24 | 40 | ||
| 25 | res = pnp_get_resource(dev, IORESOURCE_IO, idx); | 41 | res = pnp_find_resource(dev, rule->flags, IORESOURCE_IO, idx); |
| 26 | if (res) { | 42 | if (res) { |
| 27 | pnp_dbg(&dev->dev, " io %d already set to %#llx-%#llx " | 43 | pnp_dbg(&dev->dev, " io %d already set to %#llx-%#llx " |
| 28 | "flags %#lx\n", idx, (unsigned long long) res->start, | 44 | "flags %#lx\n", idx, (unsigned long long) res->start, |
| @@ -65,7 +81,7 @@ static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx) | |||
| 65 | { | 81 | { |
| 66 | struct resource *res, local_res; | 82 | struct resource *res, local_res; |
| 67 | 83 | ||
| 68 | res = pnp_get_resource(dev, IORESOURCE_MEM, idx); | 84 | res = pnp_find_resource(dev, rule->flags, IORESOURCE_MEM, idx); |
| 69 | if (res) { | 85 | if (res) { |
| 70 | pnp_dbg(&dev->dev, " mem %d already set to %#llx-%#llx " | 86 | pnp_dbg(&dev->dev, " mem %d already set to %#llx-%#llx " |
| 71 | "flags %#lx\n", idx, (unsigned long long) res->start, | 87 | "flags %#lx\n", idx, (unsigned long long) res->start, |
| @@ -78,6 +94,7 @@ static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx) | |||
| 78 | res->start = 0; | 94 | res->start = 0; |
| 79 | res->end = 0; | 95 | res->end = 0; |
| 80 | 96 | ||
| 97 | /* ??? rule->flags restricted to 8 bits, all tests bogus ??? */ | ||
| 81 | if (!(rule->flags & IORESOURCE_MEM_WRITEABLE)) | 98 | if (!(rule->flags & IORESOURCE_MEM_WRITEABLE)) |
| 82 | res->flags |= IORESOURCE_READONLY; | 99 | res->flags |= IORESOURCE_READONLY; |
| 83 | if (rule->flags & IORESOURCE_MEM_CACHEABLE) | 100 | if (rule->flags & IORESOURCE_MEM_CACHEABLE) |
| @@ -123,7 +140,7 @@ static int pnp_assign_irq(struct pnp_dev *dev, struct pnp_irq *rule, int idx) | |||
| 123 | 5, 10, 11, 12, 9, 14, 15, 7, 3, 4, 13, 0, 1, 6, 8, 2 | 140 | 5, 10, 11, 12, 9, 14, 15, 7, 3, 4, 13, 0, 1, 6, 8, 2 |
| 124 | }; | 141 | }; |
| 125 | 142 | ||
| 126 | res = pnp_get_resource(dev, IORESOURCE_IRQ, idx); | 143 | res = pnp_find_resource(dev, rule->flags, IORESOURCE_IRQ, idx); |
| 127 | if (res) { | 144 | if (res) { |
| 128 | pnp_dbg(&dev->dev, " irq %d already set to %d flags %#lx\n", | 145 | pnp_dbg(&dev->dev, " irq %d already set to %d flags %#lx\n", |
| 129 | idx, (int) res->start, res->flags); | 146 | idx, (int) res->start, res->flags); |
| @@ -182,7 +199,7 @@ static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx) | |||
| 182 | 1, 3, 5, 6, 7, 0, 2, 4 | 199 | 1, 3, 5, 6, 7, 0, 2, 4 |
| 183 | }; | 200 | }; |
| 184 | 201 | ||
| 185 | res = pnp_get_resource(dev, IORESOURCE_DMA, idx); | 202 | res = pnp_find_resource(dev, rule->flags, IORESOURCE_DMA, idx); |
| 186 | if (res) { | 203 | if (res) { |
| 187 | pnp_dbg(&dev->dev, " dma %d already set to %d flags %#lx\n", | 204 | pnp_dbg(&dev->dev, " dma %d already set to %d flags %#lx\n", |
| 188 | idx, (int) res->start, res->flags); | 205 | idx, (int) res->start, res->flags); |
diff --git a/drivers/power/ab8500_bmdata.c b/drivers/power/ab8500_bmdata.c index 03cc528425cb..f034ae43e045 100644 --- a/drivers/power/ab8500_bmdata.c +++ b/drivers/power/ab8500_bmdata.c | |||
| @@ -452,10 +452,8 @@ struct abx500_bm_data ab8500_bm_data = { | |||
| 452 | .fg_params = &fg, | 452 | .fg_params = &fg, |
| 453 | }; | 453 | }; |
| 454 | 454 | ||
| 455 | int __devinit | 455 | int bmdevs_of_probe(struct device *dev, struct device_node *np, |
| 456 | bmdevs_of_probe(struct device *dev, | 456 | struct abx500_bm_data **battery) |
| 457 | struct device_node *np, | ||
| 458 | struct abx500_bm_data **battery) | ||
| 459 | { | 457 | { |
| 460 | struct abx500_battery_type *btype; | 458 | struct abx500_battery_type *btype; |
| 461 | struct device_node *np_bat_supply; | 459 | struct device_node *np_bat_supply; |
diff --git a/drivers/power/olpc_battery.c b/drivers/power/olpc_battery.c index 298c47d111b4..1ec810ada5ed 100644 --- a/drivers/power/olpc_battery.c +++ b/drivers/power/olpc_battery.c | |||
| @@ -668,7 +668,7 @@ static int olpc_battery_remove(struct platform_device *pdev) | |||
| 668 | return 0; | 668 | return 0; |
| 669 | } | 669 | } |
| 670 | 670 | ||
| 671 | static const struct of_device_id olpc_battery_ids[] __devinitconst = { | 671 | static const struct of_device_id olpc_battery_ids[] = { |
| 672 | { .compatible = "olpc,xo1-battery" }, | 672 | { .compatible = "olpc,xo1-battery" }, |
| 673 | {} | 673 | {} |
| 674 | }; | 674 | }; |
diff --git a/drivers/power/reset/gpio-poweroff.c b/drivers/power/reset/gpio-poweroff.c index 0491e5335d02..e290d48ddd99 100644 --- a/drivers/power/reset/gpio-poweroff.c +++ b/drivers/power/reset/gpio-poweroff.c | |||
| @@ -29,15 +29,16 @@ static int gpio_active_low; | |||
| 29 | 29 | ||
| 30 | static void gpio_poweroff_do_poweroff(void) | 30 | static void gpio_poweroff_do_poweroff(void) |
| 31 | { | 31 | { |
| 32 | BUG_ON(gpio_num == -1); | 32 | BUG_ON(!gpio_is_valid(gpio_num)); |
| 33 | 33 | ||
| 34 | /* drive it active */ | 34 | /* drive it active, also inactive->active edge */ |
| 35 | gpio_direction_output(gpio_num, !gpio_active_low); | 35 | gpio_direction_output(gpio_num, !gpio_active_low); |
| 36 | mdelay(100); | 36 | mdelay(100); |
| 37 | /* rising edge or drive inactive */ | 37 | /* drive inactive, also active->inactive edge */ |
| 38 | gpio_set_value(gpio_num, gpio_active_low); | 38 | gpio_set_value(gpio_num, gpio_active_low); |
| 39 | mdelay(100); | 39 | mdelay(100); |
| 40 | /* falling edge */ | 40 | |
| 41 | /* drive it active, also inactive->active edge */ | ||
| 41 | gpio_set_value(gpio_num, !gpio_active_low); | 42 | gpio_set_value(gpio_num, !gpio_active_low); |
| 42 | 43 | ||
| 43 | /* give it some time */ | 44 | /* give it some time */ |
| @@ -46,7 +47,7 @@ static void gpio_poweroff_do_poweroff(void) | |||
| 46 | WARN_ON(1); | 47 | WARN_ON(1); |
| 47 | } | 48 | } |
| 48 | 49 | ||
| 49 | static int __devinit gpio_poweroff_probe(struct platform_device *pdev) | 50 | static int gpio_poweroff_probe(struct platform_device *pdev) |
| 50 | { | 51 | { |
| 51 | enum of_gpio_flags flags; | 52 | enum of_gpio_flags flags; |
| 52 | bool input = false; | 53 | bool input = false; |
| @@ -60,15 +61,12 @@ static int __devinit gpio_poweroff_probe(struct platform_device *pdev) | |||
| 60 | } | 61 | } |
| 61 | 62 | ||
| 62 | gpio_num = of_get_gpio_flags(pdev->dev.of_node, 0, &flags); | 63 | gpio_num = of_get_gpio_flags(pdev->dev.of_node, 0, &flags); |
| 63 | if (gpio_num < 0) { | 64 | if (!gpio_is_valid(gpio_num)) |
| 64 | pr_err("%s: Could not get GPIO configuration: %d", | 65 | return gpio_num; |
| 65 | __func__, gpio_num); | 66 | |
| 66 | return -ENODEV; | ||
| 67 | } | ||
| 68 | gpio_active_low = flags & OF_GPIO_ACTIVE_LOW; | 67 | gpio_active_low = flags & OF_GPIO_ACTIVE_LOW; |
| 69 | 68 | ||
| 70 | if (of_get_property(pdev->dev.of_node, "input", NULL)) | 69 | input = of_property_read_bool(pdev->dev.of_node, "input"); |
| 71 | input = true; | ||
| 72 | 70 | ||
| 73 | ret = gpio_request(gpio_num, "poweroff-gpio"); | 71 | ret = gpio_request(gpio_num, "poweroff-gpio"); |
| 74 | if (ret) { | 72 | if (ret) { |
| @@ -96,10 +94,9 @@ err: | |||
| 96 | return -ENODEV; | 94 | return -ENODEV; |
| 97 | } | 95 | } |
| 98 | 96 | ||
| 99 | static int __devexit gpio_poweroff_remove(struct platform_device *pdev) | 97 | static int gpio_poweroff_remove(struct platform_device *pdev) |
| 100 | { | 98 | { |
| 101 | if (gpio_num != -1) | 99 | gpio_free(gpio_num); |
| 102 | gpio_free(gpio_num); | ||
| 103 | if (pm_power_off == &gpio_poweroff_do_poweroff) | 100 | if (pm_power_off == &gpio_poweroff_do_poweroff) |
| 104 | pm_power_off = NULL; | 101 | pm_power_off = NULL; |
| 105 | 102 | ||
| @@ -113,17 +110,17 @@ static const struct of_device_id of_gpio_poweroff_match[] = { | |||
| 113 | 110 | ||
| 114 | static struct platform_driver gpio_poweroff_driver = { | 111 | static struct platform_driver gpio_poweroff_driver = { |
| 115 | .probe = gpio_poweroff_probe, | 112 | .probe = gpio_poweroff_probe, |
| 116 | .remove = __devexit_p(gpio_poweroff_remove), | 113 | .remove = gpio_poweroff_remove, |
| 117 | .driver = { | 114 | .driver = { |
| 118 | .name = "poweroff-gpio", | 115 | .name = "poweroff-gpio", |
| 119 | .owner = THIS_MODULE, | 116 | .owner = THIS_MODULE, |
| 120 | .of_match_table = of_gpio_poweroff_match, | 117 | .of_match_table = of_gpio_poweroff_match, |
| 121 | }, | 118 | }, |
| 122 | }; | 119 | }; |
| 123 | 120 | ||
| 124 | module_platform_driver(gpio_poweroff_driver); | 121 | module_platform_driver(gpio_poweroff_driver); |
| 125 | 122 | ||
| 126 | MODULE_AUTHOR("Jamie Lentin <jm@lentin.co.uk>"); | 123 | MODULE_AUTHOR("Jamie Lentin <jm@lentin.co.uk>"); |
| 127 | MODULE_DESCRIPTION("GPIO poweroff driver"); | 124 | MODULE_DESCRIPTION("GPIO poweroff driver"); |
| 128 | MODULE_LICENSE("GPL"); | 125 | MODULE_LICENSE("GPL v2"); |
| 129 | MODULE_ALIAS("platform:poweroff-gpio"); | 126 | MODULE_ALIAS("platform:poweroff-gpio"); |
diff --git a/drivers/power/rx51_battery.c b/drivers/power/rx51_battery.c index ca49d6c0ee9d..8208888b844e 100644 --- a/drivers/power/rx51_battery.c +++ b/drivers/power/rx51_battery.c | |||
| @@ -197,7 +197,7 @@ static enum power_supply_property rx51_battery_props[] = { | |||
| 197 | POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, | 197 | POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, |
| 198 | }; | 198 | }; |
| 199 | 199 | ||
| 200 | static int __devinit rx51_battery_probe(struct platform_device *pdev) | 200 | static int rx51_battery_probe(struct platform_device *pdev) |
| 201 | { | 201 | { |
| 202 | struct rx51_device_info *di; | 202 | struct rx51_device_info *di; |
| 203 | int ret; | 203 | int ret; |
| @@ -224,7 +224,7 @@ static int __devinit rx51_battery_probe(struct platform_device *pdev) | |||
| 224 | return 0; | 224 | return 0; |
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | static int __devexit rx51_battery_remove(struct platform_device *pdev) | 227 | static int rx51_battery_remove(struct platform_device *pdev) |
| 228 | { | 228 | { |
| 229 | struct rx51_device_info *di = platform_get_drvdata(pdev); | 229 | struct rx51_device_info *di = platform_get_drvdata(pdev); |
| 230 | 230 | ||
| @@ -237,7 +237,7 @@ static int __devexit rx51_battery_remove(struct platform_device *pdev) | |||
| 237 | 237 | ||
| 238 | static struct platform_driver rx51_battery_driver = { | 238 | static struct platform_driver rx51_battery_driver = { |
| 239 | .probe = rx51_battery_probe, | 239 | .probe = rx51_battery_probe, |
| 240 | .remove = __devexit_p(rx51_battery_remove), | 240 | .remove = rx51_battery_remove, |
| 241 | .driver = { | 241 | .driver = { |
| 242 | .name = "rx51-battery", | 242 | .name = "rx51-battery", |
| 243 | .owner = THIS_MODULE, | 243 | .owner = THIS_MODULE, |
diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c index 655055545479..2bf0c1b608dd 100644 --- a/drivers/pps/clients/pps-gpio.c +++ b/drivers/pps/clients/pps-gpio.c | |||
| @@ -196,7 +196,7 @@ static int pps_gpio_remove(struct platform_device *pdev) | |||
| 196 | 196 | ||
| 197 | static struct platform_driver pps_gpio_driver = { | 197 | static struct platform_driver pps_gpio_driver = { |
| 198 | .probe = pps_gpio_probe, | 198 | .probe = pps_gpio_probe, |
| 199 | .remove = __devexit_p(pps_gpio_remove), | 199 | .remove = pps_gpio_remove, |
| 200 | .driver = { | 200 | .driver = { |
| 201 | .name = PPS_GPIO_NAME, | 201 | .name = PPS_GPIO_NAME, |
| 202 | .owner = THIS_MODULE | 202 | .owner = THIS_MODULE |
diff --git a/drivers/ps3/ps3-lpm.c b/drivers/ps3/ps3-lpm.c index 643697f71390..b139b7792e9f 100644 --- a/drivers/ps3/ps3-lpm.c +++ b/drivers/ps3/ps3-lpm.c | |||
| @@ -1185,7 +1185,7 @@ int ps3_lpm_close(void) | |||
| 1185 | } | 1185 | } |
| 1186 | EXPORT_SYMBOL_GPL(ps3_lpm_close); | 1186 | EXPORT_SYMBOL_GPL(ps3_lpm_close); |
| 1187 | 1187 | ||
| 1188 | static int __devinit ps3_lpm_probe(struct ps3_system_bus_device *dev) | 1188 | static int ps3_lpm_probe(struct ps3_system_bus_device *dev) |
| 1189 | { | 1189 | { |
| 1190 | dev_dbg(&dev->core, " -> %s:%u\n", __func__, __LINE__); | 1190 | dev_dbg(&dev->core, " -> %s:%u\n", __func__, __LINE__); |
| 1191 | 1191 | ||
diff --git a/drivers/ps3/ps3-sys-manager.c b/drivers/ps3/ps3-sys-manager.c index 1b98367110c4..f2ab435954f6 100644 --- a/drivers/ps3/ps3-sys-manager.c +++ b/drivers/ps3/ps3-sys-manager.c | |||
| @@ -706,7 +706,7 @@ static void ps3_sys_manager_work(struct ps3_system_bus_device *dev) | |||
| 706 | ps3_vuart_read_async(dev, PS3_SM_RX_MSG_LEN_MIN); | 706 | ps3_vuart_read_async(dev, PS3_SM_RX_MSG_LEN_MIN); |
| 707 | } | 707 | } |
| 708 | 708 | ||
| 709 | static int __devinit ps3_sys_manager_probe(struct ps3_system_bus_device *dev) | 709 | static int ps3_sys_manager_probe(struct ps3_system_bus_device *dev) |
| 710 | { | 710 | { |
| 711 | int result; | 711 | int result; |
| 712 | struct ps3_sys_manager_ops ops; | 712 | struct ps3_sys_manager_ops ops; |
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c index 93d0a8b7718a..437fc35beb7b 100644 --- a/drivers/ps3/ps3av.c +++ b/drivers/ps3/ps3av.c | |||
| @@ -932,7 +932,7 @@ int ps3av_audio_mute(int mute) | |||
| 932 | } | 932 | } |
| 933 | EXPORT_SYMBOL_GPL(ps3av_audio_mute); | 933 | EXPORT_SYMBOL_GPL(ps3av_audio_mute); |
| 934 | 934 | ||
| 935 | static int __devinit ps3av_probe(struct ps3_system_bus_device *dev) | 935 | static int ps3av_probe(struct ps3_system_bus_device *dev) |
| 936 | { | 936 | { |
| 937 | int res; | 937 | int res; |
| 938 | int id; | 938 | int id; |
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c index 0199eeea63b1..8f39cac661d2 100644 --- a/drivers/regulator/anatop-regulator.c +++ b/drivers/regulator/anatop-regulator.c | |||
| @@ -188,7 +188,7 @@ static int anatop_regulator_remove(struct platform_device *pdev) | |||
| 188 | return 0; | 188 | return 0; |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | static struct of_device_id __devinitdata of_anatop_regulator_match_tbl[] = { | 191 | static struct of_device_id of_anatop_regulator_match_tbl[] = { |
| 192 | { .compatible = "fsl,anatop-regulator", }, | 192 | { .compatible = "fsl,anatop-regulator", }, |
| 193 | { /* end */ } | 193 | { /* end */ } |
| 194 | }; | 194 | }; |
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 0f65b246cc0c..278584302f2d 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
| @@ -1885,9 +1885,15 @@ int regulator_can_change_voltage(struct regulator *regulator) | |||
| 1885 | struct regulator_dev *rdev = regulator->rdev; | 1885 | struct regulator_dev *rdev = regulator->rdev; |
| 1886 | 1886 | ||
| 1887 | if (rdev->constraints && | 1887 | if (rdev->constraints && |
| 1888 | rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE && | 1888 | (rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE)) { |
| 1889 | (rdev->desc->n_voltages - rdev->desc->linear_min_sel) > 1) | 1889 | if (rdev->desc->n_voltages - rdev->desc->linear_min_sel > 1) |
| 1890 | return 1; | 1890 | return 1; |
| 1891 | |||
| 1892 | if (rdev->desc->continuous_voltage_range && | ||
| 1893 | rdev->constraints->min_uV && rdev->constraints->max_uV && | ||
| 1894 | rdev->constraints->min_uV != rdev->constraints->max_uV) | ||
| 1895 | return 1; | ||
| 1896 | } | ||
| 1891 | 1897 | ||
| 1892 | return 0; | 1898 | return 0; |
| 1893 | } | 1899 | } |
| @@ -3315,7 +3321,8 @@ static void rdev_init_debugfs(struct regulator_dev *rdev) | |||
| 3315 | * @config: runtime configuration for regulator | 3321 | * @config: runtime configuration for regulator |
| 3316 | * | 3322 | * |
| 3317 | * Called by regulator drivers to register a regulator. | 3323 | * Called by regulator drivers to register a regulator. |
| 3318 | * Returns 0 on success. | 3324 | * Returns a valid pointer to struct regulator_dev on success |
| 3325 | * or an ERR_PTR() on error. | ||
| 3319 | */ | 3326 | */ |
| 3320 | struct regulator_dev * | 3327 | struct regulator_dev * |
| 3321 | regulator_register(const struct regulator_desc *regulator_desc, | 3328 | regulator_register(const struct regulator_desc *regulator_desc, |
diff --git a/drivers/regulator/da9055-regulator.c b/drivers/regulator/da9055-regulator.c index a4b9cb8c4317..1a05ac66878f 100644 --- a/drivers/regulator/da9055-regulator.c +++ b/drivers/regulator/da9055-regulator.c | |||
| @@ -442,9 +442,9 @@ static struct da9055_regulator_info da9055_regulator_info[] = { | |||
| 442 | * GPIO can control regulator state and/or select the regulator register | 442 | * GPIO can control regulator state and/or select the regulator register |
| 443 | * set A/B for voltage ramping. | 443 | * set A/B for voltage ramping. |
| 444 | */ | 444 | */ |
| 445 | static __devinit int da9055_gpio_init(struct da9055_regulator *regulator, | 445 | static int da9055_gpio_init(struct da9055_regulator *regulator, |
| 446 | struct regulator_config *config, | 446 | struct regulator_config *config, |
| 447 | struct da9055_pdata *pdata, int id) | 447 | struct da9055_pdata *pdata, int id) |
| 448 | { | 448 | { |
| 449 | struct da9055_regulator_info *info = regulator->info; | 449 | struct da9055_regulator_info *info = regulator->info; |
| 450 | int ret = 0; | 450 | int ret = 0; |
| @@ -533,7 +533,7 @@ static inline struct da9055_regulator_info *find_regulator_info(int id) | |||
| 533 | return NULL; | 533 | return NULL; |
| 534 | } | 534 | } |
| 535 | 535 | ||
| 536 | static int __devinit da9055_regulator_probe(struct platform_device *pdev) | 536 | static int da9055_regulator_probe(struct platform_device *pdev) |
| 537 | { | 537 | { |
| 538 | struct regulator_config config = { }; | 538 | struct regulator_config config = { }; |
| 539 | struct da9055_regulator *regulator; | 539 | struct da9055_regulator *regulator; |
| @@ -605,7 +605,7 @@ err_regulator: | |||
| 605 | return ret; | 605 | return ret; |
| 606 | } | 606 | } |
| 607 | 607 | ||
| 608 | static int __devexit da9055_regulator_remove(struct platform_device *pdev) | 608 | static int da9055_regulator_remove(struct platform_device *pdev) |
| 609 | { | 609 | { |
| 610 | struct da9055_regulator *regulator = platform_get_drvdata(pdev); | 610 | struct da9055_regulator *regulator = platform_get_drvdata(pdev); |
| 611 | 611 | ||
| @@ -616,7 +616,7 @@ static int __devexit da9055_regulator_remove(struct platform_device *pdev) | |||
| 616 | 616 | ||
| 617 | static struct platform_driver da9055_regulator_driver = { | 617 | static struct platform_driver da9055_regulator_driver = { |
| 618 | .probe = da9055_regulator_probe, | 618 | .probe = da9055_regulator_probe, |
| 619 | .remove = __devexit_p(da9055_regulator_remove), | 619 | .remove = da9055_regulator_remove, |
| 620 | .driver = { | 620 | .driver = { |
| 621 | .name = "da9055-regulator", | 621 | .name = "da9055-regulator", |
| 622 | .owner = THIS_MODULE, | 622 | .owner = THIS_MODULE, |
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index 48d5b7608b00..e5c03b534fae 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c | |||
| @@ -246,7 +246,7 @@ static int reg_fixed_voltage_remove(struct platform_device *pdev) | |||
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | #if defined(CONFIG_OF) | 248 | #if defined(CONFIG_OF) |
| 249 | static const struct of_device_id fixed_of_match[] __devinitconst = { | 249 | static const struct of_device_id fixed_of_match[] = { |
| 250 | { .compatible = "regulator-fixed", }, | 250 | { .compatible = "regulator-fixed", }, |
| 251 | {}, | 251 | {}, |
| 252 | }; | 252 | }; |
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index 8ae288fc150b..bae681ccd3ea 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c | |||
| @@ -365,7 +365,7 @@ static int gpio_regulator_remove(struct platform_device *pdev) | |||
| 365 | } | 365 | } |
| 366 | 366 | ||
| 367 | #if defined(CONFIG_OF) | 367 | #if defined(CONFIG_OF) |
| 368 | static const struct of_device_id regulator_gpio_of_match[] __devinitconst = { | 368 | static const struct of_device_id regulator_gpio_of_match[] = { |
| 369 | { .compatible = "regulator-gpio", }, | 369 | { .compatible = "regulator-gpio", }, |
| 370 | {}, | 370 | {}, |
| 371 | }; | 371 | }; |
diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c index 3ee26387b121..9a8ea9163005 100644 --- a/drivers/regulator/max8973-regulator.c +++ b/drivers/regulator/max8973-regulator.c | |||
| @@ -248,8 +248,8 @@ static struct regulator_ops max8973_dcdc_ops = { | |||
| 248 | .get_mode = max8973_dcdc_get_mode, | 248 | .get_mode = max8973_dcdc_get_mode, |
| 249 | }; | 249 | }; |
| 250 | 250 | ||
| 251 | static int __devinit max8973_init_dcdc(struct max8973_chip *max, | 251 | static int max8973_init_dcdc(struct max8973_chip *max, |
| 252 | struct max8973_regulator_platform_data *pdata) | 252 | struct max8973_regulator_platform_data *pdata) |
| 253 | { | 253 | { |
| 254 | int ret; | 254 | int ret; |
| 255 | uint8_t control1 = 0; | 255 | uint8_t control1 = 0; |
| @@ -359,8 +359,8 @@ static const struct regmap_config max8973_regmap_config = { | |||
| 359 | .cache_type = REGCACHE_RBTREE, | 359 | .cache_type = REGCACHE_RBTREE, |
| 360 | }; | 360 | }; |
| 361 | 361 | ||
| 362 | static int __devinit max8973_probe(struct i2c_client *client, | 362 | static int max8973_probe(struct i2c_client *client, |
| 363 | const struct i2c_device_id *id) | 363 | const struct i2c_device_id *id) |
| 364 | { | 364 | { |
| 365 | struct max8973_regulator_platform_data *pdata; | 365 | struct max8973_regulator_platform_data *pdata; |
| 366 | struct regulator_config config = { }; | 366 | struct regulator_config config = { }; |
| @@ -463,7 +463,7 @@ static int __devinit max8973_probe(struct i2c_client *client, | |||
| 463 | return 0; | 463 | return 0; |
| 464 | } | 464 | } |
| 465 | 465 | ||
| 466 | static int __devexit max8973_remove(struct i2c_client *client) | 466 | static int max8973_remove(struct i2c_client *client) |
| 467 | { | 467 | { |
| 468 | struct max8973_chip *max = i2c_get_clientdata(client); | 468 | struct max8973_chip *max = i2c_get_clientdata(client); |
| 469 | 469 | ||
| @@ -484,7 +484,7 @@ static struct i2c_driver max8973_i2c_driver = { | |||
| 484 | .owner = THIS_MODULE, | 484 | .owner = THIS_MODULE, |
| 485 | }, | 485 | }, |
| 486 | .probe = max8973_probe, | 486 | .probe = max8973_probe, |
| 487 | .remove = __devexit_p(max8973_remove), | 487 | .remove = max8973_remove, |
| 488 | .id_table = max8973_id, | 488 | .id_table = max8973_id, |
| 489 | }; | 489 | }; |
| 490 | 490 | ||
diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c index df0eafb0dc7e..02be7fcae32f 100644 --- a/drivers/regulator/max8997.c +++ b/drivers/regulator/max8997.c | |||
| @@ -71,26 +71,26 @@ struct voltage_map_desc { | |||
| 71 | int step; | 71 | int step; |
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| 74 | /* Voltage maps in mV */ | 74 | /* Voltage maps in uV */ |
| 75 | static const struct voltage_map_desc ldo_voltage_map_desc = { | 75 | static const struct voltage_map_desc ldo_voltage_map_desc = { |
| 76 | .min = 800, .max = 3950, .step = 50, | 76 | .min = 800000, .max = 3950000, .step = 50000, |
| 77 | }; /* LDO1 ~ 18, 21 all */ | 77 | }; /* LDO1 ~ 18, 21 all */ |
| 78 | 78 | ||
| 79 | static const struct voltage_map_desc buck1245_voltage_map_desc = { | 79 | static const struct voltage_map_desc buck1245_voltage_map_desc = { |
| 80 | .min = 650, .max = 2225, .step = 25, | 80 | .min = 650000, .max = 2225000, .step = 25000, |
| 81 | }; /* Buck1, 2, 4, 5 */ | 81 | }; /* Buck1, 2, 4, 5 */ |
| 82 | 82 | ||
| 83 | static const struct voltage_map_desc buck37_voltage_map_desc = { | 83 | static const struct voltage_map_desc buck37_voltage_map_desc = { |
| 84 | .min = 750, .max = 3900, .step = 50, | 84 | .min = 750000, .max = 3900000, .step = 50000, |
| 85 | }; /* Buck3, 7 */ | 85 | }; /* Buck3, 7 */ |
| 86 | 86 | ||
| 87 | /* current map in mA */ | 87 | /* current map in uA */ |
| 88 | static const struct voltage_map_desc charger_current_map_desc = { | 88 | static const struct voltage_map_desc charger_current_map_desc = { |
| 89 | .min = 200, .max = 950, .step = 50, | 89 | .min = 200000, .max = 950000, .step = 50000, |
| 90 | }; | 90 | }; |
| 91 | 91 | ||
| 92 | static const struct voltage_map_desc topoff_current_map_desc = { | 92 | static const struct voltage_map_desc topoff_current_map_desc = { |
| 93 | .min = 50, .max = 200, .step = 10, | 93 | .min = 50000, .max = 200000, .step = 10000, |
| 94 | }; | 94 | }; |
| 95 | 95 | ||
| 96 | static const struct voltage_map_desc *reg_voltage_map[] = { | 96 | static const struct voltage_map_desc *reg_voltage_map[] = { |
| @@ -194,7 +194,7 @@ static int max8997_list_voltage(struct regulator_dev *rdev, | |||
| 194 | if (val > desc->max) | 194 | if (val > desc->max) |
| 195 | return -EINVAL; | 195 | return -EINVAL; |
| 196 | 196 | ||
| 197 | return val * 1000; | 197 | return val; |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | static int max8997_get_enable_register(struct regulator_dev *rdev, | 200 | static int max8997_get_enable_register(struct regulator_dev *rdev, |
| @@ -485,7 +485,6 @@ static int max8997_set_voltage_ldobuck(struct regulator_dev *rdev, | |||
| 485 | { | 485 | { |
| 486 | struct max8997_data *max8997 = rdev_get_drvdata(rdev); | 486 | struct max8997_data *max8997 = rdev_get_drvdata(rdev); |
| 487 | struct i2c_client *i2c = max8997->iodev->i2c; | 487 | struct i2c_client *i2c = max8997->iodev->i2c; |
| 488 | int min_vol = min_uV / 1000, max_vol = max_uV / 1000; | ||
| 489 | const struct voltage_map_desc *desc; | 488 | const struct voltage_map_desc *desc; |
| 490 | int rid = rdev_get_id(rdev); | 489 | int rid = rdev_get_id(rdev); |
| 491 | int i, reg, shift, mask, ret; | 490 | int i, reg, shift, mask, ret; |
| @@ -509,7 +508,7 @@ static int max8997_set_voltage_ldobuck(struct regulator_dev *rdev, | |||
| 509 | 508 | ||
| 510 | desc = reg_voltage_map[rid]; | 509 | desc = reg_voltage_map[rid]; |
| 511 | 510 | ||
| 512 | i = max8997_get_voltage_proper_val(desc, min_vol, max_vol); | 511 | i = max8997_get_voltage_proper_val(desc, min_uV, max_uV); |
| 513 | if (i < 0) | 512 | if (i < 0) |
| 514 | return i; | 513 | return i; |
| 515 | 514 | ||
| @@ -557,7 +556,7 @@ static int max8997_set_voltage_ldobuck_time_sel(struct regulator_dev *rdev, | |||
| 557 | case MAX8997_BUCK4: | 556 | case MAX8997_BUCK4: |
| 558 | case MAX8997_BUCK5: | 557 | case MAX8997_BUCK5: |
| 559 | return DIV_ROUND_UP(desc->step * (new_selector - old_selector), | 558 | return DIV_ROUND_UP(desc->step * (new_selector - old_selector), |
| 560 | max8997->ramp_delay); | 559 | max8997->ramp_delay * 1000); |
| 561 | } | 560 | } |
| 562 | 561 | ||
| 563 | return 0; | 562 | return 0; |
| @@ -656,7 +655,6 @@ static int max8997_set_voltage_buck(struct regulator_dev *rdev, | |||
| 656 | const struct voltage_map_desc *desc; | 655 | const struct voltage_map_desc *desc; |
| 657 | int new_val, new_idx, damage, tmp_val, tmp_idx, tmp_dmg; | 656 | int new_val, new_idx, damage, tmp_val, tmp_idx, tmp_dmg; |
| 658 | bool gpio_dvs_mode = false; | 657 | bool gpio_dvs_mode = false; |
| 659 | int min_vol = min_uV / 1000, max_vol = max_uV / 1000; | ||
| 660 | 658 | ||
| 661 | if (rid < MAX8997_BUCK1 || rid > MAX8997_BUCK7) | 659 | if (rid < MAX8997_BUCK1 || rid > MAX8997_BUCK7) |
| 662 | return -EINVAL; | 660 | return -EINVAL; |
| @@ -681,7 +679,7 @@ static int max8997_set_voltage_buck(struct regulator_dev *rdev, | |||
| 681 | selector); | 679 | selector); |
| 682 | 680 | ||
| 683 | desc = reg_voltage_map[rid]; | 681 | desc = reg_voltage_map[rid]; |
| 684 | new_val = max8997_get_voltage_proper_val(desc, min_vol, max_vol); | 682 | new_val = max8997_get_voltage_proper_val(desc, min_uV, max_uV); |
| 685 | if (new_val < 0) | 683 | if (new_val < 0) |
| 686 | return new_val; | 684 | return new_val; |
| 687 | 685 | ||
| @@ -1123,8 +1121,8 @@ static int max8997_pmic_probe(struct platform_device *pdev) | |||
| 1123 | max8997->buck1_vol[i] = ret = | 1121 | max8997->buck1_vol[i] = ret = |
| 1124 | max8997_get_voltage_proper_val( | 1122 | max8997_get_voltage_proper_val( |
| 1125 | &buck1245_voltage_map_desc, | 1123 | &buck1245_voltage_map_desc, |
| 1126 | pdata->buck1_voltage[i] / 1000, | 1124 | pdata->buck1_voltage[i], |
| 1127 | pdata->buck1_voltage[i] / 1000 + | 1125 | pdata->buck1_voltage[i] + |
| 1128 | buck1245_voltage_map_desc.step); | 1126 | buck1245_voltage_map_desc.step); |
| 1129 | if (ret < 0) | 1127 | if (ret < 0) |
| 1130 | goto err_out; | 1128 | goto err_out; |
| @@ -1132,8 +1130,8 @@ static int max8997_pmic_probe(struct platform_device *pdev) | |||
| 1132 | max8997->buck2_vol[i] = ret = | 1130 | max8997->buck2_vol[i] = ret = |
| 1133 | max8997_get_voltage_proper_val( | 1131 | max8997_get_voltage_proper_val( |
| 1134 | &buck1245_voltage_map_desc, | 1132 | &buck1245_voltage_map_desc, |
| 1135 | pdata->buck2_voltage[i] / 1000, | 1133 | pdata->buck2_voltage[i], |
| 1136 | pdata->buck2_voltage[i] / 1000 + | 1134 | pdata->buck2_voltage[i] + |
| 1137 | buck1245_voltage_map_desc.step); | 1135 | buck1245_voltage_map_desc.step); |
| 1138 | if (ret < 0) | 1136 | if (ret < 0) |
| 1139 | goto err_out; | 1137 | goto err_out; |
| @@ -1141,8 +1139,8 @@ static int max8997_pmic_probe(struct platform_device *pdev) | |||
| 1141 | max8997->buck5_vol[i] = ret = | 1139 | max8997->buck5_vol[i] = ret = |
| 1142 | max8997_get_voltage_proper_val( | 1140 | max8997_get_voltage_proper_val( |
| 1143 | &buck1245_voltage_map_desc, | 1141 | &buck1245_voltage_map_desc, |
| 1144 | pdata->buck5_voltage[i] / 1000, | 1142 | pdata->buck5_voltage[i], |
| 1145 | pdata->buck5_voltage[i] / 1000 + | 1143 | pdata->buck5_voltage[i] + |
| 1146 | buck1245_voltage_map_desc.step); | 1144 | buck1245_voltage_map_desc.step); |
| 1147 | if (ret < 0) | 1145 | if (ret < 0) |
| 1148 | goto err_out; | 1146 | goto err_out; |
diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c index b821d08eb64a..1f0df4046b86 100644 --- a/drivers/regulator/max8998.c +++ b/drivers/regulator/max8998.c | |||
| @@ -51,39 +51,39 @@ struct voltage_map_desc { | |||
| 51 | int step; | 51 | int step; |
| 52 | }; | 52 | }; |
| 53 | 53 | ||
| 54 | /* Voltage maps */ | 54 | /* Voltage maps in uV*/ |
| 55 | static const struct voltage_map_desc ldo23_voltage_map_desc = { | 55 | static const struct voltage_map_desc ldo23_voltage_map_desc = { |
| 56 | .min = 800, .step = 50, .max = 1300, | 56 | .min = 800000, .step = 50000, .max = 1300000, |
| 57 | }; | 57 | }; |
| 58 | static const struct voltage_map_desc ldo456711_voltage_map_desc = { | 58 | static const struct voltage_map_desc ldo456711_voltage_map_desc = { |
| 59 | .min = 1600, .step = 100, .max = 3600, | 59 | .min = 1600000, .step = 100000, .max = 3600000, |
| 60 | }; | 60 | }; |
| 61 | static const struct voltage_map_desc ldo8_voltage_map_desc = { | 61 | static const struct voltage_map_desc ldo8_voltage_map_desc = { |
| 62 | .min = 3000, .step = 100, .max = 3600, | 62 | .min = 3000000, .step = 100000, .max = 3600000, |
| 63 | }; | 63 | }; |
| 64 | static const struct voltage_map_desc ldo9_voltage_map_desc = { | 64 | static const struct voltage_map_desc ldo9_voltage_map_desc = { |
| 65 | .min = 2800, .step = 100, .max = 3100, | 65 | .min = 2800000, .step = 100000, .max = 3100000, |
| 66 | }; | 66 | }; |
| 67 | static const struct voltage_map_desc ldo10_voltage_map_desc = { | 67 | static const struct voltage_map_desc ldo10_voltage_map_desc = { |
| 68 | .min = 950, .step = 50, .max = 1300, | 68 | .min = 95000, .step = 50000, .max = 1300000, |
| 69 | }; | 69 | }; |
| 70 | static const struct voltage_map_desc ldo1213_voltage_map_desc = { | 70 | static const struct voltage_map_desc ldo1213_voltage_map_desc = { |
| 71 | .min = 800, .step = 100, .max = 3300, | 71 | .min = 800000, .step = 100000, .max = 3300000, |
| 72 | }; | 72 | }; |
| 73 | static const struct voltage_map_desc ldo1415_voltage_map_desc = { | 73 | static const struct voltage_map_desc ldo1415_voltage_map_desc = { |
| 74 | .min = 1200, .step = 100, .max = 3300, | 74 | .min = 1200000, .step = 100000, .max = 3300000, |
| 75 | }; | 75 | }; |
| 76 | static const struct voltage_map_desc ldo1617_voltage_map_desc = { | 76 | static const struct voltage_map_desc ldo1617_voltage_map_desc = { |
| 77 | .min = 1600, .step = 100, .max = 3600, | 77 | .min = 1600000, .step = 100000, .max = 3600000, |
| 78 | }; | 78 | }; |
| 79 | static const struct voltage_map_desc buck12_voltage_map_desc = { | 79 | static const struct voltage_map_desc buck12_voltage_map_desc = { |
| 80 | .min = 750, .step = 25, .max = 1525, | 80 | .min = 750000, .step = 25000, .max = 1525000, |
| 81 | }; | 81 | }; |
| 82 | static const struct voltage_map_desc buck3_voltage_map_desc = { | 82 | static const struct voltage_map_desc buck3_voltage_map_desc = { |
| 83 | .min = 1600, .step = 100, .max = 3600, | 83 | .min = 1600000, .step = 100000, .max = 3600000, |
| 84 | }; | 84 | }; |
| 85 | static const struct voltage_map_desc buck4_voltage_map_desc = { | 85 | static const struct voltage_map_desc buck4_voltage_map_desc = { |
| 86 | .min = 800, .step = 100, .max = 2300, | 86 | .min = 800000, .step = 100000, .max = 2300000, |
| 87 | }; | 87 | }; |
| 88 | 88 | ||
| 89 | static const struct voltage_map_desc *ldo_voltage_map[] = { | 89 | static const struct voltage_map_desc *ldo_voltage_map[] = { |
| @@ -445,9 +445,9 @@ static int max8998_set_voltage_buck_time_sel(struct regulator_dev *rdev, | |||
| 445 | if (max8998->iodev->type == TYPE_MAX8998 && !(val & MAX8998_ENRAMP)) | 445 | if (max8998->iodev->type == TYPE_MAX8998 && !(val & MAX8998_ENRAMP)) |
| 446 | return 0; | 446 | return 0; |
| 447 | 447 | ||
| 448 | difference = (new_selector - old_selector) * desc->step; | 448 | difference = (new_selector - old_selector) * desc->step / 1000; |
| 449 | if (difference > 0) | 449 | if (difference > 0) |
| 450 | return difference / ((val & 0x0f) + 1); | 450 | return DIV_ROUND_UP(difference, (val & 0x0f) + 1); |
| 451 | 451 | ||
| 452 | return 0; | 452 | return 0; |
| 453 | } | 453 | } |
| @@ -702,7 +702,7 @@ static int max8998_pmic_probe(struct platform_device *pdev) | |||
| 702 | i = 0; | 702 | i = 0; |
| 703 | while (buck12_voltage_map_desc.min + | 703 | while (buck12_voltage_map_desc.min + |
| 704 | buck12_voltage_map_desc.step*i | 704 | buck12_voltage_map_desc.step*i |
| 705 | < (pdata->buck1_voltage1 / 1000)) | 705 | < pdata->buck1_voltage1) |
| 706 | i++; | 706 | i++; |
| 707 | max8998->buck1_vol[0] = i; | 707 | max8998->buck1_vol[0] = i; |
| 708 | ret = max8998_write_reg(i2c, MAX8998_REG_BUCK1_VOLTAGE1, i); | 708 | ret = max8998_write_reg(i2c, MAX8998_REG_BUCK1_VOLTAGE1, i); |
| @@ -713,7 +713,7 @@ static int max8998_pmic_probe(struct platform_device *pdev) | |||
| 713 | i = 0; | 713 | i = 0; |
| 714 | while (buck12_voltage_map_desc.min + | 714 | while (buck12_voltage_map_desc.min + |
| 715 | buck12_voltage_map_desc.step*i | 715 | buck12_voltage_map_desc.step*i |
| 716 | < (pdata->buck1_voltage2 / 1000)) | 716 | < pdata->buck1_voltage2) |
| 717 | i++; | 717 | i++; |
| 718 | 718 | ||
| 719 | max8998->buck1_vol[1] = i; | 719 | max8998->buck1_vol[1] = i; |
| @@ -725,7 +725,7 @@ static int max8998_pmic_probe(struct platform_device *pdev) | |||
| 725 | i = 0; | 725 | i = 0; |
| 726 | while (buck12_voltage_map_desc.min + | 726 | while (buck12_voltage_map_desc.min + |
| 727 | buck12_voltage_map_desc.step*i | 727 | buck12_voltage_map_desc.step*i |
| 728 | < (pdata->buck1_voltage3 / 1000)) | 728 | < pdata->buck1_voltage3) |
| 729 | i++; | 729 | i++; |
| 730 | 730 | ||
| 731 | max8998->buck1_vol[2] = i; | 731 | max8998->buck1_vol[2] = i; |
| @@ -737,7 +737,7 @@ static int max8998_pmic_probe(struct platform_device *pdev) | |||
| 737 | i = 0; | 737 | i = 0; |
| 738 | while (buck12_voltage_map_desc.min + | 738 | while (buck12_voltage_map_desc.min + |
| 739 | buck12_voltage_map_desc.step*i | 739 | buck12_voltage_map_desc.step*i |
| 740 | < (pdata->buck1_voltage4 / 1000)) | 740 | < pdata->buck1_voltage4) |
| 741 | i++; | 741 | i++; |
| 742 | 742 | ||
| 743 | max8998->buck1_vol[3] = i; | 743 | max8998->buck1_vol[3] = i; |
| @@ -763,7 +763,7 @@ static int max8998_pmic_probe(struct platform_device *pdev) | |||
| 763 | i = 0; | 763 | i = 0; |
| 764 | while (buck12_voltage_map_desc.min + | 764 | while (buck12_voltage_map_desc.min + |
| 765 | buck12_voltage_map_desc.step*i | 765 | buck12_voltage_map_desc.step*i |
| 766 | < (pdata->buck2_voltage1 / 1000)) | 766 | < pdata->buck2_voltage1) |
| 767 | i++; | 767 | i++; |
| 768 | max8998->buck2_vol[0] = i; | 768 | max8998->buck2_vol[0] = i; |
| 769 | ret = max8998_write_reg(i2c, MAX8998_REG_BUCK2_VOLTAGE1, i); | 769 | ret = max8998_write_reg(i2c, MAX8998_REG_BUCK2_VOLTAGE1, i); |
| @@ -774,7 +774,7 @@ static int max8998_pmic_probe(struct platform_device *pdev) | |||
| 774 | i = 0; | 774 | i = 0; |
| 775 | while (buck12_voltage_map_desc.min + | 775 | while (buck12_voltage_map_desc.min + |
| 776 | buck12_voltage_map_desc.step*i | 776 | buck12_voltage_map_desc.step*i |
| 777 | < (pdata->buck2_voltage2 / 1000)) | 777 | < pdata->buck2_voltage2) |
| 778 | i++; | 778 | i++; |
| 779 | max8998->buck2_vol[1] = i; | 779 | max8998->buck2_vol[1] = i; |
| 780 | ret = max8998_write_reg(i2c, MAX8998_REG_BUCK2_VOLTAGE2, i); | 780 | ret = max8998_write_reg(i2c, MAX8998_REG_BUCK2_VOLTAGE2, i); |
| @@ -792,8 +792,8 @@ static int max8998_pmic_probe(struct platform_device *pdev) | |||
| 792 | int count = (desc->max - desc->min) / desc->step + 1; | 792 | int count = (desc->max - desc->min) / desc->step + 1; |
| 793 | 793 | ||
| 794 | regulators[index].n_voltages = count; | 794 | regulators[index].n_voltages = count; |
| 795 | regulators[index].min_uV = desc->min * 1000; | 795 | regulators[index].min_uV = desc->min; |
| 796 | regulators[index].uV_step = desc->step * 1000; | 796 | regulators[index].uV_step = desc->step; |
| 797 | } | 797 | } |
| 798 | 798 | ||
| 799 | config.dev = max8998->dev; | 799 | config.dev = max8998->dev; |
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index e915629a25cf..c9e912f583bc 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c | |||
| @@ -806,7 +806,7 @@ static int palmas_remove(struct platform_device *pdev) | |||
| 806 | return 0; | 806 | return 0; |
| 807 | } | 807 | } |
| 808 | 808 | ||
| 809 | static struct of_device_id __devinitdata of_palmas_match_tbl[] = { | 809 | static struct of_device_id of_palmas_match_tbl[] = { |
| 810 | { .compatible = "ti,palmas-pmic", }, | 810 | { .compatible = "ti,palmas-pmic", }, |
| 811 | { /* end */ } | 811 | { /* end */ } |
| 812 | }; | 812 | }; |
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c index 9f991f2c525a..33b65c9ad5d5 100644 --- a/drivers/regulator/s5m8767.c +++ b/drivers/regulator/s5m8767.c | |||
| @@ -214,7 +214,7 @@ static int s5m8767_reg_is_enabled(struct regulator_dev *rdev) | |||
| 214 | struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev); | 214 | struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev); |
| 215 | int ret, reg; | 215 | int ret, reg; |
| 216 | int mask = 0xc0, enable_ctrl; | 216 | int mask = 0xc0, enable_ctrl; |
| 217 | u8 val; | 217 | unsigned int val; |
| 218 | 218 | ||
| 219 | ret = s5m8767_get_register(rdev, ®, &enable_ctrl); | 219 | ret = s5m8767_get_register(rdev, ®, &enable_ctrl); |
| 220 | if (ret == -EINVAL) | 220 | if (ret == -EINVAL) |
| @@ -306,7 +306,7 @@ static int s5m8767_get_voltage_sel(struct regulator_dev *rdev) | |||
| 306 | struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev); | 306 | struct s5m8767_info *s5m8767 = rdev_get_drvdata(rdev); |
| 307 | int reg, mask, ret; | 307 | int reg, mask, ret; |
| 308 | int reg_id = rdev_get_id(rdev); | 308 | int reg_id = rdev_get_id(rdev); |
| 309 | u8 val; | 309 | unsigned int val; |
| 310 | 310 | ||
| 311 | ret = s5m8767_get_voltage_register(rdev, ®); | 311 | ret = s5m8767_get_voltage_register(rdev, ®); |
| 312 | if (ret) | 312 | if (ret) |
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 493c8c6a241f..74508cc62d67 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c | |||
| @@ -1064,7 +1064,7 @@ static u8 twl_get_smps_mult(void) | |||
| 1064 | #define TWLFIXED_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLFIXED, label) | 1064 | #define TWLFIXED_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLFIXED, label) |
| 1065 | #define TWLSMPS_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLSMPS, label) | 1065 | #define TWLSMPS_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLSMPS, label) |
| 1066 | 1066 | ||
| 1067 | static const struct of_device_id twl_of_match[] __devinitconst = { | 1067 | static const struct of_device_id twl_of_match[] = { |
| 1068 | TWL4030_OF_MATCH("ti,twl4030-vaux1", VAUX1), | 1068 | TWL4030_OF_MATCH("ti,twl4030-vaux1", VAUX1), |
| 1069 | TWL4030_OF_MATCH("ti,twl4030-vaux2", VAUX2_4030), | 1069 | TWL4030_OF_MATCH("ti,twl4030-vaux2", VAUX2_4030), |
| 1070 | TWL4030_OF_MATCH("ti,twl5030-vaux2", VAUX2), | 1070 | TWL4030_OF_MATCH("ti,twl5030-vaux2", VAUX2), |
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index 32c289c2ba13..0e396c155b3b 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c | |||
| @@ -179,7 +179,7 @@ static struct rproc_ops omap_rproc_ops = { | |||
| 179 | .kick = omap_rproc_kick, | 179 | .kick = omap_rproc_kick, |
| 180 | }; | 180 | }; |
| 181 | 181 | ||
| 182 | static int __devinit omap_rproc_probe(struct platform_device *pdev) | 182 | static int omap_rproc_probe(struct platform_device *pdev) |
| 183 | { | 183 | { |
| 184 | struct omap_rproc_pdata *pdata = pdev->dev.platform_data; | 184 | struct omap_rproc_pdata *pdata = pdev->dev.platform_data; |
| 185 | struct omap_rproc *oproc; | 185 | struct omap_rproc *oproc; |
| @@ -213,7 +213,7 @@ free_rproc: | |||
| 213 | return ret; | 213 | return ret; |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | static int __devexit omap_rproc_remove(struct platform_device *pdev) | 216 | static int omap_rproc_remove(struct platform_device *pdev) |
| 217 | { | 217 | { |
| 218 | struct rproc *rproc = platform_get_drvdata(pdev); | 218 | struct rproc *rproc = platform_get_drvdata(pdev); |
| 219 | 219 | ||
| @@ -225,7 +225,7 @@ static int __devexit omap_rproc_remove(struct platform_device *pdev) | |||
| 225 | 225 | ||
| 226 | static struct platform_driver omap_rproc_driver = { | 226 | static struct platform_driver omap_rproc_driver = { |
| 227 | .probe = omap_rproc_probe, | 227 | .probe = omap_rproc_probe, |
| 228 | .remove = __devexit_p(omap_rproc_remove), | 228 | .remove = omap_rproc_remove, |
| 229 | .driver = { | 229 | .driver = { |
| 230 | .name = "omap-rproc", | 230 | .name = "omap-rproc", |
| 231 | .owner = THIS_MODULE, | 231 | .owner = THIS_MODULE, |
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c index 027096fe6a12..f1e323924f12 100644 --- a/drivers/rpmsg/virtio_rpmsg_bus.c +++ b/drivers/rpmsg/virtio_rpmsg_bus.c | |||
| @@ -1022,7 +1022,7 @@ static int rpmsg_remove_device(struct device *dev, void *data) | |||
| 1022 | return 0; | 1022 | return 0; |
| 1023 | } | 1023 | } |
| 1024 | 1024 | ||
| 1025 | static void __devexit rpmsg_remove(struct virtio_device *vdev) | 1025 | static void rpmsg_remove(struct virtio_device *vdev) |
| 1026 | { | 1026 | { |
| 1027 | struct virtproc_info *vrp = vdev->priv; | 1027 | struct virtproc_info *vrp = vdev->priv; |
| 1028 | int ret; | 1028 | int ret; |
| @@ -1063,7 +1063,7 @@ static struct virtio_driver virtio_ipc_driver = { | |||
| 1063 | .driver.owner = THIS_MODULE, | 1063 | .driver.owner = THIS_MODULE, |
| 1064 | .id_table = id_table, | 1064 | .id_table = id_table, |
| 1065 | .probe = rpmsg_probe, | 1065 | .probe = rpmsg_probe, |
| 1066 | .remove = __devexit_p(rpmsg_remove), | 1066 | .remove = rpmsg_remove, |
| 1067 | }; | 1067 | }; |
| 1068 | 1068 | ||
| 1069 | static int __init rpmsg_init(void) | 1069 | static int __init rpmsg_init(void) |
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index d0cea02b5dfc..923a9da9c829 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig | |||
| @@ -352,6 +352,14 @@ config RTC_DRV_TWL4030 | |||
| 352 | This driver can also be built as a module. If so, the module | 352 | This driver can also be built as a module. If so, the module |
| 353 | will be called rtc-twl. | 353 | will be called rtc-twl. |
| 354 | 354 | ||
| 355 | config RTC_DRV_TPS6586X | ||
| 356 | tristate "TI TPS6586X RTC driver" | ||
| 357 | depends on MFD_TPS6586X | ||
| 358 | help | ||
| 359 | TI Power Managment IC TPS6586X supports RTC functionality | ||
| 360 | along with alarm. This driver supports the RTC driver for | ||
| 361 | the TPS6586X RTC module. | ||
| 362 | |||
| 355 | config RTC_DRV_TPS65910 | 363 | config RTC_DRV_TPS65910 |
| 356 | tristate "TI TPS65910 RTC driver" | 364 | tristate "TI TPS65910 RTC driver" |
| 357 | depends on RTC_CLASS && MFD_TPS65910 | 365 | depends on RTC_CLASS && MFD_TPS65910 |
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index c3f62c80dc06..4418ef3f9ecc 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile | |||
| @@ -111,6 +111,7 @@ obj-$(CONFIG_RTC_DRV_TEGRA) += rtc-tegra.o | |||
| 111 | obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o | 111 | obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o |
| 112 | obj-$(CONFIG_RTC_DRV_TILE) += rtc-tile.o | 112 | obj-$(CONFIG_RTC_DRV_TILE) += rtc-tile.o |
| 113 | obj-$(CONFIG_RTC_DRV_TWL4030) += rtc-twl.o | 113 | obj-$(CONFIG_RTC_DRV_TWL4030) += rtc-twl.o |
| 114 | obj-$(CONFIG_RTC_DRV_TPS6586X) += rtc-tps6586x.o | ||
| 114 | obj-$(CONFIG_RTC_DRV_TPS65910) += rtc-tps65910.o | 115 | obj-$(CONFIG_RTC_DRV_TPS65910) += rtc-tps65910.o |
| 115 | obj-$(CONFIG_RTC_DRV_TX4939) += rtc-tx4939.o | 116 | obj-$(CONFIG_RTC_DRV_TX4939) += rtc-tx4939.o |
| 116 | obj-$(CONFIG_RTC_DRV_V3020) += rtc-v3020.o | 117 | obj-$(CONFIG_RTC_DRV_V3020) += rtc-v3020.o |
diff --git a/drivers/rtc/rtc-88pm80x.c b/drivers/rtc/rtc-88pm80x.c index 6367984e0565..63b17ebe90e8 100644 --- a/drivers/rtc/rtc-88pm80x.c +++ b/drivers/rtc/rtc-88pm80x.c | |||
| @@ -248,7 +248,7 @@ static int pm80x_rtc_resume(struct device *dev) | |||
| 248 | 248 | ||
| 249 | static SIMPLE_DEV_PM_OPS(pm80x_rtc_pm_ops, pm80x_rtc_suspend, pm80x_rtc_resume); | 249 | static SIMPLE_DEV_PM_OPS(pm80x_rtc_pm_ops, pm80x_rtc_suspend, pm80x_rtc_resume); |
| 250 | 250 | ||
| 251 | static int __devinit pm80x_rtc_probe(struct platform_device *pdev) | 251 | static int pm80x_rtc_probe(struct platform_device *pdev) |
| 252 | { | 252 | { |
| 253 | struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent); | 253 | struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent); |
| 254 | struct pm80x_platform_data *pm80x_pdata; | 254 | struct pm80x_platform_data *pm80x_pdata; |
| @@ -342,7 +342,7 @@ out: | |||
| 342 | return ret; | 342 | return ret; |
| 343 | } | 343 | } |
| 344 | 344 | ||
| 345 | static int __devexit pm80x_rtc_remove(struct platform_device *pdev) | 345 | static int pm80x_rtc_remove(struct platform_device *pdev) |
| 346 | { | 346 | { |
| 347 | struct pm80x_rtc_info *info = platform_get_drvdata(pdev); | 347 | struct pm80x_rtc_info *info = platform_get_drvdata(pdev); |
| 348 | platform_set_drvdata(pdev, NULL); | 348 | platform_set_drvdata(pdev, NULL); |
| @@ -358,7 +358,7 @@ static struct platform_driver pm80x_rtc_driver = { | |||
| 358 | .pm = &pm80x_rtc_pm_ops, | 358 | .pm = &pm80x_rtc_pm_ops, |
| 359 | }, | 359 | }, |
| 360 | .probe = pm80x_rtc_probe, | 360 | .probe = pm80x_rtc_probe, |
| 361 | .remove = __devexit_p(pm80x_rtc_remove), | 361 | .remove = pm80x_rtc_remove, |
| 362 | }; | 362 | }; |
| 363 | 363 | ||
| 364 | module_platform_driver(pm80x_rtc_driver); | 364 | module_platform_driver(pm80x_rtc_driver); |
diff --git a/drivers/rtc/rtc-88pm860x.c b/drivers/rtc/rtc-88pm860x.c index de9e854b326a..f663746f4603 100644 --- a/drivers/rtc/rtc-88pm860x.c +++ b/drivers/rtc/rtc-88pm860x.c | |||
| @@ -286,8 +286,8 @@ out: | |||
| 286 | #endif | 286 | #endif |
| 287 | 287 | ||
| 288 | #ifdef CONFIG_OF | 288 | #ifdef CONFIG_OF |
| 289 | static int __devinit pm860x_rtc_dt_init(struct platform_device *pdev, | 289 | static int pm860x_rtc_dt_init(struct platform_device *pdev, |
| 290 | struct pm860x_rtc_info *info) | 290 | struct pm860x_rtc_info *info) |
| 291 | { | 291 | { |
| 292 | struct device_node *np = pdev->dev.parent->of_node; | 292 | struct device_node *np = pdev->dev.parent->of_node; |
| 293 | int ret; | 293 | int ret; |
| @@ -307,7 +307,7 @@ static int __devinit pm860x_rtc_dt_init(struct platform_device *pdev, | |||
| 307 | #define pm860x_rtc_dt_init(x, y) (-1) | 307 | #define pm860x_rtc_dt_init(x, y) (-1) |
| 308 | #endif | 308 | #endif |
| 309 | 309 | ||
| 310 | static int __devinit pm860x_rtc_probe(struct platform_device *pdev) | 310 | static int pm860x_rtc_probe(struct platform_device *pdev) |
| 311 | { | 311 | { |
| 312 | struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); | 312 | struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); |
| 313 | struct pm860x_rtc_pdata *pdata = NULL; | 313 | struct pm860x_rtc_pdata *pdata = NULL; |
| @@ -412,7 +412,7 @@ out: | |||
| 412 | return ret; | 412 | return ret; |
| 413 | } | 413 | } |
| 414 | 414 | ||
| 415 | static int __devexit pm860x_rtc_remove(struct platform_device *pdev) | 415 | static int pm860x_rtc_remove(struct platform_device *pdev) |
| 416 | { | 416 | { |
| 417 | struct pm860x_rtc_info *info = platform_get_drvdata(pdev); | 417 | struct pm860x_rtc_info *info = platform_get_drvdata(pdev); |
| 418 | 418 | ||
| @@ -459,7 +459,7 @@ static struct platform_driver pm860x_rtc_driver = { | |||
| 459 | .pm = &pm860x_rtc_pm_ops, | 459 | .pm = &pm860x_rtc_pm_ops, |
| 460 | }, | 460 | }, |
| 461 | .probe = pm860x_rtc_probe, | 461 | .probe = pm860x_rtc_probe, |
| 462 | .remove = __devexit_p(pm860x_rtc_remove), | 462 | .remove = pm860x_rtc_remove, |
| 463 | }; | 463 | }; |
| 464 | 464 | ||
| 465 | module_platform_driver(pm860x_rtc_driver); | 465 | module_platform_driver(pm860x_rtc_driver); |
diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c index 2e5970fe9eeb..57cde2b061e6 100644 --- a/drivers/rtc/rtc-ab8500.c +++ b/drivers/rtc/rtc-ab8500.c | |||
| @@ -389,7 +389,7 @@ static const struct rtc_class_ops ab8500_rtc_ops = { | |||
| 389 | .alarm_irq_enable = ab8500_rtc_irq_enable, | 389 | .alarm_irq_enable = ab8500_rtc_irq_enable, |
| 390 | }; | 390 | }; |
| 391 | 391 | ||
| 392 | static int __devinit ab8500_rtc_probe(struct platform_device *pdev) | 392 | static int ab8500_rtc_probe(struct platform_device *pdev) |
| 393 | { | 393 | { |
| 394 | int err; | 394 | int err; |
| 395 | struct rtc_device *rtc; | 395 | struct rtc_device *rtc; |
| @@ -448,7 +448,7 @@ static int __devinit ab8500_rtc_probe(struct platform_device *pdev) | |||
| 448 | return 0; | 448 | return 0; |
| 449 | } | 449 | } |
| 450 | 450 | ||
| 451 | static int __devexit ab8500_rtc_remove(struct platform_device *pdev) | 451 | static int ab8500_rtc_remove(struct platform_device *pdev) |
| 452 | { | 452 | { |
| 453 | struct rtc_device *rtc = platform_get_drvdata(pdev); | 453 | struct rtc_device *rtc = platform_get_drvdata(pdev); |
| 454 | int irq = platform_get_irq_byname(pdev, "ALARM"); | 454 | int irq = platform_get_irq_byname(pdev, "ALARM"); |
| @@ -468,7 +468,7 @@ static struct platform_driver ab8500_rtc_driver = { | |||
| 468 | .owner = THIS_MODULE, | 468 | .owner = THIS_MODULE, |
| 469 | }, | 469 | }, |
| 470 | .probe = ab8500_rtc_probe, | 470 | .probe = ab8500_rtc_probe, |
| 471 | .remove = __devexit_p(ab8500_rtc_remove), | 471 | .remove = ab8500_rtc_remove, |
| 472 | }; | 472 | }; |
| 473 | 473 | ||
| 474 | module_platform_driver(ab8500_rtc_driver); | 474 | module_platform_driver(ab8500_rtc_driver); |
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c index e981798e9a9b..39cfd2ee0042 100644 --- a/drivers/rtc/rtc-at91sam9.c +++ b/drivers/rtc/rtc-at91sam9.c | |||
| @@ -289,7 +289,7 @@ static const struct rtc_class_ops at91_rtc_ops = { | |||
| 289 | /* | 289 | /* |
| 290 | * Initialize and install RTC driver | 290 | * Initialize and install RTC driver |
| 291 | */ | 291 | */ |
| 292 | static int __devinit at91_rtc_probe(struct platform_device *pdev) | 292 | static int at91_rtc_probe(struct platform_device *pdev) |
| 293 | { | 293 | { |
| 294 | struct resource *r, *r_gpbr; | 294 | struct resource *r, *r_gpbr; |
| 295 | struct sam9_rtc *rtc; | 295 | struct sam9_rtc *rtc; |
| @@ -387,7 +387,7 @@ fail: | |||
| 387 | /* | 387 | /* |
| 388 | * Disable and remove the RTC driver | 388 | * Disable and remove the RTC driver |
| 389 | */ | 389 | */ |
| 390 | static int __devexit at91_rtc_remove(struct platform_device *pdev) | 390 | static int at91_rtc_remove(struct platform_device *pdev) |
| 391 | { | 391 | { |
| 392 | struct sam9_rtc *rtc = platform_get_drvdata(pdev); | 392 | struct sam9_rtc *rtc = platform_get_drvdata(pdev); |
| 393 | u32 mr = rtt_readl(rtc, MR); | 393 | u32 mr = rtt_readl(rtc, MR); |
| @@ -463,7 +463,7 @@ static int at91_rtc_resume(struct platform_device *pdev) | |||
| 463 | 463 | ||
| 464 | static struct platform_driver at91_rtc_driver = { | 464 | static struct platform_driver at91_rtc_driver = { |
| 465 | .probe = at91_rtc_probe, | 465 | .probe = at91_rtc_probe, |
| 466 | .remove = __devexit_p(at91_rtc_remove), | 466 | .remove = at91_rtc_remove, |
| 467 | .shutdown = at91_rtc_shutdown, | 467 | .shutdown = at91_rtc_shutdown, |
| 468 | .suspend = at91_rtc_suspend, | 468 | .suspend = at91_rtc_suspend, |
| 469 | .resume = at91_rtc_resume, | 469 | .resume = at91_rtc_resume, |
diff --git a/drivers/rtc/rtc-au1xxx.c b/drivers/rtc/rtc-au1xxx.c index 979ed0406ce9..b309da4ec745 100644 --- a/drivers/rtc/rtc-au1xxx.c +++ b/drivers/rtc/rtc-au1xxx.c | |||
| @@ -62,7 +62,7 @@ static struct rtc_class_ops au1xtoy_rtc_ops = { | |||
| 62 | .set_time = au1xtoy_rtc_set_time, | 62 | .set_time = au1xtoy_rtc_set_time, |
| 63 | }; | 63 | }; |
| 64 | 64 | ||
| 65 | static int __devinit au1xtoy_rtc_probe(struct platform_device *pdev) | 65 | static int au1xtoy_rtc_probe(struct platform_device *pdev) |
| 66 | { | 66 | { |
| 67 | struct rtc_device *rtcdev; | 67 | struct rtc_device *rtcdev; |
| 68 | unsigned long t; | 68 | unsigned long t; |
| @@ -116,7 +116,7 @@ out_err: | |||
| 116 | return ret; | 116 | return ret; |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | static int __devexit au1xtoy_rtc_remove(struct platform_device *pdev) | 119 | static int au1xtoy_rtc_remove(struct platform_device *pdev) |
| 120 | { | 120 | { |
| 121 | struct rtc_device *rtcdev = platform_get_drvdata(pdev); | 121 | struct rtc_device *rtcdev = platform_get_drvdata(pdev); |
| 122 | 122 | ||
| @@ -131,7 +131,7 @@ static struct platform_driver au1xrtc_driver = { | |||
| 131 | .name = "rtc-au1xxx", | 131 | .name = "rtc-au1xxx", |
| 132 | .owner = THIS_MODULE, | 132 | .owner = THIS_MODULE, |
| 133 | }, | 133 | }, |
| 134 | .remove = __devexit_p(au1xtoy_rtc_remove), | 134 | .remove = au1xtoy_rtc_remove, |
| 135 | }; | 135 | }; |
| 136 | 136 | ||
| 137 | static int __init au1xtoy_rtc_init(void) | 137 | static int __init au1xtoy_rtc_init(void) |
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c index abfc1a0c07d9..4ec614b0954d 100644 --- a/drivers/rtc/rtc-bfin.c +++ b/drivers/rtc/rtc-bfin.c | |||
| @@ -342,7 +342,7 @@ static struct rtc_class_ops bfin_rtc_ops = { | |||
| 342 | .alarm_irq_enable = bfin_rtc_alarm_irq_enable, | 342 | .alarm_irq_enable = bfin_rtc_alarm_irq_enable, |
| 343 | }; | 343 | }; |
| 344 | 344 | ||
| 345 | static int __devinit bfin_rtc_probe(struct platform_device *pdev) | 345 | static int bfin_rtc_probe(struct platform_device *pdev) |
| 346 | { | 346 | { |
| 347 | struct bfin_rtc *rtc; | 347 | struct bfin_rtc *rtc; |
| 348 | struct device *dev = &pdev->dev; | 348 | struct device *dev = &pdev->dev; |
| @@ -388,7 +388,7 @@ err: | |||
| 388 | return ret; | 388 | return ret; |
| 389 | } | 389 | } |
| 390 | 390 | ||
| 391 | static int __devexit bfin_rtc_remove(struct platform_device *pdev) | 391 | static int bfin_rtc_remove(struct platform_device *pdev) |
| 392 | { | 392 | { |
| 393 | struct bfin_rtc *rtc = platform_get_drvdata(pdev); | 393 | struct bfin_rtc *rtc = platform_get_drvdata(pdev); |
| 394 | struct device *dev = &pdev->dev; | 394 | struct device *dev = &pdev->dev; |
| @@ -451,7 +451,7 @@ static struct platform_driver bfin_rtc_driver = { | |||
| 451 | .owner = THIS_MODULE, | 451 | .owner = THIS_MODULE, |
| 452 | }, | 452 | }, |
| 453 | .probe = bfin_rtc_probe, | 453 | .probe = bfin_rtc_probe, |
| 454 | .remove = __devexit_p(bfin_rtc_remove), | 454 | .remove = bfin_rtc_remove, |
| 455 | .suspend = bfin_rtc_suspend, | 455 | .suspend = bfin_rtc_suspend, |
| 456 | .resume = bfin_rtc_resume, | 456 | .resume = bfin_rtc_resume, |
| 457 | }; | 457 | }; |
diff --git a/drivers/rtc/rtc-bq32k.c b/drivers/rtc/rtc-bq32k.c index f090159dce4a..036cb89f8188 100644 --- a/drivers/rtc/rtc-bq32k.c +++ b/drivers/rtc/rtc-bq32k.c | |||
| @@ -163,7 +163,7 @@ static int bq32k_probe(struct i2c_client *client, | |||
| 163 | return 0; | 163 | return 0; |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | static int __devexit bq32k_remove(struct i2c_client *client) | 166 | static int bq32k_remove(struct i2c_client *client) |
| 167 | { | 167 | { |
| 168 | struct rtc_device *rtc = i2c_get_clientdata(client); | 168 | struct rtc_device *rtc = i2c_get_clientdata(client); |
| 169 | 169 | ||
| @@ -183,7 +183,7 @@ static struct i2c_driver bq32k_driver = { | |||
| 183 | .owner = THIS_MODULE, | 183 | .owner = THIS_MODULE, |
| 184 | }, | 184 | }, |
| 185 | .probe = bq32k_probe, | 185 | .probe = bq32k_probe, |
| 186 | .remove = __devexit_p(bq32k_remove), | 186 | .remove = bq32k_remove, |
| 187 | .id_table = bq32k_id, | 187 | .id_table = bq32k_id, |
| 188 | }; | 188 | }; |
| 189 | 189 | ||
diff --git a/drivers/rtc/rtc-bq4802.c b/drivers/rtc/rtc-bq4802.c index bf612ef22941..693be71b5b18 100644 --- a/drivers/rtc/rtc-bq4802.c +++ b/drivers/rtc/rtc-bq4802.c | |||
| @@ -140,7 +140,7 @@ static const struct rtc_class_ops bq4802_ops = { | |||
| 140 | .set_time = bq4802_set_time, | 140 | .set_time = bq4802_set_time, |
| 141 | }; | 141 | }; |
| 142 | 142 | ||
| 143 | static int __devinit bq4802_probe(struct platform_device *pdev) | 143 | static int bq4802_probe(struct platform_device *pdev) |
| 144 | { | 144 | { |
| 145 | struct bq4802 *p = kzalloc(sizeof(*p), GFP_KERNEL); | 145 | struct bq4802 *p = kzalloc(sizeof(*p), GFP_KERNEL); |
| 146 | int err = -ENOMEM; | 146 | int err = -ENOMEM; |
| @@ -191,7 +191,7 @@ out_free: | |||
| 191 | goto out; | 191 | goto out; |
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | static int __devexit bq4802_remove(struct platform_device *pdev) | 194 | static int bq4802_remove(struct platform_device *pdev) |
| 195 | { | 195 | { |
| 196 | struct bq4802 *p = platform_get_drvdata(pdev); | 196 | struct bq4802 *p = platform_get_drvdata(pdev); |
| 197 | 197 | ||
| @@ -215,7 +215,7 @@ static struct platform_driver bq4802_driver = { | |||
| 215 | .owner = THIS_MODULE, | 215 | .owner = THIS_MODULE, |
| 216 | }, | 216 | }, |
| 217 | .probe = bq4802_probe, | 217 | .probe = bq4802_probe, |
| 218 | .remove = __devexit_p(bq4802_remove), | 218 | .remove = bq4802_remove, |
| 219 | }; | 219 | }; |
| 220 | 220 | ||
| 221 | module_platform_driver(bq4802_driver); | 221 | module_platform_driver(bq4802_driver); |
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 4267789ca995..16630aa87f45 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c | |||
| @@ -947,8 +947,7 @@ static void rtc_wake_off(struct device *dev) | |||
| 947 | */ | 947 | */ |
| 948 | static struct cmos_rtc_board_info acpi_rtc_info; | 948 | static struct cmos_rtc_board_info acpi_rtc_info; |
| 949 | 949 | ||
| 950 | static void __devinit | 950 | static void cmos_wake_setup(struct device *dev) |
| 951 | cmos_wake_setup(struct device *dev) | ||
| 952 | { | 951 | { |
| 953 | if (acpi_disabled) | 952 | if (acpi_disabled) |
| 954 | return; | 953 | return; |
| @@ -980,8 +979,7 @@ cmos_wake_setup(struct device *dev) | |||
| 980 | 979 | ||
| 981 | #else | 980 | #else |
| 982 | 981 | ||
| 983 | static void __devinit | 982 | static void cmos_wake_setup(struct device *dev) |
| 984 | cmos_wake_setup(struct device *dev) | ||
| 985 | { | 983 | { |
| 986 | } | 984 | } |
| 987 | 985 | ||
| @@ -991,8 +989,7 @@ cmos_wake_setup(struct device *dev) | |||
| 991 | 989 | ||
| 992 | #include <linux/pnp.h> | 990 | #include <linux/pnp.h> |
| 993 | 991 | ||
| 994 | static int __devinit | 992 | static int cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id) |
| 995 | cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id) | ||
| 996 | { | 993 | { |
| 997 | cmos_wake_setup(&pnp->dev); | 994 | cmos_wake_setup(&pnp->dev); |
| 998 | 995 | ||
diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c index 78070255bd3f..60b826e520e2 100644 --- a/drivers/rtc/rtc-da9052.c +++ b/drivers/rtc/rtc-da9052.c | |||
| @@ -228,7 +228,7 @@ static const struct rtc_class_ops da9052_rtc_ops = { | |||
| 228 | .alarm_irq_enable = da9052_rtc_alarm_irq_enable, | 228 | .alarm_irq_enable = da9052_rtc_alarm_irq_enable, |
| 229 | }; | 229 | }; |
| 230 | 230 | ||
| 231 | static int __devinit da9052_rtc_probe(struct platform_device *pdev) | 231 | static int da9052_rtc_probe(struct platform_device *pdev) |
| 232 | { | 232 | { |
| 233 | struct da9052_rtc *rtc; | 233 | struct da9052_rtc *rtc; |
| 234 | int ret; | 234 | int ret; |
| @@ -262,7 +262,7 @@ err_free_irq: | |||
| 262 | return ret; | 262 | return ret; |
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | static int __devexit da9052_rtc_remove(struct platform_device *pdev) | 265 | static int da9052_rtc_remove(struct platform_device *pdev) |
| 266 | { | 266 | { |
| 267 | struct da9052_rtc *rtc = pdev->dev.platform_data; | 267 | struct da9052_rtc *rtc = pdev->dev.platform_data; |
| 268 | 268 | ||
| @@ -275,7 +275,7 @@ static int __devexit da9052_rtc_remove(struct platform_device *pdev) | |||
| 275 | 275 | ||
| 276 | static struct platform_driver da9052_rtc_driver = { | 276 | static struct platform_driver da9052_rtc_driver = { |
| 277 | .probe = da9052_rtc_probe, | 277 | .probe = da9052_rtc_probe, |
| 278 | .remove = __devexit_p(da9052_rtc_remove), | 278 | .remove = da9052_rtc_remove, |
| 279 | .driver = { | 279 | .driver = { |
| 280 | .name = "da9052-rtc", | 280 | .name = "da9052-rtc", |
| 281 | .owner = THIS_MODULE, | 281 | .owner = THIS_MODULE, |
diff --git a/drivers/rtc/rtc-da9055.c b/drivers/rtc/rtc-da9055.c index 96bafc5c3bf8..8f0dcfedb83c 100644 --- a/drivers/rtc/rtc-da9055.c +++ b/drivers/rtc/rtc-da9055.c | |||
| @@ -227,7 +227,7 @@ static const struct rtc_class_ops da9055_rtc_ops = { | |||
| 227 | .alarm_irq_enable = da9055_rtc_alarm_irq_enable, | 227 | .alarm_irq_enable = da9055_rtc_alarm_irq_enable, |
| 228 | }; | 228 | }; |
| 229 | 229 | ||
| 230 | static int __init da9055_rtc_device_init(struct da9055 *da9055, | 230 | static int da9055_rtc_device_init(struct da9055 *da9055, |
| 231 | struct da9055_pdata *pdata) | 231 | struct da9055_pdata *pdata) |
| 232 | { | 232 | { |
| 233 | int ret; | 233 | int ret; |
diff --git a/drivers/rtc/rtc-davinci.c b/drivers/rtc/rtc-davinci.c index 07cd03eae606..5f7982f7c1b5 100644 --- a/drivers/rtc/rtc-davinci.c +++ b/drivers/rtc/rtc-davinci.c | |||
| @@ -567,7 +567,7 @@ fail2: | |||
| 567 | return ret; | 567 | return ret; |
| 568 | } | 568 | } |
| 569 | 569 | ||
| 570 | static int __devexit davinci_rtc_remove(struct platform_device *pdev) | 570 | static int davinci_rtc_remove(struct platform_device *pdev) |
| 571 | { | 571 | { |
| 572 | struct davinci_rtc *davinci_rtc = platform_get_drvdata(pdev); | 572 | struct davinci_rtc *davinci_rtc = platform_get_drvdata(pdev); |
| 573 | 573 | ||
| @@ -589,7 +589,7 @@ static int __devexit davinci_rtc_remove(struct platform_device *pdev) | |||
| 589 | 589 | ||
| 590 | static struct platform_driver davinci_rtc_driver = { | 590 | static struct platform_driver davinci_rtc_driver = { |
| 591 | .probe = davinci_rtc_probe, | 591 | .probe = davinci_rtc_probe, |
| 592 | .remove = __devexit_p(davinci_rtc_remove), | 592 | .remove = davinci_rtc_remove, |
| 593 | .driver = { | 593 | .driver = { |
| 594 | .name = "rtc_davinci", | 594 | .name = "rtc_davinci", |
| 595 | .owner = THIS_MODULE, | 595 | .owner = THIS_MODULE, |
diff --git a/drivers/rtc/rtc-dm355evm.c b/drivers/rtc/rtc-dm355evm.c index d4457afcba89..b2ed2c94b081 100644 --- a/drivers/rtc/rtc-dm355evm.c +++ b/drivers/rtc/rtc-dm355evm.c | |||
| @@ -123,7 +123,7 @@ static struct rtc_class_ops dm355evm_rtc_ops = { | |||
| 123 | 123 | ||
| 124 | /*----------------------------------------------------------------------*/ | 124 | /*----------------------------------------------------------------------*/ |
| 125 | 125 | ||
| 126 | static int __devinit dm355evm_rtc_probe(struct platform_device *pdev) | 126 | static int dm355evm_rtc_probe(struct platform_device *pdev) |
| 127 | { | 127 | { |
| 128 | struct rtc_device *rtc; | 128 | struct rtc_device *rtc; |
| 129 | 129 | ||
| @@ -139,7 +139,7 @@ static int __devinit dm355evm_rtc_probe(struct platform_device *pdev) | |||
| 139 | return 0; | 139 | return 0; |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | static int __devexit dm355evm_rtc_remove(struct platform_device *pdev) | 142 | static int dm355evm_rtc_remove(struct platform_device *pdev) |
| 143 | { | 143 | { |
| 144 | struct rtc_device *rtc = platform_get_drvdata(pdev); | 144 | struct rtc_device *rtc = platform_get_drvdata(pdev); |
| 145 | 145 | ||
| @@ -154,7 +154,7 @@ static int __devexit dm355evm_rtc_remove(struct platform_device *pdev) | |||
| 154 | */ | 154 | */ |
| 155 | static struct platform_driver rtc_dm355evm_driver = { | 155 | static struct platform_driver rtc_dm355evm_driver = { |
| 156 | .probe = dm355evm_rtc_probe, | 156 | .probe = dm355evm_rtc_probe, |
| 157 | .remove = __devexit_p(dm355evm_rtc_remove), | 157 | .remove = dm355evm_rtc_remove, |
| 158 | .driver = { | 158 | .driver = { |
| 159 | .owner = THIS_MODULE, | 159 | .owner = THIS_MODULE, |
| 160 | .name = "rtc-dm355evm", | 160 | .name = "rtc-dm355evm", |
diff --git a/drivers/rtc/rtc-ds1286.c b/drivers/rtc/rtc-ds1286.c index 990c3ff489bf..d989412a348a 100644 --- a/drivers/rtc/rtc-ds1286.c +++ b/drivers/rtc/rtc-ds1286.c | |||
| @@ -329,7 +329,7 @@ static const struct rtc_class_ops ds1286_ops = { | |||
| 329 | .alarm_irq_enable = ds1286_alarm_irq_enable, | 329 | .alarm_irq_enable = ds1286_alarm_irq_enable, |
| 330 | }; | 330 | }; |
| 331 | 331 | ||
| 332 | static int __devinit ds1286_probe(struct platform_device *pdev) | 332 | static int ds1286_probe(struct platform_device *pdev) |
| 333 | { | 333 | { |
| 334 | struct rtc_device *rtc; | 334 | struct rtc_device *rtc; |
| 335 | struct resource *res; | 335 | struct resource *res; |
| @@ -376,7 +376,7 @@ out: | |||
| 376 | return ret; | 376 | return ret; |
| 377 | } | 377 | } |
| 378 | 378 | ||
| 379 | static int __devexit ds1286_remove(struct platform_device *pdev) | 379 | static int ds1286_remove(struct platform_device *pdev) |
| 380 | { | 380 | { |
| 381 | struct ds1286_priv *priv = platform_get_drvdata(pdev); | 381 | struct ds1286_priv *priv = platform_get_drvdata(pdev); |
| 382 | 382 | ||
| @@ -393,7 +393,7 @@ static struct platform_driver ds1286_platform_driver = { | |||
| 393 | .owner = THIS_MODULE, | 393 | .owner = THIS_MODULE, |
| 394 | }, | 394 | }, |
| 395 | .probe = ds1286_probe, | 395 | .probe = ds1286_probe, |
| 396 | .remove = __devexit_p(ds1286_remove), | 396 | .remove = ds1286_remove, |
| 397 | }; | 397 | }; |
| 398 | 398 | ||
| 399 | module_platform_driver(ds1286_platform_driver); | 399 | module_platform_driver(ds1286_platform_driver); |
diff --git a/drivers/rtc/rtc-ds1302.c b/drivers/rtc/rtc-ds1302.c index f0d638922644..fdbcdb289d60 100644 --- a/drivers/rtc/rtc-ds1302.c +++ b/drivers/rtc/rtc-ds1302.c | |||
| @@ -234,7 +234,7 @@ static int __init ds1302_rtc_probe(struct platform_device *pdev) | |||
| 234 | return 0; | 234 | return 0; |
| 235 | } | 235 | } |
| 236 | 236 | ||
| 237 | static int __devexit ds1302_rtc_remove(struct platform_device *pdev) | 237 | static int ds1302_rtc_remove(struct platform_device *pdev) |
| 238 | { | 238 | { |
| 239 | struct rtc_device *rtc = platform_get_drvdata(pdev); | 239 | struct rtc_device *rtc = platform_get_drvdata(pdev); |
| 240 | 240 | ||
| @@ -249,7 +249,7 @@ static struct platform_driver ds1302_platform_driver = { | |||
| 249 | .name = DRV_NAME, | 249 | .name = DRV_NAME, |
| 250 | .owner = THIS_MODULE, | 250 | .owner = THIS_MODULE, |
| 251 | }, | 251 | }, |
| 252 | .remove = __devexit_p(ds1302_rtc_remove), | 252 | .remove = ds1302_rtc_remove, |
| 253 | }; | 253 | }; |
| 254 | 254 | ||
| 255 | static int __init ds1302_rtc_init(void) | 255 | static int __init ds1302_rtc_init(void) |
diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c index 686a865913e1..d578773f5ce2 100644 --- a/drivers/rtc/rtc-ds1305.c +++ b/drivers/rtc/rtc-ds1305.c | |||
| @@ -601,7 +601,7 @@ static struct bin_attribute nvram = { | |||
| 601 | * Interface to SPI stack | 601 | * Interface to SPI stack |
| 602 | */ | 602 | */ |
| 603 | 603 | ||
| 604 | static int __devinit ds1305_probe(struct spi_device *spi) | 604 | static int ds1305_probe(struct spi_device *spi) |
| 605 | { | 605 | { |
| 606 | struct ds1305 *ds1305; | 606 | struct ds1305 *ds1305; |
| 607 | int status; | 607 | int status; |
| @@ -787,7 +787,7 @@ fail0: | |||
| 787 | return status; | 787 | return status; |
| 788 | } | 788 | } |
| 789 | 789 | ||
| 790 | static int __devexit ds1305_remove(struct spi_device *spi) | 790 | static int ds1305_remove(struct spi_device *spi) |
| 791 | { | 791 | { |
| 792 | struct ds1305 *ds1305 = spi_get_drvdata(spi); | 792 | struct ds1305 *ds1305 = spi_get_drvdata(spi); |
| 793 | 793 | ||
| @@ -810,7 +810,7 @@ static struct spi_driver ds1305_driver = { | |||
| 810 | .driver.name = "rtc-ds1305", | 810 | .driver.name = "rtc-ds1305", |
| 811 | .driver.owner = THIS_MODULE, | 811 | .driver.owner = THIS_MODULE, |
| 812 | .probe = ds1305_probe, | 812 | .probe = ds1305_probe, |
| 813 | .remove = __devexit_p(ds1305_remove), | 813 | .remove = ds1305_remove, |
| 814 | /* REVISIT add suspend/resume */ | 814 | /* REVISIT add suspend/resume */ |
| 815 | }; | 815 | }; |
| 816 | 816 | ||
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 836710ce750e..e0d0ba4de03f 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c | |||
| @@ -617,8 +617,8 @@ ds1307_nvram_write(struct file *filp, struct kobject *kobj, | |||
| 617 | 617 | ||
| 618 | /*----------------------------------------------------------------------*/ | 618 | /*----------------------------------------------------------------------*/ |
| 619 | 619 | ||
| 620 | static int __devinit ds1307_probe(struct i2c_client *client, | 620 | static int ds1307_probe(struct i2c_client *client, |
| 621 | const struct i2c_device_id *id) | 621 | const struct i2c_device_id *id) |
| 622 | { | 622 | { |
| 623 | struct ds1307 *ds1307; | 623 | struct ds1307 *ds1307; |
| 624 | int err = -ENODEV; | 624 | int err = -ENODEV; |
| @@ -938,7 +938,7 @@ exit_free: | |||
| 938 | return err; | 938 | return err; |
| 939 | } | 939 | } |
| 940 | 940 | ||
| 941 | static int __devexit ds1307_remove(struct i2c_client *client) | 941 | static int ds1307_remove(struct i2c_client *client) |
| 942 | { | 942 | { |
| 943 | struct ds1307 *ds1307 = i2c_get_clientdata(client); | 943 | struct ds1307 *ds1307 = i2c_get_clientdata(client); |
| 944 | 944 | ||
| @@ -963,7 +963,7 @@ static struct i2c_driver ds1307_driver = { | |||
| 963 | .owner = THIS_MODULE, | 963 | .owner = THIS_MODULE, |
| 964 | }, | 964 | }, |
| 965 | .probe = ds1307_probe, | 965 | .probe = ds1307_probe, |
| 966 | .remove = __devexit_p(ds1307_remove), | 966 | .remove = ds1307_remove, |
| 967 | .id_table = ds1307_id, | 967 | .id_table = ds1307_id, |
| 968 | }; | 968 | }; |
| 969 | 969 | ||
diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c index 966316088b7f..fef76868aae0 100644 --- a/drivers/rtc/rtc-ds1374.c +++ b/drivers/rtc/rtc-ds1374.c | |||
| @@ -391,7 +391,7 @@ out_free: | |||
| 391 | return ret; | 391 | return ret; |
| 392 | } | 392 | } |
| 393 | 393 | ||
| 394 | static int __devexit ds1374_remove(struct i2c_client *client) | 394 | static int ds1374_remove(struct i2c_client *client) |
| 395 | { | 395 | { |
| 396 | struct ds1374 *ds1374 = i2c_get_clientdata(client); | 396 | struct ds1374 *ds1374 = i2c_get_clientdata(client); |
| 397 | 397 | ||
| @@ -442,7 +442,7 @@ static struct i2c_driver ds1374_driver = { | |||
| 442 | .pm = DS1374_PM, | 442 | .pm = DS1374_PM, |
| 443 | }, | 443 | }, |
| 444 | .probe = ds1374_probe, | 444 | .probe = ds1374_probe, |
| 445 | .remove = __devexit_p(ds1374_remove), | 445 | .remove = ds1374_remove, |
| 446 | .id_table = ds1374_id, | 446 | .id_table = ds1374_id, |
| 447 | }; | 447 | }; |
| 448 | 448 | ||
diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c index b0a99e1b25be..f994257981a0 100644 --- a/drivers/rtc/rtc-ds1390.c +++ b/drivers/rtc/rtc-ds1390.c | |||
| @@ -121,7 +121,7 @@ static const struct rtc_class_ops ds1390_rtc_ops = { | |||
| 121 | .set_time = ds1390_set_time, | 121 | .set_time = ds1390_set_time, |
| 122 | }; | 122 | }; |
| 123 | 123 | ||
| 124 | static int __devinit ds1390_probe(struct spi_device *spi) | 124 | static int ds1390_probe(struct spi_device *spi) |
| 125 | { | 125 | { |
| 126 | unsigned char tmp; | 126 | unsigned char tmp; |
| 127 | struct ds1390 *chip; | 127 | struct ds1390 *chip; |
| @@ -156,7 +156,7 @@ static int __devinit ds1390_probe(struct spi_device *spi) | |||
| 156 | return res; | 156 | return res; |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | static int __devexit ds1390_remove(struct spi_device *spi) | 159 | static int ds1390_remove(struct spi_device *spi) |
| 160 | { | 160 | { |
| 161 | struct ds1390 *chip = spi_get_drvdata(spi); | 161 | struct ds1390 *chip = spi_get_drvdata(spi); |
| 162 | 162 | ||
| @@ -172,7 +172,7 @@ static struct spi_driver ds1390_driver = { | |||
| 172 | .owner = THIS_MODULE, | 172 | .owner = THIS_MODULE, |
| 173 | }, | 173 | }, |
| 174 | .probe = ds1390_probe, | 174 | .probe = ds1390_probe, |
| 175 | .remove = __devexit_p(ds1390_remove), | 175 | .remove = ds1390_remove, |
| 176 | }; | 176 | }; |
| 177 | 177 | ||
| 178 | module_spi_driver(ds1390_driver); | 178 | module_spi_driver(ds1390_driver); |
diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c index 1f675f5294f5..6a3fcfe3b0e7 100644 --- a/drivers/rtc/rtc-ds1511.c +++ b/drivers/rtc/rtc-ds1511.c | |||
| @@ -476,8 +476,7 @@ static struct bin_attribute ds1511_nvram_attr = { | |||
| 476 | .write = ds1511_nvram_write, | 476 | .write = ds1511_nvram_write, |
| 477 | }; | 477 | }; |
| 478 | 478 | ||
| 479 | static int __devinit | 479 | static int ds1511_rtc_probe(struct platform_device *pdev) |
| 480 | ds1511_rtc_probe(struct platform_device *pdev) | ||
| 481 | { | 480 | { |
| 482 | struct rtc_device *rtc; | 481 | struct rtc_device *rtc; |
| 483 | struct resource *res; | 482 | struct resource *res; |
| @@ -551,8 +550,7 @@ ds1511_rtc_probe(struct platform_device *pdev) | |||
| 551 | return ret; | 550 | return ret; |
| 552 | } | 551 | } |
| 553 | 552 | ||
| 554 | static int __devexit | 553 | static int ds1511_rtc_remove(struct platform_device *pdev) |
| 555 | ds1511_rtc_remove(struct platform_device *pdev) | ||
| 556 | { | 554 | { |
| 557 | struct rtc_plat_data *pdata = platform_get_drvdata(pdev); | 555 | struct rtc_plat_data *pdata = platform_get_drvdata(pdev); |
| 558 | 556 | ||
| @@ -573,7 +571,7 @@ MODULE_ALIAS("platform:ds1511"); | |||
| 573 | 571 | ||
| 574 | static struct platform_driver ds1511_rtc_driver = { | 572 | static struct platform_driver ds1511_rtc_driver = { |
| 575 | .probe = ds1511_rtc_probe, | 573 | .probe = ds1511_rtc_probe, |
| 576 | .remove = __devexit_p(ds1511_rtc_remove), | 574 | .remove = ds1511_rtc_remove, |
| 577 | .driver = { | 575 | .driver = { |
| 578 | .name = "ds1511", | 576 | .name = "ds1511", |
| 579 | .owner = THIS_MODULE, | 577 | .owner = THIS_MODULE, |
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c index 6ccedbbf923c..25ce0621ade9 100644 --- a/drivers/rtc/rtc-ds1553.c +++ b/drivers/rtc/rtc-ds1553.c | |||
| @@ -276,7 +276,7 @@ static struct bin_attribute ds1553_nvram_attr = { | |||
| 276 | .write = ds1553_nvram_write, | 276 | .write = ds1553_nvram_write, |
| 277 | }; | 277 | }; |
| 278 | 278 | ||
| 279 | static int __devinit ds1553_rtc_probe(struct platform_device *pdev) | 279 | static int ds1553_rtc_probe(struct platform_device *pdev) |
| 280 | { | 280 | { |
| 281 | struct rtc_device *rtc; | 281 | struct rtc_device *rtc; |
| 282 | struct resource *res; | 282 | struct resource *res; |
| @@ -338,7 +338,7 @@ static int __devinit ds1553_rtc_probe(struct platform_device *pdev) | |||
| 338 | return ret; | 338 | return ret; |
| 339 | } | 339 | } |
| 340 | 340 | ||
| 341 | static int __devexit ds1553_rtc_remove(struct platform_device *pdev) | 341 | static int ds1553_rtc_remove(struct platform_device *pdev) |
| 342 | { | 342 | { |
| 343 | struct rtc_plat_data *pdata = platform_get_drvdata(pdev); | 343 | struct rtc_plat_data *pdata = platform_get_drvdata(pdev); |
| 344 | 344 | ||
| @@ -354,7 +354,7 @@ MODULE_ALIAS("platform:rtc-ds1553"); | |||
| 354 | 354 | ||
| 355 | static struct platform_driver ds1553_rtc_driver = { | 355 | static struct platform_driver ds1553_rtc_driver = { |
| 356 | .probe = ds1553_rtc_probe, | 356 | .probe = ds1553_rtc_probe, |
| 357 | .remove = __devexit_p(ds1553_rtc_remove), | 357 | .remove = ds1553_rtc_remove, |
| 358 | .driver = { | 358 | .driver = { |
| 359 | .name = "rtc-ds1553", | 359 | .name = "rtc-ds1553", |
| 360 | .owner = THIS_MODULE, | 360 | .owner = THIS_MODULE, |
diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c index 76112667c507..609c870e2cc5 100644 --- a/drivers/rtc/rtc-ds1742.c +++ b/drivers/rtc/rtc-ds1742.c | |||
| @@ -159,7 +159,7 @@ static ssize_t ds1742_nvram_write(struct file *filp, struct kobject *kobj, | |||
| 159 | return count; | 159 | return count; |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | static int __devinit ds1742_rtc_probe(struct platform_device *pdev) | 162 | static int ds1742_rtc_probe(struct platform_device *pdev) |
| 163 | { | 163 | { |
| 164 | struct rtc_device *rtc; | 164 | struct rtc_device *rtc; |
| 165 | struct resource *res; | 165 | struct resource *res; |
| @@ -222,7 +222,7 @@ static int __devinit ds1742_rtc_probe(struct platform_device *pdev) | |||
| 222 | return ret; | 222 | return ret; |
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | static int __devexit ds1742_rtc_remove(struct platform_device *pdev) | 225 | static int ds1742_rtc_remove(struct platform_device *pdev) |
| 226 | { | 226 | { |
| 227 | struct rtc_plat_data *pdata = platform_get_drvdata(pdev); | 227 | struct rtc_plat_data *pdata = platform_get_drvdata(pdev); |
| 228 | 228 | ||
| @@ -233,7 +233,7 @@ static int __devexit ds1742_rtc_remove(struct platform_device *pdev) | |||
| 233 | 233 | ||
| 234 | static struct platform_driver ds1742_rtc_driver = { | 234 | static struct platform_driver ds1742_rtc_driver = { |
| 235 | .probe = ds1742_rtc_probe, | 235 | .probe = ds1742_rtc_probe, |
| 236 | .remove = __devexit_p(ds1742_rtc_remove), | 236 | .remove = ds1742_rtc_remove, |
| 237 | .driver = { | 237 | .driver = { |
| 238 | .name = "rtc-ds1742", | 238 | .name = "rtc-ds1742", |
| 239 | .owner = THIS_MODULE, | 239 | .owner = THIS_MODULE, |
diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index e1945095814e..db0ca08db315 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c | |||
| @@ -391,8 +391,8 @@ static const struct rtc_class_ops ds3232_rtc_ops = { | |||
| 391 | .alarm_irq_enable = ds3232_alarm_irq_enable, | 391 | .alarm_irq_enable = ds3232_alarm_irq_enable, |
| 392 | }; | 392 | }; |
| 393 | 393 | ||
| 394 | static int __devinit ds3232_probe(struct i2c_client *client, | 394 | static int ds3232_probe(struct i2c_client *client, |
| 395 | const struct i2c_device_id *id) | 395 | const struct i2c_device_id *id) |
| 396 | { | 396 | { |
| 397 | struct ds3232 *ds3232; | 397 | struct ds3232 *ds3232; |
| 398 | int ret; | 398 | int ret; |
| @@ -439,7 +439,7 @@ out_free: | |||
| 439 | return ret; | 439 | return ret; |
| 440 | } | 440 | } |
| 441 | 441 | ||
| 442 | static int __devexit ds3232_remove(struct i2c_client *client) | 442 | static int ds3232_remove(struct i2c_client *client) |
| 443 | { | 443 | { |
| 444 | struct ds3232 *ds3232 = i2c_get_clientdata(client); | 444 | struct ds3232 *ds3232 = i2c_get_clientdata(client); |
| 445 | 445 | ||
| @@ -469,7 +469,7 @@ static struct i2c_driver ds3232_driver = { | |||
| 469 | .owner = THIS_MODULE, | 469 | .owner = THIS_MODULE, |
| 470 | }, | 470 | }, |
| 471 | .probe = ds3232_probe, | 471 | .probe = ds3232_probe, |
| 472 | .remove = __devexit_p(ds3232_remove), | 472 | .remove = ds3232_remove, |
| 473 | .id_table = ds3232_id, | 473 | .id_table = ds3232_id, |
| 474 | }; | 474 | }; |
| 475 | 475 | ||
diff --git a/drivers/rtc/rtc-ds3234.c b/drivers/rtc/rtc-ds3234.c index fda707926f02..7a4495ef1c39 100644 --- a/drivers/rtc/rtc-ds3234.c +++ b/drivers/rtc/rtc-ds3234.c | |||
| @@ -105,7 +105,7 @@ static const struct rtc_class_ops ds3234_rtc_ops = { | |||
| 105 | .set_time = ds3234_set_time, | 105 | .set_time = ds3234_set_time, |
| 106 | }; | 106 | }; |
| 107 | 107 | ||
| 108 | static int __devinit ds3234_probe(struct spi_device *spi) | 108 | static int ds3234_probe(struct spi_device *spi) |
| 109 | { | 109 | { |
| 110 | struct rtc_device *rtc; | 110 | struct rtc_device *rtc; |
| 111 | unsigned char tmp; | 111 | unsigned char tmp; |
| @@ -156,7 +156,7 @@ static int __devinit ds3234_probe(struct spi_device *spi) | |||
| 156 | return 0; | 156 | return 0; |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | static int __devexit ds3234_remove(struct spi_device *spi) | 159 | static int ds3234_remove(struct spi_device *spi) |
| 160 | { | 160 | { |
| 161 | struct rtc_device *rtc = spi_get_drvdata(spi); | 161 | struct rtc_device *rtc = spi_get_drvdata(spi); |
| 162 | 162 | ||
| @@ -170,7 +170,7 @@ static struct spi_driver ds3234_driver = { | |||
| 170 | .owner = THIS_MODULE, | 170 | .owner = THIS_MODULE, |
| 171 | }, | 171 | }, |
| 172 | .probe = ds3234_probe, | 172 | .probe = ds3234_probe, |
| 173 | .remove = __devexit_p(ds3234_remove), | 173 | .remove = ds3234_remove, |
| 174 | }; | 174 | }; |
| 175 | 175 | ||
| 176 | module_spi_driver(ds3234_driver); | 176 | module_spi_driver(ds3234_driver); |
diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c index 9602278ff988..1a4e5e4a70cd 100644 --- a/drivers/rtc/rtc-ep93xx.c +++ b/drivers/rtc/rtc-ep93xx.c | |||
| @@ -127,7 +127,7 @@ static const struct attribute_group ep93xx_rtc_sysfs_files = { | |||
| 127 | .attrs = ep93xx_rtc_attrs, | 127 | .attrs = ep93xx_rtc_attrs, |
| 128 | }; | 128 | }; |
| 129 | 129 | ||
| 130 | static int __devinit ep93xx_rtc_probe(struct platform_device *pdev) | 130 | static int ep93xx_rtc_probe(struct platform_device *pdev) |
| 131 | { | 131 | { |
| 132 | struct ep93xx_rtc *ep93xx_rtc; | 132 | struct ep93xx_rtc *ep93xx_rtc; |
| 133 | struct resource *res; | 133 | struct resource *res; |
| @@ -174,7 +174,7 @@ exit: | |||
| 174 | return err; | 174 | return err; |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | static int __devexit ep93xx_rtc_remove(struct platform_device *pdev) | 177 | static int ep93xx_rtc_remove(struct platform_device *pdev) |
| 178 | { | 178 | { |
| 179 | struct ep93xx_rtc *ep93xx_rtc = platform_get_drvdata(pdev); | 179 | struct ep93xx_rtc *ep93xx_rtc = platform_get_drvdata(pdev); |
| 180 | 180 | ||
| @@ -192,7 +192,7 @@ static struct platform_driver ep93xx_rtc_driver = { | |||
| 192 | .owner = THIS_MODULE, | 192 | .owner = THIS_MODULE, |
| 193 | }, | 193 | }, |
| 194 | .probe = ep93xx_rtc_probe, | 194 | .probe = ep93xx_rtc_probe, |
| 195 | .remove = __devexit_p(ep93xx_rtc_remove), | 195 | .remove = ep93xx_rtc_remove, |
| 196 | }; | 196 | }; |
| 197 | 197 | ||
| 198 | module_platform_driver(ep93xx_rtc_driver); | 198 | module_platform_driver(ep93xx_rtc_driver); |
diff --git a/drivers/rtc/rtc-fm3130.c b/drivers/rtc/rtc-fm3130.c index 86b6ecce99f0..04e93c6597f8 100644 --- a/drivers/rtc/rtc-fm3130.c +++ b/drivers/rtc/rtc-fm3130.c | |||
| @@ -361,8 +361,8 @@ static const struct rtc_class_ops fm3130_rtc_ops = { | |||
| 361 | 361 | ||
| 362 | static struct i2c_driver fm3130_driver; | 362 | static struct i2c_driver fm3130_driver; |
| 363 | 363 | ||
| 364 | static int __devinit fm3130_probe(struct i2c_client *client, | 364 | static int fm3130_probe(struct i2c_client *client, |
| 365 | const struct i2c_device_id *id) | 365 | const struct i2c_device_id *id) |
| 366 | { | 366 | { |
| 367 | struct fm3130 *fm3130; | 367 | struct fm3130 *fm3130; |
| 368 | int err = -ENODEV; | 368 | int err = -ENODEV; |
| @@ -546,7 +546,7 @@ exit_free: | |||
| 546 | return err; | 546 | return err; |
| 547 | } | 547 | } |
| 548 | 548 | ||
| 549 | static int __devexit fm3130_remove(struct i2c_client *client) | 549 | static int fm3130_remove(struct i2c_client *client) |
| 550 | { | 550 | { |
| 551 | struct fm3130 *fm3130 = i2c_get_clientdata(client); | 551 | struct fm3130 *fm3130 = i2c_get_clientdata(client); |
| 552 | 552 | ||
| @@ -561,7 +561,7 @@ static struct i2c_driver fm3130_driver = { | |||
| 561 | .owner = THIS_MODULE, | 561 | .owner = THIS_MODULE, |
| 562 | }, | 562 | }, |
| 563 | .probe = fm3130_probe, | 563 | .probe = fm3130_probe, |
| 564 | .remove = __devexit_p(fm3130_remove), | 564 | .remove = fm3130_remove, |
| 565 | .id_table = fm3130_id, | 565 | .id_table = fm3130_id, |
| 566 | }; | 566 | }; |
| 567 | 567 | ||
diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c index 8da7a5cf83c6..75d307ab37f4 100644 --- a/drivers/rtc/rtc-imxdi.c +++ b/drivers/rtc/rtc-imxdi.c | |||
| @@ -480,7 +480,7 @@ err: | |||
| 480 | return rc; | 480 | return rc; |
| 481 | } | 481 | } |
| 482 | 482 | ||
| 483 | static int __devexit dryice_rtc_remove(struct platform_device *pdev) | 483 | static int dryice_rtc_remove(struct platform_device *pdev) |
| 484 | { | 484 | { |
| 485 | struct imxdi_dev *imxdi = platform_get_drvdata(pdev); | 485 | struct imxdi_dev *imxdi = platform_get_drvdata(pdev); |
| 486 | 486 | ||
| @@ -512,7 +512,7 @@ static struct platform_driver dryice_rtc_driver = { | |||
| 512 | .owner = THIS_MODULE, | 512 | .owner = THIS_MODULE, |
| 513 | .of_match_table = of_match_ptr(dryice_dt_ids), | 513 | .of_match_table = of_match_ptr(dryice_dt_ids), |
| 514 | }, | 514 | }, |
| 515 | .remove = __devexit_p(dryice_rtc_remove), | 515 | .remove = dryice_rtc_remove, |
| 516 | }; | 516 | }; |
| 517 | 517 | ||
| 518 | static int __init dryice_rtc_init(void) | 518 | static int __init dryice_rtc_init(void) |
diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c index 1224182d3eab..1e48686ca6d2 100644 --- a/drivers/rtc/rtc-jz4740.c +++ b/drivers/rtc/rtc-jz4740.c | |||
| @@ -210,7 +210,7 @@ void jz4740_rtc_poweroff(struct device *dev) | |||
| 210 | } | 210 | } |
| 211 | EXPORT_SYMBOL_GPL(jz4740_rtc_poweroff); | 211 | EXPORT_SYMBOL_GPL(jz4740_rtc_poweroff); |
| 212 | 212 | ||
| 213 | static int __devinit jz4740_rtc_probe(struct platform_device *pdev) | 213 | static int jz4740_rtc_probe(struct platform_device *pdev) |
| 214 | { | 214 | { |
| 215 | int ret; | 215 | int ret; |
| 216 | struct jz4740_rtc *rtc; | 216 | struct jz4740_rtc *rtc; |
| @@ -297,7 +297,7 @@ err_free: | |||
| 297 | return ret; | 297 | return ret; |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | static int __devexit jz4740_rtc_remove(struct platform_device *pdev) | 300 | static int jz4740_rtc_remove(struct platform_device *pdev) |
| 301 | { | 301 | { |
| 302 | struct jz4740_rtc *rtc = platform_get_drvdata(pdev); | 302 | struct jz4740_rtc *rtc = platform_get_drvdata(pdev); |
| 303 | 303 | ||
| @@ -347,7 +347,7 @@ static const struct dev_pm_ops jz4740_pm_ops = { | |||
| 347 | 347 | ||
| 348 | static struct platform_driver jz4740_rtc_driver = { | 348 | static struct platform_driver jz4740_rtc_driver = { |
| 349 | .probe = jz4740_rtc_probe, | 349 | .probe = jz4740_rtc_probe, |
| 350 | .remove = __devexit_p(jz4740_rtc_remove), | 350 | .remove = jz4740_rtc_remove, |
| 351 | .driver = { | 351 | .driver = { |
| 352 | .name = "jz4740-rtc", | 352 | .name = "jz4740-rtc", |
| 353 | .owner = THIS_MODULE, | 353 | .owner = THIS_MODULE, |
diff --git a/drivers/rtc/rtc-lpc32xx.c b/drivers/rtc/rtc-lpc32xx.c index d5218553741f..40a598332bac 100644 --- a/drivers/rtc/rtc-lpc32xx.c +++ b/drivers/rtc/rtc-lpc32xx.c | |||
| @@ -197,7 +197,7 @@ static const struct rtc_class_ops lpc32xx_rtc_ops = { | |||
| 197 | .alarm_irq_enable = lpc32xx_rtc_alarm_irq_enable, | 197 | .alarm_irq_enable = lpc32xx_rtc_alarm_irq_enable, |
| 198 | }; | 198 | }; |
| 199 | 199 | ||
| 200 | static int __devinit lpc32xx_rtc_probe(struct platform_device *pdev) | 200 | static int lpc32xx_rtc_probe(struct platform_device *pdev) |
| 201 | { | 201 | { |
| 202 | struct resource *res; | 202 | struct resource *res; |
| 203 | struct lpc32xx_rtc *rtc; | 203 | struct lpc32xx_rtc *rtc; |
| @@ -299,7 +299,7 @@ static int __devinit lpc32xx_rtc_probe(struct platform_device *pdev) | |||
| 299 | return 0; | 299 | return 0; |
| 300 | } | 300 | } |
| 301 | 301 | ||
| 302 | static int __devexit lpc32xx_rtc_remove(struct platform_device *pdev) | 302 | static int lpc32xx_rtc_remove(struct platform_device *pdev) |
| 303 | { | 303 | { |
| 304 | struct lpc32xx_rtc *rtc = platform_get_drvdata(pdev); | 304 | struct lpc32xx_rtc *rtc = platform_get_drvdata(pdev); |
| 305 | 305 | ||
| @@ -397,7 +397,7 @@ MODULE_DEVICE_TABLE(of, lpc32xx_rtc_match); | |||
| 397 | 397 | ||
| 398 | static struct platform_driver lpc32xx_rtc_driver = { | 398 | static struct platform_driver lpc32xx_rtc_driver = { |
| 399 | .probe = lpc32xx_rtc_probe, | 399 | .probe = lpc32xx_rtc_probe, |
| 400 | .remove = __devexit_p(lpc32xx_rtc_remove), | 400 | .remove = lpc32xx_rtc_remove, |
| 401 | .driver = { | 401 | .driver = { |
| 402 | .name = RTC_NAME, | 402 | .name = RTC_NAME, |
| 403 | .owner = THIS_MODULE, | 403 | .owner = THIS_MODULE, |
diff --git a/drivers/rtc/rtc-ls1x.c b/drivers/rtc/rtc-ls1x.c index 07e81c5f8247..f59b6349551a 100644 --- a/drivers/rtc/rtc-ls1x.c +++ b/drivers/rtc/rtc-ls1x.c | |||
| @@ -143,7 +143,7 @@ static struct rtc_class_ops ls1x_rtc_ops = { | |||
| 143 | .set_time = ls1x_rtc_set_time, | 143 | .set_time = ls1x_rtc_set_time, |
| 144 | }; | 144 | }; |
| 145 | 145 | ||
| 146 | static int __devinit ls1x_rtc_probe(struct platform_device *pdev) | 146 | static int ls1x_rtc_probe(struct platform_device *pdev) |
| 147 | { | 147 | { |
| 148 | struct rtc_device *rtcdev; | 148 | struct rtc_device *rtcdev; |
| 149 | unsigned long v; | 149 | unsigned long v; |
| @@ -185,7 +185,7 @@ err: | |||
| 185 | return ret; | 185 | return ret; |
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | static int __devexit ls1x_rtc_remove(struct platform_device *pdev) | 188 | static int ls1x_rtc_remove(struct platform_device *pdev) |
| 189 | { | 189 | { |
| 190 | struct rtc_device *rtcdev = platform_get_drvdata(pdev); | 190 | struct rtc_device *rtcdev = platform_get_drvdata(pdev); |
| 191 | 191 | ||
| @@ -200,7 +200,7 @@ static struct platform_driver ls1x_rtc_driver = { | |||
| 200 | .name = "ls1x-rtc", | 200 | .name = "ls1x-rtc", |
| 201 | .owner = THIS_MODULE, | 201 | .owner = THIS_MODULE, |
| 202 | }, | 202 | }, |
| 203 | .remove = __devexit_p(ls1x_rtc_remove), | 203 | .remove = ls1x_rtc_remove, |
| 204 | .probe = ls1x_rtc_probe, | 204 | .probe = ls1x_rtc_probe, |
| 205 | }; | 205 | }; |
| 206 | 206 | ||
diff --git a/drivers/rtc/rtc-m41t93.c b/drivers/rtc/rtc-m41t93.c index efab3d48cb15..49169680786e 100644 --- a/drivers/rtc/rtc-m41t93.c +++ b/drivers/rtc/rtc-m41t93.c | |||
| @@ -170,7 +170,7 @@ static const struct rtc_class_ops m41t93_rtc_ops = { | |||
| 170 | 170 | ||
| 171 | static struct spi_driver m41t93_driver; | 171 | static struct spi_driver m41t93_driver; |
| 172 | 172 | ||
| 173 | static int __devinit m41t93_probe(struct spi_device *spi) | 173 | static int m41t93_probe(struct spi_device *spi) |
| 174 | { | 174 | { |
| 175 | struct rtc_device *rtc; | 175 | struct rtc_device *rtc; |
| 176 | int res; | 176 | int res; |
| @@ -195,7 +195,7 @@ static int __devinit m41t93_probe(struct spi_device *spi) | |||
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | 197 | ||
| 198 | static int __devexit m41t93_remove(struct spi_device *spi) | 198 | static int m41t93_remove(struct spi_device *spi) |
| 199 | { | 199 | { |
| 200 | struct rtc_device *rtc = spi_get_drvdata(spi); | 200 | struct rtc_device *rtc = spi_get_drvdata(spi); |
| 201 | 201 | ||
| @@ -211,7 +211,7 @@ static struct spi_driver m41t93_driver = { | |||
| 211 | .owner = THIS_MODULE, | 211 | .owner = THIS_MODULE, |
| 212 | }, | 212 | }, |
| 213 | .probe = m41t93_probe, | 213 | .probe = m41t93_probe, |
| 214 | .remove = __devexit_p(m41t93_remove), | 214 | .remove = m41t93_remove, |
| 215 | }; | 215 | }; |
| 216 | 216 | ||
| 217 | module_spi_driver(m41t93_driver); | 217 | module_spi_driver(m41t93_driver); |
diff --git a/drivers/rtc/rtc-m41t94.c b/drivers/rtc/rtc-m41t94.c index 6e78193e026b..89266c6764bc 100644 --- a/drivers/rtc/rtc-m41t94.c +++ b/drivers/rtc/rtc-m41t94.c | |||
| @@ -110,7 +110,7 @@ static const struct rtc_class_ops m41t94_rtc_ops = { | |||
| 110 | 110 | ||
| 111 | static struct spi_driver m41t94_driver; | 111 | static struct spi_driver m41t94_driver; |
| 112 | 112 | ||
| 113 | static int __devinit m41t94_probe(struct spi_device *spi) | 113 | static int m41t94_probe(struct spi_device *spi) |
| 114 | { | 114 | { |
| 115 | struct rtc_device *rtc; | 115 | struct rtc_device *rtc; |
| 116 | int res; | 116 | int res; |
| @@ -134,7 +134,7 @@ static int __devinit m41t94_probe(struct spi_device *spi) | |||
| 134 | return 0; | 134 | return 0; |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | static int __devexit m41t94_remove(struct spi_device *spi) | 137 | static int m41t94_remove(struct spi_device *spi) |
| 138 | { | 138 | { |
| 139 | struct rtc_device *rtc = spi_get_drvdata(spi); | 139 | struct rtc_device *rtc = spi_get_drvdata(spi); |
| 140 | 140 | ||
| @@ -150,7 +150,7 @@ static struct spi_driver m41t94_driver = { | |||
| 150 | .owner = THIS_MODULE, | 150 | .owner = THIS_MODULE, |
| 151 | }, | 151 | }, |
| 152 | .probe = m41t94_probe, | 152 | .probe = m41t94_probe, |
| 153 | .remove = __devexit_p(m41t94_remove), | 153 | .remove = m41t94_remove, |
| 154 | }; | 154 | }; |
| 155 | 155 | ||
| 156 | module_spi_driver(m41t94_driver); | 156 | module_spi_driver(m41t94_driver); |
diff --git a/drivers/rtc/rtc-m48t35.c b/drivers/rtc/rtc-m48t35.c index f9e3b3583733..31c9190a1fcb 100644 --- a/drivers/rtc/rtc-m48t35.c +++ b/drivers/rtc/rtc-m48t35.c | |||
| @@ -141,7 +141,7 @@ static const struct rtc_class_ops m48t35_ops = { | |||
| 141 | .set_time = m48t35_set_time, | 141 | .set_time = m48t35_set_time, |
| 142 | }; | 142 | }; |
| 143 | 143 | ||
| 144 | static int __devinit m48t35_probe(struct platform_device *pdev) | 144 | static int m48t35_probe(struct platform_device *pdev) |
| 145 | { | 145 | { |
| 146 | struct resource *res; | 146 | struct resource *res; |
| 147 | struct m48t35_priv *priv; | 147 | struct m48t35_priv *priv; |
| @@ -194,7 +194,7 @@ out: | |||
| 194 | return ret; | 194 | return ret; |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | static int __devexit m48t35_remove(struct platform_device *pdev) | 197 | static int m48t35_remove(struct platform_device *pdev) |
| 198 | { | 198 | { |
| 199 | struct m48t35_priv *priv = platform_get_drvdata(pdev); | 199 | struct m48t35_priv *priv = platform_get_drvdata(pdev); |
| 200 | 200 | ||
| @@ -213,7 +213,7 @@ static struct platform_driver m48t35_platform_driver = { | |||
| 213 | .owner = THIS_MODULE, | 213 | .owner = THIS_MODULE, |
| 214 | }, | 214 | }, |
| 215 | .probe = m48t35_probe, | 215 | .probe = m48t35_probe, |
| 216 | .remove = __devexit_p(m48t35_remove), | 216 | .remove = m48t35_remove, |
| 217 | }; | 217 | }; |
| 218 | 218 | ||
| 219 | module_platform_driver(m48t35_platform_driver); | 219 | module_platform_driver(m48t35_platform_driver); |
diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c index 30ebfec9fd2b..130f29af3869 100644 --- a/drivers/rtc/rtc-m48t59.c +++ b/drivers/rtc/rtc-m48t59.c | |||
| @@ -383,7 +383,7 @@ static struct bin_attribute m48t59_nvram_attr = { | |||
| 383 | .write = m48t59_nvram_write, | 383 | .write = m48t59_nvram_write, |
| 384 | }; | 384 | }; |
| 385 | 385 | ||
| 386 | static int __devinit m48t59_rtc_probe(struct platform_device *pdev) | 386 | static int m48t59_rtc_probe(struct platform_device *pdev) |
| 387 | { | 387 | { |
| 388 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; | 388 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; |
| 389 | struct m48t59_private *m48t59 = NULL; | 389 | struct m48t59_private *m48t59 = NULL; |
| @@ -501,7 +501,7 @@ out: | |||
| 501 | return ret; | 501 | return ret; |
| 502 | } | 502 | } |
| 503 | 503 | ||
| 504 | static int __devexit m48t59_rtc_remove(struct platform_device *pdev) | 504 | static int m48t59_rtc_remove(struct platform_device *pdev) |
| 505 | { | 505 | { |
| 506 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); | 506 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); |
| 507 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; | 507 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; |
| @@ -527,7 +527,7 @@ static struct platform_driver m48t59_rtc_driver = { | |||
| 527 | .owner = THIS_MODULE, | 527 | .owner = THIS_MODULE, |
| 528 | }, | 528 | }, |
| 529 | .probe = m48t59_rtc_probe, | 529 | .probe = m48t59_rtc_probe, |
| 530 | .remove = __devexit_p(m48t59_rtc_remove), | 530 | .remove = m48t59_rtc_remove, |
| 531 | }; | 531 | }; |
| 532 | 532 | ||
| 533 | module_platform_driver(m48t59_rtc_driver); | 533 | module_platform_driver(m48t59_rtc_driver); |
diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c index 863fb3363aa6..2ffbcacd2439 100644 --- a/drivers/rtc/rtc-m48t86.c +++ b/drivers/rtc/rtc-m48t86.c | |||
| @@ -144,7 +144,7 @@ static const struct rtc_class_ops m48t86_rtc_ops = { | |||
| 144 | .proc = m48t86_rtc_proc, | 144 | .proc = m48t86_rtc_proc, |
| 145 | }; | 145 | }; |
| 146 | 146 | ||
| 147 | static int __devinit m48t86_rtc_probe(struct platform_device *dev) | 147 | static int m48t86_rtc_probe(struct platform_device *dev) |
| 148 | { | 148 | { |
| 149 | unsigned char reg; | 149 | unsigned char reg; |
| 150 | struct m48t86_ops *ops = dev->dev.platform_data; | 150 | struct m48t86_ops *ops = dev->dev.platform_data; |
| @@ -164,7 +164,7 @@ static int __devinit m48t86_rtc_probe(struct platform_device *dev) | |||
| 164 | return 0; | 164 | return 0; |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | static int __devexit m48t86_rtc_remove(struct platform_device *dev) | 167 | static int m48t86_rtc_remove(struct platform_device *dev) |
| 168 | { | 168 | { |
| 169 | struct rtc_device *rtc = platform_get_drvdata(dev); | 169 | struct rtc_device *rtc = platform_get_drvdata(dev); |
| 170 | 170 | ||
| @@ -182,7 +182,7 @@ static struct platform_driver m48t86_rtc_platform_driver = { | |||
| 182 | .owner = THIS_MODULE, | 182 | .owner = THIS_MODULE, |
| 183 | }, | 183 | }, |
| 184 | .probe = m48t86_rtc_probe, | 184 | .probe = m48t86_rtc_probe, |
| 185 | .remove = __devexit_p(m48t86_rtc_remove), | 185 | .remove = m48t86_rtc_remove, |
| 186 | }; | 186 | }; |
| 187 | 187 | ||
| 188 | module_platform_driver(m48t86_rtc_platform_driver); | 188 | module_platform_driver(m48t86_rtc_platform_driver); |
diff --git a/drivers/rtc/rtc-max6902.c b/drivers/rtc/rtc-max6902.c index 36c74d22e8b5..7d0bf698b79e 100644 --- a/drivers/rtc/rtc-max6902.c +++ b/drivers/rtc/rtc-max6902.c | |||
| @@ -120,7 +120,7 @@ static const struct rtc_class_ops max6902_rtc_ops = { | |||
| 120 | .set_time = max6902_set_time, | 120 | .set_time = max6902_set_time, |
| 121 | }; | 121 | }; |
| 122 | 122 | ||
| 123 | static int __devinit max6902_probe(struct spi_device *spi) | 123 | static int max6902_probe(struct spi_device *spi) |
| 124 | { | 124 | { |
| 125 | struct rtc_device *rtc; | 125 | struct rtc_device *rtc; |
| 126 | unsigned char tmp; | 126 | unsigned char tmp; |
| @@ -143,7 +143,7 @@ static int __devinit max6902_probe(struct spi_device *spi) | |||
| 143 | return 0; | 143 | return 0; |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | static int __devexit max6902_remove(struct spi_device *spi) | 146 | static int max6902_remove(struct spi_device *spi) |
| 147 | { | 147 | { |
| 148 | struct rtc_device *rtc = dev_get_drvdata(&spi->dev); | 148 | struct rtc_device *rtc = dev_get_drvdata(&spi->dev); |
| 149 | 149 | ||
| @@ -157,7 +157,7 @@ static struct spi_driver max6902_driver = { | |||
| 157 | .owner = THIS_MODULE, | 157 | .owner = THIS_MODULE, |
| 158 | }, | 158 | }, |
| 159 | .probe = max6902_probe, | 159 | .probe = max6902_probe, |
| 160 | .remove = __devexit_p(max6902_remove), | 160 | .remove = max6902_remove, |
| 161 | }; | 161 | }; |
| 162 | 162 | ||
| 163 | module_spi_driver(max6902_driver); | 163 | module_spi_driver(max6902_driver); |
diff --git a/drivers/rtc/rtc-max8907.c b/drivers/rtc/rtc-max8907.c index e094ffa434f8..1d049da16c85 100644 --- a/drivers/rtc/rtc-max8907.c +++ b/drivers/rtc/rtc-max8907.c | |||
| @@ -176,7 +176,7 @@ static const struct rtc_class_ops max8907_rtc_ops = { | |||
| 176 | .set_alarm = max8907_rtc_set_alarm, | 176 | .set_alarm = max8907_rtc_set_alarm, |
| 177 | }; | 177 | }; |
| 178 | 178 | ||
| 179 | static int __devinit max8907_rtc_probe(struct platform_device *pdev) | 179 | static int max8907_rtc_probe(struct platform_device *pdev) |
| 180 | { | 180 | { |
| 181 | struct max8907 *max8907 = dev_get_drvdata(pdev->dev.parent); | 181 | struct max8907 *max8907 = dev_get_drvdata(pdev->dev.parent); |
| 182 | struct max8907_rtc *rtc; | 182 | struct max8907_rtc *rtc; |
| @@ -220,7 +220,7 @@ err_unregister: | |||
| 220 | return ret; | 220 | return ret; |
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | static int __devexit max8907_rtc_remove(struct platform_device *pdev) | 223 | static int max8907_rtc_remove(struct platform_device *pdev) |
| 224 | { | 224 | { |
| 225 | struct max8907_rtc *rtc = platform_get_drvdata(pdev); | 225 | struct max8907_rtc *rtc = platform_get_drvdata(pdev); |
| 226 | 226 | ||
| @@ -236,7 +236,7 @@ static struct platform_driver max8907_rtc_driver = { | |||
| 236 | .owner = THIS_MODULE, | 236 | .owner = THIS_MODULE, |
| 237 | }, | 237 | }, |
| 238 | .probe = max8907_rtc_probe, | 238 | .probe = max8907_rtc_probe, |
| 239 | .remove = __devexit_p(max8907_rtc_remove), | 239 | .remove = max8907_rtc_remove, |
| 240 | }; | 240 | }; |
| 241 | module_platform_driver(max8907_rtc_driver); | 241 | module_platform_driver(max8907_rtc_driver); |
| 242 | 242 | ||
diff --git a/drivers/rtc/rtc-max8925.c b/drivers/rtc/rtc-max8925.c index 34e4349611db..a0c8265646d2 100644 --- a/drivers/rtc/rtc-max8925.c +++ b/drivers/rtc/rtc-max8925.c | |||
| @@ -247,7 +247,7 @@ static const struct rtc_class_ops max8925_rtc_ops = { | |||
| 247 | .set_alarm = max8925_rtc_set_alarm, | 247 | .set_alarm = max8925_rtc_set_alarm, |
| 248 | }; | 248 | }; |
| 249 | 249 | ||
| 250 | static int __devinit max8925_rtc_probe(struct platform_device *pdev) | 250 | static int max8925_rtc_probe(struct platform_device *pdev) |
| 251 | { | 251 | { |
| 252 | struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent); | 252 | struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent); |
| 253 | struct max8925_rtc_info *info; | 253 | struct max8925_rtc_info *info; |
| @@ -292,7 +292,7 @@ out_irq: | |||
| 292 | return ret; | 292 | return ret; |
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | static int __devexit max8925_rtc_remove(struct platform_device *pdev) | 295 | static int max8925_rtc_remove(struct platform_device *pdev) |
| 296 | { | 296 | { |
| 297 | struct max8925_rtc_info *info = platform_get_drvdata(pdev); | 297 | struct max8925_rtc_info *info = platform_get_drvdata(pdev); |
| 298 | 298 | ||
| @@ -334,7 +334,7 @@ static struct platform_driver max8925_rtc_driver = { | |||
| 334 | .pm = &max8925_rtc_pm_ops, | 334 | .pm = &max8925_rtc_pm_ops, |
| 335 | }, | 335 | }, |
| 336 | .probe = max8925_rtc_probe, | 336 | .probe = max8925_rtc_probe, |
| 337 | .remove = __devexit_p(max8925_rtc_remove), | 337 | .remove = max8925_rtc_remove, |
| 338 | }; | 338 | }; |
| 339 | 339 | ||
| 340 | module_platform_driver(max8925_rtc_driver); | 340 | module_platform_driver(max8925_rtc_driver); |
diff --git a/drivers/rtc/rtc-max8998.c b/drivers/rtc/rtc-max8998.c index 7196f438c089..8f234a075e8f 100644 --- a/drivers/rtc/rtc-max8998.c +++ b/drivers/rtc/rtc-max8998.c | |||
| @@ -249,7 +249,7 @@ static const struct rtc_class_ops max8998_rtc_ops = { | |||
| 249 | .alarm_irq_enable = max8998_rtc_alarm_irq_enable, | 249 | .alarm_irq_enable = max8998_rtc_alarm_irq_enable, |
| 250 | }; | 250 | }; |
| 251 | 251 | ||
| 252 | static int __devinit max8998_rtc_probe(struct platform_device *pdev) | 252 | static int max8998_rtc_probe(struct platform_device *pdev) |
| 253 | { | 253 | { |
| 254 | struct max8998_dev *max8998 = dev_get_drvdata(pdev->dev.parent); | 254 | struct max8998_dev *max8998 = dev_get_drvdata(pdev->dev.parent); |
| 255 | struct max8998_platform_data *pdata = dev_get_platdata(max8998->dev); | 255 | struct max8998_platform_data *pdata = dev_get_platdata(max8998->dev); |
| @@ -298,7 +298,7 @@ out_rtc: | |||
| 298 | return ret; | 298 | return ret; |
| 299 | } | 299 | } |
| 300 | 300 | ||
| 301 | static int __devexit max8998_rtc_remove(struct platform_device *pdev) | 301 | static int max8998_rtc_remove(struct platform_device *pdev) |
| 302 | { | 302 | { |
| 303 | struct max8998_rtc_info *info = platform_get_drvdata(pdev); | 303 | struct max8998_rtc_info *info = platform_get_drvdata(pdev); |
| 304 | 304 | ||
| @@ -323,7 +323,7 @@ static struct platform_driver max8998_rtc_driver = { | |||
| 323 | .owner = THIS_MODULE, | 323 | .owner = THIS_MODULE, |
| 324 | }, | 324 | }, |
| 325 | .probe = max8998_rtc_probe, | 325 | .probe = max8998_rtc_probe, |
| 326 | .remove = __devexit_p(max8998_rtc_remove), | 326 | .remove = max8998_rtc_remove, |
| 327 | .id_table = max8998_rtc_id, | 327 | .id_table = max8998_rtc_id, |
| 328 | }; | 328 | }; |
| 329 | 329 | ||
diff --git a/drivers/rtc/rtc-mpc5121.c b/drivers/rtc/rtc-mpc5121.c index 029e421baaed..bec10be96f84 100644 --- a/drivers/rtc/rtc-mpc5121.c +++ b/drivers/rtc/rtc-mpc5121.c | |||
| @@ -306,7 +306,7 @@ static const struct rtc_class_ops mpc5200_rtc_ops = { | |||
| 306 | .alarm_irq_enable = mpc5121_rtc_alarm_irq_enable, | 306 | .alarm_irq_enable = mpc5121_rtc_alarm_irq_enable, |
| 307 | }; | 307 | }; |
| 308 | 308 | ||
| 309 | static int __devinit mpc5121_rtc_probe(struct platform_device *op) | 309 | static int mpc5121_rtc_probe(struct platform_device *op) |
| 310 | { | 310 | { |
| 311 | struct mpc5121_rtc_data *rtc; | 311 | struct mpc5121_rtc_data *rtc; |
| 312 | int err = 0; | 312 | int err = 0; |
| @@ -382,7 +382,7 @@ out_free: | |||
| 382 | return err; | 382 | return err; |
| 383 | } | 383 | } |
| 384 | 384 | ||
| 385 | static int __devexit mpc5121_rtc_remove(struct platform_device *op) | 385 | static int mpc5121_rtc_remove(struct platform_device *op) |
| 386 | { | 386 | { |
| 387 | struct mpc5121_rtc_data *rtc = dev_get_drvdata(&op->dev); | 387 | struct mpc5121_rtc_data *rtc = dev_get_drvdata(&op->dev); |
| 388 | struct mpc5121_rtc_regs __iomem *regs = rtc->regs; | 388 | struct mpc5121_rtc_regs __iomem *regs = rtc->regs; |
| @@ -403,7 +403,7 @@ static int __devexit mpc5121_rtc_remove(struct platform_device *op) | |||
| 403 | return 0; | 403 | return 0; |
| 404 | } | 404 | } |
| 405 | 405 | ||
| 406 | static struct of_device_id mpc5121_rtc_match[] __devinitdata = { | 406 | static struct of_device_id mpc5121_rtc_match[] = { |
| 407 | { .compatible = "fsl,mpc5121-rtc", }, | 407 | { .compatible = "fsl,mpc5121-rtc", }, |
| 408 | { .compatible = "fsl,mpc5200-rtc", }, | 408 | { .compatible = "fsl,mpc5200-rtc", }, |
| 409 | {}, | 409 | {}, |
| @@ -416,7 +416,7 @@ static struct platform_driver mpc5121_rtc_driver = { | |||
| 416 | .of_match_table = mpc5121_rtc_match, | 416 | .of_match_table = mpc5121_rtc_match, |
| 417 | }, | 417 | }, |
| 418 | .probe = mpc5121_rtc_probe, | 418 | .probe = mpc5121_rtc_probe, |
| 419 | .remove = __devexit_p(mpc5121_rtc_remove), | 419 | .remove = mpc5121_rtc_remove, |
| 420 | }; | 420 | }; |
| 421 | 421 | ||
| 422 | module_platform_driver(mpc5121_rtc_driver); | 422 | module_platform_driver(mpc5121_rtc_driver); |
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c index f51719bf4a75..578baf9d9725 100644 --- a/drivers/rtc/rtc-mrst.c +++ b/drivers/rtc/rtc-mrst.c | |||
| @@ -322,8 +322,8 @@ static irqreturn_t mrst_rtc_irq(int irq, void *p) | |||
| 322 | return IRQ_NONE; | 322 | return IRQ_NONE; |
| 323 | } | 323 | } |
| 324 | 324 | ||
| 325 | static int __devinit | 325 | static int vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, |
| 326 | vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq) | 326 | int rtc_irq) |
| 327 | { | 327 | { |
| 328 | int retval = 0; | 328 | int retval = 0; |
| 329 | unsigned char rtc_control; | 329 | unsigned char rtc_control; |
| @@ -394,7 +394,7 @@ static void rtc_mrst_do_shutdown(void) | |||
| 394 | spin_unlock_irq(&rtc_lock); | 394 | spin_unlock_irq(&rtc_lock); |
| 395 | } | 395 | } |
| 396 | 396 | ||
| 397 | static void __devexit rtc_mrst_do_remove(struct device *dev) | 397 | static void rtc_mrst_do_remove(struct device *dev) |
| 398 | { | 398 | { |
| 399 | struct mrst_rtc *mrst = dev_get_drvdata(dev); | 399 | struct mrst_rtc *mrst = dev_get_drvdata(dev); |
| 400 | struct resource *iomem; | 400 | struct resource *iomem; |
| @@ -503,14 +503,14 @@ static inline int mrst_poweroff(struct device *dev) | |||
| 503 | 503 | ||
| 504 | #endif | 504 | #endif |
| 505 | 505 | ||
| 506 | static int __devinit vrtc_mrst_platform_probe(struct platform_device *pdev) | 506 | static int vrtc_mrst_platform_probe(struct platform_device *pdev) |
| 507 | { | 507 | { |
| 508 | return vrtc_mrst_do_probe(&pdev->dev, | 508 | return vrtc_mrst_do_probe(&pdev->dev, |
| 509 | platform_get_resource(pdev, IORESOURCE_MEM, 0), | 509 | platform_get_resource(pdev, IORESOURCE_MEM, 0), |
| 510 | platform_get_irq(pdev, 0)); | 510 | platform_get_irq(pdev, 0)); |
| 511 | } | 511 | } |
| 512 | 512 | ||
| 513 | static int __devexit vrtc_mrst_platform_remove(struct platform_device *pdev) | 513 | static int vrtc_mrst_platform_remove(struct platform_device *pdev) |
| 514 | { | 514 | { |
| 515 | rtc_mrst_do_remove(&pdev->dev); | 515 | rtc_mrst_do_remove(&pdev->dev); |
| 516 | return 0; | 516 | return 0; |
| @@ -528,7 +528,7 @@ MODULE_ALIAS("platform:vrtc_mrst"); | |||
| 528 | 528 | ||
| 529 | static struct platform_driver vrtc_mrst_platform_driver = { | 529 | static struct platform_driver vrtc_mrst_platform_driver = { |
| 530 | .probe = vrtc_mrst_platform_probe, | 530 | .probe = vrtc_mrst_platform_probe, |
| 531 | .remove = __devexit_p(vrtc_mrst_platform_remove), | 531 | .remove = vrtc_mrst_platform_remove, |
| 532 | .shutdown = vrtc_mrst_platform_shutdown, | 532 | .shutdown = vrtc_mrst_platform_shutdown, |
| 533 | .driver = { | 533 | .driver = { |
| 534 | .name = (char *) driver_name, | 534 | .name = (char *) driver_name, |
diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c index ebc1649d45d6..57233c885998 100644 --- a/drivers/rtc/rtc-mv.c +++ b/drivers/rtc/rtc-mv.c | |||
| @@ -215,7 +215,7 @@ static const struct rtc_class_ops mv_rtc_alarm_ops = { | |||
| 215 | .alarm_irq_enable = mv_rtc_alarm_irq_enable, | 215 | .alarm_irq_enable = mv_rtc_alarm_irq_enable, |
| 216 | }; | 216 | }; |
| 217 | 217 | ||
| 218 | static int __devinit mv_rtc_probe(struct platform_device *pdev) | 218 | static int mv_rtc_probe(struct platform_device *pdev) |
| 219 | { | 219 | { |
| 220 | struct resource *res; | 220 | struct resource *res; |
| 221 | struct rtc_plat_data *pdata; | 221 | struct rtc_plat_data *pdata; |
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c index 7304139934aa..1c3ef7289565 100644 --- a/drivers/rtc/rtc-mxc.c +++ b/drivers/rtc/rtc-mxc.c | |||
| @@ -368,7 +368,7 @@ static struct rtc_class_ops mxc_rtc_ops = { | |||
| 368 | .alarm_irq_enable = mxc_rtc_alarm_irq_enable, | 368 | .alarm_irq_enable = mxc_rtc_alarm_irq_enable, |
| 369 | }; | 369 | }; |
| 370 | 370 | ||
| 371 | static int __devinit mxc_rtc_probe(struct platform_device *pdev) | 371 | static int mxc_rtc_probe(struct platform_device *pdev) |
| 372 | { | 372 | { |
| 373 | struct resource *res; | 373 | struct resource *res; |
| 374 | struct rtc_device *rtc; | 374 | struct rtc_device *rtc; |
| @@ -460,7 +460,7 @@ exit_free_pdata: | |||
| 460 | return ret; | 460 | return ret; |
| 461 | } | 461 | } |
| 462 | 462 | ||
| 463 | static int __devexit mxc_rtc_remove(struct platform_device *pdev) | 463 | static int mxc_rtc_remove(struct platform_device *pdev) |
| 464 | { | 464 | { |
| 465 | struct rtc_plat_data *pdata = platform_get_drvdata(pdev); | 465 | struct rtc_plat_data *pdata = platform_get_drvdata(pdev); |
| 466 | 466 | ||
| @@ -509,7 +509,7 @@ static struct platform_driver mxc_rtc_driver = { | |||
| 509 | }, | 509 | }, |
| 510 | .id_table = imx_rtc_devtype, | 510 | .id_table = imx_rtc_devtype, |
| 511 | .probe = mxc_rtc_probe, | 511 | .probe = mxc_rtc_probe, |
| 512 | .remove = __devexit_p(mxc_rtc_remove), | 512 | .remove = mxc_rtc_remove, |
| 513 | }; | 513 | }; |
| 514 | 514 | ||
| 515 | module_platform_driver(mxc_rtc_driver) | 515 | module_platform_driver(mxc_rtc_driver) |
diff --git a/drivers/rtc/rtc-nuc900.c b/drivers/rtc/rtc-nuc900.c index b79010987d1e..a63680850fef 100644 --- a/drivers/rtc/rtc-nuc900.c +++ b/drivers/rtc/rtc-nuc900.c | |||
| @@ -222,7 +222,7 @@ static struct rtc_class_ops nuc900_rtc_ops = { | |||
| 222 | .alarm_irq_enable = nuc900_alarm_irq_enable, | 222 | .alarm_irq_enable = nuc900_alarm_irq_enable, |
| 223 | }; | 223 | }; |
| 224 | 224 | ||
| 225 | static int __devinit nuc900_rtc_probe(struct platform_device *pdev) | 225 | static int nuc900_rtc_probe(struct platform_device *pdev) |
| 226 | { | 226 | { |
| 227 | struct resource *res; | 227 | struct resource *res; |
| 228 | struct nuc900_rtc *nuc900_rtc; | 228 | struct nuc900_rtc *nuc900_rtc; |
| @@ -284,7 +284,7 @@ fail1: kfree(nuc900_rtc); | |||
| 284 | return err; | 284 | return err; |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | static int __devexit nuc900_rtc_remove(struct platform_device *pdev) | 287 | static int nuc900_rtc_remove(struct platform_device *pdev) |
| 288 | { | 288 | { |
| 289 | struct nuc900_rtc *nuc900_rtc = platform_get_drvdata(pdev); | 289 | struct nuc900_rtc *nuc900_rtc = platform_get_drvdata(pdev); |
| 290 | struct resource *res; | 290 | struct resource *res; |
| @@ -304,7 +304,7 @@ static int __devexit nuc900_rtc_remove(struct platform_device *pdev) | |||
| 304 | } | 304 | } |
| 305 | 305 | ||
| 306 | static struct platform_driver nuc900_rtc_driver = { | 306 | static struct platform_driver nuc900_rtc_driver = { |
| 307 | .remove = __devexit_p(nuc900_rtc_remove), | 307 | .remove = nuc900_rtc_remove, |
| 308 | .driver = { | 308 | .driver = { |
| 309 | .name = "nuc900-rtc", | 309 | .name = "nuc900-rtc", |
| 310 | .owner = THIS_MODULE, | 310 | .owner = THIS_MODULE, |
diff --git a/drivers/rtc/rtc-pcap.c b/drivers/rtc/rtc-pcap.c index cd4f198cc2ef..e0019cd0bf71 100644 --- a/drivers/rtc/rtc-pcap.c +++ b/drivers/rtc/rtc-pcap.c | |||
| @@ -139,7 +139,7 @@ static const struct rtc_class_ops pcap_rtc_ops = { | |||
| 139 | .alarm_irq_enable = pcap_rtc_alarm_irq_enable, | 139 | .alarm_irq_enable = pcap_rtc_alarm_irq_enable, |
| 140 | }; | 140 | }; |
| 141 | 141 | ||
| 142 | static int __devinit pcap_rtc_probe(struct platform_device *pdev) | 142 | static int pcap_rtc_probe(struct platform_device *pdev) |
| 143 | { | 143 | { |
| 144 | struct pcap_rtc *pcap_rtc; | 144 | struct pcap_rtc *pcap_rtc; |
| 145 | int timer_irq, alarm_irq; | 145 | int timer_irq, alarm_irq; |
| @@ -183,7 +183,7 @@ fail_rtc: | |||
| 183 | return err; | 183 | return err; |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | static int __devexit pcap_rtc_remove(struct platform_device *pdev) | 186 | static int pcap_rtc_remove(struct platform_device *pdev) |
| 187 | { | 187 | { |
| 188 | struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev); | 188 | struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev); |
| 189 | 189 | ||
| @@ -196,7 +196,7 @@ static int __devexit pcap_rtc_remove(struct platform_device *pdev) | |||
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | static struct platform_driver pcap_rtc_driver = { | 198 | static struct platform_driver pcap_rtc_driver = { |
| 199 | .remove = __devexit_p(pcap_rtc_remove), | 199 | .remove = pcap_rtc_remove, |
| 200 | .driver = { | 200 | .driver = { |
| 201 | .name = "pcap-rtc", | 201 | .name = "pcap-rtc", |
| 202 | .owner = THIS_MODULE, | 202 | .owner = THIS_MODULE, |
diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c index 13e4df63974f..02b742afa761 100644 --- a/drivers/rtc/rtc-pcf2123.c +++ b/drivers/rtc/rtc-pcf2123.c | |||
| @@ -219,7 +219,7 @@ static const struct rtc_class_ops pcf2123_rtc_ops = { | |||
| 219 | .set_time = pcf2123_rtc_set_time, | 219 | .set_time = pcf2123_rtc_set_time, |
| 220 | }; | 220 | }; |
| 221 | 221 | ||
| 222 | static int __devinit pcf2123_probe(struct spi_device *spi) | 222 | static int pcf2123_probe(struct spi_device *spi) |
| 223 | { | 223 | { |
| 224 | struct rtc_device *rtc; | 224 | struct rtc_device *rtc; |
| 225 | struct pcf2123_plat_data *pdata; | 225 | struct pcf2123_plat_data *pdata; |
| @@ -319,7 +319,7 @@ kfree_exit: | |||
| 319 | return ret; | 319 | return ret; |
| 320 | } | 320 | } |
| 321 | 321 | ||
| 322 | static int __devexit pcf2123_remove(struct spi_device *spi) | 322 | static int pcf2123_remove(struct spi_device *spi) |
| 323 | { | 323 | { |
| 324 | struct pcf2123_plat_data *pdata = spi->dev.platform_data; | 324 | struct pcf2123_plat_data *pdata = spi->dev.platform_data; |
| 325 | int i; | 325 | int i; |
| @@ -345,7 +345,7 @@ static struct spi_driver pcf2123_driver = { | |||
| 345 | .owner = THIS_MODULE, | 345 | .owner = THIS_MODULE, |
| 346 | }, | 346 | }, |
| 347 | .probe = pcf2123_probe, | 347 | .probe = pcf2123_probe, |
| 348 | .remove = __devexit_p(pcf2123_remove), | 348 | .remove = pcf2123_remove, |
| 349 | }; | 349 | }; |
| 350 | 350 | ||
| 351 | module_spi_driver(pcf2123_driver); | 351 | module_spi_driver(pcf2123_driver); |
diff --git a/drivers/rtc/rtc-pcf50633.c b/drivers/rtc/rtc-pcf50633.c index a20202f9ee57..e9f3135d305f 100644 --- a/drivers/rtc/rtc-pcf50633.c +++ b/drivers/rtc/rtc-pcf50633.c | |||
| @@ -248,7 +248,7 @@ static void pcf50633_rtc_irq(int irq, void *data) | |||
| 248 | rtc->alarm_pending = 1; | 248 | rtc->alarm_pending = 1; |
| 249 | } | 249 | } |
| 250 | 250 | ||
| 251 | static int __devinit pcf50633_rtc_probe(struct platform_device *pdev) | 251 | static int pcf50633_rtc_probe(struct platform_device *pdev) |
| 252 | { | 252 | { |
| 253 | struct pcf50633_rtc *rtc; | 253 | struct pcf50633_rtc *rtc; |
| 254 | 254 | ||
| @@ -272,7 +272,7 @@ static int __devinit pcf50633_rtc_probe(struct platform_device *pdev) | |||
| 272 | return 0; | 272 | return 0; |
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | static int __devexit pcf50633_rtc_remove(struct platform_device *pdev) | 275 | static int pcf50633_rtc_remove(struct platform_device *pdev) |
| 276 | { | 276 | { |
| 277 | struct pcf50633_rtc *rtc; | 277 | struct pcf50633_rtc *rtc; |
| 278 | 278 | ||
| @@ -291,7 +291,7 @@ static struct platform_driver pcf50633_rtc_driver = { | |||
| 291 | .name = "pcf50633-rtc", | 291 | .name = "pcf50633-rtc", |
| 292 | }, | 292 | }, |
| 293 | .probe = pcf50633_rtc_probe, | 293 | .probe = pcf50633_rtc_probe, |
| 294 | .remove = __devexit_p(pcf50633_rtc_remove), | 294 | .remove = pcf50633_rtc_remove, |
| 295 | }; | 295 | }; |
| 296 | 296 | ||
| 297 | module_platform_driver(pcf50633_rtc_driver); | 297 | module_platform_driver(pcf50633_rtc_driver); |
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c index 98e3a2b681e6..7098ee89bd29 100644 --- a/drivers/rtc/rtc-pcf8563.c +++ b/drivers/rtc/rtc-pcf8563.c | |||
| @@ -296,7 +296,7 @@ static const struct i2c_device_id pcf8563_id[] = { | |||
| 296 | MODULE_DEVICE_TABLE(i2c, pcf8563_id); | 296 | MODULE_DEVICE_TABLE(i2c, pcf8563_id); |
| 297 | 297 | ||
| 298 | #ifdef CONFIG_OF | 298 | #ifdef CONFIG_OF |
| 299 | static const struct of_device_id pcf8563_of_match[] __devinitconst = { | 299 | static const struct of_device_id pcf8563_of_match[] = { |
| 300 | { .compatible = "nxp,pcf8563" }, | 300 | { .compatible = "nxp,pcf8563" }, |
| 301 | {} | 301 | {} |
| 302 | }; | 302 | }; |
diff --git a/drivers/rtc/rtc-pcf8583.c b/drivers/rtc/rtc-pcf8583.c index 019ff3571168..3415b8f18555 100644 --- a/drivers/rtc/rtc-pcf8583.c +++ b/drivers/rtc/rtc-pcf8583.c | |||
| @@ -294,7 +294,7 @@ exit_kfree: | |||
| 294 | return err; | 294 | return err; |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | static int __devexit pcf8583_remove(struct i2c_client *client) | 297 | static int pcf8583_remove(struct i2c_client *client) |
| 298 | { | 298 | { |
| 299 | struct pcf8583 *pcf8583 = i2c_get_clientdata(client); | 299 | struct pcf8583 *pcf8583 = i2c_get_clientdata(client); |
| 300 | 300 | ||
| @@ -316,7 +316,7 @@ static struct i2c_driver pcf8583_driver = { | |||
| 316 | .owner = THIS_MODULE, | 316 | .owner = THIS_MODULE, |
| 317 | }, | 317 | }, |
| 318 | .probe = pcf8583_probe, | 318 | .probe = pcf8583_probe, |
| 319 | .remove = __devexit_p(pcf8583_remove), | 319 | .remove = pcf8583_remove, |
| 320 | .id_table = pcf8583_id, | 320 | .id_table = pcf8583_id, |
| 321 | }; | 321 | }; |
| 322 | 322 | ||
diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c index d00bd24342a3..f1a6557261f3 100644 --- a/drivers/rtc/rtc-pm8xxx.c +++ b/drivers/rtc/rtc-pm8xxx.c | |||
| @@ -382,7 +382,7 @@ rtc_alarm_handled: | |||
| 382 | return IRQ_HANDLED; | 382 | return IRQ_HANDLED; |
| 383 | } | 383 | } |
| 384 | 384 | ||
| 385 | static int __devinit pm8xxx_rtc_probe(struct platform_device *pdev) | 385 | static int pm8xxx_rtc_probe(struct platform_device *pdev) |
| 386 | { | 386 | { |
| 387 | int rc; | 387 | int rc; |
| 388 | u8 ctrl_reg; | 388 | u8 ctrl_reg; |
| @@ -485,7 +485,7 @@ fail_rtc_enable: | |||
| 485 | return rc; | 485 | return rc; |
| 486 | } | 486 | } |
| 487 | 487 | ||
| 488 | static int __devexit pm8xxx_rtc_remove(struct platform_device *pdev) | 488 | static int pm8xxx_rtc_remove(struct platform_device *pdev) |
| 489 | { | 489 | { |
| 490 | struct pm8xxx_rtc *rtc_dd = platform_get_drvdata(pdev); | 490 | struct pm8xxx_rtc *rtc_dd = platform_get_drvdata(pdev); |
| 491 | 491 | ||
| @@ -524,7 +524,7 @@ static SIMPLE_DEV_PM_OPS(pm8xxx_rtc_pm_ops, pm8xxx_rtc_suspend, pm8xxx_rtc_resum | |||
| 524 | 524 | ||
| 525 | static struct platform_driver pm8xxx_rtc_driver = { | 525 | static struct platform_driver pm8xxx_rtc_driver = { |
| 526 | .probe = pm8xxx_rtc_probe, | 526 | .probe = pm8xxx_rtc_probe, |
| 527 | .remove = __devexit_p(pm8xxx_rtc_remove), | 527 | .remove = pm8xxx_rtc_remove, |
| 528 | .driver = { | 528 | .driver = { |
| 529 | .name = PM8XXX_RTC_DEV_NAME, | 529 | .name = PM8XXX_RTC_DEV_NAME, |
| 530 | .owner = THIS_MODULE, | 530 | .owner = THIS_MODULE, |
diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c index ab0acaeb2371..0407e13d4de4 100644 --- a/drivers/rtc/rtc-puv3.c +++ b/drivers/rtc/rtc-puv3.c | |||
| @@ -220,7 +220,7 @@ static void puv3_rtc_enable(struct platform_device *pdev, int en) | |||
| 220 | } | 220 | } |
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | static int __devexit puv3_rtc_remove(struct platform_device *dev) | 223 | static int puv3_rtc_remove(struct platform_device *dev) |
| 224 | { | 224 | { |
| 225 | struct rtc_device *rtc = platform_get_drvdata(dev); | 225 | struct rtc_device *rtc = platform_get_drvdata(dev); |
| 226 | 226 | ||
| @@ -236,7 +236,7 @@ static int __devexit puv3_rtc_remove(struct platform_device *dev) | |||
| 236 | return 0; | 236 | return 0; |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | static int __devinit puv3_rtc_probe(struct platform_device *pdev) | 239 | static int puv3_rtc_probe(struct platform_device *pdev) |
| 240 | { | 240 | { |
| 241 | struct rtc_device *rtc; | 241 | struct rtc_device *rtc; |
| 242 | struct resource *res; | 242 | struct resource *res; |
| @@ -328,7 +328,7 @@ static int puv3_rtc_resume(struct platform_device *pdev) | |||
| 328 | 328 | ||
| 329 | static struct platform_driver puv3_rtc_driver = { | 329 | static struct platform_driver puv3_rtc_driver = { |
| 330 | .probe = puv3_rtc_probe, | 330 | .probe = puv3_rtc_probe, |
| 331 | .remove = __devexit_p(puv3_rtc_remove), | 331 | .remove = puv3_rtc_remove, |
| 332 | .suspend = puv3_rtc_suspend, | 332 | .suspend = puv3_rtc_suspend, |
| 333 | .resume = puv3_rtc_resume, | 333 | .resume = puv3_rtc_resume, |
| 334 | .driver = { | 334 | .driver = { |
diff --git a/drivers/rtc/rtc-r9701.c b/drivers/rtc/rtc-r9701.c index 2c183ebff715..7726f4a4f2d0 100644 --- a/drivers/rtc/rtc-r9701.c +++ b/drivers/rtc/rtc-r9701.c | |||
| @@ -119,7 +119,7 @@ static const struct rtc_class_ops r9701_rtc_ops = { | |||
| 119 | .set_time = r9701_set_datetime, | 119 | .set_time = r9701_set_datetime, |
| 120 | }; | 120 | }; |
| 121 | 121 | ||
| 122 | static int __devinit r9701_probe(struct spi_device *spi) | 122 | static int r9701_probe(struct spi_device *spi) |
| 123 | { | 123 | { |
| 124 | struct rtc_device *rtc; | 124 | struct rtc_device *rtc; |
| 125 | struct rtc_time dt; | 125 | struct rtc_time dt; |
| @@ -164,7 +164,7 @@ static int __devinit r9701_probe(struct spi_device *spi) | |||
| 164 | return 0; | 164 | return 0; |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | static int __devexit r9701_remove(struct spi_device *spi) | 167 | static int r9701_remove(struct spi_device *spi) |
| 168 | { | 168 | { |
| 169 | struct rtc_device *rtc = dev_get_drvdata(&spi->dev); | 169 | struct rtc_device *rtc = dev_get_drvdata(&spi->dev); |
| 170 | 170 | ||
| @@ -178,7 +178,7 @@ static struct spi_driver r9701_driver = { | |||
| 178 | .owner = THIS_MODULE, | 178 | .owner = THIS_MODULE, |
| 179 | }, | 179 | }, |
| 180 | .probe = r9701_probe, | 180 | .probe = r9701_probe, |
| 181 | .remove = __devexit_p(r9701_remove), | 181 | .remove = r9701_remove, |
| 182 | }; | 182 | }; |
| 183 | 183 | ||
| 184 | module_spi_driver(r9701_driver); | 184 | module_spi_driver(r9701_driver); |
diff --git a/drivers/rtc/rtc-rc5t583.c b/drivers/rtc/rtc-rc5t583.c index cdb140c29c56..eb3194d664a8 100644 --- a/drivers/rtc/rtc-rc5t583.c +++ b/drivers/rtc/rtc-rc5t583.c | |||
| @@ -211,7 +211,7 @@ static const struct rtc_class_ops rc5t583_rtc_ops = { | |||
| 211 | .alarm_irq_enable = rc5t583_rtc_alarm_irq_enable, | 211 | .alarm_irq_enable = rc5t583_rtc_alarm_irq_enable, |
| 212 | }; | 212 | }; |
| 213 | 213 | ||
| 214 | static int __devinit rc5t583_rtc_probe(struct platform_device *pdev) | 214 | static int rc5t583_rtc_probe(struct platform_device *pdev) |
| 215 | { | 215 | { |
| 216 | struct rc5t583 *rc5t583 = dev_get_drvdata(pdev->dev.parent); | 216 | struct rc5t583 *rc5t583 = dev_get_drvdata(pdev->dev.parent); |
| 217 | struct rc5t583_rtc *ricoh_rtc; | 217 | struct rc5t583_rtc *ricoh_rtc; |
| @@ -271,7 +271,7 @@ static int __devinit rc5t583_rtc_probe(struct platform_device *pdev) | |||
| 271 | * Disable rc5t583 RTC interrupts. | 271 | * Disable rc5t583 RTC interrupts. |
| 272 | * Sets status flag to free. | 272 | * Sets status flag to free. |
| 273 | */ | 273 | */ |
| 274 | static int __devexit rc5t583_rtc_remove(struct platform_device *pdev) | 274 | static int rc5t583_rtc_remove(struct platform_device *pdev) |
| 275 | { | 275 | { |
| 276 | struct rc5t583_rtc *rc5t583_rtc = dev_get_drvdata(&pdev->dev); | 276 | struct rc5t583_rtc *rc5t583_rtc = dev_get_drvdata(&pdev->dev); |
| 277 | 277 | ||
| @@ -317,7 +317,7 @@ static const struct dev_pm_ops rc5t583_rtc_pm_ops = { | |||
| 317 | 317 | ||
| 318 | static struct platform_driver rc5t583_rtc_driver = { | 318 | static struct platform_driver rc5t583_rtc_driver = { |
| 319 | .probe = rc5t583_rtc_probe, | 319 | .probe = rc5t583_rtc_probe, |
| 320 | .remove = __devexit_p(rc5t583_rtc_remove), | 320 | .remove = rc5t583_rtc_remove, |
| 321 | .driver = { | 321 | .driver = { |
| 322 | .owner = THIS_MODULE, | 322 | .owner = THIS_MODULE, |
| 323 | .name = "rtc-rc5t583", | 323 | .name = "rtc-rc5t583", |
diff --git a/drivers/rtc/rtc-rs5c313.c b/drivers/rtc/rtc-rs5c313.c index e3ff179b99ca..d1aee793ecc8 100644 --- a/drivers/rtc/rtc-rs5c313.c +++ b/drivers/rtc/rtc-rs5c313.c | |||
| @@ -377,7 +377,7 @@ static int rs5c313_rtc_probe(struct platform_device *pdev) | |||
| 377 | return 0; | 377 | return 0; |
| 378 | } | 378 | } |
| 379 | 379 | ||
| 380 | static int __devexit rs5c313_rtc_remove(struct platform_device *pdev) | 380 | static int rs5c313_rtc_remove(struct platform_device *pdev) |
| 381 | { | 381 | { |
| 382 | struct rtc_device *rtc = platform_get_drvdata( pdev ); | 382 | struct rtc_device *rtc = platform_get_drvdata( pdev ); |
| 383 | 383 | ||
| @@ -392,7 +392,7 @@ static struct platform_driver rs5c313_rtc_platform_driver = { | |||
| 392 | .owner = THIS_MODULE, | 392 | .owner = THIS_MODULE, |
| 393 | }, | 393 | }, |
| 394 | .probe = rs5c313_rtc_probe, | 394 | .probe = rs5c313_rtc_probe, |
| 395 | .remove = __devexit_p( rs5c313_rtc_remove ), | 395 | .remove = rs5c313_rtc_remove, |
| 396 | }; | 396 | }; |
| 397 | 397 | ||
| 398 | static int __init rs5c313_rtc_init(void) | 398 | static int __init rs5c313_rtc_init(void) |
diff --git a/drivers/rtc/rtc-rs5c348.c b/drivers/rtc/rtc-rs5c348.c index fd5c7af04ae5..72ef10be8662 100644 --- a/drivers/rtc/rtc-rs5c348.c +++ b/drivers/rtc/rtc-rs5c348.c | |||
| @@ -152,7 +152,7 @@ static const struct rtc_class_ops rs5c348_rtc_ops = { | |||
| 152 | 152 | ||
| 153 | static struct spi_driver rs5c348_driver; | 153 | static struct spi_driver rs5c348_driver; |
| 154 | 154 | ||
| 155 | static int __devinit rs5c348_probe(struct spi_device *spi) | 155 | static int rs5c348_probe(struct spi_device *spi) |
| 156 | { | 156 | { |
| 157 | int ret; | 157 | int ret; |
| 158 | struct rtc_device *rtc; | 158 | struct rtc_device *rtc; |
| @@ -218,7 +218,7 @@ static int __devinit rs5c348_probe(struct spi_device *spi) | |||
| 218 | return ret; | 218 | return ret; |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | static int __devexit rs5c348_remove(struct spi_device *spi) | 221 | static int rs5c348_remove(struct spi_device *spi) |
| 222 | { | 222 | { |
| 223 | struct rs5c348_plat_data *pdata = spi->dev.platform_data; | 223 | struct rs5c348_plat_data *pdata = spi->dev.platform_data; |
| 224 | struct rtc_device *rtc = pdata->rtc; | 224 | struct rtc_device *rtc = pdata->rtc; |
| @@ -235,7 +235,7 @@ static struct spi_driver rs5c348_driver = { | |||
| 235 | .owner = THIS_MODULE, | 235 | .owner = THIS_MODULE, |
| 236 | }, | 236 | }, |
| 237 | .probe = rs5c348_probe, | 237 | .probe = rs5c348_probe, |
| 238 | .remove = __devexit_p(rs5c348_remove), | 238 | .remove = rs5c348_remove, |
| 239 | }; | 239 | }; |
| 240 | 240 | ||
| 241 | module_spi_driver(rs5c348_driver); | 241 | module_spi_driver(rs5c348_driver); |
diff --git a/drivers/rtc/rtc-rv3029c2.c b/drivers/rtc/rtc-rv3029c2.c index 0fbe57b2f6d2..f8ee8ad7825e 100644 --- a/drivers/rtc/rtc-rv3029c2.c +++ b/drivers/rtc/rtc-rv3029c2.c | |||
| @@ -385,8 +385,8 @@ static struct i2c_device_id rv3029c2_id[] = { | |||
| 385 | }; | 385 | }; |
| 386 | MODULE_DEVICE_TABLE(i2c, rv3029c2_id); | 386 | MODULE_DEVICE_TABLE(i2c, rv3029c2_id); |
| 387 | 387 | ||
| 388 | static int __devinit | 388 | static int rv3029c2_probe(struct i2c_client *client, |
| 389 | rv3029c2_probe(struct i2c_client *client, const struct i2c_device_id *id) | 389 | const struct i2c_device_id *id) |
| 390 | { | 390 | { |
| 391 | struct rtc_device *rtc; | 391 | struct rtc_device *rtc; |
| 392 | int rc = 0; | 392 | int rc = 0; |
| @@ -418,7 +418,7 @@ exit_unregister: | |||
| 418 | return rc; | 418 | return rc; |
| 419 | } | 419 | } |
| 420 | 420 | ||
| 421 | static int __devexit rv3029c2_remove(struct i2c_client *client) | 421 | static int rv3029c2_remove(struct i2c_client *client) |
| 422 | { | 422 | { |
| 423 | struct rtc_device *rtc = i2c_get_clientdata(client); | 423 | struct rtc_device *rtc = i2c_get_clientdata(client); |
| 424 | 424 | ||
| @@ -432,7 +432,7 @@ static struct i2c_driver rv3029c2_driver = { | |||
| 432 | .name = "rtc-rv3029c2", | 432 | .name = "rtc-rv3029c2", |
| 433 | }, | 433 | }, |
| 434 | .probe = rv3029c2_probe, | 434 | .probe = rv3029c2_probe, |
| 435 | .remove = __devexit_p(rv3029c2_remove), | 435 | .remove = rv3029c2_remove, |
| 436 | .id_table = rv3029c2_id, | 436 | .id_table = rv3029c2_id, |
| 437 | }; | 437 | }; |
| 438 | 438 | ||
diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c index 0de902dc1cd5..0722d36b9c9a 100644 --- a/drivers/rtc/rtc-rx8025.c +++ b/drivers/rtc/rtc-rx8025.c | |||
| @@ -534,8 +534,8 @@ static void rx8025_sysfs_unregister(struct device *dev) | |||
| 534 | device_remove_file(dev, &dev_attr_clock_adjust_ppb); | 534 | device_remove_file(dev, &dev_attr_clock_adjust_ppb); |
| 535 | } | 535 | } |
| 536 | 536 | ||
| 537 | static int __devinit rx8025_probe(struct i2c_client *client, | 537 | static int rx8025_probe(struct i2c_client *client, |
| 538 | const struct i2c_device_id *id) | 538 | const struct i2c_device_id *id) |
| 539 | { | 539 | { |
| 540 | struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); | 540 | struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); |
| 541 | struct rx8025_data *rx8025; | 541 | struct rx8025_data *rx8025; |
| @@ -614,7 +614,7 @@ errout: | |||
| 614 | return err; | 614 | return err; |
| 615 | } | 615 | } |
| 616 | 616 | ||
| 617 | static int __devexit rx8025_remove(struct i2c_client *client) | 617 | static int rx8025_remove(struct i2c_client *client) |
| 618 | { | 618 | { |
| 619 | struct rx8025_data *rx8025 = i2c_get_clientdata(client); | 619 | struct rx8025_data *rx8025 = i2c_get_clientdata(client); |
| 620 | struct mutex *lock = &rx8025->rtc->ops_lock; | 620 | struct mutex *lock = &rx8025->rtc->ops_lock; |
| @@ -640,7 +640,7 @@ static struct i2c_driver rx8025_driver = { | |||
| 640 | .owner = THIS_MODULE, | 640 | .owner = THIS_MODULE, |
| 641 | }, | 641 | }, |
| 642 | .probe = rx8025_probe, | 642 | .probe = rx8025_probe, |
| 643 | .remove = __devexit_p(rx8025_remove), | 643 | .remove = rx8025_remove, |
| 644 | .id_table = rx8025_id, | 644 | .id_table = rx8025_id, |
| 645 | }; | 645 | }; |
| 646 | 646 | ||
diff --git a/drivers/rtc/rtc-rx8581.c b/drivers/rtc/rtc-rx8581.c index d84825124a7a..b0c272658fa2 100644 --- a/drivers/rtc/rtc-rx8581.c +++ b/drivers/rtc/rtc-rx8581.c | |||
| @@ -228,8 +228,8 @@ static const struct rtc_class_ops rx8581_rtc_ops = { | |||
| 228 | .set_time = rx8581_rtc_set_time, | 228 | .set_time = rx8581_rtc_set_time, |
| 229 | }; | 229 | }; |
| 230 | 230 | ||
| 231 | static int __devinit rx8581_probe(struct i2c_client *client, | 231 | static int rx8581_probe(struct i2c_client *client, |
| 232 | const struct i2c_device_id *id) | 232 | const struct i2c_device_id *id) |
| 233 | { | 233 | { |
| 234 | struct rtc_device *rtc; | 234 | struct rtc_device *rtc; |
| 235 | 235 | ||
| @@ -251,7 +251,7 @@ static int __devinit rx8581_probe(struct i2c_client *client, | |||
| 251 | return 0; | 251 | return 0; |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | static int __devexit rx8581_remove(struct i2c_client *client) | 254 | static int rx8581_remove(struct i2c_client *client) |
| 255 | { | 255 | { |
| 256 | struct rtc_device *rtc = i2c_get_clientdata(client); | 256 | struct rtc_device *rtc = i2c_get_clientdata(client); |
| 257 | 257 | ||
| @@ -272,7 +272,7 @@ static struct i2c_driver rx8581_driver = { | |||
| 272 | .owner = THIS_MODULE, | 272 | .owner = THIS_MODULE, |
| 273 | }, | 273 | }, |
| 274 | .probe = rx8581_probe, | 274 | .probe = rx8581_probe, |
| 275 | .remove = __devexit_p(rx8581_remove), | 275 | .remove = rx8581_remove, |
| 276 | .id_table = rx8581_id, | 276 | .id_table = rx8581_id, |
| 277 | }; | 277 | }; |
| 278 | 278 | ||
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 4bd9414aee65..404651464d45 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c | |||
| @@ -421,7 +421,7 @@ static void s3c_rtc_enable(struct platform_device *pdev, int en) | |||
| 421 | clk_disable(rtc_clk); | 421 | clk_disable(rtc_clk); |
| 422 | } | 422 | } |
| 423 | 423 | ||
| 424 | static int __devexit s3c_rtc_remove(struct platform_device *dev) | 424 | static int s3c_rtc_remove(struct platform_device *dev) |
| 425 | { | 425 | { |
| 426 | struct rtc_device *rtc = platform_get_drvdata(dev); | 426 | struct rtc_device *rtc = platform_get_drvdata(dev); |
| 427 | 427 | ||
| @@ -451,7 +451,7 @@ static inline int s3c_rtc_get_driver_data(struct platform_device *pdev) | |||
| 451 | return platform_get_device_id(pdev)->driver_data; | 451 | return platform_get_device_id(pdev)->driver_data; |
| 452 | } | 452 | } |
| 453 | 453 | ||
| 454 | static int __devinit s3c_rtc_probe(struct platform_device *pdev) | 454 | static int s3c_rtc_probe(struct platform_device *pdev) |
| 455 | { | 455 | { |
| 456 | struct rtc_device *rtc; | 456 | struct rtc_device *rtc; |
| 457 | struct rtc_time rtc_tm; | 457 | struct rtc_time rtc_tm; |
| @@ -686,7 +686,7 @@ MODULE_DEVICE_TABLE(platform, s3c_rtc_driver_ids); | |||
| 686 | 686 | ||
| 687 | static struct platform_driver s3c_rtc_driver = { | 687 | static struct platform_driver s3c_rtc_driver = { |
| 688 | .probe = s3c_rtc_probe, | 688 | .probe = s3c_rtc_probe, |
| 689 | .remove = __devexit_p(s3c_rtc_remove), | 689 | .remove = s3c_rtc_remove, |
| 690 | .suspend = s3c_rtc_suspend, | 690 | .suspend = s3c_rtc_suspend, |
| 691 | .resume = s3c_rtc_resume, | 691 | .resume = s3c_rtc_resume, |
| 692 | .id_table = s3c_rtc_driver_ids, | 692 | .id_table = s3c_rtc_driver_ids, |
diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c index 3c0da333f465..d5ec7854a651 100644 --- a/drivers/rtc/rtc-snvs.c +++ b/drivers/rtc/rtc-snvs.c | |||
| @@ -241,7 +241,7 @@ static irqreturn_t snvs_rtc_irq_handler(int irq, void *dev_id) | |||
| 241 | return events ? IRQ_HANDLED : IRQ_NONE; | 241 | return events ? IRQ_HANDLED : IRQ_NONE; |
| 242 | } | 242 | } |
| 243 | 243 | ||
| 244 | static int __devinit snvs_rtc_probe(struct platform_device *pdev) | 244 | static int snvs_rtc_probe(struct platform_device *pdev) |
| 245 | { | 245 | { |
| 246 | struct snvs_rtc_data *data; | 246 | struct snvs_rtc_data *data; |
| 247 | struct resource *res; | 247 | struct resource *res; |
| @@ -294,7 +294,7 @@ static int __devinit snvs_rtc_probe(struct platform_device *pdev) | |||
| 294 | return 0; | 294 | return 0; |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | static int __devexit snvs_rtc_remove(struct platform_device *pdev) | 297 | static int snvs_rtc_remove(struct platform_device *pdev) |
| 298 | { | 298 | { |
| 299 | struct snvs_rtc_data *data = platform_get_drvdata(pdev); | 299 | struct snvs_rtc_data *data = platform_get_drvdata(pdev); |
| 300 | 300 | ||
| @@ -327,7 +327,7 @@ static int snvs_rtc_resume(struct device *dev) | |||
| 327 | 327 | ||
| 328 | static SIMPLE_DEV_PM_OPS(snvs_rtc_pm_ops, snvs_rtc_suspend, snvs_rtc_resume); | 328 | static SIMPLE_DEV_PM_OPS(snvs_rtc_pm_ops, snvs_rtc_suspend, snvs_rtc_resume); |
| 329 | 329 | ||
| 330 | static const struct of_device_id __devinitconst snvs_dt_ids[] = { | 330 | static const struct of_device_id snvs_dt_ids[] = { |
| 331 | { .compatible = "fsl,sec-v4.0-mon-rtc-lp", }, | 331 | { .compatible = "fsl,sec-v4.0-mon-rtc-lp", }, |
| 332 | { /* sentinel */ } | 332 | { /* sentinel */ } |
| 333 | }; | 333 | }; |
| @@ -341,7 +341,7 @@ static struct platform_driver snvs_rtc_driver = { | |||
| 341 | .of_match_table = snvs_dt_ids, | 341 | .of_match_table = snvs_dt_ids, |
| 342 | }, | 342 | }, |
| 343 | .probe = snvs_rtc_probe, | 343 | .probe = snvs_rtc_probe, |
| 344 | .remove = __devexit_p(snvs_rtc_remove), | 344 | .remove = snvs_rtc_remove, |
| 345 | }; | 345 | }; |
| 346 | module_platform_driver(snvs_rtc_driver); | 346 | module_platform_driver(snvs_rtc_driver); |
| 347 | 347 | ||
diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c index 141fc945295f..c2121b5a01f2 100644 --- a/drivers/rtc/rtc-spear.c +++ b/drivers/rtc/rtc-spear.c | |||
| @@ -351,7 +351,7 @@ static struct rtc_class_ops spear_rtc_ops = { | |||
| 351 | .alarm_irq_enable = spear_alarm_irq_enable, | 351 | .alarm_irq_enable = spear_alarm_irq_enable, |
| 352 | }; | 352 | }; |
| 353 | 353 | ||
| 354 | static int __devinit spear_rtc_probe(struct platform_device *pdev) | 354 | static int spear_rtc_probe(struct platform_device *pdev) |
| 355 | { | 355 | { |
| 356 | struct resource *res; | 356 | struct resource *res; |
| 357 | struct spear_rtc_config *config; | 357 | struct spear_rtc_config *config; |
| @@ -425,7 +425,7 @@ err_disable_clock: | |||
| 425 | return status; | 425 | return status; |
| 426 | } | 426 | } |
| 427 | 427 | ||
| 428 | static int __devexit spear_rtc_remove(struct platform_device *pdev) | 428 | static int spear_rtc_remove(struct platform_device *pdev) |
| 429 | { | 429 | { |
| 430 | struct spear_rtc_config *config = platform_get_drvdata(pdev); | 430 | struct spear_rtc_config *config = platform_get_drvdata(pdev); |
| 431 | 431 | ||
| @@ -499,7 +499,7 @@ MODULE_DEVICE_TABLE(of, spear_rtc_id_table); | |||
| 499 | 499 | ||
| 500 | static struct platform_driver spear_rtc_driver = { | 500 | static struct platform_driver spear_rtc_driver = { |
| 501 | .probe = spear_rtc_probe, | 501 | .probe = spear_rtc_probe, |
| 502 | .remove = __devexit_p(spear_rtc_remove), | 502 | .remove = spear_rtc_remove, |
| 503 | .suspend = spear_rtc_suspend, | 503 | .suspend = spear_rtc_suspend, |
| 504 | .resume = spear_rtc_resume, | 504 | .resume = spear_rtc_resume, |
| 505 | .shutdown = spear_rtc_shutdown, | 505 | .shutdown = spear_rtc_shutdown, |
diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c index 279f5cfa691a..7e4a6f65cb91 100644 --- a/drivers/rtc/rtc-stk17ta8.c +++ b/drivers/rtc/rtc-stk17ta8.c | |||
| @@ -285,7 +285,7 @@ static struct bin_attribute stk17ta8_nvram_attr = { | |||
| 285 | .write = stk17ta8_nvram_write, | 285 | .write = stk17ta8_nvram_write, |
| 286 | }; | 286 | }; |
| 287 | 287 | ||
| 288 | static int __devinit stk17ta8_rtc_probe(struct platform_device *pdev) | 288 | static int stk17ta8_rtc_probe(struct platform_device *pdev) |
| 289 | { | 289 | { |
| 290 | struct resource *res; | 290 | struct resource *res; |
| 291 | unsigned int cal; | 291 | unsigned int cal; |
| @@ -347,7 +347,7 @@ static int __devinit stk17ta8_rtc_probe(struct platform_device *pdev) | |||
| 347 | return ret; | 347 | return ret; |
| 348 | } | 348 | } |
| 349 | 349 | ||
| 350 | static int __devexit stk17ta8_rtc_remove(struct platform_device *pdev) | 350 | static int stk17ta8_rtc_remove(struct platform_device *pdev) |
| 351 | { | 351 | { |
| 352 | struct rtc_plat_data *pdata = platform_get_drvdata(pdev); | 352 | struct rtc_plat_data *pdata = platform_get_drvdata(pdev); |
| 353 | 353 | ||
| @@ -363,7 +363,7 @@ MODULE_ALIAS("platform:stk17ta8"); | |||
| 363 | 363 | ||
| 364 | static struct platform_driver stk17ta8_rtc_driver = { | 364 | static struct platform_driver stk17ta8_rtc_driver = { |
| 365 | .probe = stk17ta8_rtc_probe, | 365 | .probe = stk17ta8_rtc_probe, |
| 366 | .remove = __devexit_p(stk17ta8_rtc_remove), | 366 | .remove = stk17ta8_rtc_remove, |
| 367 | .driver = { | 367 | .driver = { |
| 368 | .name = "stk17ta8", | 368 | .name = "stk17ta8", |
| 369 | .owner = THIS_MODULE, | 369 | .owner = THIS_MODULE, |
diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c index c006025cecc8..c84ea6659f49 100644 --- a/drivers/rtc/rtc-tegra.c +++ b/drivers/rtc/rtc-tegra.c | |||
| @@ -303,7 +303,13 @@ static struct rtc_class_ops tegra_rtc_ops = { | |||
| 303 | .alarm_irq_enable = tegra_rtc_alarm_irq_enable, | 303 | .alarm_irq_enable = tegra_rtc_alarm_irq_enable, |
| 304 | }; | 304 | }; |
| 305 | 305 | ||
| 306 | static int __devinit tegra_rtc_probe(struct platform_device *pdev) | 306 | static const struct of_device_id tegra_rtc_dt_match[] = { |
| 307 | { .compatible = "nvidia,tegra20-rtc", }, | ||
| 308 | {} | ||
| 309 | }; | ||
| 310 | MODULE_DEVICE_TABLE(of, tegra_rtc_dt_match); | ||
| 311 | |||
| 312 | static int tegra_rtc_probe(struct platform_device *pdev) | ||
| 307 | { | 313 | { |
| 308 | struct tegra_rtc_info *info; | 314 | struct tegra_rtc_info *info; |
| 309 | struct resource *res; | 315 | struct resource *res; |
| @@ -375,7 +381,7 @@ err_dev_unreg: | |||
| 375 | return ret; | 381 | return ret; |
| 376 | } | 382 | } |
| 377 | 383 | ||
| 378 | static int __devexit tegra_rtc_remove(struct platform_device *pdev) | 384 | static int tegra_rtc_remove(struct platform_device *pdev) |
| 379 | { | 385 | { |
| 380 | struct tegra_rtc_info *info = platform_get_drvdata(pdev); | 386 | struct tegra_rtc_info *info = platform_get_drvdata(pdev); |
| 381 | 387 | ||
| @@ -435,11 +441,12 @@ static void tegra_rtc_shutdown(struct platform_device *pdev) | |||
| 435 | 441 | ||
| 436 | MODULE_ALIAS("platform:tegra_rtc"); | 442 | MODULE_ALIAS("platform:tegra_rtc"); |
| 437 | static struct platform_driver tegra_rtc_driver = { | 443 | static struct platform_driver tegra_rtc_driver = { |
| 438 | .remove = __devexit_p(tegra_rtc_remove), | 444 | .remove = tegra_rtc_remove, |
| 439 | .shutdown = tegra_rtc_shutdown, | 445 | .shutdown = tegra_rtc_shutdown, |
| 440 | .driver = { | 446 | .driver = { |
| 441 | .name = "tegra_rtc", | 447 | .name = "tegra_rtc", |
| 442 | .owner = THIS_MODULE, | 448 | .owner = THIS_MODULE, |
| 449 | .of_match_table = tegra_rtc_dt_match, | ||
| 443 | }, | 450 | }, |
| 444 | #ifdef CONFIG_PM | 451 | #ifdef CONFIG_PM |
| 445 | .suspend = tegra_rtc_suspend, | 452 | .suspend = tegra_rtc_suspend, |
diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c index 974b9ae252ab..b92e0f6383e6 100644 --- a/drivers/rtc/rtc-test.c +++ b/drivers/rtc/rtc-test.c | |||
| @@ -119,7 +119,7 @@ err: | |||
| 119 | return err; | 119 | return err; |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | static int __devexit test_remove(struct platform_device *plat_dev) | 122 | static int test_remove(struct platform_device *plat_dev) |
| 123 | { | 123 | { |
| 124 | struct rtc_device *rtc = platform_get_drvdata(plat_dev); | 124 | struct rtc_device *rtc = platform_get_drvdata(plat_dev); |
| 125 | 125 | ||
| @@ -131,7 +131,7 @@ static int __devexit test_remove(struct platform_device *plat_dev) | |||
| 131 | 131 | ||
| 132 | static struct platform_driver test_driver = { | 132 | static struct platform_driver test_driver = { |
| 133 | .probe = test_probe, | 133 | .probe = test_probe, |
| 134 | .remove = __devexit_p(test_remove), | 134 | .remove = test_remove, |
| 135 | .driver = { | 135 | .driver = { |
| 136 | .name = "rtc-test", | 136 | .name = "rtc-test", |
| 137 | .owner = THIS_MODULE, | 137 | .owner = THIS_MODULE, |
diff --git a/drivers/rtc/rtc-tile.c b/drivers/rtc/rtc-tile.c index eb65dafee66e..62db4841078b 100644 --- a/drivers/rtc/rtc-tile.c +++ b/drivers/rtc/rtc-tile.c | |||
| @@ -76,7 +76,7 @@ static const struct rtc_class_ops tile_rtc_ops = { | |||
| 76 | /* | 76 | /* |
| 77 | * Device probe routine. | 77 | * Device probe routine. |
| 78 | */ | 78 | */ |
| 79 | static int __devinit tile_rtc_probe(struct platform_device *dev) | 79 | static int tile_rtc_probe(struct platform_device *dev) |
| 80 | { | 80 | { |
| 81 | struct rtc_device *rtc; | 81 | struct rtc_device *rtc; |
| 82 | 82 | ||
| @@ -94,7 +94,7 @@ static int __devinit tile_rtc_probe(struct platform_device *dev) | |||
| 94 | /* | 94 | /* |
| 95 | * Device cleanup routine. | 95 | * Device cleanup routine. |
| 96 | */ | 96 | */ |
| 97 | static int __devexit tile_rtc_remove(struct platform_device *dev) | 97 | static int tile_rtc_remove(struct platform_device *dev) |
| 98 | { | 98 | { |
| 99 | struct rtc_device *rtc = platform_get_drvdata(dev); | 99 | struct rtc_device *rtc = platform_get_drvdata(dev); |
| 100 | 100 | ||
| @@ -112,7 +112,7 @@ static struct platform_driver tile_rtc_platform_driver = { | |||
| 112 | .owner = THIS_MODULE, | 112 | .owner = THIS_MODULE, |
| 113 | }, | 113 | }, |
| 114 | .probe = tile_rtc_probe, | 114 | .probe = tile_rtc_probe, |
| 115 | .remove = __devexit_p(tile_rtc_remove), | 115 | .remove = tile_rtc_remove, |
| 116 | }; | 116 | }; |
| 117 | 117 | ||
| 118 | /* | 118 | /* |
diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c new file mode 100644 index 000000000000..70f61b8e9e6f --- /dev/null +++ b/drivers/rtc/rtc-tps6586x.c | |||
| @@ -0,0 +1,356 @@ | |||
| 1 | /* | ||
| 2 | * rtc-tps6586x.c: RTC driver for TI PMIC TPS6586X | ||
| 3 | * | ||
| 4 | * Copyright (c) 2012, NVIDIA Corporation. | ||
| 5 | * | ||
| 6 | * Author: Laxman Dewangan <ldewangan@nvidia.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or | ||
| 9 | * modify it under the terms of the GNU General Public License as | ||
| 10 | * published by the Free Software Foundation version 2. | ||
| 11 | * | ||
| 12 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind, | ||
| 13 | * whether express or implied; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
| 20 | * 02111-1307, USA | ||
| 21 | */ | ||
| 22 | |||
| 23 | #include <linux/device.h> | ||
| 24 | #include <linux/err.h> | ||
| 25 | #include <linux/init.h> | ||
| 26 | #include <linux/kernel.h> | ||
| 27 | #include <linux/mfd/tps6586x.h> | ||
| 28 | #include <linux/module.h> | ||
| 29 | #include <linux/platform_device.h> | ||
| 30 | #include <linux/pm_runtime.h> | ||
| 31 | #include <linux/rtc.h> | ||
| 32 | #include <linux/slab.h> | ||
| 33 | |||
| 34 | #define RTC_CTRL 0xc0 | ||
| 35 | #define POR_RESET_N BIT(7) | ||
| 36 | #define OSC_SRC_SEL BIT(6) | ||
| 37 | #define RTC_ENABLE BIT(5) /* enables alarm */ | ||
| 38 | #define RTC_BUF_ENABLE BIT(4) /* 32 KHz buffer enable */ | ||
| 39 | #define PRE_BYPASS BIT(3) /* 0=1KHz or 1=32KHz updates */ | ||
| 40 | #define CL_SEL_MASK (BIT(2)|BIT(1)) | ||
| 41 | #define CL_SEL_POS 1 | ||
| 42 | #define RTC_ALARM1_HI 0xc1 | ||
| 43 | #define RTC_COUNT4 0xc6 | ||
| 44 | |||
| 45 | /* start a PMU RTC access by reading the register prior to the RTC_COUNT4 */ | ||
| 46 | #define RTC_COUNT4_DUMMYREAD 0xc5 | ||
| 47 | |||
| 48 | /*only 14-bits width in second*/ | ||
| 49 | #define ALM1_VALID_RANGE_IN_SEC 0x3FFF | ||
| 50 | |||
| 51 | #define TPS6586X_RTC_CL_SEL_1_5PF 0x0 | ||
| 52 | #define TPS6586X_RTC_CL_SEL_6_5PF 0x1 | ||
| 53 | #define TPS6586X_RTC_CL_SEL_7_5PF 0x2 | ||
| 54 | #define TPS6586X_RTC_CL_SEL_12_5PF 0x3 | ||
| 55 | |||
| 56 | struct tps6586x_rtc { | ||
| 57 | struct device *dev; | ||
| 58 | struct rtc_device *rtc; | ||
| 59 | int irq; | ||
| 60 | bool irq_en; | ||
| 61 | unsigned long long epoch_start; | ||
| 62 | }; | ||
| 63 | |||
| 64 | static inline struct device *to_tps6586x_dev(struct device *dev) | ||
| 65 | { | ||
| 66 | return dev->parent; | ||
| 67 | } | ||
| 68 | |||
| 69 | static int tps6586x_rtc_read_time(struct device *dev, struct rtc_time *tm) | ||
| 70 | { | ||
| 71 | struct tps6586x_rtc *rtc = dev_get_drvdata(dev); | ||
| 72 | struct device *tps_dev = to_tps6586x_dev(dev); | ||
| 73 | unsigned long long ticks = 0; | ||
| 74 | unsigned long seconds; | ||
| 75 | u8 buff[6]; | ||
| 76 | int ret; | ||
| 77 | int i; | ||
| 78 | |||
| 79 | ret = tps6586x_reads(tps_dev, RTC_COUNT4_DUMMYREAD, sizeof(buff), buff); | ||
| 80 | if (ret < 0) { | ||
| 81 | dev_err(dev, "read counter failed with err %d\n", ret); | ||
| 82 | return ret; | ||
| 83 | } | ||
| 84 | |||
| 85 | for (i = 1; i < sizeof(buff); i++) { | ||
| 86 | ticks <<= 8; | ||
| 87 | ticks |= buff[i]; | ||
| 88 | } | ||
| 89 | |||
| 90 | seconds = ticks >> 10; | ||
| 91 | seconds += rtc->epoch_start; | ||
| 92 | rtc_time_to_tm(seconds, tm); | ||
| 93 | return rtc_valid_tm(tm); | ||
| 94 | } | ||
| 95 | |||
| 96 | static int tps6586x_rtc_set_time(struct device *dev, struct rtc_time *tm) | ||
| 97 | { | ||
| 98 | struct tps6586x_rtc *rtc = dev_get_drvdata(dev); | ||
| 99 | struct device *tps_dev = to_tps6586x_dev(dev); | ||
| 100 | unsigned long long ticks; | ||
| 101 | unsigned long seconds; | ||
| 102 | u8 buff[5]; | ||
| 103 | int ret; | ||
| 104 | |||
| 105 | rtc_tm_to_time(tm, &seconds); | ||
| 106 | if (seconds < rtc->epoch_start) { | ||
| 107 | dev_err(dev, "requested time unsupported\n"); | ||
| 108 | return -EINVAL; | ||
| 109 | } | ||
| 110 | seconds -= rtc->epoch_start; | ||
| 111 | |||
| 112 | ticks = (unsigned long long)seconds << 10; | ||
| 113 | buff[0] = (ticks >> 32) & 0xff; | ||
| 114 | buff[1] = (ticks >> 24) & 0xff; | ||
| 115 | buff[2] = (ticks >> 16) & 0xff; | ||
| 116 | buff[3] = (ticks >> 8) & 0xff; | ||
| 117 | buff[4] = ticks & 0xff; | ||
| 118 | |||
| 119 | /* Disable RTC before changing time */ | ||
| 120 | ret = tps6586x_clr_bits(tps_dev, RTC_CTRL, RTC_ENABLE); | ||
| 121 | if (ret < 0) { | ||
| 122 | dev_err(dev, "failed to clear RTC_ENABLE\n"); | ||
| 123 | return ret; | ||
| 124 | } | ||
| 125 | |||
| 126 | ret = tps6586x_writes(tps_dev, RTC_COUNT4, sizeof(buff), buff); | ||
| 127 | if (ret < 0) { | ||
| 128 | dev_err(dev, "failed to program new time\n"); | ||
| 129 | return ret; | ||
| 130 | } | ||
| 131 | |||
| 132 | /* Enable RTC */ | ||
| 133 | ret = tps6586x_set_bits(tps_dev, RTC_CTRL, RTC_ENABLE); | ||
| 134 | if (ret < 0) { | ||
| 135 | dev_err(dev, "failed to set RTC_ENABLE\n"); | ||
| 136 | return ret; | ||
| 137 | } | ||
| 138 | return 0; | ||
| 139 | } | ||
| 140 | |||
| 141 | static int tps6586x_rtc_alarm_irq_enable(struct device *dev, | ||
| 142 | unsigned int enabled) | ||
| 143 | { | ||
| 144 | struct tps6586x_rtc *rtc = dev_get_drvdata(dev); | ||
| 145 | |||
| 146 | if (enabled && !rtc->irq_en) { | ||
| 147 | enable_irq(rtc->irq); | ||
| 148 | rtc->irq_en = true; | ||
| 149 | } else if (!enabled && rtc->irq_en) { | ||
| 150 | disable_irq(rtc->irq); | ||
| 151 | rtc->irq_en = false; | ||
| 152 | } | ||
| 153 | return 0; | ||
| 154 | } | ||
| 155 | |||
| 156 | static int tps6586x_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) | ||
| 157 | { | ||
| 158 | struct tps6586x_rtc *rtc = dev_get_drvdata(dev); | ||
| 159 | struct device *tps_dev = to_tps6586x_dev(dev); | ||
| 160 | unsigned long seconds; | ||
| 161 | unsigned long ticks; | ||
| 162 | unsigned long rtc_current_time; | ||
| 163 | unsigned long long rticks = 0; | ||
| 164 | u8 buff[3]; | ||
| 165 | u8 rbuff[6]; | ||
| 166 | int ret; | ||
| 167 | int i; | ||
| 168 | |||
| 169 | rtc_tm_to_time(&alrm->time, &seconds); | ||
| 170 | |||
| 171 | if (alrm->enabled && (seconds < rtc->epoch_start)) { | ||
| 172 | dev_err(dev, "can't set alarm to requested time\n"); | ||
| 173 | return -EINVAL; | ||
| 174 | } | ||
| 175 | |||
| 176 | ret = tps6586x_rtc_alarm_irq_enable(dev, alrm->enabled); | ||
| 177 | if (ret < 0) { | ||
| 178 | dev_err(dev, "can't set alarm irq, err %d\n", ret); | ||
| 179 | return ret; | ||
| 180 | } | ||
| 181 | |||
| 182 | seconds -= rtc->epoch_start; | ||
| 183 | ret = tps6586x_reads(tps_dev, RTC_COUNT4_DUMMYREAD, | ||
| 184 | sizeof(rbuff), rbuff); | ||
| 185 | if (ret < 0) { | ||
| 186 | dev_err(dev, "read counter failed with err %d\n", ret); | ||
| 187 | return ret; | ||
| 188 | } | ||
| 189 | |||
| 190 | for (i = 1; i < sizeof(rbuff); i++) { | ||
| 191 | rticks <<= 8; | ||
| 192 | rticks |= rbuff[i]; | ||
| 193 | } | ||
| 194 | |||
| 195 | rtc_current_time = rticks >> 10; | ||
| 196 | if ((seconds - rtc_current_time) > ALM1_VALID_RANGE_IN_SEC) | ||
| 197 | seconds = rtc_current_time - 1; | ||
| 198 | |||
| 199 | ticks = (unsigned long long)seconds << 10; | ||
| 200 | buff[0] = (ticks >> 16) & 0xff; | ||
| 201 | buff[1] = (ticks >> 8) & 0xff; | ||
| 202 | buff[2] = ticks & 0xff; | ||
| 203 | |||
| 204 | ret = tps6586x_writes(tps_dev, RTC_ALARM1_HI, sizeof(buff), buff); | ||
| 205 | if (ret) | ||
| 206 | dev_err(dev, "programming alarm failed with err %d\n", ret); | ||
| 207 | |||
| 208 | return ret; | ||
| 209 | } | ||
| 210 | |||
| 211 | static int tps6586x_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) | ||
| 212 | { | ||
| 213 | struct tps6586x_rtc *rtc = dev_get_drvdata(dev); | ||
| 214 | struct device *tps_dev = to_tps6586x_dev(dev); | ||
| 215 | unsigned long ticks; | ||
| 216 | unsigned long seconds; | ||
| 217 | u8 buff[3]; | ||
| 218 | int ret; | ||
| 219 | |||
| 220 | ret = tps6586x_reads(tps_dev, RTC_ALARM1_HI, sizeof(buff), buff); | ||
| 221 | if (ret) { | ||
| 222 | dev_err(dev, "read RTC_ALARM1_HI failed with err %d\n", ret); | ||
| 223 | return ret; | ||
| 224 | } | ||
| 225 | |||
| 226 | ticks = (buff[0] << 16) | (buff[1] << 8) | buff[2]; | ||
| 227 | seconds = ticks >> 10; | ||
| 228 | seconds += rtc->epoch_start; | ||
| 229 | |||
| 230 | rtc_time_to_tm(seconds, &alrm->time); | ||
| 231 | return 0; | ||
| 232 | } | ||
| 233 | |||
| 234 | static const struct rtc_class_ops tps6586x_rtc_ops = { | ||
| 235 | .read_time = tps6586x_rtc_read_time, | ||
| 236 | .set_time = tps6586x_rtc_set_time, | ||
| 237 | .set_alarm = tps6586x_rtc_set_alarm, | ||
| 238 | .read_alarm = tps6586x_rtc_read_alarm, | ||
| 239 | .alarm_irq_enable = tps6586x_rtc_alarm_irq_enable, | ||
| 240 | }; | ||
| 241 | |||
| 242 | static irqreturn_t tps6586x_rtc_irq(int irq, void *data) | ||
| 243 | { | ||
| 244 | struct tps6586x_rtc *rtc = data; | ||
| 245 | |||
| 246 | rtc_update_irq(rtc->rtc, 1, RTC_IRQF | RTC_AF); | ||
| 247 | return IRQ_HANDLED; | ||
| 248 | } | ||
| 249 | |||
| 250 | static int tps6586x_rtc_probe(struct platform_device *pdev) | ||
| 251 | { | ||
| 252 | struct device *tps_dev = to_tps6586x_dev(&pdev->dev); | ||
| 253 | struct tps6586x_rtc *rtc; | ||
| 254 | int ret; | ||
| 255 | |||
| 256 | rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); | ||
| 257 | if (!rtc) | ||
| 258 | return -ENOMEM; | ||
| 259 | |||
| 260 | rtc->dev = &pdev->dev; | ||
| 261 | rtc->irq = platform_get_irq(pdev, 0); | ||
| 262 | |||
| 263 | /* Set epoch start as 00:00:00:01:01:2009 */ | ||
| 264 | rtc->epoch_start = mktime(2009, 1, 1, 0, 0, 0); | ||
| 265 | |||
| 266 | /* 1 kHz tick mode, enable tick counting */ | ||
| 267 | ret = tps6586x_update(tps_dev, RTC_CTRL, | ||
| 268 | RTC_ENABLE | OSC_SRC_SEL | | ||
| 269 | ((TPS6586X_RTC_CL_SEL_1_5PF << CL_SEL_POS) & CL_SEL_MASK), | ||
| 270 | RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK); | ||
| 271 | if (ret < 0) { | ||
| 272 | dev_err(&pdev->dev, "unable to start counter\n"); | ||
| 273 | return ret; | ||
| 274 | } | ||
| 275 | |||
| 276 | platform_set_drvdata(pdev, rtc); | ||
| 277 | rtc->rtc = rtc_device_register(dev_name(&pdev->dev), &pdev->dev, | ||
| 278 | &tps6586x_rtc_ops, THIS_MODULE); | ||
| 279 | if (IS_ERR(rtc->rtc)) { | ||
| 280 | ret = PTR_ERR(rtc->rtc); | ||
| 281 | dev_err(&pdev->dev, "RTC device register: ret %d\n", ret); | ||
| 282 | goto fail_rtc_register; | ||
| 283 | } | ||
| 284 | |||
| 285 | ret = request_threaded_irq(rtc->irq, NULL, tps6586x_rtc_irq, | ||
| 286 | IRQF_ONESHOT | IRQF_EARLY_RESUME, | ||
| 287 | dev_name(&pdev->dev), rtc); | ||
| 288 | if (ret < 0) { | ||
| 289 | dev_err(&pdev->dev, "request IRQ(%d) failed with ret %d\n", | ||
| 290 | rtc->irq, ret); | ||
| 291 | goto fail_req_irq; | ||
| 292 | } | ||
| 293 | disable_irq(rtc->irq); | ||
| 294 | device_set_wakeup_capable(&pdev->dev, 1); | ||
| 295 | return 0; | ||
| 296 | |||
| 297 | fail_req_irq: | ||
| 298 | rtc_device_unregister(rtc->rtc); | ||
| 299 | |||
| 300 | fail_rtc_register: | ||
| 301 | tps6586x_update(tps_dev, RTC_CTRL, 0, | ||
| 302 | RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK); | ||
| 303 | return ret; | ||
| 304 | }; | ||
| 305 | |||
| 306 | static int tps6586x_rtc_remove(struct platform_device *pdev) | ||
| 307 | { | ||
| 308 | struct tps6586x_rtc *rtc = platform_get_drvdata(pdev); | ||
| 309 | struct device *tps_dev = to_tps6586x_dev(&pdev->dev); | ||
| 310 | |||
| 311 | tps6586x_update(tps_dev, RTC_CTRL, 0, | ||
| 312 | RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK); | ||
| 313 | rtc_device_unregister(rtc->rtc); | ||
| 314 | free_irq(rtc->irq, rtc); | ||
| 315 | return 0; | ||
| 316 | } | ||
| 317 | |||
| 318 | #ifdef CONFIG_PM_SLEEP | ||
| 319 | static int tps6586x_rtc_suspend(struct device *dev) | ||
| 320 | { | ||
| 321 | struct tps6586x_rtc *rtc = dev_get_drvdata(dev); | ||
| 322 | |||
| 323 | if (device_may_wakeup(dev)) | ||
| 324 | enable_irq_wake(rtc->irq); | ||
| 325 | return 0; | ||
| 326 | } | ||
| 327 | |||
| 328 | static int tps6586x_rtc_resume(struct device *dev) | ||
| 329 | { | ||
| 330 | struct tps6586x_rtc *rtc = dev_get_drvdata(dev); | ||
| 331 | |||
| 332 | if (device_may_wakeup(dev)) | ||
| 333 | disable_irq_wake(rtc->irq); | ||
| 334 | return 0; | ||
| 335 | } | ||
| 336 | #endif | ||
| 337 | |||
| 338 | static const struct dev_pm_ops tps6586x_pm_ops = { | ||
| 339 | SET_SYSTEM_SLEEP_PM_OPS(tps6586x_rtc_suspend, tps6586x_rtc_resume) | ||
| 340 | }; | ||
| 341 | |||
| 342 | static struct platform_driver tps6586x_rtc_driver = { | ||
| 343 | .driver = { | ||
| 344 | .name = "tps6586x-rtc", | ||
| 345 | .owner = THIS_MODULE, | ||
| 346 | .pm = &tps6586x_pm_ops, | ||
| 347 | }, | ||
| 348 | .probe = tps6586x_rtc_probe, | ||
| 349 | .remove = tps6586x_rtc_remove, | ||
| 350 | }; | ||
| 351 | module_platform_driver(tps6586x_rtc_driver); | ||
| 352 | |||
| 353 | MODULE_ALIAS("platform:rtc-tps6586x"); | ||
| 354 | MODULE_DESCRIPTION("TI TPS6586x RTC driver"); | ||
| 355 | MODULE_AUTHOR("Laxman dewangan <ldewangan@nvidia.com>"); | ||
| 356 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c index 22eb4ebfa1a6..e5fef141a0e2 100644 --- a/drivers/rtc/rtc-tps65910.c +++ b/drivers/rtc/rtc-tps65910.c | |||
| @@ -222,7 +222,7 @@ static const struct rtc_class_ops tps65910_rtc_ops = { | |||
| 222 | .alarm_irq_enable = tps65910_rtc_alarm_irq_enable, | 222 | .alarm_irq_enable = tps65910_rtc_alarm_irq_enable, |
| 223 | }; | 223 | }; |
| 224 | 224 | ||
| 225 | static int __devinit tps65910_rtc_probe(struct platform_device *pdev) | 225 | static int tps65910_rtc_probe(struct platform_device *pdev) |
| 226 | { | 226 | { |
| 227 | struct tps65910 *tps65910 = NULL; | 227 | struct tps65910 *tps65910 = NULL; |
| 228 | struct tps65910_rtc *tps_rtc = NULL; | 228 | struct tps65910_rtc *tps_rtc = NULL; |
| @@ -292,7 +292,7 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev) | |||
| 292 | * Disable tps65910 RTC interrupts. | 292 | * Disable tps65910 RTC interrupts. |
| 293 | * Sets status flag to free. | 293 | * Sets status flag to free. |
| 294 | */ | 294 | */ |
| 295 | static int __devexit tps65910_rtc_remove(struct platform_device *pdev) | 295 | static int tps65910_rtc_remove(struct platform_device *pdev) |
| 296 | { | 296 | { |
| 297 | /* leave rtc running, but disable irqs */ | 297 | /* leave rtc running, but disable irqs */ |
| 298 | struct tps65910_rtc *tps_rtc = platform_get_drvdata(pdev); | 298 | struct tps65910_rtc *tps_rtc = platform_get_drvdata(pdev); |
| @@ -342,7 +342,7 @@ static const struct dev_pm_ops tps65910_rtc_pm_ops = { | |||
| 342 | 342 | ||
| 343 | static struct platform_driver tps65910_rtc_driver = { | 343 | static struct platform_driver tps65910_rtc_driver = { |
| 344 | .probe = tps65910_rtc_probe, | 344 | .probe = tps65910_rtc_probe, |
| 345 | .remove = __devexit_p(tps65910_rtc_remove), | 345 | .remove = tps65910_rtc_remove, |
| 346 | .driver = { | 346 | .driver = { |
| 347 | .owner = THIS_MODULE, | 347 | .owner = THIS_MODULE, |
| 348 | .name = "tps65910-rtc", | 348 | .name = "tps65910-rtc", |
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c index 8b7464c8b5cf..ccd4ad370b32 100644 --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c | |||
| @@ -458,7 +458,7 @@ static struct rtc_class_ops twl_rtc_ops = { | |||
| 458 | 458 | ||
| 459 | /*----------------------------------------------------------------------*/ | 459 | /*----------------------------------------------------------------------*/ |
| 460 | 460 | ||
| 461 | static int __devinit twl_rtc_probe(struct platform_device *pdev) | 461 | static int twl_rtc_probe(struct platform_device *pdev) |
| 462 | { | 462 | { |
| 463 | struct rtc_device *rtc; | 463 | struct rtc_device *rtc; |
| 464 | int ret = -EINVAL; | 464 | int ret = -EINVAL; |
| @@ -535,7 +535,7 @@ out1: | |||
| 535 | * Disable all TWL RTC module interrupts. | 535 | * Disable all TWL RTC module interrupts. |
| 536 | * Sets status flag to free. | 536 | * Sets status flag to free. |
| 537 | */ | 537 | */ |
| 538 | static int __devexit twl_rtc_remove(struct platform_device *pdev) | 538 | static int twl_rtc_remove(struct platform_device *pdev) |
| 539 | { | 539 | { |
| 540 | /* leave rtc running, but disable irqs */ | 540 | /* leave rtc running, but disable irqs */ |
| 541 | struct rtc_device *rtc = platform_get_drvdata(pdev); | 541 | struct rtc_device *rtc = platform_get_drvdata(pdev); |
| @@ -597,7 +597,7 @@ MODULE_ALIAS("platform:twl_rtc"); | |||
| 597 | 597 | ||
| 598 | static struct platform_driver twl4030rtc_driver = { | 598 | static struct platform_driver twl4030rtc_driver = { |
| 599 | .probe = twl_rtc_probe, | 599 | .probe = twl_rtc_probe, |
| 600 | .remove = __devexit_p(twl_rtc_remove), | 600 | .remove = twl_rtc_remove, |
| 601 | .shutdown = twl_rtc_shutdown, | 601 | .shutdown = twl_rtc_shutdown, |
| 602 | .suspend = twl_rtc_suspend, | 602 | .suspend = twl_rtc_suspend, |
| 603 | .resume = twl_rtc_resume, | 603 | .resume = twl_rtc_resume, |
diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c index 5f60a7c6a155..6c3774cf5a24 100644 --- a/drivers/rtc/rtc-vr41xx.c +++ b/drivers/rtc/rtc-vr41xx.c | |||
| @@ -280,7 +280,7 @@ static const struct rtc_class_ops vr41xx_rtc_ops = { | |||
| 280 | .set_alarm = vr41xx_rtc_set_alarm, | 280 | .set_alarm = vr41xx_rtc_set_alarm, |
| 281 | }; | 281 | }; |
| 282 | 282 | ||
| 283 | static int __devinit rtc_probe(struct platform_device *pdev) | 283 | static int rtc_probe(struct platform_device *pdev) |
| 284 | { | 284 | { |
| 285 | struct resource *res; | 285 | struct resource *res; |
| 286 | struct rtc_device *rtc; | 286 | struct rtc_device *rtc; |
| @@ -373,7 +373,7 @@ err_rtc1_iounmap: | |||
| 373 | return retval; | 373 | return retval; |
| 374 | } | 374 | } |
| 375 | 375 | ||
| 376 | static int __devexit rtc_remove(struct platform_device *pdev) | 376 | static int rtc_remove(struct platform_device *pdev) |
| 377 | { | 377 | { |
| 378 | struct rtc_device *rtc; | 378 | struct rtc_device *rtc; |
| 379 | 379 | ||
| @@ -398,7 +398,7 @@ MODULE_ALIAS("platform:RTC"); | |||
| 398 | 398 | ||
| 399 | static struct platform_driver rtc_platform_driver = { | 399 | static struct platform_driver rtc_platform_driver = { |
| 400 | .probe = rtc_probe, | 400 | .probe = rtc_probe, |
| 401 | .remove = __devexit_p(rtc_remove), | 401 | .remove = rtc_remove, |
| 402 | .driver = { | 402 | .driver = { |
| 403 | .name = rtc_name, | 403 | .name = rtc_name, |
| 404 | .owner = THIS_MODULE, | 404 | .owner = THIS_MODULE, |
diff --git a/drivers/rtc/rtc-vt8500.c b/drivers/rtc/rtc-vt8500.c index 14e2d8cfcc83..00c930f4b6f3 100644 --- a/drivers/rtc/rtc-vt8500.c +++ b/drivers/rtc/rtc-vt8500.c | |||
| @@ -70,7 +70,7 @@ | |||
| 70 | | ALARM_SEC_BIT) | 70 | | ALARM_SEC_BIT) |
| 71 | 71 | ||
| 72 | #define VT8500_RTC_CR_ENABLE (1 << 0) /* Enable RTC */ | 72 | #define VT8500_RTC_CR_ENABLE (1 << 0) /* Enable RTC */ |
| 73 | #define VT8500_RTC_CR_24H (1 << 1) /* 24h time format */ | 73 | #define VT8500_RTC_CR_12H (1 << 1) /* 12h time format */ |
| 74 | #define VT8500_RTC_CR_SM_ENABLE (1 << 2) /* Enable periodic irqs */ | 74 | #define VT8500_RTC_CR_SM_ENABLE (1 << 2) /* Enable periodic irqs */ |
| 75 | #define VT8500_RTC_CR_SM_SEC (1 << 3) /* 0: 1Hz/60, 1: 1Hz */ | 75 | #define VT8500_RTC_CR_SM_SEC (1 << 3) /* 0: 1Hz/60, 1: 1Hz */ |
| 76 | #define VT8500_RTC_CR_CALIB (1 << 4) /* Enable calibration */ | 76 | #define VT8500_RTC_CR_CALIB (1 << 4) /* Enable calibration */ |
| @@ -119,7 +119,7 @@ static int vt8500_rtc_read_time(struct device *dev, struct rtc_time *tm) | |||
| 119 | tm->tm_min = bcd2bin((time & TIME_MIN_MASK) >> TIME_MIN_S); | 119 | tm->tm_min = bcd2bin((time & TIME_MIN_MASK) >> TIME_MIN_S); |
| 120 | tm->tm_hour = bcd2bin((time & TIME_HOUR_MASK) >> TIME_HOUR_S); | 120 | tm->tm_hour = bcd2bin((time & TIME_HOUR_MASK) >> TIME_HOUR_S); |
| 121 | tm->tm_mday = bcd2bin(date & DATE_DAY_MASK); | 121 | tm->tm_mday = bcd2bin(date & DATE_DAY_MASK); |
| 122 | tm->tm_mon = bcd2bin((date & DATE_MONTH_MASK) >> DATE_MONTH_S); | 122 | tm->tm_mon = bcd2bin((date & DATE_MONTH_MASK) >> DATE_MONTH_S) - 1; |
| 123 | tm->tm_year = bcd2bin((date & DATE_YEAR_MASK) >> DATE_YEAR_S) | 123 | tm->tm_year = bcd2bin((date & DATE_YEAR_MASK) >> DATE_YEAR_S) |
| 124 | + ((date >> DATE_CENTURY_S) & 1 ? 200 : 100); | 124 | + ((date >> DATE_CENTURY_S) & 1 ? 200 : 100); |
| 125 | tm->tm_wday = (time & TIME_DOW_MASK) >> TIME_DOW_S; | 125 | tm->tm_wday = (time & TIME_DOW_MASK) >> TIME_DOW_S; |
| @@ -138,8 +138,9 @@ static int vt8500_rtc_set_time(struct device *dev, struct rtc_time *tm) | |||
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | writel((bin2bcd(tm->tm_year - 100) << DATE_YEAR_S) | 140 | writel((bin2bcd(tm->tm_year - 100) << DATE_YEAR_S) |
| 141 | | (bin2bcd(tm->tm_mon) << DATE_MONTH_S) | 141 | | (bin2bcd(tm->tm_mon + 1) << DATE_MONTH_S) |
| 142 | | (bin2bcd(tm->tm_mday)), | 142 | | (bin2bcd(tm->tm_mday)) |
| 143 | | ((tm->tm_year >= 200) << DATE_CENTURY_S), | ||
| 143 | vt8500_rtc->regbase + VT8500_RTC_DS); | 144 | vt8500_rtc->regbase + VT8500_RTC_DS); |
| 144 | writel((bin2bcd(tm->tm_wday) << TIME_DOW_S) | 145 | writel((bin2bcd(tm->tm_wday) << TIME_DOW_S) |
| 145 | | (bin2bcd(tm->tm_hour) << TIME_HOUR_S) | 146 | | (bin2bcd(tm->tm_hour) << TIME_HOUR_S) |
| @@ -205,7 +206,7 @@ static const struct rtc_class_ops vt8500_rtc_ops = { | |||
| 205 | .alarm_irq_enable = vt8500_alarm_irq_enable, | 206 | .alarm_irq_enable = vt8500_alarm_irq_enable, |
| 206 | }; | 207 | }; |
| 207 | 208 | ||
| 208 | static int __devinit vt8500_rtc_probe(struct platform_device *pdev) | 209 | static int vt8500_rtc_probe(struct platform_device *pdev) |
| 209 | { | 210 | { |
| 210 | struct vt8500_rtc *vt8500_rtc; | 211 | struct vt8500_rtc *vt8500_rtc; |
| 211 | int ret; | 212 | int ret; |
| @@ -247,7 +248,7 @@ static int __devinit vt8500_rtc_probe(struct platform_device *pdev) | |||
| 247 | } | 248 | } |
| 248 | 249 | ||
| 249 | /* Enable RTC and set it to 24-hour mode */ | 250 | /* Enable RTC and set it to 24-hour mode */ |
| 250 | writel(VT8500_RTC_CR_ENABLE | VT8500_RTC_CR_24H, | 251 | writel(VT8500_RTC_CR_ENABLE, |
| 251 | vt8500_rtc->regbase + VT8500_RTC_CR); | 252 | vt8500_rtc->regbase + VT8500_RTC_CR); |
| 252 | 253 | ||
| 253 | vt8500_rtc->rtc = rtc_device_register("vt8500-rtc", &pdev->dev, | 254 | vt8500_rtc->rtc = rtc_device_register("vt8500-rtc", &pdev->dev, |
| @@ -279,7 +280,7 @@ err_release: | |||
| 279 | return ret; | 280 | return ret; |
| 280 | } | 281 | } |
| 281 | 282 | ||
| 282 | static int __devexit vt8500_rtc_remove(struct platform_device *pdev) | 283 | static int vt8500_rtc_remove(struct platform_device *pdev) |
| 283 | { | 284 | { |
| 284 | struct vt8500_rtc *vt8500_rtc = platform_get_drvdata(pdev); | 285 | struct vt8500_rtc *vt8500_rtc = platform_get_drvdata(pdev); |
| 285 | 286 | ||
| @@ -305,7 +306,7 @@ static const struct of_device_id wmt_dt_ids[] = { | |||
| 305 | 306 | ||
| 306 | static struct platform_driver vt8500_rtc_driver = { | 307 | static struct platform_driver vt8500_rtc_driver = { |
| 307 | .probe = vt8500_rtc_probe, | 308 | .probe = vt8500_rtc_probe, |
| 308 | .remove = __devexit_p(vt8500_rtc_remove), | 309 | .remove = vt8500_rtc_remove, |
| 309 | .driver = { | 310 | .driver = { |
| 310 | .name = "vt8500-rtc", | 311 | .name = "vt8500-rtc", |
| 311 | .owner = THIS_MODULE, | 312 | .owner = THIS_MODULE, |
diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c index ea5c6f857ca5..1b0affbe2659 100644 --- a/drivers/rtc/rtc-wm831x.c +++ b/drivers/rtc/rtc-wm831x.c | |||
| @@ -459,7 +459,7 @@ err: | |||
| 459 | return ret; | 459 | return ret; |
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | static int __devexit wm831x_rtc_remove(struct platform_device *pdev) | 462 | static int wm831x_rtc_remove(struct platform_device *pdev) |
| 463 | { | 463 | { |
| 464 | struct wm831x_rtc *wm831x_rtc = platform_get_drvdata(pdev); | 464 | struct wm831x_rtc *wm831x_rtc = platform_get_drvdata(pdev); |
| 465 | int alm_irq = platform_get_irq_byname(pdev, "ALM"); | 465 | int alm_irq = platform_get_irq_byname(pdev, "ALM"); |
| @@ -483,7 +483,7 @@ static const struct dev_pm_ops wm831x_rtc_pm_ops = { | |||
| 483 | 483 | ||
| 484 | static struct platform_driver wm831x_rtc_driver = { | 484 | static struct platform_driver wm831x_rtc_driver = { |
| 485 | .probe = wm831x_rtc_probe, | 485 | .probe = wm831x_rtc_probe, |
| 486 | .remove = __devexit_p(wm831x_rtc_remove), | 486 | .remove = wm831x_rtc_remove, |
| 487 | .driver = { | 487 | .driver = { |
| 488 | .name = "wm831x-rtc", | 488 | .name = "wm831x-rtc", |
| 489 | .pm = &wm831x_rtc_pm_ops, | 489 | .pm = &wm831x_rtc_pm_ops, |
diff --git a/drivers/rtc/rtc-wm8350.c b/drivers/rtc/rtc-wm8350.c index c2e52d15abb2..8ad86ae0d30f 100644 --- a/drivers/rtc/rtc-wm8350.c +++ b/drivers/rtc/rtc-wm8350.c | |||
| @@ -459,7 +459,7 @@ static int wm8350_rtc_probe(struct platform_device *pdev) | |||
| 459 | return 0; | 459 | return 0; |
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | static int __devexit wm8350_rtc_remove(struct platform_device *pdev) | 462 | static int wm8350_rtc_remove(struct platform_device *pdev) |
| 463 | { | 463 | { |
| 464 | struct wm8350 *wm8350 = platform_get_drvdata(pdev); | 464 | struct wm8350 *wm8350 = platform_get_drvdata(pdev); |
| 465 | struct wm8350_rtc *wm_rtc = &wm8350->rtc; | 465 | struct wm8350_rtc *wm_rtc = &wm8350->rtc; |
| @@ -479,7 +479,7 @@ static struct dev_pm_ops wm8350_rtc_pm_ops = { | |||
| 479 | 479 | ||
| 480 | static struct platform_driver wm8350_rtc_driver = { | 480 | static struct platform_driver wm8350_rtc_driver = { |
| 481 | .probe = wm8350_rtc_probe, | 481 | .probe = wm8350_rtc_probe, |
| 482 | .remove = __devexit_p(wm8350_rtc_remove), | 482 | .remove = wm8350_rtc_remove, |
| 483 | .driver = { | 483 | .driver = { |
| 484 | .name = "wm8350-rtc", | 484 | .name = "wm8350-rtc", |
| 485 | .pm = &wm8350_rtc_pm_ops, | 485 | .pm = &wm8350_rtc_pm_ops, |
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c index 9bd5da36f99e..704488d0f819 100644 --- a/drivers/s390/block/dasd_diag.c +++ b/drivers/s390/block/dasd_diag.c | |||
| @@ -248,7 +248,7 @@ static void dasd_ext_handler(struct ext_code ext_code, | |||
| 248 | default: | 248 | default: |
| 249 | return; | 249 | return; |
| 250 | } | 250 | } |
| 251 | kstat_cpu(smp_processor_id()).irqs[EXTINT_DSD]++; | 251 | inc_irq_stat(IRQEXT_DSD); |
| 252 | if (!ip) { /* no intparm: unsolicited interrupt */ | 252 | if (!ip) { /* no intparm: unsolicited interrupt */ |
| 253 | DBF_EVENT(DBF_NOTICE, "%s", "caught unsolicited " | 253 | DBF_EVENT(DBF_NOTICE, "%s", "caught unsolicited " |
| 254 | "interrupt"); | 254 | "interrupt"); |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 806fe912d6e7..e37bc1620d14 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
| @@ -4274,7 +4274,7 @@ static struct ccw_driver dasd_eckd_driver = { | |||
| 4274 | .thaw = dasd_generic_restore_device, | 4274 | .thaw = dasd_generic_restore_device, |
| 4275 | .restore = dasd_generic_restore_device, | 4275 | .restore = dasd_generic_restore_device, |
| 4276 | .uc_handler = dasd_generic_uc_handler, | 4276 | .uc_handler = dasd_generic_uc_handler, |
| 4277 | .int_class = IOINT_DAS, | 4277 | .int_class = IRQIO_DAS, |
| 4278 | }; | 4278 | }; |
| 4279 | 4279 | ||
| 4280 | /* | 4280 | /* |
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c index eb748507c7fa..414698584344 100644 --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c | |||
| @@ -78,7 +78,7 @@ static struct ccw_driver dasd_fba_driver = { | |||
| 78 | .freeze = dasd_generic_pm_freeze, | 78 | .freeze = dasd_generic_pm_freeze, |
| 79 | .thaw = dasd_generic_restore_device, | 79 | .thaw = dasd_generic_restore_device, |
| 80 | .restore = dasd_generic_restore_device, | 80 | .restore = dasd_generic_restore_device, |
| 81 | .int_class = IOINT_DAS, | 81 | .int_class = IRQIO_DAS, |
| 82 | }; | 82 | }; |
| 83 | 83 | ||
| 84 | static void | 84 | static void |
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 40084501c31b..33b7141a182f 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c | |||
| @@ -44,6 +44,7 @@ | |||
| 44 | #define RAW3215_NR_CCWS 3 | 44 | #define RAW3215_NR_CCWS 3 |
| 45 | #define RAW3215_TIMEOUT HZ/10 /* time for delayed output */ | 45 | #define RAW3215_TIMEOUT HZ/10 /* time for delayed output */ |
| 46 | 46 | ||
| 47 | #define RAW3215_FIXED 1 /* 3215 console device is not be freed */ | ||
| 47 | #define RAW3215_WORKING 4 /* set if a request is being worked on */ | 48 | #define RAW3215_WORKING 4 /* set if a request is being worked on */ |
| 48 | #define RAW3215_THROTTLED 8 /* set if reading is disabled */ | 49 | #define RAW3215_THROTTLED 8 /* set if reading is disabled */ |
| 49 | #define RAW3215_STOPPED 16 /* set if writing is disabled */ | 50 | #define RAW3215_STOPPED 16 /* set if writing is disabled */ |
| @@ -630,7 +631,8 @@ static void raw3215_shutdown(struct raw3215_info *raw) | |||
| 630 | DECLARE_WAITQUEUE(wait, current); | 631 | DECLARE_WAITQUEUE(wait, current); |
| 631 | unsigned long flags; | 632 | unsigned long flags; |
| 632 | 633 | ||
| 633 | if (!(raw->port.flags & ASYNC_INITIALIZED)) | 634 | if (!(raw->port.flags & ASYNC_INITIALIZED) || |
| 635 | (raw->flags & RAW3215_FIXED)) | ||
| 634 | return; | 636 | return; |
| 635 | /* Wait for outstanding requests, then free irq */ | 637 | /* Wait for outstanding requests, then free irq */ |
| 636 | spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); | 638 | spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); |
| @@ -805,7 +807,7 @@ static struct ccw_driver raw3215_ccw_driver = { | |||
| 805 | .freeze = &raw3215_pm_stop, | 807 | .freeze = &raw3215_pm_stop, |
| 806 | .thaw = &raw3215_pm_start, | 808 | .thaw = &raw3215_pm_start, |
| 807 | .restore = &raw3215_pm_start, | 809 | .restore = &raw3215_pm_start, |
| 808 | .int_class = IOINT_C15, | 810 | .int_class = IRQIO_C15, |
| 809 | }; | 811 | }; |
| 810 | 812 | ||
| 811 | #ifdef CONFIG_TN3215_CONSOLE | 813 | #ifdef CONFIG_TN3215_CONSOLE |
| @@ -927,6 +929,8 @@ static int __init con3215_init(void) | |||
| 927 | dev_set_drvdata(&cdev->dev, raw); | 929 | dev_set_drvdata(&cdev->dev, raw); |
| 928 | cdev->handler = raw3215_irq; | 930 | cdev->handler = raw3215_irq; |
| 929 | 931 | ||
| 932 | raw->flags |= RAW3215_FIXED; | ||
| 933 | |||
| 930 | /* Request the console irq */ | 934 | /* Request the console irq */ |
| 931 | if (raw3215_startup(raw) != 0) { | 935 | if (raw3215_startup(raw) != 0) { |
| 932 | raw3215_free_info(raw); | 936 | raw3215_free_info(raw); |
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index f3b8bb84faf2..9a6c140c5f07 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c | |||
| @@ -1396,7 +1396,7 @@ static struct ccw_driver raw3270_ccw_driver = { | |||
| 1396 | .freeze = &raw3270_pm_stop, | 1396 | .freeze = &raw3270_pm_stop, |
| 1397 | .thaw = &raw3270_pm_start, | 1397 | .thaw = &raw3270_pm_start, |
| 1398 | .restore = &raw3270_pm_start, | 1398 | .restore = &raw3270_pm_start, |
| 1399 | .int_class = IOINT_C70, | 1399 | .int_class = IRQIO_C70, |
| 1400 | }; | 1400 | }; |
| 1401 | 1401 | ||
| 1402 | static int | 1402 | static int |
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index 4fa21f7e2308..12c16a65dd25 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c | |||
| @@ -400,7 +400,7 @@ static void sclp_interrupt_handler(struct ext_code ext_code, | |||
| 400 | u32 finished_sccb; | 400 | u32 finished_sccb; |
| 401 | u32 evbuf_pending; | 401 | u32 evbuf_pending; |
| 402 | 402 | ||
| 403 | kstat_cpu(smp_processor_id()).irqs[EXTINT_SCP]++; | 403 | inc_irq_stat(IRQEXT_SCP); |
| 404 | spin_lock(&sclp_lock); | 404 | spin_lock(&sclp_lock); |
| 405 | finished_sccb = param32 & 0xfffffff8; | 405 | finished_sccb = param32 & 0xfffffff8; |
| 406 | evbuf_pending = param32 & 0x3; | 406 | evbuf_pending = param32 & 0x3; |
| @@ -813,7 +813,7 @@ static void sclp_check_handler(struct ext_code ext_code, | |||
| 813 | { | 813 | { |
| 814 | u32 finished_sccb; | 814 | u32 finished_sccb; |
| 815 | 815 | ||
| 816 | kstat_cpu(smp_processor_id()).irqs[EXTINT_SCP]++; | 816 | inc_irq_stat(IRQEXT_SCP); |
| 817 | finished_sccb = param32 & 0xfffffff8; | 817 | finished_sccb = param32 & 0xfffffff8; |
| 818 | /* Is this the interrupt we are waiting for? */ | 818 | /* Is this the interrupt we are waiting for? */ |
| 819 | if (finished_sccb == 0) | 819 | if (finished_sccb == 0) |
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index 6ae929c024ae..9aa79702b370 100644 --- a/drivers/s390/char/tape_34xx.c +++ b/drivers/s390/char/tape_34xx.c | |||
| @@ -1193,7 +1193,7 @@ static struct ccw_driver tape_34xx_driver = { | |||
| 1193 | .set_online = tape_34xx_online, | 1193 | .set_online = tape_34xx_online, |
| 1194 | .set_offline = tape_generic_offline, | 1194 | .set_offline = tape_generic_offline, |
| 1195 | .freeze = tape_generic_pm_suspend, | 1195 | .freeze = tape_generic_pm_suspend, |
| 1196 | .int_class = IOINT_TAP, | 1196 | .int_class = IRQIO_TAP, |
| 1197 | }; | 1197 | }; |
| 1198 | 1198 | ||
| 1199 | static int | 1199 | static int |
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index 1b0eb49f739c..327cb19ad0b0 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c | |||
| @@ -1656,7 +1656,7 @@ static struct ccw_driver tape_3590_driver = { | |||
| 1656 | .set_offline = tape_generic_offline, | 1656 | .set_offline = tape_generic_offline, |
| 1657 | .set_online = tape_3590_online, | 1657 | .set_online = tape_3590_online, |
| 1658 | .freeze = tape_generic_pm_suspend, | 1658 | .freeze = tape_generic_pm_suspend, |
| 1659 | .int_class = IOINT_TAP, | 1659 | .int_class = IRQIO_TAP, |
| 1660 | }; | 1660 | }; |
| 1661 | 1661 | ||
| 1662 | /* | 1662 | /* |
diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c index 73bef0bd394c..483f72ba030d 100644 --- a/drivers/s390/char/vmur.c +++ b/drivers/s390/char/vmur.c | |||
| @@ -74,7 +74,7 @@ static struct ccw_driver ur_driver = { | |||
| 74 | .set_online = ur_set_online, | 74 | .set_online = ur_set_online, |
| 75 | .set_offline = ur_set_offline, | 75 | .set_offline = ur_set_offline, |
| 76 | .freeze = ur_pm_suspend, | 76 | .freeze = ur_pm_suspend, |
| 77 | .int_class = IOINT_VMR, | 77 | .int_class = IRQIO_VMR, |
| 78 | }; | 78 | }; |
| 79 | 79 | ||
| 80 | static DEFINE_MUTEX(vmur_mutex); | 80 | static DEFINE_MUTEX(vmur_mutex); |
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 68e80e2734a4..10729bbceced 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
| @@ -283,7 +283,7 @@ struct chsc_sei_nt2_area { | |||
| 283 | u8 ccdf[PAGE_SIZE - 24 - 56]; /* content-code dependent field */ | 283 | u8 ccdf[PAGE_SIZE - 24 - 56]; /* content-code dependent field */ |
| 284 | } __packed; | 284 | } __packed; |
| 285 | 285 | ||
| 286 | #define CHSC_SEI_NT0 0ULL | 286 | #define CHSC_SEI_NT0 (1ULL << 63) |
| 287 | #define CHSC_SEI_NT2 (1ULL << 61) | 287 | #define CHSC_SEI_NT2 (1ULL << 61) |
| 288 | 288 | ||
| 289 | struct chsc_sei { | 289 | struct chsc_sei { |
| @@ -291,7 +291,8 @@ struct chsc_sei { | |||
| 291 | u32 reserved1; | 291 | u32 reserved1; |
| 292 | u64 ntsm; /* notification type mask */ | 292 | u64 ntsm; /* notification type mask */ |
| 293 | struct chsc_header response; | 293 | struct chsc_header response; |
| 294 | u32 reserved2; | 294 | u32 :24; |
| 295 | u8 nt; | ||
| 295 | union { | 296 | union { |
| 296 | struct chsc_sei_nt0_area nt0_area; | 297 | struct chsc_sei_nt0_area nt0_area; |
| 297 | struct chsc_sei_nt2_area nt2_area; | 298 | struct chsc_sei_nt2_area nt2_area; |
| @@ -496,17 +497,17 @@ static int __chsc_process_crw(struct chsc_sei *sei, u64 ntsm) | |||
| 496 | css_schedule_eval_all(); | 497 | css_schedule_eval_all(); |
| 497 | } | 498 | } |
| 498 | 499 | ||
| 499 | switch (sei->ntsm) { | 500 | switch (sei->nt) { |
| 500 | case CHSC_SEI_NT0: | 501 | case 0: |
| 501 | chsc_process_sei_nt0(&sei->u.nt0_area); | 502 | chsc_process_sei_nt0(&sei->u.nt0_area); |
| 502 | return 1; | 503 | break; |
| 503 | case CHSC_SEI_NT2: | 504 | case 2: |
| 504 | chsc_process_sei_nt2(&sei->u.nt2_area); | 505 | chsc_process_sei_nt2(&sei->u.nt2_area); |
| 505 | return 1; | 506 | break; |
| 506 | default: | 507 | default: |
| 507 | CIO_CRW_EVENT(2, "chsc: unhandled nt (nt=%08Lx)\n", | 508 | CIO_CRW_EVENT(2, "chsc: unhandled nt=%d\n", |
| 508 | sei->ntsm); | 509 | sei->nt); |
| 509 | return 0; | 510 | break; |
| 510 | } | 511 | } |
| 511 | } else { | 512 | } else { |
| 512 | CIO_CRW_EVENT(2, "chsc: sei failed (rc=%04x)\n", | 513 | CIO_CRW_EVENT(2, "chsc: sei failed (rc=%04x)\n", |
| @@ -537,15 +538,7 @@ static void chsc_process_crw(struct crw *crw0, struct crw *crw1, int overflow) | |||
| 537 | sei = sei_page; | 538 | sei = sei_page; |
| 538 | 539 | ||
| 539 | CIO_TRACE_EVENT(2, "prcss"); | 540 | CIO_TRACE_EVENT(2, "prcss"); |
| 540 | 541 | __chsc_process_crw(sei, CHSC_SEI_NT0 | CHSC_SEI_NT2); | |
| 541 | /* | ||
| 542 | * The ntsm does not allow to select NT0 and NT2 together. We need to | ||
| 543 | * first check for NT2, than additionally for NT0... | ||
| 544 | */ | ||
| 545 | #ifdef CONFIG_PCI | ||
| 546 | if (!__chsc_process_crw(sei, CHSC_SEI_NT2)) | ||
| 547 | #endif | ||
| 548 | __chsc_process_crw(sei, CHSC_SEI_NT0); | ||
| 549 | } | 542 | } |
| 550 | 543 | ||
| 551 | void chsc_chp_online(struct chp_id chpid) | 544 | void chsc_chp_online(struct chp_id chpid) |
diff --git a/drivers/s390/cio/chsc_sch.c b/drivers/s390/cio/chsc_sch.c index 8f9a1a384496..facdf809113f 100644 --- a/drivers/s390/cio/chsc_sch.c +++ b/drivers/s390/cio/chsc_sch.c | |||
| @@ -58,7 +58,7 @@ static void chsc_subchannel_irq(struct subchannel *sch) | |||
| 58 | 58 | ||
| 59 | CHSC_LOG(4, "irb"); | 59 | CHSC_LOG(4, "irb"); |
| 60 | CHSC_LOG_HEX(4, irb, sizeof(*irb)); | 60 | CHSC_LOG_HEX(4, irb, sizeof(*irb)); |
| 61 | kstat_cpu(smp_processor_id()).irqs[IOINT_CSC]++; | 61 | inc_irq_stat(IRQIO_CSC); |
| 62 | 62 | ||
| 63 | /* Copy irb to provided request and set done. */ | 63 | /* Copy irb to provided request and set done. */ |
| 64 | if (!request) { | 64 | if (!request) { |
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 8e927b9f285f..c8faf6230b0f 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
| @@ -611,7 +611,7 @@ void __irq_entry do_IRQ(struct pt_regs *regs) | |||
| 611 | tpi_info = (struct tpi_info *)&S390_lowcore.subchannel_id; | 611 | tpi_info = (struct tpi_info *)&S390_lowcore.subchannel_id; |
| 612 | irb = (struct irb *)&S390_lowcore.irb; | 612 | irb = (struct irb *)&S390_lowcore.irb; |
| 613 | do { | 613 | do { |
| 614 | kstat_cpu(smp_processor_id()).irqs[IO_INTERRUPT]++; | 614 | kstat_incr_irqs_this_cpu(IO_INTERRUPT, NULL); |
| 615 | if (tpi_info->adapter_IO) { | 615 | if (tpi_info->adapter_IO) { |
| 616 | do_adapter_IO(tpi_info->isc); | 616 | do_adapter_IO(tpi_info->isc); |
| 617 | continue; | 617 | continue; |
| @@ -619,7 +619,7 @@ void __irq_entry do_IRQ(struct pt_regs *regs) | |||
| 619 | sch = (struct subchannel *)(unsigned long)tpi_info->intparm; | 619 | sch = (struct subchannel *)(unsigned long)tpi_info->intparm; |
| 620 | if (!sch) { | 620 | if (!sch) { |
| 621 | /* Clear pending interrupt condition. */ | 621 | /* Clear pending interrupt condition. */ |
| 622 | kstat_cpu(smp_processor_id()).irqs[IOINT_CIO]++; | 622 | inc_irq_stat(IRQIO_CIO); |
| 623 | tsch(tpi_info->schid, irb); | 623 | tsch(tpi_info->schid, irb); |
| 624 | continue; | 624 | continue; |
| 625 | } | 625 | } |
| @@ -633,9 +633,9 @@ void __irq_entry do_IRQ(struct pt_regs *regs) | |||
| 633 | if (sch->driver && sch->driver->irq) | 633 | if (sch->driver && sch->driver->irq) |
| 634 | sch->driver->irq(sch); | 634 | sch->driver->irq(sch); |
| 635 | else | 635 | else |
| 636 | kstat_cpu(smp_processor_id()).irqs[IOINT_CIO]++; | 636 | inc_irq_stat(IRQIO_CIO); |
| 637 | } else | 637 | } else |
| 638 | kstat_cpu(smp_processor_id()).irqs[IOINT_CIO]++; | 638 | inc_irq_stat(IRQIO_CIO); |
| 639 | spin_unlock(sch->lock); | 639 | spin_unlock(sch->lock); |
| 640 | /* | 640 | /* |
| 641 | * Are more interrupts pending? | 641 | * Are more interrupts pending? |
| @@ -678,7 +678,7 @@ static void cio_tsch(struct subchannel *sch) | |||
| 678 | if (sch->driver && sch->driver->irq) | 678 | if (sch->driver && sch->driver->irq) |
| 679 | sch->driver->irq(sch); | 679 | sch->driver->irq(sch); |
| 680 | else | 680 | else |
| 681 | kstat_cpu(smp_processor_id()).irqs[IOINT_CIO]++; | 681 | inc_irq_stat(IRQIO_CIO); |
| 682 | if (!irq_context) { | 682 | if (!irq_context) { |
| 683 | irq_exit(); | 683 | irq_exit(); |
| 684 | _local_bh_enable(); | 684 | _local_bh_enable(); |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 6995cff44636..7cd5c6812ac7 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
| @@ -758,7 +758,7 @@ static int io_subchannel_initialize_dev(struct subchannel *sch, | |||
| 758 | struct ccw_device *cdev) | 758 | struct ccw_device *cdev) |
| 759 | { | 759 | { |
| 760 | cdev->private->cdev = cdev; | 760 | cdev->private->cdev = cdev; |
| 761 | cdev->private->int_class = IOINT_CIO; | 761 | cdev->private->int_class = IRQIO_CIO; |
| 762 | atomic_set(&cdev->private->onoff, 0); | 762 | atomic_set(&cdev->private->onoff, 0); |
| 763 | cdev->dev.parent = &sch->dev; | 763 | cdev->dev.parent = &sch->dev; |
| 764 | cdev->dev.release = ccw_device_release; | 764 | cdev->dev.release = ccw_device_release; |
| @@ -1023,7 +1023,7 @@ static void io_subchannel_irq(struct subchannel *sch) | |||
| 1023 | if (cdev) | 1023 | if (cdev) |
| 1024 | dev_fsm_event(cdev, DEV_EVENT_INTERRUPT); | 1024 | dev_fsm_event(cdev, DEV_EVENT_INTERRUPT); |
| 1025 | else | 1025 | else |
| 1026 | kstat_cpu(smp_processor_id()).irqs[IOINT_CIO]++; | 1026 | inc_irq_stat(IRQIO_CIO); |
| 1027 | } | 1027 | } |
| 1028 | 1028 | ||
| 1029 | void io_subchannel_init_config(struct subchannel *sch) | 1029 | void io_subchannel_init_config(struct subchannel *sch) |
| @@ -1634,7 +1634,7 @@ ccw_device_probe_console(void) | |||
| 1634 | memset(&console_private, 0, sizeof(struct ccw_device_private)); | 1634 | memset(&console_private, 0, sizeof(struct ccw_device_private)); |
| 1635 | console_cdev.private = &console_private; | 1635 | console_cdev.private = &console_private; |
| 1636 | console_private.cdev = &console_cdev; | 1636 | console_private.cdev = &console_cdev; |
| 1637 | console_private.int_class = IOINT_CIO; | 1637 | console_private.int_class = IRQIO_CIO; |
| 1638 | ret = ccw_device_console_enable(&console_cdev, sch); | 1638 | ret = ccw_device_console_enable(&console_cdev, sch); |
| 1639 | if (ret) { | 1639 | if (ret) { |
| 1640 | cio_release_console(); | 1640 | cio_release_console(); |
| @@ -1715,13 +1715,13 @@ ccw_device_probe (struct device *dev) | |||
| 1715 | if (cdrv->int_class != 0) | 1715 | if (cdrv->int_class != 0) |
| 1716 | cdev->private->int_class = cdrv->int_class; | 1716 | cdev->private->int_class = cdrv->int_class; |
| 1717 | else | 1717 | else |
| 1718 | cdev->private->int_class = IOINT_CIO; | 1718 | cdev->private->int_class = IRQIO_CIO; |
| 1719 | 1719 | ||
| 1720 | ret = cdrv->probe ? cdrv->probe(cdev) : -ENODEV; | 1720 | ret = cdrv->probe ? cdrv->probe(cdev) : -ENODEV; |
| 1721 | 1721 | ||
| 1722 | if (ret) { | 1722 | if (ret) { |
| 1723 | cdev->drv = NULL; | 1723 | cdev->drv = NULL; |
| 1724 | cdev->private->int_class = IOINT_CIO; | 1724 | cdev->private->int_class = IRQIO_CIO; |
| 1725 | return ret; | 1725 | return ret; |
| 1726 | } | 1726 | } |
| 1727 | 1727 | ||
| @@ -1755,7 +1755,7 @@ ccw_device_remove (struct device *dev) | |||
| 1755 | } | 1755 | } |
| 1756 | ccw_device_set_timeout(cdev, 0); | 1756 | ccw_device_set_timeout(cdev, 0); |
| 1757 | cdev->drv = NULL; | 1757 | cdev->drv = NULL; |
| 1758 | cdev->private->int_class = IOINT_CIO; | 1758 | cdev->private->int_class = IRQIO_CIO; |
| 1759 | return 0; | 1759 | return 0; |
| 1760 | } | 1760 | } |
| 1761 | 1761 | ||
diff --git a/drivers/s390/cio/device.h b/drivers/s390/cio/device.h index 2e575cff9845..7d4ecb65db00 100644 --- a/drivers/s390/cio/device.h +++ b/drivers/s390/cio/device.h | |||
| @@ -61,11 +61,10 @@ dev_fsm_event(struct ccw_device *cdev, enum dev_event dev_event) | |||
| 61 | 61 | ||
| 62 | if (dev_event == DEV_EVENT_INTERRUPT) { | 62 | if (dev_event == DEV_EVENT_INTERRUPT) { |
| 63 | if (state == DEV_STATE_ONLINE) | 63 | if (state == DEV_STATE_ONLINE) |
| 64 | kstat_cpu(smp_processor_id()). | 64 | inc_irq_stat(cdev->private->int_class); |
| 65 | irqs[cdev->private->int_class]++; | ||
| 66 | else if (state != DEV_STATE_CMFCHANGE && | 65 | else if (state != DEV_STATE_CMFCHANGE && |
| 67 | state != DEV_STATE_CMFUPDATE) | 66 | state != DEV_STATE_CMFUPDATE) |
| 68 | kstat_cpu(smp_processor_id()).irqs[IOINT_CIO]++; | 67 | inc_irq_stat(IRQIO_CIO); |
| 69 | } | 68 | } |
| 70 | dev_jumptable[state][dev_event](cdev, dev_event); | 69 | dev_jumptable[state][dev_event](cdev, dev_event); |
| 71 | } | 70 | } |
diff --git a/drivers/s390/cio/eadm_sch.c b/drivers/s390/cio/eadm_sch.c index 6c9673400464..d9eddcba7e88 100644 --- a/drivers/s390/cio/eadm_sch.c +++ b/drivers/s390/cio/eadm_sch.c | |||
| @@ -139,7 +139,7 @@ static void eadm_subchannel_irq(struct subchannel *sch) | |||
| 139 | EADM_LOG(6, "irq"); | 139 | EADM_LOG(6, "irq"); |
| 140 | EADM_LOG_HEX(6, irb, sizeof(*irb)); | 140 | EADM_LOG_HEX(6, irb, sizeof(*irb)); |
| 141 | 141 | ||
| 142 | kstat_cpu(smp_processor_id()).irqs[IOINT_ADM]++; | 142 | inc_irq_stat(IRQIO_ADM); |
| 143 | 143 | ||
| 144 | if ((scsw->stctl & (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)) | 144 | if ((scsw->stctl & (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)) |
| 145 | && scsw->eswf == 1 && irb->esw.eadm.erw.r) | 145 | && scsw->eswf == 1 && irb->esw.eadm.erw.r) |
diff --git a/drivers/s390/cio/qdio_thinint.c b/drivers/s390/cio/qdio_thinint.c index bdb394b066fc..bde5255200dc 100644 --- a/drivers/s390/cio/qdio_thinint.c +++ b/drivers/s390/cio/qdio_thinint.c | |||
| @@ -182,7 +182,7 @@ static void tiqdio_thinint_handler(void *alsi, void *data) | |||
| 182 | struct qdio_q *q; | 182 | struct qdio_q *q; |
| 183 | 183 | ||
| 184 | last_ai_time = S390_lowcore.int_clock; | 184 | last_ai_time = S390_lowcore.int_clock; |
| 185 | kstat_cpu(smp_processor_id()).irqs[IOINT_QAI]++; | 185 | inc_irq_stat(IRQIO_QAI); |
| 186 | 186 | ||
| 187 | /* protect tiq_list entries, only changed in activate or shutdown */ | 187 | /* protect tiq_list entries, only changed in activate or shutdown */ |
| 188 | rcu_read_lock(); | 188 | rcu_read_lock(); |
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 7b865a7300e6..b8b340ac5332 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
| @@ -1272,7 +1272,7 @@ out: | |||
| 1272 | 1272 | ||
| 1273 | static void ap_interrupt_handler(void *unused1, void *unused2) | 1273 | static void ap_interrupt_handler(void *unused1, void *unused2) |
| 1274 | { | 1274 | { |
| 1275 | kstat_cpu(smp_processor_id()).irqs[IOINT_APB]++; | 1275 | inc_irq_stat(IRQIO_APB); |
| 1276 | tasklet_schedule(&ap_tasklet); | 1276 | tasklet_schedule(&ap_tasklet); |
| 1277 | } | 1277 | } |
| 1278 | 1278 | ||
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c index 7dabef624da3..8491111aec12 100644 --- a/drivers/s390/kvm/kvm_virtio.c +++ b/drivers/s390/kvm/kvm_virtio.c | |||
| @@ -392,7 +392,7 @@ static void kvm_extint_handler(struct ext_code ext_code, | |||
| 392 | 392 | ||
| 393 | if ((ext_code.subcode & 0xff00) != VIRTIO_SUBCODE_64) | 393 | if ((ext_code.subcode & 0xff00) != VIRTIO_SUBCODE_64) |
| 394 | return; | 394 | return; |
| 395 | kstat_cpu(smp_processor_id()).irqs[EXTINT_VRT]++; | 395 | inc_irq_stat(IRQEXT_VRT); |
| 396 | 396 | ||
| 397 | /* The LSB might be overloaded, we have to mask it */ | 397 | /* The LSB might be overloaded, we have to mask it */ |
| 398 | vq = (struct virtqueue *)(param64 & ~1UL); | 398 | vq = (struct virtqueue *)(param64 & ~1UL); |
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index 5c70a6599578..83bc9c5fa0c1 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
| @@ -282,7 +282,7 @@ static struct ccw_driver claw_ccw_driver = { | |||
| 282 | .ids = claw_ids, | 282 | .ids = claw_ids, |
| 283 | .probe = ccwgroup_probe_ccwdev, | 283 | .probe = ccwgroup_probe_ccwdev, |
| 284 | .remove = ccwgroup_remove_ccwdev, | 284 | .remove = ccwgroup_remove_ccwdev, |
| 285 | .int_class = IOINT_CLW, | 285 | .int_class = IRQIO_CLW, |
| 286 | }; | 286 | }; |
| 287 | 287 | ||
| 288 | static ssize_t claw_driver_group_store(struct device_driver *ddrv, | 288 | static ssize_t claw_driver_group_store(struct device_driver *ddrv, |
diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c index 817b68925ddd..676f12049a36 100644 --- a/drivers/s390/net/ctcm_main.c +++ b/drivers/s390/net/ctcm_main.c | |||
| @@ -1755,7 +1755,7 @@ static struct ccw_driver ctcm_ccw_driver = { | |||
| 1755 | .ids = ctcm_ids, | 1755 | .ids = ctcm_ids, |
| 1756 | .probe = ccwgroup_probe_ccwdev, | 1756 | .probe = ccwgroup_probe_ccwdev, |
| 1757 | .remove = ccwgroup_remove_ccwdev, | 1757 | .remove = ccwgroup_remove_ccwdev, |
| 1758 | .int_class = IOINT_CTC, | 1758 | .int_class = IRQIO_CTC, |
| 1759 | }; | 1759 | }; |
| 1760 | 1760 | ||
| 1761 | static struct ccwgroup_driver ctcm_group_driver = { | 1761 | static struct ccwgroup_driver ctcm_group_driver = { |
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index 2ca0f1dd7a00..c645dc9e98af 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
| @@ -2384,7 +2384,7 @@ static struct ccw_driver lcs_ccw_driver = { | |||
| 2384 | .ids = lcs_ids, | 2384 | .ids = lcs_ids, |
| 2385 | .probe = ccwgroup_probe_ccwdev, | 2385 | .probe = ccwgroup_probe_ccwdev, |
| 2386 | .remove = ccwgroup_remove_ccwdev, | 2386 | .remove = ccwgroup_remove_ccwdev, |
| 2387 | .int_class = IOINT_LCS, | 2387 | .int_class = IRQIO_LCS, |
| 2388 | }; | 2388 | }; |
| 2389 | 2389 | ||
| 2390 | /** | 2390 | /** |
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index 542668292900..1a9d1e3ce64c 100644 --- a/drivers/sbus/char/bbc_i2c.c +++ b/drivers/sbus/char/bbc_i2c.c | |||
| @@ -355,7 +355,7 @@ fail: | |||
| 355 | extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); | 355 | extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); |
| 356 | extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); | 356 | extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); |
| 357 | 357 | ||
| 358 | static int __devinit bbc_i2c_probe(struct platform_device *op) | 358 | static int bbc_i2c_probe(struct platform_device *op) |
| 359 | { | 359 | { |
| 360 | struct bbc_i2c_bus *bp; | 360 | struct bbc_i2c_bus *bp; |
| 361 | int err, index = 0; | 361 | int err, index = 0; |
| @@ -379,7 +379,7 @@ static int __devinit bbc_i2c_probe(struct platform_device *op) | |||
| 379 | return err; | 379 | return err; |
| 380 | } | 380 | } |
| 381 | 381 | ||
| 382 | static int __devexit bbc_i2c_remove(struct platform_device *op) | 382 | static int bbc_i2c_remove(struct platform_device *op) |
| 383 | { | 383 | { |
| 384 | struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev); | 384 | struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev); |
| 385 | 385 | ||
| @@ -413,7 +413,7 @@ static struct platform_driver bbc_i2c_driver = { | |||
| 413 | .of_match_table = bbc_i2c_match, | 413 | .of_match_table = bbc_i2c_match, |
| 414 | }, | 414 | }, |
| 415 | .probe = bbc_i2c_probe, | 415 | .probe = bbc_i2c_probe, |
| 416 | .remove = __devexit_p(bbc_i2c_remove), | 416 | .remove = bbc_i2c_remove, |
| 417 | }; | 417 | }; |
| 418 | 418 | ||
| 419 | module_platform_driver(bbc_i2c_driver); | 419 | module_platform_driver(bbc_i2c_driver); |
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c index b160073e54b6..e85c803b30cd 100644 --- a/drivers/sbus/char/display7seg.c +++ b/drivers/sbus/char/display7seg.c | |||
| @@ -171,7 +171,7 @@ static struct miscdevice d7s_miscdev = { | |||
| 171 | .fops = &d7s_fops | 171 | .fops = &d7s_fops |
| 172 | }; | 172 | }; |
| 173 | 173 | ||
| 174 | static int __devinit d7s_probe(struct platform_device *op) | 174 | static int d7s_probe(struct platform_device *op) |
| 175 | { | 175 | { |
| 176 | struct device_node *opts; | 176 | struct device_node *opts; |
| 177 | int err = -EINVAL; | 177 | int err = -EINVAL; |
| @@ -236,7 +236,7 @@ out_free: | |||
| 236 | goto out; | 236 | goto out; |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | static int __devexit d7s_remove(struct platform_device *op) | 239 | static int d7s_remove(struct platform_device *op) |
| 240 | { | 240 | { |
| 241 | struct d7s *p = dev_get_drvdata(&op->dev); | 241 | struct d7s *p = dev_get_drvdata(&op->dev); |
| 242 | u8 regs = readb(p->regs); | 242 | u8 regs = readb(p->regs); |
| @@ -272,7 +272,7 @@ static struct platform_driver d7s_driver = { | |||
| 272 | .of_match_table = d7s_match, | 272 | .of_match_table = d7s_match, |
| 273 | }, | 273 | }, |
| 274 | .probe = d7s_probe, | 274 | .probe = d7s_probe, |
| 275 | .remove = __devexit_p(d7s_remove), | 275 | .remove = d7s_remove, |
| 276 | }; | 276 | }; |
| 277 | 277 | ||
| 278 | module_platform_driver(d7s_driver); | 278 | module_platform_driver(d7s_driver); |
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index 0bc18569f9c0..ddbe5a9e713d 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c | |||
| @@ -1028,7 +1028,7 @@ static int kenvctrld(void *__unused) | |||
| 1028 | return 0; | 1028 | return 0; |
| 1029 | } | 1029 | } |
| 1030 | 1030 | ||
| 1031 | static int __devinit envctrl_probe(struct platform_device *op) | 1031 | static int envctrl_probe(struct platform_device *op) |
| 1032 | { | 1032 | { |
| 1033 | struct device_node *dp; | 1033 | struct device_node *dp; |
| 1034 | int index, err; | 1034 | int index, err; |
| @@ -1104,7 +1104,7 @@ out_iounmap: | |||
| 1104 | return err; | 1104 | return err; |
| 1105 | } | 1105 | } |
| 1106 | 1106 | ||
| 1107 | static int __devexit envctrl_remove(struct platform_device *op) | 1107 | static int envctrl_remove(struct platform_device *op) |
| 1108 | { | 1108 | { |
| 1109 | int index; | 1109 | int index; |
| 1110 | 1110 | ||
| @@ -1135,7 +1135,7 @@ static struct platform_driver envctrl_driver = { | |||
| 1135 | .of_match_table = envctrl_match, | 1135 | .of_match_table = envctrl_match, |
| 1136 | }, | 1136 | }, |
| 1137 | .probe = envctrl_probe, | 1137 | .probe = envctrl_probe, |
| 1138 | .remove = __devexit_p(envctrl_remove), | 1138 | .remove = envctrl_remove, |
| 1139 | }; | 1139 | }; |
| 1140 | 1140 | ||
| 1141 | module_platform_driver(envctrl_driver); | 1141 | module_platform_driver(envctrl_driver); |
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index 327657e2e264..d9f268f23774 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c | |||
| @@ -159,7 +159,7 @@ static const struct file_operations flash_fops = { | |||
| 159 | 159 | ||
| 160 | static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; | 160 | static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; |
| 161 | 161 | ||
| 162 | static int __devinit flash_probe(struct platform_device *op) | 162 | static int flash_probe(struct platform_device *op) |
| 163 | { | 163 | { |
| 164 | struct device_node *dp = op->dev.of_node; | 164 | struct device_node *dp = op->dev.of_node; |
| 165 | struct device_node *parent; | 165 | struct device_node *parent; |
| @@ -190,7 +190,7 @@ static int __devinit flash_probe(struct platform_device *op) | |||
| 190 | return misc_register(&flash_dev); | 190 | return misc_register(&flash_dev); |
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | static int __devexit flash_remove(struct platform_device *op) | 193 | static int flash_remove(struct platform_device *op) |
| 194 | { | 194 | { |
| 195 | misc_deregister(&flash_dev); | 195 | misc_deregister(&flash_dev); |
| 196 | 196 | ||
| @@ -212,7 +212,7 @@ static struct platform_driver flash_driver = { | |||
| 212 | .of_match_table = flash_match, | 212 | .of_match_table = flash_match, |
| 213 | }, | 213 | }, |
| 214 | .probe = flash_probe, | 214 | .probe = flash_probe, |
| 215 | .remove = __devexit_p(flash_remove), | 215 | .remove = flash_remove, |
| 216 | }; | 216 | }; |
| 217 | 217 | ||
| 218 | module_platform_driver(flash_driver); | 218 | module_platform_driver(flash_driver); |
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c index a9e468cc1cac..b0aae0536d58 100644 --- a/drivers/sbus/char/uctrl.c +++ b/drivers/sbus/char/uctrl.c | |||
| @@ -347,7 +347,7 @@ static void uctrl_get_external_status(struct uctrl_driver *driver) | |||
| 347 | 347 | ||
| 348 | } | 348 | } |
| 349 | 349 | ||
| 350 | static int __devinit uctrl_probe(struct platform_device *op) | 350 | static int uctrl_probe(struct platform_device *op) |
| 351 | { | 351 | { |
| 352 | struct uctrl_driver *p; | 352 | struct uctrl_driver *p; |
| 353 | int err = -ENOMEM; | 353 | int err = -ENOMEM; |
| @@ -402,7 +402,7 @@ out_free: | |||
| 402 | goto out; | 402 | goto out; |
| 403 | } | 403 | } |
| 404 | 404 | ||
| 405 | static int __devexit uctrl_remove(struct platform_device *op) | 405 | static int uctrl_remove(struct platform_device *op) |
| 406 | { | 406 | { |
| 407 | struct uctrl_driver *p = dev_get_drvdata(&op->dev); | 407 | struct uctrl_driver *p = dev_get_drvdata(&op->dev); |
| 408 | 408 | ||
| @@ -430,7 +430,7 @@ static struct platform_driver uctrl_driver = { | |||
| 430 | .of_match_table = uctrl_match, | 430 | .of_match_table = uctrl_match, |
| 431 | }, | 431 | }, |
| 432 | .probe = uctrl_probe, | 432 | .probe = uctrl_probe, |
| 433 | .remove = __devexit_p(uctrl_remove), | 433 | .remove = uctrl_remove, |
| 434 | }; | 434 | }; |
| 435 | 435 | ||
| 436 | 436 | ||
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index 3868ab2397c6..d1f0120cdb98 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c | |||
| @@ -2029,7 +2029,7 @@ static struct scsi_host_template driver_template = { | |||
| 2029 | }; | 2029 | }; |
| 2030 | 2030 | ||
| 2031 | /* This function will probe and initialize a card */ | 2031 | /* This function will probe and initialize a card */ |
| 2032 | static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) | 2032 | static int twa_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) |
| 2033 | { | 2033 | { |
| 2034 | struct Scsi_Host *host = NULL; | 2034 | struct Scsi_Host *host = NULL; |
| 2035 | TW_Device_Extension *tw_dev; | 2035 | TW_Device_Extension *tw_dev; |
| @@ -2305,7 +2305,7 @@ out_disable_device: | |||
| 2305 | #endif | 2305 | #endif |
| 2306 | 2306 | ||
| 2307 | /* PCI Devices supported by this driver */ | 2307 | /* PCI Devices supported by this driver */ |
| 2308 | static struct pci_device_id twa_pci_tbl[] __devinitdata = { | 2308 | static struct pci_device_id twa_pci_tbl[] = { |
| 2309 | { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9000, | 2309 | { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9000, |
| 2310 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 2310 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
| 2311 | { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9550SX, | 2311 | { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9550SX, |
diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c index 13e39e1fdfe2..52a2f0580d97 100644 --- a/drivers/scsi/3w-sas.c +++ b/drivers/scsi/3w-sas.c | |||
| @@ -1604,7 +1604,7 @@ static struct scsi_host_template driver_template = { | |||
| 1604 | }; | 1604 | }; |
| 1605 | 1605 | ||
| 1606 | /* This function will probe and initialize a card */ | 1606 | /* This function will probe and initialize a card */ |
| 1607 | static int __devinit twl_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) | 1607 | static int twl_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) |
| 1608 | { | 1608 | { |
| 1609 | struct Scsi_Host *host = NULL; | 1609 | struct Scsi_Host *host = NULL; |
| 1610 | TW_Device_Extension *tw_dev; | 1610 | TW_Device_Extension *tw_dev; |
| @@ -1893,7 +1893,7 @@ out_disable_device: | |||
| 1893 | #endif | 1893 | #endif |
| 1894 | 1894 | ||
| 1895 | /* PCI Devices supported by this driver */ | 1895 | /* PCI Devices supported by this driver */ |
| 1896 | static struct pci_device_id twl_pci_tbl[] __devinitdata = { | 1896 | static struct pci_device_id twl_pci_tbl[] = { |
| 1897 | { PCI_VDEVICE(3WARE, PCI_DEVICE_ID_3WARE_9750) }, | 1897 | { PCI_VDEVICE(3WARE, PCI_DEVICE_ID_3WARE_9750) }, |
| 1898 | { } | 1898 | { } |
| 1899 | }; | 1899 | }; |
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index 7fe96ff60c58..62071d2fc1ce 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c | |||
| @@ -2281,7 +2281,7 @@ static struct scsi_host_template driver_template = { | |||
| 2281 | }; | 2281 | }; |
| 2282 | 2282 | ||
| 2283 | /* This function will probe and initialize a card */ | 2283 | /* This function will probe and initialize a card */ |
| 2284 | static int __devinit tw_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) | 2284 | static int tw_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) |
| 2285 | { | 2285 | { |
| 2286 | struct Scsi_Host *host = NULL; | 2286 | struct Scsi_Host *host = NULL; |
| 2287 | TW_Device_Extension *tw_dev; | 2287 | TW_Device_Extension *tw_dev; |
| @@ -2422,7 +2422,7 @@ static void tw_remove(struct pci_dev *pdev) | |||
| 2422 | } /* End tw_remove() */ | 2422 | } /* End tw_remove() */ |
| 2423 | 2423 | ||
| 2424 | /* PCI Devices supported by this driver */ | 2424 | /* PCI Devices supported by this driver */ |
| 2425 | static struct pci_device_id tw_pci_tbl[] __devinitdata = { | 2425 | static struct pci_device_id tw_pci_tbl[] = { |
| 2426 | { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_1000, | 2426 | { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_1000, |
| 2427 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 2427 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
| 2428 | { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_7000, | 2428 | { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_7000, |
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index d4da3708763b..d7ca247efa35 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c | |||
| @@ -3615,7 +3615,7 @@ static void __exit BusLogic_exit(void) | |||
| 3615 | __setup("BusLogic=", BusLogic_Setup); | 3615 | __setup("BusLogic=", BusLogic_Setup); |
| 3616 | 3616 | ||
| 3617 | #ifdef MODULE | 3617 | #ifdef MODULE |
| 3618 | static struct pci_device_id BusLogic_pci_tbl[] __devinitdata = { | 3618 | static struct pci_device_id BusLogic_pci_tbl[] = { |
| 3619 | { PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER, | 3619 | { PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER, |
| 3620 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 3620 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
| 3621 | { PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC, | 3621 | { PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC, |
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 165e4dd865d9..450353e04dde 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c | |||
| @@ -814,7 +814,7 @@ static char *lprint_opcode(int opcode, char *pos, char *buffer, int length) | |||
| 814 | * Locks: interrupts must be enabled when we are called | 814 | * Locks: interrupts must be enabled when we are called |
| 815 | */ | 815 | */ |
| 816 | 816 | ||
| 817 | static int __devinit NCR5380_init(struct Scsi_Host *instance, int flags) | 817 | static int NCR5380_init(struct Scsi_Host *instance, int flags) |
| 818 | { | 818 | { |
| 819 | NCR5380_local_declare(); | 819 | NCR5380_local_declare(); |
| 820 | int i, pass; | 820 | int i, pass; |
diff --git a/drivers/scsi/NCR_D700.c b/drivers/scsi/NCR_D700.c index 8647256ad66d..b39a2409a507 100644 --- a/drivers/scsi/NCR_D700.c +++ b/drivers/scsi/NCR_D700.c | |||
| @@ -114,7 +114,7 @@ MODULE_DESCRIPTION("NCR Dual700 SCSI Driver"); | |||
| 114 | MODULE_LICENSE("GPL"); | 114 | MODULE_LICENSE("GPL"); |
| 115 | module_param(NCR_D700, charp, 0); | 115 | module_param(NCR_D700, charp, 0); |
| 116 | 116 | ||
| 117 | static __u8 __devinitdata id_array[2*(MCA_MAX_SLOT_NR + 1)] = | 117 | static __u8 id_array[2*(MCA_MAX_SLOT_NR + 1)] = |
| 118 | { [0 ... 2*(MCA_MAX_SLOT_NR + 1)-1] = 7 }; | 118 | { [0 ... 2*(MCA_MAX_SLOT_NR + 1)-1] = 7 }; |
| 119 | 119 | ||
| 120 | #ifdef MODULE | 120 | #ifdef MODULE |
| @@ -173,7 +173,7 @@ struct NCR_D700_private { | |||
| 173 | char pad; | 173 | char pad; |
| 174 | }; | 174 | }; |
| 175 | 175 | ||
| 176 | static int __devinit | 176 | static int |
| 177 | NCR_D700_probe_one(struct NCR_D700_private *p, int siop, int irq, | 177 | NCR_D700_probe_one(struct NCR_D700_private *p, int siop, int irq, |
| 178 | int slot, u32 region, int differential) | 178 | int slot, u32 region, int differential) |
| 179 | { | 179 | { |
| @@ -243,7 +243,7 @@ NCR_D700_intr(int irq, void *data) | |||
| 243 | * essentially connectecd to the MCA bus independently, it is easier | 243 | * essentially connectecd to the MCA bus independently, it is easier |
| 244 | * to set them up as two separate host adapters, rather than one | 244 | * to set them up as two separate host adapters, rather than one |
| 245 | * adapter with two channels */ | 245 | * adapter with two channels */ |
| 246 | static int __devinit | 246 | static int |
| 247 | NCR_D700_probe(struct device *dev) | 247 | NCR_D700_probe(struct device *dev) |
| 248 | { | 248 | { |
| 249 | struct NCR_D700_private *p; | 249 | struct NCR_D700_private *p; |
| @@ -349,7 +349,7 @@ NCR_D700_probe(struct device *dev) | |||
| 349 | return 0; | 349 | return 0; |
| 350 | } | 350 | } |
| 351 | 351 | ||
| 352 | static void __devexit | 352 | static void |
| 353 | NCR_D700_remove_one(struct Scsi_Host *host) | 353 | NCR_D700_remove_one(struct Scsi_Host *host) |
| 354 | { | 354 | { |
| 355 | scsi_remove_host(host); | 355 | scsi_remove_host(host); |
| @@ -359,7 +359,7 @@ NCR_D700_remove_one(struct Scsi_Host *host) | |||
| 359 | release_region(host->base, 64); | 359 | release_region(host->base, 64); |
| 360 | } | 360 | } |
| 361 | 361 | ||
| 362 | static int __devexit | 362 | static int |
| 363 | NCR_D700_remove(struct device *dev) | 363 | NCR_D700_remove(struct device *dev) |
| 364 | { | 364 | { |
| 365 | struct NCR_D700_private *p = dev_get_drvdata(dev); | 365 | struct NCR_D700_private *p = dev_get_drvdata(dev); |
| @@ -380,7 +380,7 @@ static struct mca_driver NCR_D700_driver = { | |||
| 380 | .name = "NCR_D700", | 380 | .name = "NCR_D700", |
| 381 | .bus = &mca_bus_type, | 381 | .bus = &mca_bus_type, |
| 382 | .probe = NCR_D700_probe, | 382 | .probe = NCR_D700_probe, |
| 383 | .remove = __devexit_p(NCR_D700_remove), | 383 | .remove = NCR_D700_remove, |
| 384 | }, | 384 | }, |
| 385 | }; | 385 | }; |
| 386 | 386 | ||
diff --git a/drivers/scsi/NCR_Q720.c b/drivers/scsi/NCR_Q720.c index afdbb9addf18..05835bf1bf9c 100644 --- a/drivers/scsi/NCR_Q720.c +++ b/drivers/scsi/NCR_Q720.c | |||
| @@ -351,7 +351,7 @@ static struct mca_driver NCR_Q720_driver = { | |||
| 351 | .name = "NCR_Q720", | 351 | .name = "NCR_Q720", |
| 352 | .bus = &mca_bus_type, | 352 | .bus = &mca_bus_type, |
| 353 | .probe = NCR_Q720_probe, | 353 | .probe = NCR_Q720_probe, |
| 354 | .remove = __devexit_p(NCR_Q720_remove), | 354 | .remove = NCR_Q720_remove, |
| 355 | }, | 355 | }, |
| 356 | }; | 356 | }; |
| 357 | 357 | ||
diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c index a391090a17c5..0163457c12bb 100644 --- a/drivers/scsi/a100u2w.c +++ b/drivers/scsi/a100u2w.c | |||
| @@ -1082,8 +1082,8 @@ static struct scsi_host_template inia100_template = { | |||
| 1082 | .use_clustering = ENABLE_CLUSTERING, | 1082 | .use_clustering = ENABLE_CLUSTERING, |
| 1083 | }; | 1083 | }; |
| 1084 | 1084 | ||
| 1085 | static int __devinit inia100_probe_one(struct pci_dev *pdev, | 1085 | static int inia100_probe_one(struct pci_dev *pdev, |
| 1086 | const struct pci_device_id *id) | 1086 | const struct pci_device_id *id) |
| 1087 | { | 1087 | { |
| 1088 | struct Scsi_Host *shost; | 1088 | struct Scsi_Host *shost; |
| 1089 | struct orc_host *host; | 1089 | struct orc_host *host; |
| @@ -1197,7 +1197,7 @@ out: | |||
| 1197 | return error; | 1197 | return error; |
| 1198 | } | 1198 | } |
| 1199 | 1199 | ||
| 1200 | static void __devexit inia100_remove_one(struct pci_dev *pdev) | 1200 | static void inia100_remove_one(struct pci_dev *pdev) |
| 1201 | { | 1201 | { |
| 1202 | struct Scsi_Host *shost = pci_get_drvdata(pdev); | 1202 | struct Scsi_Host *shost = pci_get_drvdata(pdev); |
| 1203 | struct orc_host *host = (struct orc_host *)shost->hostdata; | 1203 | struct orc_host *host = (struct orc_host *)shost->hostdata; |
| @@ -1224,7 +1224,7 @@ static struct pci_driver inia100_pci_driver = { | |||
| 1224 | .name = "inia100", | 1224 | .name = "inia100", |
| 1225 | .id_table = inia100_pci_tbl, | 1225 | .id_table = inia100_pci_tbl, |
| 1226 | .probe = inia100_probe_one, | 1226 | .probe = inia100_probe_one, |
| 1227 | .remove = __devexit_p(inia100_remove_one), | 1227 | .remove = inia100_remove_one, |
| 1228 | }; | 1228 | }; |
| 1229 | 1229 | ||
| 1230 | static int __init inia100_init(void) | 1230 | static int __init inia100_init(void) |
diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c index 79a30633d4aa..3e09aa21c1ca 100644 --- a/drivers/scsi/a2091.c +++ b/drivers/scsi/a2091.c | |||
| @@ -179,8 +179,7 @@ static struct scsi_host_template a2091_scsi_template = { | |||
| 179 | .use_clustering = DISABLE_CLUSTERING | 179 | .use_clustering = DISABLE_CLUSTERING |
| 180 | }; | 180 | }; |
| 181 | 181 | ||
| 182 | static int __devinit a2091_probe(struct zorro_dev *z, | 182 | static int a2091_probe(struct zorro_dev *z, const struct zorro_device_id *ent) |
| 183 | const struct zorro_device_id *ent) | ||
| 184 | { | 183 | { |
| 185 | struct Scsi_Host *instance; | 184 | struct Scsi_Host *instance; |
| 186 | int error; | 185 | int error; |
| @@ -239,7 +238,7 @@ fail_alloc: | |||
| 239 | return error; | 238 | return error; |
| 240 | } | 239 | } |
| 241 | 240 | ||
| 242 | static void __devexit a2091_remove(struct zorro_dev *z) | 241 | static void a2091_remove(struct zorro_dev *z) |
| 243 | { | 242 | { |
| 244 | struct Scsi_Host *instance = zorro_get_drvdata(z); | 243 | struct Scsi_Host *instance = zorro_get_drvdata(z); |
| 245 | struct a2091_hostdata *hdata = shost_priv(instance); | 244 | struct a2091_hostdata *hdata = shost_priv(instance); |
| @@ -251,7 +250,7 @@ static void __devexit a2091_remove(struct zorro_dev *z) | |||
| 251 | release_mem_region(z->resource.start, 256); | 250 | release_mem_region(z->resource.start, 256); |
| 252 | } | 251 | } |
| 253 | 252 | ||
| 254 | static struct zorro_device_id a2091_zorro_tbl[] __devinitdata = { | 253 | static struct zorro_device_id a2091_zorro_tbl[] = { |
| 255 | { ZORRO_PROD_CBM_A590_A2091_1 }, | 254 | { ZORRO_PROD_CBM_A590_A2091_1 }, |
| 256 | { ZORRO_PROD_CBM_A590_A2091_2 }, | 255 | { ZORRO_PROD_CBM_A590_A2091_2 }, |
| 257 | { 0 } | 256 | { 0 } |
| @@ -262,7 +261,7 @@ static struct zorro_driver a2091_driver = { | |||
| 262 | .name = "a2091", | 261 | .name = "a2091", |
| 263 | .id_table = a2091_zorro_tbl, | 262 | .id_table = a2091_zorro_tbl, |
| 264 | .probe = a2091_probe, | 263 | .probe = a2091_probe, |
| 265 | .remove = __devexit_p(a2091_remove), | 264 | .remove = a2091_remove, |
| 266 | }; | 265 | }; |
| 267 | 266 | ||
| 268 | static int __init a2091_init(void) | 267 | static int __init a2091_init(void) |
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index cb7f1582a6d1..408a42ef787a 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
| @@ -88,13 +88,7 @@ char aac_driver_version[] = AAC_DRIVER_FULL_VERSION; | |||
| 88 | * | 88 | * |
| 89 | * Note: The last field is used to index into aac_drivers below. | 89 | * Note: The last field is used to index into aac_drivers below. |
| 90 | */ | 90 | */ |
| 91 | #ifdef DECLARE_PCI_DEVICE_TABLE | 91 | static const struct pci_device_id aac_pci_tbl[] = { |
| 92 | static DECLARE_PCI_DEVICE_TABLE(aac_pci_tbl) = { | ||
| 93 | #elif defined(__devinitconst) | ||
| 94 | static const struct pci_device_id aac_pci_tbl[] __devinitconst = { | ||
| 95 | #else | ||
| 96 | static const struct pci_device_id aac_pci_tbl[] __devinitconst = { | ||
| 97 | #endif | ||
| 98 | { 0x1028, 0x0001, 0x1028, 0x0001, 0, 0, 0 }, /* PERC 2/Si (Iguana/PERC2Si) */ | 92 | { 0x1028, 0x0001, 0x1028, 0x0001, 0, 0, 0 }, /* PERC 2/Si (Iguana/PERC2Si) */ |
| 99 | { 0x1028, 0x0002, 0x1028, 0x0002, 0, 0, 1 }, /* PERC 3/Di (Opal/PERC3Di) */ | 93 | { 0x1028, 0x0002, 0x1028, 0x0002, 0, 0, 1 }, /* PERC 3/Di (Opal/PERC3Di) */ |
| 100 | { 0x1028, 0x0003, 0x1028, 0x0003, 0, 0, 2 }, /* PERC 3/Si (SlimFast/PERC3Si */ | 94 | { 0x1028, 0x0003, 0x1028, 0x0003, 0, 0, 2 }, /* PERC 3/Si (SlimFast/PERC3Si */ |
| @@ -1107,8 +1101,7 @@ static void __aac_shutdown(struct aac_dev * aac) | |||
| 1107 | pci_disable_msi(aac->pdev); | 1101 | pci_disable_msi(aac->pdev); |
| 1108 | } | 1102 | } |
| 1109 | 1103 | ||
| 1110 | static int __devinit aac_probe_one(struct pci_dev *pdev, | 1104 | static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 1111 | const struct pci_device_id *id) | ||
| 1112 | { | 1105 | { |
| 1113 | unsigned index = id->driver_data; | 1106 | unsigned index = id->driver_data; |
| 1114 | struct Scsi_Host *shost; | 1107 | struct Scsi_Host *shost; |
| @@ -1310,7 +1303,7 @@ static void aac_shutdown(struct pci_dev *dev) | |||
| 1310 | __aac_shutdown((struct aac_dev *)shost->hostdata); | 1303 | __aac_shutdown((struct aac_dev *)shost->hostdata); |
| 1311 | } | 1304 | } |
| 1312 | 1305 | ||
| 1313 | static void __devexit aac_remove_one(struct pci_dev *pdev) | 1306 | static void aac_remove_one(struct pci_dev *pdev) |
| 1314 | { | 1307 | { |
| 1315 | struct Scsi_Host *shost = pci_get_drvdata(pdev); | 1308 | struct Scsi_Host *shost = pci_get_drvdata(pdev); |
| 1316 | struct aac_dev *aac = (struct aac_dev *)shost->hostdata; | 1309 | struct aac_dev *aac = (struct aac_dev *)shost->hostdata; |
| @@ -1341,7 +1334,7 @@ static struct pci_driver aac_pci_driver = { | |||
| 1341 | .name = AAC_DRIVERNAME, | 1334 | .name = AAC_DRIVERNAME, |
| 1342 | .id_table = aac_pci_tbl, | 1335 | .id_table = aac_pci_tbl, |
| 1343 | .probe = aac_probe_one, | 1336 | .probe = aac_probe_one, |
| 1344 | .remove = __devexit_p(aac_remove_one), | 1337 | .remove = aac_remove_one, |
| 1345 | .shutdown = aac_shutdown, | 1338 | .shutdown = aac_shutdown, |
| 1346 | }; | 1339 | }; |
| 1347 | 1340 | ||
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 374c4edf4fcb..dcfaee66a8b9 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c | |||
| @@ -9526,7 +9526,7 @@ advansys_queuecommand_lck(struct scsi_cmnd *scp, void (*done)(struct scsi_cmnd * | |||
| 9526 | 9526 | ||
| 9527 | static DEF_SCSI_QCMD(advansys_queuecommand) | 9527 | static DEF_SCSI_QCMD(advansys_queuecommand) |
| 9528 | 9528 | ||
| 9529 | static ushort __devinit AscGetEisaChipCfg(PortAddr iop_base) | 9529 | static ushort AscGetEisaChipCfg(PortAddr iop_base) |
| 9530 | { | 9530 | { |
| 9531 | PortAddr eisa_cfg_iop = (PortAddr) ASC_GET_EISA_SLOT(iop_base) | | 9531 | PortAddr eisa_cfg_iop = (PortAddr) ASC_GET_EISA_SLOT(iop_base) | |
| 9532 | (PortAddr) (ASC_EISA_CFG_IOP_MASK); | 9532 | (PortAddr) (ASC_EISA_CFG_IOP_MASK); |
| @@ -9537,8 +9537,8 @@ static ushort __devinit AscGetEisaChipCfg(PortAddr iop_base) | |||
| 9537 | * Return the BIOS address of the adapter at the specified | 9537 | * Return the BIOS address of the adapter at the specified |
| 9538 | * I/O port and with the specified bus type. | 9538 | * I/O port and with the specified bus type. |
| 9539 | */ | 9539 | */ |
| 9540 | static unsigned short __devinit | 9540 | static unsigned short AscGetChipBiosAddress(PortAddr iop_base, |
| 9541 | AscGetChipBiosAddress(PortAddr iop_base, unsigned short bus_type) | 9541 | unsigned short bus_type) |
| 9542 | { | 9542 | { |
| 9543 | unsigned short cfg_lsw; | 9543 | unsigned short cfg_lsw; |
| 9544 | unsigned short bios_addr; | 9544 | unsigned short bios_addr; |
| @@ -9569,7 +9569,7 @@ AscGetChipBiosAddress(PortAddr iop_base, unsigned short bus_type) | |||
| 9569 | return bios_addr; | 9569 | return bios_addr; |
| 9570 | } | 9570 | } |
| 9571 | 9571 | ||
| 9572 | static uchar __devinit AscSetChipScsiID(PortAddr iop_base, uchar new_host_id) | 9572 | static uchar AscSetChipScsiID(PortAddr iop_base, uchar new_host_id) |
| 9573 | { | 9573 | { |
| 9574 | ushort cfg_lsw; | 9574 | ushort cfg_lsw; |
| 9575 | 9575 | ||
| @@ -9583,7 +9583,7 @@ static uchar __devinit AscSetChipScsiID(PortAddr iop_base, uchar new_host_id) | |||
| 9583 | return (AscGetChipScsiID(iop_base)); | 9583 | return (AscGetChipScsiID(iop_base)); |
| 9584 | } | 9584 | } |
| 9585 | 9585 | ||
| 9586 | static unsigned char __devinit AscGetChipScsiCtrl(PortAddr iop_base) | 9586 | static unsigned char AscGetChipScsiCtrl(PortAddr iop_base) |
| 9587 | { | 9587 | { |
| 9588 | unsigned char sc; | 9588 | unsigned char sc; |
| 9589 | 9589 | ||
| @@ -9593,8 +9593,8 @@ static unsigned char __devinit AscGetChipScsiCtrl(PortAddr iop_base) | |||
| 9593 | return sc; | 9593 | return sc; |
| 9594 | } | 9594 | } |
| 9595 | 9595 | ||
| 9596 | static unsigned char __devinit | 9596 | static unsigned char AscGetChipVersion(PortAddr iop_base, |
| 9597 | AscGetChipVersion(PortAddr iop_base, unsigned short bus_type) | 9597 | unsigned short bus_type) |
| 9598 | { | 9598 | { |
| 9599 | if (bus_type & ASC_IS_EISA) { | 9599 | if (bus_type & ASC_IS_EISA) { |
| 9600 | PortAddr eisa_iop; | 9600 | PortAddr eisa_iop; |
| @@ -9608,7 +9608,7 @@ AscGetChipVersion(PortAddr iop_base, unsigned short bus_type) | |||
| 9608 | } | 9608 | } |
| 9609 | 9609 | ||
| 9610 | #ifdef CONFIG_ISA | 9610 | #ifdef CONFIG_ISA |
| 9611 | static void __devinit AscEnableIsaDma(uchar dma_channel) | 9611 | static void AscEnableIsaDma(uchar dma_channel) |
| 9612 | { | 9612 | { |
| 9613 | if (dma_channel < 4) { | 9613 | if (dma_channel < 4) { |
| 9614 | outp(0x000B, (ushort)(0xC0 | dma_channel)); | 9614 | outp(0x000B, (ushort)(0xC0 | dma_channel)); |
| @@ -9638,7 +9638,7 @@ static int AscStopQueueExe(PortAddr iop_base) | |||
| 9638 | return (0); | 9638 | return (0); |
| 9639 | } | 9639 | } |
| 9640 | 9640 | ||
| 9641 | static ASC_DCNT __devinit AscGetMaxDmaCount(ushort bus_type) | 9641 | static ASC_DCNT AscGetMaxDmaCount(ushort bus_type) |
| 9642 | { | 9642 | { |
| 9643 | if (bus_type & ASC_IS_ISA) | 9643 | if (bus_type & ASC_IS_ISA) |
| 9644 | return ASC_MAX_ISA_DMA_COUNT; | 9644 | return ASC_MAX_ISA_DMA_COUNT; |
| @@ -9648,7 +9648,7 @@ static ASC_DCNT __devinit AscGetMaxDmaCount(ushort bus_type) | |||
| 9648 | } | 9648 | } |
| 9649 | 9649 | ||
| 9650 | #ifdef CONFIG_ISA | 9650 | #ifdef CONFIG_ISA |
| 9651 | static ushort __devinit AscGetIsaDmaChannel(PortAddr iop_base) | 9651 | static ushort AscGetIsaDmaChannel(PortAddr iop_base) |
| 9652 | { | 9652 | { |
| 9653 | ushort channel; | 9653 | ushort channel; |
| 9654 | 9654 | ||
| @@ -9660,7 +9660,7 @@ static ushort __devinit AscGetIsaDmaChannel(PortAddr iop_base) | |||
| 9660 | return (channel + 4); | 9660 | return (channel + 4); |
| 9661 | } | 9661 | } |
| 9662 | 9662 | ||
| 9663 | static ushort __devinit AscSetIsaDmaChannel(PortAddr iop_base, ushort dma_channel) | 9663 | static ushort AscSetIsaDmaChannel(PortAddr iop_base, ushort dma_channel) |
| 9664 | { | 9664 | { |
| 9665 | ushort cfg_lsw; | 9665 | ushort cfg_lsw; |
| 9666 | uchar value; | 9666 | uchar value; |
| @@ -9678,7 +9678,7 @@ static ushort __devinit AscSetIsaDmaChannel(PortAddr iop_base, ushort dma_channe | |||
| 9678 | return 0; | 9678 | return 0; |
| 9679 | } | 9679 | } |
| 9680 | 9680 | ||
| 9681 | static uchar __devinit AscGetIsaDmaSpeed(PortAddr iop_base) | 9681 | static uchar AscGetIsaDmaSpeed(PortAddr iop_base) |
| 9682 | { | 9682 | { |
| 9683 | uchar speed_value; | 9683 | uchar speed_value; |
| 9684 | 9684 | ||
| @@ -9689,7 +9689,7 @@ static uchar __devinit AscGetIsaDmaSpeed(PortAddr iop_base) | |||
| 9689 | return speed_value; | 9689 | return speed_value; |
| 9690 | } | 9690 | } |
| 9691 | 9691 | ||
| 9692 | static uchar __devinit AscSetIsaDmaSpeed(PortAddr iop_base, uchar speed_value) | 9692 | static uchar AscSetIsaDmaSpeed(PortAddr iop_base, uchar speed_value) |
| 9693 | { | 9693 | { |
| 9694 | speed_value &= 0x07; | 9694 | speed_value &= 0x07; |
| 9695 | AscSetBank(iop_base, 1); | 9695 | AscSetBank(iop_base, 1); |
| @@ -9699,7 +9699,7 @@ static uchar __devinit AscSetIsaDmaSpeed(PortAddr iop_base, uchar speed_value) | |||
| 9699 | } | 9699 | } |
| 9700 | #endif /* CONFIG_ISA */ | 9700 | #endif /* CONFIG_ISA */ |
| 9701 | 9701 | ||
| 9702 | static ushort __devinit AscInitAscDvcVar(ASC_DVC_VAR *asc_dvc) | 9702 | static ushort AscInitAscDvcVar(ASC_DVC_VAR *asc_dvc) |
| 9703 | { | 9703 | { |
| 9704 | int i; | 9704 | int i; |
| 9705 | PortAddr iop_base; | 9705 | PortAddr iop_base; |
| @@ -9786,7 +9786,7 @@ static ushort __devinit AscInitAscDvcVar(ASC_DVC_VAR *asc_dvc) | |||
| 9786 | return warn_code; | 9786 | return warn_code; |
| 9787 | } | 9787 | } |
| 9788 | 9788 | ||
| 9789 | static int __devinit AscWriteEEPCmdReg(PortAddr iop_base, uchar cmd_reg) | 9789 | static int AscWriteEEPCmdReg(PortAddr iop_base, uchar cmd_reg) |
| 9790 | { | 9790 | { |
| 9791 | int retry; | 9791 | int retry; |
| 9792 | 9792 | ||
| @@ -9801,12 +9801,12 @@ static int __devinit AscWriteEEPCmdReg(PortAddr iop_base, uchar cmd_reg) | |||
| 9801 | return 0; | 9801 | return 0; |
| 9802 | } | 9802 | } |
| 9803 | 9803 | ||
| 9804 | static void __devinit AscWaitEEPRead(void) | 9804 | static void AscWaitEEPRead(void) |
| 9805 | { | 9805 | { |
| 9806 | mdelay(1); | 9806 | mdelay(1); |
| 9807 | } | 9807 | } |
| 9808 | 9808 | ||
| 9809 | static ushort __devinit AscReadEEPWord(PortAddr iop_base, uchar addr) | 9809 | static ushort AscReadEEPWord(PortAddr iop_base, uchar addr) |
| 9810 | { | 9810 | { |
| 9811 | ushort read_wval; | 9811 | ushort read_wval; |
| 9812 | uchar cmd_reg; | 9812 | uchar cmd_reg; |
| @@ -9821,8 +9821,8 @@ static ushort __devinit AscReadEEPWord(PortAddr iop_base, uchar addr) | |||
| 9821 | return read_wval; | 9821 | return read_wval; |
| 9822 | } | 9822 | } |
| 9823 | 9823 | ||
| 9824 | static ushort __devinit | 9824 | static ushort AscGetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, |
| 9825 | AscGetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type) | 9825 | ushort bus_type) |
| 9826 | { | 9826 | { |
| 9827 | ushort wval; | 9827 | ushort wval; |
| 9828 | ushort sum; | 9828 | ushort sum; |
| @@ -9868,7 +9868,7 @@ AscGetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type) | |||
| 9868 | return sum; | 9868 | return sum; |
| 9869 | } | 9869 | } |
| 9870 | 9870 | ||
| 9871 | static int __devinit AscTestExternalLram(ASC_DVC_VAR *asc_dvc) | 9871 | static int AscTestExternalLram(ASC_DVC_VAR *asc_dvc) |
| 9872 | { | 9872 | { |
| 9873 | PortAddr iop_base; | 9873 | PortAddr iop_base; |
| 9874 | ushort q_addr; | 9874 | ushort q_addr; |
| @@ -9890,12 +9890,12 @@ static int __devinit AscTestExternalLram(ASC_DVC_VAR *asc_dvc) | |||
| 9890 | return (sta); | 9890 | return (sta); |
| 9891 | } | 9891 | } |
| 9892 | 9892 | ||
| 9893 | static void __devinit AscWaitEEPWrite(void) | 9893 | static void AscWaitEEPWrite(void) |
| 9894 | { | 9894 | { |
| 9895 | mdelay(20); | 9895 | mdelay(20); |
| 9896 | } | 9896 | } |
| 9897 | 9897 | ||
| 9898 | static int __devinit AscWriteEEPDataReg(PortAddr iop_base, ushort data_reg) | 9898 | static int AscWriteEEPDataReg(PortAddr iop_base, ushort data_reg) |
| 9899 | { | 9899 | { |
| 9900 | ushort read_back; | 9900 | ushort read_back; |
| 9901 | int retry; | 9901 | int retry; |
| @@ -9914,8 +9914,7 @@ static int __devinit AscWriteEEPDataReg(PortAddr iop_base, ushort data_reg) | |||
| 9914 | } | 9914 | } |
| 9915 | } | 9915 | } |
| 9916 | 9916 | ||
| 9917 | static ushort __devinit | 9917 | static ushort AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val) |
| 9918 | AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val) | ||
| 9919 | { | 9918 | { |
| 9920 | ushort read_wval; | 9919 | ushort read_wval; |
| 9921 | 9920 | ||
| @@ -9935,8 +9934,8 @@ AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val) | |||
| 9935 | return (read_wval); | 9934 | return (read_wval); |
| 9936 | } | 9935 | } |
| 9937 | 9936 | ||
| 9938 | static int __devinit | 9937 | static int AscSetEEPConfigOnce(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, |
| 9939 | AscSetEEPConfigOnce(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type) | 9938 | ushort bus_type) |
| 9940 | { | 9939 | { |
| 9941 | int n_error; | 9940 | int n_error; |
| 9942 | ushort *wbuf; | 9941 | ushort *wbuf; |
| @@ -10031,8 +10030,8 @@ AscSetEEPConfigOnce(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type) | |||
| 10031 | return n_error; | 10030 | return n_error; |
| 10032 | } | 10031 | } |
| 10033 | 10032 | ||
| 10034 | static int __devinit | 10033 | static int AscSetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, |
| 10035 | AscSetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type) | 10034 | ushort bus_type) |
| 10036 | { | 10035 | { |
| 10037 | int retry; | 10036 | int retry; |
| 10038 | int n_error; | 10037 | int n_error; |
| @@ -10050,7 +10049,7 @@ AscSetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type) | |||
| 10050 | return n_error; | 10049 | return n_error; |
| 10051 | } | 10050 | } |
| 10052 | 10051 | ||
| 10053 | static ushort __devinit AscInitFromEEP(ASC_DVC_VAR *asc_dvc) | 10052 | static ushort AscInitFromEEP(ASC_DVC_VAR *asc_dvc) |
| 10054 | { | 10053 | { |
| 10055 | ASCEEP_CONFIG eep_config_buf; | 10054 | ASCEEP_CONFIG eep_config_buf; |
| 10056 | ASCEEP_CONFIG *eep_config; | 10055 | ASCEEP_CONFIG *eep_config; |
| @@ -10215,7 +10214,7 @@ static ushort __devinit AscInitFromEEP(ASC_DVC_VAR *asc_dvc) | |||
| 10215 | return (warn_code); | 10214 | return (warn_code); |
| 10216 | } | 10215 | } |
| 10217 | 10216 | ||
| 10218 | static int __devinit AscInitGetConfig(struct Scsi_Host *shost) | 10217 | static int AscInitGetConfig(struct Scsi_Host *shost) |
| 10219 | { | 10218 | { |
| 10220 | struct asc_board *board = shost_priv(shost); | 10219 | struct asc_board *board = shost_priv(shost); |
| 10221 | ASC_DVC_VAR *asc_dvc = &board->dvc_var.asc_dvc_var; | 10220 | ASC_DVC_VAR *asc_dvc = &board->dvc_var.asc_dvc_var; |
| @@ -10269,7 +10268,7 @@ static int __devinit AscInitGetConfig(struct Scsi_Host *shost) | |||
| 10269 | return asc_dvc->err_code; | 10268 | return asc_dvc->err_code; |
| 10270 | } | 10269 | } |
| 10271 | 10270 | ||
| 10272 | static int __devinit AscInitSetConfig(struct pci_dev *pdev, struct Scsi_Host *shost) | 10271 | static int AscInitSetConfig(struct pci_dev *pdev, struct Scsi_Host *shost) |
| 10273 | { | 10272 | { |
| 10274 | struct asc_board *board = shost_priv(shost); | 10273 | struct asc_board *board = shost_priv(shost); |
| 10275 | ASC_DVC_VAR *asc_dvc = &board->dvc_var.asc_dvc_var; | 10274 | ASC_DVC_VAR *asc_dvc = &board->dvc_var.asc_dvc_var; |
| @@ -10383,7 +10382,7 @@ static int __devinit AscInitSetConfig(struct pci_dev *pdev, struct Scsi_Host *sh | |||
| 10383 | * on big-endian platforms so char fields read as words are actually being | 10382 | * on big-endian platforms so char fields read as words are actually being |
| 10384 | * unswapped on big-endian platforms. | 10383 | * unswapped on big-endian platforms. |
| 10385 | */ | 10384 | */ |
| 10386 | static ADVEEP_3550_CONFIG Default_3550_EEPROM_Config __devinitdata = { | 10385 | static ADVEEP_3550_CONFIG Default_3550_EEPROM_Config = { |
| 10387 | ADV_EEPROM_BIOS_ENABLE, /* cfg_lsw */ | 10386 | ADV_EEPROM_BIOS_ENABLE, /* cfg_lsw */ |
| 10388 | 0x0000, /* cfg_msw */ | 10387 | 0x0000, /* cfg_msw */ |
| 10389 | 0xFFFF, /* disc_enable */ | 10388 | 0xFFFF, /* disc_enable */ |
| @@ -10421,7 +10420,7 @@ static ADVEEP_3550_CONFIG Default_3550_EEPROM_Config __devinitdata = { | |||
| 10421 | 0 /* num_of_err */ | 10420 | 0 /* num_of_err */ |
| 10422 | }; | 10421 | }; |
| 10423 | 10422 | ||
| 10424 | static ADVEEP_3550_CONFIG ADVEEP_3550_Config_Field_IsChar __devinitdata = { | 10423 | static ADVEEP_3550_CONFIG ADVEEP_3550_Config_Field_IsChar = { |
| 10425 | 0, /* cfg_lsw */ | 10424 | 0, /* cfg_lsw */ |
| 10426 | 0, /* cfg_msw */ | 10425 | 0, /* cfg_msw */ |
| 10427 | 0, /* -disc_enable */ | 10426 | 0, /* -disc_enable */ |
| @@ -10459,7 +10458,7 @@ static ADVEEP_3550_CONFIG ADVEEP_3550_Config_Field_IsChar __devinitdata = { | |||
| 10459 | 0 /* num_of_err */ | 10458 | 0 /* num_of_err */ |
| 10460 | }; | 10459 | }; |
| 10461 | 10460 | ||
| 10462 | static ADVEEP_38C0800_CONFIG Default_38C0800_EEPROM_Config __devinitdata = { | 10461 | static ADVEEP_38C0800_CONFIG Default_38C0800_EEPROM_Config = { |
| 10463 | ADV_EEPROM_BIOS_ENABLE, /* 00 cfg_lsw */ | 10462 | ADV_EEPROM_BIOS_ENABLE, /* 00 cfg_lsw */ |
| 10464 | 0x0000, /* 01 cfg_msw */ | 10463 | 0x0000, /* 01 cfg_msw */ |
| 10465 | 0xFFFF, /* 02 disc_enable */ | 10464 | 0xFFFF, /* 02 disc_enable */ |
| @@ -10524,7 +10523,7 @@ static ADVEEP_38C0800_CONFIG Default_38C0800_EEPROM_Config __devinitdata = { | |||
| 10524 | 0 /* 63 reserved */ | 10523 | 0 /* 63 reserved */ |
| 10525 | }; | 10524 | }; |
| 10526 | 10525 | ||
| 10527 | static ADVEEP_38C0800_CONFIG ADVEEP_38C0800_Config_Field_IsChar __devinitdata = { | 10526 | static ADVEEP_38C0800_CONFIG ADVEEP_38C0800_Config_Field_IsChar = { |
| 10528 | 0, /* 00 cfg_lsw */ | 10527 | 0, /* 00 cfg_lsw */ |
| 10529 | 0, /* 01 cfg_msw */ | 10528 | 0, /* 01 cfg_msw */ |
| 10530 | 0, /* 02 disc_enable */ | 10529 | 0, /* 02 disc_enable */ |
| @@ -10589,7 +10588,7 @@ static ADVEEP_38C0800_CONFIG ADVEEP_38C0800_Config_Field_IsChar __devinitdata = | |||
| 10589 | 0 /* 63 reserved */ | 10588 | 0 /* 63 reserved */ |
| 10590 | }; | 10589 | }; |
| 10591 | 10590 | ||
| 10592 | static ADVEEP_38C1600_CONFIG Default_38C1600_EEPROM_Config __devinitdata = { | 10591 | static ADVEEP_38C1600_CONFIG Default_38C1600_EEPROM_Config = { |
| 10593 | ADV_EEPROM_BIOS_ENABLE, /* 00 cfg_lsw */ | 10592 | ADV_EEPROM_BIOS_ENABLE, /* 00 cfg_lsw */ |
| 10594 | 0x0000, /* 01 cfg_msw */ | 10593 | 0x0000, /* 01 cfg_msw */ |
| 10595 | 0xFFFF, /* 02 disc_enable */ | 10594 | 0xFFFF, /* 02 disc_enable */ |
| @@ -10654,7 +10653,7 @@ static ADVEEP_38C1600_CONFIG Default_38C1600_EEPROM_Config __devinitdata = { | |||
| 10654 | 0 /* 63 reserved */ | 10653 | 0 /* 63 reserved */ |
| 10655 | }; | 10654 | }; |
| 10656 | 10655 | ||
| 10657 | static ADVEEP_38C1600_CONFIG ADVEEP_38C1600_Config_Field_IsChar __devinitdata = { | 10656 | static ADVEEP_38C1600_CONFIG ADVEEP_38C1600_Config_Field_IsChar = { |
| 10658 | 0, /* 00 cfg_lsw */ | 10657 | 0, /* 00 cfg_lsw */ |
| 10659 | 0, /* 01 cfg_msw */ | 10658 | 0, /* 01 cfg_msw */ |
| 10660 | 0, /* 02 disc_enable */ | 10659 | 0, /* 02 disc_enable */ |
| @@ -10723,7 +10722,7 @@ static ADVEEP_38C1600_CONFIG ADVEEP_38C1600_Config_Field_IsChar __devinitdata = | |||
| 10723 | /* | 10722 | /* |
| 10724 | * Wait for EEPROM command to complete | 10723 | * Wait for EEPROM command to complete |
| 10725 | */ | 10724 | */ |
| 10726 | static void __devinit AdvWaitEEPCmd(AdvPortAddr iop_base) | 10725 | static void AdvWaitEEPCmd(AdvPortAddr iop_base) |
| 10727 | { | 10726 | { |
| 10728 | int eep_delay_ms; | 10727 | int eep_delay_ms; |
| 10729 | 10728 | ||
| @@ -10742,7 +10741,7 @@ static void __devinit AdvWaitEEPCmd(AdvPortAddr iop_base) | |||
| 10742 | /* | 10741 | /* |
| 10743 | * Read the EEPROM from specified location | 10742 | * Read the EEPROM from specified location |
| 10744 | */ | 10743 | */ |
| 10745 | static ushort __devinit AdvReadEEPWord(AdvPortAddr iop_base, int eep_word_addr) | 10744 | static ushort AdvReadEEPWord(AdvPortAddr iop_base, int eep_word_addr) |
| 10746 | { | 10745 | { |
| 10747 | AdvWriteWordRegister(iop_base, IOPW_EE_CMD, | 10746 | AdvWriteWordRegister(iop_base, IOPW_EE_CMD, |
| 10748 | ASC_EEP_CMD_READ | eep_word_addr); | 10747 | ASC_EEP_CMD_READ | eep_word_addr); |
| @@ -10753,8 +10752,8 @@ static ushort __devinit AdvReadEEPWord(AdvPortAddr iop_base, int eep_word_addr) | |||
| 10753 | /* | 10752 | /* |
| 10754 | * Write the EEPROM from 'cfg_buf'. | 10753 | * Write the EEPROM from 'cfg_buf'. |
| 10755 | */ | 10754 | */ |
| 10756 | static void __devinit | 10755 | static void AdvSet3550EEPConfig(AdvPortAddr iop_base, |
| 10757 | AdvSet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf) | 10756 | ADVEEP_3550_CONFIG *cfg_buf) |
| 10758 | { | 10757 | { |
| 10759 | ushort *wbuf; | 10758 | ushort *wbuf; |
| 10760 | ushort addr, chksum; | 10759 | ushort addr, chksum; |
| @@ -10820,8 +10819,8 @@ AdvSet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf) | |||
| 10820 | /* | 10819 | /* |
| 10821 | * Write the EEPROM from 'cfg_buf'. | 10820 | * Write the EEPROM from 'cfg_buf'. |
| 10822 | */ | 10821 | */ |
| 10823 | static void __devinit | 10822 | static void AdvSet38C0800EEPConfig(AdvPortAddr iop_base, |
| 10824 | AdvSet38C0800EEPConfig(AdvPortAddr iop_base, ADVEEP_38C0800_CONFIG *cfg_buf) | 10823 | ADVEEP_38C0800_CONFIG *cfg_buf) |
| 10825 | { | 10824 | { |
| 10826 | ushort *wbuf; | 10825 | ushort *wbuf; |
| 10827 | ushort *charfields; | 10826 | ushort *charfields; |
| @@ -10887,8 +10886,8 @@ AdvSet38C0800EEPConfig(AdvPortAddr iop_base, ADVEEP_38C0800_CONFIG *cfg_buf) | |||
| 10887 | /* | 10886 | /* |
| 10888 | * Write the EEPROM from 'cfg_buf'. | 10887 | * Write the EEPROM from 'cfg_buf'. |
| 10889 | */ | 10888 | */ |
| 10890 | static void __devinit | 10889 | static void AdvSet38C1600EEPConfig(AdvPortAddr iop_base, |
| 10891 | AdvSet38C1600EEPConfig(AdvPortAddr iop_base, ADVEEP_38C1600_CONFIG *cfg_buf) | 10890 | ADVEEP_38C1600_CONFIG *cfg_buf) |
| 10892 | { | 10891 | { |
| 10893 | ushort *wbuf; | 10892 | ushort *wbuf; |
| 10894 | ushort *charfields; | 10893 | ushort *charfields; |
| @@ -10956,8 +10955,8 @@ AdvSet38C1600EEPConfig(AdvPortAddr iop_base, ADVEEP_38C1600_CONFIG *cfg_buf) | |||
| 10956 | * | 10955 | * |
| 10957 | * Return a checksum based on the EEPROM configuration read. | 10956 | * Return a checksum based on the EEPROM configuration read. |
| 10958 | */ | 10957 | */ |
| 10959 | static ushort __devinit | 10958 | static ushort AdvGet3550EEPConfig(AdvPortAddr iop_base, |
| 10960 | AdvGet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf) | 10959 | ADVEEP_3550_CONFIG *cfg_buf) |
| 10961 | { | 10960 | { |
| 10962 | ushort wval, chksum; | 10961 | ushort wval, chksum; |
| 10963 | ushort *wbuf; | 10962 | ushort *wbuf; |
| @@ -10999,8 +10998,8 @@ AdvGet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf) | |||
| 10999 | * | 10998 | * |
| 11000 | * Return a checksum based on the EEPROM configuration read. | 10999 | * Return a checksum based on the EEPROM configuration read. |
| 11001 | */ | 11000 | */ |
| 11002 | static ushort __devinit | 11001 | static ushort AdvGet38C0800EEPConfig(AdvPortAddr iop_base, |
| 11003 | AdvGet38C0800EEPConfig(AdvPortAddr iop_base, ADVEEP_38C0800_CONFIG *cfg_buf) | 11002 | ADVEEP_38C0800_CONFIG *cfg_buf) |
| 11004 | { | 11003 | { |
| 11005 | ushort wval, chksum; | 11004 | ushort wval, chksum; |
| 11006 | ushort *wbuf; | 11005 | ushort *wbuf; |
| @@ -11042,8 +11041,8 @@ AdvGet38C0800EEPConfig(AdvPortAddr iop_base, ADVEEP_38C0800_CONFIG *cfg_buf) | |||
| 11042 | * | 11041 | * |
| 11043 | * Return a checksum based on the EEPROM configuration read. | 11042 | * Return a checksum based on the EEPROM configuration read. |
| 11044 | */ | 11043 | */ |
| 11045 | static ushort __devinit | 11044 | static ushort AdvGet38C1600EEPConfig(AdvPortAddr iop_base, |
| 11046 | AdvGet38C1600EEPConfig(AdvPortAddr iop_base, ADVEEP_38C1600_CONFIG *cfg_buf) | 11045 | ADVEEP_38C1600_CONFIG *cfg_buf) |
| 11047 | { | 11046 | { |
| 11048 | ushort wval, chksum; | 11047 | ushort wval, chksum; |
| 11049 | ushort *wbuf; | 11048 | ushort *wbuf; |
| @@ -11092,7 +11091,7 @@ AdvGet38C1600EEPConfig(AdvPortAddr iop_base, ADVEEP_38C1600_CONFIG *cfg_buf) | |||
| 11092 | * | 11091 | * |
| 11093 | * Note: Chip is stopped on entry. | 11092 | * Note: Chip is stopped on entry. |
| 11094 | */ | 11093 | */ |
| 11095 | static int __devinit AdvInitFrom3550EEP(ADV_DVC_VAR *asc_dvc) | 11094 | static int AdvInitFrom3550EEP(ADV_DVC_VAR *asc_dvc) |
| 11096 | { | 11095 | { |
| 11097 | AdvPortAddr iop_base; | 11096 | AdvPortAddr iop_base; |
| 11098 | ushort warn_code; | 11097 | ushort warn_code; |
| @@ -11242,7 +11241,7 @@ static int __devinit AdvInitFrom3550EEP(ADV_DVC_VAR *asc_dvc) | |||
| 11242 | * | 11241 | * |
| 11243 | * Note: Chip is stopped on entry. | 11242 | * Note: Chip is stopped on entry. |
| 11244 | */ | 11243 | */ |
| 11245 | static int __devinit AdvInitFrom38C0800EEP(ADV_DVC_VAR *asc_dvc) | 11244 | static int AdvInitFrom38C0800EEP(ADV_DVC_VAR *asc_dvc) |
| 11246 | { | 11245 | { |
| 11247 | AdvPortAddr iop_base; | 11246 | AdvPortAddr iop_base; |
| 11248 | ushort warn_code; | 11247 | ushort warn_code; |
| @@ -11441,7 +11440,7 @@ static int __devinit AdvInitFrom38C0800EEP(ADV_DVC_VAR *asc_dvc) | |||
| 11441 | * | 11440 | * |
| 11442 | * Note: Chip is stopped on entry. | 11441 | * Note: Chip is stopped on entry. |
| 11443 | */ | 11442 | */ |
| 11444 | static int __devinit AdvInitFrom38C1600EEP(ADV_DVC_VAR *asc_dvc) | 11443 | static int AdvInitFrom38C1600EEP(ADV_DVC_VAR *asc_dvc) |
| 11445 | { | 11444 | { |
| 11446 | AdvPortAddr iop_base; | 11445 | AdvPortAddr iop_base; |
| 11447 | ushort warn_code; | 11446 | ushort warn_code; |
| @@ -11661,8 +11660,7 @@ static int __devinit AdvInitFrom38C1600EEP(ADV_DVC_VAR *asc_dvc) | |||
| 11661 | * For a non-fatal error return a warning code. If there are no warnings | 11660 | * For a non-fatal error return a warning code. If there are no warnings |
| 11662 | * then 0 is returned. | 11661 | * then 0 is returned. |
| 11663 | */ | 11662 | */ |
| 11664 | static int __devinit | 11663 | static int AdvInitGetConfig(struct pci_dev *pdev, struct Scsi_Host *shost) |
| 11665 | AdvInitGetConfig(struct pci_dev *pdev, struct Scsi_Host *shost) | ||
| 11666 | { | 11664 | { |
| 11667 | struct asc_board *board = shost_priv(shost); | 11665 | struct asc_board *board = shost_priv(shost); |
| 11668 | ADV_DVC_VAR *asc_dvc = &board->dvc_var.adv_dvc_var; | 11666 | ADV_DVC_VAR *asc_dvc = &board->dvc_var.adv_dvc_var; |
| @@ -11769,7 +11767,7 @@ static struct scsi_host_template advansys_template = { | |||
| 11769 | .use_clustering = ENABLE_CLUSTERING, | 11767 | .use_clustering = ENABLE_CLUSTERING, |
| 11770 | }; | 11768 | }; |
| 11771 | 11769 | ||
| 11772 | static int __devinit advansys_wide_init_chip(struct Scsi_Host *shost) | 11770 | static int advansys_wide_init_chip(struct Scsi_Host *shost) |
| 11773 | { | 11771 | { |
| 11774 | struct asc_board *board = shost_priv(shost); | 11772 | struct asc_board *board = shost_priv(shost); |
| 11775 | struct adv_dvc_var *adv_dvc = &board->dvc_var.adv_dvc_var; | 11773 | struct adv_dvc_var *adv_dvc = &board->dvc_var.adv_dvc_var; |
| @@ -11882,8 +11880,8 @@ static void advansys_wide_free_mem(struct asc_board *board) | |||
| 11882 | } | 11880 | } |
| 11883 | } | 11881 | } |
| 11884 | 11882 | ||
| 11885 | static int __devinit advansys_board_found(struct Scsi_Host *shost, | 11883 | static int advansys_board_found(struct Scsi_Host *shost, unsigned int iop, |
| 11886 | unsigned int iop, int bus_type) | 11884 | int bus_type) |
| 11887 | { | 11885 | { |
| 11888 | struct pci_dev *pdev; | 11886 | struct pci_dev *pdev; |
| 11889 | struct asc_board *boardp = shost_priv(shost); | 11887 | struct asc_board *boardp = shost_priv(shost); |
| @@ -12428,7 +12426,7 @@ static PortAddr _asc_def_iop_base[ASC_IOADR_TABLE_MAX_IX] = { | |||
| 12428 | * 10: 12 | 12426 | * 10: 12 |
| 12429 | * 11: 15 | 12427 | * 11: 15 |
| 12430 | */ | 12428 | */ |
| 12431 | static unsigned int __devinit advansys_isa_irq_no(PortAddr iop_base) | 12429 | static unsigned int advansys_isa_irq_no(PortAddr iop_base) |
| 12432 | { | 12430 | { |
| 12433 | unsigned short cfg_lsw = AscGetChipCfgLsw(iop_base); | 12431 | unsigned short cfg_lsw = AscGetChipCfgLsw(iop_base); |
| 12434 | unsigned int chip_irq = ((cfg_lsw >> 2) & 0x03) + 10; | 12432 | unsigned int chip_irq = ((cfg_lsw >> 2) & 0x03) + 10; |
| @@ -12437,7 +12435,7 @@ static unsigned int __devinit advansys_isa_irq_no(PortAddr iop_base) | |||
| 12437 | return chip_irq; | 12435 | return chip_irq; |
| 12438 | } | 12436 | } |
| 12439 | 12437 | ||
| 12440 | static int __devinit advansys_isa_probe(struct device *dev, unsigned int id) | 12438 | static int advansys_isa_probe(struct device *dev, unsigned int id) |
| 12441 | { | 12439 | { |
| 12442 | int err = -ENODEV; | 12440 | int err = -ENODEV; |
| 12443 | PortAddr iop_base = _asc_def_iop_base[id]; | 12441 | PortAddr iop_base = _asc_def_iop_base[id]; |
| @@ -12477,7 +12475,7 @@ static int __devinit advansys_isa_probe(struct device *dev, unsigned int id) | |||
| 12477 | return err; | 12475 | return err; |
| 12478 | } | 12476 | } |
| 12479 | 12477 | ||
| 12480 | static int __devexit advansys_isa_remove(struct device *dev, unsigned int id) | 12478 | static int advansys_isa_remove(struct device *dev, unsigned int id) |
| 12481 | { | 12479 | { |
| 12482 | int ioport = _asc_def_iop_base[id]; | 12480 | int ioport = _asc_def_iop_base[id]; |
| 12483 | advansys_release(dev_get_drvdata(dev)); | 12481 | advansys_release(dev_get_drvdata(dev)); |
| @@ -12487,7 +12485,7 @@ static int __devexit advansys_isa_remove(struct device *dev, unsigned int id) | |||
| 12487 | 12485 | ||
| 12488 | static struct isa_driver advansys_isa_driver = { | 12486 | static struct isa_driver advansys_isa_driver = { |
| 12489 | .probe = advansys_isa_probe, | 12487 | .probe = advansys_isa_probe, |
| 12490 | .remove = __devexit_p(advansys_isa_remove), | 12488 | .remove = advansys_isa_remove, |
| 12491 | .driver = { | 12489 | .driver = { |
| 12492 | .owner = THIS_MODULE, | 12490 | .owner = THIS_MODULE, |
| 12493 | .name = DRV_NAME, | 12491 | .name = DRV_NAME, |
| @@ -12505,7 +12503,7 @@ static struct isa_driver advansys_isa_driver = { | |||
| 12505 | * 110: 15 | 12503 | * 110: 15 |
| 12506 | * 111: invalid | 12504 | * 111: invalid |
| 12507 | */ | 12505 | */ |
| 12508 | static unsigned int __devinit advansys_vlb_irq_no(PortAddr iop_base) | 12506 | static unsigned int advansys_vlb_irq_no(PortAddr iop_base) |
| 12509 | { | 12507 | { |
| 12510 | unsigned short cfg_lsw = AscGetChipCfgLsw(iop_base); | 12508 | unsigned short cfg_lsw = AscGetChipCfgLsw(iop_base); |
| 12511 | unsigned int chip_irq = ((cfg_lsw >> 2) & 0x07) + 9; | 12509 | unsigned int chip_irq = ((cfg_lsw >> 2) & 0x07) + 9; |
| @@ -12514,7 +12512,7 @@ static unsigned int __devinit advansys_vlb_irq_no(PortAddr iop_base) | |||
| 12514 | return chip_irq; | 12512 | return chip_irq; |
| 12515 | } | 12513 | } |
| 12516 | 12514 | ||
| 12517 | static int __devinit advansys_vlb_probe(struct device *dev, unsigned int id) | 12515 | static int advansys_vlb_probe(struct device *dev, unsigned int id) |
| 12518 | { | 12516 | { |
| 12519 | int err = -ENODEV; | 12517 | int err = -ENODEV; |
| 12520 | PortAddr iop_base = _asc_def_iop_base[id]; | 12518 | PortAddr iop_base = _asc_def_iop_base[id]; |
| @@ -12561,14 +12559,14 @@ static int __devinit advansys_vlb_probe(struct device *dev, unsigned int id) | |||
| 12561 | 12559 | ||
| 12562 | static struct isa_driver advansys_vlb_driver = { | 12560 | static struct isa_driver advansys_vlb_driver = { |
| 12563 | .probe = advansys_vlb_probe, | 12561 | .probe = advansys_vlb_probe, |
| 12564 | .remove = __devexit_p(advansys_isa_remove), | 12562 | .remove = advansys_isa_remove, |
| 12565 | .driver = { | 12563 | .driver = { |
| 12566 | .owner = THIS_MODULE, | 12564 | .owner = THIS_MODULE, |
| 12567 | .name = "advansys_vlb", | 12565 | .name = "advansys_vlb", |
| 12568 | }, | 12566 | }, |
| 12569 | }; | 12567 | }; |
| 12570 | 12568 | ||
| 12571 | static struct eisa_device_id advansys_eisa_table[] __devinitdata = { | 12569 | static struct eisa_device_id advansys_eisa_table[] = { |
| 12572 | { "ABP7401" }, | 12570 | { "ABP7401" }, |
| 12573 | { "ABP7501" }, | 12571 | { "ABP7501" }, |
| 12574 | { "" } | 12572 | { "" } |
| @@ -12595,7 +12593,7 @@ struct eisa_scsi_data { | |||
| 12595 | * 110: invalid | 12593 | * 110: invalid |
| 12596 | * 111: invalid | 12594 | * 111: invalid |
| 12597 | */ | 12595 | */ |
| 12598 | static unsigned int __devinit advansys_eisa_irq_no(struct eisa_device *edev) | 12596 | static unsigned int advansys_eisa_irq_no(struct eisa_device *edev) |
| 12599 | { | 12597 | { |
| 12600 | unsigned short cfg_lsw = inw(edev->base_addr + 0xc86); | 12598 | unsigned short cfg_lsw = inw(edev->base_addr + 0xc86); |
| 12601 | unsigned int chip_irq = ((cfg_lsw >> 8) & 0x07) + 10; | 12599 | unsigned int chip_irq = ((cfg_lsw >> 8) & 0x07) + 10; |
| @@ -12604,7 +12602,7 @@ static unsigned int __devinit advansys_eisa_irq_no(struct eisa_device *edev) | |||
| 12604 | return chip_irq; | 12602 | return chip_irq; |
| 12605 | } | 12603 | } |
| 12606 | 12604 | ||
| 12607 | static int __devinit advansys_eisa_probe(struct device *dev) | 12605 | static int advansys_eisa_probe(struct device *dev) |
| 12608 | { | 12606 | { |
| 12609 | int i, ioport, irq = 0; | 12607 | int i, ioport, irq = 0; |
| 12610 | int err; | 12608 | int err; |
| @@ -12677,7 +12675,7 @@ static int __devinit advansys_eisa_probe(struct device *dev) | |||
| 12677 | return err; | 12675 | return err; |
| 12678 | } | 12676 | } |
| 12679 | 12677 | ||
| 12680 | static __devexit int advansys_eisa_remove(struct device *dev) | 12678 | static int advansys_eisa_remove(struct device *dev) |
| 12681 | { | 12679 | { |
| 12682 | int i; | 12680 | int i; |
| 12683 | struct eisa_scsi_data *data = dev_get_drvdata(dev); | 12681 | struct eisa_scsi_data *data = dev_get_drvdata(dev); |
| @@ -12701,12 +12699,12 @@ static struct eisa_driver advansys_eisa_driver = { | |||
| 12701 | .driver = { | 12699 | .driver = { |
| 12702 | .name = DRV_NAME, | 12700 | .name = DRV_NAME, |
| 12703 | .probe = advansys_eisa_probe, | 12701 | .probe = advansys_eisa_probe, |
| 12704 | .remove = __devexit_p(advansys_eisa_remove), | 12702 | .remove = advansys_eisa_remove, |
| 12705 | } | 12703 | } |
| 12706 | }; | 12704 | }; |
| 12707 | 12705 | ||
| 12708 | /* PCI Devices supported by this driver */ | 12706 | /* PCI Devices supported by this driver */ |
| 12709 | static struct pci_device_id advansys_pci_tbl[] __devinitdata = { | 12707 | static struct pci_device_id advansys_pci_tbl[] = { |
| 12710 | {PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_1200A, | 12708 | {PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_1200A, |
| 12711 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 12709 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
| 12712 | {PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_ABP940, | 12710 | {PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_ABP940, |
| @@ -12724,7 +12722,7 @@ static struct pci_device_id advansys_pci_tbl[] __devinitdata = { | |||
| 12724 | 12722 | ||
| 12725 | MODULE_DEVICE_TABLE(pci, advansys_pci_tbl); | 12723 | MODULE_DEVICE_TABLE(pci, advansys_pci_tbl); |
| 12726 | 12724 | ||
| 12727 | static void __devinit advansys_set_latency(struct pci_dev *pdev) | 12725 | static void advansys_set_latency(struct pci_dev *pdev) |
| 12728 | { | 12726 | { |
| 12729 | if ((pdev->device == PCI_DEVICE_ID_ASP_1200A) || | 12727 | if ((pdev->device == PCI_DEVICE_ID_ASP_1200A) || |
| 12730 | (pdev->device == PCI_DEVICE_ID_ASP_ABP940)) { | 12728 | (pdev->device == PCI_DEVICE_ID_ASP_ABP940)) { |
| @@ -12737,8 +12735,8 @@ static void __devinit advansys_set_latency(struct pci_dev *pdev) | |||
| 12737 | } | 12735 | } |
| 12738 | } | 12736 | } |
| 12739 | 12737 | ||
| 12740 | static int __devinit | 12738 | static int advansys_pci_probe(struct pci_dev *pdev, |
| 12741 | advansys_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 12739 | const struct pci_device_id *ent) |
| 12742 | { | 12740 | { |
| 12743 | int err, ioport; | 12741 | int err, ioport; |
| 12744 | struct Scsi_Host *shost; | 12742 | struct Scsi_Host *shost; |
| @@ -12791,7 +12789,7 @@ advansys_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 12791 | return err; | 12789 | return err; |
| 12792 | } | 12790 | } |
| 12793 | 12791 | ||
| 12794 | static void __devexit advansys_pci_remove(struct pci_dev *pdev) | 12792 | static void advansys_pci_remove(struct pci_dev *pdev) |
| 12795 | { | 12793 | { |
| 12796 | advansys_release(pci_get_drvdata(pdev)); | 12794 | advansys_release(pci_get_drvdata(pdev)); |
| 12797 | pci_release_regions(pdev); | 12795 | pci_release_regions(pdev); |
| @@ -12802,7 +12800,7 @@ static struct pci_driver advansys_pci_driver = { | |||
| 12802 | .name = DRV_NAME, | 12800 | .name = DRV_NAME, |
| 12803 | .id_table = advansys_pci_tbl, | 12801 | .id_table = advansys_pci_tbl, |
| 12804 | .probe = advansys_pci_probe, | 12802 | .probe = advansys_pci_probe, |
| 12805 | .remove = __devexit_p(advansys_pci_remove), | 12803 | .remove = advansys_pci_remove, |
| 12806 | }; | 12804 | }; |
| 12807 | 12805 | ||
| 12808 | static int __init advansys_init(void) | 12806 | static int __init advansys_init(void) |
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index dd4547bf6881..a284be17699f 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c | |||
| @@ -420,7 +420,7 @@ MODULE_PARM_DESC(aha152x1, "parameters for second controller"); | |||
| 420 | #endif /* MODULE */ | 420 | #endif /* MODULE */ |
| 421 | 421 | ||
| 422 | #ifdef __ISAPNP__ | 422 | #ifdef __ISAPNP__ |
| 423 | static struct isapnp_device_id id_table[] __devinitdata = { | 423 | static struct isapnp_device_id id_table[] = { |
| 424 | { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1502), 0 }, | 424 | { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1502), 0 }, |
| 425 | { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1505), 0 }, | 425 | { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1505), 0 }, |
| 426 | { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1510), 0 }, | 426 | { ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('A', 'D', 'P'), ISAPNP_FUNCTION(0x1510), 0 }, |
diff --git a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c index a3e6ed353917..df775e6ba579 100644 --- a/drivers/scsi/aha1740.c +++ b/drivers/scsi/aha1740.c | |||
| @@ -646,7 +646,7 @@ static int aha1740_probe (struct device *dev) | |||
| 646 | return -ENODEV; | 646 | return -ENODEV; |
| 647 | } | 647 | } |
| 648 | 648 | ||
| 649 | static __devexit int aha1740_remove (struct device *dev) | 649 | static int aha1740_remove (struct device *dev) |
| 650 | { | 650 | { |
| 651 | struct Scsi_Host *shpnt = dev_get_drvdata(dev); | 651 | struct Scsi_Host *shpnt = dev_get_drvdata(dev); |
| 652 | struct aha1740_hostdata *host = HOSTDATA (shpnt); | 652 | struct aha1740_hostdata *host = HOSTDATA (shpnt); |
| @@ -677,7 +677,7 @@ static struct eisa_driver aha1740_driver = { | |||
| 677 | .driver = { | 677 | .driver = { |
| 678 | .name = "aha1740", | 678 | .name = "aha1740", |
| 679 | .probe = aha1740_probe, | 679 | .probe = aha1740_probe, |
| 680 | .remove = __devexit_p (aha1740_remove), | 680 | .remove = aha1740_remove, |
| 681 | }, | 681 | }, |
| 682 | }; | 682 | }; |
| 683 | 683 | ||
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 1c4120c3db41..c56741fc4b99 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c | |||
| @@ -85,7 +85,7 @@ static struct scsi_host_template aic94xx_sht = { | |||
| 85 | .ioctl = sas_ioctl, | 85 | .ioctl = sas_ioctl, |
| 86 | }; | 86 | }; |
| 87 | 87 | ||
| 88 | static int __devinit asd_map_memio(struct asd_ha_struct *asd_ha) | 88 | static int asd_map_memio(struct asd_ha_struct *asd_ha) |
| 89 | { | 89 | { |
| 90 | int err, i; | 90 | int err, i; |
| 91 | struct asd_ha_addrspace *io_handle; | 91 | struct asd_ha_addrspace *io_handle; |
| @@ -146,7 +146,7 @@ static void asd_unmap_memio(struct asd_ha_struct *asd_ha) | |||
| 146 | pci_release_region(asd_ha->pcidev, 0); | 146 | pci_release_region(asd_ha->pcidev, 0); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | static int __devinit asd_map_ioport(struct asd_ha_struct *asd_ha) | 149 | static int asd_map_ioport(struct asd_ha_struct *asd_ha) |
| 150 | { | 150 | { |
| 151 | int i = PCI_IOBAR_OFFSET, err; | 151 | int i = PCI_IOBAR_OFFSET, err; |
| 152 | struct asd_ha_addrspace *io_handle = &asd_ha->io_handle[0]; | 152 | struct asd_ha_addrspace *io_handle = &asd_ha->io_handle[0]; |
| @@ -175,7 +175,7 @@ static void asd_unmap_ioport(struct asd_ha_struct *asd_ha) | |||
| 175 | pci_release_region(asd_ha->pcidev, PCI_IOBAR_OFFSET); | 175 | pci_release_region(asd_ha->pcidev, PCI_IOBAR_OFFSET); |
| 176 | } | 176 | } |
| 177 | 177 | ||
| 178 | static int __devinit asd_map_ha(struct asd_ha_struct *asd_ha) | 178 | static int asd_map_ha(struct asd_ha_struct *asd_ha) |
| 179 | { | 179 | { |
| 180 | int err; | 180 | int err; |
| 181 | u16 cmd_reg; | 181 | u16 cmd_reg; |
| @@ -221,7 +221,7 @@ static const char *asd_dev_rev[30] = { | |||
| 221 | [8] = "B0", | 221 | [8] = "B0", |
| 222 | }; | 222 | }; |
| 223 | 223 | ||
| 224 | static int __devinit asd_common_setup(struct asd_ha_struct *asd_ha) | 224 | static int asd_common_setup(struct asd_ha_struct *asd_ha) |
| 225 | { | 225 | { |
| 226 | int err, i; | 226 | int err, i; |
| 227 | 227 | ||
| @@ -257,7 +257,7 @@ Err: | |||
| 257 | return err; | 257 | return err; |
| 258 | } | 258 | } |
| 259 | 259 | ||
| 260 | static int __devinit asd_aic9410_setup(struct asd_ha_struct *asd_ha) | 260 | static int asd_aic9410_setup(struct asd_ha_struct *asd_ha) |
| 261 | { | 261 | { |
| 262 | int err = asd_common_setup(asd_ha); | 262 | int err = asd_common_setup(asd_ha); |
| 263 | 263 | ||
| @@ -272,7 +272,7 @@ static int __devinit asd_aic9410_setup(struct asd_ha_struct *asd_ha) | |||
| 272 | return 0; | 272 | return 0; |
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | static int __devinit asd_aic9405_setup(struct asd_ha_struct *asd_ha) | 275 | static int asd_aic9405_setup(struct asd_ha_struct *asd_ha) |
| 276 | { | 276 | { |
| 277 | int err = asd_common_setup(asd_ha); | 277 | int err = asd_common_setup(asd_ha); |
| 278 | 278 | ||
| @@ -531,7 +531,7 @@ static void asd_remove_dev_attrs(struct asd_ha_struct *asd_ha) | |||
| 531 | static const struct asd_pcidev_struct { | 531 | static const struct asd_pcidev_struct { |
| 532 | const char * name; | 532 | const char * name; |
| 533 | int (*setup)(struct asd_ha_struct *asd_ha); | 533 | int (*setup)(struct asd_ha_struct *asd_ha); |
| 534 | } asd_pcidev_data[] __devinitconst = { | 534 | } asd_pcidev_data[] = { |
| 535 | /* Id 0 is used for dynamic ids. */ | 535 | /* Id 0 is used for dynamic ids. */ |
| 536 | { .name = "Adaptec AIC-94xx SAS/SATA Host Adapter", | 536 | { .name = "Adaptec AIC-94xx SAS/SATA Host Adapter", |
| 537 | .setup = asd_aic9410_setup | 537 | .setup = asd_aic9410_setup |
| @@ -731,8 +731,7 @@ static int asd_unregister_sas_ha(struct asd_ha_struct *asd_ha) | |||
| 731 | return err; | 731 | return err; |
| 732 | } | 732 | } |
| 733 | 733 | ||
| 734 | static int __devinit asd_pci_probe(struct pci_dev *dev, | 734 | static int asd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) |
| 735 | const struct pci_device_id *id) | ||
| 736 | { | 735 | { |
| 737 | const struct asd_pcidev_struct *asd_dev; | 736 | const struct asd_pcidev_struct *asd_dev; |
| 738 | unsigned asd_id = (unsigned) id->driver_data; | 737 | unsigned asd_id = (unsigned) id->driver_data; |
| @@ -924,7 +923,7 @@ static void asd_turn_off_leds(struct asd_ha_struct *asd_ha) | |||
| 924 | } | 923 | } |
| 925 | } | 924 | } |
| 926 | 925 | ||
| 927 | static void __devexit asd_pci_remove(struct pci_dev *dev) | 926 | static void asd_pci_remove(struct pci_dev *dev) |
| 928 | { | 927 | { |
| 929 | struct asd_ha_struct *asd_ha = pci_get_drvdata(dev); | 928 | struct asd_ha_struct *asd_ha = pci_get_drvdata(dev); |
| 930 | 929 | ||
| @@ -1012,7 +1011,7 @@ static struct sas_domain_function_template aic94xx_transport_functions = { | |||
| 1012 | .lldd_ata_set_dmamode = asd_set_dmamode, | 1011 | .lldd_ata_set_dmamode = asd_set_dmamode, |
| 1013 | }; | 1012 | }; |
| 1014 | 1013 | ||
| 1015 | static const struct pci_device_id aic94xx_pci_table[] __devinitconst = { | 1014 | static const struct pci_device_id aic94xx_pci_table[] = { |
| 1016 | {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x410),0, 0, 1}, | 1015 | {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x410),0, 0, 1}, |
| 1017 | {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x412),0, 0, 1}, | 1016 | {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x412),0, 0, 1}, |
| 1018 | {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x416),0, 0, 1}, | 1017 | {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x416),0, 0, 1}, |
| @@ -1031,7 +1030,7 @@ static struct pci_driver aic94xx_pci_driver = { | |||
| 1031 | .name = ASD_DRIVER_NAME, | 1030 | .name = ASD_DRIVER_NAME, |
| 1032 | .id_table = aic94xx_pci_table, | 1031 | .id_table = aic94xx_pci_table, |
| 1033 | .probe = asd_pci_probe, | 1032 | .probe = asd_pci_probe, |
| 1034 | .remove = __devexit_p(asd_pci_remove), | 1033 | .remove = asd_pci_remove, |
| 1035 | }; | 1034 | }; |
| 1036 | 1035 | ||
| 1037 | static int __init aic94xx_init(void) | 1036 | static int __init aic94xx_init(void) |
diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c index b330438ac662..3e1172adb37b 100644 --- a/drivers/scsi/arm/acornscsi.c +++ b/drivers/scsi/arm/acornscsi.c | |||
| @@ -2965,8 +2965,7 @@ static struct scsi_host_template acornscsi_template = { | |||
| 2965 | .proc_name = "acornscsi", | 2965 | .proc_name = "acornscsi", |
| 2966 | }; | 2966 | }; |
| 2967 | 2967 | ||
| 2968 | static int __devinit | 2968 | static int acornscsi_probe(struct expansion_card *ec, const struct ecard_id *id) |
| 2969 | acornscsi_probe(struct expansion_card *ec, const struct ecard_id *id) | ||
| 2970 | { | 2969 | { |
| 2971 | struct Scsi_Host *host; | 2970 | struct Scsi_Host *host; |
| 2972 | AS_Host *ashost; | 2971 | AS_Host *ashost; |
| @@ -3032,7 +3031,7 @@ acornscsi_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
| 3032 | return ret; | 3031 | return ret; |
| 3033 | } | 3032 | } |
| 3034 | 3033 | ||
| 3035 | static void __devexit acornscsi_remove(struct expansion_card *ec) | 3034 | static void acornscsi_remove(struct expansion_card *ec) |
| 3036 | { | 3035 | { |
| 3037 | struct Scsi_Host *host = ecard_get_drvdata(ec); | 3036 | struct Scsi_Host *host = ecard_get_drvdata(ec); |
| 3038 | AS_Host *ashost = (AS_Host *)host->hostdata; | 3037 | AS_Host *ashost = (AS_Host *)host->hostdata; |
| @@ -3063,7 +3062,7 @@ static const struct ecard_id acornscsi_cids[] = { | |||
| 3063 | 3062 | ||
| 3064 | static struct ecard_driver acornscsi_driver = { | 3063 | static struct ecard_driver acornscsi_driver = { |
| 3065 | .probe = acornscsi_probe, | 3064 | .probe = acornscsi_probe, |
| 3066 | .remove = __devexit_p(acornscsi_remove), | 3065 | .remove = acornscsi_remove, |
| 3067 | .id_table = acornscsi_cids, | 3066 | .id_table = acornscsi_cids, |
| 3068 | .drv = { | 3067 | .drv = { |
| 3069 | .name = "acornscsi", | 3068 | .name = "acornscsi", |
diff --git a/drivers/scsi/arm/arxescsi.c b/drivers/scsi/arm/arxescsi.c index 2a28b4ad1975..9274510294ac 100644 --- a/drivers/scsi/arm/arxescsi.c +++ b/drivers/scsi/arm/arxescsi.c | |||
| @@ -276,8 +276,7 @@ static struct scsi_host_template arxescsi_template = { | |||
| 276 | .proc_name = "arxescsi", | 276 | .proc_name = "arxescsi", |
| 277 | }; | 277 | }; |
| 278 | 278 | ||
| 279 | static int __devinit | 279 | static int arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id) |
| 280 | arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id) | ||
| 281 | { | 280 | { |
| 282 | struct Scsi_Host *host; | 281 | struct Scsi_Host *host; |
| 283 | struct arxescsi_info *info; | 282 | struct arxescsi_info *info; |
| @@ -340,7 +339,7 @@ arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
| 340 | return ret; | 339 | return ret; |
| 341 | } | 340 | } |
| 342 | 341 | ||
| 343 | static void __devexit arxescsi_remove(struct expansion_card *ec) | 342 | static void arxescsi_remove(struct expansion_card *ec) |
| 344 | { | 343 | { |
| 345 | struct Scsi_Host *host = ecard_get_drvdata(ec); | 344 | struct Scsi_Host *host = ecard_get_drvdata(ec); |
| 346 | 345 | ||
| @@ -359,7 +358,7 @@ static const struct ecard_id arxescsi_cids[] = { | |||
| 359 | 358 | ||
| 360 | static struct ecard_driver arxescsi_driver = { | 359 | static struct ecard_driver arxescsi_driver = { |
| 361 | .probe = arxescsi_probe, | 360 | .probe = arxescsi_probe, |
| 362 | .remove = __devexit_p(arxescsi_remove), | 361 | .remove = arxescsi_remove, |
| 363 | .id_table = arxescsi_cids, | 362 | .id_table = arxescsi_cids, |
| 364 | .drv = { | 363 | .drv = { |
| 365 | .name = "arxescsi", | 364 | .name = "arxescsi", |
diff --git a/drivers/scsi/arm/cumana_1.c b/drivers/scsi/arm/cumana_1.c index c3b99c93637a..c93938b246d5 100644 --- a/drivers/scsi/arm/cumana_1.c +++ b/drivers/scsi/arm/cumana_1.c | |||
| @@ -225,8 +225,8 @@ static struct scsi_host_template cumanascsi_template = { | |||
| 225 | .proc_name = "CumanaSCSI-1", | 225 | .proc_name = "CumanaSCSI-1", |
| 226 | }; | 226 | }; |
| 227 | 227 | ||
| 228 | static int __devinit | 228 | static int cumanascsi1_probe(struct expansion_card *ec, |
| 229 | cumanascsi1_probe(struct expansion_card *ec, const struct ecard_id *id) | 229 | const struct ecard_id *id) |
| 230 | { | 230 | { |
| 231 | struct Scsi_Host *host; | 231 | struct Scsi_Host *host; |
| 232 | int ret; | 232 | int ret; |
| @@ -298,7 +298,7 @@ cumanascsi1_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
| 298 | return ret; | 298 | return ret; |
| 299 | } | 299 | } |
| 300 | 300 | ||
| 301 | static void __devexit cumanascsi1_remove(struct expansion_card *ec) | 301 | static void cumanascsi1_remove(struct expansion_card *ec) |
| 302 | { | 302 | { |
| 303 | struct Scsi_Host *host = ecard_get_drvdata(ec); | 303 | struct Scsi_Host *host = ecard_get_drvdata(ec); |
| 304 | 304 | ||
| @@ -320,7 +320,7 @@ static const struct ecard_id cumanascsi1_cids[] = { | |||
| 320 | 320 | ||
| 321 | static struct ecard_driver cumanascsi1_driver = { | 321 | static struct ecard_driver cumanascsi1_driver = { |
| 322 | .probe = cumanascsi1_probe, | 322 | .probe = cumanascsi1_probe, |
| 323 | .remove = __devexit_p(cumanascsi1_remove), | 323 | .remove = cumanascsi1_remove, |
| 324 | .id_table = cumanascsi1_cids, | 324 | .id_table = cumanascsi1_cids, |
| 325 | .drv = { | 325 | .drv = { |
| 326 | .name = "cumanascsi1", | 326 | .name = "cumanascsi1", |
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c index 547987b86384..e3bae93c3c22 100644 --- a/drivers/scsi/arm/cumana_2.c +++ b/drivers/scsi/arm/cumana_2.c | |||
| @@ -397,8 +397,8 @@ static struct scsi_host_template cumanascsi2_template = { | |||
| 397 | .proc_name = "cumanascsi2", | 397 | .proc_name = "cumanascsi2", |
| 398 | }; | 398 | }; |
| 399 | 399 | ||
| 400 | static int __devinit | 400 | static int cumanascsi2_probe(struct expansion_card *ec, |
| 401 | cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id) | 401 | const struct ecard_id *id) |
| 402 | { | 402 | { |
| 403 | struct Scsi_Host *host; | 403 | struct Scsi_Host *host; |
| 404 | struct cumanascsi2_info *info; | 404 | struct cumanascsi2_info *info; |
| @@ -495,7 +495,7 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
| 495 | return ret; | 495 | return ret; |
| 496 | } | 496 | } |
| 497 | 497 | ||
| 498 | static void __devexit cumanascsi2_remove(struct expansion_card *ec) | 498 | static void cumanascsi2_remove(struct expansion_card *ec) |
| 499 | { | 499 | { |
| 500 | struct Scsi_Host *host = ecard_get_drvdata(ec); | 500 | struct Scsi_Host *host = ecard_get_drvdata(ec); |
| 501 | struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata; | 501 | struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata; |
| @@ -519,7 +519,7 @@ static const struct ecard_id cumanascsi2_cids[] = { | |||
| 519 | 519 | ||
| 520 | static struct ecard_driver cumanascsi2_driver = { | 520 | static struct ecard_driver cumanascsi2_driver = { |
| 521 | .probe = cumanascsi2_probe, | 521 | .probe = cumanascsi2_probe, |
| 522 | .remove = __devexit_p(cumanascsi2_remove), | 522 | .remove = cumanascsi2_remove, |
| 523 | .id_table = cumanascsi2_cids, | 523 | .id_table = cumanascsi2_cids, |
| 524 | .drv = { | 524 | .drv = { |
| 525 | .name = "cumanascsi2", | 525 | .name = "cumanascsi2", |
diff --git a/drivers/scsi/arm/eesox.c b/drivers/scsi/arm/eesox.c index 968d08358d20..8e36908415ec 100644 --- a/drivers/scsi/arm/eesox.c +++ b/drivers/scsi/arm/eesox.c | |||
| @@ -515,8 +515,7 @@ static struct scsi_host_template eesox_template = { | |||
| 515 | .proc_name = "eesox", | 515 | .proc_name = "eesox", |
| 516 | }; | 516 | }; |
| 517 | 517 | ||
| 518 | static int __devinit | 518 | static int eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id) |
| 519 | eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id) | ||
| 520 | { | 519 | { |
| 521 | struct Scsi_Host *host; | 520 | struct Scsi_Host *host; |
| 522 | struct eesoxscsi_info *info; | 521 | struct eesoxscsi_info *info; |
| @@ -617,7 +616,7 @@ eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
| 617 | return ret; | 616 | return ret; |
| 618 | } | 617 | } |
| 619 | 618 | ||
| 620 | static void __devexit eesoxscsi_remove(struct expansion_card *ec) | 619 | static void eesoxscsi_remove(struct expansion_card *ec) |
| 621 | { | 620 | { |
| 622 | struct Scsi_Host *host = ecard_get_drvdata(ec); | 621 | struct Scsi_Host *host = ecard_get_drvdata(ec); |
| 623 | struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata; | 622 | struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata; |
| @@ -643,7 +642,7 @@ static const struct ecard_id eesoxscsi_cids[] = { | |||
| 643 | 642 | ||
| 644 | static struct ecard_driver eesoxscsi_driver = { | 643 | static struct ecard_driver eesoxscsi_driver = { |
| 645 | .probe = eesoxscsi_probe, | 644 | .probe = eesoxscsi_probe, |
| 646 | .remove = __devexit_p(eesoxscsi_remove), | 645 | .remove = eesoxscsi_remove, |
| 647 | .id_table = eesoxscsi_cids, | 646 | .id_table = eesoxscsi_cids, |
| 648 | .drv = { | 647 | .drv = { |
| 649 | .name = "eesoxscsi", | 648 | .name = "eesoxscsi", |
diff --git a/drivers/scsi/arm/oak.c b/drivers/scsi/arm/oak.c index fc6a5aabf66e..48facdc18002 100644 --- a/drivers/scsi/arm/oak.c +++ b/drivers/scsi/arm/oak.c | |||
| @@ -129,8 +129,7 @@ static struct scsi_host_template oakscsi_template = { | |||
| 129 | .proc_name = "oakscsi", | 129 | .proc_name = "oakscsi", |
| 130 | }; | 130 | }; |
| 131 | 131 | ||
| 132 | static int __devinit | 132 | static int oakscsi_probe(struct expansion_card *ec, const struct ecard_id *id) |
| 133 | oakscsi_probe(struct expansion_card *ec, const struct ecard_id *id) | ||
| 134 | { | 133 | { |
| 135 | struct Scsi_Host *host; | 134 | struct Scsi_Host *host; |
| 136 | int ret = -ENOMEM; | 135 | int ret = -ENOMEM; |
| @@ -182,7 +181,7 @@ oakscsi_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
| 182 | return ret; | 181 | return ret; |
| 183 | } | 182 | } |
| 184 | 183 | ||
| 185 | static void __devexit oakscsi_remove(struct expansion_card *ec) | 184 | static void oakscsi_remove(struct expansion_card *ec) |
| 186 | { | 185 | { |
| 187 | struct Scsi_Host *host = ecard_get_drvdata(ec); | 186 | struct Scsi_Host *host = ecard_get_drvdata(ec); |
| 188 | 187 | ||
| @@ -202,7 +201,7 @@ static const struct ecard_id oakscsi_cids[] = { | |||
| 202 | 201 | ||
| 203 | static struct ecard_driver oakscsi_driver = { | 202 | static struct ecard_driver oakscsi_driver = { |
| 204 | .probe = oakscsi_probe, | 203 | .probe = oakscsi_probe, |
| 205 | .remove = __devexit_p(oakscsi_remove), | 204 | .remove = oakscsi_remove, |
| 206 | .id_table = oakscsi_cids, | 205 | .id_table = oakscsi_cids, |
| 207 | .drv = { | 206 | .drv = { |
| 208 | .name = "oakscsi", | 207 | .name = "oakscsi", |
diff --git a/drivers/scsi/arm/powertec.c b/drivers/scsi/arm/powertec.c index 9274c0677b9c..246600b93555 100644 --- a/drivers/scsi/arm/powertec.c +++ b/drivers/scsi/arm/powertec.c | |||
| @@ -309,8 +309,8 @@ static struct scsi_host_template powertecscsi_template = { | |||
| 309 | .proc_name = "powertec", | 309 | .proc_name = "powertec", |
| 310 | }; | 310 | }; |
| 311 | 311 | ||
| 312 | static int __devinit | 312 | static int powertecscsi_probe(struct expansion_card *ec, |
| 313 | powertecscsi_probe(struct expansion_card *ec, const struct ecard_id *id) | 313 | const struct ecard_id *id) |
| 314 | { | 314 | { |
| 315 | struct Scsi_Host *host; | 315 | struct Scsi_Host *host; |
| 316 | struct powertec_info *info; | 316 | struct powertec_info *info; |
| @@ -409,7 +409,7 @@ powertecscsi_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
| 409 | return ret; | 409 | return ret; |
| 410 | } | 410 | } |
| 411 | 411 | ||
| 412 | static void __devexit powertecscsi_remove(struct expansion_card *ec) | 412 | static void powertecscsi_remove(struct expansion_card *ec) |
| 413 | { | 413 | { |
| 414 | struct Scsi_Host *host = ecard_get_drvdata(ec); | 414 | struct Scsi_Host *host = ecard_get_drvdata(ec); |
| 415 | struct powertec_info *info = (struct powertec_info *)host->hostdata; | 415 | struct powertec_info *info = (struct powertec_info *)host->hostdata; |
| @@ -435,7 +435,7 @@ static const struct ecard_id powertecscsi_cids[] = { | |||
| 435 | 435 | ||
| 436 | static struct ecard_driver powertecscsi_driver = { | 436 | static struct ecard_driver powertecscsi_driver = { |
| 437 | .probe = powertecscsi_probe, | 437 | .probe = powertecscsi_probe, |
| 438 | .remove = __devexit_p(powertecscsi_remove), | 438 | .remove = powertecscsi_remove, |
| 439 | .id_table = powertecscsi_cids, | 439 | .id_table = powertecscsi_cids, |
| 440 | .drv = { | 440 | .drv = { |
| 441 | .name = "powertecscsi", | 441 | .name = "powertecscsi", |
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c index a540162ac59c..cfc73041f102 100644 --- a/drivers/scsi/atp870u.c +++ b/drivers/scsi/atp870u.c | |||
| @@ -3210,7 +3210,7 @@ static struct pci_driver atp870u_driver = { | |||
| 3210 | .id_table = atp870u_id_table, | 3210 | .id_table = atp870u_id_table, |
| 3211 | .name = "atp870u", | 3211 | .name = "atp870u", |
| 3212 | .probe = atp870u_probe, | 3212 | .probe = atp870u_probe, |
| 3213 | .remove = __devexit_p(atp870u_remove), | 3213 | .remove = atp870u_remove, |
| 3214 | }; | 3214 | }; |
| 3215 | 3215 | ||
| 3216 | static int __init atp870u_init(void) | 3216 | static int __init atp870u_init(void) |
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 48d37dded8f1..4e2733d23003 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c | |||
| @@ -4790,8 +4790,8 @@ beiscsi_hw_health_check(struct work_struct *work) | |||
| 4790 | msecs_to_jiffies(1000)); | 4790 | msecs_to_jiffies(1000)); |
| 4791 | } | 4791 | } |
| 4792 | 4792 | ||
| 4793 | static int __devinit beiscsi_dev_probe(struct pci_dev *pcidev, | 4793 | static int beiscsi_dev_probe(struct pci_dev *pcidev, |
| 4794 | const struct pci_device_id *id) | 4794 | const struct pci_device_id *id) |
| 4795 | { | 4795 | { |
| 4796 | struct beiscsi_hba *phba = NULL; | 4796 | struct beiscsi_hba *phba = NULL; |
| 4797 | struct hwi_controller *phwi_ctrlr; | 4797 | struct hwi_controller *phwi_ctrlr; |
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index 895b0e516e07..e6bf12675db8 100644 --- a/drivers/scsi/bfa/bfad.c +++ b/drivers/scsi/bfa/bfad.c | |||
| @@ -1739,7 +1739,7 @@ static struct pci_driver bfad_pci_driver = { | |||
| 1739 | .name = BFAD_DRIVER_NAME, | 1739 | .name = BFAD_DRIVER_NAME, |
| 1740 | .id_table = bfad_id_table, | 1740 | .id_table = bfad_id_table, |
| 1741 | .probe = bfad_pci_probe, | 1741 | .probe = bfad_pci_probe, |
| 1742 | .remove = __devexit_p(bfad_pci_remove), | 1742 | .remove = bfad_pci_remove, |
| 1743 | .err_handler = &bfad_err_handler, | 1743 | .err_handler = &bfad_err_handler, |
| 1744 | }; | 1744 | }; |
| 1745 | 1745 | ||
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index e0558656c646..70ecd953a579 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c | |||
| @@ -25,7 +25,7 @@ DEFINE_PER_CPU(struct bnx2fc_percpu_s, bnx2fc_percpu); | |||
| 25 | #define DRV_MODULE_RELDATE "Jun 04, 2012" | 25 | #define DRV_MODULE_RELDATE "Jun 04, 2012" |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | static char version[] __devinitdata = | 28 | static char version[] = |
| 29 | "Broadcom NetXtreme II FCoE Driver " DRV_MODULE_NAME \ | 29 | "Broadcom NetXtreme II FCoE Driver " DRV_MODULE_NAME \ |
| 30 | " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; | 30 | " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; |
| 31 | 31 | ||
diff --git a/drivers/scsi/bnx2i/bnx2i_init.c b/drivers/scsi/bnx2i/bnx2i_init.c index ee009e4ad097..50fef6963a81 100644 --- a/drivers/scsi/bnx2i/bnx2i_init.c +++ b/drivers/scsi/bnx2i/bnx2i_init.c | |||
| @@ -21,7 +21,7 @@ static u32 adapter_count; | |||
| 21 | #define DRV_MODULE_VERSION "2.7.2.2" | 21 | #define DRV_MODULE_VERSION "2.7.2.2" |
| 22 | #define DRV_MODULE_RELDATE "Apr 25, 2012" | 22 | #define DRV_MODULE_RELDATE "Apr 25, 2012" |
| 23 | 23 | ||
| 24 | static char version[] __devinitdata = | 24 | static char version[] = |
| 25 | "Broadcom NetXtreme II iSCSI Driver " DRV_MODULE_NAME \ | 25 | "Broadcom NetXtreme II iSCSI Driver " DRV_MODULE_NAME \ |
| 26 | " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; | 26 | " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; |
| 27 | 27 | ||
diff --git a/drivers/scsi/bvme6000_scsi.c b/drivers/scsi/bvme6000_scsi.c index d40ea2f5be10..1e3f96adf9da 100644 --- a/drivers/scsi/bvme6000_scsi.c +++ b/drivers/scsi/bvme6000_scsi.c | |||
| @@ -34,7 +34,7 @@ static struct scsi_host_template bvme6000_scsi_driver_template = { | |||
| 34 | 34 | ||
| 35 | static struct platform_device *bvme6000_scsi_device; | 35 | static struct platform_device *bvme6000_scsi_device; |
| 36 | 36 | ||
| 37 | static __devinit int | 37 | static int |
| 38 | bvme6000_probe(struct platform_device *dev) | 38 | bvme6000_probe(struct platform_device *dev) |
| 39 | { | 39 | { |
| 40 | struct Scsi_Host *host; | 40 | struct Scsi_Host *host; |
| @@ -88,7 +88,7 @@ bvme6000_probe(struct platform_device *dev) | |||
| 88 | return -ENODEV; | 88 | return -ENODEV; |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | static __devexit int | 91 | static int |
| 92 | bvme6000_device_remove(struct platform_device *dev) | 92 | bvme6000_device_remove(struct platform_device *dev) |
| 93 | { | 93 | { |
| 94 | struct Scsi_Host *host = platform_get_drvdata(dev); | 94 | struct Scsi_Host *host = platform_get_drvdata(dev); |
| @@ -108,7 +108,7 @@ static struct platform_driver bvme6000_scsi_driver = { | |||
| 108 | .owner = THIS_MODULE, | 108 | .owner = THIS_MODULE, |
| 109 | }, | 109 | }, |
| 110 | .probe = bvme6000_probe, | 110 | .probe = bvme6000_probe, |
| 111 | .remove = __devexit_p(bvme6000_device_remove), | 111 | .remove = bvme6000_device_remove, |
| 112 | }; | 112 | }; |
| 113 | 113 | ||
| 114 | static int __init bvme6000_scsi_init(void) | 114 | static int __init bvme6000_scsi_init(void) |
diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c index fdd408ff80ad..b42cbbd3d92d 100644 --- a/drivers/scsi/csiostor/csio_init.c +++ b/drivers/scsi/csiostor/csio_init.c | |||
| @@ -115,9 +115,8 @@ static const struct file_operations csio_mem_debugfs_fops = { | |||
| 115 | .llseek = default_llseek, | 115 | .llseek = default_llseek, |
| 116 | }; | 116 | }; |
| 117 | 117 | ||
| 118 | static void __devinit | 118 | static void csio_add_debugfs_mem(struct csio_hw *hw, const char *name, |
| 119 | csio_add_debugfs_mem(struct csio_hw *hw, const char *name, | 119 | unsigned int idx, unsigned int size_mb) |
| 120 | unsigned int idx, unsigned int size_mb) | ||
| 121 | { | 120 | { |
| 122 | struct dentry *de; | 121 | struct dentry *de; |
| 123 | 122 | ||
| @@ -127,8 +126,7 @@ csio_add_debugfs_mem(struct csio_hw *hw, const char *name, | |||
| 127 | de->d_inode->i_size = size_mb << 20; | 126 | de->d_inode->i_size = size_mb << 20; |
| 128 | } | 127 | } |
| 129 | 128 | ||
| 130 | static int __devinit | 129 | static int csio_setup_debugfs(struct csio_hw *hw) |
| 131 | csio_setup_debugfs(struct csio_hw *hw) | ||
| 132 | { | 130 | { |
| 133 | int i; | 131 | int i; |
| 134 | 132 | ||
| @@ -531,8 +529,7 @@ csio_resource_free(struct csio_hw *hw) | |||
| 531 | * Allocates HW structure, DMA, memory resources, maps BARS to | 529 | * Allocates HW structure, DMA, memory resources, maps BARS to |
| 532 | * host memory and initializes HW module. | 530 | * host memory and initializes HW module. |
| 533 | */ | 531 | */ |
| 534 | static struct csio_hw * __devinit | 532 | static struct csio_hw *csio_hw_alloc(struct pci_dev *pdev) |
| 535 | csio_hw_alloc(struct pci_dev *pdev) | ||
| 536 | { | 533 | { |
| 537 | struct csio_hw *hw; | 534 | struct csio_hw *hw; |
| 538 | 535 | ||
| @@ -956,8 +953,7 @@ csio_lnode_init_post(struct csio_lnode *ln) | |||
| 956 | * - Once hardware is ready, initiated scan of the host via | 953 | * - Once hardware is ready, initiated scan of the host via |
| 957 | * scsi_scan_host. | 954 | * scsi_scan_host. |
| 958 | */ | 955 | */ |
| 959 | static int __devinit | 956 | static int csio_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 960 | csio_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | ||
| 961 | { | 957 | { |
| 962 | int rv; | 958 | int rv; |
| 963 | int bars; | 959 | int bars; |
| @@ -1036,8 +1032,7 @@ err: | |||
| 1036 | * | 1032 | * |
| 1037 | * Used during hotplug operation. | 1033 | * Used during hotplug operation. |
| 1038 | */ | 1034 | */ |
| 1039 | static void __devexit | 1035 | static void csio_remove_one(struct pci_dev *pdev) |
| 1040 | csio_remove_one(struct pci_dev *pdev) | ||
| 1041 | { | 1036 | { |
| 1042 | struct csio_hw *hw = pci_get_drvdata(pdev); | 1037 | struct csio_hw *hw = pci_get_drvdata(pdev); |
| 1043 | int bars = pci_select_bars(pdev, IORESOURCE_MEM); | 1038 | int bars = pci_select_bars(pdev, IORESOURCE_MEM); |
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 13aeca3d51f2..865c64fa923c 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c | |||
| @@ -489,7 +489,7 @@ struct ParameterData { | |||
| 489 | int def; /* default value */ | 489 | int def; /* default value */ |
| 490 | int safe; /* safe value */ | 490 | int safe; /* safe value */ |
| 491 | }; | 491 | }; |
| 492 | static struct ParameterData __devinitdata cfg_data[] = { | 492 | static struct ParameterData cfg_data[] = { |
| 493 | { /* adapter id */ | 493 | { /* adapter id */ |
| 494 | CFG_PARAM_UNSET, | 494 | CFG_PARAM_UNSET, |
| 495 | 0, | 495 | 0, |
| @@ -574,7 +574,7 @@ MODULE_PARM_DESC(reset_delay, "Reset delay in seconds. Default 1 (0-180)"); | |||
| 574 | * set_safe_settings - if the use_safe_settings option is set then | 574 | * set_safe_settings - if the use_safe_settings option is set then |
| 575 | * set all values to the safe and slow values. | 575 | * set all values to the safe and slow values. |
| 576 | **/ | 576 | **/ |
| 577 | static void __devinit set_safe_settings(void) | 577 | static void set_safe_settings(void) |
| 578 | { | 578 | { |
| 579 | if (use_safe_settings) | 579 | if (use_safe_settings) |
| 580 | { | 580 | { |
| @@ -593,7 +593,7 @@ static void __devinit set_safe_settings(void) | |||
| 593 | * fix_settings - reset any boot parameters which are out of range | 593 | * fix_settings - reset any boot parameters which are out of range |
| 594 | * back to the default values. | 594 | * back to the default values. |
| 595 | **/ | 595 | **/ |
| 596 | static void __devinit fix_settings(void) | 596 | static void fix_settings(void) |
| 597 | { | 597 | { |
| 598 | int i; | 598 | int i; |
| 599 | 599 | ||
| @@ -620,7 +620,7 @@ static void __devinit fix_settings(void) | |||
| 620 | * Mapping from the eeprom delay index value (index into this array) | 620 | * Mapping from the eeprom delay index value (index into this array) |
| 621 | * to the number of actual seconds that the delay should be for. | 621 | * to the number of actual seconds that the delay should be for. |
| 622 | */ | 622 | */ |
| 623 | static char __devinitdata eeprom_index_to_delay_map[] = | 623 | static char eeprom_index_to_delay_map[] = |
| 624 | { 1, 3, 5, 10, 16, 30, 60, 120 }; | 624 | { 1, 3, 5, 10, 16, 30, 60, 120 }; |
| 625 | 625 | ||
| 626 | 626 | ||
| @@ -630,7 +630,7 @@ static char __devinitdata eeprom_index_to_delay_map[] = | |||
| 630 | * | 630 | * |
| 631 | * @eeprom: The eeprom structure in which we find the delay index to map. | 631 | * @eeprom: The eeprom structure in which we find the delay index to map. |
| 632 | **/ | 632 | **/ |
| 633 | static void __devinit eeprom_index_to_delay(struct NvRamType *eeprom) | 633 | static void eeprom_index_to_delay(struct NvRamType *eeprom) |
| 634 | { | 634 | { |
| 635 | eeprom->delay_time = eeprom_index_to_delay_map[eeprom->delay_time]; | 635 | eeprom->delay_time = eeprom_index_to_delay_map[eeprom->delay_time]; |
| 636 | } | 636 | } |
| @@ -643,7 +643,7 @@ static void __devinit eeprom_index_to_delay(struct NvRamType *eeprom) | |||
| 643 | * | 643 | * |
| 644 | * @delay: The delay, in seconds, to find the eeprom index for. | 644 | * @delay: The delay, in seconds, to find the eeprom index for. |
| 645 | **/ | 645 | **/ |
| 646 | static int __devinit delay_to_eeprom_index(int delay) | 646 | static int delay_to_eeprom_index(int delay) |
| 647 | { | 647 | { |
| 648 | u8 idx = 0; | 648 | u8 idx = 0; |
| 649 | while (idx < 7 && eeprom_index_to_delay_map[idx] < delay) | 649 | while (idx < 7 && eeprom_index_to_delay_map[idx] < delay) |
| @@ -659,7 +659,7 @@ static int __devinit delay_to_eeprom_index(int delay) | |||
| 659 | * | 659 | * |
| 660 | * @eeprom: The eeprom data to override with command line options. | 660 | * @eeprom: The eeprom data to override with command line options. |
| 661 | **/ | 661 | **/ |
| 662 | static void __devinit eeprom_override(struct NvRamType *eeprom) | 662 | static void eeprom_override(struct NvRamType *eeprom) |
| 663 | { | 663 | { |
| 664 | u8 id; | 664 | u8 id; |
| 665 | 665 | ||
| @@ -3938,7 +3938,7 @@ static void dc395x_slave_destroy(struct scsi_device *scsi_device) | |||
| 3938 | * | 3938 | * |
| 3939 | * @io_port: base I/O address | 3939 | * @io_port: base I/O address |
| 3940 | **/ | 3940 | **/ |
| 3941 | static void __devinit trms1040_wait_30us(unsigned long io_port) | 3941 | static void trms1040_wait_30us(unsigned long io_port) |
| 3942 | { | 3942 | { |
| 3943 | /* ScsiPortStallExecution(30); wait 30 us */ | 3943 | /* ScsiPortStallExecution(30); wait 30 us */ |
| 3944 | outb(5, io_port + TRM_S1040_GEN_TIMER); | 3944 | outb(5, io_port + TRM_S1040_GEN_TIMER); |
| @@ -3955,7 +3955,7 @@ static void __devinit trms1040_wait_30us(unsigned long io_port) | |||
| 3955 | * @cmd: SB + op code (command) to send | 3955 | * @cmd: SB + op code (command) to send |
| 3956 | * @addr: address to send | 3956 | * @addr: address to send |
| 3957 | **/ | 3957 | **/ |
| 3958 | static void __devinit trms1040_write_cmd(unsigned long io_port, u8 cmd, u8 addr) | 3958 | static void trms1040_write_cmd(unsigned long io_port, u8 cmd, u8 addr) |
| 3959 | { | 3959 | { |
| 3960 | int i; | 3960 | int i; |
| 3961 | u8 send_data; | 3961 | u8 send_data; |
| @@ -4000,7 +4000,7 @@ static void __devinit trms1040_write_cmd(unsigned long io_port, u8 cmd, u8 addr) | |||
| 4000 | * @addr: offset into EEPROM | 4000 | * @addr: offset into EEPROM |
| 4001 | * @byte: bytes to write | 4001 | * @byte: bytes to write |
| 4002 | **/ | 4002 | **/ |
| 4003 | static void __devinit trms1040_set_data(unsigned long io_port, u8 addr, u8 byte) | 4003 | static void trms1040_set_data(unsigned long io_port, u8 addr, u8 byte) |
| 4004 | { | 4004 | { |
| 4005 | int i; | 4005 | int i; |
| 4006 | u8 send_data; | 4006 | u8 send_data; |
| @@ -4054,7 +4054,7 @@ static void __devinit trms1040_set_data(unsigned long io_port, u8 addr, u8 byte) | |||
| 4054 | * @eeprom: the data to write | 4054 | * @eeprom: the data to write |
| 4055 | * @io_port: the base io port | 4055 | * @io_port: the base io port |
| 4056 | **/ | 4056 | **/ |
| 4057 | static void __devinit trms1040_write_all(struct NvRamType *eeprom, unsigned long io_port) | 4057 | static void trms1040_write_all(struct NvRamType *eeprom, unsigned long io_port) |
| 4058 | { | 4058 | { |
| 4059 | u8 *b_eeprom = (u8 *)eeprom; | 4059 | u8 *b_eeprom = (u8 *)eeprom; |
| 4060 | u8 addr; | 4060 | u8 addr; |
| @@ -4094,7 +4094,7 @@ static void __devinit trms1040_write_all(struct NvRamType *eeprom, unsigned long | |||
| 4094 | * | 4094 | * |
| 4095 | * Returns the byte read. | 4095 | * Returns the byte read. |
| 4096 | **/ | 4096 | **/ |
| 4097 | static u8 __devinit trms1040_get_data(unsigned long io_port, u8 addr) | 4097 | static u8 trms1040_get_data(unsigned long io_port, u8 addr) |
| 4098 | { | 4098 | { |
| 4099 | int i; | 4099 | int i; |
| 4100 | u8 read_byte; | 4100 | u8 read_byte; |
| @@ -4132,7 +4132,7 @@ static u8 __devinit trms1040_get_data(unsigned long io_port, u8 addr) | |||
| 4132 | * @eeprom: where to store the data | 4132 | * @eeprom: where to store the data |
| 4133 | * @io_port: the base io port | 4133 | * @io_port: the base io port |
| 4134 | **/ | 4134 | **/ |
| 4135 | static void __devinit trms1040_read_all(struct NvRamType *eeprom, unsigned long io_port) | 4135 | static void trms1040_read_all(struct NvRamType *eeprom, unsigned long io_port) |
| 4136 | { | 4136 | { |
| 4137 | u8 *b_eeprom = (u8 *)eeprom; | 4137 | u8 *b_eeprom = (u8 *)eeprom; |
| 4138 | u8 addr; | 4138 | u8 addr; |
| @@ -4162,7 +4162,7 @@ static void __devinit trms1040_read_all(struct NvRamType *eeprom, unsigned long | |||
| 4162 | * @eeprom: caller allocated strcuture to read the eeprom data into | 4162 | * @eeprom: caller allocated strcuture to read the eeprom data into |
| 4163 | * @io_port: io port to read from | 4163 | * @io_port: io port to read from |
| 4164 | **/ | 4164 | **/ |
| 4165 | static void __devinit check_eeprom(struct NvRamType *eeprom, unsigned long io_port) | 4165 | static void check_eeprom(struct NvRamType *eeprom, unsigned long io_port) |
| 4166 | { | 4166 | { |
| 4167 | u16 *w_eeprom = (u16 *)eeprom; | 4167 | u16 *w_eeprom = (u16 *)eeprom; |
| 4168 | u16 w_addr; | 4168 | u16 w_addr; |
| @@ -4232,7 +4232,7 @@ static void __devinit check_eeprom(struct NvRamType *eeprom, unsigned long io_po | |||
| 4232 | * | 4232 | * |
| 4233 | * @eeprom: The eeprom data strucutre to show details for. | 4233 | * @eeprom: The eeprom data strucutre to show details for. |
| 4234 | **/ | 4234 | **/ |
| 4235 | static void __devinit print_eeprom_settings(struct NvRamType *eeprom) | 4235 | static void print_eeprom_settings(struct NvRamType *eeprom) |
| 4236 | { | 4236 | { |
| 4237 | dprintkl(KERN_INFO, "Used settings: AdapterID=%02i, Speed=%i(%02i.%01iMHz), dev_mode=0x%02x\n", | 4237 | dprintkl(KERN_INFO, "Used settings: AdapterID=%02i, Speed=%i(%02i.%01iMHz), dev_mode=0x%02x\n", |
| 4238 | eeprom->scsi_id, | 4238 | eeprom->scsi_id, |
| @@ -4260,7 +4260,7 @@ static void adapter_sg_tables_free(struct AdapterCtlBlk *acb) | |||
| 4260 | /* | 4260 | /* |
| 4261 | * Allocate SG tables; as we have to pci_map them, an SG list (struct SGentry*) | 4261 | * Allocate SG tables; as we have to pci_map them, an SG list (struct SGentry*) |
| 4262 | * should never cross a page boundary */ | 4262 | * should never cross a page boundary */ |
| 4263 | static int __devinit adapter_sg_tables_alloc(struct AdapterCtlBlk *acb) | 4263 | static int adapter_sg_tables_alloc(struct AdapterCtlBlk *acb) |
| 4264 | { | 4264 | { |
| 4265 | const unsigned mem_needed = (DC395x_MAX_SRB_CNT+1) | 4265 | const unsigned mem_needed = (DC395x_MAX_SRB_CNT+1) |
| 4266 | *SEGMENTX_LEN; | 4266 | *SEGMENTX_LEN; |
| @@ -4306,7 +4306,7 @@ static int __devinit adapter_sg_tables_alloc(struct AdapterCtlBlk *acb) | |||
| 4306 | * | 4306 | * |
| 4307 | * @acb: The adapter to print the information for. | 4307 | * @acb: The adapter to print the information for. |
| 4308 | **/ | 4308 | **/ |
| 4309 | static void __devinit adapter_print_config(struct AdapterCtlBlk *acb) | 4309 | static void adapter_print_config(struct AdapterCtlBlk *acb) |
| 4310 | { | 4310 | { |
| 4311 | u8 bval; | 4311 | u8 bval; |
| 4312 | 4312 | ||
| @@ -4350,7 +4350,7 @@ static void __devinit adapter_print_config(struct AdapterCtlBlk *acb) | |||
| 4350 | * | 4350 | * |
| 4351 | * @acb: The adapter to initialize. | 4351 | * @acb: The adapter to initialize. |
| 4352 | **/ | 4352 | **/ |
| 4353 | static void __devinit adapter_init_params(struct AdapterCtlBlk *acb) | 4353 | static void adapter_init_params(struct AdapterCtlBlk *acb) |
| 4354 | { | 4354 | { |
| 4355 | struct NvRamType *eeprom = &acb->eeprom; | 4355 | struct NvRamType *eeprom = &acb->eeprom; |
| 4356 | int i; | 4356 | int i; |
| @@ -4412,7 +4412,7 @@ static void __devinit adapter_init_params(struct AdapterCtlBlk *acb) | |||
| 4412 | * | 4412 | * |
| 4413 | * @host: The scsi host instance to fill in the values for. | 4413 | * @host: The scsi host instance to fill in the values for. |
| 4414 | **/ | 4414 | **/ |
| 4415 | static void __devinit adapter_init_scsi_host(struct Scsi_Host *host) | 4415 | static void adapter_init_scsi_host(struct Scsi_Host *host) |
| 4416 | { | 4416 | { |
| 4417 | struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)host->hostdata; | 4417 | struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)host->hostdata; |
| 4418 | struct NvRamType *eeprom = &acb->eeprom; | 4418 | struct NvRamType *eeprom = &acb->eeprom; |
| @@ -4453,7 +4453,7 @@ static void __devinit adapter_init_scsi_host(struct Scsi_Host *host) | |||
| 4453 | * | 4453 | * |
| 4454 | * @acb: The adapter which we are to init. | 4454 | * @acb: The adapter which we are to init. |
| 4455 | **/ | 4455 | **/ |
| 4456 | static void __devinit adapter_init_chip(struct AdapterCtlBlk *acb) | 4456 | static void adapter_init_chip(struct AdapterCtlBlk *acb) |
| 4457 | { | 4457 | { |
| 4458 | struct NvRamType *eeprom = &acb->eeprom; | 4458 | struct NvRamType *eeprom = &acb->eeprom; |
| 4459 | 4459 | ||
| @@ -4506,8 +4506,8 @@ static void __devinit adapter_init_chip(struct AdapterCtlBlk *acb) | |||
| 4506 | * Returns 0 if the initialization succeeds, any other value on | 4506 | * Returns 0 if the initialization succeeds, any other value on |
| 4507 | * failure. | 4507 | * failure. |
| 4508 | **/ | 4508 | **/ |
| 4509 | static int __devinit adapter_init(struct AdapterCtlBlk *acb, | 4509 | static int adapter_init(struct AdapterCtlBlk *acb, unsigned long io_port, |
| 4510 | unsigned long io_port, u32 io_port_len, unsigned int irq) | 4510 | u32 io_port_len, unsigned int irq) |
| 4511 | { | 4511 | { |
| 4512 | if (!request_region(io_port, io_port_len, DC395X_NAME)) { | 4512 | if (!request_region(io_port, io_port_len, DC395X_NAME)) { |
| 4513 | dprintkl(KERN_ERR, "Failed to reserve IO region 0x%lx\n", io_port); | 4513 | dprintkl(KERN_ERR, "Failed to reserve IO region 0x%lx\n", io_port); |
| @@ -4794,8 +4794,7 @@ static void banner_display(void) | |||
| 4794 | * | 4794 | * |
| 4795 | * Returns 0 on success, or an error code (-ve) on failure. | 4795 | * Returns 0 on success, or an error code (-ve) on failure. |
| 4796 | **/ | 4796 | **/ |
| 4797 | static int __devinit dc395x_init_one(struct pci_dev *dev, | 4797 | static int dc395x_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
| 4798 | const struct pci_device_id *id) | ||
| 4799 | { | 4798 | { |
| 4800 | struct Scsi_Host *scsi_host = NULL; | 4799 | struct Scsi_Host *scsi_host = NULL; |
| 4801 | struct AdapterCtlBlk *acb = NULL; | 4800 | struct AdapterCtlBlk *acb = NULL; |
| @@ -4861,7 +4860,7 @@ fail: | |||
| 4861 | * | 4860 | * |
| 4862 | * @dev: The PCI device to initialize. | 4861 | * @dev: The PCI device to initialize. |
| 4863 | **/ | 4862 | **/ |
| 4864 | static void __devexit dc395x_remove_one(struct pci_dev *dev) | 4863 | static void dc395x_remove_one(struct pci_dev *dev) |
| 4865 | { | 4864 | { |
| 4866 | struct Scsi_Host *scsi_host = pci_get_drvdata(dev); | 4865 | struct Scsi_Host *scsi_host = pci_get_drvdata(dev); |
| 4867 | struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)(scsi_host->hostdata); | 4866 | struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)(scsi_host->hostdata); |
| @@ -4892,7 +4891,7 @@ static struct pci_driver dc395x_driver = { | |||
| 4892 | .name = DC395X_NAME, | 4891 | .name = DC395X_NAME, |
| 4893 | .id_table = dc395x_pci_table, | 4892 | .id_table = dc395x_pci_table, |
| 4894 | .probe = dc395x_init_one, | 4893 | .probe = dc395x_init_one, |
| 4895 | .remove = __devexit_p(dc395x_remove_one), | 4894 | .remove = dc395x_remove_one, |
| 4896 | }; | 4895 | }; |
| 4897 | 4896 | ||
| 4898 | 4897 | ||
diff --git a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c index 207352cc70cc..4b0dd8c56707 100644 --- a/drivers/scsi/dmx3191d.c +++ b/drivers/scsi/dmx3191d.c | |||
| @@ -68,8 +68,8 @@ static struct scsi_host_template dmx3191d_driver_template = { | |||
| 68 | .use_clustering = DISABLE_CLUSTERING, | 68 | .use_clustering = DISABLE_CLUSTERING, |
| 69 | }; | 69 | }; |
| 70 | 70 | ||
| 71 | static int __devinit dmx3191d_probe_one(struct pci_dev *pdev, | 71 | static int dmx3191d_probe_one(struct pci_dev *pdev, |
| 72 | const struct pci_device_id *id) | 72 | const struct pci_device_id *id) |
| 73 | { | 73 | { |
| 74 | struct Scsi_Host *shost; | 74 | struct Scsi_Host *shost; |
| 75 | unsigned long io; | 75 | unsigned long io; |
| @@ -123,7 +123,7 @@ static int __devinit dmx3191d_probe_one(struct pci_dev *pdev, | |||
| 123 | return error; | 123 | return error; |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | static void __devexit dmx3191d_remove_one(struct pci_dev *pdev) | 126 | static void dmx3191d_remove_one(struct pci_dev *pdev) |
| 127 | { | 127 | { |
| 128 | struct Scsi_Host *shost = pci_get_drvdata(pdev); | 128 | struct Scsi_Host *shost = pci_get_drvdata(pdev); |
| 129 | 129 | ||
| @@ -150,7 +150,7 @@ static struct pci_driver dmx3191d_pci_driver = { | |||
| 150 | .name = DMX3191D_DRIVER_NAME, | 150 | .name = DMX3191D_DRIVER_NAME, |
| 151 | .id_table = dmx3191d_pci_tbl, | 151 | .id_table = dmx3191d_pci_tbl, |
| 152 | .probe = dmx3191d_probe_one, | 152 | .probe = dmx3191d_probe_one, |
| 153 | .remove = __devexit_p(dmx3191d_remove_one), | 153 | .remove = dmx3191d_remove_one, |
| 154 | }; | 154 | }; |
| 155 | 155 | ||
| 156 | static int __init dmx3191d_init(void) | 156 | static int __init dmx3191d_init(void) |
diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c index 1a2a1e5824e3..fff682976c56 100644 --- a/drivers/scsi/fdomain.c +++ b/drivers/scsi/fdomain.c | |||
| @@ -1771,7 +1771,7 @@ struct scsi_host_template fdomain_driver_template = { | |||
| 1771 | #ifndef PCMCIA | 1771 | #ifndef PCMCIA |
| 1772 | #ifdef CONFIG_PCI | 1772 | #ifdef CONFIG_PCI |
| 1773 | 1773 | ||
| 1774 | static struct pci_device_id fdomain_pci_tbl[] __devinitdata = { | 1774 | static struct pci_device_id fdomain_pci_tbl[] = { |
| 1775 | { PCI_VENDOR_ID_FD, PCI_DEVICE_ID_FD_36C70, | 1775 | { PCI_VENDOR_ID_FD, PCI_DEVICE_ID_FD_36C70, |
| 1776 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | 1776 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, |
| 1777 | { } | 1777 | { } |
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index fc98eb61e760..fbf3ac6e0c55 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c | |||
| @@ -399,8 +399,7 @@ static u8 *fnic_get_mac(struct fc_lport *lport) | |||
| 399 | return fnic->data_src_addr; | 399 | return fnic->data_src_addr; |
| 400 | } | 400 | } |
| 401 | 401 | ||
| 402 | static int __devinit fnic_probe(struct pci_dev *pdev, | 402 | static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 403 | const struct pci_device_id *ent) | ||
| 404 | { | 403 | { |
| 405 | struct Scsi_Host *host; | 404 | struct Scsi_Host *host; |
| 406 | struct fc_lport *lp; | 405 | struct fc_lport *lp; |
| @@ -774,7 +773,7 @@ err_out: | |||
| 774 | return err; | 773 | return err; |
| 775 | } | 774 | } |
| 776 | 775 | ||
| 777 | static void __devexit fnic_remove(struct pci_dev *pdev) | 776 | static void fnic_remove(struct pci_dev *pdev) |
| 778 | { | 777 | { |
| 779 | struct fnic *fnic = pci_get_drvdata(pdev); | 778 | struct fnic *fnic = pci_get_drvdata(pdev); |
| 780 | struct fc_lport *lp = fnic->lport; | 779 | struct fc_lport *lp = fnic->lport; |
| @@ -849,7 +848,7 @@ static struct pci_driver fnic_driver = { | |||
| 849 | .name = DRV_NAME, | 848 | .name = DRV_NAME, |
| 850 | .id_table = fnic_id_table, | 849 | .id_table = fnic_id_table, |
| 851 | .probe = fnic_probe, | 850 | .probe = fnic_probe, |
| 852 | .remove = __devexit_p(fnic_remove), | 851 | .remove = fnic_remove, |
| 853 | }; | 852 | }; |
| 854 | 853 | ||
| 855 | static int __init fnic_init_module(void) | 854 | static int __init fnic_init_module(void) |
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index 1a5954f0915a..5041f925c191 100644 --- a/drivers/scsi/g_NCR5380.c +++ b/drivers/scsi/g_NCR5380.c | |||
| @@ -939,7 +939,7 @@ module_param(dtc_3181e, int, 0); | |||
| 939 | MODULE_LICENSE("GPL"); | 939 | MODULE_LICENSE("GPL"); |
| 940 | 940 | ||
| 941 | #ifndef SCSI_G_NCR5380_MEM | 941 | #ifndef SCSI_G_NCR5380_MEM |
| 942 | static struct isapnp_device_id id_table[] __devinitdata = { | 942 | static struct isapnp_device_id id_table[] = { |
| 943 | { | 943 | { |
| 944 | ISAPNP_ANY_ID, ISAPNP_ANY_ID, | 944 | ISAPNP_ANY_ID, ISAPNP_ANY_ID, |
| 945 | ISAPNP_VENDOR('D', 'T', 'C'), ISAPNP_FUNCTION(0x436e), | 945 | ISAPNP_VENDOR('D', 'T', 'C'), ISAPNP_FUNCTION(0x436e), |
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 5d72274c507f..599790e41a98 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c | |||
| @@ -590,7 +590,7 @@ static struct pci_driver gdth_pci_driver = { | |||
| 590 | .remove = gdth_pci_remove_one, | 590 | .remove = gdth_pci_remove_one, |
| 591 | }; | 591 | }; |
| 592 | 592 | ||
| 593 | static void __devexit gdth_pci_remove_one(struct pci_dev *pdev) | 593 | static void gdth_pci_remove_one(struct pci_dev *pdev) |
| 594 | { | 594 | { |
| 595 | gdth_ha_str *ha = pci_get_drvdata(pdev); | 595 | gdth_ha_str *ha = pci_get_drvdata(pdev); |
| 596 | 596 | ||
| @@ -602,8 +602,8 @@ static void __devexit gdth_pci_remove_one(struct pci_dev *pdev) | |||
| 602 | pci_disable_device(pdev); | 602 | pci_disable_device(pdev); |
| 603 | } | 603 | } |
| 604 | 604 | ||
| 605 | static int __devinit gdth_pci_init_one(struct pci_dev *pdev, | 605 | static int gdth_pci_init_one(struct pci_dev *pdev, |
| 606 | const struct pci_device_id *ent) | 606 | const struct pci_device_id *ent) |
| 607 | { | 607 | { |
| 608 | u16 vendor = pdev->vendor; | 608 | u16 vendor = pdev->vendor; |
| 609 | u16 device = pdev->device; | 609 | u16 device = pdev->device; |
| @@ -855,8 +855,8 @@ static int __init gdth_init_isa(u32 bios_adr,gdth_ha_str *ha) | |||
| 855 | #endif /* CONFIG_ISA */ | 855 | #endif /* CONFIG_ISA */ |
| 856 | 856 | ||
| 857 | #ifdef CONFIG_PCI | 857 | #ifdef CONFIG_PCI |
| 858 | static int __devinit gdth_init_pci(struct pci_dev *pdev, gdth_pci_str *pcistr, | 858 | static int gdth_init_pci(struct pci_dev *pdev, gdth_pci_str *pcistr, |
| 859 | gdth_ha_str *ha) | 859 | gdth_ha_str *ha) |
| 860 | { | 860 | { |
| 861 | register gdt6_dpram_str __iomem *dp6_ptr; | 861 | register gdt6_dpram_str __iomem *dp6_ptr; |
| 862 | register gdt6c_dpram_str __iomem *dp6c_ptr; | 862 | register gdt6c_dpram_str __iomem *dp6c_ptr; |
| @@ -1239,7 +1239,7 @@ static int __devinit gdth_init_pci(struct pci_dev *pdev, gdth_pci_str *pcistr, | |||
| 1239 | 1239 | ||
| 1240 | /* controller protocol functions */ | 1240 | /* controller protocol functions */ |
| 1241 | 1241 | ||
| 1242 | static void __devinit gdth_enable_int(gdth_ha_str *ha) | 1242 | static void gdth_enable_int(gdth_ha_str *ha) |
| 1243 | { | 1243 | { |
| 1244 | unsigned long flags; | 1244 | unsigned long flags; |
| 1245 | gdt2_dpram_str __iomem *dp2_ptr; | 1245 | gdt2_dpram_str __iomem *dp2_ptr; |
| @@ -1555,7 +1555,7 @@ static int gdth_internal_cmd(gdth_ha_str *ha, u8 service, u16 opcode, | |||
| 1555 | 1555 | ||
| 1556 | /* search for devices */ | 1556 | /* search for devices */ |
| 1557 | 1557 | ||
| 1558 | static int __devinit gdth_search_drives(gdth_ha_str *ha) | 1558 | static int gdth_search_drives(gdth_ha_str *ha) |
| 1559 | { | 1559 | { |
| 1560 | u16 cdev_cnt, i; | 1560 | u16 cdev_cnt, i; |
| 1561 | int ok; | 1561 | int ok; |
| @@ -4959,8 +4959,7 @@ static int __init gdth_eisa_probe_one(u16 eisa_slot) | |||
| 4959 | #endif /* CONFIG_EISA */ | 4959 | #endif /* CONFIG_EISA */ |
| 4960 | 4960 | ||
| 4961 | #ifdef CONFIG_PCI | 4961 | #ifdef CONFIG_PCI |
| 4962 | static int __devinit gdth_pci_probe_one(gdth_pci_str *pcistr, | 4962 | static int gdth_pci_probe_one(gdth_pci_str *pcistr, gdth_ha_str **ha_out) |
| 4963 | gdth_ha_str **ha_out) | ||
| 4964 | { | 4963 | { |
| 4965 | struct Scsi_Host *shp; | 4964 | struct Scsi_Host *shp; |
| 4966 | gdth_ha_str *ha; | 4965 | gdth_ha_str *ha; |
diff --git a/drivers/scsi/gvp11.c b/drivers/scsi/gvp11.c index 488fbc648656..dbe4cc6b9f8b 100644 --- a/drivers/scsi/gvp11.c +++ b/drivers/scsi/gvp11.c | |||
| @@ -204,7 +204,7 @@ static struct scsi_host_template gvp11_scsi_template = { | |||
| 204 | .use_clustering = DISABLE_CLUSTERING | 204 | .use_clustering = DISABLE_CLUSTERING |
| 205 | }; | 205 | }; |
| 206 | 206 | ||
| 207 | static int __devinit check_wd33c93(struct gvp11_scsiregs *regs) | 207 | static int check_wd33c93(struct gvp11_scsiregs *regs) |
| 208 | { | 208 | { |
| 209 | #ifdef CHECK_WD33C93 | 209 | #ifdef CHECK_WD33C93 |
| 210 | volatile unsigned char *sasr_3393, *scmd_3393; | 210 | volatile unsigned char *sasr_3393, *scmd_3393; |
| @@ -284,8 +284,7 @@ static int __devinit check_wd33c93(struct gvp11_scsiregs *regs) | |||
| 284 | return 0; | 284 | return 0; |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | static int __devinit gvp11_probe(struct zorro_dev *z, | 287 | static int gvp11_probe(struct zorro_dev *z, const struct zorro_device_id *ent) |
| 288 | const struct zorro_device_id *ent) | ||
| 289 | { | 288 | { |
| 290 | struct Scsi_Host *instance; | 289 | struct Scsi_Host *instance; |
| 291 | unsigned long address; | 290 | unsigned long address; |
| @@ -380,7 +379,7 @@ fail_check_or_alloc: | |||
| 380 | return error; | 379 | return error; |
| 381 | } | 380 | } |
| 382 | 381 | ||
| 383 | static void __devexit gvp11_remove(struct zorro_dev *z) | 382 | static void gvp11_remove(struct zorro_dev *z) |
| 384 | { | 383 | { |
| 385 | struct Scsi_Host *instance = zorro_get_drvdata(z); | 384 | struct Scsi_Host *instance = zorro_get_drvdata(z); |
| 386 | struct gvp11_hostdata *hdata = shost_priv(instance); | 385 | struct gvp11_hostdata *hdata = shost_priv(instance); |
| @@ -398,7 +397,7 @@ static void __devexit gvp11_remove(struct zorro_dev *z) | |||
| 398 | * SERIES I though). | 397 | * SERIES I though). |
| 399 | */ | 398 | */ |
| 400 | 399 | ||
| 401 | static struct zorro_device_id gvp11_zorro_tbl[] __devinitdata = { | 400 | static struct zorro_device_id gvp11_zorro_tbl[] = { |
| 402 | { ZORRO_PROD_GVP_COMBO_030_R3_SCSI, ~0x00ffffff }, | 401 | { ZORRO_PROD_GVP_COMBO_030_R3_SCSI, ~0x00ffffff }, |
| 403 | { ZORRO_PROD_GVP_SERIES_II, ~0x00ffffff }, | 402 | { ZORRO_PROD_GVP_SERIES_II, ~0x00ffffff }, |
| 404 | { ZORRO_PROD_GVP_GFORCE_030_SCSI, ~0x01ffffff }, | 403 | { ZORRO_PROD_GVP_GFORCE_030_SCSI, ~0x01ffffff }, |
| @@ -414,7 +413,7 @@ static struct zorro_driver gvp11_driver = { | |||
| 414 | .name = "gvp11", | 413 | .name = "gvp11", |
| 415 | .id_table = gvp11_zorro_tbl, | 414 | .id_table = gvp11_zorro_tbl, |
| 416 | .probe = gvp11_probe, | 415 | .probe = gvp11_probe, |
| 417 | .remove = __devexit_p(gvp11_remove), | 416 | .remove = gvp11_remove, |
| 418 | }; | 417 | }; |
| 419 | 418 | ||
| 420 | static int __init gvp11_init(void) | 419 | static int __init gvp11_init(void) |
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 4217e49aea46..4f338061b5c3 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
| @@ -189,16 +189,16 @@ static void check_ioctl_unit_attention(struct ctlr_info *h, | |||
| 189 | /* performant mode helper functions */ | 189 | /* performant mode helper functions */ |
| 190 | static void calc_bucket_map(int *bucket, int num_buckets, | 190 | static void calc_bucket_map(int *bucket, int num_buckets, |
| 191 | int nsgs, int *bucket_map); | 191 | int nsgs, int *bucket_map); |
| 192 | static __devinit void hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h); | 192 | static void hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h); |
| 193 | static inline u32 next_command(struct ctlr_info *h, u8 q); | 193 | static inline u32 next_command(struct ctlr_info *h, u8 q); |
| 194 | static int __devinit hpsa_find_cfg_addrs(struct pci_dev *pdev, | 194 | static int hpsa_find_cfg_addrs(struct pci_dev *pdev, void __iomem *vaddr, |
| 195 | void __iomem *vaddr, u32 *cfg_base_addr, u64 *cfg_base_addr_index, | 195 | u32 *cfg_base_addr, u64 *cfg_base_addr_index, |
| 196 | u64 *cfg_offset); | 196 | u64 *cfg_offset); |
| 197 | static int __devinit hpsa_pci_find_memory_BAR(struct pci_dev *pdev, | 197 | static int hpsa_pci_find_memory_BAR(struct pci_dev *pdev, |
| 198 | unsigned long *memory_bar); | 198 | unsigned long *memory_bar); |
| 199 | static int __devinit hpsa_lookup_board_id(struct pci_dev *pdev, u32 *board_id); | 199 | static int hpsa_lookup_board_id(struct pci_dev *pdev, u32 *board_id); |
| 200 | static int __devinit hpsa_wait_for_board_state(struct pci_dev *pdev, | 200 | static int hpsa_wait_for_board_state(struct pci_dev *pdev, void __iomem *vaddr, |
| 201 | void __iomem *vaddr, int wait_for_ready); | 201 | int wait_for_ready); |
| 202 | static inline void finish_cmd(struct CommandList *c); | 202 | static inline void finish_cmd(struct CommandList *c); |
| 203 | #define BOARD_NOT_READY 0 | 203 | #define BOARD_NOT_READY 0 |
| 204 | #define BOARD_READY 1 | 204 | #define BOARD_READY 1 |
| @@ -3182,8 +3182,8 @@ static int hpsa_ioctl(struct scsi_device *dev, int cmd, void *arg) | |||
| 3182 | } | 3182 | } |
| 3183 | } | 3183 | } |
| 3184 | 3184 | ||
| 3185 | static int __devinit hpsa_send_host_reset(struct ctlr_info *h, | 3185 | static int hpsa_send_host_reset(struct ctlr_info *h, unsigned char *scsi3addr, |
| 3186 | unsigned char *scsi3addr, u8 reset_type) | 3186 | u8 reset_type) |
| 3187 | { | 3187 | { |
| 3188 | struct CommandList *c; | 3188 | struct CommandList *c; |
| 3189 | 3189 | ||
| @@ -3606,8 +3606,8 @@ static irqreturn_t do_hpsa_intr_msi(int irq, void *queue) | |||
| 3606 | * in simple mode, not performant mode due to the tag lookup. | 3606 | * in simple mode, not performant mode due to the tag lookup. |
| 3607 | * We only ever use this immediately after a controller reset. | 3607 | * We only ever use this immediately after a controller reset. |
| 3608 | */ | 3608 | */ |
| 3609 | static __devinit int hpsa_message(struct pci_dev *pdev, unsigned char opcode, | 3609 | static int hpsa_message(struct pci_dev *pdev, unsigned char opcode, |
| 3610 | unsigned char type) | 3610 | unsigned char type) |
| 3611 | { | 3611 | { |
| 3612 | struct Command { | 3612 | struct Command { |
| 3613 | struct CommandListHeader CommandHeader; | 3613 | struct CommandListHeader CommandHeader; |
| @@ -3756,14 +3756,13 @@ static int hpsa_controller_hard_reset(struct pci_dev *pdev, | |||
| 3756 | return 0; | 3756 | return 0; |
| 3757 | } | 3757 | } |
| 3758 | 3758 | ||
| 3759 | static __devinit void init_driver_version(char *driver_version, int len) | 3759 | static void init_driver_version(char *driver_version, int len) |
| 3760 | { | 3760 | { |
| 3761 | memset(driver_version, 0, len); | 3761 | memset(driver_version, 0, len); |
| 3762 | strncpy(driver_version, HPSA " " HPSA_DRIVER_VERSION, len - 1); | 3762 | strncpy(driver_version, HPSA " " HPSA_DRIVER_VERSION, len - 1); |
| 3763 | } | 3763 | } |
| 3764 | 3764 | ||
| 3765 | static __devinit int write_driver_ver_to_cfgtable( | 3765 | static int write_driver_ver_to_cfgtable(struct CfgTable __iomem *cfgtable) |
| 3766 | struct CfgTable __iomem *cfgtable) | ||
| 3767 | { | 3766 | { |
| 3768 | char *driver_version; | 3767 | char *driver_version; |
| 3769 | int i, size = sizeof(cfgtable->driver_version); | 3768 | int i, size = sizeof(cfgtable->driver_version); |
| @@ -3779,8 +3778,8 @@ static __devinit int write_driver_ver_to_cfgtable( | |||
| 3779 | return 0; | 3778 | return 0; |
| 3780 | } | 3779 | } |
| 3781 | 3780 | ||
| 3782 | static __devinit void read_driver_ver_from_cfgtable( | 3781 | static void read_driver_ver_from_cfgtable(struct CfgTable __iomem *cfgtable, |
| 3783 | struct CfgTable __iomem *cfgtable, unsigned char *driver_ver) | 3782 | unsigned char *driver_ver) |
| 3784 | { | 3783 | { |
| 3785 | int i; | 3784 | int i; |
| 3786 | 3785 | ||
| @@ -3788,8 +3787,7 @@ static __devinit void read_driver_ver_from_cfgtable( | |||
| 3788 | driver_ver[i] = readb(&cfgtable->driver_version[i]); | 3787 | driver_ver[i] = readb(&cfgtable->driver_version[i]); |
| 3789 | } | 3788 | } |
| 3790 | 3789 | ||
| 3791 | static __devinit int controller_reset_failed( | 3790 | static int controller_reset_failed(struct CfgTable __iomem *cfgtable) |
| 3792 | struct CfgTable __iomem *cfgtable) | ||
| 3793 | { | 3791 | { |
| 3794 | 3792 | ||
| 3795 | char *driver_ver, *old_driver_ver; | 3793 | char *driver_ver, *old_driver_ver; |
| @@ -3812,7 +3810,7 @@ static __devinit int controller_reset_failed( | |||
| 3812 | /* This does a hard reset of the controller using PCI power management | 3810 | /* This does a hard reset of the controller using PCI power management |
| 3813 | * states or the using the doorbell register. | 3811 | * states or the using the doorbell register. |
| 3814 | */ | 3812 | */ |
| 3815 | static __devinit int hpsa_kdump_hard_reset_controller(struct pci_dev *pdev) | 3813 | static int hpsa_kdump_hard_reset_controller(struct pci_dev *pdev) |
| 3816 | { | 3814 | { |
| 3817 | u64 cfg_offset; | 3815 | u64 cfg_offset; |
| 3818 | u32 cfg_base_addr; | 3816 | u32 cfg_base_addr; |
| @@ -4029,7 +4027,7 @@ static int find_PCI_BAR_index(struct pci_dev *pdev, unsigned long pci_bar_addr) | |||
| 4029 | * controllers that are capable. If not, we use IO-APIC mode. | 4027 | * controllers that are capable. If not, we use IO-APIC mode. |
| 4030 | */ | 4028 | */ |
| 4031 | 4029 | ||
| 4032 | static void __devinit hpsa_interrupt_mode(struct ctlr_info *h) | 4030 | static void hpsa_interrupt_mode(struct ctlr_info *h) |
| 4033 | { | 4031 | { |
| 4034 | #ifdef CONFIG_PCI_MSI | 4032 | #ifdef CONFIG_PCI_MSI |
| 4035 | int err, i; | 4033 | int err, i; |
| @@ -4077,7 +4075,7 @@ default_int_mode: | |||
| 4077 | h->intr[h->intr_mode] = h->pdev->irq; | 4075 | h->intr[h->intr_mode] = h->pdev->irq; |
| 4078 | } | 4076 | } |
| 4079 | 4077 | ||
| 4080 | static int __devinit hpsa_lookup_board_id(struct pci_dev *pdev, u32 *board_id) | 4078 | static int hpsa_lookup_board_id(struct pci_dev *pdev, u32 *board_id) |
| 4081 | { | 4079 | { |
| 4082 | int i; | 4080 | int i; |
| 4083 | u32 subsystem_vendor_id, subsystem_device_id; | 4081 | u32 subsystem_vendor_id, subsystem_device_id; |
| @@ -4101,8 +4099,8 @@ static int __devinit hpsa_lookup_board_id(struct pci_dev *pdev, u32 *board_id) | |||
| 4101 | return ARRAY_SIZE(products) - 1; /* generic unknown smart array */ | 4099 | return ARRAY_SIZE(products) - 1; /* generic unknown smart array */ |
| 4102 | } | 4100 | } |
| 4103 | 4101 | ||
| 4104 | static int __devinit hpsa_pci_find_memory_BAR(struct pci_dev *pdev, | 4102 | static int hpsa_pci_find_memory_BAR(struct pci_dev *pdev, |
| 4105 | unsigned long *memory_bar) | 4103 | unsigned long *memory_bar) |
| 4106 | { | 4104 | { |
| 4107 | int i; | 4105 | int i; |
| 4108 | 4106 | ||
| @@ -4118,8 +4116,8 @@ static int __devinit hpsa_pci_find_memory_BAR(struct pci_dev *pdev, | |||
| 4118 | return -ENODEV; | 4116 | return -ENODEV; |
| 4119 | } | 4117 | } |
| 4120 | 4118 | ||
| 4121 | static int __devinit hpsa_wait_for_board_state(struct pci_dev *pdev, | 4119 | static int hpsa_wait_for_board_state(struct pci_dev *pdev, void __iomem *vaddr, |
| 4122 | void __iomem *vaddr, int wait_for_ready) | 4120 | int wait_for_ready) |
| 4123 | { | 4121 | { |
| 4124 | int i, iterations; | 4122 | int i, iterations; |
| 4125 | u32 scratchpad; | 4123 | u32 scratchpad; |
| @@ -4143,9 +4141,9 @@ static int __devinit hpsa_wait_for_board_state(struct pci_dev *pdev, | |||
| 4143 | return -ENODEV; | 4141 | return -ENODEV; |
| 4144 | } | 4142 | } |
| 4145 | 4143 | ||
| 4146 | static int __devinit hpsa_find_cfg_addrs(struct pci_dev *pdev, | 4144 | static int hpsa_find_cfg_addrs(struct pci_dev *pdev, void __iomem *vaddr, |
| 4147 | void __iomem *vaddr, u32 *cfg_base_addr, u64 *cfg_base_addr_index, | 4145 | u32 *cfg_base_addr, u64 *cfg_base_addr_index, |
| 4148 | u64 *cfg_offset) | 4146 | u64 *cfg_offset) |
| 4149 | { | 4147 | { |
| 4150 | *cfg_base_addr = readl(vaddr + SA5_CTCFG_OFFSET); | 4148 | *cfg_base_addr = readl(vaddr + SA5_CTCFG_OFFSET); |
| 4151 | *cfg_offset = readl(vaddr + SA5_CTMEM_OFFSET); | 4149 | *cfg_offset = readl(vaddr + SA5_CTMEM_OFFSET); |
| @@ -4158,7 +4156,7 @@ static int __devinit hpsa_find_cfg_addrs(struct pci_dev *pdev, | |||
| 4158 | return 0; | 4156 | return 0; |
| 4159 | } | 4157 | } |
| 4160 | 4158 | ||
| 4161 | static int __devinit hpsa_find_cfgtables(struct ctlr_info *h) | 4159 | static int hpsa_find_cfgtables(struct ctlr_info *h) |
| 4162 | { | 4160 | { |
| 4163 | u64 cfg_offset; | 4161 | u64 cfg_offset; |
| 4164 | u32 cfg_base_addr; | 4162 | u32 cfg_base_addr; |
| @@ -4187,7 +4185,7 @@ static int __devinit hpsa_find_cfgtables(struct ctlr_info *h) | |||
| 4187 | return 0; | 4185 | return 0; |
| 4188 | } | 4186 | } |
| 4189 | 4187 | ||
| 4190 | static void __devinit hpsa_get_max_perf_mode_cmds(struct ctlr_info *h) | 4188 | static void hpsa_get_max_perf_mode_cmds(struct ctlr_info *h) |
| 4191 | { | 4189 | { |
| 4192 | h->max_commands = readl(&(h->cfgtable->MaxPerformantModeCommands)); | 4190 | h->max_commands = readl(&(h->cfgtable->MaxPerformantModeCommands)); |
| 4193 | 4191 | ||
| @@ -4208,7 +4206,7 @@ static void __devinit hpsa_get_max_perf_mode_cmds(struct ctlr_info *h) | |||
| 4208 | * max commands, max SG elements without chaining, and with chaining, | 4206 | * max commands, max SG elements without chaining, and with chaining, |
| 4209 | * SG chain block size, etc. | 4207 | * SG chain block size, etc. |
| 4210 | */ | 4208 | */ |
| 4211 | static void __devinit hpsa_find_board_params(struct ctlr_info *h) | 4209 | static void hpsa_find_board_params(struct ctlr_info *h) |
| 4212 | { | 4210 | { |
| 4213 | hpsa_get_max_perf_mode_cmds(h); | 4211 | hpsa_get_max_perf_mode_cmds(h); |
| 4214 | h->nr_cmds = h->max_commands - 4; /* Allow room for some ioctls */ | 4212 | h->nr_cmds = h->max_commands - 4; /* Allow room for some ioctls */ |
| @@ -4266,7 +4264,7 @@ static inline void hpsa_p600_dma_prefetch_quirk(struct ctlr_info *h) | |||
| 4266 | writel(dma_prefetch, h->vaddr + I2O_DMA1_CFG); | 4264 | writel(dma_prefetch, h->vaddr + I2O_DMA1_CFG); |
| 4267 | } | 4265 | } |
| 4268 | 4266 | ||
| 4269 | static void __devinit hpsa_wait_for_mode_change_ack(struct ctlr_info *h) | 4267 | static void hpsa_wait_for_mode_change_ack(struct ctlr_info *h) |
| 4270 | { | 4268 | { |
| 4271 | int i; | 4269 | int i; |
| 4272 | u32 doorbell_value; | 4270 | u32 doorbell_value; |
| @@ -4287,7 +4285,7 @@ static void __devinit hpsa_wait_for_mode_change_ack(struct ctlr_info *h) | |||
| 4287 | } | 4285 | } |
| 4288 | } | 4286 | } |
| 4289 | 4287 | ||
| 4290 | static int __devinit hpsa_enter_simple_mode(struct ctlr_info *h) | 4288 | static int hpsa_enter_simple_mode(struct ctlr_info *h) |
| 4291 | { | 4289 | { |
| 4292 | u32 trans_support; | 4290 | u32 trans_support; |
| 4293 | 4291 | ||
| @@ -4310,7 +4308,7 @@ static int __devinit hpsa_enter_simple_mode(struct ctlr_info *h) | |||
| 4310 | return 0; | 4308 | return 0; |
| 4311 | } | 4309 | } |
| 4312 | 4310 | ||
| 4313 | static int __devinit hpsa_pci_init(struct ctlr_info *h) | 4311 | static int hpsa_pci_init(struct ctlr_info *h) |
| 4314 | { | 4312 | { |
| 4315 | int prod_index, err; | 4313 | int prod_index, err; |
| 4316 | 4314 | ||
| @@ -4378,7 +4376,7 @@ err_out_free_res: | |||
| 4378 | return err; | 4376 | return err; |
| 4379 | } | 4377 | } |
| 4380 | 4378 | ||
| 4381 | static void __devinit hpsa_hba_inquiry(struct ctlr_info *h) | 4379 | static void hpsa_hba_inquiry(struct ctlr_info *h) |
| 4382 | { | 4380 | { |
| 4383 | int rc; | 4381 | int rc; |
| 4384 | 4382 | ||
| @@ -4394,7 +4392,7 @@ static void __devinit hpsa_hba_inquiry(struct ctlr_info *h) | |||
| 4394 | } | 4392 | } |
| 4395 | } | 4393 | } |
| 4396 | 4394 | ||
| 4397 | static __devinit int hpsa_init_reset_devices(struct pci_dev *pdev) | 4395 | static int hpsa_init_reset_devices(struct pci_dev *pdev) |
| 4398 | { | 4396 | { |
| 4399 | int rc, i; | 4397 | int rc, i; |
| 4400 | 4398 | ||
| @@ -4426,7 +4424,7 @@ static __devinit int hpsa_init_reset_devices(struct pci_dev *pdev) | |||
| 4426 | return 0; | 4424 | return 0; |
| 4427 | } | 4425 | } |
| 4428 | 4426 | ||
| 4429 | static __devinit int hpsa_allocate_cmd_pool(struct ctlr_info *h) | 4427 | static int hpsa_allocate_cmd_pool(struct ctlr_info *h) |
| 4430 | { | 4428 | { |
| 4431 | h->cmd_pool_bits = kzalloc( | 4429 | h->cmd_pool_bits = kzalloc( |
| 4432 | DIV_ROUND_UP(h->nr_cmds, BITS_PER_LONG) * | 4430 | DIV_ROUND_UP(h->nr_cmds, BITS_PER_LONG) * |
| @@ -4499,7 +4497,7 @@ static int hpsa_request_irq(struct ctlr_info *h, | |||
| 4499 | return 0; | 4497 | return 0; |
| 4500 | } | 4498 | } |
| 4501 | 4499 | ||
| 4502 | static int __devinit hpsa_kdump_soft_reset(struct ctlr_info *h) | 4500 | static int hpsa_kdump_soft_reset(struct ctlr_info *h) |
| 4503 | { | 4501 | { |
| 4504 | if (hpsa_send_host_reset(h, RAID_CTLR_LUNID, | 4502 | if (hpsa_send_host_reset(h, RAID_CTLR_LUNID, |
| 4505 | HPSA_RESET_TYPE_CONTROLLER)) { | 4503 | HPSA_RESET_TYPE_CONTROLLER)) { |
| @@ -4713,8 +4711,7 @@ static void stop_controller_lockup_detector(struct ctlr_info *h) | |||
| 4713 | spin_unlock_irqrestore(&lockup_detector_lock, flags); | 4711 | spin_unlock_irqrestore(&lockup_detector_lock, flags); |
| 4714 | } | 4712 | } |
| 4715 | 4713 | ||
| 4716 | static int __devinit hpsa_init_one(struct pci_dev *pdev, | 4714 | static int hpsa_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 4717 | const struct pci_device_id *ent) | ||
| 4718 | { | 4715 | { |
| 4719 | int dac, rc; | 4716 | int dac, rc; |
| 4720 | struct ctlr_info *h; | 4717 | struct ctlr_info *h; |
| @@ -4910,7 +4907,7 @@ static void hpsa_shutdown(struct pci_dev *pdev) | |||
| 4910 | hpsa_free_irqs_and_disable_msix(h); | 4907 | hpsa_free_irqs_and_disable_msix(h); |
| 4911 | } | 4908 | } |
| 4912 | 4909 | ||
| 4913 | static void __devexit hpsa_free_device_info(struct ctlr_info *h) | 4910 | static void hpsa_free_device_info(struct ctlr_info *h) |
| 4914 | { | 4911 | { |
| 4915 | int i; | 4912 | int i; |
| 4916 | 4913 | ||
| @@ -4918,7 +4915,7 @@ static void __devexit hpsa_free_device_info(struct ctlr_info *h) | |||
| 4918 | kfree(h->dev[i]); | 4915 | kfree(h->dev[i]); |
| 4919 | } | 4916 | } |
| 4920 | 4917 | ||
| 4921 | static void __devexit hpsa_remove_one(struct pci_dev *pdev) | 4918 | static void hpsa_remove_one(struct pci_dev *pdev) |
| 4922 | { | 4919 | { |
| 4923 | struct ctlr_info *h; | 4920 | struct ctlr_info *h; |
| 4924 | 4921 | ||
| @@ -4966,7 +4963,7 @@ static int hpsa_resume(__attribute__((unused)) struct pci_dev *pdev) | |||
| 4966 | static struct pci_driver hpsa_pci_driver = { | 4963 | static struct pci_driver hpsa_pci_driver = { |
| 4967 | .name = HPSA, | 4964 | .name = HPSA, |
| 4968 | .probe = hpsa_init_one, | 4965 | .probe = hpsa_init_one, |
| 4969 | .remove = __devexit_p(hpsa_remove_one), | 4966 | .remove = hpsa_remove_one, |
| 4970 | .id_table = hpsa_pci_device_id, /* id_table */ | 4967 | .id_table = hpsa_pci_device_id, /* id_table */ |
| 4971 | .shutdown = hpsa_shutdown, | 4968 | .shutdown = hpsa_shutdown, |
| 4972 | .suspend = hpsa_suspend, | 4969 | .suspend = hpsa_suspend, |
| @@ -5010,8 +5007,7 @@ static void calc_bucket_map(int bucket[], int num_buckets, | |||
| 5010 | } | 5007 | } |
| 5011 | } | 5008 | } |
| 5012 | 5009 | ||
| 5013 | static __devinit void hpsa_enter_performant_mode(struct ctlr_info *h, | 5010 | static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 use_short_tags) |
| 5014 | u32 use_short_tags) | ||
| 5015 | { | 5011 | { |
| 5016 | int i; | 5012 | int i; |
| 5017 | unsigned long register_value; | 5013 | unsigned long register_value; |
| @@ -5079,7 +5075,7 @@ static __devinit void hpsa_enter_performant_mode(struct ctlr_info *h, | |||
| 5079 | h->transMethod = CFGTBL_Trans_Performant; | 5075 | h->transMethod = CFGTBL_Trans_Performant; |
| 5080 | } | 5076 | } |
| 5081 | 5077 | ||
| 5082 | static __devinit void hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h) | 5078 | static void hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h) |
| 5083 | { | 5079 | { |
| 5084 | u32 trans_support; | 5080 | u32 trans_support; |
| 5085 | int i; | 5081 | int i; |
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c index 138e573f37ef..ee196b363d81 100644 --- a/drivers/scsi/hptiop.c +++ b/drivers/scsi/hptiop.c | |||
| @@ -1282,8 +1282,7 @@ static int hptiop_internal_memfree_mvfrey(struct hptiop_hba *hba) | |||
| 1282 | return -1; | 1282 | return -1; |
| 1283 | } | 1283 | } |
| 1284 | 1284 | ||
| 1285 | static int __devinit hptiop_probe(struct pci_dev *pcidev, | 1285 | static int hptiop_probe(struct pci_dev *pcidev, const struct pci_device_id *id) |
| 1286 | const struct pci_device_id *id) | ||
| 1287 | { | 1286 | { |
| 1288 | struct Scsi_Host *host = NULL; | 1287 | struct Scsi_Host *host = NULL; |
| 1289 | struct hptiop_hba *hba; | 1288 | struct hptiop_hba *hba; |
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 5e8d51bd03de..cc82d0f322b6 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c | |||
| @@ -4905,7 +4905,7 @@ static unsigned long ibmvfc_get_desired_dma(struct vio_dev *vdev) | |||
| 4905 | return pool_dma + ((512 * 1024) * driver_template.cmd_per_lun); | 4905 | return pool_dma + ((512 * 1024) * driver_template.cmd_per_lun); |
| 4906 | } | 4906 | } |
| 4907 | 4907 | ||
| 4908 | static struct vio_device_id ibmvfc_device_table[] __devinitdata = { | 4908 | static struct vio_device_id ibmvfc_device_table[] = { |
| 4909 | {"fcp", "IBM,vfc-client"}, | 4909 | {"fcp", "IBM,vfc-client"}, |
| 4910 | { "", "" } | 4910 | { "", "" } |
| 4911 | }; | 4911 | }; |
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index ef9a54c7da67..a044f593e8b9 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c | |||
| @@ -2362,7 +2362,7 @@ static int ibmvscsi_resume(struct device *dev) | |||
| 2362 | * ibmvscsi_device_table: Used by vio.c to match devices in the device tree we | 2362 | * ibmvscsi_device_table: Used by vio.c to match devices in the device tree we |
| 2363 | * support. | 2363 | * support. |
| 2364 | */ | 2364 | */ |
| 2365 | static struct vio_device_id ibmvscsi_device_table[] __devinitdata = { | 2365 | static struct vio_device_id ibmvscsi_device_table[] = { |
| 2366 | {"vscsi", "IBM,v-scsi"}, | 2366 | {"vscsi", "IBM,v-scsi"}, |
| 2367 | { "", "" } | 2367 | { "", "" } |
| 2368 | }; | 2368 | }; |
diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c index aa7ed81e9237..bf9eca845166 100644 --- a/drivers/scsi/ibmvscsi/ibmvstgt.c +++ b/drivers/scsi/ibmvscsi/ibmvstgt.c | |||
| @@ -907,7 +907,7 @@ static int ibmvstgt_remove(struct vio_dev *dev) | |||
| 907 | return 0; | 907 | return 0; |
| 908 | } | 908 | } |
| 909 | 909 | ||
| 910 | static struct vio_device_id ibmvstgt_device_table[] __devinitdata = { | 910 | static struct vio_device_id ibmvstgt_device_table[] = { |
| 911 | {"v-scsi-host", "IBM,v-scsi-host"}, | 911 | {"v-scsi-host", "IBM,v-scsi-host"}, |
| 912 | {"",""} | 912 | {"",""} |
| 913 | }; | 913 | }; |
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index dd741bcd6ccd..280d5af113d1 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c | |||
| @@ -2992,7 +2992,7 @@ static struct pci_driver initio_pci_driver = { | |||
| 2992 | .name = "initio", | 2992 | .name = "initio", |
| 2993 | .id_table = initio_pci_tbl, | 2993 | .id_table = initio_pci_tbl, |
| 2994 | .probe = initio_probe_one, | 2994 | .probe = initio_probe_one, |
| 2995 | .remove = __devexit_p(initio_remove_one), | 2995 | .remove = initio_remove_one, |
| 2996 | }; | 2996 | }; |
| 2997 | 2997 | ||
| 2998 | static int __init initio_init_driver(void) | 2998 | static int __init initio_init_driver(void) |
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index fe6029f4df16..1d7da3f41ebb 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
| @@ -8296,7 +8296,7 @@ static pci_ers_result_t ipr_pci_error_detected(struct pci_dev *pdev, | |||
| 8296 | * Return value: | 8296 | * Return value: |
| 8297 | * 0 on success / -EIO on failure | 8297 | * 0 on success / -EIO on failure |
| 8298 | **/ | 8298 | **/ |
| 8299 | static int __devinit ipr_probe_ioa_part2(struct ipr_ioa_cfg *ioa_cfg) | 8299 | static int ipr_probe_ioa_part2(struct ipr_ioa_cfg *ioa_cfg) |
| 8300 | { | 8300 | { |
| 8301 | int rc = 0; | 8301 | int rc = 0; |
| 8302 | unsigned long host_lock_flags = 0; | 8302 | unsigned long host_lock_flags = 0; |
| @@ -8425,7 +8425,7 @@ static void ipr_free_all_resources(struct ipr_ioa_cfg *ioa_cfg) | |||
| 8425 | * Return value: | 8425 | * Return value: |
| 8426 | * 0 on success / -ENOMEM on allocation failure | 8426 | * 0 on success / -ENOMEM on allocation failure |
| 8427 | **/ | 8427 | **/ |
| 8428 | static int __devinit ipr_alloc_cmd_blks(struct ipr_ioa_cfg *ioa_cfg) | 8428 | static int ipr_alloc_cmd_blks(struct ipr_ioa_cfg *ioa_cfg) |
| 8429 | { | 8429 | { |
| 8430 | struct ipr_cmnd *ipr_cmd; | 8430 | struct ipr_cmnd *ipr_cmd; |
| 8431 | struct ipr_ioarcb *ioarcb; | 8431 | struct ipr_ioarcb *ioarcb; |
| @@ -8497,7 +8497,7 @@ static int __devinit ipr_alloc_cmd_blks(struct ipr_ioa_cfg *ioa_cfg) | |||
| 8497 | * Return value: | 8497 | * Return value: |
| 8498 | * 0 on success / non-zero for error | 8498 | * 0 on success / non-zero for error |
| 8499 | **/ | 8499 | **/ |
| 8500 | static int __devinit ipr_alloc_mem(struct ipr_ioa_cfg *ioa_cfg) | 8500 | static int ipr_alloc_mem(struct ipr_ioa_cfg *ioa_cfg) |
| 8501 | { | 8501 | { |
| 8502 | struct pci_dev *pdev = ioa_cfg->pdev; | 8502 | struct pci_dev *pdev = ioa_cfg->pdev; |
| 8503 | int i, rc = -ENOMEM; | 8503 | int i, rc = -ENOMEM; |
| @@ -8601,7 +8601,7 @@ out_free_res_entries: | |||
| 8601 | * Return value: | 8601 | * Return value: |
| 8602 | * none | 8602 | * none |
| 8603 | **/ | 8603 | **/ |
| 8604 | static void __devinit ipr_initialize_bus_attr(struct ipr_ioa_cfg *ioa_cfg) | 8604 | static void ipr_initialize_bus_attr(struct ipr_ioa_cfg *ioa_cfg) |
| 8605 | { | 8605 | { |
| 8606 | int i; | 8606 | int i; |
| 8607 | 8607 | ||
| @@ -8625,8 +8625,8 @@ static void __devinit ipr_initialize_bus_attr(struct ipr_ioa_cfg *ioa_cfg) | |||
| 8625 | * Return value: | 8625 | * Return value: |
| 8626 | * none | 8626 | * none |
| 8627 | **/ | 8627 | **/ |
| 8628 | static void __devinit ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg, | 8628 | static void ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg, |
| 8629 | struct Scsi_Host *host, struct pci_dev *pdev) | 8629 | struct Scsi_Host *host, struct pci_dev *pdev) |
| 8630 | { | 8630 | { |
| 8631 | const struct ipr_interrupt_offsets *p; | 8631 | const struct ipr_interrupt_offsets *p; |
| 8632 | struct ipr_interrupts *t; | 8632 | struct ipr_interrupts *t; |
| @@ -8712,7 +8712,7 @@ static void __devinit ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg, | |||
| 8712 | * Return value: | 8712 | * Return value: |
| 8713 | * ptr to chip information on success / NULL on failure | 8713 | * ptr to chip information on success / NULL on failure |
| 8714 | **/ | 8714 | **/ |
| 8715 | static const struct ipr_chip_t * __devinit | 8715 | static const struct ipr_chip_t * |
| 8716 | ipr_get_chip_info(const struct pci_device_id *dev_id) | 8716 | ipr_get_chip_info(const struct pci_device_id *dev_id) |
| 8717 | { | 8717 | { |
| 8718 | int i; | 8718 | int i; |
| @@ -8734,7 +8734,7 @@ ipr_get_chip_info(const struct pci_device_id *dev_id) | |||
| 8734 | * Return value: | 8734 | * Return value: |
| 8735 | * 0 on success / non-zero on failure | 8735 | * 0 on success / non-zero on failure |
| 8736 | **/ | 8736 | **/ |
| 8737 | static irqreturn_t __devinit ipr_test_intr(int irq, void *devp) | 8737 | static irqreturn_t ipr_test_intr(int irq, void *devp) |
| 8738 | { | 8738 | { |
| 8739 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)devp; | 8739 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)devp; |
| 8740 | unsigned long lock_flags = 0; | 8740 | unsigned long lock_flags = 0; |
| @@ -8761,8 +8761,7 @@ static irqreturn_t __devinit ipr_test_intr(int irq, void *devp) | |||
| 8761 | * Return value: | 8761 | * Return value: |
| 8762 | * 0 on success / non-zero on failure | 8762 | * 0 on success / non-zero on failure |
| 8763 | **/ | 8763 | **/ |
| 8764 | static int __devinit ipr_test_msi(struct ipr_ioa_cfg *ioa_cfg, | 8764 | static int ipr_test_msi(struct ipr_ioa_cfg *ioa_cfg, struct pci_dev *pdev) |
| 8765 | struct pci_dev *pdev) | ||
| 8766 | { | 8765 | { |
| 8767 | int rc; | 8766 | int rc; |
| 8768 | volatile u32 int_reg; | 8767 | volatile u32 int_reg; |
| @@ -8815,8 +8814,8 @@ static int __devinit ipr_test_msi(struct ipr_ioa_cfg *ioa_cfg, | |||
| 8815 | * Return value: | 8814 | * Return value: |
| 8816 | * 0 on success / non-zero on failure | 8815 | * 0 on success / non-zero on failure |
| 8817 | **/ | 8816 | **/ |
| 8818 | static int __devinit ipr_probe_ioa(struct pci_dev *pdev, | 8817 | static int ipr_probe_ioa(struct pci_dev *pdev, |
| 8819 | const struct pci_device_id *dev_id) | 8818 | const struct pci_device_id *dev_id) |
| 8820 | { | 8819 | { |
| 8821 | struct ipr_ioa_cfg *ioa_cfg; | 8820 | struct ipr_ioa_cfg *ioa_cfg; |
| 8822 | struct Scsi_Host *host; | 8821 | struct Scsi_Host *host; |
| @@ -9113,7 +9112,7 @@ static void __ipr_remove(struct pci_dev *pdev) | |||
| 9113 | * Return value: | 9112 | * Return value: |
| 9114 | * none | 9113 | * none |
| 9115 | **/ | 9114 | **/ |
| 9116 | static void __devexit ipr_remove(struct pci_dev *pdev) | 9115 | static void ipr_remove(struct pci_dev *pdev) |
| 9117 | { | 9116 | { |
| 9118 | struct ipr_ioa_cfg *ioa_cfg = pci_get_drvdata(pdev); | 9117 | struct ipr_ioa_cfg *ioa_cfg = pci_get_drvdata(pdev); |
| 9119 | 9118 | ||
| @@ -9136,8 +9135,7 @@ static void __devexit ipr_remove(struct pci_dev *pdev) | |||
| 9136 | * Return value: | 9135 | * Return value: |
| 9137 | * 0 on success / non-zero on failure | 9136 | * 0 on success / non-zero on failure |
| 9138 | **/ | 9137 | **/ |
| 9139 | static int __devinit ipr_probe(struct pci_dev *pdev, | 9138 | static int ipr_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) |
| 9140 | const struct pci_device_id *dev_id) | ||
| 9141 | { | 9139 | { |
| 9142 | struct ipr_ioa_cfg *ioa_cfg; | 9140 | struct ipr_ioa_cfg *ioa_cfg; |
| 9143 | int rc; | 9141 | int rc; |
| @@ -9218,7 +9216,7 @@ static void ipr_shutdown(struct pci_dev *pdev) | |||
| 9218 | wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload); | 9216 | wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload); |
| 9219 | } | 9217 | } |
| 9220 | 9218 | ||
| 9221 | static struct pci_device_id ipr_pci_table[] __devinitdata = { | 9219 | static struct pci_device_id ipr_pci_table[] = { |
| 9222 | { PCI_VENDOR_ID_MYLEX, PCI_DEVICE_ID_IBM_GEMSTONE, | 9220 | { PCI_VENDOR_ID_MYLEX, PCI_DEVICE_ID_IBM_GEMSTONE, |
| 9223 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_5702, 0, 0, 0 }, | 9221 | PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_5702, 0, 0, 0 }, |
| 9224 | { PCI_VENDOR_ID_MYLEX, PCI_DEVICE_ID_IBM_GEMSTONE, | 9222 | { PCI_VENDOR_ID_MYLEX, PCI_DEVICE_ID_IBM_GEMSTONE, |
| @@ -9305,7 +9303,7 @@ static struct pci_driver ipr_driver = { | |||
| 9305 | .name = IPR_NAME, | 9303 | .name = IPR_NAME, |
| 9306 | .id_table = ipr_pci_table, | 9304 | .id_table = ipr_pci_table, |
| 9307 | .probe = ipr_probe, | 9305 | .probe = ipr_probe, |
| 9308 | .remove = __devexit_p(ipr_remove), | 9306 | .remove = ipr_remove, |
| 9309 | .shutdown = ipr_shutdown, | 9307 | .shutdown = ipr_shutdown, |
| 9310 | .err_handler = &ipr_err_handler, | 9308 | .err_handler = &ipr_err_handler, |
| 9311 | }; | 9309 | }; |
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index b6d7a5c2fc94..9aa86a315a08 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c | |||
| @@ -389,14 +389,14 @@ MODULE_DEVICE_TABLE( pci, ips_pci_table ); | |||
| 389 | 389 | ||
| 390 | static char ips_hot_plug_name[] = "ips"; | 390 | static char ips_hot_plug_name[] = "ips"; |
| 391 | 391 | ||
| 392 | static int __devinit ips_insert_device(struct pci_dev *pci_dev, const struct pci_device_id *ent); | 392 | static int ips_insert_device(struct pci_dev *pci_dev, const struct pci_device_id *ent); |
| 393 | static void __devexit ips_remove_device(struct pci_dev *pci_dev); | 393 | static void ips_remove_device(struct pci_dev *pci_dev); |
| 394 | 394 | ||
| 395 | static struct pci_driver ips_pci_driver = { | 395 | static struct pci_driver ips_pci_driver = { |
| 396 | .name = ips_hot_plug_name, | 396 | .name = ips_hot_plug_name, |
| 397 | .id_table = ips_pci_table, | 397 | .id_table = ips_pci_table, |
| 398 | .probe = ips_insert_device, | 398 | .probe = ips_insert_device, |
| 399 | .remove = __devexit_p(ips_remove_device), | 399 | .remove = ips_remove_device, |
| 400 | }; | 400 | }; |
| 401 | 401 | ||
| 402 | 402 | ||
| @@ -6837,7 +6837,7 @@ err_out_sh: | |||
| 6837 | /* Routine Description: */ | 6837 | /* Routine Description: */ |
| 6838 | /* Remove one Adapter ( Hot Plugging ) */ | 6838 | /* Remove one Adapter ( Hot Plugging ) */ |
| 6839 | /*---------------------------------------------------------------------------*/ | 6839 | /*---------------------------------------------------------------------------*/ |
| 6840 | static void __devexit | 6840 | static void |
| 6841 | ips_remove_device(struct pci_dev *pci_dev) | 6841 | ips_remove_device(struct pci_dev *pci_dev) |
| 6842 | { | 6842 | { |
| 6843 | struct Scsi_Host *sh = pci_get_drvdata(pci_dev); | 6843 | struct Scsi_Host *sh = pci_get_drvdata(pci_dev); |
| @@ -6898,7 +6898,7 @@ module_exit(ips_module_exit); | |||
| 6898 | /* Return Value: */ | 6898 | /* Return Value: */ |
| 6899 | /* 0 if Successful, else non-zero */ | 6899 | /* 0 if Successful, else non-zero */ |
| 6900 | /*---------------------------------------------------------------------------*/ | 6900 | /*---------------------------------------------------------------------------*/ |
| 6901 | static int __devinit | 6901 | static int |
| 6902 | ips_insert_device(struct pci_dev *pci_dev, const struct pci_device_id *ent) | 6902 | ips_insert_device(struct pci_dev *pci_dev, const struct pci_device_id *ent) |
| 6903 | { | 6903 | { |
| 6904 | int index = -1; | 6904 | int index = -1; |
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c index b74050b95d6a..d73fdcfeb45a 100644 --- a/drivers/scsi/isci/init.c +++ b/drivers/scsi/isci/init.c | |||
| @@ -282,7 +282,7 @@ static void isci_unregister(struct isci_host *isci_host) | |||
| 282 | scsi_host_put(shost); | 282 | scsi_host_put(shost); |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | static int __devinit isci_pci_init(struct pci_dev *pdev) | 285 | static int isci_pci_init(struct pci_dev *pdev) |
| 286 | { | 286 | { |
| 287 | int err, bar_num, bar_mask = 0; | 287 | int err, bar_num, bar_mask = 0; |
| 288 | void __iomem * const *iomap; | 288 | void __iomem * const *iomap; |
| @@ -616,7 +616,7 @@ static struct isci_host *isci_host_alloc(struct pci_dev *pdev, int id) | |||
| 616 | return NULL; | 616 | return NULL; |
| 617 | } | 617 | } |
| 618 | 618 | ||
| 619 | static int __devinit isci_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | 619 | static int isci_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 620 | { | 620 | { |
| 621 | struct isci_pci_info *pci_info; | 621 | struct isci_pci_info *pci_info; |
| 622 | int err, i; | 622 | int err, i; |
| @@ -709,7 +709,7 @@ static int __devinit isci_pci_probe(struct pci_dev *pdev, const struct pci_devic | |||
| 709 | return err; | 709 | return err; |
| 710 | } | 710 | } |
| 711 | 711 | ||
| 712 | static void __devexit isci_pci_remove(struct pci_dev *pdev) | 712 | static void isci_pci_remove(struct pci_dev *pdev) |
| 713 | { | 713 | { |
| 714 | struct isci_host *ihost; | 714 | struct isci_host *ihost; |
| 715 | int i; | 715 | int i; |
| @@ -778,7 +778,7 @@ static struct pci_driver isci_pci_driver = { | |||
| 778 | .name = DRV_NAME, | 778 | .name = DRV_NAME, |
| 779 | .id_table = isci_id_table, | 779 | .id_table = isci_id_table, |
| 780 | .probe = isci_pci_probe, | 780 | .probe = isci_pci_probe, |
| 781 | .remove = __devexit_p(isci_pci_remove), | 781 | .remove = isci_pci_remove, |
| 782 | #ifdef CONFIG_PM | 782 | #ifdef CONFIG_PM |
| 783 | .driver.pm = &isci_pm_ops, | 783 | .driver.pm = &isci_pm_ops, |
| 784 | #endif | 784 | #endif |
diff --git a/drivers/scsi/jazz_esp.c b/drivers/scsi/jazz_esp.c index 27cfb0cb186c..69efbf12b299 100644 --- a/drivers/scsi/jazz_esp.c +++ b/drivers/scsi/jazz_esp.c | |||
| @@ -129,7 +129,7 @@ static const struct esp_driver_ops jazz_esp_ops = { | |||
| 129 | .dma_error = jazz_esp_dma_error, | 129 | .dma_error = jazz_esp_dma_error, |
| 130 | }; | 130 | }; |
| 131 | 131 | ||
| 132 | static int __devinit esp_jazz_probe(struct platform_device *dev) | 132 | static int esp_jazz_probe(struct platform_device *dev) |
| 133 | { | 133 | { |
| 134 | struct scsi_host_template *tpnt = &scsi_esp_template; | 134 | struct scsi_host_template *tpnt = &scsi_esp_template; |
| 135 | struct Scsi_Host *host; | 135 | struct Scsi_Host *host; |
| @@ -201,7 +201,7 @@ fail: | |||
| 201 | return err; | 201 | return err; |
| 202 | } | 202 | } |
| 203 | 203 | ||
| 204 | static int __devexit esp_jazz_remove(struct platform_device *dev) | 204 | static int esp_jazz_remove(struct platform_device *dev) |
| 205 | { | 205 | { |
| 206 | struct esp *esp = dev_get_drvdata(&dev->dev); | 206 | struct esp *esp = dev_get_drvdata(&dev->dev); |
| 207 | unsigned int irq = esp->host->irq; | 207 | unsigned int irq = esp->host->irq; |
| @@ -223,7 +223,7 @@ MODULE_ALIAS("platform:jazz_esp"); | |||
| 223 | 223 | ||
| 224 | static struct platform_driver esp_jazz_driver = { | 224 | static struct platform_driver esp_jazz_driver = { |
| 225 | .probe = esp_jazz_probe, | 225 | .probe = esp_jazz_probe, |
| 226 | .remove = __devexit_p(esp_jazz_remove), | 226 | .remove = esp_jazz_remove, |
| 227 | .driver = { | 227 | .driver = { |
| 228 | .name = "jazz_esp", | 228 | .name = "jazz_esp", |
| 229 | .owner = THIS_MODULE, | 229 | .owner = THIS_MODULE, |
diff --git a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c index 23880f8fe7e4..5c4ded997265 100644 --- a/drivers/scsi/lasi700.c +++ b/drivers/scsi/lasi700.c | |||
| @@ -168,7 +168,7 @@ static struct parisc_driver lasi700_driver = { | |||
| 168 | .name = "lasi_scsi", | 168 | .name = "lasi_scsi", |
| 169 | .id_table = lasi700_ids, | 169 | .id_table = lasi700_ids, |
| 170 | .probe = lasi700_probe, | 170 | .probe = lasi700_probe, |
| 171 | .remove = __devexit_p(lasi700_driver_remove), | 171 | .remove = lasi700_driver_remove, |
| 172 | }; | 172 | }; |
| 173 | 173 | ||
| 174 | static int __init | 174 | static int __init |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index c20eec78adc1..89ad55807012 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
| @@ -8813,7 +8813,7 @@ lpfc_get_sli4_parameters(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) | |||
| 8813 | * 0 - driver can claim the device | 8813 | * 0 - driver can claim the device |
| 8814 | * negative value - driver can not claim the device | 8814 | * negative value - driver can not claim the device |
| 8815 | **/ | 8815 | **/ |
| 8816 | static int __devinit | 8816 | static int |
| 8817 | lpfc_pci_probe_one_s3(struct pci_dev *pdev, const struct pci_device_id *pid) | 8817 | lpfc_pci_probe_one_s3(struct pci_dev *pdev, const struct pci_device_id *pid) |
| 8818 | { | 8818 | { |
| 8819 | struct lpfc_hba *phba; | 8819 | struct lpfc_hba *phba; |
| @@ -8980,7 +8980,7 @@ out_free_phba: | |||
| 8980 | * removed from PCI bus, it performs all the necessary cleanup for the HBA | 8980 | * removed from PCI bus, it performs all the necessary cleanup for the HBA |
| 8981 | * device to be removed from the PCI subsystem properly. | 8981 | * device to be removed from the PCI subsystem properly. |
| 8982 | **/ | 8982 | **/ |
| 8983 | static void __devexit | 8983 | static void |
| 8984 | lpfc_pci_remove_one_s3(struct pci_dev *pdev) | 8984 | lpfc_pci_remove_one_s3(struct pci_dev *pdev) |
| 8985 | { | 8985 | { |
| 8986 | struct Scsi_Host *shost = pci_get_drvdata(pdev); | 8986 | struct Scsi_Host *shost = pci_get_drvdata(pdev); |
| @@ -9587,7 +9587,7 @@ lpfc_sli4_request_firmware_update(struct lpfc_hba *phba, uint8_t fw_upgrade) | |||
| 9587 | * 0 - driver can claim the device | 9587 | * 0 - driver can claim the device |
| 9588 | * negative value - driver can not claim the device | 9588 | * negative value - driver can not claim the device |
| 9589 | **/ | 9589 | **/ |
| 9590 | static int __devinit | 9590 | static int |
| 9591 | lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid) | 9591 | lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid) |
| 9592 | { | 9592 | { |
| 9593 | struct lpfc_hba *phba; | 9593 | struct lpfc_hba *phba; |
| @@ -9779,7 +9779,7 @@ out_free_phba: | |||
| 9779 | * removed from PCI bus, it performs all the necessary cleanup for the HBA | 9779 | * removed from PCI bus, it performs all the necessary cleanup for the HBA |
| 9780 | * device to be removed from the PCI subsystem properly. | 9780 | * device to be removed from the PCI subsystem properly. |
| 9781 | **/ | 9781 | **/ |
| 9782 | static void __devexit | 9782 | static void |
| 9783 | lpfc_pci_remove_one_s4(struct pci_dev *pdev) | 9783 | lpfc_pci_remove_one_s4(struct pci_dev *pdev) |
| 9784 | { | 9784 | { |
| 9785 | struct Scsi_Host *shost = pci_get_drvdata(pdev); | 9785 | struct Scsi_Host *shost = pci_get_drvdata(pdev); |
| @@ -10205,7 +10205,7 @@ lpfc_io_resume_s4(struct pci_dev *pdev) | |||
| 10205 | * 0 - driver can claim the device | 10205 | * 0 - driver can claim the device |
| 10206 | * negative value - driver can not claim the device | 10206 | * negative value - driver can not claim the device |
| 10207 | **/ | 10207 | **/ |
| 10208 | static int __devinit | 10208 | static int |
| 10209 | lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid) | 10209 | lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid) |
| 10210 | { | 10210 | { |
| 10211 | int rc; | 10211 | int rc; |
| @@ -10233,7 +10233,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid) | |||
| 10233 | * remove routine, which will perform all the necessary cleanup for the | 10233 | * remove routine, which will perform all the necessary cleanup for the |
| 10234 | * device to be removed from the PCI subsystem properly. | 10234 | * device to be removed from the PCI subsystem properly. |
| 10235 | **/ | 10235 | **/ |
| 10236 | static void __devexit | 10236 | static void |
| 10237 | lpfc_pci_remove_one(struct pci_dev *pdev) | 10237 | lpfc_pci_remove_one(struct pci_dev *pdev) |
| 10238 | { | 10238 | { |
| 10239 | struct Scsi_Host *shost = pci_get_drvdata(pdev); | 10239 | struct Scsi_Host *shost = pci_get_drvdata(pdev); |
| @@ -10575,7 +10575,7 @@ static struct pci_driver lpfc_driver = { | |||
| 10575 | .name = LPFC_DRIVER_NAME, | 10575 | .name = LPFC_DRIVER_NAME, |
| 10576 | .id_table = lpfc_id_table, | 10576 | .id_table = lpfc_id_table, |
| 10577 | .probe = lpfc_pci_probe_one, | 10577 | .probe = lpfc_pci_probe_one, |
| 10578 | .remove = __devexit_p(lpfc_pci_remove_one), | 10578 | .remove = lpfc_pci_remove_one, |
| 10579 | .suspend = lpfc_pci_suspend_one, | 10579 | .suspend = lpfc_pci_suspend_one, |
| 10580 | .resume = lpfc_pci_resume_one, | 10580 | .resume = lpfc_pci_resume_one, |
| 10581 | .err_handler = &lpfc_err_handler, | 10581 | .err_handler = &lpfc_err_handler, |
diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp.c index 70eb1f79b1ba..994fc5caf036 100644 --- a/drivers/scsi/mac_esp.c +++ b/drivers/scsi/mac_esp.c | |||
| @@ -481,7 +481,7 @@ static struct esp_driver_ops mac_esp_ops = { | |||
| 481 | .dma_error = mac_esp_dma_error, | 481 | .dma_error = mac_esp_dma_error, |
| 482 | }; | 482 | }; |
| 483 | 483 | ||
| 484 | static int __devinit esp_mac_probe(struct platform_device *dev) | 484 | static int esp_mac_probe(struct platform_device *dev) |
| 485 | { | 485 | { |
| 486 | struct scsi_host_template *tpnt = &scsi_esp_template; | 486 | struct scsi_host_template *tpnt = &scsi_esp_template; |
| 487 | struct Scsi_Host *host; | 487 | struct Scsi_Host *host; |
| @@ -591,7 +591,7 @@ fail: | |||
| 591 | return err; | 591 | return err; |
| 592 | } | 592 | } |
| 593 | 593 | ||
| 594 | static int __devexit esp_mac_remove(struct platform_device *dev) | 594 | static int esp_mac_remove(struct platform_device *dev) |
| 595 | { | 595 | { |
| 596 | struct mac_esp_priv *mep = platform_get_drvdata(dev); | 596 | struct mac_esp_priv *mep = platform_get_drvdata(dev); |
| 597 | struct esp *esp = mep->esp; | 597 | struct esp *esp = mep->esp; |
| @@ -614,7 +614,7 @@ static int __devexit esp_mac_remove(struct platform_device *dev) | |||
| 614 | 614 | ||
| 615 | static struct platform_driver esp_mac_driver = { | 615 | static struct platform_driver esp_mac_driver = { |
| 616 | .probe = esp_mac_probe, | 616 | .probe = esp_mac_probe, |
| 617 | .remove = __devexit_p(esp_mac_remove), | 617 | .remove = esp_mac_remove, |
| 618 | .driver = { | 618 | .driver = { |
| 619 | .name = DRV_MODULE_NAME, | 619 | .name = DRV_MODULE_NAME, |
| 620 | .owner = THIS_MODULE, | 620 | .owner = THIS_MODULE, |
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 76ad72d32c3f..9504ec0ec682 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c | |||
| @@ -4522,7 +4522,7 @@ static struct scsi_host_template megaraid_template = { | |||
| 4522 | .eh_host_reset_handler = megaraid_reset, | 4522 | .eh_host_reset_handler = megaraid_reset, |
| 4523 | }; | 4523 | }; |
| 4524 | 4524 | ||
| 4525 | static int __devinit | 4525 | static int |
| 4526 | megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | 4526 | megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 4527 | { | 4527 | { |
| 4528 | struct Scsi_Host *host; | 4528 | struct Scsi_Host *host; |
| @@ -4914,7 +4914,7 @@ __megaraid_shutdown(adapter_t *adapter) | |||
| 4914 | mdelay(1000); | 4914 | mdelay(1000); |
| 4915 | } | 4915 | } |
| 4916 | 4916 | ||
| 4917 | static void __devexit | 4917 | static void |
| 4918 | megaraid_remove_one(struct pci_dev *pdev) | 4918 | megaraid_remove_one(struct pci_dev *pdev) |
| 4919 | { | 4919 | { |
| 4920 | struct Scsi_Host *host = pci_get_drvdata(pdev); | 4920 | struct Scsi_Host *host = pci_get_drvdata(pdev); |
| @@ -5008,7 +5008,7 @@ static struct pci_driver megaraid_pci_driver = { | |||
| 5008 | .name = "megaraid_legacy", | 5008 | .name = "megaraid_legacy", |
| 5009 | .id_table = megaraid_pci_tbl, | 5009 | .id_table = megaraid_pci_tbl, |
| 5010 | .probe = megaraid_probe_one, | 5010 | .probe = megaraid_probe_one, |
| 5011 | .remove = __devexit_p(megaraid_remove_one), | 5011 | .remove = megaraid_remove_one, |
| 5012 | .shutdown = megaraid_shutdown, | 5012 | .shutdown = megaraid_shutdown, |
| 5013 | }; | 5013 | }; |
| 5014 | 5014 | ||
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index 54b1c5bb310f..e6a1e0b38a19 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c | |||
| @@ -305,7 +305,7 @@ static struct pci_driver megaraid_pci_driver = { | |||
| 305 | .name = "megaraid", | 305 | .name = "megaraid", |
| 306 | .id_table = pci_id_table_g, | 306 | .id_table = pci_id_table_g, |
| 307 | .probe = megaraid_probe_one, | 307 | .probe = megaraid_probe_one, |
| 308 | .remove = __devexit_p(megaraid_detach_one), | 308 | .remove = megaraid_detach_one, |
| 309 | .shutdown = megaraid_mbox_shutdown, | 309 | .shutdown = megaraid_mbox_shutdown, |
| 310 | }; | 310 | }; |
| 311 | 311 | ||
| @@ -434,7 +434,7 @@ megaraid_exit(void) | |||
| 434 | * This routine should be called whenever a new adapter is detected by the | 434 | * This routine should be called whenever a new adapter is detected by the |
| 435 | * PCI hotplug susbsystem. | 435 | * PCI hotplug susbsystem. |
| 436 | */ | 436 | */ |
| 437 | static int __devinit | 437 | static int |
| 438 | megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | 438 | megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 439 | { | 439 | { |
| 440 | adapter_t *adapter; | 440 | adapter_t *adapter; |
| @@ -735,7 +735,7 @@ megaraid_io_detach(adapter_t *adapter) | |||
| 735 | * - Allocate memory required for all the commands | 735 | * - Allocate memory required for all the commands |
| 736 | * - Use internal library of FW routines, build up complete soft state | 736 | * - Use internal library of FW routines, build up complete soft state |
| 737 | */ | 737 | */ |
| 738 | static int __devinit | 738 | static int |
| 739 | megaraid_init_mbox(adapter_t *adapter) | 739 | megaraid_init_mbox(adapter_t *adapter) |
| 740 | { | 740 | { |
| 741 | struct pci_dev *pdev; | 741 | struct pci_dev *pdev; |
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index e4f2baacf1e1..66a0fec0437b 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c | |||
| @@ -3972,8 +3972,8 @@ fail_set_dma_mask: | |||
| 3972 | * @pdev: PCI device structure | 3972 | * @pdev: PCI device structure |
| 3973 | * @id: PCI ids of supported hotplugged adapter | 3973 | * @id: PCI ids of supported hotplugged adapter |
| 3974 | */ | 3974 | */ |
| 3975 | static int __devinit | 3975 | static int megasas_probe_one(struct pci_dev *pdev, |
| 3976 | megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | 3976 | const struct pci_device_id *id) |
| 3977 | { | 3977 | { |
| 3978 | int rval, pos, i, j; | 3978 | int rval, pos, i, j; |
| 3979 | struct Scsi_Host *host; | 3979 | struct Scsi_Host *host; |
| @@ -4525,7 +4525,7 @@ fail_ready_state: | |||
| 4525 | * megasas_detach_one - PCI hot"un"plug entry point | 4525 | * megasas_detach_one - PCI hot"un"plug entry point |
| 4526 | * @pdev: PCI device structure | 4526 | * @pdev: PCI device structure |
| 4527 | */ | 4527 | */ |
| 4528 | static void __devexit megasas_detach_one(struct pci_dev *pdev) | 4528 | static void megasas_detach_one(struct pci_dev *pdev) |
| 4529 | { | 4529 | { |
| 4530 | int i; | 4530 | int i; |
| 4531 | struct Scsi_Host *host; | 4531 | struct Scsi_Host *host; |
| @@ -5119,7 +5119,7 @@ static struct pci_driver megasas_pci_driver = { | |||
| 5119 | .name = "megaraid_sas", | 5119 | .name = "megaraid_sas", |
| 5120 | .id_table = megasas_pci_table, | 5120 | .id_table = megasas_pci_table, |
| 5121 | .probe = megasas_probe_one, | 5121 | .probe = megasas_probe_one, |
| 5122 | .remove = __devexit_p(megasas_detach_one), | 5122 | .remove = megasas_detach_one, |
| 5123 | .suspend = megasas_suspend, | 5123 | .suspend = megasas_suspend, |
| 5124 | .resume = megasas_resume, | 5124 | .resume = megasas_resume, |
| 5125 | .shutdown = megasas_shutdown, | 5125 | .shutdown = megasas_shutdown, |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index af4e6c451b1b..c6bdc9267229 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c | |||
| @@ -7686,7 +7686,7 @@ _scsih_shutdown(struct pci_dev *pdev) | |||
| 7686 | * Routine called when unloading the driver. | 7686 | * Routine called when unloading the driver. |
| 7687 | * Return nothing. | 7687 | * Return nothing. |
| 7688 | */ | 7688 | */ |
| 7689 | static void __devexit | 7689 | static void |
| 7690 | _scsih_remove(struct pci_dev *pdev) | 7690 | _scsih_remove(struct pci_dev *pdev) |
| 7691 | { | 7691 | { |
| 7692 | struct Scsi_Host *shost = pci_get_drvdata(pdev); | 7692 | struct Scsi_Host *shost = pci_get_drvdata(pdev); |
| @@ -8338,7 +8338,7 @@ static struct pci_driver scsih_driver = { | |||
| 8338 | .name = MPT2SAS_DRIVER_NAME, | 8338 | .name = MPT2SAS_DRIVER_NAME, |
| 8339 | .id_table = scsih_pci_table, | 8339 | .id_table = scsih_pci_table, |
| 8340 | .probe = _scsih_probe, | 8340 | .probe = _scsih_probe, |
| 8341 | .remove = __devexit_p(_scsih_remove), | 8341 | .remove = _scsih_remove, |
| 8342 | .shutdown = _scsih_shutdown, | 8342 | .shutdown = _scsih_shutdown, |
| 8343 | .err_handler = &_scsih_err_handler, | 8343 | .err_handler = &_scsih_err_handler, |
| 8344 | #ifdef CONFIG_PM | 8344 | #ifdef CONFIG_PM |
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 05f80450ac7e..6421a06c4ce2 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c | |||
| @@ -7374,8 +7374,7 @@ _scsih_ir_shutdown(struct MPT3SAS_ADAPTER *ioc) | |||
| 7374 | * Routine called when unloading the driver. | 7374 | * Routine called when unloading the driver. |
| 7375 | * Return nothing. | 7375 | * Return nothing. |
| 7376 | */ | 7376 | */ |
| 7377 | static void __devexit | 7377 | static void _scsih_remove(struct pci_dev *pdev) |
| 7378 | _scsih_remove(struct pci_dev *pdev) | ||
| 7379 | { | 7378 | { |
| 7380 | struct Scsi_Host *shost = pci_get_drvdata(pdev); | 7379 | struct Scsi_Host *shost = pci_get_drvdata(pdev); |
| 7381 | struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); | 7380 | struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); |
| @@ -8044,7 +8043,7 @@ static struct pci_driver scsih_driver = { | |||
| 8044 | .name = MPT3SAS_DRIVER_NAME, | 8043 | .name = MPT3SAS_DRIVER_NAME, |
| 8045 | .id_table = scsih_pci_table, | 8044 | .id_table = scsih_pci_table, |
| 8046 | .probe = _scsih_probe, | 8045 | .probe = _scsih_probe, |
| 8047 | .remove = __devexit_p(_scsih_remove), | 8046 | .remove = _scsih_remove, |
| 8048 | .shutdown = _scsih_shutdown, | 8047 | .shutdown = _scsih_shutdown, |
| 8049 | .err_handler = &_scsih_err_handler, | 8048 | .err_handler = &_scsih_err_handler, |
| 8050 | #ifdef CONFIG_PM | 8049 | #ifdef CONFIG_PM |
diff --git a/drivers/scsi/mvme16x_scsi.c b/drivers/scsi/mvme16x_scsi.c index 39f554f5f261..8fbb97a8bfd3 100644 --- a/drivers/scsi/mvme16x_scsi.c +++ b/drivers/scsi/mvme16x_scsi.c | |||
| @@ -34,8 +34,7 @@ static struct scsi_host_template mvme16x_scsi_driver_template = { | |||
| 34 | 34 | ||
| 35 | static struct platform_device *mvme16x_scsi_device; | 35 | static struct platform_device *mvme16x_scsi_device; |
| 36 | 36 | ||
| 37 | static __devinit int | 37 | static int mvme16x_probe(struct platform_device *dev) |
| 38 | mvme16x_probe(struct platform_device *dev) | ||
| 39 | { | 38 | { |
| 40 | struct Scsi_Host * host = NULL; | 39 | struct Scsi_Host * host = NULL; |
| 41 | struct NCR_700_Host_Parameters *hostdata; | 40 | struct NCR_700_Host_Parameters *hostdata; |
| @@ -103,8 +102,7 @@ mvme16x_probe(struct platform_device *dev) | |||
| 103 | return -ENODEV; | 102 | return -ENODEV; |
| 104 | } | 103 | } |
| 105 | 104 | ||
| 106 | static __devexit int | 105 | static int mvme16x_device_remove(struct platform_device *dev) |
| 107 | mvme16x_device_remove(struct platform_device *dev) | ||
| 108 | { | 106 | { |
| 109 | struct Scsi_Host *host = platform_get_drvdata(dev); | 107 | struct Scsi_Host *host = platform_get_drvdata(dev); |
| 110 | struct NCR_700_Host_Parameters *hostdata = shost_priv(host); | 108 | struct NCR_700_Host_Parameters *hostdata = shost_priv(host); |
| @@ -131,7 +129,7 @@ static struct platform_driver mvme16x_scsi_driver = { | |||
| 131 | .owner = THIS_MODULE, | 129 | .owner = THIS_MODULE, |
| 132 | }, | 130 | }, |
| 133 | .probe = mvme16x_probe, | 131 | .probe = mvme16x_probe, |
| 134 | .remove = __devexit_p(mvme16x_device_remove), | 132 | .remove = mvme16x_device_remove, |
| 135 | }; | 133 | }; |
| 136 | 134 | ||
| 137 | static int __init mvme16x_scsi_init(void) | 135 | static int __init mvme16x_scsi_init(void) |
diff --git a/drivers/scsi/mvsas/mv_64xx.c b/drivers/scsi/mvsas/mv_64xx.c index 8ba47229049f..8bb06995adfb 100644 --- a/drivers/scsi/mvsas/mv_64xx.c +++ b/drivers/scsi/mvsas/mv_64xx.c | |||
| @@ -41,7 +41,7 @@ static void mvs_64xx_detect_porttype(struct mvs_info *mvi, int i) | |||
| 41 | phy->phy_type |= PORT_TYPE_SATA; | 41 | phy->phy_type |= PORT_TYPE_SATA; |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | static void __devinit mvs_64xx_enable_xmt(struct mvs_info *mvi, int phy_id) | 44 | static void mvs_64xx_enable_xmt(struct mvs_info *mvi, int phy_id) |
| 45 | { | 45 | { |
| 46 | void __iomem *regs = mvi->regs; | 46 | void __iomem *regs = mvi->regs; |
| 47 | u32 tmp; | 47 | u32 tmp; |
| @@ -54,7 +54,7 @@ static void __devinit mvs_64xx_enable_xmt(struct mvs_info *mvi, int phy_id) | |||
| 54 | mw32(MVS_PCS, tmp); | 54 | mw32(MVS_PCS, tmp); |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | static void __devinit mvs_64xx_phy_hacks(struct mvs_info *mvi) | 57 | static void mvs_64xx_phy_hacks(struct mvs_info *mvi) |
| 58 | { | 58 | { |
| 59 | void __iomem *regs = mvi->regs; | 59 | void __iomem *regs = mvi->regs; |
| 60 | int i; | 60 | int i; |
| @@ -156,7 +156,7 @@ void mvs_64xx_clear_srs_irq(struct mvs_info *mvi, u8 reg_set, u8 clear_all) | |||
| 156 | } | 156 | } |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | static int __devinit mvs_64xx_chip_reset(struct mvs_info *mvi) | 159 | static int mvs_64xx_chip_reset(struct mvs_info *mvi) |
| 160 | { | 160 | { |
| 161 | void __iomem *regs = mvi->regs; | 161 | void __iomem *regs = mvi->regs; |
| 162 | u32 tmp; | 162 | u32 tmp; |
| @@ -250,7 +250,7 @@ static void mvs_64xx_phy_enable(struct mvs_info *mvi, u32 phy_id) | |||
| 250 | } | 250 | } |
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | static int __devinit mvs_64xx_init(struct mvs_info *mvi) | 253 | static int mvs_64xx_init(struct mvs_info *mvi) |
| 254 | { | 254 | { |
| 255 | void __iomem *regs = mvi->regs; | 255 | void __iomem *regs = mvi->regs; |
| 256 | int i; | 256 | int i; |
diff --git a/drivers/scsi/mvsas/mv_94xx.c b/drivers/scsi/mvsas/mv_94xx.c index 7e423e5ad5e1..1e4479f3331a 100644 --- a/drivers/scsi/mvsas/mv_94xx.c +++ b/drivers/scsi/mvsas/mv_94xx.c | |||
| @@ -216,8 +216,7 @@ void set_phy_rate(struct mvs_info *mvi, int phy_id, u8 rate) | |||
| 216 | mvs_write_port_vsr_data(mvi, phy_id, phy_cfg.v); | 216 | mvs_write_port_vsr_data(mvi, phy_id, phy_cfg.v); |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | static void __devinit | 219 | static void mvs_94xx_config_reg_from_hba(struct mvs_info *mvi, int phy_id) |
| 220 | mvs_94xx_config_reg_from_hba(struct mvs_info *mvi, int phy_id) | ||
| 221 | { | 220 | { |
| 222 | u32 temp; | 221 | u32 temp; |
| 223 | temp = (u32)(*(u32 *)&mvi->hba_info_param.phy_tuning[phy_id]); | 222 | temp = (u32)(*(u32 *)&mvi->hba_info_param.phy_tuning[phy_id]); |
| @@ -258,7 +257,7 @@ mvs_94xx_config_reg_from_hba(struct mvs_info *mvi, int phy_id) | |||
| 258 | mvi->hba_info_param.phy_rate[phy_id]); | 257 | mvi->hba_info_param.phy_rate[phy_id]); |
| 259 | } | 258 | } |
| 260 | 259 | ||
| 261 | static void __devinit mvs_94xx_enable_xmt(struct mvs_info *mvi, int phy_id) | 260 | static void mvs_94xx_enable_xmt(struct mvs_info *mvi, int phy_id) |
| 262 | { | 261 | { |
| 263 | void __iomem *regs = mvi->regs; | 262 | void __iomem *regs = mvi->regs; |
| 264 | u32 tmp; | 263 | u32 tmp; |
| @@ -331,7 +330,7 @@ static void mvs_94xx_phy_enable(struct mvs_info *mvi, u32 phy_id) | |||
| 331 | mvs_write_port_vsr_data(mvi, phy_id, tmp & 0xfd7fffff); | 330 | mvs_write_port_vsr_data(mvi, phy_id, tmp & 0xfd7fffff); |
| 332 | } | 331 | } |
| 333 | 332 | ||
| 334 | static int __devinit mvs_94xx_init(struct mvs_info *mvi) | 333 | static int mvs_94xx_init(struct mvs_info *mvi) |
| 335 | { | 334 | { |
| 336 | void __iomem *regs = mvi->regs; | 335 | void __iomem *regs = mvi->regs; |
| 337 | int i; | 336 | int i; |
diff --git a/drivers/scsi/mvsas/mv_chips.h b/drivers/scsi/mvsas/mv_chips.h index bcc408042cee..8c4479ab49e8 100644 --- a/drivers/scsi/mvsas/mv_chips.h +++ b/drivers/scsi/mvsas/mv_chips.h | |||
| @@ -160,7 +160,7 @@ static inline void mvs_write_port_irq_mask(struct mvs_info *mvi, | |||
| 160 | MVS_P4_INT_MASK, port, val); | 160 | MVS_P4_INT_MASK, port, val); |
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | static inline void __devinit mvs_phy_hacks(struct mvs_info *mvi) | 163 | static inline void mvs_phy_hacks(struct mvs_info *mvi) |
| 164 | { | 164 | { |
| 165 | u32 tmp; | 165 | u32 tmp; |
| 166 | 166 | ||
diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index cc59dff3810b..ce90d0546cdd 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c | |||
| @@ -96,7 +96,7 @@ static struct sas_domain_function_template mvs_transport_ops = { | |||
| 96 | 96 | ||
| 97 | }; | 97 | }; |
| 98 | 98 | ||
| 99 | static void __devinit mvs_phy_init(struct mvs_info *mvi, int phy_id) | 99 | static void mvs_phy_init(struct mvs_info *mvi, int phy_id) |
| 100 | { | 100 | { |
| 101 | struct mvs_phy *phy = &mvi->phy[phy_id]; | 101 | struct mvs_phy *phy = &mvi->phy[phy_id]; |
| 102 | struct asd_sas_phy *sas_phy = &phy->sas_phy; | 102 | struct asd_sas_phy *sas_phy = &phy->sas_phy; |
| @@ -235,7 +235,7 @@ static irqreturn_t mvs_interrupt(int irq, void *opaque) | |||
| 235 | return IRQ_HANDLED; | 235 | return IRQ_HANDLED; |
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | static int __devinit mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost) | 238 | static int mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost) |
| 239 | { | 239 | { |
| 240 | int i = 0, slot_nr; | 240 | int i = 0, slot_nr; |
| 241 | char pool_name[32]; | 241 | char pool_name[32]; |
| @@ -373,7 +373,7 @@ void mvs_iounmap(void __iomem *regs) | |||
| 373 | iounmap(regs); | 373 | iounmap(regs); |
| 374 | } | 374 | } |
| 375 | 375 | ||
| 376 | static struct mvs_info *__devinit mvs_pci_alloc(struct pci_dev *pdev, | 376 | static struct mvs_info *mvs_pci_alloc(struct pci_dev *pdev, |
| 377 | const struct pci_device_id *ent, | 377 | const struct pci_device_id *ent, |
| 378 | struct Scsi_Host *shost, unsigned int id) | 378 | struct Scsi_Host *shost, unsigned int id) |
| 379 | { | 379 | { |
| @@ -444,7 +444,7 @@ static int pci_go_64(struct pci_dev *pdev) | |||
| 444 | return rc; | 444 | return rc; |
| 445 | } | 445 | } |
| 446 | 446 | ||
| 447 | static int __devinit mvs_prep_sas_ha_init(struct Scsi_Host *shost, | 447 | static int mvs_prep_sas_ha_init(struct Scsi_Host *shost, |
| 448 | const struct mvs_chip_info *chip_info) | 448 | const struct mvs_chip_info *chip_info) |
| 449 | { | 449 | { |
| 450 | int phy_nr, port_nr; unsigned short core_nr; | 450 | int phy_nr, port_nr; unsigned short core_nr; |
| @@ -486,7 +486,7 @@ exit_free: | |||
| 486 | 486 | ||
| 487 | } | 487 | } |
| 488 | 488 | ||
| 489 | static void __devinit mvs_post_sas_ha_init(struct Scsi_Host *shost, | 489 | static void mvs_post_sas_ha_init(struct Scsi_Host *shost, |
| 490 | const struct mvs_chip_info *chip_info) | 490 | const struct mvs_chip_info *chip_info) |
| 491 | { | 491 | { |
| 492 | int can_queue, i = 0, j = 0; | 492 | int can_queue, i = 0, j = 0; |
| @@ -537,8 +537,7 @@ static void mvs_init_sas_add(struct mvs_info *mvi) | |||
| 537 | memcpy(mvi->sas_addr, &mvi->phy[0].dev_sas_addr, SAS_ADDR_SIZE); | 537 | memcpy(mvi->sas_addr, &mvi->phy[0].dev_sas_addr, SAS_ADDR_SIZE); |
| 538 | } | 538 | } |
| 539 | 539 | ||
| 540 | static int __devinit mvs_pci_init(struct pci_dev *pdev, | 540 | static int mvs_pci_init(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 541 | const struct pci_device_id *ent) | ||
| 542 | { | 541 | { |
| 543 | unsigned int rc, nhost = 0; | 542 | unsigned int rc, nhost = 0; |
| 544 | struct mvs_info *mvi; | 543 | struct mvs_info *mvi; |
| @@ -645,7 +644,7 @@ err_out_enable: | |||
| 645 | return rc; | 644 | return rc; |
| 646 | } | 645 | } |
| 647 | 646 | ||
| 648 | static void __devexit mvs_pci_remove(struct pci_dev *pdev) | 647 | static void mvs_pci_remove(struct pci_dev *pdev) |
| 649 | { | 648 | { |
| 650 | unsigned short core_nr, i = 0; | 649 | unsigned short core_nr, i = 0; |
| 651 | struct sas_ha_struct *sha = pci_get_drvdata(pdev); | 650 | struct sas_ha_struct *sha = pci_get_drvdata(pdev); |
| @@ -677,7 +676,7 @@ static void __devexit mvs_pci_remove(struct pci_dev *pdev) | |||
| 677 | return; | 676 | return; |
| 678 | } | 677 | } |
| 679 | 678 | ||
| 680 | static struct pci_device_id __devinitdata mvs_pci_table[] = { | 679 | static struct pci_device_id mvs_pci_table[] = { |
| 681 | { PCI_VDEVICE(MARVELL, 0x6320), chip_6320 }, | 680 | { PCI_VDEVICE(MARVELL, 0x6320), chip_6320 }, |
| 682 | { PCI_VDEVICE(MARVELL, 0x6340), chip_6440 }, | 681 | { PCI_VDEVICE(MARVELL, 0x6340), chip_6440 }, |
| 683 | { | 682 | { |
| @@ -748,7 +747,7 @@ static struct pci_driver mvs_pci_driver = { | |||
| 748 | .name = DRV_NAME, | 747 | .name = DRV_NAME, |
| 749 | .id_table = mvs_pci_table, | 748 | .id_table = mvs_pci_table, |
| 750 | .probe = mvs_pci_init, | 749 | .probe = mvs_pci_init, |
| 751 | .remove = __devexit_p(mvs_pci_remove), | 750 | .remove = mvs_pci_remove, |
| 752 | }; | 751 | }; |
| 753 | 752 | ||
| 754 | static ssize_t | 753 | static ssize_t |
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c index a3776d6ced60..078c63913b55 100644 --- a/drivers/scsi/mvsas/mv_sas.c +++ b/drivers/scsi/mvsas/mv_sas.c | |||
| @@ -220,8 +220,8 @@ int mvs_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func, | |||
| 220 | return rc; | 220 | return rc; |
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | void __devinit mvs_set_sas_addr(struct mvs_info *mvi, int port_id, | 223 | void mvs_set_sas_addr(struct mvs_info *mvi, int port_id, u32 off_lo, |
| 224 | u32 off_lo, u32 off_hi, u64 sas_addr) | 224 | u32 off_hi, u64 sas_addr) |
| 225 | { | 225 | { |
| 226 | u32 lo = (u32)sas_addr; | 226 | u32 lo = (u32)sas_addr; |
| 227 | u32 hi = (u32)(sas_addr>>32); | 227 | u32 hi = (u32)(sas_addr>>32); |
diff --git a/drivers/scsi/mvsas/mv_sas.h b/drivers/scsi/mvsas/mv_sas.h index da249553858c..2ae77a0394b2 100644 --- a/drivers/scsi/mvsas/mv_sas.h +++ b/drivers/scsi/mvsas/mv_sas.h | |||
| @@ -456,8 +456,8 @@ int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex); | |||
| 456 | void mvs_phys_reset(struct mvs_info *mvi, u32 phy_mask, int hard); | 456 | void mvs_phys_reset(struct mvs_info *mvi, u32 phy_mask, int hard); |
| 457 | int mvs_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func, | 457 | int mvs_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func, |
| 458 | void *funcdata); | 458 | void *funcdata); |
| 459 | void __devinit mvs_set_sas_addr(struct mvs_info *mvi, int port_id, | 459 | void mvs_set_sas_addr(struct mvs_info *mvi, int port_id, u32 off_lo, |
| 460 | u32 off_lo, u32 off_hi, u64 sas_addr); | 460 | u32 off_hi, u64 sas_addr); |
| 461 | void mvs_scan_start(struct Scsi_Host *shost); | 461 | void mvs_scan_start(struct Scsi_Host *shost); |
| 462 | int mvs_scan_finished(struct Scsi_Host *shost, unsigned long time); | 462 | int mvs_scan_finished(struct Scsi_Host *shost, unsigned long time); |
| 463 | int mvs_queue_command(struct sas_task *task, const int num, | 463 | int mvs_queue_command(struct sas_task *task, const int num, |
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c index c585a925b3cd..4594ccaaf49b 100644 --- a/drivers/scsi/mvumi.c +++ b/drivers/scsi/mvumi.c | |||
| @@ -2506,8 +2506,7 @@ fail_add_device: | |||
| 2506 | * @pdev: PCI device structure | 2506 | * @pdev: PCI device structure |
| 2507 | * @id: PCI ids of supported hotplugged adapter | 2507 | * @id: PCI ids of supported hotplugged adapter |
| 2508 | */ | 2508 | */ |
| 2509 | static int __devinit mvumi_probe_one(struct pci_dev *pdev, | 2509 | static int mvumi_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 2510 | const struct pci_device_id *id) | ||
| 2511 | { | 2510 | { |
| 2512 | struct Scsi_Host *host; | 2511 | struct Scsi_Host *host; |
| 2513 | struct mvumi_hba *mhba; | 2512 | struct mvumi_hba *mhba; |
| @@ -2728,7 +2727,7 @@ static struct pci_driver mvumi_pci_driver = { | |||
| 2728 | .name = MV_DRIVER_NAME, | 2727 | .name = MV_DRIVER_NAME, |
| 2729 | .id_table = mvumi_pci_table, | 2728 | .id_table = mvumi_pci_table, |
| 2730 | .probe = mvumi_probe_one, | 2729 | .probe = mvumi_probe_one, |
| 2731 | .remove = __devexit_p(mvumi_detach_one), | 2730 | .remove = mvumi_detach_one, |
| 2732 | .shutdown = mvumi_shutdown, | 2731 | .shutdown = mvumi_shutdown, |
| 2733 | #ifdef CONFIG_PM | 2732 | #ifdef CONFIG_PM |
| 2734 | .suspend = mvumi_suspend, | 2733 | .suspend = mvumi_suspend, |
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c index 62b616891a33..1cc0c1c69c88 100644 --- a/drivers/scsi/nsp32.c +++ b/drivers/scsi/nsp32.c | |||
| @@ -76,7 +76,7 @@ static const char *nsp32_release_version = "1.2"; | |||
| 76 | /**************************************************************************** | 76 | /**************************************************************************** |
| 77 | * Supported hardware | 77 | * Supported hardware |
| 78 | */ | 78 | */ |
| 79 | static struct pci_device_id nsp32_pci_table[] __devinitdata = { | 79 | static struct pci_device_id nsp32_pci_table[] = { |
| 80 | { | 80 | { |
| 81 | .vendor = PCI_VENDOR_ID_IODATA, | 81 | .vendor = PCI_VENDOR_ID_IODATA, |
| 82 | .device = PCI_DEVICE_ID_NINJASCSI_32BI_CBSC_II, | 82 | .device = PCI_DEVICE_ID_NINJASCSI_32BI_CBSC_II, |
| @@ -186,10 +186,10 @@ static nsp32_sync_table nsp32_sync_table_pci[] = { | |||
| 186 | * function declaration | 186 | * function declaration |
| 187 | */ | 187 | */ |
| 188 | /* module entry point */ | 188 | /* module entry point */ |
| 189 | static int __devinit nsp32_probe (struct pci_dev *, const struct pci_device_id *); | 189 | static int nsp32_probe (struct pci_dev *, const struct pci_device_id *); |
| 190 | static void __devexit nsp32_remove(struct pci_dev *); | 190 | static void nsp32_remove(struct pci_dev *); |
| 191 | static int __init init_nsp32 (void); | 191 | static int __init init_nsp32 (void); |
| 192 | static void __exit exit_nsp32 (void); | 192 | static void __exit exit_nsp32 (void); |
| 193 | 193 | ||
| 194 | /* struct struct scsi_host_template */ | 194 | /* struct struct scsi_host_template */ |
| 195 | static int nsp32_proc_info (struct Scsi_Host *, char *, char **, off_t, int, int); | 195 | static int nsp32_proc_info (struct Scsi_Host *, char *, char **, off_t, int, int); |
| @@ -3382,7 +3382,7 @@ static int nsp32_resume(struct pci_dev *pdev) | |||
| 3382 | /************************************************************************ | 3382 | /************************************************************************ |
| 3383 | * PCI/Cardbus probe/remove routine | 3383 | * PCI/Cardbus probe/remove routine |
| 3384 | */ | 3384 | */ |
| 3385 | static int __devinit nsp32_probe(struct pci_dev *pdev, const struct pci_device_id *id) | 3385 | static int nsp32_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 3386 | { | 3386 | { |
| 3387 | int ret; | 3387 | int ret; |
| 3388 | nsp32_hw_data *data = &nsp32_data_base; | 3388 | nsp32_hw_data *data = &nsp32_data_base; |
| @@ -3418,7 +3418,7 @@ static int __devinit nsp32_probe(struct pci_dev *pdev, const struct pci_device_i | |||
| 3418 | return ret; | 3418 | return ret; |
| 3419 | } | 3419 | } |
| 3420 | 3420 | ||
| 3421 | static void __devexit nsp32_remove(struct pci_dev *pdev) | 3421 | static void nsp32_remove(struct pci_dev *pdev) |
| 3422 | { | 3422 | { |
| 3423 | struct Scsi_Host *host = pci_get_drvdata(pdev); | 3423 | struct Scsi_Host *host = pci_get_drvdata(pdev); |
| 3424 | 3424 | ||
| @@ -3435,7 +3435,7 @@ static struct pci_driver nsp32_driver = { | |||
| 3435 | .name = "nsp32", | 3435 | .name = "nsp32", |
| 3436 | .id_table = nsp32_pci_table, | 3436 | .id_table = nsp32_pci_table, |
| 3437 | .probe = nsp32_probe, | 3437 | .probe = nsp32_probe, |
| 3438 | .remove = __devexit_p(nsp32_remove), | 3438 | .remove = nsp32_remove, |
| 3439 | #ifdef CONFIG_PM | 3439 | #ifdef CONFIG_PM |
| 3440 | .suspend = nsp32_suspend, | 3440 | .suspend = nsp32_suspend, |
| 3441 | .resume = nsp32_resume, | 3441 | .resume = nsp32_resume, |
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index bf54aafc2d71..b8dd05074abb 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c | |||
| @@ -47,7 +47,7 @@ | |||
| 47 | * read_main_config_table - read the configure table and save it. | 47 | * read_main_config_table - read the configure table and save it. |
| 48 | * @pm8001_ha: our hba card information | 48 | * @pm8001_ha: our hba card information |
| 49 | */ | 49 | */ |
| 50 | static void __devinit read_main_config_table(struct pm8001_hba_info *pm8001_ha) | 50 | static void read_main_config_table(struct pm8001_hba_info *pm8001_ha) |
| 51 | { | 51 | { |
| 52 | void __iomem *address = pm8001_ha->main_cfg_tbl_addr; | 52 | void __iomem *address = pm8001_ha->main_cfg_tbl_addr; |
| 53 | pm8001_ha->main_cfg_tbl.signature = pm8001_mr32(address, 0x00); | 53 | pm8001_ha->main_cfg_tbl.signature = pm8001_mr32(address, 0x00); |
| @@ -83,8 +83,7 @@ static void __devinit read_main_config_table(struct pm8001_hba_info *pm8001_ha) | |||
| 83 | * read_general_status_table - read the general status table and save it. | 83 | * read_general_status_table - read the general status table and save it. |
| 84 | * @pm8001_ha: our hba card information | 84 | * @pm8001_ha: our hba card information |
| 85 | */ | 85 | */ |
| 86 | static void __devinit | 86 | static void read_general_status_table(struct pm8001_hba_info *pm8001_ha) |
| 87 | read_general_status_table(struct pm8001_hba_info *pm8001_ha) | ||
| 88 | { | 87 | { |
| 89 | void __iomem *address = pm8001_ha->general_stat_tbl_addr; | 88 | void __iomem *address = pm8001_ha->general_stat_tbl_addr; |
| 90 | pm8001_ha->gs_tbl.gst_len_mpistate = pm8001_mr32(address, 0x00); | 89 | pm8001_ha->gs_tbl.gst_len_mpistate = pm8001_mr32(address, 0x00); |
| @@ -118,8 +117,7 @@ read_general_status_table(struct pm8001_hba_info *pm8001_ha) | |||
| 118 | * read_inbnd_queue_table - read the inbound queue table and save it. | 117 | * read_inbnd_queue_table - read the inbound queue table and save it. |
| 119 | * @pm8001_ha: our hba card information | 118 | * @pm8001_ha: our hba card information |
| 120 | */ | 119 | */ |
| 121 | static void __devinit | 120 | static void read_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha) |
| 122 | read_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha) | ||
| 123 | { | 121 | { |
| 124 | int inbQ_num = 1; | 122 | int inbQ_num = 1; |
| 125 | int i; | 123 | int i; |
| @@ -137,8 +135,7 @@ read_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha) | |||
| 137 | * read_outbnd_queue_table - read the outbound queue table and save it. | 135 | * read_outbnd_queue_table - read the outbound queue table and save it. |
| 138 | * @pm8001_ha: our hba card information | 136 | * @pm8001_ha: our hba card information |
| 139 | */ | 137 | */ |
| 140 | static void __devinit | 138 | static void read_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha) |
| 141 | read_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha) | ||
| 142 | { | 139 | { |
| 143 | int outbQ_num = 1; | 140 | int outbQ_num = 1; |
| 144 | int i; | 141 | int i; |
| @@ -156,8 +153,7 @@ read_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha) | |||
| 156 | * init_default_table_values - init the default table. | 153 | * init_default_table_values - init the default table. |
| 157 | * @pm8001_ha: our hba card information | 154 | * @pm8001_ha: our hba card information |
| 158 | */ | 155 | */ |
| 159 | static void __devinit | 156 | static void init_default_table_values(struct pm8001_hba_info *pm8001_ha) |
| 160 | init_default_table_values(struct pm8001_hba_info *pm8001_ha) | ||
| 161 | { | 157 | { |
| 162 | int qn = 1; | 158 | int qn = 1; |
| 163 | int i; | 159 | int i; |
| @@ -250,8 +246,7 @@ init_default_table_values(struct pm8001_hba_info *pm8001_ha) | |||
| 250 | * update_main_config_table - update the main default table to the HBA. | 246 | * update_main_config_table - update the main default table to the HBA. |
| 251 | * @pm8001_ha: our hba card information | 247 | * @pm8001_ha: our hba card information |
| 252 | */ | 248 | */ |
| 253 | static void __devinit | 249 | static void update_main_config_table(struct pm8001_hba_info *pm8001_ha) |
| 254 | update_main_config_table(struct pm8001_hba_info *pm8001_ha) | ||
| 255 | { | 250 | { |
| 256 | void __iomem *address = pm8001_ha->main_cfg_tbl_addr; | 251 | void __iomem *address = pm8001_ha->main_cfg_tbl_addr; |
| 257 | pm8001_mw32(address, 0x24, | 252 | pm8001_mw32(address, 0x24, |
| @@ -297,8 +292,8 @@ update_main_config_table(struct pm8001_hba_info *pm8001_ha) | |||
| 297 | * update_inbnd_queue_table - update the inbound queue table to the HBA. | 292 | * update_inbnd_queue_table - update the inbound queue table to the HBA. |
| 298 | * @pm8001_ha: our hba card information | 293 | * @pm8001_ha: our hba card information |
| 299 | */ | 294 | */ |
| 300 | static void __devinit | 295 | static void update_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha, |
| 301 | update_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha, int number) | 296 | int number) |
| 302 | { | 297 | { |
| 303 | void __iomem *address = pm8001_ha->inbnd_q_tbl_addr; | 298 | void __iomem *address = pm8001_ha->inbnd_q_tbl_addr; |
| 304 | u16 offset = number * 0x20; | 299 | u16 offset = number * 0x20; |
| @@ -318,8 +313,8 @@ update_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha, int number) | |||
| 318 | * update_outbnd_queue_table - update the outbound queue table to the HBA. | 313 | * update_outbnd_queue_table - update the outbound queue table to the HBA. |
| 319 | * @pm8001_ha: our hba card information | 314 | * @pm8001_ha: our hba card information |
| 320 | */ | 315 | */ |
| 321 | static void __devinit | 316 | static void update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha, |
| 322 | update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha, int number) | 317 | int number) |
| 323 | { | 318 | { |
| 324 | void __iomem *address = pm8001_ha->outbnd_q_tbl_addr; | 319 | void __iomem *address = pm8001_ha->outbnd_q_tbl_addr; |
| 325 | u16 offset = number * 0x24; | 320 | u16 offset = number * 0x24; |
| @@ -370,8 +365,8 @@ int pm8001_bar4_shift(struct pm8001_hba_info *pm8001_ha, u32 shiftValue) | |||
| 370 | * @pm8001_ha: our hba card information | 365 | * @pm8001_ha: our hba card information |
| 371 | * @SSCbit: set SSCbit to 0 to disable all phys ssc; 1 to enable all phys ssc. | 366 | * @SSCbit: set SSCbit to 0 to disable all phys ssc; 1 to enable all phys ssc. |
| 372 | */ | 367 | */ |
| 373 | static void __devinit | 368 | static void mpi_set_phys_g3_with_ssc(struct pm8001_hba_info *pm8001_ha, |
| 374 | mpi_set_phys_g3_with_ssc(struct pm8001_hba_info *pm8001_ha, u32 SSCbit) | 369 | u32 SSCbit) |
| 375 | { | 370 | { |
| 376 | u32 value, offset, i; | 371 | u32 value, offset, i; |
| 377 | unsigned long flags; | 372 | unsigned long flags; |
| @@ -438,9 +433,8 @@ mpi_set_phys_g3_with_ssc(struct pm8001_hba_info *pm8001_ha, u32 SSCbit) | |||
| 438 | * @pm8001_ha: our hba card information | 433 | * @pm8001_ha: our hba card information |
| 439 | * @interval - interval time for each OPEN_REJECT (RETRY). The units are in 1us. | 434 | * @interval - interval time for each OPEN_REJECT (RETRY). The units are in 1us. |
| 440 | */ | 435 | */ |
| 441 | static void __devinit | 436 | static void mpi_set_open_retry_interval_reg(struct pm8001_hba_info *pm8001_ha, |
| 442 | mpi_set_open_retry_interval_reg(struct pm8001_hba_info *pm8001_ha, | 437 | u32 interval) |
| 443 | u32 interval) | ||
| 444 | { | 438 | { |
| 445 | u32 offset; | 439 | u32 offset; |
| 446 | u32 value; | 440 | u32 value; |
| @@ -601,7 +595,7 @@ static void init_pci_device_addresses(struct pm8001_hba_info *pm8001_ha) | |||
| 601 | * pm8001_chip_init - the main init function that initialize whole PM8001 chip. | 595 | * pm8001_chip_init - the main init function that initialize whole PM8001 chip. |
| 602 | * @pm8001_ha: our hba card information | 596 | * @pm8001_ha: our hba card information |
| 603 | */ | 597 | */ |
| 604 | static int __devinit pm8001_chip_init(struct pm8001_hba_info *pm8001_ha) | 598 | static int pm8001_chip_init(struct pm8001_hba_info *pm8001_ha) |
| 605 | { | 599 | { |
| 606 | /* check the firmware status */ | 600 | /* check the firmware status */ |
| 607 | if (-1 == check_fw_ready(pm8001_ha)) { | 601 | if (-1 == check_fw_ready(pm8001_ha)) { |
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index 0267c22f8741..4c9fe733fe88 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c | |||
| @@ -104,8 +104,7 @@ static struct sas_domain_function_template pm8001_transport_ops = { | |||
| 104 | *@pm8001_ha: our hba structure. | 104 | *@pm8001_ha: our hba structure. |
| 105 | *@phy_id: phy id. | 105 | *@phy_id: phy id. |
| 106 | */ | 106 | */ |
| 107 | static void __devinit pm8001_phy_init(struct pm8001_hba_info *pm8001_ha, | 107 | static void pm8001_phy_init(struct pm8001_hba_info *pm8001_ha, int phy_id) |
| 108 | int phy_id) | ||
| 109 | { | 108 | { |
| 110 | struct pm8001_phy *phy = &pm8001_ha->phy[phy_id]; | 109 | struct pm8001_phy *phy = &pm8001_ha->phy[phy_id]; |
| 111 | struct asd_sas_phy *sas_phy = &phy->sas_phy; | 110 | struct asd_sas_phy *sas_phy = &phy->sas_phy; |
| @@ -195,7 +194,7 @@ static irqreturn_t pm8001_interrupt(int irq, void *opaque) | |||
| 195 | * @pm8001_ha:our hba structure. | 194 | * @pm8001_ha:our hba structure. |
| 196 | * | 195 | * |
| 197 | */ | 196 | */ |
| 198 | static int __devinit pm8001_alloc(struct pm8001_hba_info *pm8001_ha) | 197 | static int pm8001_alloc(struct pm8001_hba_info *pm8001_ha) |
| 199 | { | 198 | { |
| 200 | int i; | 199 | int i; |
| 201 | spin_lock_init(&pm8001_ha->lock); | 200 | spin_lock_init(&pm8001_ha->lock); |
| @@ -360,8 +359,9 @@ static int pm8001_ioremap(struct pm8001_hba_info *pm8001_ha) | |||
| 360 | * @ent: ent | 359 | * @ent: ent |
| 361 | * @shost: scsi host struct which has been initialized before. | 360 | * @shost: scsi host struct which has been initialized before. |
| 362 | */ | 361 | */ |
| 363 | static struct pm8001_hba_info *__devinit | 362 | static struct pm8001_hba_info *pm8001_pci_alloc(struct pci_dev *pdev, |
| 364 | pm8001_pci_alloc(struct pci_dev *pdev, u32 chip_id, struct Scsi_Host *shost) | 363 | u32 chip_id, |
| 364 | struct Scsi_Host *shost) | ||
| 365 | { | 365 | { |
| 366 | struct pm8001_hba_info *pm8001_ha; | 366 | struct pm8001_hba_info *pm8001_ha; |
| 367 | struct sas_ha_struct *sha = SHOST_TO_SAS_HA(shost); | 367 | struct sas_ha_struct *sha = SHOST_TO_SAS_HA(shost); |
| @@ -433,8 +433,8 @@ static int pci_go_44(struct pci_dev *pdev) | |||
| 433 | * @shost: scsi host which has been allocated outside. | 433 | * @shost: scsi host which has been allocated outside. |
| 434 | * @chip_info: our ha struct. | 434 | * @chip_info: our ha struct. |
| 435 | */ | 435 | */ |
| 436 | static int __devinit pm8001_prep_sas_ha_init(struct Scsi_Host * shost, | 436 | static int pm8001_prep_sas_ha_init(struct Scsi_Host *shost, |
| 437 | const struct pm8001_chip_info *chip_info) | 437 | const struct pm8001_chip_info *chip_info) |
| 438 | { | 438 | { |
| 439 | int phy_nr, port_nr; | 439 | int phy_nr, port_nr; |
| 440 | struct asd_sas_phy **arr_phy; | 440 | struct asd_sas_phy **arr_phy; |
| @@ -479,8 +479,8 @@ exit: | |||
| 479 | * @shost: scsi host which has been allocated outside | 479 | * @shost: scsi host which has been allocated outside |
| 480 | * @chip_info: our ha struct. | 480 | * @chip_info: our ha struct. |
| 481 | */ | 481 | */ |
| 482 | static void __devinit pm8001_post_sas_ha_init(struct Scsi_Host *shost, | 482 | static void pm8001_post_sas_ha_init(struct Scsi_Host *shost, |
| 483 | const struct pm8001_chip_info *chip_info) | 483 | const struct pm8001_chip_info *chip_info) |
| 484 | { | 484 | { |
| 485 | int i = 0; | 485 | int i = 0; |
| 486 | struct pm8001_hba_info *pm8001_ha; | 486 | struct pm8001_hba_info *pm8001_ha; |
| @@ -615,8 +615,8 @@ intx: | |||
| 615 | * pci driver it is invoked, all struct an hardware initilization should be done | 615 | * pci driver it is invoked, all struct an hardware initilization should be done |
| 616 | * here, also, register interrupt | 616 | * here, also, register interrupt |
| 617 | */ | 617 | */ |
| 618 | static int __devinit pm8001_pci_probe(struct pci_dev *pdev, | 618 | static int pm8001_pci_probe(struct pci_dev *pdev, |
| 619 | const struct pci_device_id *ent) | 619 | const struct pci_device_id *ent) |
| 620 | { | 620 | { |
| 621 | unsigned int rc; | 621 | unsigned int rc; |
| 622 | u32 pci_reg; | 622 | u32 pci_reg; |
| @@ -707,7 +707,7 @@ err_out_enable: | |||
| 707 | return rc; | 707 | return rc; |
| 708 | } | 708 | } |
| 709 | 709 | ||
| 710 | static void __devexit pm8001_pci_remove(struct pci_dev *pdev) | 710 | static void pm8001_pci_remove(struct pci_dev *pdev) |
| 711 | { | 711 | { |
| 712 | struct sas_ha_struct *sha = pci_get_drvdata(pdev); | 712 | struct sas_ha_struct *sha = pci_get_drvdata(pdev); |
| 713 | struct pm8001_hba_info *pm8001_ha; | 713 | struct pm8001_hba_info *pm8001_ha; |
| @@ -842,7 +842,7 @@ err_out_enable: | |||
| 842 | return rc; | 842 | return rc; |
| 843 | } | 843 | } |
| 844 | 844 | ||
| 845 | static struct pci_device_id __devinitdata pm8001_pci_table[] = { | 845 | static struct pci_device_id pm8001_pci_table[] = { |
| 846 | { | 846 | { |
| 847 | PCI_VDEVICE(PMC_Sierra, 0x8001), chip_8001 | 847 | PCI_VDEVICE(PMC_Sierra, 0x8001), chip_8001 |
| 848 | }, | 848 | }, |
| @@ -857,7 +857,7 @@ static struct pci_driver pm8001_pci_driver = { | |||
| 857 | .name = DRV_NAME, | 857 | .name = DRV_NAME, |
| 858 | .id_table = pm8001_pci_table, | 858 | .id_table = pm8001_pci_table, |
| 859 | .probe = pm8001_pci_probe, | 859 | .probe = pm8001_pci_probe, |
| 860 | .remove = __devexit_p(pm8001_pci_remove), | 860 | .remove = pm8001_pci_remove, |
| 861 | .suspend = pm8001_pci_suspend, | 861 | .suspend = pm8001_pci_suspend, |
| 862 | .resume = pm8001_pci_resume, | 862 | .resume = pm8001_pci_resume, |
| 863 | }; | 863 | }; |
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index af763eab2039..b46f5e906837 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c | |||
| @@ -125,7 +125,7 @@ static struct pmcraid_chip_details pmcraid_chip_cfg[] = { | |||
| 125 | /* | 125 | /* |
| 126 | * PCI device ids supported by pmcraid driver | 126 | * PCI device ids supported by pmcraid driver |
| 127 | */ | 127 | */ |
| 128 | static struct pci_device_id pmcraid_pci_table[] __devinitdata = { | 128 | static struct pci_device_id pmcraid_pci_table[] = { |
| 129 | { PCI_DEVICE(PCI_VENDOR_ID_PMC, PCI_DEVICE_ID_PMC_MAXRAID), | 129 | { PCI_DEVICE(PCI_VENDOR_ID_PMC, PCI_DEVICE_ID_PMC_MAXRAID), |
| 130 | 0, 0, (kernel_ulong_t)&pmcraid_chip_cfg[0] | 130 | 0, 0, (kernel_ulong_t)&pmcraid_chip_cfg[0] |
| 131 | }, | 131 | }, |
| @@ -4818,8 +4818,7 @@ pmcraid_release_control_blocks( | |||
| 4818 | * Return Value | 4818 | * Return Value |
| 4819 | * 0 in case of success; -ENOMEM in case of failure | 4819 | * 0 in case of success; -ENOMEM in case of failure |
| 4820 | */ | 4820 | */ |
| 4821 | static int __devinit | 4821 | static int pmcraid_allocate_cmd_blocks(struct pmcraid_instance *pinstance) |
| 4822 | pmcraid_allocate_cmd_blocks(struct pmcraid_instance *pinstance) | ||
| 4823 | { | 4822 | { |
| 4824 | int i; | 4823 | int i; |
| 4825 | 4824 | ||
| @@ -4855,8 +4854,7 @@ pmcraid_allocate_cmd_blocks(struct pmcraid_instance *pinstance) | |||
| 4855 | * Return Value | 4854 | * Return Value |
| 4856 | * 0 in case it can allocate all control blocks, otherwise -ENOMEM | 4855 | * 0 in case it can allocate all control blocks, otherwise -ENOMEM |
| 4857 | */ | 4856 | */ |
| 4858 | static int __devinit | 4857 | static int pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance) |
| 4859 | pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance) | ||
| 4860 | { | 4858 | { |
| 4861 | int i; | 4859 | int i; |
| 4862 | 4860 | ||
| @@ -4922,8 +4920,7 @@ pmcraid_release_host_rrqs(struct pmcraid_instance *pinstance, int maxindex) | |||
| 4922 | * Return value | 4920 | * Return value |
| 4923 | * 0 hrrq buffers are allocated, -ENOMEM otherwise. | 4921 | * 0 hrrq buffers are allocated, -ENOMEM otherwise. |
| 4924 | */ | 4922 | */ |
| 4925 | static int __devinit | 4923 | static int pmcraid_allocate_host_rrqs(struct pmcraid_instance *pinstance) |
| 4926 | pmcraid_allocate_host_rrqs(struct pmcraid_instance *pinstance) | ||
| 4927 | { | 4924 | { |
| 4928 | int i, buffer_size; | 4925 | int i, buffer_size; |
| 4929 | 4926 | ||
| @@ -5062,8 +5059,7 @@ static void pmcraid_release_config_buffers(struct pmcraid_instance *pinstance) | |||
| 5062 | * Return Value | 5059 | * Return Value |
| 5063 | * 0 for successful allocation, -ENOMEM for any failure | 5060 | * 0 for successful allocation, -ENOMEM for any failure |
| 5064 | */ | 5061 | */ |
| 5065 | static int __devinit | 5062 | static int pmcraid_allocate_config_buffers(struct pmcraid_instance *pinstance) |
| 5066 | pmcraid_allocate_config_buffers(struct pmcraid_instance *pinstance) | ||
| 5067 | { | 5063 | { |
| 5068 | int i; | 5064 | int i; |
| 5069 | 5065 | ||
| @@ -5181,7 +5177,7 @@ static void pmcraid_release_buffers(struct pmcraid_instance *pinstance) | |||
| 5181 | * Return Value | 5177 | * Return Value |
| 5182 | * 0 in case all of the blocks are allocated, -ENOMEM otherwise. | 5178 | * 0 in case all of the blocks are allocated, -ENOMEM otherwise. |
| 5183 | */ | 5179 | */ |
| 5184 | static int __devinit pmcraid_init_buffers(struct pmcraid_instance *pinstance) | 5180 | static int pmcraid_init_buffers(struct pmcraid_instance *pinstance) |
| 5185 | { | 5181 | { |
| 5186 | int i; | 5182 | int i; |
| 5187 | 5183 | ||
| @@ -5281,11 +5277,8 @@ static void pmcraid_reinit_buffers(struct pmcraid_instance *pinstance) | |||
| 5281 | * Return Value | 5277 | * Return Value |
| 5282 | * 0 on success, non-zero in case of any failure | 5278 | * 0 on success, non-zero in case of any failure |
| 5283 | */ | 5279 | */ |
| 5284 | static int __devinit pmcraid_init_instance( | 5280 | static int pmcraid_init_instance(struct pci_dev *pdev, struct Scsi_Host *host, |
| 5285 | struct pci_dev *pdev, | 5281 | void __iomem *mapped_pci_addr) |
| 5286 | struct Scsi_Host *host, | ||
| 5287 | void __iomem *mapped_pci_addr | ||
| 5288 | ) | ||
| 5289 | { | 5282 | { |
| 5290 | struct pmcraid_instance *pinstance = | 5283 | struct pmcraid_instance *pinstance = |
| 5291 | (struct pmcraid_instance *)host->hostdata; | 5284 | (struct pmcraid_instance *)host->hostdata; |
| @@ -5442,7 +5435,7 @@ static void pmcraid_release_chrdev(struct pmcraid_instance *pinstance) | |||
| 5442 | * Return value | 5435 | * Return value |
| 5443 | * none | 5436 | * none |
| 5444 | */ | 5437 | */ |
| 5445 | static void __devexit pmcraid_remove(struct pci_dev *pdev) | 5438 | static void pmcraid_remove(struct pci_dev *pdev) |
| 5446 | { | 5439 | { |
| 5447 | struct pmcraid_instance *pinstance = pci_get_drvdata(pdev); | 5440 | struct pmcraid_instance *pinstance = pci_get_drvdata(pdev); |
| 5448 | 5441 | ||
| @@ -5883,10 +5876,8 @@ static void pmcraid_querycfg(struct pmcraid_cmd *cmd) | |||
| 5883 | * returns 0 if the device is claimed and successfully configured. | 5876 | * returns 0 if the device is claimed and successfully configured. |
| 5884 | * returns non-zero error code in case of any failure | 5877 | * returns non-zero error code in case of any failure |
| 5885 | */ | 5878 | */ |
| 5886 | static int __devinit pmcraid_probe( | 5879 | static int pmcraid_probe(struct pci_dev *pdev, |
| 5887 | struct pci_dev *pdev, | 5880 | const struct pci_device_id *dev_id) |
| 5888 | const struct pci_device_id *dev_id | ||
| 5889 | ) | ||
| 5890 | { | 5881 | { |
| 5891 | struct pmcraid_instance *pinstance; | 5882 | struct pmcraid_instance *pinstance; |
| 5892 | struct Scsi_Host *host; | 5883 | struct Scsi_Host *host; |
diff --git a/drivers/scsi/ps3rom.c b/drivers/scsi/ps3rom.c index 959f10055be7..e6e2a30493e6 100644 --- a/drivers/scsi/ps3rom.c +++ b/drivers/scsi/ps3rom.c | |||
| @@ -359,7 +359,7 @@ static struct scsi_host_template ps3rom_host_template = { | |||
| 359 | }; | 359 | }; |
| 360 | 360 | ||
| 361 | 361 | ||
| 362 | static int __devinit ps3rom_probe(struct ps3_system_bus_device *_dev) | 362 | static int ps3rom_probe(struct ps3_system_bus_device *_dev) |
| 363 | { | 363 | { |
| 364 | struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core); | 364 | struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core); |
| 365 | int error; | 365 | int error; |
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 538230be5cca..5a522c5bbd43 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c | |||
| @@ -1438,7 +1438,7 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp) | |||
| 1438 | * Returns: | 1438 | * Returns: |
| 1439 | * 0 = success | 1439 | * 0 = success |
| 1440 | */ | 1440 | */ |
| 1441 | static int __devinit | 1441 | static int |
| 1442 | qla1280_initialize_adapter(struct scsi_qla_host *ha) | 1442 | qla1280_initialize_adapter(struct scsi_qla_host *ha) |
| 1443 | { | 1443 | { |
| 1444 | struct device_reg __iomem *reg; | 1444 | struct device_reg __iomem *reg; |
| @@ -4230,7 +4230,7 @@ static struct scsi_host_template qla1280_driver_template = { | |||
| 4230 | }; | 4230 | }; |
| 4231 | 4231 | ||
| 4232 | 4232 | ||
| 4233 | static int __devinit | 4233 | static int |
| 4234 | qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | 4234 | qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 4235 | { | 4235 | { |
| 4236 | int devnum = id->driver_data; | 4236 | int devnum = id->driver_data; |
| @@ -4399,7 +4399,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 4399 | } | 4399 | } |
| 4400 | 4400 | ||
| 4401 | 4401 | ||
| 4402 | static void __devexit | 4402 | static void |
| 4403 | qla1280_remove_one(struct pci_dev *pdev) | 4403 | qla1280_remove_one(struct pci_dev *pdev) |
| 4404 | { | 4404 | { |
| 4405 | struct Scsi_Host *host = pci_get_drvdata(pdev); | 4405 | struct Scsi_Host *host = pci_get_drvdata(pdev); |
| @@ -4433,7 +4433,7 @@ static struct pci_driver qla1280_pci_driver = { | |||
| 4433 | .name = "qla1280", | 4433 | .name = "qla1280", |
| 4434 | .id_table = qla1280_pci_tbl, | 4434 | .id_table = qla1280_pci_tbl, |
| 4435 | .probe = qla1280_probe_one, | 4435 | .probe = qla1280_probe_one, |
| 4436 | .remove = __devexit_p(qla1280_remove_one), | 4436 | .remove = qla1280_remove_one, |
| 4437 | }; | 4437 | }; |
| 4438 | 4438 | ||
| 4439 | static int __init | 4439 | static int __init |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 3a1661cf8c1e..10d23f8b7036 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
| @@ -2154,7 +2154,7 @@ qla2xxx_scan_finished(struct Scsi_Host *shost, unsigned long time) | |||
| 2154 | /* | 2154 | /* |
| 2155 | * PCI driver interface | 2155 | * PCI driver interface |
| 2156 | */ | 2156 | */ |
| 2157 | static int __devinit | 2157 | static int |
| 2158 | qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | 2158 | qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 2159 | { | 2159 | { |
| 2160 | int ret = -ENODEV; | 2160 | int ret = -ENODEV; |
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index fbc546e893ac..4cec123a6a6a 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
| @@ -5124,8 +5124,8 @@ void qla4xxx_build_ddb_list(struct scsi_qla_host *ha, int is_reset) | |||
| 5124 | * It returns zero if successful. It also initializes all data necessary for | 5124 | * It returns zero if successful. It also initializes all data necessary for |
| 5125 | * the driver. | 5125 | * the driver. |
| 5126 | **/ | 5126 | **/ |
| 5127 | static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev, | 5127 | static int qla4xxx_probe_adapter(struct pci_dev *pdev, |
| 5128 | const struct pci_device_id *ent) | 5128 | const struct pci_device_id *ent) |
| 5129 | { | 5129 | { |
| 5130 | int ret = -ENODEV, status; | 5130 | int ret = -ENODEV, status; |
| 5131 | struct Scsi_Host *host; | 5131 | struct Scsi_Host *host; |
| @@ -5464,7 +5464,7 @@ static void qla4xxx_destroy_fw_ddb_session(struct scsi_qla_host *ha) | |||
| 5464 | * qla4xxx_remove_adapter - callback function to remove adapter. | 5464 | * qla4xxx_remove_adapter - callback function to remove adapter. |
| 5465 | * @pci_dev: PCI device pointer | 5465 | * @pci_dev: PCI device pointer |
| 5466 | **/ | 5466 | **/ |
| 5467 | static void __devexit qla4xxx_remove_adapter(struct pci_dev *pdev) | 5467 | static void qla4xxx_remove_adapter(struct pci_dev *pdev) |
| 5468 | { | 5468 | { |
| 5469 | struct scsi_qla_host *ha; | 5469 | struct scsi_qla_host *ha; |
| 5470 | 5470 | ||
diff --git a/drivers/scsi/qlogicfas.c b/drivers/scsi/qlogicfas.c index 1e874f1fb5c6..13d628b56ff7 100644 --- a/drivers/scsi/qlogicfas.c +++ b/drivers/scsi/qlogicfas.c | |||
| @@ -142,7 +142,7 @@ module_param_array(irq, int, NULL, 0); | |||
| 142 | MODULE_PARM_DESC(iobase, "I/O address"); | 142 | MODULE_PARM_DESC(iobase, "I/O address"); |
| 143 | MODULE_PARM_DESC(irq, "IRQ"); | 143 | MODULE_PARM_DESC(irq, "IRQ"); |
| 144 | 144 | ||
| 145 | static int __devinit qlogicfas_detect(struct scsi_host_template *sht) | 145 | static int qlogicfas_detect(struct scsi_host_template *sht) |
| 146 | { | 146 | { |
| 147 | struct Scsi_Host *shost; | 147 | struct Scsi_Host *shost; |
| 148 | struct qlogicfas408_priv *priv; | 148 | struct qlogicfas408_priv *priv; |
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 71fddbc60f18..6d48d30bed05 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c | |||
| @@ -461,7 +461,7 @@ static int qlogicpti_reset_hardware(struct Scsi_Host *host) | |||
| 461 | 461 | ||
| 462 | #define PTI_RESET_LIMIT 400 | 462 | #define PTI_RESET_LIMIT 400 |
| 463 | 463 | ||
| 464 | static int __devinit qlogicpti_load_firmware(struct qlogicpti *qpti) | 464 | static int qlogicpti_load_firmware(struct qlogicpti *qpti) |
| 465 | { | 465 | { |
| 466 | const struct firmware *fw; | 466 | const struct firmware *fw; |
| 467 | const char fwname[] = "qlogic/isp1000.bin"; | 467 | const char fwname[] = "qlogic/isp1000.bin"; |
| @@ -670,7 +670,7 @@ static int qlogicpti_verify_tmon(struct qlogicpti *qpti) | |||
| 670 | 670 | ||
| 671 | static irqreturn_t qpti_intr(int irq, void *dev_id); | 671 | static irqreturn_t qpti_intr(int irq, void *dev_id); |
| 672 | 672 | ||
| 673 | static void __devinit qpti_chain_add(struct qlogicpti *qpti) | 673 | static void qpti_chain_add(struct qlogicpti *qpti) |
| 674 | { | 674 | { |
| 675 | spin_lock_irq(&qptichain_lock); | 675 | spin_lock_irq(&qptichain_lock); |
| 676 | if (qptichain != NULL) { | 676 | if (qptichain != NULL) { |
| @@ -686,7 +686,7 @@ static void __devinit qpti_chain_add(struct qlogicpti *qpti) | |||
| 686 | spin_unlock_irq(&qptichain_lock); | 686 | spin_unlock_irq(&qptichain_lock); |
| 687 | } | 687 | } |
| 688 | 688 | ||
| 689 | static void __devexit qpti_chain_del(struct qlogicpti *qpti) | 689 | static void qpti_chain_del(struct qlogicpti *qpti) |
| 690 | { | 690 | { |
| 691 | spin_lock_irq(&qptichain_lock); | 691 | spin_lock_irq(&qptichain_lock); |
| 692 | if (qptichain == qpti) { | 692 | if (qptichain == qpti) { |
| @@ -701,7 +701,7 @@ static void __devexit qpti_chain_del(struct qlogicpti *qpti) | |||
| 701 | spin_unlock_irq(&qptichain_lock); | 701 | spin_unlock_irq(&qptichain_lock); |
| 702 | } | 702 | } |
| 703 | 703 | ||
| 704 | static int __devinit qpti_map_regs(struct qlogicpti *qpti) | 704 | static int qpti_map_regs(struct qlogicpti *qpti) |
| 705 | { | 705 | { |
| 706 | struct platform_device *op = qpti->op; | 706 | struct platform_device *op = qpti->op; |
| 707 | 707 | ||
| @@ -724,7 +724,7 @@ static int __devinit qpti_map_regs(struct qlogicpti *qpti) | |||
| 724 | return 0; | 724 | return 0; |
| 725 | } | 725 | } |
| 726 | 726 | ||
| 727 | static int __devinit qpti_register_irq(struct qlogicpti *qpti) | 727 | static int qpti_register_irq(struct qlogicpti *qpti) |
| 728 | { | 728 | { |
| 729 | struct platform_device *op = qpti->op; | 729 | struct platform_device *op = qpti->op; |
| 730 | 730 | ||
| @@ -749,7 +749,7 @@ fail: | |||
| 749 | return -1; | 749 | return -1; |
| 750 | } | 750 | } |
| 751 | 751 | ||
| 752 | static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti) | 752 | static void qpti_get_scsi_id(struct qlogicpti *qpti) |
| 753 | { | 753 | { |
| 754 | struct platform_device *op = qpti->op; | 754 | struct platform_device *op = qpti->op; |
| 755 | struct device_node *dp; | 755 | struct device_node *dp; |
| @@ -803,7 +803,7 @@ static void qpti_get_clock(struct qlogicpti *qpti) | |||
| 803 | /* The request and response queues must each be aligned | 803 | /* The request and response queues must each be aligned |
| 804 | * on a page boundary. | 804 | * on a page boundary. |
| 805 | */ | 805 | */ |
| 806 | static int __devinit qpti_map_queues(struct qlogicpti *qpti) | 806 | static int qpti_map_queues(struct qlogicpti *qpti) |
| 807 | { | 807 | { |
| 808 | struct platform_device *op = qpti->op; | 808 | struct platform_device *op = qpti->op; |
| 809 | 809 | ||
| @@ -1292,7 +1292,7 @@ static struct scsi_host_template qpti_template = { | |||
| 1292 | }; | 1292 | }; |
| 1293 | 1293 | ||
| 1294 | static const struct of_device_id qpti_match[]; | 1294 | static const struct of_device_id qpti_match[]; |
| 1295 | static int __devinit qpti_sbus_probe(struct platform_device *op) | 1295 | static int qpti_sbus_probe(struct platform_device *op) |
| 1296 | { | 1296 | { |
| 1297 | struct device_node *dp = op->dev.of_node; | 1297 | struct device_node *dp = op->dev.of_node; |
| 1298 | struct Scsi_Host *host; | 1298 | struct Scsi_Host *host; |
| @@ -1402,7 +1402,7 @@ fail_unlink: | |||
| 1402 | return -ENODEV; | 1402 | return -ENODEV; |
| 1403 | } | 1403 | } |
| 1404 | 1404 | ||
| 1405 | static int __devexit qpti_sbus_remove(struct platform_device *op) | 1405 | static int qpti_sbus_remove(struct platform_device *op) |
| 1406 | { | 1406 | { |
| 1407 | struct qlogicpti *qpti = dev_get_drvdata(&op->dev); | 1407 | struct qlogicpti *qpti = dev_get_drvdata(&op->dev); |
| 1408 | 1408 | ||
| @@ -1459,7 +1459,7 @@ static struct platform_driver qpti_sbus_driver = { | |||
| 1459 | .of_match_table = qpti_match, | 1459 | .of_match_table = qpti_match, |
| 1460 | }, | 1460 | }, |
| 1461 | .probe = qpti_sbus_probe, | 1461 | .probe = qpti_sbus_probe, |
| 1462 | .remove = __devexit_p(qpti_sbus_remove), | 1462 | .remove = qpti_sbus_remove, |
| 1463 | }; | 1463 | }; |
| 1464 | 1464 | ||
| 1465 | static int __init qpti_init(void) | 1465 | static int __init qpti_init(void) |
diff --git a/drivers/scsi/sgiwd93.c b/drivers/scsi/sgiwd93.c index 3a9d85ca6047..a464d959f66e 100644 --- a/drivers/scsi/sgiwd93.c +++ b/drivers/scsi/sgiwd93.c | |||
| @@ -226,7 +226,7 @@ static struct scsi_host_template sgiwd93_template = { | |||
| 226 | .use_clustering = DISABLE_CLUSTERING, | 226 | .use_clustering = DISABLE_CLUSTERING, |
| 227 | }; | 227 | }; |
| 228 | 228 | ||
| 229 | static int __devinit sgiwd93_probe(struct platform_device *pdev) | 229 | static int sgiwd93_probe(struct platform_device *pdev) |
| 230 | { | 230 | { |
| 231 | struct sgiwd93_platform_data *pd = pdev->dev.platform_data; | 231 | struct sgiwd93_platform_data *pd = pdev->dev.platform_data; |
| 232 | unsigned char *wdregs = pd->wdregs; | 232 | unsigned char *wdregs = pd->wdregs; |
| @@ -312,7 +312,7 @@ static int __exit sgiwd93_remove(struct platform_device *pdev) | |||
| 312 | 312 | ||
| 313 | static struct platform_driver sgiwd93_driver = { | 313 | static struct platform_driver sgiwd93_driver = { |
| 314 | .probe = sgiwd93_probe, | 314 | .probe = sgiwd93_probe, |
| 315 | .remove = __devexit_p(sgiwd93_remove), | 315 | .remove = sgiwd93_remove, |
| 316 | .driver = { | 316 | .driver = { |
| 317 | .name = "sgiwd93", | 317 | .name = "sgiwd93", |
| 318 | .owner = THIS_MODULE, | 318 | .owner = THIS_MODULE, |
diff --git a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c index a318264a4ba1..3b3b56f4a830 100644 --- a/drivers/scsi/sim710.c +++ b/drivers/scsi/sim710.c | |||
| @@ -94,9 +94,9 @@ static struct scsi_host_template sim710_driver_template = { | |||
| 94 | .module = THIS_MODULE, | 94 | .module = THIS_MODULE, |
| 95 | }; | 95 | }; |
| 96 | 96 | ||
| 97 | static __devinit int | 97 | static int sim710_probe_common(struct device *dev, unsigned long base_addr, |
| 98 | sim710_probe_common(struct device *dev, unsigned long base_addr, | 98 | int irq, int clock, int differential, |
| 99 | int irq, int clock, int differential, int scsi_id) | 99 | int scsi_id) |
| 100 | { | 100 | { |
| 101 | struct Scsi_Host * host = NULL; | 101 | struct Scsi_Host * host = NULL; |
| 102 | struct NCR_700_Host_Parameters *hostdata = | 102 | struct NCR_700_Host_Parameters *hostdata = |
| @@ -153,8 +153,7 @@ sim710_probe_common(struct device *dev, unsigned long base_addr, | |||
| 153 | return -ENODEV; | 153 | return -ENODEV; |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | static __devexit int | 156 | static int sim710_device_remove(struct device *dev) |
| 157 | sim710_device_remove(struct device *dev) | ||
| 158 | { | 157 | { |
| 159 | struct Scsi_Host *host = dev_get_drvdata(dev); | 158 | struct Scsi_Host *host = dev_get_drvdata(dev); |
| 160 | struct NCR_700_Host_Parameters *hostdata = | 159 | struct NCR_700_Host_Parameters *hostdata = |
| @@ -221,7 +220,7 @@ static struct eisa_driver sim710_eisa_driver = { | |||
| 221 | .driver = { | 220 | .driver = { |
| 222 | .name = "sim710", | 221 | .name = "sim710", |
| 223 | .probe = sim710_eisa_probe, | 222 | .probe = sim710_eisa_probe, |
| 224 | .remove = __devexit_p(sim710_device_remove), | 223 | .remove = sim710_device_remove, |
| 225 | }, | 224 | }, |
| 226 | }; | 225 | }; |
| 227 | #endif /* CONFIG_EISA */ | 226 | #endif /* CONFIG_EISA */ |
diff --git a/drivers/scsi/sni_53c710.c b/drivers/scsi/sni_53c710.c index cf51432f8e72..52d54e7425db 100644 --- a/drivers/scsi/sni_53c710.c +++ b/drivers/scsi/sni_53c710.c | |||
| @@ -65,7 +65,7 @@ static struct scsi_host_template snirm710_template = { | |||
| 65 | .module = THIS_MODULE, | 65 | .module = THIS_MODULE, |
| 66 | }; | 66 | }; |
| 67 | 67 | ||
| 68 | static int __devinit snirm710_probe(struct platform_device *dev) | 68 | static int snirm710_probe(struct platform_device *dev) |
| 69 | { | 69 | { |
| 70 | unsigned long base; | 70 | unsigned long base; |
| 71 | struct NCR_700_Host_Parameters *hostdata; | 71 | struct NCR_700_Host_Parameters *hostdata; |
| @@ -134,7 +134,7 @@ static int __exit snirm710_driver_remove(struct platform_device *dev) | |||
| 134 | 134 | ||
| 135 | static struct platform_driver snirm710_driver = { | 135 | static struct platform_driver snirm710_driver = { |
| 136 | .probe = snirm710_probe, | 136 | .probe = snirm710_probe, |
| 137 | .remove = __devexit_p(snirm710_driver_remove), | 137 | .remove = snirm710_driver_remove, |
| 138 | .driver = { | 138 | .driver = { |
| 139 | .name = "snirm_53c710", | 139 | .name = "snirm_53c710", |
| 140 | .owner = THIS_MODULE, | 140 | .owner = THIS_MODULE, |
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 606215e54b88..325c31caa6e0 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c | |||
| @@ -1540,8 +1540,7 @@ static void stex_free_irq(struct st_hba *hba) | |||
| 1540 | pci_disable_msi(pdev); | 1540 | pci_disable_msi(pdev); |
| 1541 | } | 1541 | } |
| 1542 | 1542 | ||
| 1543 | static int __devinit | 1543 | static int stex_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 1544 | stex_probe(struct pci_dev *pdev, const struct pci_device_id *id) | ||
| 1545 | { | 1544 | { |
| 1546 | struct st_hba *hba; | 1545 | struct st_hba *hba; |
| 1547 | struct Scsi_Host *host; | 1546 | struct Scsi_Host *host; |
| @@ -1815,7 +1814,7 @@ static struct pci_driver stex_pci_driver = { | |||
| 1815 | .name = DRV_NAME, | 1814 | .name = DRV_NAME, |
| 1816 | .id_table = stex_pci_tbl, | 1815 | .id_table = stex_pci_tbl, |
| 1817 | .probe = stex_probe, | 1816 | .probe = stex_probe, |
| 1818 | .remove = __devexit_p(stex_remove), | 1817 | .remove = stex_remove, |
| 1819 | .shutdown = stex_shutdown, | 1818 | .shutdown = stex_shutdown, |
| 1820 | }; | 1819 | }; |
| 1821 | 1820 | ||
diff --git a/drivers/scsi/sun3x_esp.c b/drivers/scsi/sun3x_esp.c index 0621037f0271..534eb96fc3a7 100644 --- a/drivers/scsi/sun3x_esp.c +++ b/drivers/scsi/sun3x_esp.c | |||
| @@ -194,7 +194,7 @@ static const struct esp_driver_ops sun3x_esp_ops = { | |||
| 194 | .dma_error = sun3x_esp_dma_error, | 194 | .dma_error = sun3x_esp_dma_error, |
| 195 | }; | 195 | }; |
| 196 | 196 | ||
| 197 | static int __devinit esp_sun3x_probe(struct platform_device *dev) | 197 | static int esp_sun3x_probe(struct platform_device *dev) |
| 198 | { | 198 | { |
| 199 | struct scsi_host_template *tpnt = &scsi_esp_template; | 199 | struct scsi_host_template *tpnt = &scsi_esp_template; |
| 200 | struct Scsi_Host *host; | 200 | struct Scsi_Host *host; |
| @@ -268,7 +268,7 @@ fail: | |||
| 268 | return err; | 268 | return err; |
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | static int __devexit esp_sun3x_remove(struct platform_device *dev) | 271 | static int esp_sun3x_remove(struct platform_device *dev) |
| 272 | { | 272 | { |
| 273 | struct esp *esp = dev_get_drvdata(&dev->dev); | 273 | struct esp *esp = dev_get_drvdata(&dev->dev); |
| 274 | unsigned int irq = esp->host->irq; | 274 | unsigned int irq = esp->host->irq; |
| @@ -292,7 +292,7 @@ static int __devexit esp_sun3x_remove(struct platform_device *dev) | |||
| 292 | 292 | ||
| 293 | static struct platform_driver esp_sun3x_driver = { | 293 | static struct platform_driver esp_sun3x_driver = { |
| 294 | .probe = esp_sun3x_probe, | 294 | .probe = esp_sun3x_probe, |
| 295 | .remove = __devexit_p(esp_sun3x_remove), | 295 | .remove = esp_sun3x_remove, |
| 296 | .driver = { | 296 | .driver = { |
| 297 | .name = "sun3x_esp", | 297 | .name = "sun3x_esp", |
| 298 | .owner = THIS_MODULE, | 298 | .owner = THIS_MODULE, |
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c index 676fe9ac7f61..f2e68459f7ea 100644 --- a/drivers/scsi/sun_esp.c +++ b/drivers/scsi/sun_esp.c | |||
| @@ -43,8 +43,7 @@ enum dvma_rev { | |||
| 43 | dvmahme | 43 | dvmahme |
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | static int __devinit esp_sbus_setup_dma(struct esp *esp, | 46 | static int esp_sbus_setup_dma(struct esp *esp, struct platform_device *dma_of) |
| 47 | struct platform_device *dma_of) | ||
| 48 | { | 47 | { |
| 49 | esp->dma = dma_of; | 48 | esp->dma = dma_of; |
| 50 | 49 | ||
| @@ -79,7 +78,7 @@ static int __devinit esp_sbus_setup_dma(struct esp *esp, | |||
| 79 | 78 | ||
| 80 | } | 79 | } |
| 81 | 80 | ||
| 82 | static int __devinit esp_sbus_map_regs(struct esp *esp, int hme) | 81 | static int esp_sbus_map_regs(struct esp *esp, int hme) |
| 83 | { | 82 | { |
| 84 | struct platform_device *op = esp->dev; | 83 | struct platform_device *op = esp->dev; |
| 85 | struct resource *res; | 84 | struct resource *res; |
| @@ -99,7 +98,7 @@ static int __devinit esp_sbus_map_regs(struct esp *esp, int hme) | |||
| 99 | return 0; | 98 | return 0; |
| 100 | } | 99 | } |
| 101 | 100 | ||
| 102 | static int __devinit esp_sbus_map_command_block(struct esp *esp) | 101 | static int esp_sbus_map_command_block(struct esp *esp) |
| 103 | { | 102 | { |
| 104 | struct platform_device *op = esp->dev; | 103 | struct platform_device *op = esp->dev; |
| 105 | 104 | ||
| @@ -111,7 +110,7 @@ static int __devinit esp_sbus_map_command_block(struct esp *esp) | |||
| 111 | return 0; | 110 | return 0; |
| 112 | } | 111 | } |
| 113 | 112 | ||
| 114 | static int __devinit esp_sbus_register_irq(struct esp *esp) | 113 | static int esp_sbus_register_irq(struct esp *esp) |
| 115 | { | 114 | { |
| 116 | struct Scsi_Host *host = esp->host; | 115 | struct Scsi_Host *host = esp->host; |
| 117 | struct platform_device *op = esp->dev; | 116 | struct platform_device *op = esp->dev; |
| @@ -120,7 +119,7 @@ static int __devinit esp_sbus_register_irq(struct esp *esp) | |||
| 120 | return request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "ESP", esp); | 119 | return request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "ESP", esp); |
| 121 | } | 120 | } |
| 122 | 121 | ||
| 123 | static void __devinit esp_get_scsi_id(struct esp *esp, struct platform_device *espdma) | 122 | static void esp_get_scsi_id(struct esp *esp, struct platform_device *espdma) |
| 124 | { | 123 | { |
| 125 | struct platform_device *op = esp->dev; | 124 | struct platform_device *op = esp->dev; |
| 126 | struct device_node *dp; | 125 | struct device_node *dp; |
| @@ -142,7 +141,7 @@ done: | |||
| 142 | esp->scsi_id_mask = (1 << esp->scsi_id); | 141 | esp->scsi_id_mask = (1 << esp->scsi_id); |
| 143 | } | 142 | } |
| 144 | 143 | ||
| 145 | static void __devinit esp_get_differential(struct esp *esp) | 144 | static void esp_get_differential(struct esp *esp) |
| 146 | { | 145 | { |
| 147 | struct platform_device *op = esp->dev; | 146 | struct platform_device *op = esp->dev; |
| 148 | struct device_node *dp; | 147 | struct device_node *dp; |
| @@ -154,7 +153,7 @@ static void __devinit esp_get_differential(struct esp *esp) | |||
| 154 | esp->flags &= ~ESP_FLAG_DIFFERENTIAL; | 153 | esp->flags &= ~ESP_FLAG_DIFFERENTIAL; |
| 155 | } | 154 | } |
| 156 | 155 | ||
| 157 | static void __devinit esp_get_clock_params(struct esp *esp) | 156 | static void esp_get_clock_params(struct esp *esp) |
| 158 | { | 157 | { |
| 159 | struct platform_device *op = esp->dev; | 158 | struct platform_device *op = esp->dev; |
| 160 | struct device_node *bus_dp, *dp; | 159 | struct device_node *bus_dp, *dp; |
| @@ -170,7 +169,7 @@ static void __devinit esp_get_clock_params(struct esp *esp) | |||
| 170 | esp->cfreq = fmhz; | 169 | esp->cfreq = fmhz; |
| 171 | } | 170 | } |
| 172 | 171 | ||
| 173 | static void __devinit esp_get_bursts(struct esp *esp, struct platform_device *dma_of) | 172 | static void esp_get_bursts(struct esp *esp, struct platform_device *dma_of) |
| 174 | { | 173 | { |
| 175 | struct device_node *dma_dp = dma_of->dev.of_node; | 174 | struct device_node *dma_dp = dma_of->dev.of_node; |
| 176 | struct platform_device *op = esp->dev; | 175 | struct platform_device *op = esp->dev; |
| @@ -195,7 +194,7 @@ static void __devinit esp_get_bursts(struct esp *esp, struct platform_device *dm | |||
| 195 | esp->bursts = bursts; | 194 | esp->bursts = bursts; |
| 196 | } | 195 | } |
| 197 | 196 | ||
| 198 | static void __devinit esp_sbus_get_props(struct esp *esp, struct platform_device *espdma) | 197 | static void esp_sbus_get_props(struct esp *esp, struct platform_device *espdma) |
| 199 | { | 198 | { |
| 200 | esp_get_scsi_id(esp, espdma); | 199 | esp_get_scsi_id(esp, espdma); |
| 201 | esp_get_differential(esp); | 200 | esp_get_differential(esp); |
| @@ -487,9 +486,8 @@ static const struct esp_driver_ops sbus_esp_ops = { | |||
| 487 | .dma_error = sbus_esp_dma_error, | 486 | .dma_error = sbus_esp_dma_error, |
| 488 | }; | 487 | }; |
| 489 | 488 | ||
| 490 | static int __devinit esp_sbus_probe_one(struct platform_device *op, | 489 | static int esp_sbus_probe_one(struct platform_device *op, |
| 491 | struct platform_device *espdma, | 490 | struct platform_device *espdma, int hme) |
| 492 | int hme) | ||
| 493 | { | 491 | { |
| 494 | struct scsi_host_template *tpnt = &scsi_esp_template; | 492 | struct scsi_host_template *tpnt = &scsi_esp_template; |
| 495 | struct Scsi_Host *host; | 493 | struct Scsi_Host *host; |
| @@ -562,7 +560,7 @@ fail: | |||
| 562 | return err; | 560 | return err; |
| 563 | } | 561 | } |
| 564 | 562 | ||
| 565 | static int __devinit esp_sbus_probe(struct platform_device *op) | 563 | static int esp_sbus_probe(struct platform_device *op) |
| 566 | { | 564 | { |
| 567 | struct device_node *dma_node = NULL; | 565 | struct device_node *dma_node = NULL; |
| 568 | struct device_node *dp = op->dev.of_node; | 566 | struct device_node *dp = op->dev.of_node; |
| @@ -585,7 +583,7 @@ static int __devinit esp_sbus_probe(struct platform_device *op) | |||
| 585 | return esp_sbus_probe_one(op, dma_of, hme); | 583 | return esp_sbus_probe_one(op, dma_of, hme); |
| 586 | } | 584 | } |
| 587 | 585 | ||
| 588 | static int __devexit esp_sbus_remove(struct platform_device *op) | 586 | static int esp_sbus_remove(struct platform_device *op) |
| 589 | { | 587 | { |
| 590 | struct esp *esp = dev_get_drvdata(&op->dev); | 588 | struct esp *esp = dev_get_drvdata(&op->dev); |
| 591 | struct platform_device *dma_of = esp->dma; | 589 | struct platform_device *dma_of = esp->dma; |
| @@ -639,7 +637,7 @@ static struct platform_driver esp_sbus_driver = { | |||
| 639 | .of_match_table = esp_match, | 637 | .of_match_table = esp_match, |
| 640 | }, | 638 | }, |
| 641 | .probe = esp_sbus_probe, | 639 | .probe = esp_sbus_probe, |
| 642 | .remove = __devexit_p(esp_sbus_remove), | 640 | .remove = esp_sbus_remove, |
| 643 | }; | 641 | }; |
| 644 | 642 | ||
| 645 | static int __init sunesp_init(void) | 643 | static int __init sunesp_init(void) |
diff --git a/drivers/scsi/sym53c416.c b/drivers/scsi/sym53c416.c index ac4eca6a5328..0b7819f3e09b 100644 --- a/drivers/scsi/sym53c416.c +++ b/drivers/scsi/sym53c416.c | |||
| @@ -581,7 +581,7 @@ static int sym53c416_test(int base) | |||
| 581 | } | 581 | } |
| 582 | 582 | ||
| 583 | 583 | ||
| 584 | static struct isapnp_device_id id_table[] __devinitdata = { | 584 | static struct isapnp_device_id id_table[] = { |
| 585 | { ISAPNP_ANY_ID, ISAPNP_ANY_ID, | 585 | { ISAPNP_ANY_ID, ISAPNP_ANY_ID, |
| 586 | ISAPNP_VENDOR('S','L','I'), ISAPNP_FUNCTION(0x4161), 0 }, | 586 | ISAPNP_VENDOR('S','L','I'), ISAPNP_FUNCTION(0x4161), 0 }, |
| 587 | { ISAPNP_ANY_ID, ISAPNP_ANY_ID, | 587 | { ISAPNP_ANY_ID, ISAPNP_ANY_ID, |
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index e2b8e68b57e7..599568299fbe 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c | |||
| @@ -1284,8 +1284,7 @@ static int sym53c8xx_proc_info(struct Scsi_Host *shost, char *buffer, | |||
| 1284 | * sym_free_resources() should be used instead of this function after calling | 1284 | * sym_free_resources() should be used instead of this function after calling |
| 1285 | * sym_attach(). | 1285 | * sym_attach(). |
| 1286 | */ | 1286 | */ |
| 1287 | static void __devinit | 1287 | static void sym_iounmap_device(struct sym_device *device) |
| 1288 | sym_iounmap_device(struct sym_device *device) | ||
| 1289 | { | 1288 | { |
| 1290 | if (device->s.ioaddr) | 1289 | if (device->s.ioaddr) |
| 1291 | pci_iounmap(device->pdev, device->s.ioaddr); | 1290 | pci_iounmap(device->pdev, device->s.ioaddr); |
| @@ -1325,8 +1324,8 @@ static void sym_free_resources(struct sym_hcb *np, struct pci_dev *pdev, | |||
| 1325 | * If all is OK, install interrupt handling and | 1324 | * If all is OK, install interrupt handling and |
| 1326 | * start the timer daemon. | 1325 | * start the timer daemon. |
| 1327 | */ | 1326 | */ |
| 1328 | static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt, | 1327 | static struct Scsi_Host *sym_attach(struct scsi_host_template *tpnt, int unit, |
| 1329 | int unit, struct sym_device *dev) | 1328 | struct sym_device *dev) |
| 1330 | { | 1329 | { |
| 1331 | struct sym_data *sym_data; | 1330 | struct sym_data *sym_data; |
| 1332 | struct sym_hcb *np = NULL; | 1331 | struct sym_hcb *np = NULL; |
| @@ -1481,7 +1480,7 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt, | |||
| 1481 | * Detect and try to read SYMBIOS and TEKRAM NVRAM. | 1480 | * Detect and try to read SYMBIOS and TEKRAM NVRAM. |
| 1482 | */ | 1481 | */ |
| 1483 | #if SYM_CONF_NVRAM_SUPPORT | 1482 | #if SYM_CONF_NVRAM_SUPPORT |
| 1484 | static void __devinit sym_get_nvram(struct sym_device *devp, struct sym_nvram *nvp) | 1483 | static void sym_get_nvram(struct sym_device *devp, struct sym_nvram *nvp) |
| 1485 | { | 1484 | { |
| 1486 | devp->nvram = nvp; | 1485 | devp->nvram = nvp; |
| 1487 | nvp->type = 0; | 1486 | nvp->type = 0; |
| @@ -1494,7 +1493,7 @@ static inline void sym_get_nvram(struct sym_device *devp, struct sym_nvram *nvp) | |||
| 1494 | } | 1493 | } |
| 1495 | #endif /* SYM_CONF_NVRAM_SUPPORT */ | 1494 | #endif /* SYM_CONF_NVRAM_SUPPORT */ |
| 1496 | 1495 | ||
| 1497 | static int __devinit sym_check_supported(struct sym_device *device) | 1496 | static int sym_check_supported(struct sym_device *device) |
| 1498 | { | 1497 | { |
| 1499 | struct sym_chip *chip; | 1498 | struct sym_chip *chip; |
| 1500 | struct pci_dev *pdev = device->pdev; | 1499 | struct pci_dev *pdev = device->pdev; |
| @@ -1531,7 +1530,7 @@ static int __devinit sym_check_supported(struct sym_device *device) | |||
| 1531 | * Ignore Symbios chips controlled by various RAID controllers. | 1530 | * Ignore Symbios chips controlled by various RAID controllers. |
| 1532 | * These controllers set value 0x52414944 at RAM end - 16. | 1531 | * These controllers set value 0x52414944 at RAM end - 16. |
| 1533 | */ | 1532 | */ |
| 1534 | static int __devinit sym_check_raid(struct sym_device *device) | 1533 | static int sym_check_raid(struct sym_device *device) |
| 1535 | { | 1534 | { |
| 1536 | unsigned int ram_size, ram_val; | 1535 | unsigned int ram_size, ram_val; |
| 1537 | 1536 | ||
| @@ -1552,7 +1551,7 @@ static int __devinit sym_check_raid(struct sym_device *device) | |||
| 1552 | return -ENODEV; | 1551 | return -ENODEV; |
| 1553 | } | 1552 | } |
| 1554 | 1553 | ||
| 1555 | static int __devinit sym_set_workarounds(struct sym_device *device) | 1554 | static int sym_set_workarounds(struct sym_device *device) |
| 1556 | { | 1555 | { |
| 1557 | struct sym_chip *chip = &device->chip; | 1556 | struct sym_chip *chip = &device->chip; |
| 1558 | struct pci_dev *pdev = device->pdev; | 1557 | struct pci_dev *pdev = device->pdev; |
| @@ -1602,8 +1601,7 @@ static int __devinit sym_set_workarounds(struct sym_device *device) | |||
| 1602 | /* | 1601 | /* |
| 1603 | * Map HBA registers and on-chip SRAM (if present). | 1602 | * Map HBA registers and on-chip SRAM (if present). |
| 1604 | */ | 1603 | */ |
| 1605 | static int __devinit | 1604 | static int sym_iomap_device(struct sym_device *device) |
| 1606 | sym_iomap_device(struct sym_device *device) | ||
| 1607 | { | 1605 | { |
| 1608 | struct pci_dev *pdev = device->pdev; | 1606 | struct pci_dev *pdev = device->pdev; |
| 1609 | struct pci_bus_region bus_addr; | 1607 | struct pci_bus_region bus_addr; |
| @@ -1751,8 +1749,7 @@ static struct scsi_host_template sym2_template = { | |||
| 1751 | 1749 | ||
| 1752 | static int attach_count; | 1750 | static int attach_count; |
| 1753 | 1751 | ||
| 1754 | static int __devinit sym2_probe(struct pci_dev *pdev, | 1752 | static int sym2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 1755 | const struct pci_device_id *ent) | ||
| 1756 | { | 1753 | { |
| 1757 | struct sym_device sym_dev; | 1754 | struct sym_device sym_dev; |
| 1758 | struct sym_nvram nvram; | 1755 | struct sym_nvram nvram; |
| @@ -2077,7 +2074,7 @@ static struct spi_function_template sym2_transport_functions = { | |||
| 2077 | .get_signalling = sym2_get_signalling, | 2074 | .get_signalling = sym2_get_signalling, |
| 2078 | }; | 2075 | }; |
| 2079 | 2076 | ||
| 2080 | static struct pci_device_id sym2_id_table[] __devinitdata = { | 2077 | static struct pci_device_id sym2_id_table[] = { |
| 2081 | { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C810, | 2078 | { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C810, |
| 2082 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | 2079 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, |
| 2083 | { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C820, | 2080 | { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C820, |
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c index a1baccce05f0..9327f5fcec4e 100644 --- a/drivers/scsi/tmscsim.c +++ b/drivers/scsi/tmscsim.c | |||
| @@ -2219,7 +2219,7 @@ static struct scsi_host_template driver_template = { | |||
| 2219 | * | 2219 | * |
| 2220 | **********************************************************************/ | 2220 | **********************************************************************/ |
| 2221 | 2221 | ||
| 2222 | static void __devinit dc390_eeprom_prepare_read(struct pci_dev *pdev, u8 cmd) | 2222 | static void dc390_eeprom_prepare_read(struct pci_dev *pdev, u8 cmd) |
| 2223 | { | 2223 | { |
| 2224 | u8 carryFlag = 1, j = 0x80, bval; | 2224 | u8 carryFlag = 1, j = 0x80, bval; |
| 2225 | int i; | 2225 | int i; |
| @@ -2242,7 +2242,7 @@ static void __devinit dc390_eeprom_prepare_read(struct pci_dev *pdev, u8 cmd) | |||
| 2242 | } | 2242 | } |
| 2243 | } | 2243 | } |
| 2244 | 2244 | ||
| 2245 | static u16 __devinit dc390_eeprom_get_data(struct pci_dev *pdev) | 2245 | static u16 dc390_eeprom_get_data(struct pci_dev *pdev) |
| 2246 | { | 2246 | { |
| 2247 | int i; | 2247 | int i; |
| 2248 | u16 wval = 0; | 2248 | u16 wval = 0; |
| @@ -2264,7 +2264,7 @@ static u16 __devinit dc390_eeprom_get_data(struct pci_dev *pdev) | |||
| 2264 | return wval; | 2264 | return wval; |
| 2265 | } | 2265 | } |
| 2266 | 2266 | ||
| 2267 | static void __devinit dc390_read_eeprom(struct pci_dev *pdev, u16 *ptr) | 2267 | static void dc390_read_eeprom(struct pci_dev *pdev, u16 *ptr) |
| 2268 | { | 2268 | { |
| 2269 | u8 cmd = EEPROM_READ, i; | 2269 | u8 cmd = EEPROM_READ, i; |
| 2270 | 2270 | ||
| @@ -2282,7 +2282,7 @@ static void __devinit dc390_read_eeprom(struct pci_dev *pdev, u16 *ptr) | |||
| 2282 | } | 2282 | } |
| 2283 | 2283 | ||
| 2284 | /* Override EEprom values with explicitly set values */ | 2284 | /* Override EEprom values with explicitly set values */ |
| 2285 | static void __devinit dc390_eeprom_override(u8 index) | 2285 | static void dc390_eeprom_override(u8 index) |
| 2286 | { | 2286 | { |
| 2287 | u8 *ptr = (u8 *) dc390_eepromBuf[index], id; | 2287 | u8 *ptr = (u8 *) dc390_eepromBuf[index], id; |
| 2288 | 2288 | ||
| @@ -2305,7 +2305,7 @@ static void __devinit dc390_eeprom_override(u8 index) | |||
| 2305 | } | 2305 | } |
| 2306 | } | 2306 | } |
| 2307 | 2307 | ||
| 2308 | static int __devinitdata tmscsim_def[] = { | 2308 | static int tmscsim_def[] = { |
| 2309 | 7, | 2309 | 7, |
| 2310 | 0 /* 10MHz */, | 2310 | 0 /* 10MHz */, |
| 2311 | PARITY_CHK_ | SEND_START_ | EN_DISCONNECT_ | SYNC_NEGO_ | TAG_QUEUEING_, | 2311 | PARITY_CHK_ | SEND_START_ | EN_DISCONNECT_ | SYNC_NEGO_ | TAG_QUEUEING_, |
| @@ -2315,7 +2315,7 @@ static int __devinitdata tmscsim_def[] = { | |||
| 2315 | }; | 2315 | }; |
| 2316 | 2316 | ||
| 2317 | /* Copy defaults over set values where missing */ | 2317 | /* Copy defaults over set values where missing */ |
| 2318 | static void __devinit dc390_fill_with_defaults (void) | 2318 | static void dc390_fill_with_defaults (void) |
| 2319 | { | 2319 | { |
| 2320 | int i; | 2320 | int i; |
| 2321 | 2321 | ||
| @@ -2335,7 +2335,7 @@ static void __devinit dc390_fill_with_defaults (void) | |||
| 2335 | tmscsim[5] = 180; | 2335 | tmscsim[5] = 180; |
| 2336 | } | 2336 | } |
| 2337 | 2337 | ||
| 2338 | static void __devinit dc390_check_eeprom(struct pci_dev *pdev, u8 index) | 2338 | static void dc390_check_eeprom(struct pci_dev *pdev, u8 index) |
| 2339 | { | 2339 | { |
| 2340 | u8 interpd[] = {1, 3, 5, 10, 16, 30, 60, 120}; | 2340 | u8 interpd[] = {1, 3, 5, 10, 16, 30, 60, 120}; |
| 2341 | u8 EEbuf[128]; | 2341 | u8 EEbuf[128]; |
| @@ -2372,7 +2372,7 @@ static void __devinit dc390_check_eeprom(struct pci_dev *pdev, u8 index) | |||
| 2372 | } | 2372 | } |
| 2373 | } | 2373 | } |
| 2374 | 2374 | ||
| 2375 | static void __devinit dc390_init_hw(struct dc390_acb *pACB, u8 index) | 2375 | static void dc390_init_hw(struct dc390_acb *pACB, u8 index) |
| 2376 | { | 2376 | { |
| 2377 | struct Scsi_Host *shost = pACB->pScsiHost; | 2377 | struct Scsi_Host *shost = pACB->pScsiHost; |
| 2378 | u8 dstate; | 2378 | u8 dstate; |
| @@ -2422,8 +2422,7 @@ static void __devinit dc390_init_hw(struct dc390_acb *pACB, u8 index) | |||
| 2422 | DC390_write8(DMA_Status, dstate); | 2422 | DC390_write8(DMA_Status, dstate); |
| 2423 | } | 2423 | } |
| 2424 | 2424 | ||
| 2425 | static int __devinit dc390_probe_one(struct pci_dev *pdev, | 2425 | static int dc390_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) |
| 2426 | const struct pci_device_id *id) | ||
| 2427 | { | 2426 | { |
| 2428 | struct dc390_acb *pACB; | 2427 | struct dc390_acb *pACB; |
| 2429 | struct Scsi_Host *shost; | 2428 | struct Scsi_Host *shost; |
| @@ -2532,7 +2531,7 @@ static int __devinit dc390_probe_one(struct pci_dev *pdev, | |||
| 2532 | * | 2531 | * |
| 2533 | * @dev: The PCI device to remove. | 2532 | * @dev: The PCI device to remove. |
| 2534 | */ | 2533 | */ |
| 2535 | static void __devexit dc390_remove_one(struct pci_dev *dev) | 2534 | static void dc390_remove_one(struct pci_dev *dev) |
| 2536 | { | 2535 | { |
| 2537 | struct Scsi_Host *scsi_host = pci_get_drvdata(dev); | 2536 | struct Scsi_Host *scsi_host = pci_get_drvdata(dev); |
| 2538 | unsigned long iflags; | 2537 | unsigned long iflags; |
| @@ -2568,7 +2567,7 @@ static struct pci_driver dc390_driver = { | |||
| 2568 | .name = "tmscsim", | 2567 | .name = "tmscsim", |
| 2569 | .id_table = tmscsim_pci_tbl, | 2568 | .id_table = tmscsim_pci_tbl, |
| 2570 | .probe = dc390_probe_one, | 2569 | .probe = dc390_probe_one, |
| 2571 | .remove = __devexit_p(dc390_remove_one), | 2570 | .remove = dc390_remove_one, |
| 2572 | }; | 2571 | }; |
| 2573 | 2572 | ||
| 2574 | static int __init dc390_module_init(void) | 2573 | static int __init dc390_module_init(void) |
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 58f4ba6fe412..91a4046ca9ba 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c | |||
| @@ -1811,8 +1811,7 @@ static int ufshcd_set_dma_mask(struct ufs_hba *hba) | |||
| 1811 | * | 1811 | * |
| 1812 | * Returns 0 on success, non-zero value on failure | 1812 | * Returns 0 on success, non-zero value on failure |
| 1813 | */ | 1813 | */ |
| 1814 | static int __devinit | 1814 | static int ufshcd_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 1815 | ufshcd_probe(struct pci_dev *pdev, const struct pci_device_id *id) | ||
| 1816 | { | 1815 | { |
| 1817 | struct Scsi_Host *host; | 1816 | struct Scsi_Host *host; |
| 1818 | struct ufs_hba *hba; | 1817 | struct ufs_hba *hba; |
| @@ -1947,7 +1946,7 @@ static struct pci_driver ufshcd_pci_driver = { | |||
| 1947 | .name = UFSHCD, | 1946 | .name = UFSHCD, |
| 1948 | .id_table = ufshcd_pci_tbl, | 1947 | .id_table = ufshcd_pci_tbl, |
| 1949 | .probe = ufshcd_probe, | 1948 | .probe = ufshcd_probe, |
| 1950 | .remove = __devexit_p(ufshcd_remove), | 1949 | .remove = ufshcd_remove, |
| 1951 | .shutdown = ufshcd_shutdown, | 1950 | .shutdown = ufshcd_shutdown, |
| 1952 | #ifdef CONFIG_PM | 1951 | #ifdef CONFIG_PM |
| 1953 | .suspend = ufshcd_suspend, | 1952 | .suspend = ufshcd_suspend, |
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 74ab67a169ec..3449a1f8c656 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c | |||
| @@ -679,7 +679,7 @@ out: | |||
| 679 | return err; | 679 | return err; |
| 680 | } | 680 | } |
| 681 | 681 | ||
| 682 | static int __devinit virtscsi_probe(struct virtio_device *vdev) | 682 | static int virtscsi_probe(struct virtio_device *vdev) |
| 683 | { | 683 | { |
| 684 | struct Scsi_Host *shost; | 684 | struct Scsi_Host *shost; |
| 685 | struct virtio_scsi *vscsi; | 685 | struct virtio_scsi *vscsi; |
| @@ -733,7 +733,7 @@ virtscsi_init_failed: | |||
| 733 | return err; | 733 | return err; |
| 734 | } | 734 | } |
| 735 | 735 | ||
| 736 | static void __devexit virtscsi_remove(struct virtio_device *vdev) | 736 | static void virtscsi_remove(struct virtio_device *vdev) |
| 737 | { | 737 | { |
| 738 | struct Scsi_Host *shost = virtio_scsi_host(vdev); | 738 | struct Scsi_Host *shost = virtio_scsi_host(vdev); |
| 739 | struct virtio_scsi *vscsi = shost_priv(shost); | 739 | struct virtio_scsi *vscsi = shost_priv(shost); |
| @@ -785,7 +785,7 @@ static struct virtio_driver virtio_scsi_driver = { | |||
| 785 | .freeze = virtscsi_freeze, | 785 | .freeze = virtscsi_freeze, |
| 786 | .restore = virtscsi_restore, | 786 | .restore = virtscsi_restore, |
| 787 | #endif | 787 | #endif |
| 788 | .remove = __devexit_p(virtscsi_remove), | 788 | .remove = virtscsi_remove, |
| 789 | }; | 789 | }; |
| 790 | 790 | ||
| 791 | static int __init init(void) | 791 | static int __init init(void) |
diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c index 20b3a483c2cc..3bfaa66fa0d1 100644 --- a/drivers/scsi/vmw_pvscsi.c +++ b/drivers/scsi/vmw_pvscsi.c | |||
| @@ -397,7 +397,7 @@ static void pvscsi_unmap_buffers(const struct pvscsi_adapter *adapter, | |||
| 397 | SCSI_SENSE_BUFFERSIZE, PCI_DMA_FROMDEVICE); | 397 | SCSI_SENSE_BUFFERSIZE, PCI_DMA_FROMDEVICE); |
| 398 | } | 398 | } |
| 399 | 399 | ||
| 400 | static int __devinit pvscsi_allocate_rings(struct pvscsi_adapter *adapter) | 400 | static int pvscsi_allocate_rings(struct pvscsi_adapter *adapter) |
| 401 | { | 401 | { |
| 402 | adapter->rings_state = pci_alloc_consistent(adapter->dev, PAGE_SIZE, | 402 | adapter->rings_state = pci_alloc_consistent(adapter->dev, PAGE_SIZE, |
| 403 | &adapter->ringStatePA); | 403 | &adapter->ringStatePA); |
| @@ -1152,7 +1152,7 @@ static void pvscsi_release_resources(struct pvscsi_adapter *adapter) | |||
| 1152 | * just use a statically allocated scatter list. | 1152 | * just use a statically allocated scatter list. |
| 1153 | * | 1153 | * |
| 1154 | */ | 1154 | */ |
| 1155 | static int __devinit pvscsi_allocate_sg(struct pvscsi_adapter *adapter) | 1155 | static int pvscsi_allocate_sg(struct pvscsi_adapter *adapter) |
| 1156 | { | 1156 | { |
| 1157 | struct pvscsi_ctx *ctx; | 1157 | struct pvscsi_ctx *ctx; |
| 1158 | int i; | 1158 | int i; |
| @@ -1233,8 +1233,7 @@ exit: | |||
| 1233 | return numPhys; | 1233 | return numPhys; |
| 1234 | } | 1234 | } |
| 1235 | 1235 | ||
| 1236 | static int __devinit pvscsi_probe(struct pci_dev *pdev, | 1236 | static int pvscsi_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 1237 | const struct pci_device_id *id) | ||
| 1238 | { | 1237 | { |
| 1239 | struct pvscsi_adapter *adapter; | 1238 | struct pvscsi_adapter *adapter; |
| 1240 | struct Scsi_Host *host; | 1239 | struct Scsi_Host *host; |
| @@ -1454,7 +1453,7 @@ static struct pci_driver pvscsi_pci_driver = { | |||
| 1454 | .name = "vmw_pvscsi", | 1453 | .name = "vmw_pvscsi", |
| 1455 | .id_table = pvscsi_pci_tbl, | 1454 | .id_table = pvscsi_pci_tbl, |
| 1456 | .probe = pvscsi_probe, | 1455 | .probe = pvscsi_probe, |
| 1457 | .remove = __devexit_p(pvscsi_remove), | 1456 | .remove = pvscsi_remove, |
| 1458 | .shutdown = pvscsi_shutdown, | 1457 | .shutdown = pvscsi_shutdown, |
| 1459 | }; | 1458 | }; |
| 1460 | 1459 | ||
diff --git a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c index 27e84e4b1fa9..97ccb0383539 100644 --- a/drivers/scsi/zalon.c +++ b/drivers/scsi/zalon.c | |||
| @@ -182,7 +182,7 @@ static struct parisc_driver zalon_driver = { | |||
| 182 | .name = "zalon", | 182 | .name = "zalon", |
| 183 | .id_table = zalon_tbl, | 183 | .id_table = zalon_tbl, |
| 184 | .probe = zalon_probe, | 184 | .probe = zalon_probe, |
| 185 | .remove = __devexit_p(zalon_remove), | 185 | .remove = zalon_remove, |
| 186 | }; | 186 | }; |
| 187 | 187 | ||
| 188 | static int __init zalon7xx_init(void) | 188 | static int __init zalon7xx_init(void) |
diff --git a/drivers/scsi/zorro7xx.c b/drivers/scsi/zorro7xx.c index e17764d71476..cbf3476c68cd 100644 --- a/drivers/scsi/zorro7xx.c +++ b/drivers/scsi/zorro7xx.c | |||
| @@ -38,7 +38,7 @@ static struct zorro_driver_data { | |||
| 38 | const char *name; | 38 | const char *name; |
| 39 | unsigned long offset; | 39 | unsigned long offset; |
| 40 | int absolute; /* offset is absolute address */ | 40 | int absolute; /* offset is absolute address */ |
| 41 | } zorro7xx_driver_data[] __devinitdata = { | 41 | } zorro7xx_driver_data[] = { |
| 42 | { .name = "PowerUP 603e+", .offset = 0xf40000, .absolute = 1 }, | 42 | { .name = "PowerUP 603e+", .offset = 0xf40000, .absolute = 1 }, |
| 43 | { .name = "WarpEngine 40xx", .offset = 0x40000 }, | 43 | { .name = "WarpEngine 40xx", .offset = 0x40000 }, |
| 44 | { .name = "A4091", .offset = 0x800000 }, | 44 | { .name = "A4091", .offset = 0x800000 }, |
| @@ -46,7 +46,7 @@ static struct zorro_driver_data { | |||
| 46 | { 0 } | 46 | { 0 } |
| 47 | }; | 47 | }; |
| 48 | 48 | ||
| 49 | static struct zorro_device_id zorro7xx_zorro_tbl[] __devinitdata = { | 49 | static struct zorro_device_id zorro7xx_zorro_tbl[] = { |
| 50 | { | 50 | { |
| 51 | .id = ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS, | 51 | .id = ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS, |
| 52 | .driver_data = (unsigned long)&zorro7xx_driver_data[0], | 52 | .driver_data = (unsigned long)&zorro7xx_driver_data[0], |
| @@ -71,8 +71,8 @@ static struct zorro_device_id zorro7xx_zorro_tbl[] __devinitdata = { | |||
| 71 | }; | 71 | }; |
| 72 | MODULE_DEVICE_TABLE(zorro, zorro7xx_zorro_tbl); | 72 | MODULE_DEVICE_TABLE(zorro, zorro7xx_zorro_tbl); |
| 73 | 73 | ||
| 74 | static int __devinit zorro7xx_init_one(struct zorro_dev *z, | 74 | static int zorro7xx_init_one(struct zorro_dev *z, |
| 75 | const struct zorro_device_id *ent) | 75 | const struct zorro_device_id *ent) |
| 76 | { | 76 | { |
| 77 | struct Scsi_Host *host; | 77 | struct Scsi_Host *host; |
| 78 | struct NCR_700_Host_Parameters *hostdata; | 78 | struct NCR_700_Host_Parameters *hostdata; |
| @@ -150,7 +150,7 @@ static int __devinit zorro7xx_init_one(struct zorro_dev *z, | |||
| 150 | return -ENODEV; | 150 | return -ENODEV; |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | static __devexit void zorro7xx_remove_one(struct zorro_dev *z) | 153 | static void zorro7xx_remove_one(struct zorro_dev *z) |
| 154 | { | 154 | { |
| 155 | struct Scsi_Host *host = zorro_get_drvdata(z); | 155 | struct Scsi_Host *host = zorro_get_drvdata(z); |
| 156 | struct NCR_700_Host_Parameters *hostdata = shost_priv(host); | 156 | struct NCR_700_Host_Parameters *hostdata = shost_priv(host); |
| @@ -167,7 +167,7 @@ static struct zorro_driver zorro7xx_driver = { | |||
| 167 | .name = "zorro7xx-scsi", | 167 | .name = "zorro7xx-scsi", |
| 168 | .id_table = zorro7xx_zorro_tbl, | 168 | .id_table = zorro7xx_zorro_tbl, |
| 169 | .probe = zorro7xx_init_one, | 169 | .probe = zorro7xx_init_one, |
| 170 | .remove = __devexit_p(zorro7xx_remove_one), | 170 | .remove = zorro7xx_remove_one, |
| 171 | }; | 171 | }; |
| 172 | 172 | ||
| 173 | static int __init zorro7xx_scsi_init(void) | 173 | static int __init zorro7xx_scsi_init(void) |
diff --git a/drivers/sh/clk/cpg.c b/drivers/sh/clk/cpg.c index 5aedcdf4ac5c..1ebe67cd1833 100644 --- a/drivers/sh/clk/cpg.c +++ b/drivers/sh/clk/cpg.c | |||
| @@ -126,6 +126,12 @@ static int sh_clk_div_set_rate(struct clk *clk, unsigned long rate) | |||
| 126 | 126 | ||
| 127 | static int sh_clk_div_enable(struct clk *clk) | 127 | static int sh_clk_div_enable(struct clk *clk) |
| 128 | { | 128 | { |
| 129 | if (clk->div_mask == SH_CLK_DIV6_MSK) { | ||
| 130 | int ret = sh_clk_div_set_rate(clk, clk->rate); | ||
| 131 | if (ret < 0) | ||
| 132 | return ret; | ||
| 133 | } | ||
| 134 | |||
| 129 | sh_clk_write(sh_clk_read(clk) & ~CPG_CKSTP_BIT, clk); | 135 | sh_clk_write(sh_clk_read(clk) & ~CPG_CKSTP_BIT, clk); |
| 130 | return 0; | 136 | return 0; |
| 131 | } | 137 | } |
diff --git a/drivers/sh/pfc/gpio.c b/drivers/sh/pfc/gpio.c index 038fa071382a..6a24f07c2013 100644 --- a/drivers/sh/pfc/gpio.c +++ b/drivers/sh/pfc/gpio.c | |||
| @@ -165,7 +165,7 @@ static int sh_pfc_gpio_match(struct gpio_chip *gc, void *data) | |||
| 165 | return !!strstr(gc->label, data); | 165 | return !!strstr(gc->label, data); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | static int __devinit sh_pfc_gpio_probe(struct platform_device *pdev) | 168 | static int sh_pfc_gpio_probe(struct platform_device *pdev) |
| 169 | { | 169 | { |
| 170 | struct sh_pfc_chip *chip; | 170 | struct sh_pfc_chip *chip; |
| 171 | struct gpio_chip *gc; | 171 | struct gpio_chip *gc; |
| @@ -184,7 +184,7 @@ static int __devinit sh_pfc_gpio_probe(struct platform_device *pdev) | |||
| 184 | return 0; | 184 | return 0; |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | static int __devexit sh_pfc_gpio_remove(struct platform_device *pdev) | 187 | static int sh_pfc_gpio_remove(struct platform_device *pdev) |
| 188 | { | 188 | { |
| 189 | struct sh_pfc_chip *chip = platform_get_drvdata(pdev); | 189 | struct sh_pfc_chip *chip = platform_get_drvdata(pdev); |
| 190 | int ret; | 190 | int ret; |
| @@ -199,7 +199,7 @@ static int __devexit sh_pfc_gpio_remove(struct platform_device *pdev) | |||
| 199 | 199 | ||
| 200 | static struct platform_driver sh_pfc_gpio_driver = { | 200 | static struct platform_driver sh_pfc_gpio_driver = { |
| 201 | .probe = sh_pfc_gpio_probe, | 201 | .probe = sh_pfc_gpio_probe, |
| 202 | .remove = __devexit_p(sh_pfc_gpio_remove), | 202 | .remove = sh_pfc_gpio_remove, |
| 203 | .driver = { | 203 | .driver = { |
| 204 | .name = KBUILD_MODNAME, | 204 | .name = KBUILD_MODNAME, |
| 205 | .owner = THIS_MODULE, | 205 | .owner = THIS_MODULE, |
diff --git a/drivers/sh/pfc/pinctrl.c b/drivers/sh/pfc/pinctrl.c index 0646bf6e7889..4109b769eac0 100644 --- a/drivers/sh/pfc/pinctrl.c +++ b/drivers/sh/pfc/pinctrl.c | |||
| @@ -328,10 +328,10 @@ static struct pinctrl_desc sh_pfc_pinctrl_desc = { | |||
| 328 | .confops = &sh_pfc_pinconf_ops, | 328 | .confops = &sh_pfc_pinconf_ops, |
| 329 | }; | 329 | }; |
| 330 | 330 | ||
| 331 | static inline void __devinit sh_pfc_map_one_gpio(struct sh_pfc *pfc, | 331 | static inline void sh_pfc_map_one_gpio(struct sh_pfc *pfc, |
| 332 | struct sh_pfc_pinctrl *pmx, | 332 | struct sh_pfc_pinctrl *pmx, |
| 333 | struct pinmux_gpio *gpio, | 333 | struct pinmux_gpio *gpio, |
| 334 | unsigned offset) | 334 | unsigned offset) |
| 335 | { | 335 | { |
| 336 | struct pinmux_data_reg *dummy; | 336 | struct pinmux_data_reg *dummy; |
| 337 | unsigned long flags; | 337 | unsigned long flags; |
| @@ -351,8 +351,7 @@ static inline void __devinit sh_pfc_map_one_gpio(struct sh_pfc *pfc, | |||
| 351 | } | 351 | } |
| 352 | 352 | ||
| 353 | /* pinmux ranges -> pinctrl pin descs */ | 353 | /* pinmux ranges -> pinctrl pin descs */ |
| 354 | static int __devinit sh_pfc_map_gpios(struct sh_pfc *pfc, | 354 | static int sh_pfc_map_gpios(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx) |
| 355 | struct sh_pfc_pinctrl *pmx) | ||
| 356 | { | 355 | { |
| 357 | unsigned long flags; | 356 | unsigned long flags; |
| 358 | int i; | 357 | int i; |
| @@ -396,8 +395,7 @@ static int __devinit sh_pfc_map_gpios(struct sh_pfc *pfc, | |||
| 396 | return 0; | 395 | return 0; |
| 397 | } | 396 | } |
| 398 | 397 | ||
| 399 | static int __devinit sh_pfc_map_functions(struct sh_pfc *pfc, | 398 | static int sh_pfc_map_functions(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx) |
| 400 | struct sh_pfc_pinctrl *pmx) | ||
| 401 | { | 399 | { |
| 402 | unsigned long flags; | 400 | unsigned long flags; |
| 403 | int i, fn; | 401 | int i, fn; |
| @@ -421,7 +419,7 @@ static int __devinit sh_pfc_map_functions(struct sh_pfc *pfc, | |||
| 421 | return 0; | 419 | return 0; |
| 422 | } | 420 | } |
| 423 | 421 | ||
| 424 | static int __devinit sh_pfc_pinctrl_probe(struct platform_device *pdev) | 422 | static int sh_pfc_pinctrl_probe(struct platform_device *pdev) |
| 425 | { | 423 | { |
| 426 | struct sh_pfc *pfc; | 424 | struct sh_pfc *pfc; |
| 427 | int ret; | 425 | int ret; |
| @@ -465,7 +463,7 @@ free_pads: | |||
| 465 | return ret; | 463 | return ret; |
| 466 | } | 464 | } |
| 467 | 465 | ||
| 468 | static int __devexit sh_pfc_pinctrl_remove(struct platform_device *pdev) | 466 | static int sh_pfc_pinctrl_remove(struct platform_device *pdev) |
| 469 | { | 467 | { |
| 470 | struct sh_pfc_pinctrl *pmx = platform_get_drvdata(pdev); | 468 | struct sh_pfc_pinctrl *pmx = platform_get_drvdata(pdev); |
| 471 | 469 | ||
| @@ -482,7 +480,7 @@ static int __devexit sh_pfc_pinctrl_remove(struct platform_device *pdev) | |||
| 482 | 480 | ||
| 483 | static struct platform_driver sh_pfc_pinctrl_driver = { | 481 | static struct platform_driver sh_pfc_pinctrl_driver = { |
| 484 | .probe = sh_pfc_pinctrl_probe, | 482 | .probe = sh_pfc_pinctrl_probe, |
| 485 | .remove = __devexit_p(sh_pfc_pinctrl_remove), | 483 | .remove = sh_pfc_pinctrl_remove, |
| 486 | .driver = { | 484 | .driver = { |
| 487 | .name = DRV_NAME, | 485 | .name = DRV_NAME, |
| 488 | .owner = THIS_MODULE, | 486 | .owner = THIS_MODULE, |
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c index b3b33fa26acd..fb7ea0d9a734 100644 --- a/drivers/sn/ioc3.c +++ b/drivers/sn/ioc3.c | |||
| @@ -575,11 +575,10 @@ void ioc3_unregister_submodule(struct ioc3_submodule *is) | |||
| 575 | * Device management * | 575 | * Device management * |
| 576 | *********************/ | 576 | *********************/ |
| 577 | 577 | ||
| 578 | static char * __devinitdata | 578 | static char *ioc3_class_names[] = { "unknown", "IP27 BaseIO", "IP30 system", |
| 579 | ioc3_class_names[]={"unknown", "IP27 BaseIO", "IP30 system", "MENET 1/2/3", | 579 | "MENET 1/2/3", "MENET 4", "CADduo", "Altix Serial" }; |
| 580 | "MENET 4", "CADduo", "Altix Serial"}; | ||
| 581 | 580 | ||
| 582 | static int __devinit ioc3_class(struct ioc3_driver_data *idd) | 581 | static int ioc3_class(struct ioc3_driver_data *idd) |
| 583 | { | 582 | { |
| 584 | int res = IOC3_CLASS_NONE; | 583 | int res = IOC3_CLASS_NONE; |
| 585 | /* NIC-based logic */ | 584 | /* NIC-based logic */ |
| @@ -602,8 +601,7 @@ static int __devinit ioc3_class(struct ioc3_driver_data *idd) | |||
| 602 | return res; | 601 | return res; |
| 603 | } | 602 | } |
| 604 | /* Adds a new instance of an IOC3 card */ | 603 | /* Adds a new instance of an IOC3 card */ |
| 605 | static int __devinit | 604 | static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) |
| 606 | ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | ||
| 607 | { | 605 | { |
| 608 | struct ioc3_driver_data *idd; | 606 | struct ioc3_driver_data *idd; |
| 609 | uint32_t pcmd; | 607 | uint32_t pcmd; |
| @@ -755,7 +753,7 @@ out: | |||
| 755 | } | 753 | } |
| 756 | 754 | ||
| 757 | /* Removes a particular instance of an IOC3 card. */ | 755 | /* Removes a particular instance of an IOC3 card. */ |
| 758 | static void __devexit ioc3_remove(struct pci_dev *pdev) | 756 | static void ioc3_remove(struct pci_dev *pdev) |
| 759 | { | 757 | { |
| 760 | int id; | 758 | int id; |
| 761 | struct ioc3_driver_data *idd; | 759 | struct ioc3_driver_data *idd; |
| @@ -807,7 +805,7 @@ static struct pci_driver ioc3_driver = { | |||
| 807 | .name = "IOC3", | 805 | .name = "IOC3", |
| 808 | .id_table = ioc3_id_table, | 806 | .id_table = ioc3_id_table, |
| 809 | .probe = ioc3_probe, | 807 | .probe = ioc3_probe, |
| 810 | .remove = __devexit_p(ioc3_remove), | 808 | .remove = ioc3_remove, |
| 811 | }; | 809 | }; |
| 812 | 810 | ||
| 813 | MODULE_DEVICE_TABLE(pci, ioc3_id_table); | 811 | MODULE_DEVICE_TABLE(pci, ioc3_id_table); |
diff --git a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig index ff3c8a21f10d..5d6f2ec1c705 100644 --- a/drivers/ssb/Kconfig +++ b/drivers/ssb/Kconfig | |||
| @@ -162,8 +162,7 @@ config SSB_DRIVER_GIGE | |||
| 162 | 162 | ||
| 163 | config SSB_DRIVER_GPIO | 163 | config SSB_DRIVER_GPIO |
| 164 | bool "SSB GPIO driver" | 164 | bool "SSB GPIO driver" |
| 165 | depends on SSB | 165 | depends on SSB && GPIOLIB |
| 166 | select GPIOLIB | ||
| 167 | help | 166 | help |
| 168 | Driver to provide access to the GPIO pins on the bus. | 167 | Driver to provide access to the GPIO pins on the bus. |
| 169 | 168 | ||
diff --git a/drivers/ssb/driver_gige.c b/drivers/ssb/driver_gige.c index f30ea689933a..21f71a1581fa 100644 --- a/drivers/ssb/driver_gige.c +++ b/drivers/ssb/driver_gige.c | |||
| @@ -107,9 +107,8 @@ void gige_pcicfg_write32(struct ssb_gige *dev, | |||
| 107 | gige_write32(dev, SSB_GIGE_PCICFG + offset, value); | 107 | gige_write32(dev, SSB_GIGE_PCICFG + offset, value); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | static int __devinit ssb_gige_pci_read_config(struct pci_bus *bus, | 110 | static int ssb_gige_pci_read_config(struct pci_bus *bus, unsigned int devfn, |
| 111 | unsigned int devfn, int reg, | 111 | int reg, int size, u32 *val) |
| 112 | int size, u32 *val) | ||
| 113 | { | 112 | { |
| 114 | struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops); | 113 | struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops); |
| 115 | unsigned long flags; | 114 | unsigned long flags; |
| @@ -138,9 +137,8 @@ static int __devinit ssb_gige_pci_read_config(struct pci_bus *bus, | |||
| 138 | return PCIBIOS_SUCCESSFUL; | 137 | return PCIBIOS_SUCCESSFUL; |
| 139 | } | 138 | } |
| 140 | 139 | ||
| 141 | static int __devinit ssb_gige_pci_write_config(struct pci_bus *bus, | 140 | static int ssb_gige_pci_write_config(struct pci_bus *bus, unsigned int devfn, |
| 142 | unsigned int devfn, int reg, | 141 | int reg, int size, u32 val) |
| 143 | int size, u32 val) | ||
| 144 | { | 142 | { |
| 145 | struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops); | 143 | struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops); |
| 146 | unsigned long flags; | 144 | unsigned long flags; |
| @@ -169,8 +167,8 @@ static int __devinit ssb_gige_pci_write_config(struct pci_bus *bus, | |||
| 169 | return PCIBIOS_SUCCESSFUL; | 167 | return PCIBIOS_SUCCESSFUL; |
| 170 | } | 168 | } |
| 171 | 169 | ||
| 172 | static int __devinit ssb_gige_probe(struct ssb_device *sdev, | 170 | static int ssb_gige_probe(struct ssb_device *sdev, |
| 173 | const struct ssb_device_id *id) | 171 | const struct ssb_device_id *id) |
| 174 | { | 172 | { |
| 175 | struct ssb_gige *dev; | 173 | struct ssb_gige *dev; |
| 176 | u32 base, tmslow, tmshigh; | 174 | u32 base, tmslow, tmshigh; |
diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c index 49d209173f55..59801d23d7ec 100644 --- a/drivers/ssb/driver_pcicore.c +++ b/drivers/ssb/driver_pcicore.c | |||
| @@ -315,7 +315,7 @@ int ssb_pcicore_pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
| 315 | return ssb_mips_irq(extpci_core->dev) + 2; | 315 | return ssb_mips_irq(extpci_core->dev) + 2; |
| 316 | } | 316 | } |
| 317 | 317 | ||
| 318 | static void __devinit ssb_pcicore_init_hostmode(struct ssb_pcicore *pc) | 318 | static void ssb_pcicore_init_hostmode(struct ssb_pcicore *pc) |
| 319 | { | 319 | { |
| 320 | u32 val; | 320 | u32 val; |
| 321 | 321 | ||
| @@ -380,7 +380,7 @@ static void __devinit ssb_pcicore_init_hostmode(struct ssb_pcicore *pc) | |||
| 380 | register_pci_controller(&ssb_pcicore_controller); | 380 | register_pci_controller(&ssb_pcicore_controller); |
| 381 | } | 381 | } |
| 382 | 382 | ||
| 383 | static int __devinit pcicore_is_in_hostmode(struct ssb_pcicore *pc) | 383 | static int pcicore_is_in_hostmode(struct ssb_pcicore *pc) |
| 384 | { | 384 | { |
| 385 | struct ssb_bus *bus = pc->dev->bus; | 385 | struct ssb_bus *bus = pc->dev->bus; |
| 386 | u16 chipid_top; | 386 | u16 chipid_top; |
| @@ -413,7 +413,7 @@ static int __devinit pcicore_is_in_hostmode(struct ssb_pcicore *pc) | |||
| 413 | * Workarounds. | 413 | * Workarounds. |
| 414 | **************************************************/ | 414 | **************************************************/ |
| 415 | 415 | ||
| 416 | static void __devinit ssb_pcicore_fix_sprom_core_index(struct ssb_pcicore *pc) | 416 | static void ssb_pcicore_fix_sprom_core_index(struct ssb_pcicore *pc) |
| 417 | { | 417 | { |
| 418 | u16 tmp = pcicore_read16(pc, SSB_PCICORE_SPROM(0)); | 418 | u16 tmp = pcicore_read16(pc, SSB_PCICORE_SPROM(0)); |
| 419 | if (((tmp & 0xF000) >> 12) != pc->dev->core_index) { | 419 | if (((tmp & 0xF000) >> 12) != pc->dev->core_index) { |
| @@ -515,7 +515,7 @@ static void ssb_pcicore_pcie_setup_workarounds(struct ssb_pcicore *pc) | |||
| 515 | * Generic and Clientmode operation code. | 515 | * Generic and Clientmode operation code. |
| 516 | **************************************************/ | 516 | **************************************************/ |
| 517 | 517 | ||
| 518 | static void __devinit ssb_pcicore_init_clientmode(struct ssb_pcicore *pc) | 518 | static void ssb_pcicore_init_clientmode(struct ssb_pcicore *pc) |
| 519 | { | 519 | { |
| 520 | struct ssb_device *pdev = pc->dev; | 520 | struct ssb_device *pdev = pc->dev; |
| 521 | struct ssb_bus *bus = pdev->bus; | 521 | struct ssb_bus *bus = pdev->bus; |
| @@ -534,7 +534,7 @@ static void __devinit ssb_pcicore_init_clientmode(struct ssb_pcicore *pc) | |||
| 534 | } | 534 | } |
| 535 | } | 535 | } |
| 536 | 536 | ||
| 537 | void __devinit ssb_pcicore_init(struct ssb_pcicore *pc) | 537 | void ssb_pcicore_init(struct ssb_pcicore *pc) |
| 538 | { | 538 | { |
| 539 | struct ssb_device *dev = pc->dev; | 539 | struct ssb_device *dev = pc->dev; |
| 540 | 540 | ||
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index c82c5c95fe85..772ad9b5c304 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
| @@ -548,7 +548,7 @@ error: | |||
| 548 | } | 548 | } |
| 549 | 549 | ||
| 550 | /* Needs ssb_buses_lock() */ | 550 | /* Needs ssb_buses_lock() */ |
| 551 | static int __devinit ssb_attach_queued_buses(void) | 551 | static int ssb_attach_queued_buses(void) |
| 552 | { | 552 | { |
| 553 | struct ssb_bus *bus, *n; | 553 | struct ssb_bus *bus, *n; |
| 554 | int err = 0; | 554 | int err = 0; |
| @@ -761,9 +761,9 @@ out: | |||
| 761 | return err; | 761 | return err; |
| 762 | } | 762 | } |
| 763 | 763 | ||
| 764 | static int __devinit ssb_bus_register(struct ssb_bus *bus, | 764 | static int ssb_bus_register(struct ssb_bus *bus, |
| 765 | ssb_invariants_func_t get_invariants, | 765 | ssb_invariants_func_t get_invariants, |
| 766 | unsigned long baseaddr) | 766 | unsigned long baseaddr) |
| 767 | { | 767 | { |
| 768 | int err; | 768 | int err; |
| 769 | 769 | ||
| @@ -851,8 +851,7 @@ err_disable_xtal: | |||
| 851 | } | 851 | } |
| 852 | 852 | ||
| 853 | #ifdef CONFIG_SSB_PCIHOST | 853 | #ifdef CONFIG_SSB_PCIHOST |
| 854 | int __devinit ssb_bus_pcibus_register(struct ssb_bus *bus, | 854 | int ssb_bus_pcibus_register(struct ssb_bus *bus, struct pci_dev *host_pci) |
| 855 | struct pci_dev *host_pci) | ||
| 856 | { | 855 | { |
| 857 | int err; | 856 | int err; |
| 858 | 857 | ||
| @@ -875,9 +874,9 @@ EXPORT_SYMBOL(ssb_bus_pcibus_register); | |||
| 875 | #endif /* CONFIG_SSB_PCIHOST */ | 874 | #endif /* CONFIG_SSB_PCIHOST */ |
| 876 | 875 | ||
| 877 | #ifdef CONFIG_SSB_PCMCIAHOST | 876 | #ifdef CONFIG_SSB_PCMCIAHOST |
| 878 | int __devinit ssb_bus_pcmciabus_register(struct ssb_bus *bus, | 877 | int ssb_bus_pcmciabus_register(struct ssb_bus *bus, |
| 879 | struct pcmcia_device *pcmcia_dev, | 878 | struct pcmcia_device *pcmcia_dev, |
| 880 | unsigned long baseaddr) | 879 | unsigned long baseaddr) |
| 881 | { | 880 | { |
| 882 | int err; | 881 | int err; |
| 883 | 882 | ||
| @@ -897,9 +896,8 @@ EXPORT_SYMBOL(ssb_bus_pcmciabus_register); | |||
| 897 | #endif /* CONFIG_SSB_PCMCIAHOST */ | 896 | #endif /* CONFIG_SSB_PCMCIAHOST */ |
| 898 | 897 | ||
| 899 | #ifdef CONFIG_SSB_SDIOHOST | 898 | #ifdef CONFIG_SSB_SDIOHOST |
| 900 | int __devinit ssb_bus_sdiobus_register(struct ssb_bus *bus, | 899 | int ssb_bus_sdiobus_register(struct ssb_bus *bus, struct sdio_func *func, |
| 901 | struct sdio_func *func, | 900 | unsigned int quirks) |
| 902 | unsigned int quirks) | ||
| 903 | { | 901 | { |
| 904 | int err; | 902 | int err; |
| 905 | 903 | ||
| @@ -919,9 +917,8 @@ int __devinit ssb_bus_sdiobus_register(struct ssb_bus *bus, | |||
| 919 | EXPORT_SYMBOL(ssb_bus_sdiobus_register); | 917 | EXPORT_SYMBOL(ssb_bus_sdiobus_register); |
| 920 | #endif /* CONFIG_SSB_PCMCIAHOST */ | 918 | #endif /* CONFIG_SSB_PCMCIAHOST */ |
| 921 | 919 | ||
| 922 | int __devinit ssb_bus_ssbbus_register(struct ssb_bus *bus, | 920 | int ssb_bus_ssbbus_register(struct ssb_bus *bus, unsigned long baseaddr, |
| 923 | unsigned long baseaddr, | 921 | ssb_invariants_func_t get_invariants) |
| 924 | ssb_invariants_func_t get_invariants) | ||
| 925 | { | 922 | { |
| 926 | int err; | 923 | int err; |
| 927 | 924 | ||
diff --git a/drivers/ssb/pcihost_wrapper.c b/drivers/ssb/pcihost_wrapper.c index af5448f5e2d2..32ed1fa4a82e 100644 --- a/drivers/ssb/pcihost_wrapper.c +++ b/drivers/ssb/pcihost_wrapper.c | |||
| @@ -54,8 +54,8 @@ static int ssb_pcihost_resume(struct pci_dev *dev) | |||
| 54 | # define ssb_pcihost_resume NULL | 54 | # define ssb_pcihost_resume NULL |
| 55 | #endif /* CONFIG_PM */ | 55 | #endif /* CONFIG_PM */ |
| 56 | 56 | ||
| 57 | static int __devinit ssb_pcihost_probe(struct pci_dev *dev, | 57 | static int ssb_pcihost_probe(struct pci_dev *dev, |
| 58 | const struct pci_device_id *id) | 58 | const struct pci_device_id *id) |
| 59 | { | 59 | { |
| 60 | struct ssb_bus *ssb; | 60 | struct ssb_bus *ssb; |
| 61 | int err = -ENOMEM; | 61 | int err = -ENOMEM; |
| @@ -111,7 +111,7 @@ static void ssb_pcihost_remove(struct pci_dev *dev) | |||
| 111 | pci_set_drvdata(dev, NULL); | 111 | pci_set_drvdata(dev, NULL); |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | int __devinit ssb_pcihost_register(struct pci_driver *driver) | 114 | int ssb_pcihost_register(struct pci_driver *driver) |
| 115 | { | 115 | { |
| 116 | driver->probe = ssb_pcihost_probe; | 116 | driver->probe = ssb_pcihost_probe; |
| 117 | driver->remove = ssb_pcihost_remove; | 117 | driver->remove = ssb_pcihost_remove; |
diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig index 7de2a10213bd..36eec320569c 100644 --- a/drivers/staging/comedi/Kconfig +++ b/drivers/staging/comedi/Kconfig | |||
| @@ -444,6 +444,7 @@ config COMEDI_ADQ12B | |||
| 444 | 444 | ||
| 445 | config COMEDI_NI_AT_A2150 | 445 | config COMEDI_NI_AT_A2150 |
| 446 | tristate "NI AT-A2150 ISA card support" | 446 | tristate "NI AT-A2150 ISA card support" |
| 447 | select COMEDI_FC | ||
| 447 | depends on VIRT_TO_BUS | 448 | depends on VIRT_TO_BUS |
| 448 | ---help--- | 449 | ---help--- |
| 449 | Enable support for National Instruments AT-A2150 cards | 450 | Enable support for National Instruments AT-A2150 cards |
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index b7bba1790a20..9b038e4a7e71 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c | |||
| @@ -1549,6 +1549,9 @@ static long comedi_unlocked_ioctl(struct file *file, unsigned int cmd, | |||
| 1549 | if (cmd == COMEDI_DEVCONFIG) { | 1549 | if (cmd == COMEDI_DEVCONFIG) { |
| 1550 | rc = do_devconfig_ioctl(dev, | 1550 | rc = do_devconfig_ioctl(dev, |
| 1551 | (struct comedi_devconfig __user *)arg); | 1551 | (struct comedi_devconfig __user *)arg); |
| 1552 | if (rc == 0) | ||
| 1553 | /* Evade comedi_auto_unconfig(). */ | ||
| 1554 | dev_file_info->hardware_device = NULL; | ||
| 1552 | goto done; | 1555 | goto done; |
| 1553 | } | 1556 | } |
| 1554 | 1557 | ||
diff --git a/drivers/staging/comedi/drivers/comedi_test.c b/drivers/staging/comedi/drivers/comedi_test.c index fb3d09323ba1..01de996239f1 100644 --- a/drivers/staging/comedi/drivers/comedi_test.c +++ b/drivers/staging/comedi/drivers/comedi_test.c | |||
| @@ -345,7 +345,7 @@ static int waveform_ai_cancel(struct comedi_device *dev, | |||
| 345 | struct waveform_private *devpriv = dev->private; | 345 | struct waveform_private *devpriv = dev->private; |
| 346 | 346 | ||
| 347 | devpriv->timer_running = 0; | 347 | devpriv->timer_running = 0; |
| 348 | del_timer(&devpriv->timer); | 348 | del_timer_sync(&devpriv->timer); |
| 349 | return 0; | 349 | return 0; |
| 350 | } | 350 | } |
| 351 | 351 | ||
diff --git a/drivers/staging/comedi/drivers/ni_pcimio.c b/drivers/staging/comedi/drivers/ni_pcimio.c index aaac0b2cc9eb..fd1662b4175d 100644 --- a/drivers/staging/comedi/drivers/ni_pcimio.c +++ b/drivers/staging/comedi/drivers/ni_pcimio.c | |||
| @@ -963,7 +963,7 @@ static const struct ni_board_struct ni_boards[] = { | |||
| 963 | .ao_range_table = &range_ni_M_625x_ao, | 963 | .ao_range_table = &range_ni_M_625x_ao, |
| 964 | .reg_type = ni_reg_625x, | 964 | .reg_type = ni_reg_625x, |
| 965 | .ao_unipolar = 0, | 965 | .ao_unipolar = 0, |
| 966 | .ao_speed = 357, | 966 | .ao_speed = 350, |
| 967 | .num_p0_dio_channels = 8, | 967 | .num_p0_dio_channels = 8, |
| 968 | .caldac = {caldac_none}, | 968 | .caldac = {caldac_none}, |
| 969 | .has_8255 = 0, | 969 | .has_8255 = 0, |
| @@ -982,7 +982,7 @@ static const struct ni_board_struct ni_boards[] = { | |||
| 982 | .ao_range_table = &range_ni_M_625x_ao, | 982 | .ao_range_table = &range_ni_M_625x_ao, |
| 983 | .reg_type = ni_reg_625x, | 983 | .reg_type = ni_reg_625x, |
| 984 | .ao_unipolar = 0, | 984 | .ao_unipolar = 0, |
| 985 | .ao_speed = 357, | 985 | .ao_speed = 350, |
| 986 | .num_p0_dio_channels = 8, | 986 | .num_p0_dio_channels = 8, |
| 987 | .caldac = {caldac_none}, | 987 | .caldac = {caldac_none}, |
| 988 | .has_8255 = 0, | 988 | .has_8255 = 0, |
| @@ -1001,7 +1001,7 @@ static const struct ni_board_struct ni_boards[] = { | |||
| 1001 | .ao_range_table = &range_ni_M_625x_ao, | 1001 | .ao_range_table = &range_ni_M_625x_ao, |
| 1002 | .reg_type = ni_reg_625x, | 1002 | .reg_type = ni_reg_625x, |
| 1003 | .ao_unipolar = 0, | 1003 | .ao_unipolar = 0, |
| 1004 | .ao_speed = 357, | 1004 | .ao_speed = 350, |
| 1005 | .num_p0_dio_channels = 8, | 1005 | .num_p0_dio_channels = 8, |
| 1006 | .caldac = {caldac_none}, | 1006 | .caldac = {caldac_none}, |
| 1007 | .has_8255 = 0, | 1007 | .has_8255 = 0, |
| @@ -1037,7 +1037,7 @@ static const struct ni_board_struct ni_boards[] = { | |||
| 1037 | .ao_range_table = &range_ni_M_625x_ao, | 1037 | .ao_range_table = &range_ni_M_625x_ao, |
| 1038 | .reg_type = ni_reg_625x, | 1038 | .reg_type = ni_reg_625x, |
| 1039 | .ao_unipolar = 0, | 1039 | .ao_unipolar = 0, |
| 1040 | .ao_speed = 357, | 1040 | .ao_speed = 350, |
| 1041 | .num_p0_dio_channels = 32, | 1041 | .num_p0_dio_channels = 32, |
| 1042 | .caldac = {caldac_none}, | 1042 | .caldac = {caldac_none}, |
| 1043 | .has_8255 = 0, | 1043 | .has_8255 = 0, |
| @@ -1056,7 +1056,7 @@ static const struct ni_board_struct ni_boards[] = { | |||
| 1056 | .ao_range_table = &range_ni_M_625x_ao, | 1056 | .ao_range_table = &range_ni_M_625x_ao, |
| 1057 | .reg_type = ni_reg_625x, | 1057 | .reg_type = ni_reg_625x, |
| 1058 | .ao_unipolar = 0, | 1058 | .ao_unipolar = 0, |
| 1059 | .ao_speed = 357, | 1059 | .ao_speed = 350, |
| 1060 | .num_p0_dio_channels = 32, | 1060 | .num_p0_dio_channels = 32, |
| 1061 | .caldac = {caldac_none}, | 1061 | .caldac = {caldac_none}, |
| 1062 | .has_8255 = 0, | 1062 | .has_8255 = 0, |
| @@ -1092,7 +1092,7 @@ static const struct ni_board_struct ni_boards[] = { | |||
| 1092 | .ao_range_table = &range_ni_M_628x_ao, | 1092 | .ao_range_table = &range_ni_M_628x_ao, |
| 1093 | .reg_type = ni_reg_628x, | 1093 | .reg_type = ni_reg_628x, |
| 1094 | .ao_unipolar = 1, | 1094 | .ao_unipolar = 1, |
| 1095 | .ao_speed = 357, | 1095 | .ao_speed = 350, |
| 1096 | .num_p0_dio_channels = 8, | 1096 | .num_p0_dio_channels = 8, |
| 1097 | .caldac = {caldac_none}, | 1097 | .caldac = {caldac_none}, |
| 1098 | .has_8255 = 0, | 1098 | .has_8255 = 0, |
| @@ -1111,7 +1111,7 @@ static const struct ni_board_struct ni_boards[] = { | |||
| 1111 | .ao_range_table = &range_ni_M_628x_ao, | 1111 | .ao_range_table = &range_ni_M_628x_ao, |
| 1112 | .reg_type = ni_reg_628x, | 1112 | .reg_type = ni_reg_628x, |
| 1113 | .ao_unipolar = 1, | 1113 | .ao_unipolar = 1, |
| 1114 | .ao_speed = 357, | 1114 | .ao_speed = 350, |
| 1115 | .num_p0_dio_channels = 8, | 1115 | .num_p0_dio_channels = 8, |
| 1116 | .caldac = {caldac_none}, | 1116 | .caldac = {caldac_none}, |
| 1117 | .has_8255 = 0, | 1117 | .has_8255 = 0, |
| @@ -1147,7 +1147,7 @@ static const struct ni_board_struct ni_boards[] = { | |||
| 1147 | .ao_range_table = &range_ni_M_628x_ao, | 1147 | .ao_range_table = &range_ni_M_628x_ao, |
| 1148 | .reg_type = ni_reg_628x, | 1148 | .reg_type = ni_reg_628x, |
| 1149 | .ao_unipolar = 1, | 1149 | .ao_unipolar = 1, |
| 1150 | .ao_speed = 357, | 1150 | .ao_speed = 350, |
| 1151 | .num_p0_dio_channels = 32, | 1151 | .num_p0_dio_channels = 32, |
| 1152 | .caldac = {caldac_none}, | 1152 | .caldac = {caldac_none}, |
| 1153 | .has_8255 = 0, | 1153 | .has_8255 = 0, |
diff --git a/drivers/staging/fwserial/Kconfig b/drivers/staging/fwserial/Kconfig index 580406cb1808..b2f8331e4acf 100644 --- a/drivers/staging/fwserial/Kconfig +++ b/drivers/staging/fwserial/Kconfig | |||
| @@ -3,7 +3,9 @@ config FIREWIRE_SERIAL | |||
| 3 | depends on FIREWIRE | 3 | depends on FIREWIRE |
| 4 | help | 4 | help |
| 5 | This enables TTY over IEEE 1394, providing high-speed serial | 5 | This enables TTY over IEEE 1394, providing high-speed serial |
| 6 | connectivity to cabled peers. | 6 | connectivity to cabled peers. This driver implements a |
| 7 | ad-hoc transport protocol and is currently limited to | ||
| 8 | Linux-to-Linux communication. | ||
| 7 | 9 | ||
| 8 | To compile this driver as a module, say M here: the module will | 10 | To compile this driver as a module, say M here: the module will |
| 9 | be called firewire-serial. | 11 | be called firewire-serial. |
diff --git a/drivers/staging/fwserial/TODO b/drivers/staging/fwserial/TODO index 726900548eae..8dae8fb25223 100644 --- a/drivers/staging/fwserial/TODO +++ b/drivers/staging/fwserial/TODO | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | TODOs | 1 | TODOs prior to this driver moving out of staging |
| 2 | ----- | 2 | ------------------------------------------------ |
| 3 | 1. Implement retries for RCODE_BUSY, RCODE_NO_ACK and RCODE_SEND_ERROR | 3 | 1. Implement retries for RCODE_BUSY, RCODE_NO_ACK and RCODE_SEND_ERROR |
| 4 | - I/O is handled asynchronously which presents some issues when error | 4 | - I/O is handled asynchronously which presents some issues when error |
| 5 | conditions occur. | 5 | conditions occur. |
| @@ -11,17 +11,9 @@ TODOs | |||
| 11 | -- Issues with firewire stack -- | 11 | -- Issues with firewire stack -- |
| 12 | 1. This driver uses the same unregistered vendor id that the firewire core does | 12 | 1. This driver uses the same unregistered vendor id that the firewire core does |
| 13 | (0xd00d1e). Perhaps this could be exposed as a define in | 13 | (0xd00d1e). Perhaps this could be exposed as a define in |
| 14 | firewire-constants.h? | 14 | firewire.h? |
| 15 | 2. MAX_ASYNC_PAYLOAD needs to be publicly exposed by core/ohci | ||
| 16 | - otherwise how will this driver know the max size of address window to | ||
| 17 | open for one packet write? | ||
| 18 | 3. Maybe device_max_receive() and link_speed_to_max_payload() should be | 15 | 3. Maybe device_max_receive() and link_speed_to_max_payload() should be |
| 19 | taken up by the firewire core? | 16 | taken up by the firewire core? |
| 20 | 4. To avoid dropping rx data while still limiting the maximum buffering, | ||
| 21 | the size of the AR context must be known. How to expose this to drivers? | ||
| 22 | 5. Explore if bigger AR context will reduce RCODE_BUSY responses | ||
| 23 | (or auto-grow to certain max size -- but this would require major surgery | ||
| 24 | as the current AR is contiguously mapped) | ||
| 25 | 17 | ||
| 26 | -- Issues with TTY core -- | 18 | -- Issues with TTY core -- |
| 27 | 1. Hack for alternate device name scheme | 19 | 1. Hack for alternate device name scheme |
diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c index 61ee29083b26..d03a7f57e8d4 100644 --- a/drivers/staging/fwserial/fwserial.c +++ b/drivers/staging/fwserial/fwserial.c | |||
| @@ -179,7 +179,7 @@ static void dump_profile(struct seq_file *m, struct stats *stats) | |||
| 179 | /* Returns the max receive packet size for the given card */ | 179 | /* Returns the max receive packet size for the given card */ |
| 180 | static inline int device_max_receive(struct fw_device *fw_device) | 180 | static inline int device_max_receive(struct fw_device *fw_device) |
| 181 | { | 181 | { |
| 182 | return 1 << (clamp_t(int, fw_device->max_rec, 8U, 13U) + 1); | 182 | return 1 << (clamp_t(int, fw_device->max_rec, 8U, 11U) + 1); |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | static void fwtty_log_tx_error(struct fwtty_port *port, int rcode) | 185 | static void fwtty_log_tx_error(struct fwtty_port *port, int rcode) |
diff --git a/drivers/staging/fwserial/fwserial.h b/drivers/staging/fwserial/fwserial.h index 8b572edf9563..caa1c1ea82d5 100644 --- a/drivers/staging/fwserial/fwserial.h +++ b/drivers/staging/fwserial/fwserial.h | |||
| @@ -374,10 +374,10 @@ static inline void fwtty_bind_console(struct fwtty_port *port, | |||
| 374 | */ | 374 | */ |
| 375 | static inline int link_speed_to_max_payload(unsigned speed) | 375 | static inline int link_speed_to_max_payload(unsigned speed) |
| 376 | { | 376 | { |
| 377 | static const int max_async[] = { 307, 614, 1229, 2458, 4916, 9832, }; | 377 | static const int max_async[] = { 307, 614, 1229, 2458, }; |
| 378 | BUILD_BUG_ON(ARRAY_SIZE(max_async) - 1 != SCODE_3200); | 378 | BUILD_BUG_ON(ARRAY_SIZE(max_async) - 1 != SCODE_800); |
| 379 | 379 | ||
| 380 | speed = clamp(speed, (unsigned) SCODE_100, (unsigned) SCODE_3200); | 380 | speed = clamp(speed, (unsigned) SCODE_100, (unsigned) SCODE_800); |
| 381 | if (limit_bw) | 381 | if (limit_bw) |
| 382 | return max_async[speed]; | 382 | return max_async[speed]; |
| 383 | else | 383 | else |
diff --git a/drivers/staging/iio/gyro/Kconfig b/drivers/staging/iio/gyro/Kconfig index ea295b25308c..87979a0d03a9 100644 --- a/drivers/staging/iio/gyro/Kconfig +++ b/drivers/staging/iio/gyro/Kconfig | |||
| @@ -27,8 +27,8 @@ config ADIS16130 | |||
| 27 | config ADIS16260 | 27 | config ADIS16260 |
| 28 | tristate "Analog Devices ADIS16260 Digital Gyroscope Sensor SPI driver" | 28 | tristate "Analog Devices ADIS16260 Digital Gyroscope Sensor SPI driver" |
| 29 | depends on SPI | 29 | depends on SPI |
| 30 | select IIO_TRIGGER if IIO_BUFFER | 30 | select IIO_ADIS_LIB |
| 31 | select IIO_SW_RING if IIO_BUFFER | 31 | select IIO_ADIS_LIB_BUFFER if IIO_BUFFER |
| 32 | help | 32 | help |
| 33 | Say yes here to build support for Analog Devices ADIS16260 ADIS16265 | 33 | Say yes here to build support for Analog Devices ADIS16260 ADIS16265 |
| 34 | ADIS16250 ADIS16255 and ADIS16251 programmable digital gyroscope sensors. | 34 | ADIS16250 ADIS16255 and ADIS16251 programmable digital gyroscope sensors. |
diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index ecf0f44bc70e..cec19f1cf56c 100644 --- a/drivers/staging/imx-drm/imx-drm-core.c +++ b/drivers/staging/imx-drm/imx-drm-core.c | |||
| @@ -584,7 +584,6 @@ int imx_drm_add_encoder(struct drm_encoder *encoder, | |||
| 584 | 584 | ||
| 585 | ret = imx_drm_encoder_register(imx_drm_encoder); | 585 | ret = imx_drm_encoder_register(imx_drm_encoder); |
| 586 | if (ret) { | 586 | if (ret) { |
| 587 | kfree(imx_drm_encoder); | ||
| 588 | ret = -ENOMEM; | 587 | ret = -ENOMEM; |
| 589 | goto err_register; | 588 | goto err_register; |
| 590 | } | 589 | } |
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-common.c b/drivers/staging/imx-drm/ipu-v3/ipu-common.c index 677e665ca86d..f7059cddd7fd 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-common.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-common.c | |||
| @@ -1104,7 +1104,9 @@ static int ipu_probe(struct platform_device *pdev) | |||
| 1104 | if (ret) | 1104 | if (ret) |
| 1105 | goto out_failed_irq; | 1105 | goto out_failed_irq; |
| 1106 | 1106 | ||
| 1107 | ipu_reset(ipu); | 1107 | ret = ipu_reset(ipu); |
| 1108 | if (ret) | ||
| 1109 | goto out_failed_reset; | ||
| 1108 | 1110 | ||
| 1109 | /* Set MCU_T to divide MCU access window into 2 */ | 1111 | /* Set MCU_T to divide MCU access window into 2 */ |
| 1110 | ipu_cm_write(ipu, 0x00400000L | (IPU_MCU_T_DEFAULT << 18), | 1112 | ipu_cm_write(ipu, 0x00400000L | (IPU_MCU_T_DEFAULT << 18), |
| @@ -1129,6 +1131,7 @@ failed_add_clients: | |||
| 1129 | ipu_submodules_exit(ipu); | 1131 | ipu_submodules_exit(ipu); |
| 1130 | failed_submodules_init: | 1132 | failed_submodules_init: |
| 1131 | ipu_irq_exit(ipu); | 1133 | ipu_irq_exit(ipu); |
| 1134 | out_failed_reset: | ||
| 1132 | out_failed_irq: | 1135 | out_failed_irq: |
| 1133 | clk_disable_unprepare(ipu->clk); | 1136 | clk_disable_unprepare(ipu->clk); |
| 1134 | failed_clk_get: | 1137 | failed_clk_get: |
diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c index 1892006526b5..4b3a019409b5 100644 --- a/drivers/staging/imx-drm/ipuv3-crtc.c +++ b/drivers/staging/imx-drm/ipuv3-crtc.c | |||
| @@ -452,7 +452,7 @@ static int ipu_get_resources(struct ipu_crtc *ipu_crtc, | |||
| 452 | int ret; | 452 | int ret; |
| 453 | 453 | ||
| 454 | ipu_crtc->ipu_ch = ipu_idmac_get(ipu, pdata->dma[0]); | 454 | ipu_crtc->ipu_ch = ipu_idmac_get(ipu, pdata->dma[0]); |
| 455 | if (IS_ERR_OR_NULL(ipu_crtc->ipu_ch)) { | 455 | if (IS_ERR(ipu_crtc->ipu_ch)) { |
| 456 | ret = PTR_ERR(ipu_crtc->ipu_ch); | 456 | ret = PTR_ERR(ipu_crtc->ipu_ch); |
| 457 | goto err_out; | 457 | goto err_out; |
| 458 | } | 458 | } |
| @@ -472,7 +472,7 @@ static int ipu_get_resources(struct ipu_crtc *ipu_crtc, | |||
| 472 | if (pdata->dp >= 0) { | 472 | if (pdata->dp >= 0) { |
| 473 | ipu_crtc->dp = ipu_dp_get(ipu, pdata->dp); | 473 | ipu_crtc->dp = ipu_dp_get(ipu, pdata->dp); |
| 474 | if (IS_ERR(ipu_crtc->dp)) { | 474 | if (IS_ERR(ipu_crtc->dp)) { |
| 475 | ret = PTR_ERR(ipu_crtc->ipu_ch); | 475 | ret = PTR_ERR(ipu_crtc->dp); |
| 476 | goto err_out; | 476 | goto err_out; |
| 477 | } | 477 | } |
| 478 | } | 478 | } |
| @@ -548,6 +548,8 @@ static int ipu_drm_probe(struct platform_device *pdev) | |||
| 548 | ipu_crtc->dev = &pdev->dev; | 548 | ipu_crtc->dev = &pdev->dev; |
| 549 | 549 | ||
| 550 | ret = ipu_crtc_init(ipu_crtc, pdata); | 550 | ret = ipu_crtc_init(ipu_crtc, pdata); |
| 551 | if (ret) | ||
| 552 | return ret; | ||
| 551 | 553 | ||
| 552 | platform_set_drvdata(pdev, ipu_crtc); | 554 | platform_set_drvdata(pdev, ipu_crtc); |
| 553 | 555 | ||
diff --git a/drivers/staging/omapdrm/Makefile b/drivers/staging/omapdrm/Makefile index 1ca0e0016de4..d85e058f2845 100644 --- a/drivers/staging/omapdrm/Makefile +++ b/drivers/staging/omapdrm/Makefile | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | ccflags-y := -Iinclude/drm -Werror | 6 | ccflags-y := -Iinclude/drm -Werror |
| 7 | omapdrm-y := omap_drv.o \ | 7 | omapdrm-y := omap_drv.o \ |
| 8 | omap_irq.o \ | ||
| 8 | omap_debugfs.o \ | 9 | omap_debugfs.o \ |
| 9 | omap_crtc.o \ | 10 | omap_crtc.o \ |
| 10 | omap_plane.o \ | 11 | omap_plane.o \ |
diff --git a/drivers/staging/omapdrm/TODO b/drivers/staging/omapdrm/TODO index 938c7888ca31..abeeb00aaa12 100644 --- a/drivers/staging/omapdrm/TODO +++ b/drivers/staging/omapdrm/TODO | |||
| @@ -17,9 +17,6 @@ TODO | |||
| 17 | . Revisit GEM sync object infrastructure.. TTM has some framework for this | 17 | . Revisit GEM sync object infrastructure.. TTM has some framework for this |
| 18 | already. Possibly this could be refactored out and made more common? | 18 | already. Possibly this could be refactored out and made more common? |
| 19 | There should be some way to do this with less wheel-reinvention. | 19 | There should be some way to do this with less wheel-reinvention. |
| 20 | . Review DSS vs KMS mismatches. The omap_dss_device is sort of part encoder, | ||
| 21 | part connector. Which results in a bit of duct tape to fwd calls from | ||
| 22 | encoder to connector. Possibly this could be done a bit better. | ||
| 23 | . Solve PM sequencing on resume. DMM/TILER must be reloaded before any | 20 | . Solve PM sequencing on resume. DMM/TILER must be reloaded before any |
| 24 | access is made from any component in the system. Which means on suspend | 21 | access is made from any component in the system. Which means on suspend |
| 25 | CRTC's should be disabled, and on resume the LUT should be reprogrammed | 22 | CRTC's should be disabled, and on resume the LUT should be reprogrammed |
diff --git a/drivers/staging/omapdrm/omap_connector.c b/drivers/staging/omapdrm/omap_connector.c index 91edb3f96972..4cc9ee733c5f 100644 --- a/drivers/staging/omapdrm/omap_connector.c +++ b/drivers/staging/omapdrm/omap_connector.c | |||
| @@ -31,9 +31,10 @@ | |||
| 31 | struct omap_connector { | 31 | struct omap_connector { |
| 32 | struct drm_connector base; | 32 | struct drm_connector base; |
| 33 | struct omap_dss_device *dssdev; | 33 | struct omap_dss_device *dssdev; |
| 34 | struct drm_encoder *encoder; | ||
| 34 | }; | 35 | }; |
| 35 | 36 | ||
| 36 | static inline void copy_timings_omap_to_drm(struct drm_display_mode *mode, | 37 | void copy_timings_omap_to_drm(struct drm_display_mode *mode, |
| 37 | struct omap_video_timings *timings) | 38 | struct omap_video_timings *timings) |
| 38 | { | 39 | { |
| 39 | mode->clock = timings->pixel_clock; | 40 | mode->clock = timings->pixel_clock; |
| @@ -64,7 +65,7 @@ static inline void copy_timings_omap_to_drm(struct drm_display_mode *mode, | |||
| 64 | mode->flags |= DRM_MODE_FLAG_NVSYNC; | 65 | mode->flags |= DRM_MODE_FLAG_NVSYNC; |
| 65 | } | 66 | } |
| 66 | 67 | ||
| 67 | static inline void copy_timings_drm_to_omap(struct omap_video_timings *timings, | 68 | void copy_timings_drm_to_omap(struct omap_video_timings *timings, |
| 68 | struct drm_display_mode *mode) | 69 | struct drm_display_mode *mode) |
| 69 | { | 70 | { |
| 70 | timings->pixel_clock = mode->clock; | 71 | timings->pixel_clock = mode->clock; |
| @@ -96,48 +97,7 @@ static inline void copy_timings_drm_to_omap(struct omap_video_timings *timings, | |||
| 96 | timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES; | 97 | timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES; |
| 97 | } | 98 | } |
| 98 | 99 | ||
| 99 | static void omap_connector_dpms(struct drm_connector *connector, int mode) | 100 | static enum drm_connector_status omap_connector_detect( |
| 100 | { | ||
| 101 | struct omap_connector *omap_connector = to_omap_connector(connector); | ||
| 102 | struct omap_dss_device *dssdev = omap_connector->dssdev; | ||
| 103 | int old_dpms; | ||
| 104 | |||
| 105 | DBG("%s: %d", dssdev->name, mode); | ||
| 106 | |||
| 107 | old_dpms = connector->dpms; | ||
| 108 | |||
| 109 | /* from off to on, do from crtc to connector */ | ||
| 110 | if (mode < old_dpms) | ||
| 111 | drm_helper_connector_dpms(connector, mode); | ||
| 112 | |||
| 113 | if (mode == DRM_MODE_DPMS_ON) { | ||
| 114 | /* store resume info for suspended displays */ | ||
| 115 | switch (dssdev->state) { | ||
| 116 | case OMAP_DSS_DISPLAY_SUSPENDED: | ||
| 117 | dssdev->activate_after_resume = true; | ||
| 118 | break; | ||
| 119 | case OMAP_DSS_DISPLAY_DISABLED: { | ||
| 120 | int ret = dssdev->driver->enable(dssdev); | ||
| 121 | if (ret) { | ||
| 122 | DBG("%s: failed to enable: %d", | ||
| 123 | dssdev->name, ret); | ||
| 124 | dssdev->driver->disable(dssdev); | ||
| 125 | } | ||
| 126 | break; | ||
| 127 | } | ||
| 128 | default: | ||
| 129 | break; | ||
| 130 | } | ||
| 131 | } else { | ||
| 132 | /* TODO */ | ||
| 133 | } | ||
| 134 | |||
| 135 | /* from on to off, do from connector to crtc */ | ||
| 136 | if (mode > old_dpms) | ||
| 137 | drm_helper_connector_dpms(connector, mode); | ||
| 138 | } | ||
| 139 | |||
| 140 | enum drm_connector_status omap_connector_detect( | ||
| 141 | struct drm_connector *connector, bool force) | 101 | struct drm_connector *connector, bool force) |
| 142 | { | 102 | { |
| 143 | struct omap_connector *omap_connector = to_omap_connector(connector); | 103 | struct omap_connector *omap_connector = to_omap_connector(connector); |
| @@ -164,8 +124,6 @@ static void omap_connector_destroy(struct drm_connector *connector) | |||
| 164 | struct omap_connector *omap_connector = to_omap_connector(connector); | 124 | struct omap_connector *omap_connector = to_omap_connector(connector); |
| 165 | struct omap_dss_device *dssdev = omap_connector->dssdev; | 125 | struct omap_dss_device *dssdev = omap_connector->dssdev; |
| 166 | 126 | ||
| 167 | dssdev->driver->disable(dssdev); | ||
| 168 | |||
| 169 | DBG("%s", omap_connector->dssdev->name); | 127 | DBG("%s", omap_connector->dssdev->name); |
| 170 | drm_sysfs_connector_remove(connector); | 128 | drm_sysfs_connector_remove(connector); |
| 171 | drm_connector_cleanup(connector); | 129 | drm_connector_cleanup(connector); |
| @@ -261,36 +219,12 @@ static int omap_connector_mode_valid(struct drm_connector *connector, | |||
| 261 | struct drm_encoder *omap_connector_attached_encoder( | 219 | struct drm_encoder *omap_connector_attached_encoder( |
| 262 | struct drm_connector *connector) | 220 | struct drm_connector *connector) |
| 263 | { | 221 | { |
| 264 | int i; | ||
| 265 | struct omap_connector *omap_connector = to_omap_connector(connector); | 222 | struct omap_connector *omap_connector = to_omap_connector(connector); |
| 266 | 223 | return omap_connector->encoder; | |
| 267 | for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) { | ||
| 268 | struct drm_mode_object *obj; | ||
| 269 | |||
| 270 | if (connector->encoder_ids[i] == 0) | ||
| 271 | break; | ||
| 272 | |||
| 273 | obj = drm_mode_object_find(connector->dev, | ||
| 274 | connector->encoder_ids[i], | ||
| 275 | DRM_MODE_OBJECT_ENCODER); | ||
| 276 | |||
| 277 | if (obj) { | ||
| 278 | struct drm_encoder *encoder = obj_to_encoder(obj); | ||
| 279 | struct omap_overlay_manager *mgr = | ||
| 280 | omap_encoder_get_manager(encoder); | ||
| 281 | DBG("%s: found %s", omap_connector->dssdev->name, | ||
| 282 | mgr->name); | ||
| 283 | return encoder; | ||
| 284 | } | ||
| 285 | } | ||
| 286 | |||
| 287 | DBG("%s: no encoder", omap_connector->dssdev->name); | ||
| 288 | |||
| 289 | return NULL; | ||
| 290 | } | 224 | } |
| 291 | 225 | ||
| 292 | static const struct drm_connector_funcs omap_connector_funcs = { | 226 | static const struct drm_connector_funcs omap_connector_funcs = { |
| 293 | .dpms = omap_connector_dpms, | 227 | .dpms = drm_helper_connector_dpms, |
| 294 | .detect = omap_connector_detect, | 228 | .detect = omap_connector_detect, |
| 295 | .fill_modes = drm_helper_probe_single_connector_modes, | 229 | .fill_modes = drm_helper_probe_single_connector_modes, |
| 296 | .destroy = omap_connector_destroy, | 230 | .destroy = omap_connector_destroy, |
| @@ -302,34 +236,6 @@ static const struct drm_connector_helper_funcs omap_connector_helper_funcs = { | |||
| 302 | .best_encoder = omap_connector_attached_encoder, | 236 | .best_encoder = omap_connector_attached_encoder, |
| 303 | }; | 237 | }; |
| 304 | 238 | ||
| 305 | /* called from encoder when mode is set, to propagate settings to the dssdev */ | ||
| 306 | void omap_connector_mode_set(struct drm_connector *connector, | ||
| 307 | struct drm_display_mode *mode) | ||
| 308 | { | ||
| 309 | struct drm_device *dev = connector->dev; | ||
| 310 | struct omap_connector *omap_connector = to_omap_connector(connector); | ||
| 311 | struct omap_dss_device *dssdev = omap_connector->dssdev; | ||
| 312 | struct omap_dss_driver *dssdrv = dssdev->driver; | ||
| 313 | struct omap_video_timings timings = {0}; | ||
| 314 | |||
| 315 | copy_timings_drm_to_omap(&timings, mode); | ||
| 316 | |||
| 317 | DBG("%s: set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", | ||
| 318 | omap_connector->dssdev->name, | ||
| 319 | mode->base.id, mode->name, mode->vrefresh, mode->clock, | ||
| 320 | mode->hdisplay, mode->hsync_start, | ||
| 321 | mode->hsync_end, mode->htotal, | ||
| 322 | mode->vdisplay, mode->vsync_start, | ||
| 323 | mode->vsync_end, mode->vtotal, mode->type, mode->flags); | ||
| 324 | |||
| 325 | if (dssdrv->check_timings(dssdev, &timings)) { | ||
| 326 | dev_err(dev->dev, "could not set timings\n"); | ||
| 327 | return; | ||
| 328 | } | ||
| 329 | |||
| 330 | dssdrv->set_timings(dssdev, &timings); | ||
| 331 | } | ||
| 332 | |||
| 333 | /* flush an area of the framebuffer (in case of manual update display that | 239 | /* flush an area of the framebuffer (in case of manual update display that |
| 334 | * is not automatically flushed) | 240 | * is not automatically flushed) |
| 335 | */ | 241 | */ |
| @@ -344,7 +250,8 @@ void omap_connector_flush(struct drm_connector *connector, | |||
| 344 | 250 | ||
| 345 | /* initialize connector */ | 251 | /* initialize connector */ |
| 346 | struct drm_connector *omap_connector_init(struct drm_device *dev, | 252 | struct drm_connector *omap_connector_init(struct drm_device *dev, |
| 347 | int connector_type, struct omap_dss_device *dssdev) | 253 | int connector_type, struct omap_dss_device *dssdev, |
| 254 | struct drm_encoder *encoder) | ||
| 348 | { | 255 | { |
| 349 | struct drm_connector *connector = NULL; | 256 | struct drm_connector *connector = NULL; |
| 350 | struct omap_connector *omap_connector; | 257 | struct omap_connector *omap_connector; |
| @@ -360,6 +267,8 @@ struct drm_connector *omap_connector_init(struct drm_device *dev, | |||
| 360 | } | 267 | } |
| 361 | 268 | ||
| 362 | omap_connector->dssdev = dssdev; | 269 | omap_connector->dssdev = dssdev; |
| 270 | omap_connector->encoder = encoder; | ||
| 271 | |||
| 363 | connector = &omap_connector->base; | 272 | connector = &omap_connector->base; |
| 364 | 273 | ||
| 365 | drm_connector_init(dev, connector, &omap_connector_funcs, | 274 | drm_connector_init(dev, connector, &omap_connector_funcs, |
diff --git a/drivers/staging/omapdrm/omap_crtc.c b/drivers/staging/omapdrm/omap_crtc.c index d87bd84257bd..5c6ed6040eff 100644 --- a/drivers/staging/omapdrm/omap_crtc.c +++ b/drivers/staging/omapdrm/omap_crtc.c | |||
| @@ -28,19 +28,131 @@ | |||
| 28 | struct omap_crtc { | 28 | struct omap_crtc { |
| 29 | struct drm_crtc base; | 29 | struct drm_crtc base; |
| 30 | struct drm_plane *plane; | 30 | struct drm_plane *plane; |
| 31 | |||
| 31 | const char *name; | 32 | const char *name; |
| 32 | int id; | 33 | int pipe; |
| 34 | enum omap_channel channel; | ||
| 35 | struct omap_overlay_manager_info info; | ||
| 36 | |||
| 37 | /* | ||
| 38 | * Temporary: eventually this will go away, but it is needed | ||
| 39 | * for now to keep the output's happy. (They only need | ||
| 40 | * mgr->id.) Eventually this will be replaced w/ something | ||
| 41 | * more common-panel-framework-y | ||
| 42 | */ | ||
| 43 | struct omap_overlay_manager mgr; | ||
| 44 | |||
| 45 | struct omap_video_timings timings; | ||
| 46 | bool enabled; | ||
| 47 | bool full_update; | ||
| 48 | |||
| 49 | struct omap_drm_apply apply; | ||
| 50 | |||
| 51 | struct omap_drm_irq apply_irq; | ||
| 52 | struct omap_drm_irq error_irq; | ||
| 53 | |||
| 54 | /* list of in-progress apply's: */ | ||
| 55 | struct list_head pending_applies; | ||
| 56 | |||
| 57 | /* list of queued apply's: */ | ||
| 58 | struct list_head queued_applies; | ||
| 59 | |||
| 60 | /* for handling queued and in-progress applies: */ | ||
| 61 | struct work_struct apply_work; | ||
| 33 | 62 | ||
| 34 | /* if there is a pending flip, these will be non-null: */ | 63 | /* if there is a pending flip, these will be non-null: */ |
| 35 | struct drm_pending_vblank_event *event; | 64 | struct drm_pending_vblank_event *event; |
| 36 | struct drm_framebuffer *old_fb; | 65 | struct drm_framebuffer *old_fb; |
| 66 | |||
| 67 | /* for handling page flips without caring about what | ||
| 68 | * the callback is called from. Possibly we should just | ||
| 69 | * make omap_gem always call the cb from the worker so | ||
| 70 | * we don't have to care about this.. | ||
| 71 | * | ||
| 72 | * XXX maybe fold into apply_work?? | ||
| 73 | */ | ||
| 74 | struct work_struct page_flip_work; | ||
| 75 | }; | ||
| 76 | |||
| 77 | /* | ||
| 78 | * Manager-ops, callbacks from output when they need to configure | ||
| 79 | * the upstream part of the video pipe. | ||
| 80 | * | ||
| 81 | * Most of these we can ignore until we add support for command-mode | ||
| 82 | * panels.. for video-mode the crtc-helpers already do an adequate | ||
| 83 | * job of sequencing the setup of the video pipe in the proper order | ||
| 84 | */ | ||
| 85 | |||
| 86 | /* we can probably ignore these until we support command-mode panels: */ | ||
| 87 | static void omap_crtc_start_update(struct omap_overlay_manager *mgr) | ||
| 88 | { | ||
| 89 | } | ||
| 90 | |||
| 91 | static int omap_crtc_enable(struct omap_overlay_manager *mgr) | ||
| 92 | { | ||
| 93 | return 0; | ||
| 94 | } | ||
| 95 | |||
| 96 | static void omap_crtc_disable(struct omap_overlay_manager *mgr) | ||
| 97 | { | ||
| 98 | } | ||
| 99 | |||
| 100 | static void omap_crtc_set_timings(struct omap_overlay_manager *mgr, | ||
| 101 | const struct omap_video_timings *timings) | ||
| 102 | { | ||
| 103 | struct omap_crtc *omap_crtc = container_of(mgr, struct omap_crtc, mgr); | ||
| 104 | DBG("%s", omap_crtc->name); | ||
| 105 | omap_crtc->timings = *timings; | ||
| 106 | omap_crtc->full_update = true; | ||
| 107 | } | ||
| 108 | |||
| 109 | static void omap_crtc_set_lcd_config(struct omap_overlay_manager *mgr, | ||
| 110 | const struct dss_lcd_mgr_config *config) | ||
| 111 | { | ||
| 112 | struct omap_crtc *omap_crtc = container_of(mgr, struct omap_crtc, mgr); | ||
| 113 | DBG("%s", omap_crtc->name); | ||
| 114 | dispc_mgr_set_lcd_config(omap_crtc->channel, config); | ||
| 115 | } | ||
| 116 | |||
| 117 | static int omap_crtc_register_framedone_handler( | ||
| 118 | struct omap_overlay_manager *mgr, | ||
| 119 | void (*handler)(void *), void *data) | ||
| 120 | { | ||
| 121 | return 0; | ||
| 122 | } | ||
| 123 | |||
| 124 | static void omap_crtc_unregister_framedone_handler( | ||
| 125 | struct omap_overlay_manager *mgr, | ||
| 126 | void (*handler)(void *), void *data) | ||
| 127 | { | ||
| 128 | } | ||
| 129 | |||
| 130 | static const struct dss_mgr_ops mgr_ops = { | ||
| 131 | .start_update = omap_crtc_start_update, | ||
| 132 | .enable = omap_crtc_enable, | ||
| 133 | .disable = omap_crtc_disable, | ||
| 134 | .set_timings = omap_crtc_set_timings, | ||
| 135 | .set_lcd_config = omap_crtc_set_lcd_config, | ||
| 136 | .register_framedone_handler = omap_crtc_register_framedone_handler, | ||
| 137 | .unregister_framedone_handler = omap_crtc_unregister_framedone_handler, | ||
| 37 | }; | 138 | }; |
| 38 | 139 | ||
| 140 | /* | ||
| 141 | * CRTC funcs: | ||
| 142 | */ | ||
| 143 | |||
| 39 | static void omap_crtc_destroy(struct drm_crtc *crtc) | 144 | static void omap_crtc_destroy(struct drm_crtc *crtc) |
| 40 | { | 145 | { |
| 41 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); | 146 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); |
| 147 | |||
| 148 | DBG("%s", omap_crtc->name); | ||
| 149 | |||
| 150 | WARN_ON(omap_crtc->apply_irq.registered); | ||
| 151 | omap_irq_unregister(crtc->dev, &omap_crtc->error_irq); | ||
| 152 | |||
| 42 | omap_crtc->plane->funcs->destroy(omap_crtc->plane); | 153 | omap_crtc->plane->funcs->destroy(omap_crtc->plane); |
| 43 | drm_crtc_cleanup(crtc); | 154 | drm_crtc_cleanup(crtc); |
| 155 | |||
| 44 | kfree(omap_crtc); | 156 | kfree(omap_crtc); |
| 45 | } | 157 | } |
| 46 | 158 | ||
| @@ -48,14 +160,25 @@ static void omap_crtc_dpms(struct drm_crtc *crtc, int mode) | |||
| 48 | { | 160 | { |
| 49 | struct omap_drm_private *priv = crtc->dev->dev_private; | 161 | struct omap_drm_private *priv = crtc->dev->dev_private; |
| 50 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); | 162 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); |
| 163 | bool enabled = (mode == DRM_MODE_DPMS_ON); | ||
| 51 | int i; | 164 | int i; |
| 52 | 165 | ||
| 53 | WARN_ON(omap_plane_dpms(omap_crtc->plane, mode)); | 166 | DBG("%s: %d", omap_crtc->name, mode); |
| 167 | |||
| 168 | if (enabled != omap_crtc->enabled) { | ||
| 169 | omap_crtc->enabled = enabled; | ||
| 170 | omap_crtc->full_update = true; | ||
| 171 | omap_crtc_apply(crtc, &omap_crtc->apply); | ||
| 54 | 172 | ||
| 55 | for (i = 0; i < priv->num_planes; i++) { | 173 | /* also enable our private plane: */ |
| 56 | struct drm_plane *plane = priv->planes[i]; | 174 | WARN_ON(omap_plane_dpms(omap_crtc->plane, mode)); |
| 57 | if (plane->crtc == crtc) | 175 | |
| 58 | WARN_ON(omap_plane_dpms(plane, mode)); | 176 | /* and any attached overlay planes: */ |
| 177 | for (i = 0; i < priv->num_planes; i++) { | ||
| 178 | struct drm_plane *plane = priv->planes[i]; | ||
| 179 | if (plane->crtc == crtc) | ||
| 180 | WARN_ON(omap_plane_dpms(plane, mode)); | ||
| 181 | } | ||
| 59 | } | 182 | } |
| 60 | } | 183 | } |
| 61 | 184 | ||
| @@ -73,12 +196,26 @@ static int omap_crtc_mode_set(struct drm_crtc *crtc, | |||
| 73 | struct drm_framebuffer *old_fb) | 196 | struct drm_framebuffer *old_fb) |
| 74 | { | 197 | { |
| 75 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); | 198 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); |
| 76 | struct drm_plane *plane = omap_crtc->plane; | ||
| 77 | 199 | ||
| 78 | return omap_plane_mode_set(plane, crtc, crtc->fb, | 200 | mode = adjusted_mode; |
| 201 | |||
| 202 | DBG("%s: set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", | ||
| 203 | omap_crtc->name, mode->base.id, mode->name, | ||
| 204 | mode->vrefresh, mode->clock, | ||
| 205 | mode->hdisplay, mode->hsync_start, | ||
| 206 | mode->hsync_end, mode->htotal, | ||
| 207 | mode->vdisplay, mode->vsync_start, | ||
| 208 | mode->vsync_end, mode->vtotal, | ||
| 209 | mode->type, mode->flags); | ||
| 210 | |||
| 211 | copy_timings_drm_to_omap(&omap_crtc->timings, mode); | ||
| 212 | omap_crtc->full_update = true; | ||
| 213 | |||
| 214 | return omap_plane_mode_set(omap_crtc->plane, crtc, crtc->fb, | ||
| 79 | 0, 0, mode->hdisplay, mode->vdisplay, | 215 | 0, 0, mode->hdisplay, mode->vdisplay, |
| 80 | x << 16, y << 16, | 216 | x << 16, y << 16, |
| 81 | mode->hdisplay << 16, mode->vdisplay << 16); | 217 | mode->hdisplay << 16, mode->vdisplay << 16, |
| 218 | NULL, NULL); | ||
| 82 | } | 219 | } |
| 83 | 220 | ||
| 84 | static void omap_crtc_prepare(struct drm_crtc *crtc) | 221 | static void omap_crtc_prepare(struct drm_crtc *crtc) |
| @@ -102,10 +239,11 @@ static int omap_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, | |||
| 102 | struct drm_plane *plane = omap_crtc->plane; | 239 | struct drm_plane *plane = omap_crtc->plane; |
| 103 | struct drm_display_mode *mode = &crtc->mode; | 240 | struct drm_display_mode *mode = &crtc->mode; |
| 104 | 241 | ||
| 105 | return plane->funcs->update_plane(plane, crtc, crtc->fb, | 242 | return omap_plane_mode_set(plane, crtc, crtc->fb, |
| 106 | 0, 0, mode->hdisplay, mode->vdisplay, | 243 | 0, 0, mode->hdisplay, mode->vdisplay, |
| 107 | x << 16, y << 16, | 244 | x << 16, y << 16, |
| 108 | mode->hdisplay << 16, mode->vdisplay << 16); | 245 | mode->hdisplay << 16, mode->vdisplay << 16, |
| 246 | NULL, NULL); | ||
| 109 | } | 247 | } |
| 110 | 248 | ||
| 111 | static void omap_crtc_load_lut(struct drm_crtc *crtc) | 249 | static void omap_crtc_load_lut(struct drm_crtc *crtc) |
| @@ -114,63 +252,54 @@ static void omap_crtc_load_lut(struct drm_crtc *crtc) | |||
| 114 | 252 | ||
| 115 | static void vblank_cb(void *arg) | 253 | static void vblank_cb(void *arg) |
| 116 | { | 254 | { |
| 117 | static uint32_t sequence; | ||
| 118 | struct drm_crtc *crtc = arg; | 255 | struct drm_crtc *crtc = arg; |
| 119 | struct drm_device *dev = crtc->dev; | 256 | struct drm_device *dev = crtc->dev; |
| 120 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); | 257 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); |
| 121 | struct drm_pending_vblank_event *event = omap_crtc->event; | ||
| 122 | unsigned long flags; | 258 | unsigned long flags; |
| 123 | struct timeval now; | ||
| 124 | 259 | ||
| 125 | WARN_ON(!event); | 260 | spin_lock_irqsave(&dev->event_lock, flags); |
| 261 | |||
| 262 | /* wakeup userspace */ | ||
| 263 | if (omap_crtc->event) | ||
| 264 | drm_send_vblank_event(dev, omap_crtc->pipe, omap_crtc->event); | ||
| 126 | 265 | ||
| 127 | omap_crtc->event = NULL; | 266 | omap_crtc->event = NULL; |
| 267 | omap_crtc->old_fb = NULL; | ||
| 128 | 268 | ||
| 129 | /* wakeup userspace */ | 269 | spin_unlock_irqrestore(&dev->event_lock, flags); |
| 130 | if (event) { | ||
| 131 | do_gettimeofday(&now); | ||
| 132 | |||
| 133 | spin_lock_irqsave(&dev->event_lock, flags); | ||
| 134 | /* TODO: we can't yet use the vblank time accounting, | ||
| 135 | * because omapdss lower layer is the one that knows | ||
| 136 | * the irq # and registers the handler, which more or | ||
| 137 | * less defeats how drm_irq works.. for now just fake | ||
| 138 | * the sequence number and use gettimeofday.. | ||
| 139 | * | ||
| 140 | event->event.sequence = drm_vblank_count_and_time( | ||
| 141 | dev, omap_crtc->id, &now); | ||
| 142 | */ | ||
| 143 | event->event.sequence = sequence++; | ||
| 144 | event->event.tv_sec = now.tv_sec; | ||
| 145 | event->event.tv_usec = now.tv_usec; | ||
| 146 | list_add_tail(&event->base.link, | ||
| 147 | &event->base.file_priv->event_list); | ||
| 148 | wake_up_interruptible(&event->base.file_priv->event_wait); | ||
| 149 | spin_unlock_irqrestore(&dev->event_lock, flags); | ||
| 150 | } | ||
| 151 | } | 270 | } |
| 152 | 271 | ||
| 153 | static void page_flip_cb(void *arg) | 272 | static void page_flip_worker(struct work_struct *work) |
| 154 | { | 273 | { |
| 155 | struct drm_crtc *crtc = arg; | 274 | struct omap_crtc *omap_crtc = |
| 156 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); | 275 | container_of(work, struct omap_crtc, page_flip_work); |
| 157 | struct drm_framebuffer *old_fb = omap_crtc->old_fb; | 276 | struct drm_crtc *crtc = &omap_crtc->base; |
| 277 | struct drm_device *dev = crtc->dev; | ||
| 278 | struct drm_display_mode *mode = &crtc->mode; | ||
| 158 | struct drm_gem_object *bo; | 279 | struct drm_gem_object *bo; |
| 159 | 280 | ||
| 160 | omap_crtc->old_fb = NULL; | 281 | mutex_lock(&dev->mode_config.mutex); |
| 161 | 282 | omap_plane_mode_set(omap_crtc->plane, crtc, crtc->fb, | |
| 162 | omap_crtc_mode_set_base(crtc, crtc->x, crtc->y, old_fb); | 283 | 0, 0, mode->hdisplay, mode->vdisplay, |
| 163 | 284 | crtc->x << 16, crtc->y << 16, | |
| 164 | /* really we'd like to setup the callback atomically w/ setting the | 285 | mode->hdisplay << 16, mode->vdisplay << 16, |
| 165 | * new scanout buffer to avoid getting stuck waiting an extra vblank | 286 | vblank_cb, crtc); |
| 166 | * cycle.. for now go for correctness and later figure out speed.. | 287 | mutex_unlock(&dev->mode_config.mutex); |
| 167 | */ | ||
| 168 | omap_plane_on_endwin(omap_crtc->plane, vblank_cb, crtc); | ||
| 169 | 288 | ||
| 170 | bo = omap_framebuffer_bo(crtc->fb, 0); | 289 | bo = omap_framebuffer_bo(crtc->fb, 0); |
| 171 | drm_gem_object_unreference_unlocked(bo); | 290 | drm_gem_object_unreference_unlocked(bo); |
| 172 | } | 291 | } |
| 173 | 292 | ||
| 293 | static void page_flip_cb(void *arg) | ||
| 294 | { | ||
| 295 | struct drm_crtc *crtc = arg; | ||
| 296 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); | ||
| 297 | struct omap_drm_private *priv = crtc->dev->dev_private; | ||
| 298 | |||
| 299 | /* avoid assumptions about what ctxt we are called from: */ | ||
| 300 | queue_work(priv->wq, &omap_crtc->page_flip_work); | ||
| 301 | } | ||
| 302 | |||
| 174 | static int omap_crtc_page_flip_locked(struct drm_crtc *crtc, | 303 | static int omap_crtc_page_flip_locked(struct drm_crtc *crtc, |
| 175 | struct drm_framebuffer *fb, | 304 | struct drm_framebuffer *fb, |
| 176 | struct drm_pending_vblank_event *event) | 305 | struct drm_pending_vblank_event *event) |
| @@ -179,14 +308,14 @@ static int omap_crtc_page_flip_locked(struct drm_crtc *crtc, | |||
| 179 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); | 308 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); |
| 180 | struct drm_gem_object *bo; | 309 | struct drm_gem_object *bo; |
| 181 | 310 | ||
| 182 | DBG("%d -> %d", crtc->fb ? crtc->fb->base.id : -1, fb->base.id); | 311 | DBG("%d -> %d (event=%p)", crtc->fb ? crtc->fb->base.id : -1, |
| 312 | fb->base.id, event); | ||
| 183 | 313 | ||
| 184 | if (omap_crtc->event) { | 314 | if (omap_crtc->old_fb) { |
| 185 | dev_err(dev->dev, "already a pending flip\n"); | 315 | dev_err(dev->dev, "already a pending flip\n"); |
| 186 | return -EINVAL; | 316 | return -EINVAL; |
| 187 | } | 317 | } |
| 188 | 318 | ||
| 189 | omap_crtc->old_fb = crtc->fb; | ||
| 190 | omap_crtc->event = event; | 319 | omap_crtc->event = event; |
| 191 | crtc->fb = fb; | 320 | crtc->fb = fb; |
| 192 | 321 | ||
| @@ -234,14 +363,244 @@ static const struct drm_crtc_helper_funcs omap_crtc_helper_funcs = { | |||
| 234 | .load_lut = omap_crtc_load_lut, | 363 | .load_lut = omap_crtc_load_lut, |
| 235 | }; | 364 | }; |
| 236 | 365 | ||
| 366 | const struct omap_video_timings *omap_crtc_timings(struct drm_crtc *crtc) | ||
| 367 | { | ||
| 368 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); | ||
| 369 | return &omap_crtc->timings; | ||
| 370 | } | ||
| 371 | |||
| 372 | enum omap_channel omap_crtc_channel(struct drm_crtc *crtc) | ||
| 373 | { | ||
| 374 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); | ||
| 375 | return omap_crtc->channel; | ||
| 376 | } | ||
| 377 | |||
| 378 | static void omap_crtc_error_irq(struct omap_drm_irq *irq, uint32_t irqstatus) | ||
| 379 | { | ||
| 380 | struct omap_crtc *omap_crtc = | ||
| 381 | container_of(irq, struct omap_crtc, error_irq); | ||
| 382 | struct drm_crtc *crtc = &omap_crtc->base; | ||
| 383 | DRM_ERROR("%s: errors: %08x\n", omap_crtc->name, irqstatus); | ||
| 384 | /* avoid getting in a flood, unregister the irq until next vblank */ | ||
| 385 | omap_irq_unregister(crtc->dev, &omap_crtc->error_irq); | ||
| 386 | } | ||
| 387 | |||
| 388 | static void omap_crtc_apply_irq(struct omap_drm_irq *irq, uint32_t irqstatus) | ||
| 389 | { | ||
| 390 | struct omap_crtc *omap_crtc = | ||
| 391 | container_of(irq, struct omap_crtc, apply_irq); | ||
| 392 | struct drm_crtc *crtc = &omap_crtc->base; | ||
| 393 | |||
| 394 | if (!omap_crtc->error_irq.registered) | ||
| 395 | omap_irq_register(crtc->dev, &omap_crtc->error_irq); | ||
| 396 | |||
| 397 | if (!dispc_mgr_go_busy(omap_crtc->channel)) { | ||
| 398 | struct omap_drm_private *priv = | ||
| 399 | crtc->dev->dev_private; | ||
| 400 | DBG("%s: apply done", omap_crtc->name); | ||
| 401 | omap_irq_unregister(crtc->dev, &omap_crtc->apply_irq); | ||
| 402 | queue_work(priv->wq, &omap_crtc->apply_work); | ||
| 403 | } | ||
| 404 | } | ||
| 405 | |||
| 406 | static void apply_worker(struct work_struct *work) | ||
| 407 | { | ||
| 408 | struct omap_crtc *omap_crtc = | ||
| 409 | container_of(work, struct omap_crtc, apply_work); | ||
| 410 | struct drm_crtc *crtc = &omap_crtc->base; | ||
| 411 | struct drm_device *dev = crtc->dev; | ||
| 412 | struct omap_drm_apply *apply, *n; | ||
| 413 | bool need_apply; | ||
| 414 | |||
| 415 | /* | ||
| 416 | * Synchronize everything on mode_config.mutex, to keep | ||
| 417 | * the callbacks and list modification all serialized | ||
| 418 | * with respect to modesetting ioctls from userspace. | ||
| 419 | */ | ||
| 420 | mutex_lock(&dev->mode_config.mutex); | ||
| 421 | dispc_runtime_get(); | ||
| 422 | |||
| 423 | /* | ||
| 424 | * If we are still pending a previous update, wait.. when the | ||
| 425 | * pending update completes, we get kicked again. | ||
| 426 | */ | ||
| 427 | if (omap_crtc->apply_irq.registered) | ||
| 428 | goto out; | ||
| 429 | |||
| 430 | /* finish up previous apply's: */ | ||
| 431 | list_for_each_entry_safe(apply, n, | ||
| 432 | &omap_crtc->pending_applies, pending_node) { | ||
| 433 | apply->post_apply(apply); | ||
| 434 | list_del(&apply->pending_node); | ||
| 435 | } | ||
| 436 | |||
| 437 | need_apply = !list_empty(&omap_crtc->queued_applies); | ||
| 438 | |||
| 439 | /* then handle the next round of of queued apply's: */ | ||
| 440 | list_for_each_entry_safe(apply, n, | ||
| 441 | &omap_crtc->queued_applies, queued_node) { | ||
| 442 | apply->pre_apply(apply); | ||
| 443 | list_del(&apply->queued_node); | ||
| 444 | apply->queued = false; | ||
| 445 | list_add_tail(&apply->pending_node, | ||
| 446 | &omap_crtc->pending_applies); | ||
| 447 | } | ||
| 448 | |||
| 449 | if (need_apply) { | ||
| 450 | enum omap_channel channel = omap_crtc->channel; | ||
| 451 | |||
| 452 | DBG("%s: GO", omap_crtc->name); | ||
| 453 | |||
| 454 | if (dispc_mgr_is_enabled(channel)) { | ||
| 455 | omap_irq_register(dev, &omap_crtc->apply_irq); | ||
| 456 | dispc_mgr_go(channel); | ||
| 457 | } else { | ||
| 458 | struct omap_drm_private *priv = dev->dev_private; | ||
| 459 | queue_work(priv->wq, &omap_crtc->apply_work); | ||
| 460 | } | ||
| 461 | } | ||
| 462 | |||
| 463 | out: | ||
| 464 | dispc_runtime_put(); | ||
| 465 | mutex_unlock(&dev->mode_config.mutex); | ||
| 466 | } | ||
| 467 | |||
| 468 | int omap_crtc_apply(struct drm_crtc *crtc, | ||
| 469 | struct omap_drm_apply *apply) | ||
| 470 | { | ||
| 471 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); | ||
| 472 | struct drm_device *dev = crtc->dev; | ||
| 473 | |||
| 474 | WARN_ON(!mutex_is_locked(&dev->mode_config.mutex)); | ||
| 475 | |||
| 476 | /* no need to queue it again if it is already queued: */ | ||
| 477 | if (apply->queued) | ||
| 478 | return 0; | ||
| 479 | |||
| 480 | apply->queued = true; | ||
| 481 | list_add_tail(&apply->queued_node, &omap_crtc->queued_applies); | ||
| 482 | |||
| 483 | /* | ||
| 484 | * If there are no currently pending updates, then go ahead and | ||
| 485 | * kick the worker immediately, otherwise it will run again when | ||
| 486 | * the current update finishes. | ||
| 487 | */ | ||
| 488 | if (list_empty(&omap_crtc->pending_applies)) { | ||
| 489 | struct omap_drm_private *priv = crtc->dev->dev_private; | ||
| 490 | queue_work(priv->wq, &omap_crtc->apply_work); | ||
| 491 | } | ||
| 492 | |||
| 493 | return 0; | ||
| 494 | } | ||
| 495 | |||
| 496 | /* called only from apply */ | ||
| 497 | static void set_enabled(struct drm_crtc *crtc, bool enable) | ||
| 498 | { | ||
| 499 | struct drm_device *dev = crtc->dev; | ||
| 500 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); | ||
| 501 | enum omap_channel channel = omap_crtc->channel; | ||
| 502 | struct omap_irq_wait *wait = NULL; | ||
| 503 | |||
| 504 | if (dispc_mgr_is_enabled(channel) == enable) | ||
| 505 | return; | ||
| 506 | |||
| 507 | /* ignore sync-lost irqs during enable/disable */ | ||
| 508 | omap_irq_unregister(crtc->dev, &omap_crtc->error_irq); | ||
| 509 | |||
| 510 | if (dispc_mgr_get_framedone_irq(channel)) { | ||
| 511 | if (!enable) { | ||
| 512 | wait = omap_irq_wait_init(dev, | ||
| 513 | dispc_mgr_get_framedone_irq(channel), 1); | ||
| 514 | } | ||
| 515 | } else { | ||
| 516 | /* | ||
| 517 | * When we disable digit output, we need to wait until fields | ||
| 518 | * are done. Otherwise the DSS is still working, and turning | ||
| 519 | * off the clocks prevents DSS from going to OFF mode. And when | ||
| 520 | * enabling, we need to wait for the extra sync losts | ||
| 521 | */ | ||
| 522 | wait = omap_irq_wait_init(dev, | ||
| 523 | dispc_mgr_get_vsync_irq(channel), 2); | ||
| 524 | } | ||
| 525 | |||
| 526 | dispc_mgr_enable(channel, enable); | ||
| 527 | |||
| 528 | if (wait) { | ||
| 529 | int ret = omap_irq_wait(dev, wait, msecs_to_jiffies(100)); | ||
| 530 | if (ret) { | ||
| 531 | dev_err(dev->dev, "%s: timeout waiting for %s\n", | ||
| 532 | omap_crtc->name, enable ? "enable" : "disable"); | ||
| 533 | } | ||
| 534 | } | ||
| 535 | |||
| 536 | omap_irq_register(crtc->dev, &omap_crtc->error_irq); | ||
| 537 | } | ||
| 538 | |||
| 539 | static void omap_crtc_pre_apply(struct omap_drm_apply *apply) | ||
| 540 | { | ||
| 541 | struct omap_crtc *omap_crtc = | ||
| 542 | container_of(apply, struct omap_crtc, apply); | ||
| 543 | struct drm_crtc *crtc = &omap_crtc->base; | ||
| 544 | struct drm_encoder *encoder = NULL; | ||
| 545 | |||
| 546 | DBG("%s: enabled=%d, full=%d", omap_crtc->name, | ||
| 547 | omap_crtc->enabled, omap_crtc->full_update); | ||
| 548 | |||
| 549 | if (omap_crtc->full_update) { | ||
| 550 | struct omap_drm_private *priv = crtc->dev->dev_private; | ||
| 551 | int i; | ||
| 552 | for (i = 0; i < priv->num_encoders; i++) { | ||
| 553 | if (priv->encoders[i]->crtc == crtc) { | ||
| 554 | encoder = priv->encoders[i]; | ||
| 555 | break; | ||
| 556 | } | ||
| 557 | } | ||
| 558 | } | ||
| 559 | |||
| 560 | if (!omap_crtc->enabled) { | ||
| 561 | set_enabled(&omap_crtc->base, false); | ||
| 562 | if (encoder) | ||
| 563 | omap_encoder_set_enabled(encoder, false); | ||
| 564 | } else { | ||
| 565 | if (encoder) { | ||
| 566 | omap_encoder_set_enabled(encoder, false); | ||
| 567 | omap_encoder_update(encoder, &omap_crtc->mgr, | ||
| 568 | &omap_crtc->timings); | ||
| 569 | omap_encoder_set_enabled(encoder, true); | ||
| 570 | omap_crtc->full_update = false; | ||
| 571 | } | ||
| 572 | |||
| 573 | dispc_mgr_setup(omap_crtc->channel, &omap_crtc->info); | ||
| 574 | dispc_mgr_set_timings(omap_crtc->channel, | ||
| 575 | &omap_crtc->timings); | ||
| 576 | set_enabled(&omap_crtc->base, true); | ||
| 577 | } | ||
| 578 | |||
| 579 | omap_crtc->full_update = false; | ||
| 580 | } | ||
| 581 | |||
| 582 | static void omap_crtc_post_apply(struct omap_drm_apply *apply) | ||
| 583 | { | ||
| 584 | /* nothing needed for post-apply */ | ||
| 585 | } | ||
| 586 | |||
| 587 | static const char *channel_names[] = { | ||
| 588 | [OMAP_DSS_CHANNEL_LCD] = "lcd", | ||
| 589 | [OMAP_DSS_CHANNEL_DIGIT] = "tv", | ||
| 590 | [OMAP_DSS_CHANNEL_LCD2] = "lcd2", | ||
| 591 | }; | ||
| 592 | |||
| 237 | /* initialize crtc */ | 593 | /* initialize crtc */ |
| 238 | struct drm_crtc *omap_crtc_init(struct drm_device *dev, | 594 | struct drm_crtc *omap_crtc_init(struct drm_device *dev, |
| 239 | struct omap_overlay *ovl, int id) | 595 | struct drm_plane *plane, enum omap_channel channel, int id) |
| 240 | { | 596 | { |
| 241 | struct drm_crtc *crtc = NULL; | 597 | struct drm_crtc *crtc = NULL; |
| 242 | struct omap_crtc *omap_crtc = kzalloc(sizeof(*omap_crtc), GFP_KERNEL); | 598 | struct omap_crtc *omap_crtc; |
| 599 | struct omap_overlay_manager_info *info; | ||
| 600 | |||
| 601 | DBG("%s", channel_names[channel]); | ||
| 243 | 602 | ||
| 244 | DBG("%s", ovl->name); | 603 | omap_crtc = kzalloc(sizeof(*omap_crtc), GFP_KERNEL); |
| 245 | 604 | ||
| 246 | if (!omap_crtc) { | 605 | if (!omap_crtc) { |
| 247 | dev_err(dev->dev, "could not allocate CRTC\n"); | 606 | dev_err(dev->dev, "could not allocate CRTC\n"); |
| @@ -250,10 +609,40 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev, | |||
| 250 | 609 | ||
| 251 | crtc = &omap_crtc->base; | 610 | crtc = &omap_crtc->base; |
| 252 | 611 | ||
| 253 | omap_crtc->plane = omap_plane_init(dev, ovl, (1 << id), true); | 612 | INIT_WORK(&omap_crtc->page_flip_work, page_flip_worker); |
| 613 | INIT_WORK(&omap_crtc->apply_work, apply_worker); | ||
| 614 | |||
| 615 | INIT_LIST_HEAD(&omap_crtc->pending_applies); | ||
| 616 | INIT_LIST_HEAD(&omap_crtc->queued_applies); | ||
| 617 | |||
| 618 | omap_crtc->apply.pre_apply = omap_crtc_pre_apply; | ||
| 619 | omap_crtc->apply.post_apply = omap_crtc_post_apply; | ||
| 620 | |||
| 621 | omap_crtc->apply_irq.irqmask = pipe2vbl(id); | ||
| 622 | omap_crtc->apply_irq.irq = omap_crtc_apply_irq; | ||
| 623 | |||
| 624 | omap_crtc->error_irq.irqmask = | ||
| 625 | dispc_mgr_get_sync_lost_irq(channel); | ||
| 626 | omap_crtc->error_irq.irq = omap_crtc_error_irq; | ||
| 627 | omap_irq_register(dev, &omap_crtc->error_irq); | ||
| 628 | |||
| 629 | omap_crtc->channel = channel; | ||
| 630 | omap_crtc->plane = plane; | ||
| 254 | omap_crtc->plane->crtc = crtc; | 631 | omap_crtc->plane->crtc = crtc; |
| 255 | omap_crtc->name = ovl->name; | 632 | omap_crtc->name = channel_names[channel]; |
| 256 | omap_crtc->id = id; | 633 | omap_crtc->pipe = id; |
| 634 | |||
| 635 | /* temporary: */ | ||
| 636 | omap_crtc->mgr.id = channel; | ||
| 637 | |||
| 638 | dss_install_mgr_ops(&mgr_ops); | ||
| 639 | |||
| 640 | /* TODO: fix hard-coded setup.. add properties! */ | ||
| 641 | info = &omap_crtc->info; | ||
| 642 | info->default_color = 0x00000000; | ||
| 643 | info->trans_key = 0x00000000; | ||
| 644 | info->trans_key_type = OMAP_DSS_COLOR_KEY_GFX_DST; | ||
| 645 | info->trans_enabled = false; | ||
| 257 | 646 | ||
| 258 | drm_crtc_init(dev, crtc, &omap_crtc_funcs); | 647 | drm_crtc_init(dev, crtc, &omap_crtc_funcs); |
| 259 | drm_crtc_helper_add(crtc, &omap_crtc_helper_funcs); | 648 | drm_crtc_helper_add(crtc, &omap_crtc_helper_funcs); |
diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c index 84943e5ba1d6..ae5ecc2efbc7 100644 --- a/drivers/staging/omapdrm/omap_drv.c +++ b/drivers/staging/omapdrm/omap_drv.c | |||
| @@ -74,320 +74,99 @@ static int get_connector_type(struct omap_dss_device *dssdev) | |||
| 74 | } | 74 | } |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | #if 0 /* enable when dss2 supports hotplug */ | 77 | static int omap_modeset_init(struct drm_device *dev) |
| 78 | static int omap_drm_notifier(struct notifier_block *nb, | ||
| 79 | unsigned long evt, void *arg) | ||
| 80 | { | ||
| 81 | switch (evt) { | ||
| 82 | case OMAP_DSS_SIZE_CHANGE: | ||
| 83 | case OMAP_DSS_HOTPLUG_CONNECT: | ||
| 84 | case OMAP_DSS_HOTPLUG_DISCONNECT: { | ||
| 85 | struct drm_device *dev = drm_device; | ||
| 86 | DBG("hotplug event: evt=%d, dev=%p", evt, dev); | ||
| 87 | if (dev) | ||
| 88 | drm_sysfs_hotplug_event(dev); | ||
| 89 | |||
| 90 | return NOTIFY_OK; | ||
| 91 | } | ||
| 92 | default: /* don't care about other events for now */ | ||
| 93 | return NOTIFY_DONE; | ||
| 94 | } | ||
| 95 | } | ||
| 96 | #endif | ||
| 97 | |||
| 98 | static void dump_video_chains(void) | ||
| 99 | { | ||
| 100 | int i; | ||
| 101 | |||
| 102 | DBG("dumping video chains: "); | ||
| 103 | for (i = 0; i < omap_dss_get_num_overlays(); i++) { | ||
| 104 | struct omap_overlay *ovl = omap_dss_get_overlay(i); | ||
| 105 | struct omap_overlay_manager *mgr = ovl->manager; | ||
| 106 | struct omap_dss_device *dssdev = mgr ? | ||
| 107 | mgr->get_device(mgr) : NULL; | ||
| 108 | if (dssdev) { | ||
| 109 | DBG("%d: %s -> %s -> %s", i, ovl->name, mgr->name, | ||
| 110 | dssdev->name); | ||
| 111 | } else if (mgr) { | ||
| 112 | DBG("%d: %s -> %s", i, ovl->name, mgr->name); | ||
| 113 | } else { | ||
| 114 | DBG("%d: %s", i, ovl->name); | ||
| 115 | } | ||
| 116 | } | ||
| 117 | } | ||
| 118 | |||
| 119 | /* create encoders for each manager */ | ||
| 120 | static int create_encoder(struct drm_device *dev, | ||
| 121 | struct omap_overlay_manager *mgr) | ||
| 122 | { | ||
| 123 | struct omap_drm_private *priv = dev->dev_private; | ||
| 124 | struct drm_encoder *encoder = omap_encoder_init(dev, mgr); | ||
| 125 | |||
| 126 | if (!encoder) { | ||
| 127 | dev_err(dev->dev, "could not create encoder: %s\n", | ||
| 128 | mgr->name); | ||
| 129 | return -ENOMEM; | ||
| 130 | } | ||
| 131 | |||
| 132 | BUG_ON(priv->num_encoders >= ARRAY_SIZE(priv->encoders)); | ||
| 133 | |||
| 134 | priv->encoders[priv->num_encoders++] = encoder; | ||
| 135 | |||
| 136 | return 0; | ||
| 137 | } | ||
| 138 | |||
| 139 | /* create connectors for each display device */ | ||
| 140 | static int create_connector(struct drm_device *dev, | ||
| 141 | struct omap_dss_device *dssdev) | ||
| 142 | { | 78 | { |
| 143 | struct omap_drm_private *priv = dev->dev_private; | 79 | struct omap_drm_private *priv = dev->dev_private; |
| 144 | static struct notifier_block *notifier; | 80 | struct omap_dss_device *dssdev = NULL; |
| 145 | struct drm_connector *connector; | 81 | int num_ovls = dss_feat_get_num_ovls(); |
| 146 | int j; | 82 | int id; |
| 147 | |||
| 148 | if (!dssdev->driver) { | ||
| 149 | dev_warn(dev->dev, "%s has no driver.. skipping it\n", | ||
| 150 | dssdev->name); | ||
| 151 | return 0; | ||
| 152 | } | ||
| 153 | 83 | ||
| 154 | if (!(dssdev->driver->get_timings || | 84 | drm_mode_config_init(dev); |
| 155 | dssdev->driver->read_edid)) { | ||
| 156 | dev_warn(dev->dev, "%s driver does not support " | ||
| 157 | "get_timings or read_edid.. skipping it!\n", | ||
| 158 | dssdev->name); | ||
| 159 | return 0; | ||
| 160 | } | ||
| 161 | 85 | ||
| 162 | connector = omap_connector_init(dev, | 86 | omap_drm_irq_install(dev); |
| 163 | get_connector_type(dssdev), dssdev); | ||
| 164 | 87 | ||
| 165 | if (!connector) { | 88 | /* |
| 166 | dev_err(dev->dev, "could not create connector: %s\n", | 89 | * Create private planes and CRTCs for the last NUM_CRTCs overlay |
| 167 | dssdev->name); | 90 | * plus manager: |
| 168 | return -ENOMEM; | 91 | */ |
| 169 | } | 92 | for (id = 0; id < min(num_crtc, num_ovls); id++) { |
| 170 | 93 | struct drm_plane *plane; | |
| 171 | BUG_ON(priv->num_connectors >= ARRAY_SIZE(priv->connectors)); | 94 | struct drm_crtc *crtc; |
| 172 | 95 | ||
| 173 | priv->connectors[priv->num_connectors++] = connector; | 96 | plane = omap_plane_init(dev, id, true); |
| 97 | crtc = omap_crtc_init(dev, plane, pipe2chan(id), id); | ||
| 174 | 98 | ||
| 175 | #if 0 /* enable when dss2 supports hotplug */ | 99 | BUG_ON(priv->num_crtcs >= ARRAY_SIZE(priv->crtcs)); |
| 176 | notifier = kzalloc(sizeof(struct notifier_block), GFP_KERNEL); | 100 | priv->crtcs[id] = crtc; |
| 177 | notifier->notifier_call = omap_drm_notifier; | 101 | priv->num_crtcs++; |
| 178 | omap_dss_add_notify(dssdev, notifier); | ||
| 179 | #else | ||
| 180 | notifier = NULL; | ||
| 181 | #endif | ||
| 182 | 102 | ||
| 183 | for (j = 0; j < priv->num_encoders; j++) { | 103 | priv->planes[id] = plane; |
| 184 | struct omap_overlay_manager *mgr = | 104 | priv->num_planes++; |
| 185 | omap_encoder_get_manager(priv->encoders[j]); | ||
| 186 | if (mgr->get_device(mgr) == dssdev) { | ||
| 187 | drm_mode_connector_attach_encoder(connector, | ||
| 188 | priv->encoders[j]); | ||
| 189 | } | ||
| 190 | } | 105 | } |
| 191 | 106 | ||
| 192 | return 0; | 107 | /* |
| 193 | } | 108 | * Create normal planes for the remaining overlays: |
| 194 | |||
| 195 | /* create up to max_overlays CRTCs mapping to overlays.. by default, | ||
| 196 | * connect the overlays to different managers/encoders, giving priority | ||
| 197 | * to encoders connected to connectors with a detected connection | ||
| 198 | */ | ||
| 199 | static int create_crtc(struct drm_device *dev, struct omap_overlay *ovl, | ||
| 200 | int *j, unsigned int connected_connectors) | ||
| 201 | { | ||
| 202 | struct omap_drm_private *priv = dev->dev_private; | ||
| 203 | struct omap_overlay_manager *mgr = NULL; | ||
| 204 | struct drm_crtc *crtc; | ||
| 205 | |||
| 206 | /* find next best connector, ones with detected connection first | ||
| 207 | */ | 109 | */ |
| 208 | while (*j < priv->num_connectors && !mgr) { | 110 | for (; id < num_ovls; id++) { |
| 209 | if (connected_connectors & (1 << *j)) { | 111 | struct drm_plane *plane = omap_plane_init(dev, id, false); |
| 210 | struct drm_encoder *encoder = | ||
| 211 | omap_connector_attached_encoder( | ||
| 212 | priv->connectors[*j]); | ||
| 213 | if (encoder) | ||
| 214 | mgr = omap_encoder_get_manager(encoder); | ||
| 215 | 112 | ||
| 216 | } | 113 | BUG_ON(priv->num_planes >= ARRAY_SIZE(priv->planes)); |
| 217 | (*j)++; | 114 | priv->planes[priv->num_planes++] = plane; |
| 218 | } | 115 | } |
| 219 | 116 | ||
| 220 | /* if we couldn't find another connected connector, lets start | 117 | for_each_dss_dev(dssdev) { |
| 221 | * looking at the unconnected connectors: | 118 | struct drm_connector *connector; |
| 222 | * | 119 | struct drm_encoder *encoder; |
| 223 | * note: it might not be immediately apparent, but thanks to | ||
| 224 | * the !mgr check in both this loop and the one above, the only | ||
| 225 | * way to enter this loop is with *j == priv->num_connectors, | ||
| 226 | * so idx can never go negative. | ||
| 227 | */ | ||
| 228 | while (*j < 2 * priv->num_connectors && !mgr) { | ||
| 229 | int idx = *j - priv->num_connectors; | ||
| 230 | if (!(connected_connectors & (1 << idx))) { | ||
| 231 | struct drm_encoder *encoder = | ||
| 232 | omap_connector_attached_encoder( | ||
| 233 | priv->connectors[idx]); | ||
| 234 | if (encoder) | ||
| 235 | mgr = omap_encoder_get_manager(encoder); | ||
| 236 | 120 | ||
| 121 | if (!dssdev->driver) { | ||
| 122 | dev_warn(dev->dev, "%s has no driver.. skipping it\n", | ||
| 123 | dssdev->name); | ||
| 124 | return 0; | ||
| 237 | } | 125 | } |
| 238 | (*j)++; | ||
| 239 | } | ||
| 240 | |||
| 241 | crtc = omap_crtc_init(dev, ovl, priv->num_crtcs); | ||
| 242 | |||
| 243 | if (!crtc) { | ||
| 244 | dev_err(dev->dev, "could not create CRTC: %s\n", | ||
| 245 | ovl->name); | ||
| 246 | return -ENOMEM; | ||
| 247 | } | ||
| 248 | 126 | ||
| 249 | BUG_ON(priv->num_crtcs >= ARRAY_SIZE(priv->crtcs)); | 127 | if (!(dssdev->driver->get_timings || |
| 250 | 128 | dssdev->driver->read_edid)) { | |
| 251 | priv->crtcs[priv->num_crtcs++] = crtc; | 129 | dev_warn(dev->dev, "%s driver does not support " |
| 252 | 130 | "get_timings or read_edid.. skipping it!\n", | |
| 253 | return 0; | 131 | dssdev->name); |
| 254 | } | 132 | return 0; |
| 255 | |||
| 256 | static int create_plane(struct drm_device *dev, struct omap_overlay *ovl, | ||
| 257 | unsigned int possible_crtcs) | ||
| 258 | { | ||
| 259 | struct omap_drm_private *priv = dev->dev_private; | ||
| 260 | struct drm_plane *plane = | ||
| 261 | omap_plane_init(dev, ovl, possible_crtcs, false); | ||
| 262 | |||
| 263 | if (!plane) { | ||
| 264 | dev_err(dev->dev, "could not create plane: %s\n", | ||
| 265 | ovl->name); | ||
| 266 | return -ENOMEM; | ||
| 267 | } | ||
| 268 | |||
| 269 | BUG_ON(priv->num_planes >= ARRAY_SIZE(priv->planes)); | ||
| 270 | |||
| 271 | priv->planes[priv->num_planes++] = plane; | ||
| 272 | |||
| 273 | return 0; | ||
| 274 | } | ||
| 275 | |||
| 276 | static int match_dev_name(struct omap_dss_device *dssdev, void *data) | ||
| 277 | { | ||
| 278 | return !strcmp(dssdev->name, data); | ||
| 279 | } | ||
| 280 | |||
| 281 | static unsigned int detect_connectors(struct drm_device *dev) | ||
| 282 | { | ||
| 283 | struct omap_drm_private *priv = dev->dev_private; | ||
| 284 | unsigned int connected_connectors = 0; | ||
| 285 | int i; | ||
| 286 | |||
| 287 | for (i = 0; i < priv->num_connectors; i++) { | ||
| 288 | struct drm_connector *connector = priv->connectors[i]; | ||
| 289 | if (omap_connector_detect(connector, true) == | ||
| 290 | connector_status_connected) { | ||
| 291 | connected_connectors |= (1 << i); | ||
| 292 | } | 133 | } |
| 293 | } | ||
| 294 | |||
| 295 | return connected_connectors; | ||
| 296 | } | ||
| 297 | 134 | ||
| 298 | static int omap_modeset_init(struct drm_device *dev) | 135 | encoder = omap_encoder_init(dev, dssdev); |
| 299 | { | ||
| 300 | const struct omap_drm_platform_data *pdata = dev->dev->platform_data; | ||
| 301 | struct omap_kms_platform_data *kms_pdata = NULL; | ||
| 302 | struct omap_drm_private *priv = dev->dev_private; | ||
| 303 | struct omap_dss_device *dssdev = NULL; | ||
| 304 | int i, j; | ||
| 305 | unsigned int connected_connectors = 0; | ||
| 306 | 136 | ||
| 307 | drm_mode_config_init(dev); | 137 | if (!encoder) { |
| 308 | 138 | dev_err(dev->dev, "could not create encoder: %s\n", | |
| 309 | if (pdata && pdata->kms_pdata) { | 139 | dssdev->name); |
| 310 | kms_pdata = pdata->kms_pdata; | 140 | return -ENOMEM; |
| 311 | |||
| 312 | /* if platform data is provided by the board file, use it to | ||
| 313 | * control which overlays, managers, and devices we own. | ||
| 314 | */ | ||
| 315 | for (i = 0; i < kms_pdata->mgr_cnt; i++) { | ||
| 316 | struct omap_overlay_manager *mgr = | ||
| 317 | omap_dss_get_overlay_manager( | ||
| 318 | kms_pdata->mgr_ids[i]); | ||
| 319 | create_encoder(dev, mgr); | ||
| 320 | } | ||
| 321 | |||
| 322 | for (i = 0; i < kms_pdata->dev_cnt; i++) { | ||
| 323 | struct omap_dss_device *dssdev = | ||
| 324 | omap_dss_find_device( | ||
| 325 | (void *)kms_pdata->dev_names[i], | ||
| 326 | match_dev_name); | ||
| 327 | if (!dssdev) { | ||
| 328 | dev_warn(dev->dev, "no such dssdev: %s\n", | ||
| 329 | kms_pdata->dev_names[i]); | ||
| 330 | continue; | ||
| 331 | } | ||
| 332 | create_connector(dev, dssdev); | ||
| 333 | } | 141 | } |
| 334 | 142 | ||
| 335 | connected_connectors = detect_connectors(dev); | 143 | connector = omap_connector_init(dev, |
| 144 | get_connector_type(dssdev), dssdev, encoder); | ||
| 336 | 145 | ||
| 337 | j = 0; | 146 | if (!connector) { |
| 338 | for (i = 0; i < kms_pdata->ovl_cnt; i++) { | 147 | dev_err(dev->dev, "could not create connector: %s\n", |
| 339 | struct omap_overlay *ovl = | 148 | dssdev->name); |
| 340 | omap_dss_get_overlay(kms_pdata->ovl_ids[i]); | 149 | return -ENOMEM; |
| 341 | create_crtc(dev, ovl, &j, connected_connectors); | ||
| 342 | } | 150 | } |
| 343 | 151 | ||
| 344 | for (i = 0; i < kms_pdata->pln_cnt; i++) { | 152 | BUG_ON(priv->num_encoders >= ARRAY_SIZE(priv->encoders)); |
| 345 | struct omap_overlay *ovl = | 153 | BUG_ON(priv->num_connectors >= ARRAY_SIZE(priv->connectors)); |
| 346 | omap_dss_get_overlay(kms_pdata->pln_ids[i]); | ||
| 347 | create_plane(dev, ovl, (1 << priv->num_crtcs) - 1); | ||
| 348 | } | ||
| 349 | } else { | ||
| 350 | /* otherwise just grab up to CONFIG_DRM_OMAP_NUM_CRTCS and try | ||
| 351 | * to make educated guesses about everything else | ||
| 352 | */ | ||
| 353 | int max_overlays = min(omap_dss_get_num_overlays(), num_crtc); | ||
| 354 | 154 | ||
| 355 | for (i = 0; i < omap_dss_get_num_overlay_managers(); i++) | 155 | priv->encoders[priv->num_encoders++] = encoder; |
| 356 | create_encoder(dev, omap_dss_get_overlay_manager(i)); | 156 | priv->connectors[priv->num_connectors++] = connector; |
| 357 | |||
| 358 | for_each_dss_dev(dssdev) { | ||
| 359 | create_connector(dev, dssdev); | ||
| 360 | } | ||
| 361 | 157 | ||
| 362 | connected_connectors = detect_connectors(dev); | 158 | drm_mode_connector_attach_encoder(connector, encoder); |
| 363 | 159 | ||
| 364 | j = 0; | 160 | /* figure out which crtc's we can connect the encoder to: */ |
| 365 | for (i = 0; i < max_overlays; i++) { | 161 | encoder->possible_crtcs = 0; |
| 366 | create_crtc(dev, omap_dss_get_overlay(i), | 162 | for (id = 0; id < priv->num_crtcs; id++) { |
| 367 | &j, connected_connectors); | 163 | enum omap_dss_output_id supported_outputs = |
| 368 | } | 164 | dss_feat_get_supported_outputs(pipe2chan(id)); |
| 369 | 165 | if (supported_outputs & dssdev->output->id) | |
| 370 | /* use any remaining overlays as drm planes */ | 166 | encoder->possible_crtcs |= (1 << id); |
| 371 | for (; i < omap_dss_get_num_overlays(); i++) { | ||
| 372 | struct omap_overlay *ovl = omap_dss_get_overlay(i); | ||
| 373 | create_plane(dev, ovl, (1 << priv->num_crtcs) - 1); | ||
| 374 | } | 167 | } |
| 375 | } | 168 | } |
| 376 | 169 | ||
| 377 | /* for now keep the mapping of CRTCs and encoders static.. */ | ||
| 378 | for (i = 0; i < priv->num_encoders; i++) { | ||
| 379 | struct drm_encoder *encoder = priv->encoders[i]; | ||
| 380 | struct omap_overlay_manager *mgr = | ||
| 381 | omap_encoder_get_manager(encoder); | ||
| 382 | |||
| 383 | encoder->possible_crtcs = (1 << priv->num_crtcs) - 1; | ||
| 384 | |||
| 385 | DBG("%s: possible_crtcs=%08x", mgr->name, | ||
| 386 | encoder->possible_crtcs); | ||
| 387 | } | ||
| 388 | |||
| 389 | dump_video_chains(); | ||
| 390 | |||
| 391 | dev->mode_config.min_width = 32; | 170 | dev->mode_config.min_width = 32; |
| 392 | dev->mode_config.min_height = 32; | 171 | dev->mode_config.min_height = 32; |
| 393 | 172 | ||
| @@ -450,7 +229,7 @@ static int ioctl_gem_new(struct drm_device *dev, void *data, | |||
| 450 | struct drm_file *file_priv) | 229 | struct drm_file *file_priv) |
| 451 | { | 230 | { |
| 452 | struct drm_omap_gem_new *args = data; | 231 | struct drm_omap_gem_new *args = data; |
| 453 | DBG("%p:%p: size=0x%08x, flags=%08x", dev, file_priv, | 232 | VERB("%p:%p: size=0x%08x, flags=%08x", dev, file_priv, |
| 454 | args->size.bytes, args->flags); | 233 | args->size.bytes, args->flags); |
| 455 | return omap_gem_new_handle(dev, file_priv, args->size, | 234 | return omap_gem_new_handle(dev, file_priv, args->size, |
| 456 | args->flags, &args->handle); | 235 | args->flags, &args->handle); |
| @@ -510,7 +289,7 @@ static int ioctl_gem_info(struct drm_device *dev, void *data, | |||
| 510 | struct drm_gem_object *obj; | 289 | struct drm_gem_object *obj; |
| 511 | int ret = 0; | 290 | int ret = 0; |
| 512 | 291 | ||
| 513 | DBG("%p:%p: handle=%d", dev, file_priv, args->handle); | 292 | VERB("%p:%p: handle=%d", dev, file_priv, args->handle); |
| 514 | 293 | ||
| 515 | obj = drm_gem_object_lookup(dev, file_priv, args->handle); | 294 | obj = drm_gem_object_lookup(dev, file_priv, args->handle); |
| 516 | if (!obj) | 295 | if (!obj) |
| @@ -565,14 +344,6 @@ static int dev_load(struct drm_device *dev, unsigned long flags) | |||
| 565 | 344 | ||
| 566 | dev->dev_private = priv; | 345 | dev->dev_private = priv; |
| 567 | 346 | ||
| 568 | ret = omapdss_compat_init(); | ||
| 569 | if (ret) { | ||
| 570 | dev_err(dev->dev, "coult not init omapdss\n"); | ||
| 571 | dev->dev_private = NULL; | ||
| 572 | kfree(priv); | ||
| 573 | return ret; | ||
| 574 | } | ||
| 575 | |||
| 576 | priv->wq = alloc_ordered_workqueue("omapdrm", 0); | 347 | priv->wq = alloc_ordered_workqueue("omapdrm", 0); |
| 577 | 348 | ||
| 578 | INIT_LIST_HEAD(&priv->obj_list); | 349 | INIT_LIST_HEAD(&priv->obj_list); |
| @@ -584,10 +355,13 @@ static int dev_load(struct drm_device *dev, unsigned long flags) | |||
| 584 | dev_err(dev->dev, "omap_modeset_init failed: ret=%d\n", ret); | 355 | dev_err(dev->dev, "omap_modeset_init failed: ret=%d\n", ret); |
| 585 | dev->dev_private = NULL; | 356 | dev->dev_private = NULL; |
| 586 | kfree(priv); | 357 | kfree(priv); |
| 587 | omapdss_compat_uninit(); | ||
| 588 | return ret; | 358 | return ret; |
| 589 | } | 359 | } |
| 590 | 360 | ||
| 361 | ret = drm_vblank_init(dev, priv->num_crtcs); | ||
| 362 | if (ret) | ||
| 363 | dev_warn(dev->dev, "could not init vblank\n"); | ||
| 364 | |||
| 591 | priv->fbdev = omap_fbdev_init(dev); | 365 | priv->fbdev = omap_fbdev_init(dev); |
| 592 | if (!priv->fbdev) { | 366 | if (!priv->fbdev) { |
| 593 | dev_warn(dev->dev, "omap_fbdev_init failed\n"); | 367 | dev_warn(dev->dev, "omap_fbdev_init failed\n"); |
| @@ -596,10 +370,6 @@ static int dev_load(struct drm_device *dev, unsigned long flags) | |||
| 596 | 370 | ||
| 597 | drm_kms_helper_poll_init(dev); | 371 | drm_kms_helper_poll_init(dev); |
| 598 | 372 | ||
| 599 | ret = drm_vblank_init(dev, priv->num_crtcs); | ||
| 600 | if (ret) | ||
| 601 | dev_warn(dev->dev, "could not init vblank\n"); | ||
| 602 | |||
| 603 | return 0; | 373 | return 0; |
| 604 | } | 374 | } |
| 605 | 375 | ||
| @@ -609,8 +379,9 @@ static int dev_unload(struct drm_device *dev) | |||
| 609 | 379 | ||
| 610 | DBG("unload: dev=%p", dev); | 380 | DBG("unload: dev=%p", dev); |
| 611 | 381 | ||
| 612 | drm_vblank_cleanup(dev); | ||
| 613 | drm_kms_helper_poll_fini(dev); | 382 | drm_kms_helper_poll_fini(dev); |
| 383 | drm_vblank_cleanup(dev); | ||
| 384 | omap_drm_irq_uninstall(dev); | ||
| 614 | 385 | ||
| 615 | omap_fbdev_free(dev); | 386 | omap_fbdev_free(dev); |
| 616 | omap_modeset_free(dev); | 387 | omap_modeset_free(dev); |
| @@ -619,8 +390,6 @@ static int dev_unload(struct drm_device *dev) | |||
| 619 | flush_workqueue(priv->wq); | 390 | flush_workqueue(priv->wq); |
| 620 | destroy_workqueue(priv->wq); | 391 | destroy_workqueue(priv->wq); |
| 621 | 392 | ||
| 622 | omapdss_compat_uninit(); | ||
| 623 | |||
| 624 | kfree(dev->dev_private); | 393 | kfree(dev->dev_private); |
| 625 | dev->dev_private = NULL; | 394 | dev->dev_private = NULL; |
| 626 | 395 | ||
| @@ -680,7 +449,9 @@ static void dev_lastclose(struct drm_device *dev) | |||
| 680 | } | 449 | } |
| 681 | } | 450 | } |
| 682 | 451 | ||
| 452 | mutex_lock(&dev->mode_config.mutex); | ||
| 683 | ret = drm_fb_helper_restore_fbdev_mode(priv->fbdev); | 453 | ret = drm_fb_helper_restore_fbdev_mode(priv->fbdev); |
| 454 | mutex_unlock(&dev->mode_config.mutex); | ||
| 684 | if (ret) | 455 | if (ret) |
| 685 | DBG("failed to restore crtc mode"); | 456 | DBG("failed to restore crtc mode"); |
| 686 | } | 457 | } |
| @@ -695,60 +466,6 @@ static void dev_postclose(struct drm_device *dev, struct drm_file *file) | |||
| 695 | DBG("postclose: dev=%p, file=%p", dev, file); | 466 | DBG("postclose: dev=%p, file=%p", dev, file); |
| 696 | } | 467 | } |
| 697 | 468 | ||
| 698 | /** | ||
| 699 | * enable_vblank - enable vblank interrupt events | ||
| 700 | * @dev: DRM device | ||
| 701 | * @crtc: which irq to enable | ||
| 702 | * | ||
| 703 | * Enable vblank interrupts for @crtc. If the device doesn't have | ||
| 704 | * a hardware vblank counter, this routine should be a no-op, since | ||
| 705 | * interrupts will have to stay on to keep the count accurate. | ||
| 706 | * | ||
| 707 | * RETURNS | ||
| 708 | * Zero on success, appropriate errno if the given @crtc's vblank | ||
| 709 | * interrupt cannot be enabled. | ||
| 710 | */ | ||
| 711 | static int dev_enable_vblank(struct drm_device *dev, int crtc) | ||
| 712 | { | ||
| 713 | DBG("enable_vblank: dev=%p, crtc=%d", dev, crtc); | ||
| 714 | return 0; | ||
| 715 | } | ||
| 716 | |||
| 717 | /** | ||
| 718 | * disable_vblank - disable vblank interrupt events | ||
| 719 | * @dev: DRM device | ||
| 720 | * @crtc: which irq to enable | ||
| 721 | * | ||
| 722 | * Disable vblank interrupts for @crtc. If the device doesn't have | ||
| 723 | * a hardware vblank counter, this routine should be a no-op, since | ||
| 724 | * interrupts will have to stay on to keep the count accurate. | ||
| 725 | */ | ||
| 726 | static void dev_disable_vblank(struct drm_device *dev, int crtc) | ||
| 727 | { | ||
| 728 | DBG("disable_vblank: dev=%p, crtc=%d", dev, crtc); | ||
| 729 | } | ||
| 730 | |||
| 731 | static irqreturn_t dev_irq_handler(DRM_IRQ_ARGS) | ||
| 732 | { | ||
| 733 | return IRQ_HANDLED; | ||
| 734 | } | ||
| 735 | |||
| 736 | static void dev_irq_preinstall(struct drm_device *dev) | ||
| 737 | { | ||
| 738 | DBG("irq_preinstall: dev=%p", dev); | ||
| 739 | } | ||
| 740 | |||
| 741 | static int dev_irq_postinstall(struct drm_device *dev) | ||
| 742 | { | ||
| 743 | DBG("irq_postinstall: dev=%p", dev); | ||
| 744 | return 0; | ||
| 745 | } | ||
| 746 | |||
| 747 | static void dev_irq_uninstall(struct drm_device *dev) | ||
| 748 | { | ||
| 749 | DBG("irq_uninstall: dev=%p", dev); | ||
| 750 | } | ||
| 751 | |||
| 752 | static const struct vm_operations_struct omap_gem_vm_ops = { | 469 | static const struct vm_operations_struct omap_gem_vm_ops = { |
| 753 | .fault = omap_gem_fault, | 470 | .fault = omap_gem_fault, |
| 754 | .open = drm_gem_vm_open, | 471 | .open = drm_gem_vm_open, |
| @@ -778,12 +495,12 @@ static struct drm_driver omap_drm_driver = { | |||
| 778 | .preclose = dev_preclose, | 495 | .preclose = dev_preclose, |
| 779 | .postclose = dev_postclose, | 496 | .postclose = dev_postclose, |
| 780 | .get_vblank_counter = drm_vblank_count, | 497 | .get_vblank_counter = drm_vblank_count, |
| 781 | .enable_vblank = dev_enable_vblank, | 498 | .enable_vblank = omap_irq_enable_vblank, |
| 782 | .disable_vblank = dev_disable_vblank, | 499 | .disable_vblank = omap_irq_disable_vblank, |
| 783 | .irq_preinstall = dev_irq_preinstall, | 500 | .irq_preinstall = omap_irq_preinstall, |
| 784 | .irq_postinstall = dev_irq_postinstall, | 501 | .irq_postinstall = omap_irq_postinstall, |
| 785 | .irq_uninstall = dev_irq_uninstall, | 502 | .irq_uninstall = omap_irq_uninstall, |
| 786 | .irq_handler = dev_irq_handler, | 503 | .irq_handler = omap_irq_handler, |
| 787 | #ifdef CONFIG_DEBUG_FS | 504 | #ifdef CONFIG_DEBUG_FS |
| 788 | .debugfs_init = omap_debugfs_init, | 505 | .debugfs_init = omap_debugfs_init, |
| 789 | .debugfs_cleanup = omap_debugfs_cleanup, | 506 | .debugfs_cleanup = omap_debugfs_cleanup, |
diff --git a/drivers/staging/omapdrm/omap_drv.h b/drivers/staging/omapdrm/omap_drv.h index 1d4aea53b75d..cd1f22b0b124 100644 --- a/drivers/staging/omapdrm/omap_drv.h +++ b/drivers/staging/omapdrm/omap_drv.h | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/platform_data/omap_drm.h> | 28 | #include <linux/platform_data/omap_drm.h> |
| 29 | #include "omap_drm.h" | 29 | #include "omap_drm.h" |
| 30 | 30 | ||
| 31 | |||
| 31 | #define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__) | 32 | #define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__) |
| 32 | #define VERB(fmt, ...) if (0) DRM_DEBUG(fmt, ##__VA_ARGS__) /* verbose debug */ | 33 | #define VERB(fmt, ...) if (0) DRM_DEBUG(fmt, ##__VA_ARGS__) /* verbose debug */ |
| 33 | 34 | ||
| @@ -39,6 +40,51 @@ | |||
| 39 | */ | 40 | */ |
| 40 | #define MAX_MAPPERS 2 | 41 | #define MAX_MAPPERS 2 |
| 41 | 42 | ||
| 43 | /* parameters which describe (unrotated) coordinates of scanout within a fb: */ | ||
| 44 | struct omap_drm_window { | ||
| 45 | uint32_t rotation; | ||
| 46 | int32_t crtc_x, crtc_y; /* signed because can be offscreen */ | ||
| 47 | uint32_t crtc_w, crtc_h; | ||
| 48 | uint32_t src_x, src_y; | ||
| 49 | uint32_t src_w, src_h; | ||
| 50 | }; | ||
| 51 | |||
| 52 | /* Once GO bit is set, we can't make further updates to shadowed registers | ||
| 53 | * until the GO bit is cleared. So various parts in the kms code that need | ||
| 54 | * to update shadowed registers queue up a pair of callbacks, pre_apply | ||
| 55 | * which is called before setting GO bit, and post_apply that is called | ||
| 56 | * after GO bit is cleared. The crtc manages the queuing, and everyone | ||
| 57 | * else goes thru omap_crtc_apply() using these callbacks so that the | ||
| 58 | * code which has to deal w/ GO bit state is centralized. | ||
| 59 | */ | ||
| 60 | struct omap_drm_apply { | ||
| 61 | struct list_head pending_node, queued_node; | ||
| 62 | bool queued; | ||
| 63 | void (*pre_apply)(struct omap_drm_apply *apply); | ||
| 64 | void (*post_apply)(struct omap_drm_apply *apply); | ||
| 65 | }; | ||
| 66 | |||
| 67 | /* For transiently registering for different DSS irqs that various parts | ||
| 68 | * of the KMS code need during setup/configuration. We these are not | ||
| 69 | * necessarily the same as what drm_vblank_get/put() are requesting, and | ||
| 70 | * the hysteresis in drm_vblank_put() is not necessarily desirable for | ||
| 71 | * internal housekeeping related irq usage. | ||
| 72 | */ | ||
| 73 | struct omap_drm_irq { | ||
| 74 | struct list_head node; | ||
| 75 | uint32_t irqmask; | ||
| 76 | bool registered; | ||
| 77 | void (*irq)(struct omap_drm_irq *irq, uint32_t irqstatus); | ||
| 78 | }; | ||
| 79 | |||
| 80 | /* For KMS code that needs to wait for a certain # of IRQs: | ||
| 81 | */ | ||
| 82 | struct omap_irq_wait; | ||
| 83 | struct omap_irq_wait * omap_irq_wait_init(struct drm_device *dev, | ||
| 84 | uint32_t irqmask, int count); | ||
| 85 | int omap_irq_wait(struct drm_device *dev, struct omap_irq_wait *wait, | ||
| 86 | unsigned long timeout); | ||
| 87 | |||
| 42 | struct omap_drm_private { | 88 | struct omap_drm_private { |
| 43 | uint32_t omaprev; | 89 | uint32_t omaprev; |
| 44 | 90 | ||
| @@ -58,6 +104,7 @@ struct omap_drm_private { | |||
| 58 | 104 | ||
| 59 | struct workqueue_struct *wq; | 105 | struct workqueue_struct *wq; |
| 60 | 106 | ||
| 107 | /* list of GEM objects: */ | ||
| 61 | struct list_head obj_list; | 108 | struct list_head obj_list; |
| 62 | 109 | ||
| 63 | bool has_dmm; | 110 | bool has_dmm; |
| @@ -65,6 +112,11 @@ struct omap_drm_private { | |||
| 65 | /* properties: */ | 112 | /* properties: */ |
| 66 | struct drm_property *rotation_prop; | 113 | struct drm_property *rotation_prop; |
| 67 | struct drm_property *zorder_prop; | 114 | struct drm_property *zorder_prop; |
| 115 | |||
| 116 | /* irq handling: */ | ||
| 117 | struct list_head irq_list; /* list of omap_drm_irq */ | ||
| 118 | uint32_t vblank_mask; /* irq bits set for userspace vblank */ | ||
| 119 | struct omap_drm_irq error_handler; | ||
| 68 | }; | 120 | }; |
| 69 | 121 | ||
| 70 | /* this should probably be in drm-core to standardize amongst drivers */ | 122 | /* this should probably be in drm-core to standardize amongst drivers */ |
| @@ -75,15 +127,6 @@ struct omap_drm_private { | |||
| 75 | #define DRM_REFLECT_X 4 | 127 | #define DRM_REFLECT_X 4 |
| 76 | #define DRM_REFLECT_Y 5 | 128 | #define DRM_REFLECT_Y 5 |
| 77 | 129 | ||
| 78 | /* parameters which describe (unrotated) coordinates of scanout within a fb: */ | ||
| 79 | struct omap_drm_window { | ||
| 80 | uint32_t rotation; | ||
| 81 | int32_t crtc_x, crtc_y; /* signed because can be offscreen */ | ||
| 82 | uint32_t crtc_w, crtc_h; | ||
| 83 | uint32_t src_x, src_y; | ||
| 84 | uint32_t src_w, src_h; | ||
| 85 | }; | ||
| 86 | |||
| 87 | #ifdef CONFIG_DEBUG_FS | 130 | #ifdef CONFIG_DEBUG_FS |
| 88 | int omap_debugfs_init(struct drm_minor *minor); | 131 | int omap_debugfs_init(struct drm_minor *minor); |
| 89 | void omap_debugfs_cleanup(struct drm_minor *minor); | 132 | void omap_debugfs_cleanup(struct drm_minor *minor); |
| @@ -92,23 +135,36 @@ void omap_gem_describe(struct drm_gem_object *obj, struct seq_file *m); | |||
| 92 | void omap_gem_describe_objects(struct list_head *list, struct seq_file *m); | 135 | void omap_gem_describe_objects(struct list_head *list, struct seq_file *m); |
| 93 | #endif | 136 | #endif |
| 94 | 137 | ||
| 138 | int omap_irq_enable_vblank(struct drm_device *dev, int crtc); | ||
| 139 | void omap_irq_disable_vblank(struct drm_device *dev, int crtc); | ||
| 140 | irqreturn_t omap_irq_handler(DRM_IRQ_ARGS); | ||
| 141 | void omap_irq_preinstall(struct drm_device *dev); | ||
| 142 | int omap_irq_postinstall(struct drm_device *dev); | ||
| 143 | void omap_irq_uninstall(struct drm_device *dev); | ||
| 144 | void omap_irq_register(struct drm_device *dev, struct omap_drm_irq *irq); | ||
| 145 | void omap_irq_unregister(struct drm_device *dev, struct omap_drm_irq *irq); | ||
| 146 | int omap_drm_irq_uninstall(struct drm_device *dev); | ||
| 147 | int omap_drm_irq_install(struct drm_device *dev); | ||
| 148 | |||
| 95 | struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev); | 149 | struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev); |
| 96 | void omap_fbdev_free(struct drm_device *dev); | 150 | void omap_fbdev_free(struct drm_device *dev); |
| 97 | 151 | ||
| 152 | const struct omap_video_timings *omap_crtc_timings(struct drm_crtc *crtc); | ||
| 153 | enum omap_channel omap_crtc_channel(struct drm_crtc *crtc); | ||
| 154 | int omap_crtc_apply(struct drm_crtc *crtc, | ||
| 155 | struct omap_drm_apply *apply); | ||
| 98 | struct drm_crtc *omap_crtc_init(struct drm_device *dev, | 156 | struct drm_crtc *omap_crtc_init(struct drm_device *dev, |
| 99 | struct omap_overlay *ovl, int id); | 157 | struct drm_plane *plane, enum omap_channel channel, int id); |
| 100 | 158 | ||
| 101 | struct drm_plane *omap_plane_init(struct drm_device *dev, | 159 | struct drm_plane *omap_plane_init(struct drm_device *dev, |
| 102 | struct omap_overlay *ovl, unsigned int possible_crtcs, | 160 | int plane_id, bool private_plane); |
| 103 | bool priv); | ||
| 104 | int omap_plane_dpms(struct drm_plane *plane, int mode); | 161 | int omap_plane_dpms(struct drm_plane *plane, int mode); |
| 105 | int omap_plane_mode_set(struct drm_plane *plane, | 162 | int omap_plane_mode_set(struct drm_plane *plane, |
| 106 | struct drm_crtc *crtc, struct drm_framebuffer *fb, | 163 | struct drm_crtc *crtc, struct drm_framebuffer *fb, |
| 107 | int crtc_x, int crtc_y, | 164 | int crtc_x, int crtc_y, |
| 108 | unsigned int crtc_w, unsigned int crtc_h, | 165 | unsigned int crtc_w, unsigned int crtc_h, |
| 109 | uint32_t src_x, uint32_t src_y, | 166 | uint32_t src_x, uint32_t src_y, |
| 110 | uint32_t src_w, uint32_t src_h); | 167 | uint32_t src_w, uint32_t src_h, |
| 111 | void omap_plane_on_endwin(struct drm_plane *plane, | ||
| 112 | void (*fxn)(void *), void *arg); | 168 | void (*fxn)(void *), void *arg); |
| 113 | void omap_plane_install_properties(struct drm_plane *plane, | 169 | void omap_plane_install_properties(struct drm_plane *plane, |
| 114 | struct drm_mode_object *obj); | 170 | struct drm_mode_object *obj); |
| @@ -116,21 +172,25 @@ int omap_plane_set_property(struct drm_plane *plane, | |||
| 116 | struct drm_property *property, uint64_t val); | 172 | struct drm_property *property, uint64_t val); |
| 117 | 173 | ||
| 118 | struct drm_encoder *omap_encoder_init(struct drm_device *dev, | 174 | struct drm_encoder *omap_encoder_init(struct drm_device *dev, |
| 119 | struct omap_overlay_manager *mgr); | 175 | struct omap_dss_device *dssdev); |
| 120 | struct omap_overlay_manager *omap_encoder_get_manager( | 176 | int omap_encoder_set_enabled(struct drm_encoder *encoder, bool enabled); |
| 177 | int omap_encoder_update(struct drm_encoder *encoder, | ||
| 178 | struct omap_overlay_manager *mgr, | ||
| 179 | struct omap_video_timings *timings); | ||
| 180 | |||
| 181 | struct drm_connector *omap_connector_init(struct drm_device *dev, | ||
| 182 | int connector_type, struct omap_dss_device *dssdev, | ||
| 121 | struct drm_encoder *encoder); | 183 | struct drm_encoder *encoder); |
| 122 | struct drm_encoder *omap_connector_attached_encoder( | 184 | struct drm_encoder *omap_connector_attached_encoder( |
| 123 | struct drm_connector *connector); | 185 | struct drm_connector *connector); |
| 124 | enum drm_connector_status omap_connector_detect( | ||
| 125 | struct drm_connector *connector, bool force); | ||
| 126 | |||
| 127 | struct drm_connector *omap_connector_init(struct drm_device *dev, | ||
| 128 | int connector_type, struct omap_dss_device *dssdev); | ||
| 129 | void omap_connector_mode_set(struct drm_connector *connector, | ||
| 130 | struct drm_display_mode *mode); | ||
| 131 | void omap_connector_flush(struct drm_connector *connector, | 186 | void omap_connector_flush(struct drm_connector *connector, |
| 132 | int x, int y, int w, int h); | 187 | int x, int y, int w, int h); |
| 133 | 188 | ||
| 189 | void copy_timings_omap_to_drm(struct drm_display_mode *mode, | ||
| 190 | struct omap_video_timings *timings); | ||
| 191 | void copy_timings_drm_to_omap(struct omap_video_timings *timings, | ||
| 192 | struct drm_display_mode *mode); | ||
| 193 | |||
| 134 | uint32_t omap_framebuffer_get_formats(uint32_t *pixel_formats, | 194 | uint32_t omap_framebuffer_get_formats(uint32_t *pixel_formats, |
| 135 | uint32_t max_formats, enum omap_color_mode supported_modes); | 195 | uint32_t max_formats, enum omap_color_mode supported_modes); |
| 136 | struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev, | 196 | struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev, |
| @@ -207,6 +267,40 @@ static inline int align_pitch(int pitch, int width, int bpp) | |||
| 207 | return ALIGN(pitch, 8 * bytespp); | 267 | return ALIGN(pitch, 8 * bytespp); |
| 208 | } | 268 | } |
| 209 | 269 | ||
| 270 | static inline enum omap_channel pipe2chan(int pipe) | ||
| 271 | { | ||
| 272 | int num_mgrs = dss_feat_get_num_mgrs(); | ||
| 273 | |||
| 274 | /* | ||
| 275 | * We usually don't want to create a CRTC for each manager, | ||
| 276 | * at least not until we have a way to expose private planes | ||
| 277 | * to userspace. Otherwise there would not be enough video | ||
| 278 | * pipes left for drm planes. The higher #'d managers tend | ||
| 279 | * to have more features so start in reverse order. | ||
| 280 | */ | ||
| 281 | return num_mgrs - pipe - 1; | ||
| 282 | } | ||
| 283 | |||
| 284 | /* map crtc to vblank mask */ | ||
| 285 | static inline uint32_t pipe2vbl(int crtc) | ||
| 286 | { | ||
| 287 | enum omap_channel channel = pipe2chan(crtc); | ||
| 288 | return dispc_mgr_get_vsync_irq(channel); | ||
| 289 | } | ||
| 290 | |||
| 291 | static inline int crtc2pipe(struct drm_device *dev, struct drm_crtc *crtc) | ||
| 292 | { | ||
| 293 | struct omap_drm_private *priv = dev->dev_private; | ||
| 294 | int i; | ||
| 295 | |||
| 296 | for (i = 0; i < ARRAY_SIZE(priv->crtcs); i++) | ||
| 297 | if (priv->crtcs[i] == crtc) | ||
| 298 | return i; | ||
| 299 | |||
| 300 | BUG(); /* bogus CRTC ptr */ | ||
| 301 | return -1; | ||
| 302 | } | ||
| 303 | |||
| 210 | /* should these be made into common util helpers? | 304 | /* should these be made into common util helpers? |
| 211 | */ | 305 | */ |
| 212 | 306 | ||
diff --git a/drivers/staging/omapdrm/omap_encoder.c b/drivers/staging/omapdrm/omap_encoder.c index 5341d5e3e317..e053160d2db3 100644 --- a/drivers/staging/omapdrm/omap_encoder.c +++ b/drivers/staging/omapdrm/omap_encoder.c | |||
| @@ -22,37 +22,56 @@ | |||
| 22 | #include "drm_crtc.h" | 22 | #include "drm_crtc.h" |
| 23 | #include "drm_crtc_helper.h" | 23 | #include "drm_crtc_helper.h" |
| 24 | 24 | ||
| 25 | #include <linux/list.h> | ||
| 26 | |||
| 27 | |||
| 25 | /* | 28 | /* |
| 26 | * encoder funcs | 29 | * encoder funcs |
| 27 | */ | 30 | */ |
| 28 | 31 | ||
| 29 | #define to_omap_encoder(x) container_of(x, struct omap_encoder, base) | 32 | #define to_omap_encoder(x) container_of(x, struct omap_encoder, base) |
| 30 | 33 | ||
| 34 | /* The encoder and connector both map to same dssdev.. the encoder | ||
| 35 | * handles the 'active' parts, ie. anything the modifies the state | ||
| 36 | * of the hw, and the connector handles the 'read-only' parts, like | ||
| 37 | * detecting connection and reading edid. | ||
| 38 | */ | ||
| 31 | struct omap_encoder { | 39 | struct omap_encoder { |
| 32 | struct drm_encoder base; | 40 | struct drm_encoder base; |
| 33 | struct omap_overlay_manager *mgr; | 41 | struct omap_dss_device *dssdev; |
| 34 | }; | 42 | }; |
| 35 | 43 | ||
| 36 | static void omap_encoder_destroy(struct drm_encoder *encoder) | 44 | static void omap_encoder_destroy(struct drm_encoder *encoder) |
| 37 | { | 45 | { |
| 38 | struct omap_encoder *omap_encoder = to_omap_encoder(encoder); | 46 | struct omap_encoder *omap_encoder = to_omap_encoder(encoder); |
| 39 | DBG("%s", omap_encoder->mgr->name); | ||
| 40 | drm_encoder_cleanup(encoder); | 47 | drm_encoder_cleanup(encoder); |
| 41 | kfree(omap_encoder); | 48 | kfree(omap_encoder); |
| 42 | } | 49 | } |
| 43 | 50 | ||
| 51 | static const struct drm_encoder_funcs omap_encoder_funcs = { | ||
| 52 | .destroy = omap_encoder_destroy, | ||
| 53 | }; | ||
| 54 | |||
| 55 | /* | ||
| 56 | * The CRTC drm_crtc_helper_set_mode() doesn't really give us the right | ||
| 57 | * order.. the easiest way to work around this for now is to make all | ||
| 58 | * the encoder-helper's no-op's and have the omap_crtc code take care | ||
| 59 | * of the sequencing and call us in the right points. | ||
| 60 | * | ||
| 61 | * Eventually to handle connecting CRTCs to different encoders properly, | ||
| 62 | * either the CRTC helpers need to change or we need to replace | ||
| 63 | * drm_crtc_helper_set_mode(), but lets wait until atomic-modeset for | ||
| 64 | * that. | ||
| 65 | */ | ||
| 66 | |||
| 44 | static void omap_encoder_dpms(struct drm_encoder *encoder, int mode) | 67 | static void omap_encoder_dpms(struct drm_encoder *encoder, int mode) |
| 45 | { | 68 | { |
| 46 | struct omap_encoder *omap_encoder = to_omap_encoder(encoder); | ||
| 47 | DBG("%s: %d", omap_encoder->mgr->name, mode); | ||
| 48 | } | 69 | } |
| 49 | 70 | ||
| 50 | static bool omap_encoder_mode_fixup(struct drm_encoder *encoder, | 71 | static bool omap_encoder_mode_fixup(struct drm_encoder *encoder, |
| 51 | const struct drm_display_mode *mode, | 72 | const struct drm_display_mode *mode, |
| 52 | struct drm_display_mode *adjusted_mode) | 73 | struct drm_display_mode *adjusted_mode) |
| 53 | { | 74 | { |
| 54 | struct omap_encoder *omap_encoder = to_omap_encoder(encoder); | ||
| 55 | DBG("%s", omap_encoder->mgr->name); | ||
| 56 | return true; | 75 | return true; |
| 57 | } | 76 | } |
| 58 | 77 | ||
| @@ -60,47 +79,16 @@ static void omap_encoder_mode_set(struct drm_encoder *encoder, | |||
| 60 | struct drm_display_mode *mode, | 79 | struct drm_display_mode *mode, |
| 61 | struct drm_display_mode *adjusted_mode) | 80 | struct drm_display_mode *adjusted_mode) |
| 62 | { | 81 | { |
| 63 | struct omap_encoder *omap_encoder = to_omap_encoder(encoder); | ||
| 64 | struct drm_device *dev = encoder->dev; | ||
| 65 | struct omap_drm_private *priv = dev->dev_private; | ||
| 66 | int i; | ||
| 67 | |||
| 68 | mode = adjusted_mode; | ||
| 69 | |||
| 70 | DBG("%s: set mode: %dx%d", omap_encoder->mgr->name, | ||
| 71 | mode->hdisplay, mode->vdisplay); | ||
| 72 | |||
| 73 | for (i = 0; i < priv->num_connectors; i++) { | ||
| 74 | struct drm_connector *connector = priv->connectors[i]; | ||
| 75 | if (connector->encoder == encoder) | ||
| 76 | omap_connector_mode_set(connector, mode); | ||
| 77 | |||
| 78 | } | ||
| 79 | } | 82 | } |
| 80 | 83 | ||
| 81 | static void omap_encoder_prepare(struct drm_encoder *encoder) | 84 | static void omap_encoder_prepare(struct drm_encoder *encoder) |
| 82 | { | 85 | { |
| 83 | struct omap_encoder *omap_encoder = to_omap_encoder(encoder); | ||
| 84 | struct drm_encoder_helper_funcs *encoder_funcs = | ||
| 85 | encoder->helper_private; | ||
| 86 | DBG("%s", omap_encoder->mgr->name); | ||
| 87 | encoder_funcs->dpms(encoder, DRM_MODE_DPMS_OFF); | ||
| 88 | } | 86 | } |
| 89 | 87 | ||
| 90 | static void omap_encoder_commit(struct drm_encoder *encoder) | 88 | static void omap_encoder_commit(struct drm_encoder *encoder) |
| 91 | { | 89 | { |
| 92 | struct omap_encoder *omap_encoder = to_omap_encoder(encoder); | ||
| 93 | struct drm_encoder_helper_funcs *encoder_funcs = | ||
| 94 | encoder->helper_private; | ||
| 95 | DBG("%s", omap_encoder->mgr->name); | ||
| 96 | omap_encoder->mgr->apply(omap_encoder->mgr); | ||
| 97 | encoder_funcs->dpms(encoder, DRM_MODE_DPMS_ON); | ||
| 98 | } | 90 | } |
| 99 | 91 | ||
| 100 | static const struct drm_encoder_funcs omap_encoder_funcs = { | ||
| 101 | .destroy = omap_encoder_destroy, | ||
| 102 | }; | ||
| 103 | |||
| 104 | static const struct drm_encoder_helper_funcs omap_encoder_helper_funcs = { | 92 | static const struct drm_encoder_helper_funcs omap_encoder_helper_funcs = { |
| 105 | .dpms = omap_encoder_dpms, | 93 | .dpms = omap_encoder_dpms, |
| 106 | .mode_fixup = omap_encoder_mode_fixup, | 94 | .mode_fixup = omap_encoder_mode_fixup, |
| @@ -109,23 +97,54 @@ static const struct drm_encoder_helper_funcs omap_encoder_helper_funcs = { | |||
| 109 | .commit = omap_encoder_commit, | 97 | .commit = omap_encoder_commit, |
| 110 | }; | 98 | }; |
| 111 | 99 | ||
| 112 | struct omap_overlay_manager *omap_encoder_get_manager( | 100 | /* |
| 113 | struct drm_encoder *encoder) | 101 | * Instead of relying on the helpers for modeset, the omap_crtc code |
| 102 | * calls these functions in the proper sequence. | ||
| 103 | */ | ||
| 104 | |||
| 105 | int omap_encoder_set_enabled(struct drm_encoder *encoder, bool enabled) | ||
| 114 | { | 106 | { |
| 115 | struct omap_encoder *omap_encoder = to_omap_encoder(encoder); | 107 | struct omap_encoder *omap_encoder = to_omap_encoder(encoder); |
| 116 | return omap_encoder->mgr; | 108 | struct omap_dss_device *dssdev = omap_encoder->dssdev; |
| 109 | struct omap_dss_driver *dssdrv = dssdev->driver; | ||
| 110 | |||
| 111 | if (enabled) { | ||
| 112 | return dssdrv->enable(dssdev); | ||
| 113 | } else { | ||
| 114 | dssdrv->disable(dssdev); | ||
| 115 | return 0; | ||
| 116 | } | ||
| 117 | } | ||
| 118 | |||
| 119 | int omap_encoder_update(struct drm_encoder *encoder, | ||
| 120 | struct omap_overlay_manager *mgr, | ||
| 121 | struct omap_video_timings *timings) | ||
| 122 | { | ||
| 123 | struct drm_device *dev = encoder->dev; | ||
| 124 | struct omap_encoder *omap_encoder = to_omap_encoder(encoder); | ||
| 125 | struct omap_dss_device *dssdev = omap_encoder->dssdev; | ||
| 126 | struct omap_dss_driver *dssdrv = dssdev->driver; | ||
| 127 | int ret; | ||
| 128 | |||
| 129 | dssdev->output->manager = mgr; | ||
| 130 | |||
| 131 | ret = dssdrv->check_timings(dssdev, timings); | ||
| 132 | if (ret) { | ||
| 133 | dev_err(dev->dev, "could not set timings: %d\n", ret); | ||
| 134 | return ret; | ||
| 135 | } | ||
| 136 | |||
| 137 | dssdrv->set_timings(dssdev, timings); | ||
| 138 | |||
| 139 | return 0; | ||
| 117 | } | 140 | } |
| 118 | 141 | ||
| 119 | /* initialize encoder */ | 142 | /* initialize encoder */ |
| 120 | struct drm_encoder *omap_encoder_init(struct drm_device *dev, | 143 | struct drm_encoder *omap_encoder_init(struct drm_device *dev, |
| 121 | struct omap_overlay_manager *mgr) | 144 | struct omap_dss_device *dssdev) |
| 122 | { | 145 | { |
| 123 | struct drm_encoder *encoder = NULL; | 146 | struct drm_encoder *encoder = NULL; |
| 124 | struct omap_encoder *omap_encoder; | 147 | struct omap_encoder *omap_encoder; |
| 125 | struct omap_overlay_manager_info info; | ||
| 126 | int ret; | ||
| 127 | |||
| 128 | DBG("%s", mgr->name); | ||
| 129 | 148 | ||
| 130 | omap_encoder = kzalloc(sizeof(*omap_encoder), GFP_KERNEL); | 149 | omap_encoder = kzalloc(sizeof(*omap_encoder), GFP_KERNEL); |
| 131 | if (!omap_encoder) { | 150 | if (!omap_encoder) { |
| @@ -133,33 +152,14 @@ struct drm_encoder *omap_encoder_init(struct drm_device *dev, | |||
| 133 | goto fail; | 152 | goto fail; |
| 134 | } | 153 | } |
| 135 | 154 | ||
| 136 | omap_encoder->mgr = mgr; | 155 | omap_encoder->dssdev = dssdev; |
| 156 | |||
| 137 | encoder = &omap_encoder->base; | 157 | encoder = &omap_encoder->base; |
| 138 | 158 | ||
| 139 | drm_encoder_init(dev, encoder, &omap_encoder_funcs, | 159 | drm_encoder_init(dev, encoder, &omap_encoder_funcs, |
| 140 | DRM_MODE_ENCODER_TMDS); | 160 | DRM_MODE_ENCODER_TMDS); |
| 141 | drm_encoder_helper_add(encoder, &omap_encoder_helper_funcs); | 161 | drm_encoder_helper_add(encoder, &omap_encoder_helper_funcs); |
| 142 | 162 | ||
| 143 | mgr->get_manager_info(mgr, &info); | ||
| 144 | |||
| 145 | /* TODO: fix hard-coded setup.. */ | ||
| 146 | info.default_color = 0x00000000; | ||
| 147 | info.trans_key = 0x00000000; | ||
| 148 | info.trans_key_type = OMAP_DSS_COLOR_KEY_GFX_DST; | ||
| 149 | info.trans_enabled = false; | ||
| 150 | |||
| 151 | ret = mgr->set_manager_info(mgr, &info); | ||
| 152 | if (ret) { | ||
| 153 | dev_err(dev->dev, "could not set manager info\n"); | ||
| 154 | goto fail; | ||
| 155 | } | ||
| 156 | |||
| 157 | ret = mgr->apply(mgr); | ||
| 158 | if (ret) { | ||
| 159 | dev_err(dev->dev, "could not apply\n"); | ||
| 160 | goto fail; | ||
| 161 | } | ||
| 162 | |||
| 163 | return encoder; | 163 | return encoder; |
| 164 | 164 | ||
| 165 | fail: | 165 | fail: |
diff --git a/drivers/staging/omapdrm/omap_gem_dmabuf.c b/drivers/staging/omapdrm/omap_gem_dmabuf.c index 9a302062b031..b6c5b5c6c8c5 100644 --- a/drivers/staging/omapdrm/omap_gem_dmabuf.c +++ b/drivers/staging/omapdrm/omap_gem_dmabuf.c | |||
| @@ -194,7 +194,7 @@ struct dma_buf_ops omap_dmabuf_ops = { | |||
| 194 | struct dma_buf *omap_gem_prime_export(struct drm_device *dev, | 194 | struct dma_buf *omap_gem_prime_export(struct drm_device *dev, |
| 195 | struct drm_gem_object *obj, int flags) | 195 | struct drm_gem_object *obj, int flags) |
| 196 | { | 196 | { |
| 197 | return dma_buf_export(obj, &omap_dmabuf_ops, obj->size, 0600); | 197 | return dma_buf_export(obj, &omap_dmabuf_ops, obj->size, flags); |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | struct drm_gem_object *omap_gem_prime_import(struct drm_device *dev, | 200 | struct drm_gem_object *omap_gem_prime_import(struct drm_device *dev, |
| @@ -207,7 +207,12 @@ struct drm_gem_object *omap_gem_prime_import(struct drm_device *dev, | |||
| 207 | obj = buffer->priv; | 207 | obj = buffer->priv; |
| 208 | /* is it from our device? */ | 208 | /* is it from our device? */ |
| 209 | if (obj->dev == dev) { | 209 | if (obj->dev == dev) { |
| 210 | /* | ||
| 211 | * Importing dmabuf exported from out own gem increases | ||
| 212 | * refcount on gem itself instead of f_count of dmabuf. | ||
| 213 | */ | ||
| 210 | drm_gem_object_reference(obj); | 214 | drm_gem_object_reference(obj); |
| 215 | dma_buf_put(buffer); | ||
| 211 | return obj; | 216 | return obj; |
| 212 | } | 217 | } |
| 213 | } | 218 | } |
diff --git a/drivers/staging/omapdrm/omap_irq.c b/drivers/staging/omapdrm/omap_irq.c new file mode 100644 index 000000000000..2629ba7be6c8 --- /dev/null +++ b/drivers/staging/omapdrm/omap_irq.c | |||
| @@ -0,0 +1,322 @@ | |||
| 1 | /* | ||
| 2 | * drivers/staging/omapdrm/omap_irq.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Texas Instruments | ||
| 5 | * Author: Rob Clark <rob.clark@linaro.org> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License version 2 as published by | ||
| 9 | * the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 14 | * more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License along with | ||
| 17 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include "omap_drv.h" | ||
| 21 | |||
| 22 | static DEFINE_SPINLOCK(list_lock); | ||
| 23 | |||
| 24 | static void omap_irq_error_handler(struct omap_drm_irq *irq, | ||
| 25 | uint32_t irqstatus) | ||
| 26 | { | ||
| 27 | DRM_ERROR("errors: %08x\n", irqstatus); | ||
| 28 | } | ||
| 29 | |||
| 30 | /* call with list_lock and dispc runtime held */ | ||
| 31 | static void omap_irq_update(struct drm_device *dev) | ||
| 32 | { | ||
| 33 | struct omap_drm_private *priv = dev->dev_private; | ||
| 34 | struct omap_drm_irq *irq; | ||
| 35 | uint32_t irqmask = priv->vblank_mask; | ||
| 36 | |||
| 37 | BUG_ON(!spin_is_locked(&list_lock)); | ||
| 38 | |||
| 39 | list_for_each_entry(irq, &priv->irq_list, node) | ||
| 40 | irqmask |= irq->irqmask; | ||
| 41 | |||
| 42 | DBG("irqmask=%08x", irqmask); | ||
| 43 | |||
| 44 | dispc_write_irqenable(irqmask); | ||
| 45 | dispc_read_irqenable(); /* flush posted write */ | ||
| 46 | } | ||
| 47 | |||
| 48 | void omap_irq_register(struct drm_device *dev, struct omap_drm_irq *irq) | ||
| 49 | { | ||
| 50 | struct omap_drm_private *priv = dev->dev_private; | ||
| 51 | unsigned long flags; | ||
| 52 | |||
| 53 | dispc_runtime_get(); | ||
| 54 | spin_lock_irqsave(&list_lock, flags); | ||
| 55 | |||
| 56 | if (!WARN_ON(irq->registered)) { | ||
| 57 | irq->registered = true; | ||
| 58 | list_add(&irq->node, &priv->irq_list); | ||
| 59 | omap_irq_update(dev); | ||
| 60 | } | ||
| 61 | |||
| 62 | spin_unlock_irqrestore(&list_lock, flags); | ||
| 63 | dispc_runtime_put(); | ||
| 64 | } | ||
| 65 | |||
| 66 | void omap_irq_unregister(struct drm_device *dev, struct omap_drm_irq *irq) | ||
| 67 | { | ||
| 68 | unsigned long flags; | ||
| 69 | |||
| 70 | dispc_runtime_get(); | ||
| 71 | spin_lock_irqsave(&list_lock, flags); | ||
| 72 | |||
| 73 | if (!WARN_ON(!irq->registered)) { | ||
| 74 | irq->registered = false; | ||
| 75 | list_del(&irq->node); | ||
| 76 | omap_irq_update(dev); | ||
| 77 | } | ||
| 78 | |||
| 79 | spin_unlock_irqrestore(&list_lock, flags); | ||
| 80 | dispc_runtime_put(); | ||
| 81 | } | ||
| 82 | |||
| 83 | struct omap_irq_wait { | ||
| 84 | struct omap_drm_irq irq; | ||
| 85 | int count; | ||
| 86 | }; | ||
| 87 | |||
| 88 | static DECLARE_WAIT_QUEUE_HEAD(wait_event); | ||
| 89 | |||
| 90 | static void wait_irq(struct omap_drm_irq *irq, uint32_t irqstatus) | ||
| 91 | { | ||
| 92 | struct omap_irq_wait *wait = | ||
| 93 | container_of(irq, struct omap_irq_wait, irq); | ||
| 94 | wait->count--; | ||
| 95 | wake_up_all(&wait_event); | ||
| 96 | } | ||
| 97 | |||
| 98 | struct omap_irq_wait * omap_irq_wait_init(struct drm_device *dev, | ||
| 99 | uint32_t irqmask, int count) | ||
| 100 | { | ||
| 101 | struct omap_irq_wait *wait = kzalloc(sizeof(*wait), GFP_KERNEL); | ||
| 102 | wait->irq.irq = wait_irq; | ||
| 103 | wait->irq.irqmask = irqmask; | ||
| 104 | wait->count = count; | ||
| 105 | omap_irq_register(dev, &wait->irq); | ||
| 106 | return wait; | ||
| 107 | } | ||
| 108 | |||
| 109 | int omap_irq_wait(struct drm_device *dev, struct omap_irq_wait *wait, | ||
| 110 | unsigned long timeout) | ||
| 111 | { | ||
| 112 | int ret = wait_event_timeout(wait_event, (wait->count <= 0), timeout); | ||
| 113 | omap_irq_unregister(dev, &wait->irq); | ||
| 114 | kfree(wait); | ||
| 115 | if (ret == 0) | ||
| 116 | return -1; | ||
| 117 | return 0; | ||
| 118 | } | ||
| 119 | |||
| 120 | /** | ||
| 121 | * enable_vblank - enable vblank interrupt events | ||
| 122 | * @dev: DRM device | ||
| 123 | * @crtc: which irq to enable | ||
| 124 | * | ||
| 125 | * Enable vblank interrupts for @crtc. If the device doesn't have | ||
| 126 | * a hardware vblank counter, this routine should be a no-op, since | ||
| 127 | * interrupts will have to stay on to keep the count accurate. | ||
| 128 | * | ||
| 129 | * RETURNS | ||
| 130 | * Zero on success, appropriate errno if the given @crtc's vblank | ||
| 131 | * interrupt cannot be enabled. | ||
| 132 | */ | ||
| 133 | int omap_irq_enable_vblank(struct drm_device *dev, int crtc) | ||
| 134 | { | ||
| 135 | struct omap_drm_private *priv = dev->dev_private; | ||
| 136 | unsigned long flags; | ||
| 137 | |||
| 138 | DBG("dev=%p, crtc=%d", dev, crtc); | ||
| 139 | |||
| 140 | dispc_runtime_get(); | ||
| 141 | spin_lock_irqsave(&list_lock, flags); | ||
| 142 | priv->vblank_mask |= pipe2vbl(crtc); | ||
| 143 | omap_irq_update(dev); | ||
| 144 | spin_unlock_irqrestore(&list_lock, flags); | ||
| 145 | dispc_runtime_put(); | ||
| 146 | |||
| 147 | return 0; | ||
| 148 | } | ||
| 149 | |||
| 150 | /** | ||
| 151 | * disable_vblank - disable vblank interrupt events | ||
| 152 | * @dev: DRM device | ||
| 153 | * @crtc: which irq to enable | ||
| 154 | * | ||
| 155 | * Disable vblank interrupts for @crtc. If the device doesn't have | ||
| 156 | * a hardware vblank counter, this routine should be a no-op, since | ||
| 157 | * interrupts will have to stay on to keep the count accurate. | ||
| 158 | */ | ||
| 159 | void omap_irq_disable_vblank(struct drm_device *dev, int crtc) | ||
| 160 | { | ||
| 161 | struct omap_drm_private *priv = dev->dev_private; | ||
| 162 | unsigned long flags; | ||
| 163 | |||
| 164 | DBG("dev=%p, crtc=%d", dev, crtc); | ||
| 165 | |||
| 166 | dispc_runtime_get(); | ||
| 167 | spin_lock_irqsave(&list_lock, flags); | ||
| 168 | priv->vblank_mask &= ~pipe2vbl(crtc); | ||
| 169 | omap_irq_update(dev); | ||
| 170 | spin_unlock_irqrestore(&list_lock, flags); | ||
| 171 | dispc_runtime_put(); | ||
| 172 | } | ||
| 173 | |||
| 174 | irqreturn_t omap_irq_handler(DRM_IRQ_ARGS) | ||
| 175 | { | ||
| 176 | struct drm_device *dev = (struct drm_device *) arg; | ||
| 177 | struct omap_drm_private *priv = dev->dev_private; | ||
| 178 | struct omap_drm_irq *handler, *n; | ||
| 179 | unsigned long flags; | ||
| 180 | unsigned int id; | ||
| 181 | u32 irqstatus; | ||
| 182 | |||
| 183 | irqstatus = dispc_read_irqstatus(); | ||
| 184 | dispc_clear_irqstatus(irqstatus); | ||
| 185 | dispc_read_irqstatus(); /* flush posted write */ | ||
| 186 | |||
| 187 | VERB("irqs: %08x", irqstatus); | ||
| 188 | |||
| 189 | for (id = 0; id < priv->num_crtcs; id++) | ||
| 190 | if (irqstatus & pipe2vbl(id)) | ||
| 191 | drm_handle_vblank(dev, id); | ||
| 192 | |||
| 193 | spin_lock_irqsave(&list_lock, flags); | ||
| 194 | list_for_each_entry_safe(handler, n, &priv->irq_list, node) { | ||
| 195 | if (handler->irqmask & irqstatus) { | ||
| 196 | spin_unlock_irqrestore(&list_lock, flags); | ||
| 197 | handler->irq(handler, handler->irqmask & irqstatus); | ||
| 198 | spin_lock_irqsave(&list_lock, flags); | ||
| 199 | } | ||
| 200 | } | ||
| 201 | spin_unlock_irqrestore(&list_lock, flags); | ||
| 202 | |||
| 203 | return IRQ_HANDLED; | ||
| 204 | } | ||
| 205 | |||
| 206 | void omap_irq_preinstall(struct drm_device *dev) | ||
| 207 | { | ||
| 208 | DBG("dev=%p", dev); | ||
| 209 | dispc_runtime_get(); | ||
| 210 | dispc_clear_irqstatus(0xffffffff); | ||
| 211 | dispc_runtime_put(); | ||
| 212 | } | ||
| 213 | |||
| 214 | int omap_irq_postinstall(struct drm_device *dev) | ||
| 215 | { | ||
| 216 | struct omap_drm_private *priv = dev->dev_private; | ||
| 217 | struct omap_drm_irq *error_handler = &priv->error_handler; | ||
| 218 | |||
| 219 | DBG("dev=%p", dev); | ||
| 220 | |||
| 221 | INIT_LIST_HEAD(&priv->irq_list); | ||
| 222 | |||
| 223 | error_handler->irq = omap_irq_error_handler; | ||
| 224 | error_handler->irqmask = DISPC_IRQ_OCP_ERR; | ||
| 225 | |||
| 226 | /* for now ignore DISPC_IRQ_SYNC_LOST_DIGIT.. really I think | ||
| 227 | * we just need to ignore it while enabling tv-out | ||
| 228 | */ | ||
| 229 | error_handler->irqmask &= ~DISPC_IRQ_SYNC_LOST_DIGIT; | ||
| 230 | |||
| 231 | omap_irq_register(dev, error_handler); | ||
| 232 | |||
| 233 | return 0; | ||
| 234 | } | ||
| 235 | |||
| 236 | void omap_irq_uninstall(struct drm_device *dev) | ||
| 237 | { | ||
| 238 | DBG("dev=%p", dev); | ||
| 239 | // TODO prolly need to call drm_irq_uninstall() somewhere too | ||
| 240 | } | ||
| 241 | |||
| 242 | /* | ||
| 243 | * We need a special version, instead of just using drm_irq_install(), | ||
| 244 | * because we need to register the irq via omapdss. Once omapdss and | ||
| 245 | * omapdrm are merged together we can assign the dispc hwmod data to | ||
| 246 | * ourselves and drop these and just use drm_irq_{install,uninstall}() | ||
| 247 | */ | ||
| 248 | |||
| 249 | int omap_drm_irq_install(struct drm_device *dev) | ||
| 250 | { | ||
| 251 | int ret; | ||
| 252 | |||
| 253 | mutex_lock(&dev->struct_mutex); | ||
| 254 | |||
| 255 | if (dev->irq_enabled) { | ||
| 256 | mutex_unlock(&dev->struct_mutex); | ||
| 257 | return -EBUSY; | ||
| 258 | } | ||
| 259 | dev->irq_enabled = 1; | ||
| 260 | mutex_unlock(&dev->struct_mutex); | ||
| 261 | |||
| 262 | /* Before installing handler */ | ||
| 263 | if (dev->driver->irq_preinstall) | ||
| 264 | dev->driver->irq_preinstall(dev); | ||
| 265 | |||
| 266 | ret = dispc_request_irq(dev->driver->irq_handler, dev); | ||
| 267 | |||
| 268 | if (ret < 0) { | ||
| 269 | mutex_lock(&dev->struct_mutex); | ||
| 270 | dev->irq_enabled = 0; | ||
| 271 | mutex_unlock(&dev->struct_mutex); | ||
| 272 | return ret; | ||
| 273 | } | ||
| 274 | |||
| 275 | /* After installing handler */ | ||
| 276 | if (dev->driver->irq_postinstall) | ||
| 277 | ret = dev->driver->irq_postinstall(dev); | ||
| 278 | |||
| 279 | if (ret < 0) { | ||
| 280 | mutex_lock(&dev->struct_mutex); | ||
| 281 | dev->irq_enabled = 0; | ||
| 282 | mutex_unlock(&dev->struct_mutex); | ||
| 283 | dispc_free_irq(dev); | ||
| 284 | } | ||
| 285 | |||
| 286 | return ret; | ||
| 287 | } | ||
| 288 | |||
| 289 | int omap_drm_irq_uninstall(struct drm_device *dev) | ||
| 290 | { | ||
| 291 | unsigned long irqflags; | ||
| 292 | int irq_enabled, i; | ||
| 293 | |||
| 294 | mutex_lock(&dev->struct_mutex); | ||
| 295 | irq_enabled = dev->irq_enabled; | ||
| 296 | dev->irq_enabled = 0; | ||
| 297 | mutex_unlock(&dev->struct_mutex); | ||
| 298 | |||
| 299 | /* | ||
| 300 | * Wake up any waiters so they don't hang. | ||
| 301 | */ | ||
| 302 | if (dev->num_crtcs) { | ||
| 303 | spin_lock_irqsave(&dev->vbl_lock, irqflags); | ||
| 304 | for (i = 0; i < dev->num_crtcs; i++) { | ||
| 305 | DRM_WAKEUP(&dev->vbl_queue[i]); | ||
| 306 | dev->vblank_enabled[i] = 0; | ||
| 307 | dev->last_vblank[i] = | ||
| 308 | dev->driver->get_vblank_counter(dev, i); | ||
| 309 | } | ||
| 310 | spin_unlock_irqrestore(&dev->vbl_lock, irqflags); | ||
| 311 | } | ||
| 312 | |||
| 313 | if (!irq_enabled) | ||
| 314 | return -EINVAL; | ||
| 315 | |||
| 316 | if (dev->driver->irq_uninstall) | ||
| 317 | dev->driver->irq_uninstall(dev); | ||
| 318 | |||
| 319 | dispc_free_irq(dev); | ||
| 320 | |||
| 321 | return 0; | ||
| 322 | } | ||
diff --git a/drivers/staging/omapdrm/omap_plane.c b/drivers/staging/omapdrm/omap_plane.c index 2a8e5bab49c9..bb989d7f026d 100644 --- a/drivers/staging/omapdrm/omap_plane.c +++ b/drivers/staging/omapdrm/omap_plane.c | |||
| @@ -41,12 +41,14 @@ struct callback { | |||
| 41 | 41 | ||
| 42 | struct omap_plane { | 42 | struct omap_plane { |
| 43 | struct drm_plane base; | 43 | struct drm_plane base; |
| 44 | struct omap_overlay *ovl; | 44 | int id; /* TODO rename omap_plane -> omap_plane_id in omapdss so I can use the enum */ |
| 45 | const char *name; | ||
| 45 | struct omap_overlay_info info; | 46 | struct omap_overlay_info info; |
| 47 | struct omap_drm_apply apply; | ||
| 46 | 48 | ||
| 47 | /* position/orientation of scanout within the fb: */ | 49 | /* position/orientation of scanout within the fb: */ |
| 48 | struct omap_drm_window win; | 50 | struct omap_drm_window win; |
| 49 | 51 | bool enabled; | |
| 50 | 52 | ||
| 51 | /* last fb that we pinned: */ | 53 | /* last fb that we pinned: */ |
| 52 | struct drm_framebuffer *pinned_fb; | 54 | struct drm_framebuffer *pinned_fb; |
| @@ -54,189 +56,15 @@ struct omap_plane { | |||
| 54 | uint32_t nformats; | 56 | uint32_t nformats; |
| 55 | uint32_t formats[32]; | 57 | uint32_t formats[32]; |
| 56 | 58 | ||
| 57 | /* for synchronizing access to unpins fifo */ | 59 | struct omap_drm_irq error_irq; |
| 58 | struct mutex unpin_mutex; | ||
| 59 | 60 | ||
| 60 | /* set of bo's pending unpin until next END_WIN irq */ | 61 | /* set of bo's pending unpin until next post_apply() */ |
| 61 | DECLARE_KFIFO_PTR(unpin_fifo, struct drm_gem_object *); | 62 | DECLARE_KFIFO_PTR(unpin_fifo, struct drm_gem_object *); |
| 62 | int num_unpins, pending_num_unpins; | ||
| 63 | |||
| 64 | /* for deferred unpin when we need to wait for scanout complete irq */ | ||
| 65 | struct work_struct work; | ||
| 66 | |||
| 67 | /* callback on next endwin irq */ | ||
| 68 | struct callback endwin; | ||
| 69 | }; | ||
| 70 | 63 | ||
| 71 | /* map from ovl->id to the irq we are interested in for scanout-done */ | 64 | // XXX maybe get rid of this and handle vblank in crtc too? |
| 72 | static const uint32_t id2irq[] = { | 65 | struct callback apply_done_cb; |
| 73 | [OMAP_DSS_GFX] = DISPC_IRQ_GFX_END_WIN, | ||
| 74 | [OMAP_DSS_VIDEO1] = DISPC_IRQ_VID1_END_WIN, | ||
| 75 | [OMAP_DSS_VIDEO2] = DISPC_IRQ_VID2_END_WIN, | ||
| 76 | [OMAP_DSS_VIDEO3] = DISPC_IRQ_VID3_END_WIN, | ||
| 77 | }; | 66 | }; |
| 78 | 67 | ||
| 79 | static void dispc_isr(void *arg, uint32_t mask) | ||
| 80 | { | ||
| 81 | struct drm_plane *plane = arg; | ||
| 82 | struct omap_plane *omap_plane = to_omap_plane(plane); | ||
| 83 | struct omap_drm_private *priv = plane->dev->dev_private; | ||
| 84 | |||
| 85 | omap_dispc_unregister_isr(dispc_isr, plane, | ||
| 86 | id2irq[omap_plane->ovl->id]); | ||
| 87 | |||
| 88 | queue_work(priv->wq, &omap_plane->work); | ||
| 89 | } | ||
| 90 | |||
| 91 | static void unpin_worker(struct work_struct *work) | ||
| 92 | { | ||
| 93 | struct omap_plane *omap_plane = | ||
| 94 | container_of(work, struct omap_plane, work); | ||
| 95 | struct callback endwin; | ||
| 96 | |||
| 97 | mutex_lock(&omap_plane->unpin_mutex); | ||
| 98 | DBG("unpinning %d of %d", omap_plane->num_unpins, | ||
| 99 | omap_plane->num_unpins + omap_plane->pending_num_unpins); | ||
| 100 | while (omap_plane->num_unpins > 0) { | ||
| 101 | struct drm_gem_object *bo = NULL; | ||
| 102 | int ret = kfifo_get(&omap_plane->unpin_fifo, &bo); | ||
| 103 | WARN_ON(!ret); | ||
| 104 | omap_gem_put_paddr(bo); | ||
| 105 | drm_gem_object_unreference_unlocked(bo); | ||
| 106 | omap_plane->num_unpins--; | ||
| 107 | } | ||
| 108 | endwin = omap_plane->endwin; | ||
| 109 | omap_plane->endwin.fxn = NULL; | ||
| 110 | mutex_unlock(&omap_plane->unpin_mutex); | ||
| 111 | |||
| 112 | if (endwin.fxn) | ||
| 113 | endwin.fxn(endwin.arg); | ||
| 114 | } | ||
| 115 | |||
| 116 | static void install_irq(struct drm_plane *plane) | ||
| 117 | { | ||
| 118 | struct omap_plane *omap_plane = to_omap_plane(plane); | ||
| 119 | struct omap_overlay *ovl = omap_plane->ovl; | ||
| 120 | int ret; | ||
| 121 | |||
| 122 | ret = omap_dispc_register_isr(dispc_isr, plane, id2irq[ovl->id]); | ||
| 123 | |||
| 124 | /* | ||
| 125 | * omapdss has upper limit on # of registered irq handlers, | ||
| 126 | * which we shouldn't hit.. but if we do the limit should | ||
| 127 | * be raised or bad things happen: | ||
| 128 | */ | ||
| 129 | WARN_ON(ret == -EBUSY); | ||
| 130 | } | ||
| 131 | |||
| 132 | /* push changes down to dss2 */ | ||
| 133 | static int commit(struct drm_plane *plane) | ||
| 134 | { | ||
| 135 | struct drm_device *dev = plane->dev; | ||
| 136 | struct omap_plane *omap_plane = to_omap_plane(plane); | ||
| 137 | struct omap_overlay *ovl = omap_plane->ovl; | ||
| 138 | struct omap_overlay_info *info = &omap_plane->info; | ||
| 139 | int ret; | ||
| 140 | |||
| 141 | DBG("%s", ovl->name); | ||
| 142 | DBG("%dx%d -> %dx%d (%d)", info->width, info->height, info->out_width, | ||
| 143 | info->out_height, info->screen_width); | ||
| 144 | DBG("%d,%d %08x %08x", info->pos_x, info->pos_y, | ||
| 145 | info->paddr, info->p_uv_addr); | ||
| 146 | |||
| 147 | /* NOTE: do we want to do this at all here, or just wait | ||
| 148 | * for dpms(ON) since other CRTC's may not have their mode | ||
| 149 | * set yet, so fb dimensions may still change.. | ||
| 150 | */ | ||
| 151 | ret = ovl->set_overlay_info(ovl, info); | ||
| 152 | if (ret) { | ||
| 153 | dev_err(dev->dev, "could not set overlay info\n"); | ||
| 154 | return ret; | ||
| 155 | } | ||
| 156 | |||
| 157 | mutex_lock(&omap_plane->unpin_mutex); | ||
| 158 | omap_plane->num_unpins += omap_plane->pending_num_unpins; | ||
| 159 | omap_plane->pending_num_unpins = 0; | ||
| 160 | mutex_unlock(&omap_plane->unpin_mutex); | ||
| 161 | |||
| 162 | /* our encoder doesn't necessarily get a commit() after this, in | ||
| 163 | * particular in the dpms() and mode_set_base() cases, so force the | ||
| 164 | * manager to update: | ||
| 165 | * | ||
| 166 | * could this be in the encoder somehow? | ||
| 167 | */ | ||
| 168 | if (ovl->manager) { | ||
| 169 | ret = ovl->manager->apply(ovl->manager); | ||
| 170 | if (ret) { | ||
| 171 | dev_err(dev->dev, "could not apply settings\n"); | ||
| 172 | return ret; | ||
| 173 | } | ||
| 174 | |||
| 175 | /* | ||
| 176 | * NOTE: really this should be atomic w/ mgr->apply() but | ||
| 177 | * omapdss does not expose such an API | ||
| 178 | */ | ||
| 179 | if (omap_plane->num_unpins > 0) | ||
| 180 | install_irq(plane); | ||
| 181 | |||
| 182 | } else { | ||
| 183 | struct omap_drm_private *priv = dev->dev_private; | ||
| 184 | queue_work(priv->wq, &omap_plane->work); | ||
| 185 | } | ||
| 186 | |||
| 187 | |||
| 188 | if (ovl->is_enabled(ovl)) { | ||
| 189 | omap_framebuffer_flush(plane->fb, info->pos_x, info->pos_y, | ||
| 190 | info->out_width, info->out_height); | ||
| 191 | } | ||
| 192 | |||
| 193 | return 0; | ||
| 194 | } | ||
| 195 | |||
| 196 | /* when CRTC that we are attached to has potentially changed, this checks | ||
| 197 | * if we are attached to proper manager, and if necessary updates. | ||
| 198 | */ | ||
| 199 | static void update_manager(struct drm_plane *plane) | ||
| 200 | { | ||
| 201 | struct omap_drm_private *priv = plane->dev->dev_private; | ||
| 202 | struct omap_plane *omap_plane = to_omap_plane(plane); | ||
| 203 | struct omap_overlay *ovl = omap_plane->ovl; | ||
| 204 | struct omap_overlay_manager *mgr = NULL; | ||
| 205 | int i; | ||
| 206 | |||
| 207 | if (plane->crtc) { | ||
| 208 | for (i = 0; i < priv->num_encoders; i++) { | ||
| 209 | struct drm_encoder *encoder = priv->encoders[i]; | ||
| 210 | if (encoder->crtc == plane->crtc) { | ||
| 211 | mgr = omap_encoder_get_manager(encoder); | ||
| 212 | break; | ||
| 213 | } | ||
| 214 | } | ||
| 215 | } | ||
| 216 | |||
| 217 | if (ovl->manager != mgr) { | ||
| 218 | bool enabled = ovl->is_enabled(ovl); | ||
| 219 | |||
| 220 | /* don't switch things around with enabled overlays: */ | ||
| 221 | if (enabled) | ||
| 222 | omap_plane_dpms(plane, DRM_MODE_DPMS_OFF); | ||
| 223 | |||
| 224 | if (ovl->manager) { | ||
| 225 | DBG("disconnecting %s from %s", ovl->name, | ||
| 226 | ovl->manager->name); | ||
| 227 | ovl->unset_manager(ovl); | ||
| 228 | } | ||
| 229 | |||
| 230 | if (mgr) { | ||
| 231 | DBG("connecting %s to %s", ovl->name, mgr->name); | ||
| 232 | ovl->set_manager(ovl, mgr); | ||
| 233 | } | ||
| 234 | |||
| 235 | if (enabled && mgr) | ||
| 236 | omap_plane_dpms(plane, DRM_MODE_DPMS_ON); | ||
| 237 | } | ||
| 238 | } | ||
| 239 | |||
| 240 | static void unpin(void *arg, struct drm_gem_object *bo) | 68 | static void unpin(void *arg, struct drm_gem_object *bo) |
| 241 | { | 69 | { |
| 242 | struct drm_plane *plane = arg; | 70 | struct drm_plane *plane = arg; |
| @@ -244,7 +72,6 @@ static void unpin(void *arg, struct drm_gem_object *bo) | |||
| 244 | 72 | ||
| 245 | if (kfifo_put(&omap_plane->unpin_fifo, | 73 | if (kfifo_put(&omap_plane->unpin_fifo, |
| 246 | (const struct drm_gem_object **)&bo)) { | 74 | (const struct drm_gem_object **)&bo)) { |
| 247 | omap_plane->pending_num_unpins++; | ||
| 248 | /* also hold a ref so it isn't free'd while pinned */ | 75 | /* also hold a ref so it isn't free'd while pinned */ |
| 249 | drm_gem_object_reference(bo); | 76 | drm_gem_object_reference(bo); |
| 250 | } else { | 77 | } else { |
| @@ -264,13 +91,19 @@ static int update_pin(struct drm_plane *plane, struct drm_framebuffer *fb) | |||
| 264 | 91 | ||
| 265 | DBG("%p -> %p", pinned_fb, fb); | 92 | DBG("%p -> %p", pinned_fb, fb); |
| 266 | 93 | ||
| 267 | mutex_lock(&omap_plane->unpin_mutex); | 94 | if (fb) |
| 95 | drm_framebuffer_reference(fb); | ||
| 96 | |||
| 268 | ret = omap_framebuffer_replace(pinned_fb, fb, plane, unpin); | 97 | ret = omap_framebuffer_replace(pinned_fb, fb, plane, unpin); |
| 269 | mutex_unlock(&omap_plane->unpin_mutex); | 98 | |
| 99 | if (pinned_fb) | ||
| 100 | drm_framebuffer_unreference(pinned_fb); | ||
| 270 | 101 | ||
| 271 | if (ret) { | 102 | if (ret) { |
| 272 | dev_err(plane->dev->dev, "could not swap %p -> %p\n", | 103 | dev_err(plane->dev->dev, "could not swap %p -> %p\n", |
| 273 | omap_plane->pinned_fb, fb); | 104 | omap_plane->pinned_fb, fb); |
| 105 | if (fb) | ||
| 106 | drm_framebuffer_unreference(fb); | ||
| 274 | omap_plane->pinned_fb = NULL; | 107 | omap_plane->pinned_fb = NULL; |
| 275 | return ret; | 108 | return ret; |
| 276 | } | 109 | } |
| @@ -281,31 +114,90 @@ static int update_pin(struct drm_plane *plane, struct drm_framebuffer *fb) | |||
| 281 | return 0; | 114 | return 0; |
| 282 | } | 115 | } |
| 283 | 116 | ||
| 284 | /* update parameters that are dependent on the framebuffer dimensions and | 117 | static void omap_plane_pre_apply(struct omap_drm_apply *apply) |
| 285 | * position within the fb that this plane scans out from. This is called | ||
| 286 | * when framebuffer or x,y base may have changed. | ||
| 287 | */ | ||
| 288 | static void update_scanout(struct drm_plane *plane) | ||
| 289 | { | 118 | { |
| 290 | struct omap_plane *omap_plane = to_omap_plane(plane); | 119 | struct omap_plane *omap_plane = |
| 291 | struct omap_overlay_info *info = &omap_plane->info; | 120 | container_of(apply, struct omap_plane, apply); |
| 292 | struct omap_drm_window *win = &omap_plane->win; | 121 | struct omap_drm_window *win = &omap_plane->win; |
| 122 | struct drm_plane *plane = &omap_plane->base; | ||
| 123 | struct drm_device *dev = plane->dev; | ||
| 124 | struct omap_overlay_info *info = &omap_plane->info; | ||
| 125 | struct drm_crtc *crtc = plane->crtc; | ||
| 126 | enum omap_channel channel; | ||
| 127 | bool enabled = omap_plane->enabled && crtc; | ||
| 128 | bool ilace, replication; | ||
| 293 | int ret; | 129 | int ret; |
| 294 | 130 | ||
| 295 | ret = update_pin(plane, plane->fb); | 131 | DBG("%s, enabled=%d", omap_plane->name, enabled); |
| 296 | if (ret) { | 132 | |
| 297 | dev_err(plane->dev->dev, | 133 | /* if fb has changed, pin new fb: */ |
| 298 | "could not pin fb: %d\n", ret); | 134 | update_pin(plane, enabled ? plane->fb : NULL); |
| 299 | omap_plane_dpms(plane, DRM_MODE_DPMS_OFF); | 135 | |
| 136 | if (!enabled) { | ||
| 137 | dispc_ovl_enable(omap_plane->id, false); | ||
| 300 | return; | 138 | return; |
| 301 | } | 139 | } |
| 302 | 140 | ||
| 141 | channel = omap_crtc_channel(crtc); | ||
| 142 | |||
| 143 | /* update scanout: */ | ||
| 303 | omap_framebuffer_update_scanout(plane->fb, win, info); | 144 | omap_framebuffer_update_scanout(plane->fb, win, info); |
| 304 | 145 | ||
| 305 | DBG("%s: %d,%d: %08x %08x (%d)", omap_plane->ovl->name, | 146 | DBG("%dx%d -> %dx%d (%d)", info->width, info->height, |
| 306 | win->src_x, win->src_y, | 147 | info->out_width, info->out_height, |
| 307 | (u32)info->paddr, (u32)info->p_uv_addr, | ||
| 308 | info->screen_width); | 148 | info->screen_width); |
| 149 | DBG("%d,%d %08x %08x", info->pos_x, info->pos_y, | ||
| 150 | info->paddr, info->p_uv_addr); | ||
| 151 | |||
| 152 | /* TODO: */ | ||
| 153 | ilace = false; | ||
| 154 | replication = false; | ||
| 155 | |||
| 156 | /* and finally, update omapdss: */ | ||
| 157 | ret = dispc_ovl_setup(omap_plane->id, info, | ||
| 158 | replication, omap_crtc_timings(crtc), false); | ||
| 159 | if (ret) { | ||
| 160 | dev_err(dev->dev, "dispc_ovl_setup failed: %d\n", ret); | ||
| 161 | return; | ||
| 162 | } | ||
| 163 | |||
| 164 | dispc_ovl_enable(omap_plane->id, true); | ||
| 165 | dispc_ovl_set_channel_out(omap_plane->id, channel); | ||
| 166 | } | ||
| 167 | |||
| 168 | static void omap_plane_post_apply(struct omap_drm_apply *apply) | ||
| 169 | { | ||
| 170 | struct omap_plane *omap_plane = | ||
| 171 | container_of(apply, struct omap_plane, apply); | ||
| 172 | struct drm_plane *plane = &omap_plane->base; | ||
| 173 | struct omap_overlay_info *info = &omap_plane->info; | ||
| 174 | struct drm_gem_object *bo = NULL; | ||
| 175 | struct callback cb; | ||
| 176 | |||
| 177 | cb = omap_plane->apply_done_cb; | ||
| 178 | omap_plane->apply_done_cb.fxn = NULL; | ||
| 179 | |||
| 180 | while (kfifo_get(&omap_plane->unpin_fifo, &bo)) { | ||
| 181 | omap_gem_put_paddr(bo); | ||
| 182 | drm_gem_object_unreference_unlocked(bo); | ||
| 183 | } | ||
| 184 | |||
| 185 | if (cb.fxn) | ||
| 186 | cb.fxn(cb.arg); | ||
| 187 | |||
| 188 | if (omap_plane->enabled) { | ||
| 189 | omap_framebuffer_flush(plane->fb, info->pos_x, info->pos_y, | ||
| 190 | info->out_width, info->out_height); | ||
| 191 | } | ||
| 192 | } | ||
| 193 | |||
| 194 | static int apply(struct drm_plane *plane) | ||
| 195 | { | ||
| 196 | if (plane->crtc) { | ||
| 197 | struct omap_plane *omap_plane = to_omap_plane(plane); | ||
| 198 | return omap_crtc_apply(plane->crtc, &omap_plane->apply); | ||
| 199 | } | ||
| 200 | return 0; | ||
| 309 | } | 201 | } |
| 310 | 202 | ||
| 311 | int omap_plane_mode_set(struct drm_plane *plane, | 203 | int omap_plane_mode_set(struct drm_plane *plane, |
| @@ -313,7 +205,8 @@ int omap_plane_mode_set(struct drm_plane *plane, | |||
| 313 | int crtc_x, int crtc_y, | 205 | int crtc_x, int crtc_y, |
| 314 | unsigned int crtc_w, unsigned int crtc_h, | 206 | unsigned int crtc_w, unsigned int crtc_h, |
| 315 | uint32_t src_x, uint32_t src_y, | 207 | uint32_t src_x, uint32_t src_y, |
| 316 | uint32_t src_w, uint32_t src_h) | 208 | uint32_t src_w, uint32_t src_h, |
| 209 | void (*fxn)(void *), void *arg) | ||
| 317 | { | 210 | { |
| 318 | struct omap_plane *omap_plane = to_omap_plane(plane); | 211 | struct omap_plane *omap_plane = to_omap_plane(plane); |
| 319 | struct omap_drm_window *win = &omap_plane->win; | 212 | struct omap_drm_window *win = &omap_plane->win; |
| @@ -329,17 +222,20 @@ int omap_plane_mode_set(struct drm_plane *plane, | |||
| 329 | win->src_w = src_w >> 16; | 222 | win->src_w = src_w >> 16; |
| 330 | win->src_h = src_h >> 16; | 223 | win->src_h = src_h >> 16; |
| 331 | 224 | ||
| 332 | /* note: this is done after this fxn returns.. but if we need | 225 | if (fxn) { |
| 333 | * to do a commit/update_scanout, etc before this returns we | 226 | /* omap_crtc should ensure that a new page flip |
| 334 | * need the current value. | 227 | * isn't permitted while there is one pending: |
| 335 | */ | 228 | */ |
| 229 | BUG_ON(omap_plane->apply_done_cb.fxn); | ||
| 230 | |||
| 231 | omap_plane->apply_done_cb.fxn = fxn; | ||
| 232 | omap_plane->apply_done_cb.arg = arg; | ||
| 233 | } | ||
| 234 | |||
| 336 | plane->fb = fb; | 235 | plane->fb = fb; |
| 337 | plane->crtc = crtc; | 236 | plane->crtc = crtc; |
| 338 | 237 | ||
| 339 | update_scanout(plane); | 238 | return apply(plane); |
| 340 | update_manager(plane); | ||
| 341 | |||
| 342 | return 0; | ||
| 343 | } | 239 | } |
| 344 | 240 | ||
| 345 | static int omap_plane_update(struct drm_plane *plane, | 241 | static int omap_plane_update(struct drm_plane *plane, |
| @@ -349,9 +245,12 @@ static int omap_plane_update(struct drm_plane *plane, | |||
| 349 | uint32_t src_x, uint32_t src_y, | 245 | uint32_t src_x, uint32_t src_y, |
| 350 | uint32_t src_w, uint32_t src_h) | 246 | uint32_t src_w, uint32_t src_h) |
| 351 | { | 247 | { |
| 352 | omap_plane_mode_set(plane, crtc, fb, crtc_x, crtc_y, crtc_w, crtc_h, | 248 | struct omap_plane *omap_plane = to_omap_plane(plane); |
| 353 | src_x, src_y, src_w, src_h); | 249 | omap_plane->enabled = true; |
| 354 | return omap_plane_dpms(plane, DRM_MODE_DPMS_ON); | 250 | return omap_plane_mode_set(plane, crtc, fb, |
| 251 | crtc_x, crtc_y, crtc_w, crtc_h, | ||
| 252 | src_x, src_y, src_w, src_h, | ||
| 253 | NULL, NULL); | ||
| 355 | } | 254 | } |
| 356 | 255 | ||
| 357 | static int omap_plane_disable(struct drm_plane *plane) | 256 | static int omap_plane_disable(struct drm_plane *plane) |
| @@ -364,48 +263,32 @@ static int omap_plane_disable(struct drm_plane *plane) | |||
| 364 | static void omap_plane_destroy(struct drm_plane *plane) | 263 | static void omap_plane_destroy(struct drm_plane *plane) |
| 365 | { | 264 | { |
| 366 | struct omap_plane *omap_plane = to_omap_plane(plane); | 265 | struct omap_plane *omap_plane = to_omap_plane(plane); |
| 367 | DBG("%s", omap_plane->ovl->name); | 266 | |
| 267 | DBG("%s", omap_plane->name); | ||
| 268 | |||
| 269 | omap_irq_unregister(plane->dev, &omap_plane->error_irq); | ||
| 270 | |||
| 368 | omap_plane_disable(plane); | 271 | omap_plane_disable(plane); |
| 369 | drm_plane_cleanup(plane); | 272 | drm_plane_cleanup(plane); |
| 370 | WARN_ON(omap_plane->pending_num_unpins + omap_plane->num_unpins > 0); | 273 | |
| 274 | WARN_ON(!kfifo_is_empty(&omap_plane->unpin_fifo)); | ||
| 371 | kfifo_free(&omap_plane->unpin_fifo); | 275 | kfifo_free(&omap_plane->unpin_fifo); |
| 276 | |||
| 372 | kfree(omap_plane); | 277 | kfree(omap_plane); |
| 373 | } | 278 | } |
| 374 | 279 | ||
| 375 | int omap_plane_dpms(struct drm_plane *plane, int mode) | 280 | int omap_plane_dpms(struct drm_plane *plane, int mode) |
| 376 | { | 281 | { |
| 377 | struct omap_plane *omap_plane = to_omap_plane(plane); | 282 | struct omap_plane *omap_plane = to_omap_plane(plane); |
| 378 | struct omap_overlay *ovl = omap_plane->ovl; | 283 | bool enabled = (mode == DRM_MODE_DPMS_ON); |
| 379 | int r; | 284 | int ret = 0; |
| 380 | 285 | ||
| 381 | DBG("%s: %d", omap_plane->ovl->name, mode); | 286 | if (enabled != omap_plane->enabled) { |
| 382 | 287 | omap_plane->enabled = enabled; | |
| 383 | if (mode == DRM_MODE_DPMS_ON) { | 288 | ret = apply(plane); |
| 384 | update_scanout(plane); | ||
| 385 | r = commit(plane); | ||
| 386 | if (!r) | ||
| 387 | r = ovl->enable(ovl); | ||
| 388 | } else { | ||
| 389 | struct omap_drm_private *priv = plane->dev->dev_private; | ||
| 390 | r = ovl->disable(ovl); | ||
| 391 | update_pin(plane, NULL); | ||
| 392 | queue_work(priv->wq, &omap_plane->work); | ||
| 393 | } | 289 | } |
| 394 | 290 | ||
| 395 | return r; | 291 | return ret; |
| 396 | } | ||
| 397 | |||
| 398 | void omap_plane_on_endwin(struct drm_plane *plane, | ||
| 399 | void (*fxn)(void *), void *arg) | ||
| 400 | { | ||
| 401 | struct omap_plane *omap_plane = to_omap_plane(plane); | ||
| 402 | |||
| 403 | mutex_lock(&omap_plane->unpin_mutex); | ||
| 404 | omap_plane->endwin.fxn = fxn; | ||
| 405 | omap_plane->endwin.arg = arg; | ||
| 406 | mutex_unlock(&omap_plane->unpin_mutex); | ||
| 407 | |||
| 408 | install_irq(plane); | ||
| 409 | } | 292 | } |
| 410 | 293 | ||
| 411 | /* helper to install properties which are common to planes and crtcs */ | 294 | /* helper to install properties which are common to planes and crtcs */ |
| @@ -454,25 +337,13 @@ int omap_plane_set_property(struct drm_plane *plane, | |||
| 454 | int ret = -EINVAL; | 337 | int ret = -EINVAL; |
| 455 | 338 | ||
| 456 | if (property == priv->rotation_prop) { | 339 | if (property == priv->rotation_prop) { |
| 457 | struct omap_overlay *ovl = omap_plane->ovl; | 340 | DBG("%s: rotation: %02x", omap_plane->name, (uint32_t)val); |
| 458 | |||
| 459 | DBG("%s: rotation: %02x", ovl->name, (uint32_t)val); | ||
| 460 | omap_plane->win.rotation = val; | 341 | omap_plane->win.rotation = val; |
| 461 | 342 | ret = apply(plane); | |
| 462 | if (ovl->is_enabled(ovl)) | ||
| 463 | ret = omap_plane_dpms(plane, DRM_MODE_DPMS_ON); | ||
| 464 | else | ||
| 465 | ret = 0; | ||
| 466 | } else if (property == priv->zorder_prop) { | 343 | } else if (property == priv->zorder_prop) { |
| 467 | struct omap_overlay *ovl = omap_plane->ovl; | 344 | DBG("%s: zorder: %02x", omap_plane->name, (uint32_t)val); |
| 468 | |||
| 469 | DBG("%s: zorder: %d", ovl->name, (uint32_t)val); | ||
| 470 | omap_plane->info.zorder = val; | 345 | omap_plane->info.zorder = val; |
| 471 | 346 | ret = apply(plane); | |
| 472 | if (ovl->is_enabled(ovl)) | ||
| 473 | ret = omap_plane_dpms(plane, DRM_MODE_DPMS_ON); | ||
| 474 | else | ||
| 475 | ret = 0; | ||
| 476 | } | 347 | } |
| 477 | 348 | ||
| 478 | return ret; | 349 | return ret; |
| @@ -485,20 +356,38 @@ static const struct drm_plane_funcs omap_plane_funcs = { | |||
| 485 | .set_property = omap_plane_set_property, | 356 | .set_property = omap_plane_set_property, |
| 486 | }; | 357 | }; |
| 487 | 358 | ||
| 359 | static void omap_plane_error_irq(struct omap_drm_irq *irq, uint32_t irqstatus) | ||
| 360 | { | ||
| 361 | struct omap_plane *omap_plane = | ||
| 362 | container_of(irq, struct omap_plane, error_irq); | ||
| 363 | DRM_ERROR("%s: errors: %08x\n", omap_plane->name, irqstatus); | ||
| 364 | } | ||
| 365 | |||
| 366 | static const char *plane_names[] = { | ||
| 367 | [OMAP_DSS_GFX] = "gfx", | ||
| 368 | [OMAP_DSS_VIDEO1] = "vid1", | ||
| 369 | [OMAP_DSS_VIDEO2] = "vid2", | ||
| 370 | [OMAP_DSS_VIDEO3] = "vid3", | ||
| 371 | }; | ||
| 372 | |||
| 373 | static const uint32_t error_irqs[] = { | ||
| 374 | [OMAP_DSS_GFX] = DISPC_IRQ_GFX_FIFO_UNDERFLOW, | ||
| 375 | [OMAP_DSS_VIDEO1] = DISPC_IRQ_VID1_FIFO_UNDERFLOW, | ||
| 376 | [OMAP_DSS_VIDEO2] = DISPC_IRQ_VID2_FIFO_UNDERFLOW, | ||
| 377 | [OMAP_DSS_VIDEO3] = DISPC_IRQ_VID3_FIFO_UNDERFLOW, | ||
| 378 | }; | ||
| 379 | |||
| 488 | /* initialize plane */ | 380 | /* initialize plane */ |
| 489 | struct drm_plane *omap_plane_init(struct drm_device *dev, | 381 | struct drm_plane *omap_plane_init(struct drm_device *dev, |
| 490 | struct omap_overlay *ovl, unsigned int possible_crtcs, | 382 | int id, bool private_plane) |
| 491 | bool priv) | ||
| 492 | { | 383 | { |
| 384 | struct omap_drm_private *priv = dev->dev_private; | ||
| 493 | struct drm_plane *plane = NULL; | 385 | struct drm_plane *plane = NULL; |
| 494 | struct omap_plane *omap_plane; | 386 | struct omap_plane *omap_plane; |
| 387 | struct omap_overlay_info *info; | ||
| 495 | int ret; | 388 | int ret; |
| 496 | 389 | ||
| 497 | DBG("%s: possible_crtcs=%08x, priv=%d", ovl->name, | 390 | DBG("%s: priv=%d", plane_names[id], private_plane); |
| 498 | possible_crtcs, priv); | ||
| 499 | |||
| 500 | /* friendly reminder to update table for future hw: */ | ||
| 501 | WARN_ON(ovl->id >= ARRAY_SIZE(id2irq)); | ||
| 502 | 391 | ||
| 503 | omap_plane = kzalloc(sizeof(*omap_plane), GFP_KERNEL); | 392 | omap_plane = kzalloc(sizeof(*omap_plane), GFP_KERNEL); |
| 504 | if (!omap_plane) { | 393 | if (!omap_plane) { |
| @@ -506,47 +395,50 @@ struct drm_plane *omap_plane_init(struct drm_device *dev, | |||
| 506 | goto fail; | 395 | goto fail; |
| 507 | } | 396 | } |
| 508 | 397 | ||
| 509 | mutex_init(&omap_plane->unpin_mutex); | ||
| 510 | |||
| 511 | ret = kfifo_alloc(&omap_plane->unpin_fifo, 16, GFP_KERNEL); | 398 | ret = kfifo_alloc(&omap_plane->unpin_fifo, 16, GFP_KERNEL); |
| 512 | if (ret) { | 399 | if (ret) { |
| 513 | dev_err(dev->dev, "could not allocate unpin FIFO\n"); | 400 | dev_err(dev->dev, "could not allocate unpin FIFO\n"); |
| 514 | goto fail; | 401 | goto fail; |
| 515 | } | 402 | } |
| 516 | 403 | ||
| 517 | INIT_WORK(&omap_plane->work, unpin_worker); | ||
| 518 | |||
| 519 | omap_plane->nformats = omap_framebuffer_get_formats( | 404 | omap_plane->nformats = omap_framebuffer_get_formats( |
| 520 | omap_plane->formats, ARRAY_SIZE(omap_plane->formats), | 405 | omap_plane->formats, ARRAY_SIZE(omap_plane->formats), |
| 521 | ovl->supported_modes); | 406 | dss_feat_get_supported_color_modes(id)); |
| 522 | omap_plane->ovl = ovl; | 407 | omap_plane->id = id; |
| 408 | omap_plane->name = plane_names[id]; | ||
| 409 | |||
| 523 | plane = &omap_plane->base; | 410 | plane = &omap_plane->base; |
| 524 | 411 | ||
| 525 | drm_plane_init(dev, plane, possible_crtcs, &omap_plane_funcs, | 412 | omap_plane->apply.pre_apply = omap_plane_pre_apply; |
| 526 | omap_plane->formats, omap_plane->nformats, priv); | 413 | omap_plane->apply.post_apply = omap_plane_post_apply; |
| 414 | |||
| 415 | omap_plane->error_irq.irqmask = error_irqs[id]; | ||
| 416 | omap_plane->error_irq.irq = omap_plane_error_irq; | ||
| 417 | omap_irq_register(dev, &omap_plane->error_irq); | ||
| 418 | |||
| 419 | drm_plane_init(dev, plane, (1 << priv->num_crtcs) - 1, &omap_plane_funcs, | ||
| 420 | omap_plane->formats, omap_plane->nformats, private_plane); | ||
| 527 | 421 | ||
| 528 | omap_plane_install_properties(plane, &plane->base); | 422 | omap_plane_install_properties(plane, &plane->base); |
| 529 | 423 | ||
| 530 | /* get our starting configuration, set defaults for parameters | 424 | /* get our starting configuration, set defaults for parameters |
| 531 | * we don't currently use, etc: | 425 | * we don't currently use, etc: |
| 532 | */ | 426 | */ |
| 533 | ovl->get_overlay_info(ovl, &omap_plane->info); | 427 | info = &omap_plane->info; |
| 534 | omap_plane->info.rotation_type = OMAP_DSS_ROT_DMA; | 428 | info->rotation_type = OMAP_DSS_ROT_DMA; |
| 535 | omap_plane->info.rotation = OMAP_DSS_ROT_0; | 429 | info->rotation = OMAP_DSS_ROT_0; |
| 536 | omap_plane->info.global_alpha = 0xff; | 430 | info->global_alpha = 0xff; |
| 537 | omap_plane->info.mirror = 0; | 431 | info->mirror = 0; |
| 538 | 432 | ||
| 539 | /* Set defaults depending on whether we are a CRTC or overlay | 433 | /* Set defaults depending on whether we are a CRTC or overlay |
| 540 | * layer. | 434 | * layer. |
| 541 | * TODO add ioctl to give userspace an API to change this.. this | 435 | * TODO add ioctl to give userspace an API to change this.. this |
| 542 | * will come in a subsequent patch. | 436 | * will come in a subsequent patch. |
| 543 | */ | 437 | */ |
| 544 | if (priv) | 438 | if (private_plane) |
| 545 | omap_plane->info.zorder = 0; | 439 | omap_plane->info.zorder = 0; |
| 546 | else | 440 | else |
| 547 | omap_plane->info.zorder = ovl->id; | 441 | omap_plane->info.zorder = id; |
| 548 | |||
| 549 | update_manager(plane); | ||
| 550 | 442 | ||
| 551 | return plane; | 443 | return plane; |
| 552 | 444 | ||
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index ae38475854b5..d10d75e8a33f 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c | |||
| @@ -937,7 +937,8 @@ short alloc_rx_desc_ring(struct net_device *dev, u16 bufsize, int count) | |||
| 937 | 937 | ||
| 938 | dma_tmp = pci_map_single(pdev, buf, bufsize * sizeof(u8), | 938 | dma_tmp = pci_map_single(pdev, buf, bufsize * sizeof(u8), |
| 939 | PCI_DMA_FROMDEVICE); | 939 | PCI_DMA_FROMDEVICE); |
| 940 | 940 | if (pci_dma_mapping_error(pdev, dma_tmp)) | |
| 941 | return -1; | ||
| 941 | if (-1 == buffer_add(&(priv->rxbuffer), buf, dma_tmp, | 942 | if (-1 == buffer_add(&(priv->rxbuffer), buf, dma_tmp, |
| 942 | &(priv->rxbufferhead))) { | 943 | &(priv->rxbufferhead))) { |
| 943 | DMESGE("Unable to allocate mem RX buf"); | 944 | DMESGE("Unable to allocate mem RX buf"); |
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index 808aab6fa5ef..a9d78e9651c6 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | |||
| @@ -1183,6 +1183,8 @@ void rtl8192_tx_fill_desc(struct net_device *dev, struct tx_desc *pdesc, | |||
| 1183 | pTxFwInfo->TxRate, | 1183 | pTxFwInfo->TxRate, |
| 1184 | cb_desc); | 1184 | cb_desc); |
| 1185 | 1185 | ||
| 1186 | if (pci_dma_mapping_error(priv->pdev, mapping)) | ||
| 1187 | RT_TRACE(COMP_ERR, "DMA Mapping error\n");; | ||
| 1186 | if (cb_desc->bAMPDUEnable) { | 1188 | if (cb_desc->bAMPDUEnable) { |
| 1187 | pTxFwInfo->AllowAggregation = 1; | 1189 | pTxFwInfo->AllowAggregation = 1; |
| 1188 | pTxFwInfo->RxMF = cb_desc->ampdu_factor; | 1190 | pTxFwInfo->RxMF = cb_desc->ampdu_factor; |
| @@ -1280,6 +1282,8 @@ void rtl8192_tx_fill_cmd_desc(struct net_device *dev, | |||
| 1280 | dma_addr_t mapping = pci_map_single(priv->pdev, skb->data, skb->len, | 1282 | dma_addr_t mapping = pci_map_single(priv->pdev, skb->data, skb->len, |
| 1281 | PCI_DMA_TODEVICE); | 1283 | PCI_DMA_TODEVICE); |
| 1282 | 1284 | ||
| 1285 | if (pci_dma_mapping_error(priv->pdev, mapping)) | ||
| 1286 | RT_TRACE(COMP_ERR, "DMA Mapping error\n");; | ||
| 1283 | memset(entry, 0, 12); | 1287 | memset(entry, 0, 12); |
| 1284 | entry->LINIP = cb_desc->bLastIniPkt; | 1288 | entry->LINIP = cb_desc->bLastIniPkt; |
| 1285 | entry->FirstSeg = 1; | 1289 | entry->FirstSeg = 1; |
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 1a70f324552f..4ebf99b30975 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c | |||
| @@ -2104,7 +2104,10 @@ static short rtl8192_alloc_rx_desc_ring(struct net_device *dev) | |||
| 2104 | skb_tail_pointer_rsl(skb), | 2104 | skb_tail_pointer_rsl(skb), |
| 2105 | priv->rxbuffersize, | 2105 | priv->rxbuffersize, |
| 2106 | PCI_DMA_FROMDEVICE); | 2106 | PCI_DMA_FROMDEVICE); |
| 2107 | 2107 | if (pci_dma_mapping_error(priv->pdev, *mapping)) { | |
| 2108 | dev_kfree_skb_any(skb); | ||
| 2109 | return -1; | ||
| 2110 | } | ||
| 2108 | entry->BufferAddress = cpu_to_le32(*mapping); | 2111 | entry->BufferAddress = cpu_to_le32(*mapping); |
| 2109 | 2112 | ||
| 2110 | entry->Length = priv->rxbuffersize; | 2113 | entry->Length = priv->rxbuffersize; |
| @@ -2397,7 +2400,11 @@ static void rtl8192_rx_normal(struct net_device *dev) | |||
| 2397 | skb_tail_pointer_rsl(skb), | 2400 | skb_tail_pointer_rsl(skb), |
| 2398 | priv->rxbuffersize, | 2401 | priv->rxbuffersize, |
| 2399 | PCI_DMA_FROMDEVICE); | 2402 | PCI_DMA_FROMDEVICE); |
| 2400 | 2403 | if (pci_dma_mapping_error(priv->pdev, | |
| 2404 | *((dma_addr_t *)skb->cb))) { | ||
| 2405 | dev_kfree_skb_any(skb); | ||
| 2406 | return; | ||
| 2407 | } | ||
| 2401 | } | 2408 | } |
| 2402 | done: | 2409 | done: |
| 2403 | pdesc->BufferAddress = cpu_to_le32(*((dma_addr_t *)skb->cb)); | 2410 | pdesc->BufferAddress = cpu_to_le32(*((dma_addr_t *)skb->cb)); |
diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c index 6b73843e580a..a96cd06d69dd 100644 --- a/drivers/staging/rtl8712/usb_intf.c +++ b/drivers/staging/rtl8712/usb_intf.c | |||
| @@ -63,6 +63,8 @@ static struct usb_device_id rtl871x_usb_id_tbl[] = { | |||
| 63 | {USB_DEVICE(0x0B05, 0x1791)}, /* 11n mode disable */ | 63 | {USB_DEVICE(0x0B05, 0x1791)}, /* 11n mode disable */ |
| 64 | /* Belkin */ | 64 | /* Belkin */ |
| 65 | {USB_DEVICE(0x050D, 0x945A)}, | 65 | {USB_DEVICE(0x050D, 0x945A)}, |
| 66 | /* ISY IWL - Belkin clone */ | ||
| 67 | {USB_DEVICE(0x050D, 0x11F1)}, | ||
| 66 | /* Corega */ | 68 | /* Corega */ |
| 67 | {USB_DEVICE(0x07AA, 0x0047)}, | 69 | {USB_DEVICE(0x07AA, 0x0047)}, |
| 68 | /* D-Link */ | 70 | /* D-Link */ |
diff --git a/drivers/staging/sb105x/Kconfig b/drivers/staging/sb105x/Kconfig index ac87c5e38dee..1facad625554 100644 --- a/drivers/staging/sb105x/Kconfig +++ b/drivers/staging/sb105x/Kconfig | |||
| @@ -2,6 +2,7 @@ config SB105X | |||
| 2 | tristate "SystemBase PCI Multiport UART" | 2 | tristate "SystemBase PCI Multiport UART" |
| 3 | select SERIAL_CORE | 3 | select SERIAL_CORE |
| 4 | depends on PCI | 4 | depends on PCI |
| 5 | depends on X86 | ||
| 5 | help | 6 | help |
| 6 | A driver for the SystemBase Multi-2/PCI serial card | 7 | A driver for the SystemBase Multi-2/PCI serial card |
| 7 | 8 | ||
diff --git a/drivers/staging/sb105x/sb_pci_mp.c b/drivers/staging/sb105x/sb_pci_mp.c index edb2a85b9d52..131afd0c460c 100644 --- a/drivers/staging/sb105x/sb_pci_mp.c +++ b/drivers/staging/sb105x/sb_pci_mp.c | |||
| @@ -3054,6 +3054,7 @@ static int init_mp_dev(struct pci_dev *pcidev, mppcibrd_t brd) | |||
| 3054 | sbdev->nr_ports = ((portnum_hex/16)*10) + (portnum_hex % 16); | 3054 | sbdev->nr_ports = ((portnum_hex/16)*10) + (portnum_hex % 16); |
| 3055 | } | 3055 | } |
| 3056 | break; | 3056 | break; |
| 3057 | #ifdef CONFIG_PARPORT | ||
| 3057 | case PCI_DEVICE_ID_MP2S1P : | 3058 | case PCI_DEVICE_ID_MP2S1P : |
| 3058 | sbdev->nr_ports = 2; | 3059 | sbdev->nr_ports = 2; |
| 3059 | 3060 | ||
| @@ -3073,6 +3074,7 @@ static int init_mp_dev(struct pci_dev *pcidev, mppcibrd_t brd) | |||
| 3073 | /* add PC compatible parallel port */ | 3074 | /* add PC compatible parallel port */ |
| 3074 | parport_pc_probe_port(pcidev->resource[2].start, pcidev->resource[3].start, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, &pcidev->dev, 0); | 3075 | parport_pc_probe_port(pcidev->resource[2].start, pcidev->resource[3].start, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, &pcidev->dev, 0); |
| 3075 | break; | 3076 | break; |
| 3077 | #endif | ||
| 3076 | } | 3078 | } |
| 3077 | 3079 | ||
| 3078 | ret = request_region(sbdev->uart_access_addr, (8*sbdev->nr_ports), sbdev->name); | 3080 | ret = request_region(sbdev->uart_access_addr, (8*sbdev->nr_ports), sbdev->name); |
diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c index df9533798095..7616f058a00b 100644 --- a/drivers/staging/speakup/synth.c +++ b/drivers/staging/speakup/synth.c | |||
| @@ -342,7 +342,7 @@ int synth_init(char *synth_name) | |||
| 342 | 342 | ||
| 343 | mutex_lock(&spk_mutex); | 343 | mutex_lock(&spk_mutex); |
| 344 | /* First, check if we already have it loaded. */ | 344 | /* First, check if we already have it loaded. */ |
| 345 | for (i = 0; synths[i] != NULL && i < MAXSYNTHS; i++) | 345 | for (i = 0; i < MAXSYNTHS && synths[i] != NULL; i++) |
| 346 | if (strcmp(synths[i]->name, synth_name) == 0) | 346 | if (strcmp(synths[i]->name, synth_name) == 0) |
| 347 | synth = synths[i]; | 347 | synth = synths[i]; |
| 348 | 348 | ||
| @@ -423,7 +423,7 @@ int synth_add(struct spk_synth *in_synth) | |||
| 423 | int i; | 423 | int i; |
| 424 | int status = 0; | 424 | int status = 0; |
| 425 | mutex_lock(&spk_mutex); | 425 | mutex_lock(&spk_mutex); |
| 426 | for (i = 0; synths[i] != NULL && i < MAXSYNTHS; i++) | 426 | for (i = 0; i < MAXSYNTHS && synths[i] != NULL; i++) |
| 427 | /* synth_remove() is responsible for rotating the array down */ | 427 | /* synth_remove() is responsible for rotating the array down */ |
| 428 | if (in_synth == synths[i]) { | 428 | if (in_synth == synths[i]) { |
| 429 | mutex_unlock(&spk_mutex); | 429 | mutex_unlock(&spk_mutex); |
diff --git a/drivers/staging/tidspbridge/core/_tiomap.h b/drivers/staging/tidspbridge/core/_tiomap.h index 543a127c7d4d..b783bfa59b1c 100644 --- a/drivers/staging/tidspbridge/core/_tiomap.h +++ b/drivers/staging/tidspbridge/core/_tiomap.h | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | * driver should read or write to PRM/CM registers directly; they | 31 | * driver should read or write to PRM/CM registers directly; they |
| 32 | * should rely on OMAP core code to do this. | 32 | * should rely on OMAP core code to do this. |
| 33 | */ | 33 | */ |
| 34 | #include <mach-omap2/cm2xxx_3xxx.h> | 34 | #include <mach-omap2/cm3xxx.h> |
| 35 | #include <mach-omap2/prm-regbits-34xx.h> | 35 | #include <mach-omap2/prm-regbits-34xx.h> |
| 36 | #include <mach-omap2/cm-regbits-34xx.h> | 36 | #include <mach-omap2/cm-regbits-34xx.h> |
| 37 | #include <dspbridge/devdefs.h> | 37 | #include <dspbridge/devdefs.h> |
diff --git a/drivers/staging/tidspbridge/core/dsp-clock.c b/drivers/staging/tidspbridge/core/dsp-clock.c index b647207928b1..2f084e181d39 100644 --- a/drivers/staging/tidspbridge/core/dsp-clock.c +++ b/drivers/staging/tidspbridge/core/dsp-clock.c | |||
| @@ -121,9 +121,13 @@ void dsp_clk_exit(void) | |||
| 121 | for (i = 0; i < DM_TIMER_CLOCKS; i++) | 121 | for (i = 0; i < DM_TIMER_CLOCKS; i++) |
| 122 | omap_dm_timer_free(timer[i]); | 122 | omap_dm_timer_free(timer[i]); |
| 123 | 123 | ||
| 124 | clk_unprepare(iva2_clk); | ||
| 124 | clk_put(iva2_clk); | 125 | clk_put(iva2_clk); |
| 126 | clk_unprepare(ssi.sst_fck); | ||
| 125 | clk_put(ssi.sst_fck); | 127 | clk_put(ssi.sst_fck); |
| 128 | clk_unprepare(ssi.ssr_fck); | ||
| 126 | clk_put(ssi.ssr_fck); | 129 | clk_put(ssi.ssr_fck); |
| 130 | clk_unprepare(ssi.ick); | ||
| 127 | clk_put(ssi.ick); | 131 | clk_put(ssi.ick); |
| 128 | } | 132 | } |
| 129 | 133 | ||
| @@ -145,14 +149,21 @@ void dsp_clk_init(void) | |||
| 145 | iva2_clk = clk_get(&dspbridge_device.dev, "iva2_ck"); | 149 | iva2_clk = clk_get(&dspbridge_device.dev, "iva2_ck"); |
| 146 | if (IS_ERR(iva2_clk)) | 150 | if (IS_ERR(iva2_clk)) |
| 147 | dev_err(bridge, "failed to get iva2 clock %p\n", iva2_clk); | 151 | dev_err(bridge, "failed to get iva2 clock %p\n", iva2_clk); |
| 152 | else | ||
| 153 | clk_prepare(iva2_clk); | ||
| 148 | 154 | ||
| 149 | ssi.sst_fck = clk_get(&dspbridge_device.dev, "ssi_sst_fck"); | 155 | ssi.sst_fck = clk_get(&dspbridge_device.dev, "ssi_sst_fck"); |
| 150 | ssi.ssr_fck = clk_get(&dspbridge_device.dev, "ssi_ssr_fck"); | 156 | ssi.ssr_fck = clk_get(&dspbridge_device.dev, "ssi_ssr_fck"); |
| 151 | ssi.ick = clk_get(&dspbridge_device.dev, "ssi_ick"); | 157 | ssi.ick = clk_get(&dspbridge_device.dev, "ssi_ick"); |
| 152 | 158 | ||
| 153 | if (IS_ERR(ssi.sst_fck) || IS_ERR(ssi.ssr_fck) || IS_ERR(ssi.ick)) | 159 | if (IS_ERR(ssi.sst_fck) || IS_ERR(ssi.ssr_fck) || IS_ERR(ssi.ick)) { |
| 154 | dev_err(bridge, "failed to get ssi: sst %p, ssr %p, ick %p\n", | 160 | dev_err(bridge, "failed to get ssi: sst %p, ssr %p, ick %p\n", |
| 155 | ssi.sst_fck, ssi.ssr_fck, ssi.ick); | 161 | ssi.sst_fck, ssi.ssr_fck, ssi.ick); |
| 162 | } else { | ||
| 163 | clk_prepare(ssi.sst_fck); | ||
| 164 | clk_prepare(ssi.ssr_fck); | ||
| 165 | clk_prepare(ssi.ick); | ||
| 166 | } | ||
| 156 | } | 167 | } |
| 157 | 168 | ||
| 158 | /** | 169 | /** |
diff --git a/drivers/staging/tidspbridge/core/wdt.c b/drivers/staging/tidspbridge/core/wdt.c index 1dce36fb828f..7ff0e6c98039 100644 --- a/drivers/staging/tidspbridge/core/wdt.c +++ b/drivers/staging/tidspbridge/core/wdt.c | |||
| @@ -63,11 +63,15 @@ int dsp_wdt_init(void) | |||
| 63 | dsp_wdt.fclk = clk_get(NULL, "wdt3_fck"); | 63 | dsp_wdt.fclk = clk_get(NULL, "wdt3_fck"); |
| 64 | 64 | ||
| 65 | if (!IS_ERR(dsp_wdt.fclk)) { | 65 | if (!IS_ERR(dsp_wdt.fclk)) { |
| 66 | clk_prepare(dsp_wdt.fclk); | ||
| 67 | |||
| 66 | dsp_wdt.iclk = clk_get(NULL, "wdt3_ick"); | 68 | dsp_wdt.iclk = clk_get(NULL, "wdt3_ick"); |
| 67 | if (IS_ERR(dsp_wdt.iclk)) { | 69 | if (IS_ERR(dsp_wdt.iclk)) { |
| 68 | clk_put(dsp_wdt.fclk); | 70 | clk_put(dsp_wdt.fclk); |
| 69 | dsp_wdt.fclk = NULL; | 71 | dsp_wdt.fclk = NULL; |
| 70 | ret = -EFAULT; | 72 | ret = -EFAULT; |
| 73 | } else { | ||
| 74 | clk_prepare(dsp_wdt.iclk); | ||
| 71 | } | 75 | } |
| 72 | } else | 76 | } else |
| 73 | ret = -EFAULT; | 77 | ret = -EFAULT; |
| @@ -95,10 +99,14 @@ void dsp_wdt_exit(void) | |||
| 95 | free_irq(INT_34XX_WDT3_IRQ, &dsp_wdt); | 99 | free_irq(INT_34XX_WDT3_IRQ, &dsp_wdt); |
| 96 | tasklet_kill(&dsp_wdt.wdt3_tasklet); | 100 | tasklet_kill(&dsp_wdt.wdt3_tasklet); |
| 97 | 101 | ||
| 98 | if (dsp_wdt.fclk) | 102 | if (dsp_wdt.fclk) { |
| 103 | clk_unprepare(dsp_wdt.fclk); | ||
| 99 | clk_put(dsp_wdt.fclk); | 104 | clk_put(dsp_wdt.fclk); |
| 100 | if (dsp_wdt.iclk) | 105 | } |
| 106 | if (dsp_wdt.iclk) { | ||
| 107 | clk_unprepare(dsp_wdt.iclk); | ||
| 101 | clk_put(dsp_wdt.iclk); | 108 | clk_put(dsp_wdt.iclk); |
| 109 | } | ||
| 102 | 110 | ||
| 103 | dsp_wdt.fclk = NULL; | 111 | dsp_wdt.fclk = NULL; |
| 104 | dsp_wdt.iclk = NULL; | 112 | dsp_wdt.iclk = NULL; |
diff --git a/drivers/staging/vme/devices/vme_pio2_core.c b/drivers/staging/vme/devices/vme_pio2_core.c index 0331178ca3b3..bf73ba26e88a 100644 --- a/drivers/staging/vme/devices/vme_pio2_core.c +++ b/drivers/staging/vme/devices/vme_pio2_core.c | |||
| @@ -162,11 +162,9 @@ static struct vme_driver pio2_driver = { | |||
| 162 | 162 | ||
| 163 | static int __init pio2_init(void) | 163 | static int __init pio2_init(void) |
| 164 | { | 164 | { |
| 165 | int retval = 0; | ||
| 166 | |||
| 167 | if (bus_num == 0) { | 165 | if (bus_num == 0) { |
| 168 | pr_err("No cards, skipping registration\n"); | 166 | pr_err("No cards, skipping registration\n"); |
| 169 | goto err_nocard; | 167 | return -ENODEV; |
| 170 | } | 168 | } |
| 171 | 169 | ||
| 172 | if (bus_num > PIO2_CARDS_MAX) { | 170 | if (bus_num > PIO2_CARDS_MAX) { |
| @@ -176,15 +174,7 @@ static int __init pio2_init(void) | |||
| 176 | } | 174 | } |
| 177 | 175 | ||
| 178 | /* Register the PIO2 driver */ | 176 | /* Register the PIO2 driver */ |
| 179 | retval = vme_register_driver(&pio2_driver, bus_num); | 177 | return vme_register_driver(&pio2_driver, bus_num); |
| 180 | if (retval != 0) | ||
| 181 | goto err_reg; | ||
| 182 | |||
| 183 | return retval; | ||
| 184 | |||
| 185 | err_reg: | ||
| 186 | err_nocard: | ||
| 187 | return retval; | ||
| 188 | } | 178 | } |
| 189 | 179 | ||
| 190 | static int pio2_match(struct vme_dev *vdev) | 180 | static int pio2_match(struct vme_dev *vdev) |
diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index 18c06a59c091..1d31eab19d16 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c | |||
| @@ -638,8 +638,8 @@ int prism2_leave_ibss(struct wiphy *wiphy, struct net_device *dev) | |||
| 638 | } | 638 | } |
| 639 | 639 | ||
| 640 | 640 | ||
| 641 | int prism2_set_tx_power(struct wiphy *wiphy, enum nl80211_tx_power_setting type, | 641 | int prism2_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, |
| 642 | int mbm) | 642 | enum nl80211_tx_power_setting type, int mbm) |
| 643 | { | 643 | { |
| 644 | struct prism2_wiphy_private *priv = wiphy_priv(wiphy); | 644 | struct prism2_wiphy_private *priv = wiphy_priv(wiphy); |
| 645 | wlandevice_t *wlandev = priv->wlandev; | 645 | wlandevice_t *wlandev = priv->wlandev; |
| @@ -665,7 +665,8 @@ exit: | |||
| 665 | return err; | 665 | return err; |
| 666 | } | 666 | } |
| 667 | 667 | ||
| 668 | int prism2_get_tx_power(struct wiphy *wiphy, int *dbm) | 668 | int prism2_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, |
| 669 | int *dbm) | ||
| 669 | { | 670 | { |
| 670 | struct prism2_wiphy_private *priv = wiphy_priv(wiphy); | 671 | struct prism2_wiphy_private *priv = wiphy_priv(wiphy); |
| 671 | wlandevice_t *wlandev = priv->wlandev; | 672 | wlandevice_t *wlandev = priv->wlandev; |
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c index fb4a7c94aed3..f2a73bd739fb 100644 --- a/drivers/staging/zram/zram_drv.c +++ b/drivers/staging/zram/zram_drv.c | |||
| @@ -265,7 +265,7 @@ out_cleanup: | |||
| 265 | static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index, | 265 | static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index, |
| 266 | int offset) | 266 | int offset) |
| 267 | { | 267 | { |
| 268 | int ret; | 268 | int ret = 0; |
| 269 | size_t clen; | 269 | size_t clen; |
| 270 | unsigned long handle; | 270 | unsigned long handle; |
| 271 | struct page *page; | 271 | struct page *page; |
| @@ -286,10 +286,8 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index, | |||
| 286 | goto out; | 286 | goto out; |
| 287 | } | 287 | } |
| 288 | ret = zram_decompress_page(zram, uncmem, index); | 288 | ret = zram_decompress_page(zram, uncmem, index); |
| 289 | if (ret) { | 289 | if (ret) |
| 290 | kfree(uncmem); | ||
| 291 | goto out; | 290 | goto out; |
| 292 | } | ||
| 293 | } | 291 | } |
| 294 | 292 | ||
| 295 | /* | 293 | /* |
| @@ -302,16 +300,18 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index, | |||
| 302 | 300 | ||
| 303 | user_mem = kmap_atomic(page); | 301 | user_mem = kmap_atomic(page); |
| 304 | 302 | ||
| 305 | if (is_partial_io(bvec)) | 303 | if (is_partial_io(bvec)) { |
| 306 | memcpy(uncmem + offset, user_mem + bvec->bv_offset, | 304 | memcpy(uncmem + offset, user_mem + bvec->bv_offset, |
| 307 | bvec->bv_len); | 305 | bvec->bv_len); |
| 308 | else | 306 | kunmap_atomic(user_mem); |
| 307 | user_mem = NULL; | ||
| 308 | } else { | ||
| 309 | uncmem = user_mem; | 309 | uncmem = user_mem; |
| 310 | } | ||
| 310 | 311 | ||
| 311 | if (page_zero_filled(uncmem)) { | 312 | if (page_zero_filled(uncmem)) { |
| 312 | kunmap_atomic(user_mem); | 313 | if (!is_partial_io(bvec)) |
| 313 | if (is_partial_io(bvec)) | 314 | kunmap_atomic(user_mem); |
| 314 | kfree(uncmem); | ||
| 315 | zram_stat_inc(&zram->stats.pages_zero); | 315 | zram_stat_inc(&zram->stats.pages_zero); |
| 316 | zram_set_flag(zram, index, ZRAM_ZERO); | 316 | zram_set_flag(zram, index, ZRAM_ZERO); |
| 317 | ret = 0; | 317 | ret = 0; |
| @@ -321,9 +321,11 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index, | |||
| 321 | ret = lzo1x_1_compress(uncmem, PAGE_SIZE, src, &clen, | 321 | ret = lzo1x_1_compress(uncmem, PAGE_SIZE, src, &clen, |
| 322 | zram->compress_workmem); | 322 | zram->compress_workmem); |
| 323 | 323 | ||
| 324 | kunmap_atomic(user_mem); | 324 | if (!is_partial_io(bvec)) { |
| 325 | if (is_partial_io(bvec)) | 325 | kunmap_atomic(user_mem); |
| 326 | kfree(uncmem); | 326 | user_mem = NULL; |
| 327 | uncmem = NULL; | ||
| 328 | } | ||
| 327 | 329 | ||
| 328 | if (unlikely(ret != LZO_E_OK)) { | 330 | if (unlikely(ret != LZO_E_OK)) { |
| 329 | pr_err("Compression failed! err=%d\n", ret); | 331 | pr_err("Compression failed! err=%d\n", ret); |
| @@ -332,8 +334,10 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index, | |||
| 332 | 334 | ||
| 333 | if (unlikely(clen > max_zpage_size)) { | 335 | if (unlikely(clen > max_zpage_size)) { |
| 334 | zram_stat_inc(&zram->stats.bad_compress); | 336 | zram_stat_inc(&zram->stats.bad_compress); |
| 335 | src = uncmem; | ||
| 336 | clen = PAGE_SIZE; | 337 | clen = PAGE_SIZE; |
| 338 | src = NULL; | ||
| 339 | if (is_partial_io(bvec)) | ||
| 340 | src = uncmem; | ||
| 337 | } | 341 | } |
| 338 | 342 | ||
| 339 | handle = zs_malloc(zram->mem_pool, clen); | 343 | handle = zs_malloc(zram->mem_pool, clen); |
| @@ -345,7 +349,11 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index, | |||
| 345 | } | 349 | } |
| 346 | cmem = zs_map_object(zram->mem_pool, handle, ZS_MM_WO); | 350 | cmem = zs_map_object(zram->mem_pool, handle, ZS_MM_WO); |
| 347 | 351 | ||
| 352 | if ((clen == PAGE_SIZE) && !is_partial_io(bvec)) | ||
| 353 | src = kmap_atomic(page); | ||
| 348 | memcpy(cmem, src, clen); | 354 | memcpy(cmem, src, clen); |
| 355 | if ((clen == PAGE_SIZE) && !is_partial_io(bvec)) | ||
| 356 | kunmap_atomic(src); | ||
| 349 | 357 | ||
| 350 | zs_unmap_object(zram->mem_pool, handle); | 358 | zs_unmap_object(zram->mem_pool, handle); |
| 351 | 359 | ||
| @@ -358,9 +366,10 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index, | |||
| 358 | if (clen <= PAGE_SIZE / 2) | 366 | if (clen <= PAGE_SIZE / 2) |
| 359 | zram_stat_inc(&zram->stats.good_compress); | 367 | zram_stat_inc(&zram->stats.good_compress); |
| 360 | 368 | ||
| 361 | return 0; | ||
| 362 | |||
| 363 | out: | 369 | out: |
| 370 | if (is_partial_io(bvec)) | ||
| 371 | kfree(uncmem); | ||
| 372 | |||
| 364 | if (ret) | 373 | if (ret) |
| 365 | zram_stat64_inc(zram, &zram->stats.failed_writes); | 374 | zram_stat64_inc(zram, &zram->stats.failed_writes); |
| 366 | return ret; | 375 | return ret; |
diff --git a/drivers/target/iscsi/iscsi_target_erl2.c b/drivers/target/iscsi/iscsi_target_erl2.c index 9ac4c151eae4..ba6091bf93fc 100644 --- a/drivers/target/iscsi/iscsi_target_erl2.c +++ b/drivers/target/iscsi/iscsi_target_erl2.c | |||
| @@ -372,7 +372,7 @@ int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn) | |||
| 372 | * made generic here. | 372 | * made generic here. |
| 373 | */ | 373 | */ |
| 374 | if (!(cmd->cmd_flags & ICF_OOO_CMDSN) && !cmd->immediate_cmd && | 374 | if (!(cmd->cmd_flags & ICF_OOO_CMDSN) && !cmd->immediate_cmd && |
| 375 | iscsi_sna_gte(cmd->stat_sn, conn->sess->exp_cmd_sn)) { | 375 | iscsi_sna_gte(cmd->cmd_sn, conn->sess->exp_cmd_sn)) { |
| 376 | list_del(&cmd->i_conn_node); | 376 | list_del(&cmd->i_conn_node); |
| 377 | spin_unlock_bh(&conn->cmd_lock); | 377 | spin_unlock_bh(&conn->cmd_lock); |
| 378 | iscsit_free_cmd(cmd); | 378 | iscsit_free_cmd(cmd); |
diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c index 85140f7dde1e..7d4ec02e29a9 100644 --- a/drivers/target/target_core_alua.c +++ b/drivers/target/target_core_alua.c | |||
| @@ -212,7 +212,7 @@ target_emulate_set_target_port_groups(struct se_cmd *cmd) | |||
| 212 | struct t10_alua_tg_pt_gp_member *tg_pt_gp_mem, *l_tg_pt_gp_mem; | 212 | struct t10_alua_tg_pt_gp_member *tg_pt_gp_mem, *l_tg_pt_gp_mem; |
| 213 | unsigned char *buf; | 213 | unsigned char *buf; |
| 214 | unsigned char *ptr; | 214 | unsigned char *ptr; |
| 215 | sense_reason_t rc; | 215 | sense_reason_t rc = TCM_NO_SENSE; |
| 216 | u32 len = 4; /* Skip over RESERVED area in header */ | 216 | u32 len = 4; /* Skip over RESERVED area in header */ |
| 217 | int alua_access_state, primary = 0; | 217 | int alua_access_state, primary = 0; |
| 218 | u16 tg_pt_id, rtpi; | 218 | u16 tg_pt_id, rtpi; |
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index e35dbf85841f..8e0290b38e43 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c | |||
| @@ -2053,7 +2053,7 @@ core_scsi3_emulate_pro_register(struct se_cmd *cmd, u64 res_key, u64 sa_res_key, | |||
| 2053 | /* Used for APTPL metadata w/ UNREGISTER */ | 2053 | /* Used for APTPL metadata w/ UNREGISTER */ |
| 2054 | unsigned char *pr_aptpl_buf = NULL; | 2054 | unsigned char *pr_aptpl_buf = NULL; |
| 2055 | unsigned char isid_buf[PR_REG_ISID_LEN], *isid_ptr = NULL; | 2055 | unsigned char isid_buf[PR_REG_ISID_LEN], *isid_ptr = NULL; |
| 2056 | sense_reason_t ret; | 2056 | sense_reason_t ret = TCM_NO_SENSE; |
| 2057 | int pr_holder = 0, type; | 2057 | int pr_holder = 0, type; |
| 2058 | 2058 | ||
| 2059 | if (!se_sess || !se_lun) { | 2059 | if (!se_sess || !se_lun) { |
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index c23c76ccef65..bd587b70661a 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
| @@ -541,9 +541,6 @@ static void transport_lun_remove_cmd(struct se_cmd *cmd) | |||
| 541 | 541 | ||
| 542 | void transport_cmd_finish_abort(struct se_cmd *cmd, int remove) | 542 | void transport_cmd_finish_abort(struct se_cmd *cmd, int remove) |
| 543 | { | 543 | { |
| 544 | if (!(cmd->se_cmd_flags & SCF_SCSI_TMR_CDB)) | ||
| 545 | transport_lun_remove_cmd(cmd); | ||
| 546 | |||
| 547 | if (transport_cmd_check_stop_to_fabric(cmd)) | 544 | if (transport_cmd_check_stop_to_fabric(cmd)) |
| 548 | return; | 545 | return; |
| 549 | if (remove) | 546 | if (remove) |
| @@ -1396,6 +1393,8 @@ static void target_complete_tmr_failure(struct work_struct *work) | |||
| 1396 | 1393 | ||
| 1397 | se_cmd->se_tmr_req->response = TMR_LUN_DOES_NOT_EXIST; | 1394 | se_cmd->se_tmr_req->response = TMR_LUN_DOES_NOT_EXIST; |
| 1398 | se_cmd->se_tfo->queue_tm_rsp(se_cmd); | 1395 | se_cmd->se_tfo->queue_tm_rsp(se_cmd); |
| 1396 | |||
| 1397 | transport_cmd_check_stop_to_fabric(se_cmd); | ||
| 1399 | } | 1398 | } |
| 1400 | 1399 | ||
| 1401 | /** | 1400 | /** |
| @@ -1688,6 +1687,7 @@ void target_execute_cmd(struct se_cmd *cmd) | |||
| 1688 | } | 1687 | } |
| 1689 | 1688 | ||
| 1690 | cmd->t_state = TRANSPORT_PROCESSING; | 1689 | cmd->t_state = TRANSPORT_PROCESSING; |
| 1690 | cmd->transport_state |= CMD_T_ACTIVE; | ||
| 1691 | spin_unlock_irq(&cmd->t_state_lock); | 1691 | spin_unlock_irq(&cmd->t_state_lock); |
| 1692 | 1692 | ||
| 1693 | if (!target_handle_task_attr(cmd)) | 1693 | if (!target_handle_task_attr(cmd)) |
| @@ -2597,6 +2597,16 @@ transport_send_check_condition_and_sense(struct se_cmd *cmd, | |||
| 2597 | * SENSE KEY values from include/scsi/scsi.h | 2597 | * SENSE KEY values from include/scsi/scsi.h |
| 2598 | */ | 2598 | */ |
| 2599 | switch (reason) { | 2599 | switch (reason) { |
| 2600 | case TCM_NO_SENSE: | ||
| 2601 | /* CURRENT ERROR */ | ||
| 2602 | buffer[0] = 0x70; | ||
| 2603 | buffer[SPC_ADD_SENSE_LEN_OFFSET] = 10; | ||
| 2604 | /* Not Ready */ | ||
| 2605 | buffer[SPC_SENSE_KEY_OFFSET] = NOT_READY; | ||
| 2606 | /* NO ADDITIONAL SENSE INFORMATION */ | ||
| 2607 | buffer[SPC_ASC_KEY_OFFSET] = 0; | ||
| 2608 | buffer[SPC_ASCQ_KEY_OFFSET] = 0; | ||
| 2609 | break; | ||
| 2600 | case TCM_NON_EXISTENT_LUN: | 2610 | case TCM_NON_EXISTENT_LUN: |
| 2601 | /* CURRENT ERROR */ | 2611 | /* CURRENT ERROR */ |
| 2602 | buffer[0] = 0x70; | 2612 | buffer[0] = 0x70; |
| @@ -2743,7 +2753,7 @@ transport_send_check_condition_and_sense(struct se_cmd *cmd, | |||
| 2743 | /* ILLEGAL REQUEST */ | 2753 | /* ILLEGAL REQUEST */ |
| 2744 | buffer[SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; | 2754 | buffer[SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; |
| 2745 | /* LOGICAL UNIT COMMUNICATION FAILURE */ | 2755 | /* LOGICAL UNIT COMMUNICATION FAILURE */ |
| 2746 | buffer[SPC_ASC_KEY_OFFSET] = 0x80; | 2756 | buffer[SPC_ASC_KEY_OFFSET] = 0x08; |
| 2747 | break; | 2757 | break; |
| 2748 | } | 2758 | } |
| 2749 | /* | 2759 | /* |
| @@ -2804,6 +2814,8 @@ void transport_send_task_abort(struct se_cmd *cmd) | |||
| 2804 | } | 2814 | } |
| 2805 | cmd->scsi_status = SAM_STAT_TASK_ABORTED; | 2815 | cmd->scsi_status = SAM_STAT_TASK_ABORTED; |
| 2806 | 2816 | ||
| 2817 | transport_lun_remove_cmd(cmd); | ||
| 2818 | |||
| 2807 | pr_debug("Setting SAM_STAT_TASK_ABORTED status for CDB: 0x%02x," | 2819 | pr_debug("Setting SAM_STAT_TASK_ABORTED status for CDB: 0x%02x," |
| 2808 | " ITT: 0x%08x\n", cmd->t_task_cdb[0], | 2820 | " ITT: 0x%08x\n", cmd->t_task_cdb[0], |
| 2809 | cmd->se_tfo->get_task_tag(cmd)); | 2821 | cmd->se_tfo->get_task_tag(cmd)); |
diff --git a/drivers/target/tcm_fc/tfc_sess.c b/drivers/target/tcm_fc/tfc_sess.c index 12d6fa21e5e1..6659dd36e806 100644 --- a/drivers/target/tcm_fc/tfc_sess.c +++ b/drivers/target/tcm_fc/tfc_sess.c | |||
| @@ -355,11 +355,11 @@ static int ft_prli_locked(struct fc_rport_priv *rdata, u32 spp_len, | |||
| 355 | 355 | ||
| 356 | tport = ft_tport_create(rdata->local_port); | 356 | tport = ft_tport_create(rdata->local_port); |
| 357 | if (!tport) | 357 | if (!tport) |
| 358 | return 0; /* not a target for this local port */ | 358 | goto not_target; /* not a target for this local port */ |
| 359 | 359 | ||
| 360 | acl = ft_acl_get(tport->tpg, rdata); | 360 | acl = ft_acl_get(tport->tpg, rdata); |
| 361 | if (!acl) | 361 | if (!acl) |
| 362 | return 0; | 362 | goto not_target; /* no target for this remote */ |
| 363 | 363 | ||
| 364 | if (!rspp) | 364 | if (!rspp) |
| 365 | goto fill; | 365 | goto fill; |
| @@ -396,12 +396,18 @@ static int ft_prli_locked(struct fc_rport_priv *rdata, u32 spp_len, | |||
| 396 | 396 | ||
| 397 | /* | 397 | /* |
| 398 | * OR in our service parameters with other provider (initiator), if any. | 398 | * OR in our service parameters with other provider (initiator), if any. |
| 399 | * TBD XXX - indicate RETRY capability? | ||
| 400 | */ | 399 | */ |
| 401 | fill: | 400 | fill: |
| 402 | fcp_parm = ntohl(spp->spp_params); | 401 | fcp_parm = ntohl(spp->spp_params); |
| 402 | fcp_parm &= ~FCP_SPPF_RETRY; | ||
| 403 | spp->spp_params = htonl(fcp_parm | FCP_SPPF_TARG_FCN); | 403 | spp->spp_params = htonl(fcp_parm | FCP_SPPF_TARG_FCN); |
| 404 | return FC_SPP_RESP_ACK; | 404 | return FC_SPP_RESP_ACK; |
| 405 | |||
| 406 | not_target: | ||
| 407 | fcp_parm = ntohl(spp->spp_params); | ||
| 408 | fcp_parm &= ~FCP_SPPF_TARG_FCN; | ||
| 409 | spp->spp_params = htonl(fcp_parm); | ||
| 410 | return 0; | ||
| 405 | } | 411 | } |
| 406 | 412 | ||
| 407 | /** | 413 | /** |
diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c index 7772d1603769..224751e9f5ff 100644 --- a/drivers/thermal/exynos_thermal.c +++ b/drivers/thermal/exynos_thermal.c | |||
| @@ -832,7 +832,7 @@ static inline struct exynos_tmu_platform_data *exynos_get_driver_data( | |||
| 832 | return (struct exynos_tmu_platform_data *) | 832 | return (struct exynos_tmu_platform_data *) |
| 833 | platform_get_device_id(pdev)->driver_data; | 833 | platform_get_device_id(pdev)->driver_data; |
| 834 | } | 834 | } |
| 835 | static int __devinit exynos_tmu_probe(struct platform_device *pdev) | 835 | static int exynos_tmu_probe(struct platform_device *pdev) |
| 836 | { | 836 | { |
| 837 | struct exynos_tmu_data *data; | 837 | struct exynos_tmu_data *data; |
| 838 | struct exynos_tmu_platform_data *pdata = pdev->dev.platform_data; | 838 | struct exynos_tmu_platform_data *pdata = pdev->dev.platform_data; |
| @@ -937,7 +937,7 @@ err_clk: | |||
| 937 | return ret; | 937 | return ret; |
| 938 | } | 938 | } |
| 939 | 939 | ||
| 940 | static int __devexit exynos_tmu_remove(struct platform_device *pdev) | 940 | static int exynos_tmu_remove(struct platform_device *pdev) |
| 941 | { | 941 | { |
| 942 | struct exynos_tmu_data *data = platform_get_drvdata(pdev); | 942 | struct exynos_tmu_data *data = platform_get_drvdata(pdev); |
| 943 | 943 | ||
| @@ -985,7 +985,7 @@ static struct platform_driver exynos_tmu_driver = { | |||
| 985 | .of_match_table = exynos_tmu_match, | 985 | .of_match_table = exynos_tmu_match, |
| 986 | }, | 986 | }, |
| 987 | .probe = exynos_tmu_probe, | 987 | .probe = exynos_tmu_probe, |
| 988 | .remove = __devexit_p(exynos_tmu_remove), | 988 | .remove = exynos_tmu_remove, |
| 989 | .id_table = exynos_tmu_driver_ids, | 989 | .id_table = exynos_tmu_driver_ids, |
| 990 | }; | 990 | }; |
| 991 | 991 | ||
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 2e43b332aae8..2fdd767f8fe8 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
| @@ -1605,6 +1605,7 @@ static int dwc3_gadget_init_endpoints(struct dwc3 *dwc) | |||
| 1605 | 1605 | ||
| 1606 | if (epnum == 0 || epnum == 1) { | 1606 | if (epnum == 0 || epnum == 1) { |
| 1607 | dep->endpoint.maxpacket = 512; | 1607 | dep->endpoint.maxpacket = 512; |
| 1608 | dep->endpoint.maxburst = 1; | ||
| 1608 | dep->endpoint.ops = &dwc3_gadget_ep0_ops; | 1609 | dep->endpoint.ops = &dwc3_gadget_ep0_ops; |
| 1609 | if (!epnum) | 1610 | if (!epnum) |
| 1610 | dwc->gadget.ep0 = &dep->endpoint; | 1611 | dwc->gadget.ep0 = &dep->endpoint; |
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index 4a6961c517f2..8c2f25121149 100644 --- a/drivers/usb/gadget/f_fs.c +++ b/drivers/usb/gadget/f_fs.c | |||
| @@ -1153,15 +1153,15 @@ static int ffs_fs_parse_opts(struct ffs_sb_fill_data *data, char *opts) | |||
| 1153 | pr_err("%s: unmapped value: %lu\n", opts, value); | 1153 | pr_err("%s: unmapped value: %lu\n", opts, value); |
| 1154 | return -EINVAL; | 1154 | return -EINVAL; |
| 1155 | } | 1155 | } |
| 1156 | } | 1156 | } else if (!memcmp(opts, "gid", 3)) { |
| 1157 | else if (!memcmp(opts, "gid", 3)) | ||
| 1158 | data->perms.gid = make_kgid(current_user_ns(), value); | 1157 | data->perms.gid = make_kgid(current_user_ns(), value); |
| 1159 | if (!gid_valid(data->perms.gid)) { | 1158 | if (!gid_valid(data->perms.gid)) { |
| 1160 | pr_err("%s: unmapped value: %lu\n", opts, value); | 1159 | pr_err("%s: unmapped value: %lu\n", opts, value); |
| 1161 | return -EINVAL; | 1160 | return -EINVAL; |
| 1162 | } | 1161 | } |
| 1163 | else | 1162 | } else { |
| 1164 | goto invalid; | 1163 | goto invalid; |
| 1164 | } | ||
| 1165 | break; | 1165 | break; |
| 1166 | 1166 | ||
| 1167 | default: | 1167 | default: |
diff --git a/drivers/usb/gadget/fsl_mxc_udc.c b/drivers/usb/gadget/fsl_mxc_udc.c index 1b0f086426bd..d3bd7b095ba3 100644 --- a/drivers/usb/gadget/fsl_mxc_udc.c +++ b/drivers/usb/gadget/fsl_mxc_udc.c | |||
| @@ -18,14 +18,13 @@ | |||
| 18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
| 19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
| 20 | 20 | ||
| 21 | #include <mach/hardware.h> | ||
| 22 | |||
| 23 | static struct clk *mxc_ahb_clk; | 21 | static struct clk *mxc_ahb_clk; |
| 24 | static struct clk *mxc_per_clk; | 22 | static struct clk *mxc_per_clk; |
| 25 | static struct clk *mxc_ipg_clk; | 23 | static struct clk *mxc_ipg_clk; |
| 26 | 24 | ||
| 27 | /* workaround ENGcm09152 for i.MX35 */ | 25 | /* workaround ENGcm09152 for i.MX35 */ |
| 28 | #define USBPHYCTRL_OTGBASE_OFFSET 0x608 | 26 | #define MX35_USBPHYCTRL_OFFSET 0x600 |
| 27 | #define USBPHYCTRL_OTGBASE_OFFSET 0x8 | ||
| 29 | #define USBPHYCTRL_EVDO (1 << 23) | 28 | #define USBPHYCTRL_EVDO (1 << 23) |
| 30 | 29 | ||
| 31 | int fsl_udc_clk_init(struct platform_device *pdev) | 30 | int fsl_udc_clk_init(struct platform_device *pdev) |
| @@ -59,7 +58,7 @@ int fsl_udc_clk_init(struct platform_device *pdev) | |||
| 59 | clk_prepare_enable(mxc_per_clk); | 58 | clk_prepare_enable(mxc_per_clk); |
| 60 | 59 | ||
| 61 | /* make sure USB_CLK is running at 60 MHz +/- 1000 Hz */ | 60 | /* make sure USB_CLK is running at 60 MHz +/- 1000 Hz */ |
| 62 | if (!cpu_is_mx51()) { | 61 | if (!strcmp(pdev->id_entry->name, "imx-udc-mx27")) { |
| 63 | freq = clk_get_rate(mxc_per_clk); | 62 | freq = clk_get_rate(mxc_per_clk); |
| 64 | if (pdata->phy_mode != FSL_USB2_PHY_ULPI && | 63 | if (pdata->phy_mode != FSL_USB2_PHY_ULPI && |
| 65 | (freq < 59999000 || freq > 60001000)) { | 64 | (freq < 59999000 || freq > 60001000)) { |
| @@ -79,27 +78,40 @@ eclkrate: | |||
| 79 | return ret; | 78 | return ret; |
| 80 | } | 79 | } |
| 81 | 80 | ||
| 82 | void fsl_udc_clk_finalize(struct platform_device *pdev) | 81 | int fsl_udc_clk_finalize(struct platform_device *pdev) |
| 83 | { | 82 | { |
| 84 | struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; | 83 | struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; |
| 85 | if (cpu_is_mx35()) { | 84 | int ret = 0; |
| 86 | unsigned int v; | ||
| 87 | 85 | ||
| 88 | /* workaround ENGcm09152 for i.MX35 */ | 86 | /* workaround ENGcm09152 for i.MX35 */ |
| 89 | if (pdata->workaround & FLS_USB2_WORKAROUND_ENGCM09152) { | 87 | if (pdata->workaround & FLS_USB2_WORKAROUND_ENGCM09152) { |
| 90 | v = readl(MX35_IO_ADDRESS(MX35_USB_BASE_ADDR + | 88 | unsigned int v; |
| 91 | USBPHYCTRL_OTGBASE_OFFSET)); | 89 | struct resource *res = platform_get_resource |
| 92 | writel(v | USBPHYCTRL_EVDO, | 90 | (pdev, IORESOURCE_MEM, 0); |
| 93 | MX35_IO_ADDRESS(MX35_USB_BASE_ADDR + | 91 | void __iomem *phy_regs = ioremap(res->start + |
| 94 | USBPHYCTRL_OTGBASE_OFFSET)); | 92 | MX35_USBPHYCTRL_OFFSET, 512); |
| 93 | if (!phy_regs) { | ||
| 94 | dev_err(&pdev->dev, "ioremap for phy address fails\n"); | ||
| 95 | ret = -EINVAL; | ||
| 96 | goto ioremap_err; | ||
| 95 | } | 97 | } |
| 98 | |||
| 99 | v = readl(phy_regs + USBPHYCTRL_OTGBASE_OFFSET); | ||
| 100 | writel(v | USBPHYCTRL_EVDO, | ||
| 101 | phy_regs + USBPHYCTRL_OTGBASE_OFFSET); | ||
| 102 | |||
| 103 | iounmap(phy_regs); | ||
| 96 | } | 104 | } |
| 97 | 105 | ||
| 106 | |||
| 107 | ioremap_err: | ||
| 98 | /* ULPI transceivers don't need usbpll */ | 108 | /* ULPI transceivers don't need usbpll */ |
| 99 | if (pdata->phy_mode == FSL_USB2_PHY_ULPI) { | 109 | if (pdata->phy_mode == FSL_USB2_PHY_ULPI) { |
| 100 | clk_disable_unprepare(mxc_per_clk); | 110 | clk_disable_unprepare(mxc_per_clk); |
| 101 | mxc_per_clk = NULL; | 111 | mxc_per_clk = NULL; |
| 102 | } | 112 | } |
| 113 | |||
| 114 | return ret; | ||
| 103 | } | 115 | } |
| 104 | 116 | ||
| 105 | void fsl_udc_clk_release(void) | 117 | void fsl_udc_clk_release(void) |
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c index c19f7f13790b..667275cb7bad 100644 --- a/drivers/usb/gadget/fsl_udc_core.c +++ b/drivers/usb/gadget/fsl_udc_core.c | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | #include <linux/fsl_devices.h> | 41 | #include <linux/fsl_devices.h> |
| 42 | #include <linux/dmapool.h> | 42 | #include <linux/dmapool.h> |
| 43 | #include <linux/delay.h> | 43 | #include <linux/delay.h> |
| 44 | #include <linux/of_device.h> | ||
| 44 | 45 | ||
| 45 | #include <asm/byteorder.h> | 46 | #include <asm/byteorder.h> |
| 46 | #include <asm/io.h> | 47 | #include <asm/io.h> |
| @@ -2438,11 +2439,6 @@ static int __init fsl_udc_probe(struct platform_device *pdev) | |||
| 2438 | unsigned int i; | 2439 | unsigned int i; |
| 2439 | u32 dccparams; | 2440 | u32 dccparams; |
| 2440 | 2441 | ||
| 2441 | if (strcmp(pdev->name, driver_name)) { | ||
| 2442 | VDBG("Wrong device"); | ||
| 2443 | return -ENODEV; | ||
| 2444 | } | ||
| 2445 | |||
| 2446 | udc_controller = kzalloc(sizeof(struct fsl_udc), GFP_KERNEL); | 2442 | udc_controller = kzalloc(sizeof(struct fsl_udc), GFP_KERNEL); |
| 2447 | if (udc_controller == NULL) { | 2443 | if (udc_controller == NULL) { |
| 2448 | ERR("malloc udc failed\n"); | 2444 | ERR("malloc udc failed\n"); |
| @@ -2547,7 +2543,9 @@ static int __init fsl_udc_probe(struct platform_device *pdev) | |||
| 2547 | dr_controller_setup(udc_controller); | 2543 | dr_controller_setup(udc_controller); |
| 2548 | } | 2544 | } |
| 2549 | 2545 | ||
| 2550 | fsl_udc_clk_finalize(pdev); | 2546 | ret = fsl_udc_clk_finalize(pdev); |
| 2547 | if (ret) | ||
| 2548 | goto err_free_irq; | ||
| 2551 | 2549 | ||
| 2552 | /* Setup gadget structure */ | 2550 | /* Setup gadget structure */ |
| 2553 | udc_controller->gadget.ops = &fsl_gadget_ops; | 2551 | udc_controller->gadget.ops = &fsl_gadget_ops; |
| @@ -2756,22 +2754,32 @@ static int fsl_udc_otg_resume(struct device *dev) | |||
| 2756 | 2754 | ||
| 2757 | return fsl_udc_resume(NULL); | 2755 | return fsl_udc_resume(NULL); |
| 2758 | } | 2756 | } |
| 2759 | |||
| 2760 | /*------------------------------------------------------------------------- | 2757 | /*------------------------------------------------------------------------- |
| 2761 | Register entry point for the peripheral controller driver | 2758 | Register entry point for the peripheral controller driver |
| 2762 | --------------------------------------------------------------------------*/ | 2759 | --------------------------------------------------------------------------*/ |
| 2763 | 2760 | static const struct platform_device_id fsl_udc_devtype[] = { | |
| 2761 | { | ||
| 2762 | .name = "imx-udc-mx27", | ||
| 2763 | }, { | ||
| 2764 | .name = "imx-udc-mx51", | ||
| 2765 | }, { | ||
| 2766 | /* sentinel */ | ||
| 2767 | } | ||
| 2768 | }; | ||
| 2769 | MODULE_DEVICE_TABLE(platform, fsl_udc_devtype); | ||
| 2764 | static struct platform_driver udc_driver = { | 2770 | static struct platform_driver udc_driver = { |
| 2765 | .remove = __exit_p(fsl_udc_remove), | 2771 | .remove = __exit_p(fsl_udc_remove), |
| 2772 | /* Just for FSL i.mx SoC currently */ | ||
| 2773 | .id_table = fsl_udc_devtype, | ||
| 2766 | /* these suspend and resume are not usb suspend and resume */ | 2774 | /* these suspend and resume are not usb suspend and resume */ |
| 2767 | .suspend = fsl_udc_suspend, | 2775 | .suspend = fsl_udc_suspend, |
| 2768 | .resume = fsl_udc_resume, | 2776 | .resume = fsl_udc_resume, |
| 2769 | .driver = { | 2777 | .driver = { |
| 2770 | .name = (char *)driver_name, | 2778 | .name = (char *)driver_name, |
| 2771 | .owner = THIS_MODULE, | 2779 | .owner = THIS_MODULE, |
| 2772 | /* udc suspend/resume called from OTG driver */ | 2780 | /* udc suspend/resume called from OTG driver */ |
| 2773 | .suspend = fsl_udc_otg_suspend, | 2781 | .suspend = fsl_udc_otg_suspend, |
| 2774 | .resume = fsl_udc_otg_resume, | 2782 | .resume = fsl_udc_otg_resume, |
| 2775 | }, | 2783 | }, |
| 2776 | }; | 2784 | }; |
| 2777 | 2785 | ||
diff --git a/drivers/usb/gadget/fsl_usb2_udc.h b/drivers/usb/gadget/fsl_usb2_udc.h index f61a967f7082..c6703bb07b23 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.h +++ b/drivers/usb/gadget/fsl_usb2_udc.h | |||
| @@ -592,15 +592,16 @@ static inline struct ep_queue_head *get_qh_by_ep(struct fsl_ep *ep) | |||
| 592 | struct platform_device; | 592 | struct platform_device; |
| 593 | #ifdef CONFIG_ARCH_MXC | 593 | #ifdef CONFIG_ARCH_MXC |
| 594 | int fsl_udc_clk_init(struct platform_device *pdev); | 594 | int fsl_udc_clk_init(struct platform_device *pdev); |
| 595 | void fsl_udc_clk_finalize(struct platform_device *pdev); | 595 | int fsl_udc_clk_finalize(struct platform_device *pdev); |
| 596 | void fsl_udc_clk_release(void); | 596 | void fsl_udc_clk_release(void); |
| 597 | #else | 597 | #else |
| 598 | static inline int fsl_udc_clk_init(struct platform_device *pdev) | 598 | static inline int fsl_udc_clk_init(struct platform_device *pdev) |
| 599 | { | 599 | { |
| 600 | return 0; | 600 | return 0; |
| 601 | } | 601 | } |
| 602 | static inline void fsl_udc_clk_finalize(struct platform_device *pdev) | 602 | static inline int fsl_udc_clk_finalize(struct platform_device *pdev) |
| 603 | { | 603 | { |
| 604 | return 0; | ||
| 604 | } | 605 | } |
| 605 | static inline void fsl_udc_clk_release(void) | 606 | static inline void fsl_udc_clk_release(void) |
| 606 | { | 607 | { |
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index a7d1f5b4c4ed..914a3ecfb5d3 100644 --- a/drivers/usb/host/ehci-orion.c +++ b/drivers/usb/host/ehci-orion.c | |||
| @@ -325,7 +325,7 @@ static int __exit ehci_orion_drv_remove(struct platform_device *pdev) | |||
| 325 | 325 | ||
| 326 | MODULE_ALIAS("platform:orion-ehci"); | 326 | MODULE_ALIAS("platform:orion-ehci"); |
| 327 | 327 | ||
| 328 | static const struct of_device_id ehci_orion_dt_ids[] __devinitdata = { | 328 | static const struct of_device_id ehci_orion_dt_ids[] = { |
| 329 | { .compatible = "marvell,orion-ehci", }, | 329 | { .compatible = "marvell,orion-ehci", }, |
| 330 | {}, | 330 | {}, |
| 331 | }; | 331 | }; |
diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c index 0968dd7a859d..f522000e8f06 100644 --- a/drivers/usb/musb/cppi_dma.c +++ b/drivers/usb/musb/cppi_dma.c | |||
| @@ -105,7 +105,7 @@ static void cppi_reset_tx(struct cppi_tx_stateram __iomem *tx, u32 ptr) | |||
| 105 | musb_writel(&tx->tx_complete, 0, ptr); | 105 | musb_writel(&tx->tx_complete, 0, ptr); |
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | static void __init cppi_pool_init(struct cppi *cppi, struct cppi_channel *c) | 108 | static void cppi_pool_init(struct cppi *cppi, struct cppi_channel *c) |
| 109 | { | 109 | { |
| 110 | int j; | 110 | int j; |
| 111 | 111 | ||
| @@ -150,7 +150,7 @@ static void cppi_pool_free(struct cppi_channel *c) | |||
| 150 | c->last_processed = NULL; | 150 | c->last_processed = NULL; |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | static int __init cppi_controller_start(struct dma_controller *c) | 153 | static int cppi_controller_start(struct dma_controller *c) |
| 154 | { | 154 | { |
| 155 | struct cppi *controller; | 155 | struct cppi *controller; |
| 156 | void __iomem *tibase; | 156 | void __iomem *tibase; |
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c index b303f1715065..6488a7351a60 100644 --- a/drivers/video/acornfb.c +++ b/drivers/video/acornfb.c | |||
| @@ -66,7 +66,7 @@ | |||
| 66 | * have. Allow 1% either way on the nominal for TVs. | 66 | * have. Allow 1% either way on the nominal for TVs. |
| 67 | */ | 67 | */ |
| 68 | #define NR_MONTYPES 6 | 68 | #define NR_MONTYPES 6 |
| 69 | static struct fb_monspecs monspecs[NR_MONTYPES] __devinitdata = { | 69 | static struct fb_monspecs monspecs[NR_MONTYPES] = { |
| 70 | { /* TV */ | 70 | { /* TV */ |
| 71 | .hfmin = 15469, | 71 | .hfmin = 15469, |
| 72 | .hfmax = 15781, | 72 | .hfmax = 15781, |
| @@ -874,7 +874,7 @@ static struct fb_ops acornfb_ops = { | |||
| 874 | /* | 874 | /* |
| 875 | * Everything after here is initialisation!!! | 875 | * Everything after here is initialisation!!! |
| 876 | */ | 876 | */ |
| 877 | static struct fb_videomode modedb[] __devinitdata = { | 877 | static struct fb_videomode modedb[] = { |
| 878 | { /* 320x256 @ 50Hz */ | 878 | { /* 320x256 @ 50Hz */ |
| 879 | NULL, 50, 320, 256, 125000, 92, 62, 35, 19, 38, 2, | 879 | NULL, 50, 320, 256, 125000, 92, 62, 35, 19, 38, 2, |
| 880 | FB_SYNC_COMP_HIGH_ACT, | 880 | FB_SYNC_COMP_HIGH_ACT, |
| @@ -926,7 +926,7 @@ static struct fb_videomode modedb[] __devinitdata = { | |||
| 926 | } | 926 | } |
| 927 | }; | 927 | }; |
| 928 | 928 | ||
| 929 | static struct fb_videomode acornfb_default_mode __devinitdata = { | 929 | static struct fb_videomode acornfb_default_mode = { |
| 930 | .name = NULL, | 930 | .name = NULL, |
| 931 | .refresh = 60, | 931 | .refresh = 60, |
| 932 | .xres = 640, | 932 | .xres = 640, |
| @@ -942,7 +942,7 @@ static struct fb_videomode acornfb_default_mode __devinitdata = { | |||
| 942 | .vmode = FB_VMODE_NONINTERLACED | 942 | .vmode = FB_VMODE_NONINTERLACED |
| 943 | }; | 943 | }; |
| 944 | 944 | ||
| 945 | static void __devinit acornfb_init_fbinfo(void) | 945 | static void acornfb_init_fbinfo(void) |
| 946 | { | 946 | { |
| 947 | static int first = 1; | 947 | static int first = 1; |
| 948 | 948 | ||
| @@ -1018,7 +1018,7 @@ static void __devinit acornfb_init_fbinfo(void) | |||
| 1018 | * size can optionally be followed by 'M' or 'K' for | 1018 | * size can optionally be followed by 'M' or 'K' for |
| 1019 | * MB or KB respectively. | 1019 | * MB or KB respectively. |
| 1020 | */ | 1020 | */ |
| 1021 | static void __devinit acornfb_parse_mon(char *opt) | 1021 | static void acornfb_parse_mon(char *opt) |
| 1022 | { | 1022 | { |
| 1023 | char *p = opt; | 1023 | char *p = opt; |
| 1024 | 1024 | ||
| @@ -1065,7 +1065,7 @@ bad: | |||
| 1065 | current_par.montype = -1; | 1065 | current_par.montype = -1; |
| 1066 | } | 1066 | } |
| 1067 | 1067 | ||
| 1068 | static void __devinit acornfb_parse_montype(char *opt) | 1068 | static void acornfb_parse_montype(char *opt) |
| 1069 | { | 1069 | { |
| 1070 | current_par.montype = -2; | 1070 | current_par.montype = -2; |
| 1071 | 1071 | ||
| @@ -1106,7 +1106,7 @@ static void __devinit acornfb_parse_montype(char *opt) | |||
| 1106 | } | 1106 | } |
| 1107 | } | 1107 | } |
| 1108 | 1108 | ||
| 1109 | static void __devinit acornfb_parse_dram(char *opt) | 1109 | static void acornfb_parse_dram(char *opt) |
| 1110 | { | 1110 | { |
| 1111 | unsigned int size; | 1111 | unsigned int size; |
| 1112 | 1112 | ||
| @@ -1131,14 +1131,14 @@ static void __devinit acornfb_parse_dram(char *opt) | |||
| 1131 | static struct options { | 1131 | static struct options { |
| 1132 | char *name; | 1132 | char *name; |
| 1133 | void (*parse)(char *opt); | 1133 | void (*parse)(char *opt); |
| 1134 | } opt_table[] __devinitdata = { | 1134 | } opt_table[] = { |
| 1135 | { "mon", acornfb_parse_mon }, | 1135 | { "mon", acornfb_parse_mon }, |
| 1136 | { "montype", acornfb_parse_montype }, | 1136 | { "montype", acornfb_parse_montype }, |
| 1137 | { "dram", acornfb_parse_dram }, | 1137 | { "dram", acornfb_parse_dram }, |
| 1138 | { NULL, NULL } | 1138 | { NULL, NULL } |
| 1139 | }; | 1139 | }; |
| 1140 | 1140 | ||
| 1141 | static int __devinit acornfb_setup(char *options) | 1141 | static int acornfb_setup(char *options) |
| 1142 | { | 1142 | { |
| 1143 | struct options *optp; | 1143 | struct options *optp; |
| 1144 | char *opt; | 1144 | char *opt; |
| @@ -1175,7 +1175,7 @@ static int __devinit acornfb_setup(char *options) | |||
| 1175 | * Detect type of monitor connected | 1175 | * Detect type of monitor connected |
| 1176 | * For now, we just assume SVGA | 1176 | * For now, we just assume SVGA |
| 1177 | */ | 1177 | */ |
| 1178 | static int __devinit acornfb_detect_monitortype(void) | 1178 | static int acornfb_detect_monitortype(void) |
| 1179 | { | 1179 | { |
| 1180 | return 4; | 1180 | return 4; |
| 1181 | } | 1181 | } |
| @@ -1216,7 +1216,7 @@ free_unused_pages(unsigned int virtual_start, unsigned int virtual_end) | |||
| 1216 | printk("acornfb: freed %dK memory\n", mb_freed); | 1216 | printk("acornfb: freed %dK memory\n", mb_freed); |
| 1217 | } | 1217 | } |
| 1218 | 1218 | ||
| 1219 | static int __devinit acornfb_probe(struct platform_device *dev) | 1219 | static int acornfb_probe(struct platform_device *dev) |
| 1220 | { | 1220 | { |
| 1221 | unsigned long size; | 1221 | unsigned long size; |
| 1222 | u_int h_sync, v_sync; | 1222 | u_int h_sync, v_sync; |
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index 4659d5da6ff8..e43401afdd03 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c | |||
| @@ -79,7 +79,7 @@ struct arcfb_par { | |||
| 79 | spinlock_t lock; | 79 | spinlock_t lock; |
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | static struct fb_fix_screeninfo arcfb_fix __devinitdata = { | 82 | static struct fb_fix_screeninfo arcfb_fix = { |
| 83 | .id = "arcfb", | 83 | .id = "arcfb", |
| 84 | .type = FB_TYPE_PACKED_PIXELS, | 84 | .type = FB_TYPE_PACKED_PIXELS, |
| 85 | .visual = FB_VISUAL_MONO01, | 85 | .visual = FB_VISUAL_MONO01, |
| @@ -89,7 +89,7 @@ static struct fb_fix_screeninfo arcfb_fix __devinitdata = { | |||
| 89 | .accel = FB_ACCEL_NONE, | 89 | .accel = FB_ACCEL_NONE, |
| 90 | }; | 90 | }; |
| 91 | 91 | ||
| 92 | static struct fb_var_screeninfo arcfb_var __devinitdata = { | 92 | static struct fb_var_screeninfo arcfb_var = { |
| 93 | .xres = 128, | 93 | .xres = 128, |
| 94 | .yres = 64, | 94 | .yres = 64, |
| 95 | .xres_virtual = 128, | 95 | .xres_virtual = 128, |
| @@ -502,7 +502,7 @@ static struct fb_ops arcfb_ops = { | |||
| 502 | .fb_ioctl = arcfb_ioctl, | 502 | .fb_ioctl = arcfb_ioctl, |
| 503 | }; | 503 | }; |
| 504 | 504 | ||
| 505 | static int __devinit arcfb_probe(struct platform_device *dev) | 505 | static int arcfb_probe(struct platform_device *dev) |
| 506 | { | 506 | { |
| 507 | struct fb_info *info; | 507 | struct fb_info *info; |
| 508 | int retval = -ENOMEM; | 508 | int retval = -ENOMEM; |
| @@ -587,7 +587,7 @@ err: | |||
| 587 | return retval; | 587 | return retval; |
| 588 | } | 588 | } |
| 589 | 589 | ||
| 590 | static int __devexit arcfb_remove(struct platform_device *dev) | 590 | static int arcfb_remove(struct platform_device *dev) |
| 591 | { | 591 | { |
| 592 | struct fb_info *info = platform_get_drvdata(dev); | 592 | struct fb_info *info = platform_get_drvdata(dev); |
| 593 | 593 | ||
| @@ -601,7 +601,7 @@ static int __devexit arcfb_remove(struct platform_device *dev) | |||
| 601 | 601 | ||
| 602 | static struct platform_driver arcfb_driver = { | 602 | static struct platform_driver arcfb_driver = { |
| 603 | .probe = arcfb_probe, | 603 | .probe = arcfb_probe, |
| 604 | .remove = __devexit_p(arcfb_remove), | 604 | .remove = arcfb_remove, |
| 605 | .driver = { | 605 | .driver = { |
| 606 | .name = "arcfb", | 606 | .name = "arcfb", |
| 607 | }, | 607 | }, |
diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c index 555dd4c64f5b..94a51f1ef904 100644 --- a/drivers/video/arkfb.c +++ b/drivers/video/arkfb.c | |||
| @@ -100,7 +100,7 @@ static const struct svga_timing_regs ark_timing_regs = { | |||
| 100 | 100 | ||
| 101 | /* Module parameters */ | 101 | /* Module parameters */ |
| 102 | 102 | ||
| 103 | static char *mode_option __devinitdata = "640x480-8@60"; | 103 | static char *mode_option = "640x480-8@60"; |
| 104 | 104 | ||
| 105 | #ifdef CONFIG_MTRR | 105 | #ifdef CONFIG_MTRR |
| 106 | static int mtrr = 1; | 106 | static int mtrr = 1; |
| @@ -950,7 +950,7 @@ static struct fb_ops arkfb_ops = { | |||
| 950 | 950 | ||
| 951 | 951 | ||
| 952 | /* PCI probe */ | 952 | /* PCI probe */ |
| 953 | static int __devinit ark_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | 953 | static int ark_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) |
| 954 | { | 954 | { |
| 955 | struct pci_bus_region bus_reg; | 955 | struct pci_bus_region bus_reg; |
| 956 | struct resource vga_res; | 956 | struct resource vga_res; |
| @@ -1086,7 +1086,7 @@ err_enable_device: | |||
| 1086 | 1086 | ||
| 1087 | /* PCI remove */ | 1087 | /* PCI remove */ |
| 1088 | 1088 | ||
| 1089 | static void __devexit ark_pci_remove(struct pci_dev *dev) | 1089 | static void ark_pci_remove(struct pci_dev *dev) |
| 1090 | { | 1090 | { |
| 1091 | struct fb_info *info = pci_get_drvdata(dev); | 1091 | struct fb_info *info = pci_get_drvdata(dev); |
| 1092 | 1092 | ||
| @@ -1184,7 +1184,7 @@ fail: | |||
| 1184 | 1184 | ||
| 1185 | /* List of boards that we are trying to support */ | 1185 | /* List of boards that we are trying to support */ |
| 1186 | 1186 | ||
| 1187 | static struct pci_device_id ark_devices[] __devinitdata = { | 1187 | static struct pci_device_id ark_devices[] = { |
| 1188 | {PCI_DEVICE(0xEDD8, 0xA099)}, | 1188 | {PCI_DEVICE(0xEDD8, 0xA099)}, |
| 1189 | {0, 0, 0, 0, 0, 0, 0} | 1189 | {0, 0, 0, 0, 0, 0, 0} |
| 1190 | }; | 1190 | }; |
| @@ -1196,7 +1196,7 @@ static struct pci_driver arkfb_pci_driver = { | |||
| 1196 | .name = "arkfb", | 1196 | .name = "arkfb", |
| 1197 | .id_table = ark_devices, | 1197 | .id_table = ark_devices, |
| 1198 | .probe = ark_pci_probe, | 1198 | .probe = ark_pci_probe, |
| 1199 | .remove = __devexit_p(ark_pci_remove), | 1199 | .remove = ark_pci_remove, |
| 1200 | .suspend = ark_pci_suspend, | 1200 | .suspend = ark_pci_suspend, |
| 1201 | .resume = ark_pci_resume, | 1201 | .resume = ark_pci_resume, |
| 1202 | }; | 1202 | }; |
diff --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c index 8cdf88e20b4b..d5a37d62847b 100644 --- a/drivers/video/asiliantfb.c +++ b/drivers/video/asiliantfb.c | |||
| @@ -451,7 +451,7 @@ static struct chips_init_reg chips_init_xr[] = | |||
| 451 | {0xd1, 0x01}, | 451 | {0xd1, 0x01}, |
| 452 | }; | 452 | }; |
| 453 | 453 | ||
| 454 | static void __devinit chips_hw_init(struct fb_info *p) | 454 | static void chips_hw_init(struct fb_info *p) |
| 455 | { | 455 | { |
| 456 | int i; | 456 | int i; |
| 457 | 457 | ||
| @@ -474,7 +474,7 @@ static void __devinit chips_hw_init(struct fb_info *p) | |||
| 474 | write_fr(chips_init_fr[i].addr, chips_init_fr[i].data); | 474 | write_fr(chips_init_fr[i].addr, chips_init_fr[i].data); |
| 475 | } | 475 | } |
| 476 | 476 | ||
| 477 | static struct fb_fix_screeninfo asiliantfb_fix __devinitdata = { | 477 | static struct fb_fix_screeninfo asiliantfb_fix = { |
| 478 | .id = "Asiliant 69000", | 478 | .id = "Asiliant 69000", |
| 479 | .type = FB_TYPE_PACKED_PIXELS, | 479 | .type = FB_TYPE_PACKED_PIXELS, |
| 480 | .visual = FB_VISUAL_PSEUDOCOLOR, | 480 | .visual = FB_VISUAL_PSEUDOCOLOR, |
| @@ -483,7 +483,7 @@ static struct fb_fix_screeninfo asiliantfb_fix __devinitdata = { | |||
| 483 | .smem_len = 0x200000, /* 2MB */ | 483 | .smem_len = 0x200000, /* 2MB */ |
| 484 | }; | 484 | }; |
| 485 | 485 | ||
| 486 | static struct fb_var_screeninfo asiliantfb_var __devinitdata = { | 486 | static struct fb_var_screeninfo asiliantfb_var = { |
| 487 | .xres = 640, | 487 | .xres = 640, |
| 488 | .yres = 480, | 488 | .yres = 480, |
| 489 | .xres_virtual = 640, | 489 | .xres_virtual = 640, |
| @@ -504,7 +504,7 @@ static struct fb_var_screeninfo asiliantfb_var __devinitdata = { | |||
| 504 | .vsync_len = 2, | 504 | .vsync_len = 2, |
| 505 | }; | 505 | }; |
| 506 | 506 | ||
| 507 | static int __devinit init_asiliant(struct fb_info *p, unsigned long addr) | 507 | static int init_asiliant(struct fb_info *p, unsigned long addr) |
| 508 | { | 508 | { |
| 509 | int err; | 509 | int err; |
| 510 | 510 | ||
| @@ -535,8 +535,8 @@ static int __devinit init_asiliant(struct fb_info *p, unsigned long addr) | |||
| 535 | return 0; | 535 | return 0; |
| 536 | } | 536 | } |
| 537 | 537 | ||
| 538 | static int __devinit | 538 | static int asiliantfb_pci_init(struct pci_dev *dp, |
| 539 | asiliantfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent) | 539 | const struct pci_device_id *ent) |
| 540 | { | 540 | { |
| 541 | unsigned long addr, size; | 541 | unsigned long addr, size; |
| 542 | struct fb_info *p; | 542 | struct fb_info *p; |
| @@ -581,7 +581,7 @@ asiliantfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent) | |||
| 581 | return 0; | 581 | return 0; |
| 582 | } | 582 | } |
| 583 | 583 | ||
| 584 | static void __devexit asiliantfb_remove(struct pci_dev *dp) | 584 | static void asiliantfb_remove(struct pci_dev *dp) |
| 585 | { | 585 | { |
| 586 | struct fb_info *p = pci_get_drvdata(dp); | 586 | struct fb_info *p = pci_get_drvdata(dp); |
| 587 | 587 | ||
| @@ -593,7 +593,7 @@ static void __devexit asiliantfb_remove(struct pci_dev *dp) | |||
| 593 | framebuffer_release(p); | 593 | framebuffer_release(p); |
| 594 | } | 594 | } |
| 595 | 595 | ||
| 596 | static struct pci_device_id asiliantfb_pci_tbl[] __devinitdata = { | 596 | static struct pci_device_id asiliantfb_pci_tbl[] = { |
| 597 | { PCI_VENDOR_ID_CT, PCI_DEVICE_ID_CT_69000, PCI_ANY_ID, PCI_ANY_ID }, | 597 | { PCI_VENDOR_ID_CT, PCI_DEVICE_ID_CT_69000, PCI_ANY_ID, PCI_ANY_ID }, |
| 598 | { 0 } | 598 | { 0 } |
| 599 | }; | 599 | }; |
| @@ -604,7 +604,7 @@ static struct pci_driver asiliantfb_driver = { | |||
| 604 | .name = "asiliantfb", | 604 | .name = "asiliantfb", |
| 605 | .id_table = asiliantfb_pci_tbl, | 605 | .id_table = asiliantfb_pci_tbl, |
| 606 | .probe = asiliantfb_pci_init, | 606 | .probe = asiliantfb_pci_init, |
| 607 | .remove = __devexit_p(asiliantfb_remove), | 607 | .remove = asiliantfb_remove, |
| 608 | }; | 608 | }; |
| 609 | 609 | ||
| 610 | static int __init asiliantfb_init(void) | 610 | static int __init asiliantfb_init(void) |
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index 0fefa84ed9ae..8c55011313dc 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c | |||
| @@ -98,7 +98,7 @@ | |||
| 98 | 98 | ||
| 99 | #ifndef CONFIG_PPC_PMAC | 99 | #ifndef CONFIG_PPC_PMAC |
| 100 | /* default mode */ | 100 | /* default mode */ |
| 101 | static struct fb_var_screeninfo default_var __devinitdata = { | 101 | static struct fb_var_screeninfo default_var = { |
| 102 | /* 640x480, 60 Hz, Non-Interlaced (25.175 MHz dotclock) */ | 102 | /* 640x480, 60 Hz, Non-Interlaced (25.175 MHz dotclock) */ |
| 103 | 640, 480, 640, 480, 0, 0, 8, 0, | 103 | 640, 480, 640, 480, 0, 0, 8, 0, |
| 104 | {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0}, | 104 | {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0}, |
| @@ -121,7 +121,7 @@ static struct fb_var_screeninfo default_var = { | |||
| 121 | 121 | ||
| 122 | /* default modedb mode */ | 122 | /* default modedb mode */ |
| 123 | /* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */ | 123 | /* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */ |
| 124 | static struct fb_videomode defaultmode __devinitdata = { | 124 | static struct fb_videomode defaultmode = { |
| 125 | .refresh = 60, | 125 | .refresh = 60, |
| 126 | .xres = 640, | 126 | .xres = 640, |
| 127 | .yres = 480, | 127 | .yres = 480, |
| @@ -149,7 +149,7 @@ enum { | |||
| 149 | }; | 149 | }; |
| 150 | 150 | ||
| 151 | /* Must match above enum */ | 151 | /* Must match above enum */ |
| 152 | static char * const r128_family[] __devinitconst = { | 152 | static char * const r128_family[] = { |
| 153 | "AGP", | 153 | "AGP", |
| 154 | "PCI", | 154 | "PCI", |
| 155 | "PRO AGP", | 155 | "PRO AGP", |
| @@ -275,7 +275,7 @@ static struct pci_driver aty128fb_driver = { | |||
| 275 | .name = "aty128fb", | 275 | .name = "aty128fb", |
| 276 | .id_table = aty128_pci_tbl, | 276 | .id_table = aty128_pci_tbl, |
| 277 | .probe = aty128_probe, | 277 | .probe = aty128_probe, |
| 278 | .remove = __devexit_p(aty128_remove), | 278 | .remove = aty128_remove, |
| 279 | .suspend = aty128_pci_suspend, | 279 | .suspend = aty128_pci_suspend, |
| 280 | .resume = aty128_pci_resume, | 280 | .resume = aty128_pci_resume, |
| 281 | }; | 281 | }; |
| @@ -333,7 +333,7 @@ static const struct aty128_meminfo sdr_sgram = | |||
| 333 | static const struct aty128_meminfo ddr_sgram = | 333 | static const struct aty128_meminfo ddr_sgram = |
| 334 | { 4, 4, 3, 3, 2, 3, 1, 16, 31, 16, "64-bit DDR SGRAM" }; | 334 | { 4, 4, 3, 3, 2, 3, 1, 16, 31, 16, "64-bit DDR SGRAM" }; |
| 335 | 335 | ||
| 336 | static struct fb_fix_screeninfo aty128fb_fix __devinitdata = { | 336 | static struct fb_fix_screeninfo aty128fb_fix = { |
| 337 | .id = "ATY Rage128", | 337 | .id = "ATY Rage128", |
| 338 | .type = FB_TYPE_PACKED_PIXELS, | 338 | .type = FB_TYPE_PACKED_PIXELS, |
| 339 | .visual = FB_VISUAL_PSEUDOCOLOR, | 339 | .visual = FB_VISUAL_PSEUDOCOLOR, |
| @@ -343,24 +343,24 @@ static struct fb_fix_screeninfo aty128fb_fix __devinitdata = { | |||
| 343 | .accel = FB_ACCEL_ATI_RAGE128, | 343 | .accel = FB_ACCEL_ATI_RAGE128, |
| 344 | }; | 344 | }; |
| 345 | 345 | ||
| 346 | static char *mode_option __devinitdata = NULL; | 346 | static char *mode_option = NULL; |
| 347 | 347 | ||
| 348 | #ifdef CONFIG_PPC_PMAC | 348 | #ifdef CONFIG_PPC_PMAC |
| 349 | static int default_vmode __devinitdata = VMODE_1024_768_60; | 349 | static int default_vmode = VMODE_1024_768_60; |
| 350 | static int default_cmode __devinitdata = CMODE_8; | 350 | static int default_cmode = CMODE_8; |
| 351 | #endif | 351 | #endif |
| 352 | 352 | ||
| 353 | static int default_crt_on __devinitdata = 0; | 353 | static int default_crt_on = 0; |
| 354 | static int default_lcd_on __devinitdata = 1; | 354 | static int default_lcd_on = 1; |
| 355 | 355 | ||
| 356 | #ifdef CONFIG_MTRR | 356 | #ifdef CONFIG_MTRR |
| 357 | static bool mtrr = true; | 357 | static bool mtrr = true; |
| 358 | #endif | 358 | #endif |
| 359 | 359 | ||
| 360 | #ifdef CONFIG_PMAC_BACKLIGHT | 360 | #ifdef CONFIG_PMAC_BACKLIGHT |
| 361 | static int backlight __devinitdata = 1; | 361 | static int backlight = 1; |
| 362 | #else | 362 | #else |
| 363 | static int backlight __devinitdata = 0; | 363 | static int backlight = 0; |
| 364 | #endif | 364 | #endif |
| 365 | 365 | ||
| 366 | /* PLL constants */ | 366 | /* PLL constants */ |
| @@ -449,10 +449,9 @@ static int aty128_encode_var(struct fb_var_screeninfo *var, | |||
| 449 | static int aty128_decode_var(struct fb_var_screeninfo *var, | 449 | static int aty128_decode_var(struct fb_var_screeninfo *var, |
| 450 | struct aty128fb_par *par); | 450 | struct aty128fb_par *par); |
| 451 | #if 0 | 451 | #if 0 |
| 452 | static void __devinit aty128_get_pllinfo(struct aty128fb_par *par, | 452 | static void aty128_get_pllinfo(struct aty128fb_par *par, void __iomem *bios); |
| 453 | void __iomem *bios); | 453 | static void __iomem *aty128_map_ROM(struct pci_dev *pdev, |
| 454 | static void __devinit __iomem *aty128_map_ROM(struct pci_dev *pdev, | 454 | const struct aty128fb_par *par); |
| 455 | const struct aty128fb_par *par); | ||
| 456 | #endif | 455 | #endif |
| 457 | static void aty128_timings(struct aty128fb_par *par); | 456 | static void aty128_timings(struct aty128fb_par *par); |
| 458 | static void aty128_init_engine(struct aty128fb_par *par); | 457 | static void aty128_init_engine(struct aty128fb_par *par); |
| @@ -582,7 +581,7 @@ static void aty_pll_writeupdate(const struct aty128fb_par *par) | |||
| 582 | 581 | ||
| 583 | 582 | ||
| 584 | /* write to the scratch register to test r/w functionality */ | 583 | /* write to the scratch register to test r/w functionality */ |
| 585 | static int __devinit register_test(const struct aty128fb_par *par) | 584 | static int register_test(const struct aty128fb_par *par) |
| 586 | { | 585 | { |
| 587 | u32 val; | 586 | u32 val; |
| 588 | int flag = 0; | 587 | int flag = 0; |
| @@ -781,8 +780,8 @@ static u32 depth_to_dst(u32 depth) | |||
| 781 | 780 | ||
| 782 | 781 | ||
| 783 | #ifndef __sparc__ | 782 | #ifndef __sparc__ |
| 784 | static void __iomem * __devinit aty128_map_ROM(const struct aty128fb_par *par, | 783 | static void __iomem *aty128_map_ROM(const struct aty128fb_par *par, |
| 785 | struct pci_dev *dev) | 784 | struct pci_dev *dev) |
| 786 | { | 785 | { |
| 787 | u16 dptr; | 786 | u16 dptr; |
| 788 | u8 rom_type; | 787 | u8 rom_type; |
| @@ -868,8 +867,8 @@ static void __iomem * __devinit aty128_map_ROM(const struct aty128fb_par *par, | |||
| 868 | return NULL; | 867 | return NULL; |
| 869 | } | 868 | } |
| 870 | 869 | ||
| 871 | static void __devinit aty128_get_pllinfo(struct aty128fb_par *par, | 870 | static void aty128_get_pllinfo(struct aty128fb_par *par, |
| 872 | unsigned char __iomem *bios) | 871 | unsigned char __iomem *bios) |
| 873 | { | 872 | { |
| 874 | unsigned int bios_hdr; | 873 | unsigned int bios_hdr; |
| 875 | unsigned int bios_pll; | 874 | unsigned int bios_pll; |
| @@ -891,7 +890,7 @@ static void __devinit aty128_get_pllinfo(struct aty128fb_par *par, | |||
| 891 | } | 890 | } |
| 892 | 891 | ||
| 893 | #ifdef CONFIG_X86 | 892 | #ifdef CONFIG_X86 |
| 894 | static void __iomem * __devinit aty128_find_mem_vbios(struct aty128fb_par *par) | 893 | static void __iomem *aty128_find_mem_vbios(struct aty128fb_par *par) |
| 895 | { | 894 | { |
| 896 | /* I simplified this code as we used to miss the signatures in | 895 | /* I simplified this code as we used to miss the signatures in |
| 897 | * a lot of case. It's now closer to XFree, we just don't check | 896 | * a lot of case. It's now closer to XFree, we just don't check |
| @@ -916,7 +915,7 @@ static void __iomem * __devinit aty128_find_mem_vbios(struct aty128fb_par *par) | |||
| 916 | #endif /* ndef(__sparc__) */ | 915 | #endif /* ndef(__sparc__) */ |
| 917 | 916 | ||
| 918 | /* fill in known card constants if pll_block is not available */ | 917 | /* fill in known card constants if pll_block is not available */ |
| 919 | static void __devinit aty128_timings(struct aty128fb_par *par) | 918 | static void aty128_timings(struct aty128fb_par *par) |
| 920 | { | 919 | { |
| 921 | #ifdef CONFIG_PPC_OF | 920 | #ifdef CONFIG_PPC_OF |
| 922 | /* instead of a table lookup, assume OF has properly | 921 | /* instead of a table lookup, assume OF has properly |
| @@ -1658,7 +1657,7 @@ static int aty128fb_sync(struct fb_info *info) | |||
| 1658 | } | 1657 | } |
| 1659 | 1658 | ||
| 1660 | #ifndef MODULE | 1659 | #ifndef MODULE |
| 1661 | static int __devinit aty128fb_setup(char *options) | 1660 | static int aty128fb_setup(char *options) |
| 1662 | { | 1661 | { |
| 1663 | char *this_opt; | 1662 | char *this_opt; |
| 1664 | 1663 | ||
| @@ -1888,8 +1887,7 @@ static void aty128_early_resume(void *data) | |||
| 1888 | } | 1887 | } |
| 1889 | #endif /* CONFIG_PPC_PMAC */ | 1888 | #endif /* CONFIG_PPC_PMAC */ |
| 1890 | 1889 | ||
| 1891 | static int __devinit aty128_init(struct pci_dev *pdev, | 1890 | static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 1892 | const struct pci_device_id *ent) | ||
| 1893 | { | 1891 | { |
| 1894 | struct fb_info *info = pci_get_drvdata(pdev); | 1892 | struct fb_info *info = pci_get_drvdata(pdev); |
| 1895 | struct aty128fb_par *par = info->par; | 1893 | struct aty128fb_par *par = info->par; |
| @@ -2039,8 +2037,7 @@ static int __devinit aty128_init(struct pci_dev *pdev, | |||
| 2039 | 2037 | ||
| 2040 | #ifdef CONFIG_PCI | 2038 | #ifdef CONFIG_PCI |
| 2041 | /* register a card ++ajoshi */ | 2039 | /* register a card ++ajoshi */ |
| 2042 | static int __devinit aty128_probe(struct pci_dev *pdev, | 2040 | static int aty128_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 2043 | const struct pci_device_id *ent) | ||
| 2044 | { | 2041 | { |
| 2045 | unsigned long fb_addr, reg_addr; | 2042 | unsigned long fb_addr, reg_addr; |
| 2046 | struct aty128fb_par *par; | 2043 | struct aty128fb_par *par; |
| @@ -2156,7 +2153,7 @@ err_free_fb: | |||
| 2156 | return -ENODEV; | 2153 | return -ENODEV; |
| 2157 | } | 2154 | } |
| 2158 | 2155 | ||
| 2159 | static void __devexit aty128_remove(struct pci_dev *pdev) | 2156 | static void aty128_remove(struct pci_dev *pdev) |
| 2160 | { | 2157 | { |
| 2161 | struct fb_info *info = pci_get_drvdata(pdev); | 2158 | struct fb_info *info = pci_get_drvdata(pdev); |
| 2162 | struct aty128fb_par *par; | 2159 | struct aty128fb_par *par; |
| @@ -2558,7 +2555,7 @@ static int aty128_pci_resume(struct pci_dev *pdev) | |||
| 2558 | } | 2555 | } |
| 2559 | 2556 | ||
| 2560 | 2557 | ||
| 2561 | static int __devinit aty128fb_init(void) | 2558 | static int aty128fb_init(void) |
| 2562 | { | 2559 | { |
| 2563 | #ifndef MODULE | 2560 | #ifndef MODULE |
| 2564 | char *option = NULL; | 2561 | char *option = NULL; |
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 868932f904ef..4f27fdc58d84 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
| @@ -214,7 +214,7 @@ struct pci_mmap_map { | |||
| 214 | unsigned long prot_mask; | 214 | unsigned long prot_mask; |
| 215 | }; | 215 | }; |
| 216 | 216 | ||
| 217 | static struct fb_fix_screeninfo atyfb_fix __devinitdata = { | 217 | static struct fb_fix_screeninfo atyfb_fix = { |
| 218 | .id = "ATY Mach64", | 218 | .id = "ATY Mach64", |
| 219 | .type = FB_TYPE_PACKED_PIXELS, | 219 | .type = FB_TYPE_PACKED_PIXELS, |
| 220 | .visual = FB_VISUAL_PSEUDOCOLOR, | 220 | .visual = FB_VISUAL_PSEUDOCOLOR, |
| @@ -309,18 +309,18 @@ static int vram; | |||
| 309 | static int pll; | 309 | static int pll; |
| 310 | static int mclk; | 310 | static int mclk; |
| 311 | static int xclk; | 311 | static int xclk; |
| 312 | static int comp_sync __devinitdata = -1; | 312 | static int comp_sync = -1; |
| 313 | static char *mode; | 313 | static char *mode; |
| 314 | 314 | ||
| 315 | #ifdef CONFIG_PMAC_BACKLIGHT | 315 | #ifdef CONFIG_PMAC_BACKLIGHT |
| 316 | static int backlight __devinitdata = 1; | 316 | static int backlight = 1; |
| 317 | #else | 317 | #else |
| 318 | static int backlight __devinitdata = 0; | 318 | static int backlight = 0; |
| 319 | #endif | 319 | #endif |
| 320 | 320 | ||
| 321 | #ifdef CONFIG_PPC | 321 | #ifdef CONFIG_PPC |
| 322 | static int default_vmode __devinitdata = VMODE_CHOOSE; | 322 | static int default_vmode = VMODE_CHOOSE; |
| 323 | static int default_cmode __devinitdata = CMODE_CHOOSE; | 323 | static int default_cmode = CMODE_CHOOSE; |
| 324 | 324 | ||
| 325 | module_param_named(vmode, default_vmode, int, 0); | 325 | module_param_named(vmode, default_vmode, int, 0); |
| 326 | MODULE_PARM_DESC(vmode, "int: video mode for mac"); | 326 | MODULE_PARM_DESC(vmode, "int: video mode for mac"); |
| @@ -329,10 +329,10 @@ MODULE_PARM_DESC(cmode, "int: color mode for mac"); | |||
| 329 | #endif | 329 | #endif |
| 330 | 330 | ||
| 331 | #ifdef CONFIG_ATARI | 331 | #ifdef CONFIG_ATARI |
| 332 | static unsigned int mach64_count __devinitdata = 0; | 332 | static unsigned int mach64_count = 0; |
| 333 | static unsigned long phys_vmembase[FB_MAX] __devinitdata = { 0, }; | 333 | static unsigned long phys_vmembase[FB_MAX] = { 0, }; |
| 334 | static unsigned long phys_size[FB_MAX] __devinitdata = { 0, }; | 334 | static unsigned long phys_size[FB_MAX] = { 0, }; |
| 335 | static unsigned long phys_guiregbase[FB_MAX] __devinitdata = { 0, }; | 335 | static unsigned long phys_guiregbase[FB_MAX] = { 0, }; |
| 336 | #endif | 336 | #endif |
| 337 | 337 | ||
| 338 | /* top -> down is an evolution of mach64 chipset, any corrections? */ | 338 | /* top -> down is an evolution of mach64 chipset, any corrections? */ |
| @@ -371,7 +371,7 @@ static struct { | |||
| 371 | const char *name; | 371 | const char *name; |
| 372 | int pll, mclk, xclk, ecp_max; | 372 | int pll, mclk, xclk, ecp_max; |
| 373 | u32 features; | 373 | u32 features; |
| 374 | } aty_chips[] __devinitdata = { | 374 | } aty_chips[] = { |
| 375 | #ifdef CONFIG_FB_ATY_GX | 375 | #ifdef CONFIG_FB_ATY_GX |
| 376 | /* Mach64 GX */ | 376 | /* Mach64 GX */ |
| 377 | { PCI_CHIP_MACH64GX, "ATI888GX00 (Mach64 GX)", 135, 50, 50, 0, ATI_CHIP_88800GX }, | 377 | { PCI_CHIP_MACH64GX, "ATI888GX00 (Mach64 GX)", 135, 50, 50, 0, ATI_CHIP_88800GX }, |
| @@ -426,7 +426,7 @@ static struct { | |||
| 426 | #endif /* CONFIG_FB_ATY_CT */ | 426 | #endif /* CONFIG_FB_ATY_CT */ |
| 427 | }; | 427 | }; |
| 428 | 428 | ||
| 429 | static int __devinit correct_chipset(struct atyfb_par *par) | 429 | static int correct_chipset(struct atyfb_par *par) |
| 430 | { | 430 | { |
| 431 | u8 rev; | 431 | u8 rev; |
| 432 | u16 type; | 432 | u16 type; |
| @@ -531,34 +531,34 @@ static int __devinit correct_chipset(struct atyfb_par *par) | |||
| 531 | return 0; | 531 | return 0; |
| 532 | } | 532 | } |
| 533 | 533 | ||
| 534 | static char ram_dram[] __devinitdata = "DRAM"; | 534 | static char ram_dram[] = "DRAM"; |
| 535 | static char ram_resv[] __devinitdata = "RESV"; | 535 | static char ram_resv[] = "RESV"; |
| 536 | #ifdef CONFIG_FB_ATY_GX | 536 | #ifdef CONFIG_FB_ATY_GX |
| 537 | static char ram_vram[] __devinitdata = "VRAM"; | 537 | static char ram_vram[] = "VRAM"; |
| 538 | #endif /* CONFIG_FB_ATY_GX */ | 538 | #endif /* CONFIG_FB_ATY_GX */ |
| 539 | #ifdef CONFIG_FB_ATY_CT | 539 | #ifdef CONFIG_FB_ATY_CT |
| 540 | static char ram_edo[] __devinitdata = "EDO"; | 540 | static char ram_edo[] = "EDO"; |
| 541 | static char ram_sdram[] __devinitdata = "SDRAM (1:1)"; | 541 | static char ram_sdram[] = "SDRAM (1:1)"; |
| 542 | static char ram_sgram[] __devinitdata = "SGRAM (1:1)"; | 542 | static char ram_sgram[] = "SGRAM (1:1)"; |
| 543 | static char ram_sdram32[] __devinitdata = "SDRAM (2:1) (32-bit)"; | 543 | static char ram_sdram32[] = "SDRAM (2:1) (32-bit)"; |
| 544 | static char ram_wram[] __devinitdata = "WRAM"; | 544 | static char ram_wram[] = "WRAM"; |
| 545 | static char ram_off[] __devinitdata = "OFF"; | 545 | static char ram_off[] = "OFF"; |
| 546 | #endif /* CONFIG_FB_ATY_CT */ | 546 | #endif /* CONFIG_FB_ATY_CT */ |
| 547 | 547 | ||
| 548 | 548 | ||
| 549 | #ifdef CONFIG_FB_ATY_GX | 549 | #ifdef CONFIG_FB_ATY_GX |
| 550 | static char *aty_gx_ram[8] __devinitdata = { | 550 | static char *aty_gx_ram[8] = { |
| 551 | ram_dram, ram_vram, ram_vram, ram_dram, | 551 | ram_dram, ram_vram, ram_vram, ram_dram, |
| 552 | ram_dram, ram_vram, ram_vram, ram_resv | 552 | ram_dram, ram_vram, ram_vram, ram_resv |
| 553 | }; | 553 | }; |
| 554 | #endif /* CONFIG_FB_ATY_GX */ | 554 | #endif /* CONFIG_FB_ATY_GX */ |
| 555 | 555 | ||
| 556 | #ifdef CONFIG_FB_ATY_CT | 556 | #ifdef CONFIG_FB_ATY_CT |
| 557 | static char *aty_ct_ram[8] __devinitdata = { | 557 | static char *aty_ct_ram[8] = { |
| 558 | ram_off, ram_dram, ram_edo, ram_edo, | 558 | ram_off, ram_dram, ram_edo, ram_edo, |
| 559 | ram_sdram, ram_sgram, ram_wram, ram_resv | 559 | ram_sdram, ram_sgram, ram_wram, ram_resv |
| 560 | }; | 560 | }; |
| 561 | static char *aty_xl_ram[8] __devinitdata = { | 561 | static char *aty_xl_ram[8] = { |
| 562 | ram_off, ram_dram, ram_edo, ram_edo, | 562 | ram_off, ram_dram, ram_edo, ram_edo, |
| 563 | ram_sdram, ram_sgram, ram_sdram32, ram_resv | 563 | ram_sdram, ram_sgram, ram_sdram32, ram_resv |
| 564 | }; | 564 | }; |
| @@ -588,7 +588,7 @@ static u32 atyfb_get_pixclock(struct fb_var_screeninfo *var, | |||
| 588 | * Apple monitor sense | 588 | * Apple monitor sense |
| 589 | */ | 589 | */ |
| 590 | 590 | ||
| 591 | static int __devinit read_aty_sense(const struct atyfb_par *par) | 591 | static int read_aty_sense(const struct atyfb_par *par) |
| 592 | { | 592 | { |
| 593 | int sense, i; | 593 | int sense, i; |
| 594 | 594 | ||
| @@ -2273,7 +2273,7 @@ static void aty_bl_exit(struct backlight_device *bd) | |||
| 2273 | 2273 | ||
| 2274 | #endif /* CONFIG_FB_ATY_BACKLIGHT */ | 2274 | #endif /* CONFIG_FB_ATY_BACKLIGHT */ |
| 2275 | 2275 | ||
| 2276 | static void __devinit aty_calc_mem_refresh(struct atyfb_par *par, int xclk) | 2276 | static void aty_calc_mem_refresh(struct atyfb_par *par, int xclk) |
| 2277 | { | 2277 | { |
| 2278 | const int ragepro_tbl[] = { | 2278 | const int ragepro_tbl[] = { |
| 2279 | 44, 50, 55, 66, 75, 80, 100 | 2279 | 44, 50, 55, 66, 75, 80, 100 |
| @@ -2307,8 +2307,8 @@ static void __devinit aty_calc_mem_refresh(struct atyfb_par *par, int xclk) | |||
| 2307 | static struct fb_info *fb_list = NULL; | 2307 | static struct fb_info *fb_list = NULL; |
| 2308 | 2308 | ||
| 2309 | #if defined(__i386__) && defined(CONFIG_FB_ATY_GENERIC_LCD) | 2309 | #if defined(__i386__) && defined(CONFIG_FB_ATY_GENERIC_LCD) |
| 2310 | static int __devinit atyfb_get_timings_from_lcd(struct atyfb_par *par, | 2310 | static int atyfb_get_timings_from_lcd(struct atyfb_par *par, |
| 2311 | struct fb_var_screeninfo *var) | 2311 | struct fb_var_screeninfo *var) |
| 2312 | { | 2312 | { |
| 2313 | int ret = -EINVAL; | 2313 | int ret = -EINVAL; |
| 2314 | 2314 | ||
| @@ -2333,7 +2333,7 @@ static int __devinit atyfb_get_timings_from_lcd(struct atyfb_par *par, | |||
| 2333 | } | 2333 | } |
| 2334 | #endif /* defined(__i386__) && defined(CONFIG_FB_ATY_GENERIC_LCD) */ | 2334 | #endif /* defined(__i386__) && defined(CONFIG_FB_ATY_GENERIC_LCD) */ |
| 2335 | 2335 | ||
| 2336 | static int __devinit aty_init(struct fb_info *info) | 2336 | static int aty_init(struct fb_info *info) |
| 2337 | { | 2337 | { |
| 2338 | struct atyfb_par *par = (struct atyfb_par *) info->par; | 2338 | struct atyfb_par *par = (struct atyfb_par *) info->par; |
| 2339 | const char *ramname = NULL, *xtal; | 2339 | const char *ramname = NULL, *xtal; |
| @@ -2787,7 +2787,7 @@ aty_init_exit: | |||
| 2787 | } | 2787 | } |
| 2788 | 2788 | ||
| 2789 | #if defined(CONFIG_ATARI) && !defined(MODULE) | 2789 | #if defined(CONFIG_ATARI) && !defined(MODULE) |
| 2790 | static int __devinit store_video_par(char *video_str, unsigned char m64_num) | 2790 | static int store_video_par(char *video_str, unsigned char m64_num) |
| 2791 | { | 2791 | { |
| 2792 | char *p; | 2792 | char *p; |
| 2793 | unsigned long vmembase, size, guiregbase; | 2793 | unsigned long vmembase, size, guiregbase; |
| @@ -2961,9 +2961,8 @@ static int atyfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | |||
| 2961 | 2961 | ||
| 2962 | #ifdef __sparc__ | 2962 | #ifdef __sparc__ |
| 2963 | 2963 | ||
| 2964 | static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, | 2964 | static int atyfb_setup_sparc(struct pci_dev *pdev, struct fb_info *info, |
| 2965 | struct fb_info *info, | 2965 | unsigned long addr) |
| 2966 | unsigned long addr) | ||
| 2967 | { | 2966 | { |
| 2968 | struct atyfb_par *par = info->par; | 2967 | struct atyfb_par *par = info->par; |
| 2969 | struct device_node *dp; | 2968 | struct device_node *dp; |
| @@ -3161,7 +3160,7 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, | |||
| 3161 | 3160 | ||
| 3162 | #ifdef __i386__ | 3161 | #ifdef __i386__ |
| 3163 | #ifdef CONFIG_FB_ATY_GENERIC_LCD | 3162 | #ifdef CONFIG_FB_ATY_GENERIC_LCD |
| 3164 | static void __devinit aty_init_lcd(struct atyfb_par *par, u32 bios_base) | 3163 | static void aty_init_lcd(struct atyfb_par *par, u32 bios_base) |
| 3165 | { | 3164 | { |
| 3166 | u32 driv_inf_tab, sig; | 3165 | u32 driv_inf_tab, sig; |
| 3167 | u16 lcd_ofs; | 3166 | u16 lcd_ofs; |
| @@ -3392,7 +3391,7 @@ static void __devinit aty_init_lcd(struct atyfb_par *par, u32 bios_base) | |||
| 3392 | } | 3391 | } |
| 3393 | #endif /* CONFIG_FB_ATY_GENERIC_LCD */ | 3392 | #endif /* CONFIG_FB_ATY_GENERIC_LCD */ |
| 3394 | 3393 | ||
| 3395 | static int __devinit init_from_bios(struct atyfb_par *par) | 3394 | static int init_from_bios(struct atyfb_par *par) |
| 3396 | { | 3395 | { |
| 3397 | u32 bios_base, rom_addr; | 3396 | u32 bios_base, rom_addr; |
| 3398 | int ret; | 3397 | int ret; |
| @@ -3445,9 +3444,8 @@ static int __devinit init_from_bios(struct atyfb_par *par) | |||
| 3445 | } | 3444 | } |
| 3446 | #endif /* __i386__ */ | 3445 | #endif /* __i386__ */ |
| 3447 | 3446 | ||
| 3448 | static int __devinit atyfb_setup_generic(struct pci_dev *pdev, | 3447 | static int atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *info, |
| 3449 | struct fb_info *info, | 3448 | unsigned long addr) |
| 3450 | unsigned long addr) | ||
| 3451 | { | 3449 | { |
| 3452 | struct atyfb_par *par = info->par; | 3450 | struct atyfb_par *par = info->par; |
| 3453 | u16 tmp; | 3451 | u16 tmp; |
| @@ -3525,8 +3523,8 @@ atyfb_setup_generic_fail: | |||
| 3525 | 3523 | ||
| 3526 | #endif /* !__sparc__ */ | 3524 | #endif /* !__sparc__ */ |
| 3527 | 3525 | ||
| 3528 | static int __devinit atyfb_pci_probe(struct pci_dev *pdev, | 3526 | static int atyfb_pci_probe(struct pci_dev *pdev, |
| 3529 | const struct pci_device_id *ent) | 3527 | const struct pci_device_id *ent) |
| 3530 | { | 3528 | { |
| 3531 | unsigned long addr, res_start, res_size; | 3529 | unsigned long addr, res_start, res_size; |
| 3532 | struct fb_info *info; | 3530 | struct fb_info *info; |
| @@ -3714,7 +3712,7 @@ static int __init atyfb_atari_probe(void) | |||
| 3714 | 3712 | ||
| 3715 | #ifdef CONFIG_PCI | 3713 | #ifdef CONFIG_PCI |
| 3716 | 3714 | ||
| 3717 | static void __devexit atyfb_remove(struct fb_info *info) | 3715 | static void atyfb_remove(struct fb_info *info) |
| 3718 | { | 3716 | { |
| 3719 | struct atyfb_par *par = (struct atyfb_par *) info->par; | 3717 | struct atyfb_par *par = (struct atyfb_par *) info->par; |
| 3720 | 3718 | ||
| @@ -3762,7 +3760,7 @@ static void __devexit atyfb_remove(struct fb_info *info) | |||
| 3762 | } | 3760 | } |
| 3763 | 3761 | ||
| 3764 | 3762 | ||
| 3765 | static void __devexit atyfb_pci_remove(struct pci_dev *pdev) | 3763 | static void atyfb_pci_remove(struct pci_dev *pdev) |
| 3766 | { | 3764 | { |
| 3767 | struct fb_info *info = pci_get_drvdata(pdev); | 3765 | struct fb_info *info = pci_get_drvdata(pdev); |
| 3768 | 3766 | ||
| @@ -3834,7 +3832,7 @@ static struct pci_driver atyfb_driver = { | |||
| 3834 | .name = "atyfb", | 3832 | .name = "atyfb", |
| 3835 | .id_table = atyfb_pci_tbl, | 3833 | .id_table = atyfb_pci_tbl, |
| 3836 | .probe = atyfb_pci_probe, | 3834 | .probe = atyfb_pci_probe, |
| 3837 | .remove = __devexit_p(atyfb_pci_remove), | 3835 | .remove = atyfb_pci_remove, |
| 3838 | #ifdef CONFIG_PM | 3836 | #ifdef CONFIG_PM |
| 3839 | .suspend = atyfb_pci_suspend, | 3837 | .suspend = atyfb_pci_suspend, |
| 3840 | .resume = atyfb_pci_resume, | 3838 | .resume = atyfb_pci_resume, |
diff --git a/drivers/video/aty/mach64_ct.c b/drivers/video/aty/mach64_ct.c index 2745b8539485..51f29d627ceb 100644 --- a/drivers/video/aty/mach64_ct.c +++ b/drivers/video/aty/mach64_ct.c | |||
| @@ -373,8 +373,7 @@ void aty_set_pll_ct(const struct fb_info *info, const union aty_pll *pll) | |||
| 373 | #endif | 373 | #endif |
| 374 | } | 374 | } |
| 375 | 375 | ||
| 376 | static void __devinit aty_get_pll_ct(const struct fb_info *info, | 376 | static void aty_get_pll_ct(const struct fb_info *info, union aty_pll *pll) |
| 377 | union aty_pll *pll) | ||
| 378 | { | 377 | { |
| 379 | struct atyfb_par *par = (struct atyfb_par *) info->par; | 378 | struct atyfb_par *par = (struct atyfb_par *) info->par; |
| 380 | u8 tmp, clock; | 379 | u8 tmp, clock; |
| @@ -397,8 +396,7 @@ static void __devinit aty_get_pll_ct(const struct fb_info *info, | |||
| 397 | } | 396 | } |
| 398 | } | 397 | } |
| 399 | 398 | ||
| 400 | static int __devinit aty_init_pll_ct(const struct fb_info *info, | 399 | static int aty_init_pll_ct(const struct fb_info *info, union aty_pll *pll) |
| 401 | union aty_pll *pll) | ||
| 402 | { | 400 | { |
| 403 | struct atyfb_par *par = (struct atyfb_par *) info->par; | 401 | struct atyfb_par *par = (struct atyfb_par *) info->par; |
| 404 | u8 mpost_div, xpost_div, sclk_post_div_real; | 402 | u8 mpost_div, xpost_div, sclk_post_div_real; |
diff --git a/drivers/video/aty/mach64_cursor.c b/drivers/video/aty/mach64_cursor.c index 46f72ed53510..95ec042ddbf8 100644 --- a/drivers/video/aty/mach64_cursor.c +++ b/drivers/video/aty/mach64_cursor.c | |||
| @@ -183,7 +183,7 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor) | |||
| 183 | return 0; | 183 | return 0; |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | int __devinit aty_init_cursor(struct fb_info *info) | 186 | int aty_init_cursor(struct fb_info *info) |
| 187 | { | 187 | { |
| 188 | unsigned long addr; | 188 | unsigned long addr; |
| 189 | 189 | ||
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 9e279ee38da8..1e30b2b3e79f 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c | |||
| @@ -293,7 +293,7 @@ static void radeon_unmap_ROM(struct radeonfb_info *rinfo, struct pci_dev *dev) | |||
| 293 | pci_unmap_rom(dev, rinfo->bios_seg); | 293 | pci_unmap_rom(dev, rinfo->bios_seg); |
| 294 | } | 294 | } |
| 295 | 295 | ||
| 296 | static int __devinit radeon_map_ROM(struct radeonfb_info *rinfo, struct pci_dev *dev) | 296 | static int radeon_map_ROM(struct radeonfb_info *rinfo, struct pci_dev *dev) |
| 297 | { | 297 | { |
| 298 | void __iomem *rom; | 298 | void __iomem *rom; |
| 299 | u16 dptr; | 299 | u16 dptr; |
| @@ -388,7 +388,7 @@ static int __devinit radeon_map_ROM(struct radeonfb_info *rinfo, struct pci_dev | |||
| 388 | } | 388 | } |
| 389 | 389 | ||
| 390 | #ifdef CONFIG_X86 | 390 | #ifdef CONFIG_X86 |
| 391 | static int __devinit radeon_find_mem_vbios(struct radeonfb_info *rinfo) | 391 | static int radeon_find_mem_vbios(struct radeonfb_info *rinfo) |
| 392 | { | 392 | { |
| 393 | /* I simplified this code as we used to miss the signatures in | 393 | /* I simplified this code as we used to miss the signatures in |
| 394 | * a lot of case. It's now closer to XFree, we just don't check | 394 | * a lot of case. It's now closer to XFree, we just don't check |
| @@ -423,7 +423,7 @@ static int __devinit radeon_find_mem_vbios(struct radeonfb_info *rinfo) | |||
| 423 | * Read XTAL (ref clock), SCLK and MCLK from Open Firmware device | 423 | * Read XTAL (ref clock), SCLK and MCLK from Open Firmware device |
| 424 | * tree. Hopefully, ATI OF driver is kind enough to fill these | 424 | * tree. Hopefully, ATI OF driver is kind enough to fill these |
| 425 | */ | 425 | */ |
| 426 | static int __devinit radeon_read_xtal_OF (struct radeonfb_info *rinfo) | 426 | static int radeon_read_xtal_OF(struct radeonfb_info *rinfo) |
| 427 | { | 427 | { |
| 428 | struct device_node *dp = rinfo->of_node; | 428 | struct device_node *dp = rinfo->of_node; |
| 429 | const u32 *val; | 429 | const u32 *val; |
| @@ -453,7 +453,7 @@ static int __devinit radeon_read_xtal_OF (struct radeonfb_info *rinfo) | |||
| 453 | /* | 453 | /* |
| 454 | * Read PLL infos from chip registers | 454 | * Read PLL infos from chip registers |
| 455 | */ | 455 | */ |
| 456 | static int __devinit radeon_probe_pll_params(struct radeonfb_info *rinfo) | 456 | static int radeon_probe_pll_params(struct radeonfb_info *rinfo) |
| 457 | { | 457 | { |
| 458 | unsigned char ppll_div_sel; | 458 | unsigned char ppll_div_sel; |
| 459 | unsigned Ns, Nm, M; | 459 | unsigned Ns, Nm, M; |
| @@ -591,7 +591,7 @@ static int __devinit radeon_probe_pll_params(struct radeonfb_info *rinfo) | |||
| 591 | /* | 591 | /* |
| 592 | * Retrieve PLL infos by different means (BIOS, Open Firmware, register probing...) | 592 | * Retrieve PLL infos by different means (BIOS, Open Firmware, register probing...) |
| 593 | */ | 593 | */ |
| 594 | static void __devinit radeon_get_pllinfo(struct radeonfb_info *rinfo) | 594 | static void radeon_get_pllinfo(struct radeonfb_info *rinfo) |
| 595 | { | 595 | { |
| 596 | /* | 596 | /* |
| 597 | * In the case nothing works, these are defaults; they are mostly | 597 | * In the case nothing works, these are defaults; they are mostly |
| @@ -1868,7 +1868,7 @@ static struct fb_ops radeonfb_ops = { | |||
| 1868 | }; | 1868 | }; |
| 1869 | 1869 | ||
| 1870 | 1870 | ||
| 1871 | static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo) | 1871 | static int radeon_set_fbinfo(struct radeonfb_info *rinfo) |
| 1872 | { | 1872 | { |
| 1873 | struct fb_info *info = rinfo->info; | 1873 | struct fb_info *info = rinfo->info; |
| 1874 | 1874 | ||
| @@ -2143,8 +2143,8 @@ static struct bin_attribute edid2_attr = { | |||
| 2143 | }; | 2143 | }; |
| 2144 | 2144 | ||
| 2145 | 2145 | ||
| 2146 | static int __devinit radeonfb_pci_register (struct pci_dev *pdev, | 2146 | static int radeonfb_pci_register(struct pci_dev *pdev, |
| 2147 | const struct pci_device_id *ent) | 2147 | const struct pci_device_id *ent) |
| 2148 | { | 2148 | { |
| 2149 | struct fb_info *info; | 2149 | struct fb_info *info; |
| 2150 | struct radeonfb_info *rinfo; | 2150 | struct radeonfb_info *rinfo; |
| @@ -2407,7 +2407,7 @@ err_out: | |||
| 2407 | 2407 | ||
| 2408 | 2408 | ||
| 2409 | 2409 | ||
| 2410 | static void __devexit radeonfb_pci_unregister (struct pci_dev *pdev) | 2410 | static void radeonfb_pci_unregister(struct pci_dev *pdev) |
| 2411 | { | 2411 | { |
| 2412 | struct fb_info *info = pci_get_drvdata(pdev); | 2412 | struct fb_info *info = pci_get_drvdata(pdev); |
| 2413 | struct radeonfb_info *rinfo = info->par; | 2413 | struct radeonfb_info *rinfo = info->par; |
| @@ -2465,7 +2465,7 @@ static struct pci_driver radeonfb_driver = { | |||
| 2465 | .name = "radeonfb", | 2465 | .name = "radeonfb", |
| 2466 | .id_table = radeonfb_pci_table, | 2466 | .id_table = radeonfb_pci_table, |
| 2467 | .probe = radeonfb_pci_register, | 2467 | .probe = radeonfb_pci_register, |
| 2468 | .remove = __devexit_p(radeonfb_pci_unregister), | 2468 | .remove = radeonfb_pci_unregister, |
| 2469 | #ifdef CONFIG_PM | 2469 | #ifdef CONFIG_PM |
| 2470 | .suspend = radeonfb_pci_suspend, | 2470 | .suspend = radeonfb_pci_suspend, |
| 2471 | .resume = radeonfb_pci_resume, | 2471 | .resume = radeonfb_pci_resume, |
diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c index 5c23eac0eb9a..bc078d50d8f1 100644 --- a/drivers/video/aty/radeon_monitor.c +++ b/drivers/video/aty/radeon_monitor.c | |||
| @@ -62,8 +62,8 @@ static char *radeon_get_mon_name(int type) | |||
| 62 | * models with broken OF probing by hard-coding known EDIDs for some Mac | 62 | * models with broken OF probing by hard-coding known EDIDs for some Mac |
| 63 | * laptops internal LVDS panel. (XXX: not done yet) | 63 | * laptops internal LVDS panel. (XXX: not done yet) |
| 64 | */ | 64 | */ |
| 65 | static int __devinit radeon_parse_montype_prop(struct device_node *dp, u8 **out_EDID, | 65 | static int radeon_parse_montype_prop(struct device_node *dp, u8 **out_EDID, |
| 66 | int hdno) | 66 | int hdno) |
| 67 | { | 67 | { |
| 68 | static char *propnames[] = { "DFP,EDID", "LCD,EDID", "EDID", | 68 | static char *propnames[] = { "DFP,EDID", "LCD,EDID", "EDID", |
| 69 | "EDID1", "EDID2", NULL }; | 69 | "EDID1", "EDID2", NULL }; |
| @@ -115,8 +115,8 @@ static int __devinit radeon_parse_montype_prop(struct device_node *dp, u8 **out_ | |||
| 115 | return mt; | 115 | return mt; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | static int __devinit radeon_probe_OF_head(struct radeonfb_info *rinfo, int head_no, | 118 | static int radeon_probe_OF_head(struct radeonfb_info *rinfo, int head_no, |
| 119 | u8 **out_EDID) | 119 | u8 **out_EDID) |
| 120 | { | 120 | { |
| 121 | struct device_node *dp; | 121 | struct device_node *dp; |
| 122 | 122 | ||
| @@ -163,7 +163,7 @@ static int __devinit radeon_probe_OF_head(struct radeonfb_info *rinfo, int head_ | |||
| 163 | #endif /* CONFIG_PPC_OF || CONFIG_SPARC */ | 163 | #endif /* CONFIG_PPC_OF || CONFIG_SPARC */ |
| 164 | 164 | ||
| 165 | 165 | ||
| 166 | static int __devinit radeon_get_panel_info_BIOS(struct radeonfb_info *rinfo) | 166 | static int radeon_get_panel_info_BIOS(struct radeonfb_info *rinfo) |
| 167 | { | 167 | { |
| 168 | unsigned long tmp, tmp0; | 168 | unsigned long tmp, tmp0; |
| 169 | char stmp[30]; | 169 | char stmp[30]; |
| @@ -251,7 +251,7 @@ static int __devinit radeon_get_panel_info_BIOS(struct radeonfb_info *rinfo) | |||
| 251 | * doesn't quite work yet, but it's output is still useful for | 251 | * doesn't quite work yet, but it's output is still useful for |
| 252 | * debugging | 252 | * debugging |
| 253 | */ | 253 | */ |
| 254 | static void __devinit radeon_parse_connector_info(struct radeonfb_info *rinfo) | 254 | static void radeon_parse_connector_info(struct radeonfb_info *rinfo) |
| 255 | { | 255 | { |
| 256 | int offset, chips, connectors, tmp, i, conn, type; | 256 | int offset, chips, connectors, tmp, i, conn, type; |
| 257 | 257 | ||
| @@ -297,7 +297,7 @@ static void __devinit radeon_parse_connector_info(struct radeonfb_info *rinfo) | |||
| 297 | * as well and currently is only implemented for the CRT DAC, the | 297 | * as well and currently is only implemented for the CRT DAC, the |
| 298 | * code for the TVDAC is commented out in XFree as "non working" | 298 | * code for the TVDAC is commented out in XFree as "non working" |
| 299 | */ | 299 | */ |
| 300 | static int __devinit radeon_crt_is_connected(struct radeonfb_info *rinfo, int is_crt_dac) | 300 | static int radeon_crt_is_connected(struct radeonfb_info *rinfo, int is_crt_dac) |
| 301 | { | 301 | { |
| 302 | int connected = 0; | 302 | int connected = 0; |
| 303 | 303 | ||
| @@ -369,8 +369,8 @@ static int __devinit radeon_crt_is_connected(struct radeonfb_info *rinfo, int is | |||
| 369 | * Parse the "monitor_layout" string if any. This code is mostly | 369 | * Parse the "monitor_layout" string if any. This code is mostly |
| 370 | * copied from XFree's radeon driver | 370 | * copied from XFree's radeon driver |
| 371 | */ | 371 | */ |
| 372 | static int __devinit radeon_parse_monitor_layout(struct radeonfb_info *rinfo, | 372 | static int radeon_parse_monitor_layout(struct radeonfb_info *rinfo, |
| 373 | const char *monitor_layout) | 373 | const char *monitor_layout) |
| 374 | { | 374 | { |
| 375 | char s1[5], s2[5]; | 375 | char s1[5], s2[5]; |
| 376 | int i = 0, second = 0; | 376 | int i = 0, second = 0; |
| @@ -433,8 +433,8 @@ static int __devinit radeon_parse_monitor_layout(struct radeonfb_info *rinfo, | |||
| 433 | * try to retrieve EDID. The algorithm here comes from XFree's radeon | 433 | * try to retrieve EDID. The algorithm here comes from XFree's radeon |
| 434 | * driver | 434 | * driver |
| 435 | */ | 435 | */ |
| 436 | void __devinit radeon_probe_screens(struct radeonfb_info *rinfo, | 436 | void radeon_probe_screens(struct radeonfb_info *rinfo, |
| 437 | const char *monitor_layout, int ignore_edid) | 437 | const char *monitor_layout, int ignore_edid) |
| 438 | { | 438 | { |
| 439 | #ifdef CONFIG_FB_RADEON_I2C | 439 | #ifdef CONFIG_FB_RADEON_I2C |
| 440 | int ddc_crt2_used = 0; | 440 | int ddc_crt2_used = 0; |
| @@ -753,7 +753,7 @@ static int is_powerblade(const char *model) | |||
| 753 | * Build the modedb for head 1 (head 2 will come later), check panel infos | 753 | * Build the modedb for head 1 (head 2 will come later), check panel infos |
| 754 | * from either BIOS or EDID, and pick up the default mode | 754 | * from either BIOS or EDID, and pick up the default mode |
| 755 | */ | 755 | */ |
| 756 | void __devinit radeon_check_modes(struct radeonfb_info *rinfo, const char *mode_option) | 756 | void radeon_check_modes(struct radeonfb_info *rinfo, const char *mode_option) |
| 757 | { | 757 | { |
| 758 | struct fb_info * info = rinfo->info; | 758 | struct fb_info * info = rinfo->info; |
| 759 | int has_default_mode = 0; | 759 | int has_default_mode = 0; |
diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c index fe3b6ec87122..ddabaa867b0d 100644 --- a/drivers/video/au1100fb.c +++ b/drivers/video/au1100fb.c | |||
| @@ -83,7 +83,7 @@ struct fb_bitfield rgb_bitfields[][4] = | |||
| 83 | { { 8, 4, 0 }, { 4, 4, 0 }, { 0, 4, 0 }, { 0, 0, 0 } }, | 83 | { { 8, 4, 0 }, { 4, 4, 0 }, { 0, 4, 0 }, { 0, 0, 0 } }, |
| 84 | }; | 84 | }; |
| 85 | 85 | ||
| 86 | static struct fb_fix_screeninfo au1100fb_fix __devinitdata = { | 86 | static struct fb_fix_screeninfo au1100fb_fix = { |
| 87 | .id = "AU1100 FB", | 87 | .id = "AU1100 FB", |
| 88 | .xpanstep = 1, | 88 | .xpanstep = 1, |
| 89 | .ypanstep = 1, | 89 | .ypanstep = 1, |
| @@ -91,7 +91,7 @@ static struct fb_fix_screeninfo au1100fb_fix __devinitdata = { | |||
| 91 | .accel = FB_ACCEL_NONE, | 91 | .accel = FB_ACCEL_NONE, |
| 92 | }; | 92 | }; |
| 93 | 93 | ||
| 94 | static struct fb_var_screeninfo au1100fb_var __devinitdata = { | 94 | static struct fb_var_screeninfo au1100fb_var = { |
| 95 | .activate = FB_ACTIVATE_NOW, | 95 | .activate = FB_ACTIVATE_NOW, |
| 96 | .height = -1, | 96 | .height = -1, |
| 97 | .width = -1, | 97 | .width = -1, |
| @@ -469,7 +469,7 @@ static int au1100fb_setup(struct au1100fb_device *fbdev) | |||
| 469 | return 0; | 469 | return 0; |
| 470 | } | 470 | } |
| 471 | 471 | ||
| 472 | static int __devinit au1100fb_drv_probe(struct platform_device *dev) | 472 | static int au1100fb_drv_probe(struct platform_device *dev) |
| 473 | { | 473 | { |
| 474 | struct au1100fb_device *fbdev = NULL; | 474 | struct au1100fb_device *fbdev = NULL; |
| 475 | struct resource *regs_res; | 475 | struct resource *regs_res; |
diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c index 7ca79f02056e..1b59054fc6a4 100644 --- a/drivers/video/au1200fb.c +++ b/drivers/video/au1200fb.c | |||
| @@ -1673,7 +1673,7 @@ out: | |||
| 1673 | } | 1673 | } |
| 1674 | 1674 | ||
| 1675 | /* AU1200 LCD controller device driver */ | 1675 | /* AU1200 LCD controller device driver */ |
| 1676 | static int __devinit au1200fb_drv_probe(struct platform_device *dev) | 1676 | static int au1200fb_drv_probe(struct platform_device *dev) |
| 1677 | { | 1677 | { |
| 1678 | struct au1200fb_device *fbdev; | 1678 | struct au1200fb_device *fbdev; |
| 1679 | struct au1200fb_platdata *pd; | 1679 | struct au1200fb_platdata *pd; |
| @@ -1798,7 +1798,7 @@ failed: | |||
| 1798 | return ret; | 1798 | return ret; |
| 1799 | } | 1799 | } |
| 1800 | 1800 | ||
| 1801 | static int __devexit au1200fb_drv_remove(struct platform_device *dev) | 1801 | static int au1200fb_drv_remove(struct platform_device *dev) |
| 1802 | { | 1802 | { |
| 1803 | struct au1200fb_platdata *pd = platform_get_drvdata(dev); | 1803 | struct au1200fb_platdata *pd = platform_get_drvdata(dev); |
| 1804 | struct au1200fb_device *fbdev; | 1804 | struct au1200fb_device *fbdev; |
| @@ -1876,7 +1876,7 @@ static struct platform_driver au1200fb_driver = { | |||
| 1876 | .pm = AU1200FB_PMOPS, | 1876 | .pm = AU1200FB_PMOPS, |
| 1877 | }, | 1877 | }, |
| 1878 | .probe = au1200fb_drv_probe, | 1878 | .probe = au1200fb_drv_probe, |
| 1879 | .remove = __devexit_p(au1200fb_drv_remove), | 1879 | .remove = au1200fb_drv_remove, |
| 1880 | }; | 1880 | }; |
| 1881 | 1881 | ||
| 1882 | /*-------------------------------------------------------------------------*/ | 1882 | /*-------------------------------------------------------------------------*/ |
diff --git a/drivers/video/auo_k1900fb.c b/drivers/video/auo_k1900fb.c index c36cf961dcb2..1a9ac6e1f4b3 100644 --- a/drivers/video/auo_k1900fb.c +++ b/drivers/video/auo_k1900fb.c | |||
| @@ -156,7 +156,7 @@ static bool auok1900fb_need_refresh(struct auok190xfb_par *par) | |||
| 156 | return (par->update_cnt > 10); | 156 | return (par->update_cnt > 10); |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | static int __devinit auok1900fb_probe(struct platform_device *pdev) | 159 | static int auok1900fb_probe(struct platform_device *pdev) |
| 160 | { | 160 | { |
| 161 | struct auok190x_init_data init; | 161 | struct auok190x_init_data init; |
| 162 | struct auok190x_board *board; | 162 | struct auok190x_board *board; |
| @@ -177,14 +177,14 @@ static int __devinit auok1900fb_probe(struct platform_device *pdev) | |||
| 177 | return auok190x_common_probe(pdev, &init); | 177 | return auok190x_common_probe(pdev, &init); |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | static int __devexit auok1900fb_remove(struct platform_device *pdev) | 180 | static int auok1900fb_remove(struct platform_device *pdev) |
| 181 | { | 181 | { |
| 182 | return auok190x_common_remove(pdev); | 182 | return auok190x_common_remove(pdev); |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | static struct platform_driver auok1900fb_driver = { | 185 | static struct platform_driver auok1900fb_driver = { |
| 186 | .probe = auok1900fb_probe, | 186 | .probe = auok1900fb_probe, |
| 187 | .remove = __devexit_p(auok1900fb_remove), | 187 | .remove = auok1900fb_remove, |
| 188 | .driver = { | 188 | .driver = { |
| 189 | .owner = THIS_MODULE, | 189 | .owner = THIS_MODULE, |
| 190 | .name = "auo_k1900fb", | 190 | .name = "auo_k1900fb", |
diff --git a/drivers/video/auo_k1901fb.c b/drivers/video/auo_k1901fb.c index 1c054c18616e..d1db1653cd88 100644 --- a/drivers/video/auo_k1901fb.c +++ b/drivers/video/auo_k1901fb.c | |||
| @@ -209,7 +209,7 @@ static bool auok1901fb_need_refresh(struct auok190xfb_par *par) | |||
| 209 | return (par->update_cnt > 10); | 209 | return (par->update_cnt > 10); |
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | static int __devinit auok1901fb_probe(struct platform_device *pdev) | 212 | static int auok1901fb_probe(struct platform_device *pdev) |
| 213 | { | 213 | { |
| 214 | struct auok190x_init_data init; | 214 | struct auok190x_init_data init; |
| 215 | struct auok190x_board *board; | 215 | struct auok190x_board *board; |
| @@ -230,14 +230,14 @@ static int __devinit auok1901fb_probe(struct platform_device *pdev) | |||
| 230 | return auok190x_common_probe(pdev, &init); | 230 | return auok190x_common_probe(pdev, &init); |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | static int __devexit auok1901fb_remove(struct platform_device *pdev) | 233 | static int auok1901fb_remove(struct platform_device *pdev) |
| 234 | { | 234 | { |
| 235 | return auok190x_common_remove(pdev); | 235 | return auok190x_common_remove(pdev); |
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | static struct platform_driver auok1901fb_driver = { | 238 | static struct platform_driver auok1901fb_driver = { |
| 239 | .probe = auok1901fb_probe, | 239 | .probe = auok1901fb_probe, |
| 240 | .remove = __devexit_p(auok1901fb_remove), | 240 | .remove = auok1901fb_remove, |
| 241 | .driver = { | 241 | .driver = { |
| 242 | .owner = THIS_MODULE, | 242 | .owner = THIS_MODULE, |
| 243 | .name = "auo_k1901fb", | 243 | .name = "auo_k1901fb", |
diff --git a/drivers/video/auo_k190x.c b/drivers/video/auo_k190x.c index c03ecdd31e4c..97f79356141e 100644 --- a/drivers/video/auo_k190x.c +++ b/drivers/video/auo_k190x.c | |||
| @@ -773,8 +773,8 @@ EXPORT_SYMBOL_GPL(auok190x_pm); | |||
| 773 | * Common probe and remove code | 773 | * Common probe and remove code |
| 774 | */ | 774 | */ |
| 775 | 775 | ||
| 776 | int __devinit auok190x_common_probe(struct platform_device *pdev, | 776 | int auok190x_common_probe(struct platform_device *pdev, |
| 777 | struct auok190x_init_data *init) | 777 | struct auok190x_init_data *init) |
| 778 | { | 778 | { |
| 779 | struct auok190x_board *board = init->board; | 779 | struct auok190x_board *board = init->board; |
| 780 | struct auok190xfb_par *par; | 780 | struct auok190xfb_par *par; |
| @@ -1006,7 +1006,7 @@ err_reg: | |||
| 1006 | } | 1006 | } |
| 1007 | EXPORT_SYMBOL_GPL(auok190x_common_probe); | 1007 | EXPORT_SYMBOL_GPL(auok190x_common_probe); |
| 1008 | 1008 | ||
| 1009 | int __devexit auok190x_common_remove(struct platform_device *pdev) | 1009 | int auok190x_common_remove(struct platform_device *pdev) |
| 1010 | { | 1010 | { |
| 1011 | struct fb_info *info = platform_get_drvdata(pdev); | 1011 | struct fb_info *info = platform_get_drvdata(pdev); |
| 1012 | struct auok190xfb_par *par = info->par; | 1012 | struct auok190xfb_par *par = info->par; |
diff --git a/drivers/video/bf537-lq035.c b/drivers/video/bf537-lq035.c index 7347aa1e5e4a..a82d2578d976 100644 --- a/drivers/video/bf537-lq035.c +++ b/drivers/video/bf537-lq035.c | |||
| @@ -87,8 +87,8 @@ static void set_vcomm(void) | |||
| 87 | pr_err("i2c_smbus_write_byte_data fail: %d\n", nr); | 87 | pr_err("i2c_smbus_write_byte_data fail: %d\n", nr); |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | static int __devinit ad5280_probe(struct i2c_client *client, | 90 | static int ad5280_probe(struct i2c_client *client, |
| 91 | const struct i2c_device_id *id) | 91 | const struct i2c_device_id *id) |
| 92 | { | 92 | { |
| 93 | int ret; | 93 | int ret; |
| 94 | if (!i2c_check_functionality(client->adapter, | 94 | if (!i2c_check_functionality(client->adapter, |
| @@ -108,7 +108,7 @@ static int __devinit ad5280_probe(struct i2c_client *client, | |||
| 108 | return 0; | 108 | return 0; |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | static int __devexit ad5280_remove(struct i2c_client *client) | 111 | static int ad5280_remove(struct i2c_client *client) |
| 112 | { | 112 | { |
| 113 | ad5280_client = NULL; | 113 | ad5280_client = NULL; |
| 114 | return 0; | 114 | return 0; |
| @@ -126,7 +126,7 @@ static struct i2c_driver ad5280_driver = { | |||
| 126 | .name = "bf537-lq035-ad5280", | 126 | .name = "bf537-lq035-ad5280", |
| 127 | }, | 127 | }, |
| 128 | .probe = ad5280_probe, | 128 | .probe = ad5280_probe, |
| 129 | .remove = __devexit_p(ad5280_remove), | 129 | .remove = ad5280_remove, |
| 130 | .id_table = ad5280_id, | 130 | .id_table = ad5280_id, |
| 131 | }; | 131 | }; |
| 132 | 132 | ||
| @@ -360,7 +360,7 @@ static int config_dma(void) | |||
| 360 | return 0; | 360 | return 0; |
| 361 | } | 361 | } |
| 362 | 362 | ||
| 363 | static int __devinit request_ports(void) | 363 | static int request_ports(void) |
| 364 | { | 364 | { |
| 365 | u16 tmr_req[] = TIMERS; | 365 | u16 tmr_req[] = TIMERS; |
| 366 | 366 | ||
| @@ -443,7 +443,7 @@ static struct fb_var_screeninfo bfin_lq035_fb_defined = { | |||
| 443 | .transp = {0, 0, 0}, | 443 | .transp = {0, 0, 0}, |
| 444 | }; | 444 | }; |
| 445 | 445 | ||
| 446 | static struct fb_fix_screeninfo bfin_lq035_fb_fix __devinitdata = { | 446 | static struct fb_fix_screeninfo bfin_lq035_fb_fix = { |
| 447 | .id = KBUILD_MODNAME, | 447 | .id = KBUILD_MODNAME, |
| 448 | .smem_len = ACTIVE_VIDEO_MEM_SIZE, | 448 | .smem_len = ACTIVE_VIDEO_MEM_SIZE, |
| 449 | .type = FB_TYPE_PACKED_PIXELS, | 449 | .type = FB_TYPE_PACKED_PIXELS, |
| @@ -686,7 +686,7 @@ static struct lcd_ops bfin_lcd_ops = { | |||
| 686 | 686 | ||
| 687 | static struct lcd_device *lcd_dev; | 687 | static struct lcd_device *lcd_dev; |
| 688 | 688 | ||
| 689 | static int __devinit bfin_lq035_probe(struct platform_device *pdev) | 689 | static int bfin_lq035_probe(struct platform_device *pdev) |
| 690 | { | 690 | { |
| 691 | struct backlight_properties props; | 691 | struct backlight_properties props; |
| 692 | dma_addr_t dma_handle; | 692 | dma_addr_t dma_handle; |
| @@ -816,7 +816,7 @@ out_ports: | |||
| 816 | return ret; | 816 | return ret; |
| 817 | } | 817 | } |
| 818 | 818 | ||
| 819 | static int __devexit bfin_lq035_remove(struct platform_device *pdev) | 819 | static int bfin_lq035_remove(struct platform_device *pdev) |
| 820 | { | 820 | { |
| 821 | if (fb_buffer != NULL) | 821 | if (fb_buffer != NULL) |
| 822 | dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0); | 822 | dma_free_coherent(NULL, TOTAL_VIDEO_MEM_SIZE, fb_buffer, 0); |
| @@ -889,7 +889,7 @@ static int bfin_lq035_resume(struct platform_device *pdev) | |||
| 889 | 889 | ||
| 890 | static struct platform_driver bfin_lq035_driver = { | 890 | static struct platform_driver bfin_lq035_driver = { |
| 891 | .probe = bfin_lq035_probe, | 891 | .probe = bfin_lq035_probe, |
| 892 | .remove = __devexit_p(bfin_lq035_remove), | 892 | .remove = bfin_lq035_remove, |
| 893 | .suspend = bfin_lq035_suspend, | 893 | .suspend = bfin_lq035_suspend, |
| 894 | .resume = bfin_lq035_resume, | 894 | .resume = bfin_lq035_resume, |
| 895 | .driver = { | 895 | .driver = { |
diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c index ff5663f5c64f..2726a5b66741 100644 --- a/drivers/video/bf54x-lq043fb.c +++ b/drivers/video/bf54x-lq043fb.c | |||
| @@ -497,7 +497,7 @@ static irqreturn_t bfin_bf54x_irq_error(int irq, void *dev_id) | |||
| 497 | return IRQ_HANDLED; | 497 | return IRQ_HANDLED; |
| 498 | } | 498 | } |
| 499 | 499 | ||
| 500 | static int __devinit bfin_bf54x_probe(struct platform_device *pdev) | 500 | static int bfin_bf54x_probe(struct platform_device *pdev) |
| 501 | { | 501 | { |
| 502 | #ifndef NO_BL_SUPPORT | 502 | #ifndef NO_BL_SUPPORT |
| 503 | struct backlight_properties props; | 503 | struct backlight_properties props; |
| @@ -686,7 +686,7 @@ out1: | |||
| 686 | return ret; | 686 | return ret; |
| 687 | } | 687 | } |
| 688 | 688 | ||
| 689 | static int __devexit bfin_bf54x_remove(struct platform_device *pdev) | 689 | static int bfin_bf54x_remove(struct platform_device *pdev) |
| 690 | { | 690 | { |
| 691 | 691 | ||
| 692 | struct fb_info *fbinfo = platform_get_drvdata(pdev); | 692 | struct fb_info *fbinfo = platform_get_drvdata(pdev); |
| @@ -754,7 +754,7 @@ static int bfin_bf54x_resume(struct platform_device *pdev) | |||
| 754 | 754 | ||
| 755 | static struct platform_driver bfin_bf54x_driver = { | 755 | static struct platform_driver bfin_bf54x_driver = { |
| 756 | .probe = bfin_bf54x_probe, | 756 | .probe = bfin_bf54x_probe, |
| 757 | .remove = __devexit_p(bfin_bf54x_remove), | 757 | .remove = bfin_bf54x_remove, |
| 758 | .suspend = bfin_bf54x_suspend, | 758 | .suspend = bfin_bf54x_suspend, |
| 759 | .resume = bfin_bf54x_resume, | 759 | .resume = bfin_bf54x_resume, |
| 760 | .driver = { | 760 | .driver = { |
diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c index 6fbc75c2f0a1..29d8c0443a1f 100644 --- a/drivers/video/bfin-lq035q1-fb.c +++ b/drivers/video/bfin-lq035q1-fb.c | |||
| @@ -137,7 +137,7 @@ static int lq035q1_control(struct spi_device *spi, unsigned char reg, unsigned s | |||
| 137 | return ret; | 137 | return ret; |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | static int __devinit lq035q1_spidev_probe(struct spi_device *spi) | 140 | static int lq035q1_spidev_probe(struct spi_device *spi) |
| 141 | { | 141 | { |
| 142 | int ret; | 142 | int ret; |
| 143 | struct spi_control *ctl; | 143 | struct spi_control *ctl; |
| @@ -358,8 +358,8 @@ static inline void bfin_lq035q1_free_ports(unsigned ppi16) | |||
| 358 | gpio_free(P_IDENT(P_PPI0_FS3)); | 358 | gpio_free(P_IDENT(P_PPI0_FS3)); |
| 359 | } | 359 | } |
| 360 | 360 | ||
| 361 | static int __devinit bfin_lq035q1_request_ports(struct platform_device *pdev, | 361 | static int bfin_lq035q1_request_ports(struct platform_device *pdev, |
| 362 | unsigned ppi16) | 362 | unsigned ppi16) |
| 363 | { | 363 | { |
| 364 | int ret; | 364 | int ret; |
| 365 | /* ANOMALY_05000400 - PPI Does Not Start Properly In Specific Mode: | 365 | /* ANOMALY_05000400 - PPI Does Not Start Properly In Specific Mode: |
| @@ -555,7 +555,7 @@ static irqreturn_t bfin_lq035q1_irq_error(int irq, void *dev_id) | |||
| 555 | return IRQ_HANDLED; | 555 | return IRQ_HANDLED; |
| 556 | } | 556 | } |
| 557 | 557 | ||
| 558 | static int __devinit bfin_lq035q1_probe(struct platform_device *pdev) | 558 | static int bfin_lq035q1_probe(struct platform_device *pdev) |
| 559 | { | 559 | { |
| 560 | struct bfin_lq035q1fb_info *info; | 560 | struct bfin_lq035q1fb_info *info; |
| 561 | struct fb_info *fbinfo; | 561 | struct fb_info *fbinfo; |
| @@ -706,7 +706,7 @@ static int __devinit bfin_lq035q1_probe(struct platform_device *pdev) | |||
| 706 | 706 | ||
| 707 | info->spidrv.driver.name = DRIVER_NAME"-spi"; | 707 | info->spidrv.driver.name = DRIVER_NAME"-spi"; |
| 708 | info->spidrv.probe = lq035q1_spidev_probe; | 708 | info->spidrv.probe = lq035q1_spidev_probe; |
| 709 | info->spidrv.remove = __devexit_p(lq035q1_spidev_remove); | 709 | info->spidrv.remove = lq035q1_spidev_remove; |
| 710 | info->spidrv.shutdown = lq035q1_spidev_shutdown; | 710 | info->spidrv.shutdown = lq035q1_spidev_shutdown; |
| 711 | info->spidrv.suspend = lq035q1_spidev_suspend; | 711 | info->spidrv.suspend = lq035q1_spidev_suspend; |
| 712 | info->spidrv.resume = lq035q1_spidev_resume; | 712 | info->spidrv.resume = lq035q1_spidev_resume; |
| @@ -764,7 +764,7 @@ static int __devinit bfin_lq035q1_probe(struct platform_device *pdev) | |||
| 764 | return ret; | 764 | return ret; |
| 765 | } | 765 | } |
| 766 | 766 | ||
| 767 | static int __devexit bfin_lq035q1_remove(struct platform_device *pdev) | 767 | static int bfin_lq035q1_remove(struct platform_device *pdev) |
| 768 | { | 768 | { |
| 769 | struct fb_info *fbinfo = platform_get_drvdata(pdev); | 769 | struct fb_info *fbinfo = platform_get_drvdata(pdev); |
| 770 | struct bfin_lq035q1fb_info *info = fbinfo->par; | 770 | struct bfin_lq035q1fb_info *info = fbinfo->par; |
| @@ -845,7 +845,7 @@ static struct dev_pm_ops bfin_lq035q1_dev_pm_ops = { | |||
| 845 | 845 | ||
| 846 | static struct platform_driver bfin_lq035q1_driver = { | 846 | static struct platform_driver bfin_lq035q1_driver = { |
| 847 | .probe = bfin_lq035q1_probe, | 847 | .probe = bfin_lq035q1_probe, |
| 848 | .remove = __devexit_p(bfin_lq035q1_remove), | 848 | .remove = bfin_lq035q1_remove, |
| 849 | .driver = { | 849 | .driver = { |
| 850 | .name = DRIVER_NAME, | 850 | .name = DRIVER_NAME, |
| 851 | #ifdef CONFIG_PM | 851 | #ifdef CONFIG_PM |
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c index ae0fb24b8b43..d46da01c31ae 100644 --- a/drivers/video/bfin-t350mcqb-fb.c +++ b/drivers/video/bfin-t350mcqb-fb.c | |||
| @@ -418,7 +418,7 @@ static irqreturn_t bfin_t350mcqb_irq_error(int irq, void *dev_id) | |||
| 418 | return IRQ_HANDLED; | 418 | return IRQ_HANDLED; |
| 419 | } | 419 | } |
| 420 | 420 | ||
| 421 | static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev) | 421 | static int bfin_t350mcqb_probe(struct platform_device *pdev) |
| 422 | { | 422 | { |
| 423 | #ifndef NO_BL_SUPPORT | 423 | #ifndef NO_BL_SUPPORT |
| 424 | struct backlight_properties props; | 424 | struct backlight_properties props; |
| @@ -583,7 +583,7 @@ out1: | |||
| 583 | return ret; | 583 | return ret; |
| 584 | } | 584 | } |
| 585 | 585 | ||
| 586 | static int __devexit bfin_t350mcqb_remove(struct platform_device *pdev) | 586 | static int bfin_t350mcqb_remove(struct platform_device *pdev) |
| 587 | { | 587 | { |
| 588 | 588 | ||
| 589 | struct fb_info *fbinfo = platform_get_drvdata(pdev); | 589 | struct fb_info *fbinfo = platform_get_drvdata(pdev); |
| @@ -658,7 +658,7 @@ static int bfin_t350mcqb_resume(struct platform_device *pdev) | |||
| 658 | 658 | ||
| 659 | static struct platform_driver bfin_t350mcqb_driver = { | 659 | static struct platform_driver bfin_t350mcqb_driver = { |
| 660 | .probe = bfin_t350mcqb_probe, | 660 | .probe = bfin_t350mcqb_probe, |
| 661 | .remove = __devexit_p(bfin_t350mcqb_remove), | 661 | .remove = bfin_t350mcqb_remove, |
| 662 | .suspend = bfin_t350mcqb_suspend, | 662 | .suspend = bfin_t350mcqb_suspend, |
| 663 | .resume = bfin_t350mcqb_resume, | 663 | .resume = bfin_t350mcqb_resume, |
| 664 | .driver = { | 664 | .driver = { |
diff --git a/drivers/video/bfin_adv7393fb.c b/drivers/video/bfin_adv7393fb.c index d0f121bd8b25..8d411a3c9966 100644 --- a/drivers/video/bfin_adv7393fb.c +++ b/drivers/video/bfin_adv7393fb.c | |||
| @@ -88,7 +88,7 @@ static struct fb_var_screeninfo bfin_adv7393_fb_defined = { | |||
| 88 | .transp = {0, 0, 0}, | 88 | .transp = {0, 0, 0}, |
| 89 | }; | 89 | }; |
| 90 | 90 | ||
| 91 | static struct fb_fix_screeninfo bfin_adv7393_fb_fix __devinitdata = { | 91 | static struct fb_fix_screeninfo bfin_adv7393_fb_fix = { |
| 92 | .id = "BFIN ADV7393", | 92 | .id = "BFIN ADV7393", |
| 93 | .smem_len = 720 * 480 * 2, | 93 | .smem_len = 720 * 480 * 2, |
| 94 | .type = FB_TYPE_PACKED_PIXELS, | 94 | .type = FB_TYPE_PACKED_PIXELS, |
| @@ -368,8 +368,8 @@ adv7393_write_proc(struct file *file, const char __user * buffer, | |||
| 368 | return count; | 368 | return count; |
| 369 | } | 369 | } |
| 370 | 370 | ||
| 371 | static int __devinit bfin_adv7393_fb_probe(struct i2c_client *client, | 371 | static int bfin_adv7393_fb_probe(struct i2c_client *client, |
| 372 | const struct i2c_device_id *id) | 372 | const struct i2c_device_id *id) |
| 373 | { | 373 | { |
| 374 | int ret = 0; | 374 | int ret = 0; |
| 375 | struct proc_dir_entry *entry; | 375 | struct proc_dir_entry *entry; |
| @@ -719,7 +719,7 @@ static int bfin_adv7393_fb_setcolreg(u_int regno, u_int red, u_int green, | |||
| 719 | return 0; | 719 | return 0; |
| 720 | } | 720 | } |
| 721 | 721 | ||
| 722 | static int __devexit bfin_adv7393_fb_remove(struct i2c_client *client) | 722 | static int bfin_adv7393_fb_remove(struct i2c_client *client) |
| 723 | { | 723 | { |
| 724 | struct adv7393fb_device *fbdev = i2c_get_clientdata(client); | 724 | struct adv7393fb_device *fbdev = i2c_get_clientdata(client); |
| 725 | 725 | ||
| @@ -794,7 +794,7 @@ static struct i2c_driver bfin_adv7393_fb_driver = { | |||
| 794 | #endif | 794 | #endif |
| 795 | }, | 795 | }, |
| 796 | .probe = bfin_adv7393_fb_probe, | 796 | .probe = bfin_adv7393_fb_probe, |
| 797 | .remove = __devexit_p(bfin_adv7393_fb_remove), | 797 | .remove = bfin_adv7393_fb_remove, |
| 798 | .id_table = bfin_adv7393_id, | 798 | .id_table = bfin_adv7393_id, |
| 799 | }; | 799 | }; |
| 800 | 800 | ||
diff --git a/drivers/video/broadsheetfb.c b/drivers/video/broadsheetfb.c index c95b417d0d41..b09701c79432 100644 --- a/drivers/video/broadsheetfb.c +++ b/drivers/video/broadsheetfb.c | |||
| @@ -91,7 +91,7 @@ static struct panel_info panel_table[] = { | |||
| 91 | #define DPY_W 800 | 91 | #define DPY_W 800 |
| 92 | #define DPY_H 600 | 92 | #define DPY_H 600 |
| 93 | 93 | ||
| 94 | static struct fb_fix_screeninfo broadsheetfb_fix __devinitdata = { | 94 | static struct fb_fix_screeninfo broadsheetfb_fix = { |
| 95 | .id = "broadsheetfb", | 95 | .id = "broadsheetfb", |
| 96 | .type = FB_TYPE_PACKED_PIXELS, | 96 | .type = FB_TYPE_PACKED_PIXELS, |
| 97 | .visual = FB_VISUAL_STATIC_PSEUDOCOLOR, | 97 | .visual = FB_VISUAL_STATIC_PSEUDOCOLOR, |
| @@ -102,7 +102,7 @@ static struct fb_fix_screeninfo broadsheetfb_fix __devinitdata = { | |||
| 102 | .accel = FB_ACCEL_NONE, | 102 | .accel = FB_ACCEL_NONE, |
| 103 | }; | 103 | }; |
| 104 | 104 | ||
| 105 | static struct fb_var_screeninfo broadsheetfb_var __devinitdata = { | 105 | static struct fb_var_screeninfo broadsheetfb_var = { |
| 106 | .xres = DPY_W, | 106 | .xres = DPY_W, |
| 107 | .yres = DPY_H, | 107 | .yres = DPY_H, |
| 108 | .xres_virtual = DPY_W, | 108 | .xres_virtual = DPY_W, |
| @@ -774,7 +774,7 @@ static DEVICE_ATTR(loadstore_waveform, S_IWUSR, NULL, | |||
| 774 | broadsheet_loadstore_waveform); | 774 | broadsheet_loadstore_waveform); |
| 775 | 775 | ||
| 776 | /* upper level functions that manipulate the display and other stuff */ | 776 | /* upper level functions that manipulate the display and other stuff */ |
| 777 | static void __devinit broadsheet_init_display(struct broadsheetfb_par *par) | 777 | static void broadsheet_init_display(struct broadsheetfb_par *par) |
| 778 | { | 778 | { |
| 779 | u16 args[5]; | 779 | u16 args[5]; |
| 780 | int xres = par->info->var.xres; | 780 | int xres = par->info->var.xres; |
| @@ -834,7 +834,7 @@ static void __devinit broadsheet_init_display(struct broadsheetfb_par *par) | |||
| 834 | par->board->wait_for_rdy(par); | 834 | par->board->wait_for_rdy(par); |
| 835 | } | 835 | } |
| 836 | 836 | ||
| 837 | static void __devinit broadsheet_identify(struct broadsheetfb_par *par) | 837 | static void broadsheet_identify(struct broadsheetfb_par *par) |
| 838 | { | 838 | { |
| 839 | u16 rev, prc; | 839 | u16 rev, prc; |
| 840 | struct device *dev = par->info->device; | 840 | struct device *dev = par->info->device; |
| @@ -849,7 +849,7 @@ static void __devinit broadsheet_identify(struct broadsheetfb_par *par) | |||
| 849 | dev_warn(dev, "Unrecognized Broadsheet Revision\n"); | 849 | dev_warn(dev, "Unrecognized Broadsheet Revision\n"); |
| 850 | } | 850 | } |
| 851 | 851 | ||
| 852 | static void __devinit broadsheet_init(struct broadsheetfb_par *par) | 852 | static void broadsheet_init(struct broadsheetfb_par *par) |
| 853 | { | 853 | { |
| 854 | broadsheet_send_command(par, BS_CMD_INIT_SYS_RUN); | 854 | broadsheet_send_command(par, BS_CMD_INIT_SYS_RUN); |
| 855 | /* the controller needs a second */ | 855 | /* the controller needs a second */ |
| @@ -1058,7 +1058,7 @@ static struct fb_deferred_io broadsheetfb_defio = { | |||
| 1058 | .deferred_io = broadsheetfb_dpy_deferred_io, | 1058 | .deferred_io = broadsheetfb_dpy_deferred_io, |
| 1059 | }; | 1059 | }; |
| 1060 | 1060 | ||
| 1061 | static int __devinit broadsheetfb_probe(struct platform_device *dev) | 1061 | static int broadsheetfb_probe(struct platform_device *dev) |
| 1062 | { | 1062 | { |
| 1063 | struct fb_info *info; | 1063 | struct fb_info *info; |
| 1064 | struct broadsheet_board *board; | 1064 | struct broadsheet_board *board; |
| @@ -1190,7 +1190,7 @@ err: | |||
| 1190 | 1190 | ||
| 1191 | } | 1191 | } |
| 1192 | 1192 | ||
| 1193 | static int __devexit broadsheetfb_remove(struct platform_device *dev) | 1193 | static int broadsheetfb_remove(struct platform_device *dev) |
| 1194 | { | 1194 | { |
| 1195 | struct fb_info *info = platform_get_drvdata(dev); | 1195 | struct fb_info *info = platform_get_drvdata(dev); |
| 1196 | 1196 | ||
| @@ -1211,7 +1211,7 @@ static int __devexit broadsheetfb_remove(struct platform_device *dev) | |||
| 1211 | 1211 | ||
| 1212 | static struct platform_driver broadsheetfb_driver = { | 1212 | static struct platform_driver broadsheetfb_driver = { |
| 1213 | .probe = broadsheetfb_probe, | 1213 | .probe = broadsheetfb_probe, |
| 1214 | .remove = __devexit_p(broadsheetfb_remove), | 1214 | .remove = broadsheetfb_remove, |
| 1215 | .driver = { | 1215 | .driver = { |
| 1216 | .owner = THIS_MODULE, | 1216 | .owner = THIS_MODULE, |
| 1217 | .name = "broadsheetfb", | 1217 | .name = "broadsheetfb", |
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c index 6bea9a936798..60017fc634b5 100644 --- a/drivers/video/bw2.c +++ b/drivers/video/bw2.c | |||
| @@ -179,7 +179,7 @@ static int bw2_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) | |||
| 179 | * Initialisation | 179 | * Initialisation |
| 180 | */ | 180 | */ |
| 181 | 181 | ||
| 182 | static void __devinit bw2_init_fix(struct fb_info *info, int linebytes) | 182 | static void bw2_init_fix(struct fb_info *info, int linebytes) |
| 183 | { | 183 | { |
| 184 | strlcpy(info->fix.id, "bwtwo", sizeof(info->fix.id)); | 184 | strlcpy(info->fix.id, "bwtwo", sizeof(info->fix.id)); |
| 185 | 185 | ||
| @@ -191,44 +191,43 @@ static void __devinit bw2_init_fix(struct fb_info *info, int linebytes) | |||
| 191 | info->fix.accel = FB_ACCEL_SUN_BWTWO; | 191 | info->fix.accel = FB_ACCEL_SUN_BWTWO; |
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | static u8 bw2regs_1600[] __devinitdata = { | 194 | static u8 bw2regs_1600[] = { |
| 195 | 0x14, 0x8b, 0x15, 0x28, 0x16, 0x03, 0x17, 0x13, | 195 | 0x14, 0x8b, 0x15, 0x28, 0x16, 0x03, 0x17, 0x13, |
| 196 | 0x18, 0x7b, 0x19, 0x05, 0x1a, 0x34, 0x1b, 0x2e, | 196 | 0x18, 0x7b, 0x19, 0x05, 0x1a, 0x34, 0x1b, 0x2e, |
| 197 | 0x1c, 0x00, 0x1d, 0x0a, 0x1e, 0xff, 0x1f, 0x01, | 197 | 0x1c, 0x00, 0x1d, 0x0a, 0x1e, 0xff, 0x1f, 0x01, |
| 198 | 0x10, 0x21, 0 | 198 | 0x10, 0x21, 0 |
| 199 | }; | 199 | }; |
| 200 | 200 | ||
| 201 | static u8 bw2regs_ecl[] __devinitdata = { | 201 | static u8 bw2regs_ecl[] = { |
| 202 | 0x14, 0x65, 0x15, 0x1e, 0x16, 0x04, 0x17, 0x0c, | 202 | 0x14, 0x65, 0x15, 0x1e, 0x16, 0x04, 0x17, 0x0c, |
| 203 | 0x18, 0x5e, 0x19, 0x03, 0x1a, 0xa7, 0x1b, 0x23, | 203 | 0x18, 0x5e, 0x19, 0x03, 0x1a, 0xa7, 0x1b, 0x23, |
| 204 | 0x1c, 0x00, 0x1d, 0x08, 0x1e, 0xff, 0x1f, 0x01, | 204 | 0x1c, 0x00, 0x1d, 0x08, 0x1e, 0xff, 0x1f, 0x01, |
| 205 | 0x10, 0x20, 0 | 205 | 0x10, 0x20, 0 |
| 206 | }; | 206 | }; |
| 207 | 207 | ||
| 208 | static u8 bw2regs_analog[] __devinitdata = { | 208 | static u8 bw2regs_analog[] = { |
| 209 | 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x03, 0x17, 0x13, | 209 | 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x03, 0x17, 0x13, |
| 210 | 0x18, 0xb0, 0x19, 0x03, 0x1a, 0xa6, 0x1b, 0x22, | 210 | 0x18, 0xb0, 0x19, 0x03, 0x1a, 0xa6, 0x1b, 0x22, |
| 211 | 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, | 211 | 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, |
| 212 | 0x10, 0x20, 0 | 212 | 0x10, 0x20, 0 |
| 213 | }; | 213 | }; |
| 214 | 214 | ||
| 215 | static u8 bw2regs_76hz[] __devinitdata = { | 215 | static u8 bw2regs_76hz[] = { |
| 216 | 0x14, 0xb7, 0x15, 0x27, 0x16, 0x03, 0x17, 0x0f, | 216 | 0x14, 0xb7, 0x15, 0x27, 0x16, 0x03, 0x17, 0x0f, |
| 217 | 0x18, 0xae, 0x19, 0x03, 0x1a, 0xae, 0x1b, 0x2a, | 217 | 0x18, 0xae, 0x19, 0x03, 0x1a, 0xae, 0x1b, 0x2a, |
| 218 | 0x1c, 0x01, 0x1d, 0x09, 0x1e, 0xff, 0x1f, 0x01, | 218 | 0x1c, 0x01, 0x1d, 0x09, 0x1e, 0xff, 0x1f, 0x01, |
| 219 | 0x10, 0x24, 0 | 219 | 0x10, 0x24, 0 |
| 220 | }; | 220 | }; |
| 221 | 221 | ||
| 222 | static u8 bw2regs_66hz[] __devinitdata = { | 222 | static u8 bw2regs_66hz[] = { |
| 223 | 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x04, 0x17, 0x14, | 223 | 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x04, 0x17, 0x14, |
| 224 | 0x18, 0xae, 0x19, 0x03, 0x1a, 0xa8, 0x1b, 0x24, | 224 | 0x18, 0xae, 0x19, 0x03, 0x1a, 0xa8, 0x1b, 0x24, |
| 225 | 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, | 225 | 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, |
| 226 | 0x10, 0x20, 0 | 226 | 0x10, 0x20, 0 |
| 227 | }; | 227 | }; |
| 228 | 228 | ||
| 229 | static int __devinit bw2_do_default_mode(struct bw2_par *par, | 229 | static int bw2_do_default_mode(struct bw2_par *par, struct fb_info *info, |
| 230 | struct fb_info *info, | 230 | int *linebytes) |
| 231 | int *linebytes) | ||
| 232 | { | 231 | { |
| 233 | u8 status, mon; | 232 | u8 status, mon; |
| 234 | u8 *p; | 233 | u8 *p; |
| @@ -273,7 +272,7 @@ static int __devinit bw2_do_default_mode(struct bw2_par *par, | |||
| 273 | return 0; | 272 | return 0; |
| 274 | } | 273 | } |
| 275 | 274 | ||
| 276 | static int __devinit bw2_probe(struct platform_device *op) | 275 | static int bw2_probe(struct platform_device *op) |
| 277 | { | 276 | { |
| 278 | struct device_node *dp = op->dev.of_node; | 277 | struct device_node *dp = op->dev.of_node; |
| 279 | struct fb_info *info; | 278 | struct fb_info *info; |
| @@ -352,7 +351,7 @@ out_err: | |||
| 352 | return err; | 351 | return err; |
| 353 | } | 352 | } |
| 354 | 353 | ||
| 355 | static int __devexit bw2_remove(struct platform_device *op) | 354 | static int bw2_remove(struct platform_device *op) |
| 356 | { | 355 | { |
| 357 | struct fb_info *info = dev_get_drvdata(&op->dev); | 356 | struct fb_info *info = dev_get_drvdata(&op->dev); |
| 358 | struct bw2_par *par = info->par; | 357 | struct bw2_par *par = info->par; |
| @@ -384,7 +383,7 @@ static struct platform_driver bw2_driver = { | |||
| 384 | .of_match_table = bw2_match, | 383 | .of_match_table = bw2_match, |
| 385 | }, | 384 | }, |
| 386 | .probe = bw2_probe, | 385 | .probe = bw2_probe, |
| 387 | .remove = __devexit_p(bw2_remove), | 386 | .remove = bw2_remove, |
| 388 | }; | 387 | }; |
| 389 | 388 | ||
| 390 | static int __init bw2_init(void) | 389 | static int __init bw2_init(void) |
diff --git a/drivers/video/carminefb.c b/drivers/video/carminefb.c index 2c76fdf23f2a..153dd65b0ae8 100644 --- a/drivers/video/carminefb.c +++ b/drivers/video/carminefb.c | |||
| @@ -78,7 +78,7 @@ struct carmine_fb { | |||
| 78 | u32 pseudo_palette[16]; | 78 | u32 pseudo_palette[16]; |
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | static struct fb_fix_screeninfo carminefb_fix __devinitdata = { | 81 | static struct fb_fix_screeninfo carminefb_fix = { |
| 82 | .id = "Carmine", | 82 | .id = "Carmine", |
| 83 | .type = FB_TYPE_PACKED_PIXELS, | 83 | .type = FB_TYPE_PACKED_PIXELS, |
| 84 | .visual = FB_VISUAL_TRUECOLOR, | 84 | .visual = FB_VISUAL_TRUECOLOR, |
| @@ -537,8 +537,9 @@ static struct fb_ops carminefb_ops = { | |||
| 537 | .fb_setcolreg = carmine_setcolreg, | 537 | .fb_setcolreg = carmine_setcolreg, |
| 538 | }; | 538 | }; |
| 539 | 539 | ||
| 540 | static int __devinit alloc_carmine_fb(void __iomem *regs, void __iomem *smem_base, | 540 | static int alloc_carmine_fb(void __iomem *regs, void __iomem *smem_base, |
| 541 | int smem_offset, struct device *device, struct fb_info **rinfo) | 541 | int smem_offset, struct device *device, |
| 542 | struct fb_info **rinfo) | ||
| 542 | { | 543 | { |
| 543 | int ret; | 544 | int ret; |
| 544 | struct fb_info *info; | 545 | struct fb_info *info; |
| @@ -606,8 +607,7 @@ static void cleanup_fb_device(struct fb_info *info) | |||
| 606 | } | 607 | } |
| 607 | } | 608 | } |
| 608 | 609 | ||
| 609 | static int __devinit carminefb_probe(struct pci_dev *dev, | 610 | static int carminefb_probe(struct pci_dev *dev, const struct pci_device_id *ent) |
| 610 | const struct pci_device_id *ent) | ||
| 611 | { | 611 | { |
| 612 | struct carmine_hw *hw; | 612 | struct carmine_hw *hw; |
| 613 | struct device *device = &dev->dev; | 613 | struct device *device = &dev->dev; |
| @@ -721,7 +721,7 @@ err_enable_pci: | |||
| 721 | return ret; | 721 | return ret; |
| 722 | } | 722 | } |
| 723 | 723 | ||
| 724 | static void __devexit carminefb_remove(struct pci_dev *dev) | 724 | static void carminefb_remove(struct pci_dev *dev) |
| 725 | { | 725 | { |
| 726 | struct carmine_hw *hw = pci_get_drvdata(dev); | 726 | struct carmine_hw *hw = pci_get_drvdata(dev); |
| 727 | struct fb_fix_screeninfo fix; | 727 | struct fb_fix_screeninfo fix; |
| @@ -752,7 +752,7 @@ static void __devexit carminefb_remove(struct pci_dev *dev) | |||
| 752 | } | 752 | } |
| 753 | 753 | ||
| 754 | #define PCI_VENDOR_ID_FUJITU_LIMITED 0x10cf | 754 | #define PCI_VENDOR_ID_FUJITU_LIMITED 0x10cf |
| 755 | static struct pci_device_id carmine_devices[] __devinitdata = { | 755 | static struct pci_device_id carmine_devices[] = { |
| 756 | { | 756 | { |
| 757 | PCI_DEVICE(PCI_VENDOR_ID_FUJITU_LIMITED, 0x202b)}, | 757 | PCI_DEVICE(PCI_VENDOR_ID_FUJITU_LIMITED, 0x202b)}, |
| 758 | {0, 0, 0, 0, 0, 0, 0} | 758 | {0, 0, 0, 0, 0, 0, 0} |
| @@ -764,7 +764,7 @@ static struct pci_driver carmine_pci_driver = { | |||
| 764 | .name = "carminefb", | 764 | .name = "carminefb", |
| 765 | .id_table = carmine_devices, | 765 | .id_table = carmine_devices, |
| 766 | .probe = carminefb_probe, | 766 | .probe = carminefb_probe, |
| 767 | .remove = __devexit_p(carminefb_remove), | 767 | .remove = carminefb_remove, |
| 768 | }; | 768 | }; |
| 769 | 769 | ||
| 770 | static int __init carminefb_init(void) | 770 | static int __init carminefb_init(void) |
diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c index f18895006627..ed3b8891e006 100644 --- a/drivers/video/cg14.c +++ b/drivers/video/cg14.c | |||
| @@ -352,8 +352,8 @@ static int cg14_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) | |||
| 352 | * Initialisation | 352 | * Initialisation |
| 353 | */ | 353 | */ |
| 354 | 354 | ||
| 355 | static void __devinit cg14_init_fix(struct fb_info *info, int linebytes, | 355 | static void cg14_init_fix(struct fb_info *info, int linebytes, |
| 356 | struct device_node *dp) | 356 | struct device_node *dp) |
| 357 | { | 357 | { |
| 358 | const char *name = dp->name; | 358 | const char *name = dp->name; |
| 359 | 359 | ||
| @@ -367,7 +367,7 @@ static void __devinit cg14_init_fix(struct fb_info *info, int linebytes, | |||
| 367 | info->fix.accel = FB_ACCEL_SUN_CG14; | 367 | info->fix.accel = FB_ACCEL_SUN_CG14; |
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | static struct sbus_mmap_map __cg14_mmap_map[CG14_MMAP_ENTRIES] __devinitdata = { | 370 | static struct sbus_mmap_map __cg14_mmap_map[CG14_MMAP_ENTRIES] = { |
| 371 | { | 371 | { |
| 372 | .voff = CG14_REGS, | 372 | .voff = CG14_REGS, |
| 373 | .poff = 0x80000000, | 373 | .poff = 0x80000000, |
| @@ -463,7 +463,7 @@ static void cg14_unmap_regs(struct platform_device *op, struct fb_info *info, | |||
| 463 | info->screen_base, info->fix.smem_len); | 463 | info->screen_base, info->fix.smem_len); |
| 464 | } | 464 | } |
| 465 | 465 | ||
| 466 | static int __devinit cg14_probe(struct platform_device *op) | 466 | static int cg14_probe(struct platform_device *op) |
| 467 | { | 467 | { |
| 468 | struct device_node *dp = op->dev.of_node; | 468 | struct device_node *dp = op->dev.of_node; |
| 469 | struct fb_info *info; | 469 | struct fb_info *info; |
| @@ -571,7 +571,7 @@ out_err: | |||
| 571 | return err; | 571 | return err; |
| 572 | } | 572 | } |
| 573 | 573 | ||
| 574 | static int __devexit cg14_remove(struct platform_device *op) | 574 | static int cg14_remove(struct platform_device *op) |
| 575 | { | 575 | { |
| 576 | struct fb_info *info = dev_get_drvdata(&op->dev); | 576 | struct fb_info *info = dev_get_drvdata(&op->dev); |
| 577 | struct cg14_par *par = info->par; | 577 | struct cg14_par *par = info->par; |
| @@ -603,7 +603,7 @@ static struct platform_driver cg14_driver = { | |||
| 603 | .of_match_table = cg14_match, | 603 | .of_match_table = cg14_match, |
| 604 | }, | 604 | }, |
| 605 | .probe = cg14_probe, | 605 | .probe = cg14_probe, |
| 606 | .remove = __devexit_p(cg14_remove), | 606 | .remove = cg14_remove, |
| 607 | }; | 607 | }; |
| 608 | 608 | ||
| 609 | static int __init cg14_init(void) | 609 | static int __init cg14_init(void) |
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c index c5e7612ff876..9f63507ded37 100644 --- a/drivers/video/cg3.c +++ b/drivers/video/cg3.c | |||
| @@ -243,8 +243,8 @@ static int cg3_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) | |||
| 243 | * Initialisation | 243 | * Initialisation |
| 244 | */ | 244 | */ |
| 245 | 245 | ||
| 246 | static void __devinit cg3_init_fix(struct fb_info *info, int linebytes, | 246 | static void cg3_init_fix(struct fb_info *info, int linebytes, |
| 247 | struct device_node *dp) | 247 | struct device_node *dp) |
| 248 | { | 248 | { |
| 249 | strlcpy(info->fix.id, dp->name, sizeof(info->fix.id)); | 249 | strlcpy(info->fix.id, dp->name, sizeof(info->fix.id)); |
| 250 | 250 | ||
| @@ -256,8 +256,8 @@ static void __devinit cg3_init_fix(struct fb_info *info, int linebytes, | |||
| 256 | info->fix.accel = FB_ACCEL_SUN_CGTHREE; | 256 | info->fix.accel = FB_ACCEL_SUN_CGTHREE; |
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | static void __devinit cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var, | 259 | static void cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var, |
| 260 | struct device_node *dp) | 260 | struct device_node *dp) |
| 261 | { | 261 | { |
| 262 | const char *params; | 262 | const char *params; |
| 263 | char *p; | 263 | char *p; |
| @@ -279,36 +279,36 @@ static void __devinit cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var, | |||
| 279 | } | 279 | } |
| 280 | } | 280 | } |
| 281 | 281 | ||
| 282 | static u8 cg3regvals_66hz[] __devinitdata = { /* 1152 x 900, 66 Hz */ | 282 | static u8 cg3regvals_66hz[] = { /* 1152 x 900, 66 Hz */ |
| 283 | 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x04, 0x17, 0x14, | 283 | 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x04, 0x17, 0x14, |
| 284 | 0x18, 0xae, 0x19, 0x03, 0x1a, 0xa8, 0x1b, 0x24, | 284 | 0x18, 0xae, 0x19, 0x03, 0x1a, 0xa8, 0x1b, 0x24, |
| 285 | 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, | 285 | 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, |
| 286 | 0x10, 0x20, 0 | 286 | 0x10, 0x20, 0 |
| 287 | }; | 287 | }; |
| 288 | 288 | ||
| 289 | static u8 cg3regvals_76hz[] __devinitdata = { /* 1152 x 900, 76 Hz */ | 289 | static u8 cg3regvals_76hz[] = { /* 1152 x 900, 76 Hz */ |
| 290 | 0x14, 0xb7, 0x15, 0x27, 0x16, 0x03, 0x17, 0x0f, | 290 | 0x14, 0xb7, 0x15, 0x27, 0x16, 0x03, 0x17, 0x0f, |
| 291 | 0x18, 0xae, 0x19, 0x03, 0x1a, 0xae, 0x1b, 0x2a, | 291 | 0x18, 0xae, 0x19, 0x03, 0x1a, 0xae, 0x1b, 0x2a, |
| 292 | 0x1c, 0x01, 0x1d, 0x09, 0x1e, 0xff, 0x1f, 0x01, | 292 | 0x1c, 0x01, 0x1d, 0x09, 0x1e, 0xff, 0x1f, 0x01, |
| 293 | 0x10, 0x24, 0 | 293 | 0x10, 0x24, 0 |
| 294 | }; | 294 | }; |
| 295 | 295 | ||
| 296 | static u8 cg3regvals_rdi[] __devinitdata = { /* 640 x 480, cgRDI */ | 296 | static u8 cg3regvals_rdi[] = { /* 640 x 480, cgRDI */ |
| 297 | 0x14, 0x70, 0x15, 0x20, 0x16, 0x08, 0x17, 0x10, | 297 | 0x14, 0x70, 0x15, 0x20, 0x16, 0x08, 0x17, 0x10, |
| 298 | 0x18, 0x06, 0x19, 0x02, 0x1a, 0x31, 0x1b, 0x51, | 298 | 0x18, 0x06, 0x19, 0x02, 0x1a, 0x31, 0x1b, 0x51, |
| 299 | 0x1c, 0x06, 0x1d, 0x0c, 0x1e, 0xff, 0x1f, 0x01, | 299 | 0x1c, 0x06, 0x1d, 0x0c, 0x1e, 0xff, 0x1f, 0x01, |
| 300 | 0x10, 0x22, 0 | 300 | 0x10, 0x22, 0 |
| 301 | }; | 301 | }; |
| 302 | 302 | ||
| 303 | static u8 *cg3_regvals[] __devinitdata = { | 303 | static u8 *cg3_regvals[] = { |
| 304 | cg3regvals_66hz, cg3regvals_76hz, cg3regvals_rdi | 304 | cg3regvals_66hz, cg3regvals_76hz, cg3regvals_rdi |
| 305 | }; | 305 | }; |
| 306 | 306 | ||
| 307 | static u_char cg3_dacvals[] __devinitdata = { | 307 | static u_char cg3_dacvals[] = { |
| 308 | 4, 0xff, 5, 0x00, 6, 0x70, 7, 0x00, 0 | 308 | 4, 0xff, 5, 0x00, 6, 0x70, 7, 0x00, 0 |
| 309 | }; | 309 | }; |
| 310 | 310 | ||
| 311 | static int __devinit cg3_do_default_mode(struct cg3_par *par) | 311 | static int cg3_do_default_mode(struct cg3_par *par) |
| 312 | { | 312 | { |
| 313 | enum cg3_type type; | 313 | enum cg3_type type; |
| 314 | u8 *p; | 314 | u8 *p; |
| @@ -346,7 +346,7 @@ static int __devinit cg3_do_default_mode(struct cg3_par *par) | |||
| 346 | return 0; | 346 | return 0; |
| 347 | } | 347 | } |
| 348 | 348 | ||
| 349 | static int __devinit cg3_probe(struct platform_device *op) | 349 | static int cg3_probe(struct platform_device *op) |
| 350 | { | 350 | { |
| 351 | struct device_node *dp = op->dev.of_node; | 351 | struct device_node *dp = op->dev.of_node; |
| 352 | struct fb_info *info; | 352 | struct fb_info *info; |
| @@ -433,7 +433,7 @@ out_err: | |||
| 433 | return err; | 433 | return err; |
| 434 | } | 434 | } |
| 435 | 435 | ||
| 436 | static int __devexit cg3_remove(struct platform_device *op) | 436 | static int cg3_remove(struct platform_device *op) |
| 437 | { | 437 | { |
| 438 | struct fb_info *info = dev_get_drvdata(&op->dev); | 438 | struct fb_info *info = dev_get_drvdata(&op->dev); |
| 439 | struct cg3_par *par = info->par; | 439 | struct cg3_par *par = info->par; |
| @@ -469,7 +469,7 @@ static struct platform_driver cg3_driver = { | |||
| 469 | .of_match_table = cg3_match, | 469 | .of_match_table = cg3_match, |
| 470 | }, | 470 | }, |
| 471 | .probe = cg3_probe, | 471 | .probe = cg3_probe, |
| 472 | .remove = __devexit_p(cg3_remove), | 472 | .remove = cg3_remove, |
| 473 | }; | 473 | }; |
| 474 | 474 | ||
| 475 | static int __init cg3_init(void) | 475 | static int __init cg3_init(void) |
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c index 179e96cdb323..3545decc7485 100644 --- a/drivers/video/cg6.c +++ b/drivers/video/cg6.c | |||
| @@ -607,7 +607,7 @@ static int cg6_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) | |||
| 607 | * Initialisation | 607 | * Initialisation |
| 608 | */ | 608 | */ |
| 609 | 609 | ||
| 610 | static void __devinit cg6_init_fix(struct fb_info *info, int linebytes) | 610 | static void cg6_init_fix(struct fb_info *info, int linebytes) |
| 611 | { | 611 | { |
| 612 | struct cg6_par *par = (struct cg6_par *)info->par; | 612 | struct cg6_par *par = (struct cg6_par *)info->par; |
| 613 | const char *cg6_cpu_name, *cg6_card_name; | 613 | const char *cg6_cpu_name, *cg6_card_name; |
| @@ -649,7 +649,7 @@ static void __devinit cg6_init_fix(struct fb_info *info, int linebytes) | |||
| 649 | } | 649 | } |
| 650 | 650 | ||
| 651 | /* Initialize Brooktree DAC */ | 651 | /* Initialize Brooktree DAC */ |
| 652 | static void __devinit cg6_bt_init(struct cg6_par *par) | 652 | static void cg6_bt_init(struct cg6_par *par) |
| 653 | { | 653 | { |
| 654 | struct bt_regs __iomem *bt = par->bt; | 654 | struct bt_regs __iomem *bt = par->bt; |
| 655 | 655 | ||
| @@ -663,7 +663,7 @@ static void __devinit cg6_bt_init(struct cg6_par *par) | |||
| 663 | sbus_writel(0x00 << 24, &bt->control); | 663 | sbus_writel(0x00 << 24, &bt->control); |
| 664 | } | 664 | } |
| 665 | 665 | ||
| 666 | static void __devinit cg6_chip_init(struct fb_info *info) | 666 | static void cg6_chip_init(struct fb_info *info) |
| 667 | { | 667 | { |
| 668 | struct cg6_par *par = (struct cg6_par *)info->par; | 668 | struct cg6_par *par = (struct cg6_par *)info->par; |
| 669 | struct cg6_tec __iomem *tec = par->tec; | 669 | struct cg6_tec __iomem *tec = par->tec; |
| @@ -737,7 +737,7 @@ static void cg6_unmap_regs(struct platform_device *op, struct fb_info *info, | |||
| 737 | info->fix.smem_len); | 737 | info->fix.smem_len); |
| 738 | } | 738 | } |
| 739 | 739 | ||
| 740 | static int __devinit cg6_probe(struct platform_device *op) | 740 | static int cg6_probe(struct platform_device *op) |
| 741 | { | 741 | { |
| 742 | struct device_node *dp = op->dev.of_node; | 742 | struct device_node *dp = op->dev.of_node; |
| 743 | struct fb_info *info; | 743 | struct fb_info *info; |
| @@ -827,7 +827,7 @@ out_err: | |||
| 827 | return err; | 827 | return err; |
| 828 | } | 828 | } |
| 829 | 829 | ||
| 830 | static int __devexit cg6_remove(struct platform_device *op) | 830 | static int cg6_remove(struct platform_device *op) |
| 831 | { | 831 | { |
| 832 | struct fb_info *info = dev_get_drvdata(&op->dev); | 832 | struct fb_info *info = dev_get_drvdata(&op->dev); |
| 833 | struct cg6_par *par = info->par; | 833 | struct cg6_par *par = info->par; |
| @@ -862,7 +862,7 @@ static struct platform_driver cg6_driver = { | |||
| 862 | .of_match_table = cg6_match, | 862 | .of_match_table = cg6_match, |
| 863 | }, | 863 | }, |
| 864 | .probe = cg6_probe, | 864 | .probe = cg6_probe, |
| 865 | .remove = __devexit_p(cg6_remove), | 865 | .remove = cg6_remove, |
| 866 | }; | 866 | }; |
| 867 | 867 | ||
| 868 | static int __init cg6_init(void) | 868 | static int __init cg6_init(void) |
diff --git a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c index cff742abdc5d..206a66b61072 100644 --- a/drivers/video/chipsfb.c +++ b/drivers/video/chipsfb.c | |||
| @@ -292,7 +292,7 @@ static void __init chips_hw_init(void) | |||
| 292 | write_fr(chips_init_fr[i].addr, chips_init_fr[i].data); | 292 | write_fr(chips_init_fr[i].addr, chips_init_fr[i].data); |
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | static struct fb_fix_screeninfo chipsfb_fix __devinitdata = { | 295 | static struct fb_fix_screeninfo chipsfb_fix = { |
| 296 | .id = "C&T 65550", | 296 | .id = "C&T 65550", |
| 297 | .type = FB_TYPE_PACKED_PIXELS, | 297 | .type = FB_TYPE_PACKED_PIXELS, |
| 298 | .visual = FB_VISUAL_PSEUDOCOLOR, | 298 | .visual = FB_VISUAL_PSEUDOCOLOR, |
| @@ -309,7 +309,7 @@ static struct fb_fix_screeninfo chipsfb_fix __devinitdata = { | |||
| 309 | .smem_len = 0x100000, /* 1MB */ | 309 | .smem_len = 0x100000, /* 1MB */ |
| 310 | }; | 310 | }; |
| 311 | 311 | ||
| 312 | static struct fb_var_screeninfo chipsfb_var __devinitdata = { | 312 | static struct fb_var_screeninfo chipsfb_var = { |
| 313 | .xres = 800, | 313 | .xres = 800, |
| 314 | .yres = 600, | 314 | .yres = 600, |
| 315 | .xres_virtual = 800, | 315 | .xres_virtual = 800, |
| @@ -330,7 +330,7 @@ static struct fb_var_screeninfo chipsfb_var __devinitdata = { | |||
| 330 | .vsync_len = 8, | 330 | .vsync_len = 8, |
| 331 | }; | 331 | }; |
| 332 | 332 | ||
| 333 | static void __devinit init_chips(struct fb_info *p, unsigned long addr) | 333 | static void init_chips(struct fb_info *p, unsigned long addr) |
| 334 | { | 334 | { |
| 335 | memset(p->screen_base, 0, 0x100000); | 335 | memset(p->screen_base, 0, 0x100000); |
| 336 | 336 | ||
| @@ -347,8 +347,7 @@ static void __devinit init_chips(struct fb_info *p, unsigned long addr) | |||
| 347 | chips_hw_init(); | 347 | chips_hw_init(); |
| 348 | } | 348 | } |
| 349 | 349 | ||
| 350 | static int __devinit | 350 | static int chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent) |
| 351 | chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent) | ||
| 352 | { | 351 | { |
| 353 | struct fb_info *p; | 352 | struct fb_info *p; |
| 354 | unsigned long addr, size; | 353 | unsigned long addr, size; |
| @@ -438,7 +437,7 @@ chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent) | |||
| 438 | return rc; | 437 | return rc; |
| 439 | } | 438 | } |
| 440 | 439 | ||
| 441 | static void __devexit chipsfb_remove(struct pci_dev *dp) | 440 | static void chipsfb_remove(struct pci_dev *dp) |
| 442 | { | 441 | { |
| 443 | struct fb_info *p = pci_get_drvdata(dp); | 442 | struct fb_info *p = pci_get_drvdata(dp); |
| 444 | 443 | ||
| @@ -495,7 +494,7 @@ static struct pci_driver chipsfb_driver = { | |||
| 495 | .name = "chipsfb", | 494 | .name = "chipsfb", |
| 496 | .id_table = chipsfb_pci_tbl, | 495 | .id_table = chipsfb_pci_tbl, |
| 497 | .probe = chipsfb_pci_init, | 496 | .probe = chipsfb_pci_init, |
| 498 | .remove = __devexit_p(chipsfb_remove), | 497 | .remove = chipsfb_remove, |
| 499 | #ifdef CONFIG_PM | 498 | #ifdef CONFIG_PM |
| 500 | .suspend = chipsfb_pci_suspend, | 499 | .suspend = chipsfb_pci_suspend, |
| 501 | .resume = chipsfb_pci_resume, | 500 | .resume = chipsfb_pci_resume, |
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index bc67d05cad60..c3dbbe6e3acf 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c | |||
| @@ -290,34 +290,34 @@ struct zorrocl { | |||
| 290 | zorro_id ramid2; /* Zorro ID of optional second RAM device */ | 290 | zorro_id ramid2; /* Zorro ID of optional second RAM device */ |
| 291 | }; | 291 | }; |
| 292 | 292 | ||
| 293 | static const struct zorrocl zcl_sd64 __devinitconst = { | 293 | static const struct zorrocl zcl_sd64 = { |
| 294 | .type = BT_SD64, | 294 | .type = BT_SD64, |
| 295 | .ramid = ZORRO_PROD_HELFRICH_SD64_RAM, | 295 | .ramid = ZORRO_PROD_HELFRICH_SD64_RAM, |
| 296 | }; | 296 | }; |
| 297 | 297 | ||
| 298 | static const struct zorrocl zcl_piccolo __devinitconst = { | 298 | static const struct zorrocl zcl_piccolo = { |
| 299 | .type = BT_PICCOLO, | 299 | .type = BT_PICCOLO, |
| 300 | .ramid = ZORRO_PROD_HELFRICH_PICCOLO_RAM, | 300 | .ramid = ZORRO_PROD_HELFRICH_PICCOLO_RAM, |
| 301 | }; | 301 | }; |
| 302 | 302 | ||
| 303 | static const struct zorrocl zcl_picasso __devinitconst = { | 303 | static const struct zorrocl zcl_picasso = { |
| 304 | .type = BT_PICASSO, | 304 | .type = BT_PICASSO, |
| 305 | .ramid = ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM, | 305 | .ramid = ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM, |
| 306 | }; | 306 | }; |
| 307 | 307 | ||
| 308 | static const struct zorrocl zcl_spectrum __devinitconst = { | 308 | static const struct zorrocl zcl_spectrum = { |
| 309 | .type = BT_SPECTRUM, | 309 | .type = BT_SPECTRUM, |
| 310 | .ramid = ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM, | 310 | .ramid = ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM, |
| 311 | }; | 311 | }; |
| 312 | 312 | ||
| 313 | static const struct zorrocl zcl_picasso4_z3 __devinitconst = { | 313 | static const struct zorrocl zcl_picasso4_z3 = { |
| 314 | .type = BT_PICASSO4, | 314 | .type = BT_PICASSO4, |
| 315 | .regoffset = 0x00600000, | 315 | .regoffset = 0x00600000, |
| 316 | .ramsize = 4 * MB_, | 316 | .ramsize = 4 * MB_, |
| 317 | .ramoffset = 0x01000000, /* 0x02000000 for 64 MiB boards */ | 317 | .ramoffset = 0x01000000, /* 0x02000000 for 64 MiB boards */ |
| 318 | }; | 318 | }; |
| 319 | 319 | ||
| 320 | static const struct zorrocl zcl_picasso4_z2 __devinitconst = { | 320 | static const struct zorrocl zcl_picasso4_z2 = { |
| 321 | .type = BT_PICASSO4, | 321 | .type = BT_PICASSO4, |
| 322 | .regoffset = 0x10000, | 322 | .regoffset = 0x10000, |
| 323 | .ramid = ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_RAM1, | 323 | .ramid = ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_RAM1, |
| @@ -325,7 +325,7 @@ static const struct zorrocl zcl_picasso4_z2 __devinitconst = { | |||
| 325 | }; | 325 | }; |
| 326 | 326 | ||
| 327 | 327 | ||
| 328 | static const struct zorro_device_id cirrusfb_zorro_table[] __devinitconst = { | 328 | static const struct zorro_device_id cirrusfb_zorro_table[] = { |
| 329 | { | 329 | { |
| 330 | .id = ZORRO_PROD_HELFRICH_SD64_REG, | 330 | .id = ZORRO_PROD_HELFRICH_SD64_REG, |
| 331 | .driver_data = (unsigned long)&zcl_sd64, | 331 | .driver_data = (unsigned long)&zcl_sd64, |
| @@ -372,8 +372,8 @@ struct cirrusfb_info { | |||
| 372 | void (*unmap)(struct fb_info *info); | 372 | void (*unmap)(struct fb_info *info); |
| 373 | }; | 373 | }; |
| 374 | 374 | ||
| 375 | static bool noaccel __devinitdata; | 375 | static bool noaccel; |
| 376 | static char *mode_option __devinitdata = "640x480@60"; | 376 | static char *mode_option = "640x480@60"; |
| 377 | 377 | ||
| 378 | /****************************************************************************/ | 378 | /****************************************************************************/ |
| 379 | /**** BEGIN PROTOTYPES ******************************************************/ | 379 | /**** BEGIN PROTOTYPES ******************************************************/ |
| @@ -1892,8 +1892,8 @@ static int release_io_ports; | |||
| 1892 | * based on the DRAM bandwidth bit and DRAM bank switching bit. This | 1892 | * based on the DRAM bandwidth bit and DRAM bank switching bit. This |
| 1893 | * works with 1MB, 2MB and 4MB configurations (which the Motorola boards | 1893 | * works with 1MB, 2MB and 4MB configurations (which the Motorola boards |
| 1894 | * seem to have. */ | 1894 | * seem to have. */ |
| 1895 | static unsigned int __devinit cirrusfb_get_memsize(struct fb_info *info, | 1895 | static unsigned int cirrusfb_get_memsize(struct fb_info *info, |
| 1896 | u8 __iomem *regbase) | 1896 | u8 __iomem *regbase) |
| 1897 | { | 1897 | { |
| 1898 | unsigned long mem; | 1898 | unsigned long mem; |
| 1899 | struct cirrusfb_info *cinfo = info->par; | 1899 | struct cirrusfb_info *cinfo = info->par; |
| @@ -2003,7 +2003,7 @@ static struct fb_ops cirrusfb_ops = { | |||
| 2003 | .fb_imageblit = cirrusfb_imageblit, | 2003 | .fb_imageblit = cirrusfb_imageblit, |
| 2004 | }; | 2004 | }; |
| 2005 | 2005 | ||
| 2006 | static int __devinit cirrusfb_set_fbinfo(struct fb_info *info) | 2006 | static int cirrusfb_set_fbinfo(struct fb_info *info) |
| 2007 | { | 2007 | { |
| 2008 | struct cirrusfb_info *cinfo = info->par; | 2008 | struct cirrusfb_info *cinfo = info->par; |
| 2009 | struct fb_var_screeninfo *var = &info->var; | 2009 | struct fb_var_screeninfo *var = &info->var; |
| @@ -2052,7 +2052,7 @@ static int __devinit cirrusfb_set_fbinfo(struct fb_info *info) | |||
| 2052 | return 0; | 2052 | return 0; |
| 2053 | } | 2053 | } |
| 2054 | 2054 | ||
| 2055 | static int __devinit cirrusfb_register(struct fb_info *info) | 2055 | static int cirrusfb_register(struct fb_info *info) |
| 2056 | { | 2056 | { |
| 2057 | struct cirrusfb_info *cinfo = info->par; | 2057 | struct cirrusfb_info *cinfo = info->par; |
| 2058 | int err; | 2058 | int err; |
| @@ -2096,7 +2096,7 @@ err_dealloc_cmap: | |||
| 2096 | return err; | 2096 | return err; |
| 2097 | } | 2097 | } |
| 2098 | 2098 | ||
| 2099 | static void __devexit cirrusfb_cleanup(struct fb_info *info) | 2099 | static void cirrusfb_cleanup(struct fb_info *info) |
| 2100 | { | 2100 | { |
| 2101 | struct cirrusfb_info *cinfo = info->par; | 2101 | struct cirrusfb_info *cinfo = info->par; |
| 2102 | 2102 | ||
| @@ -2109,8 +2109,8 @@ static void __devexit cirrusfb_cleanup(struct fb_info *info) | |||
| 2109 | } | 2109 | } |
| 2110 | 2110 | ||
| 2111 | #ifdef CONFIG_PCI | 2111 | #ifdef CONFIG_PCI |
| 2112 | static int __devinit cirrusfb_pci_register(struct pci_dev *pdev, | 2112 | static int cirrusfb_pci_register(struct pci_dev *pdev, |
| 2113 | const struct pci_device_id *ent) | 2113 | const struct pci_device_id *ent) |
| 2114 | { | 2114 | { |
| 2115 | struct cirrusfb_info *cinfo; | 2115 | struct cirrusfb_info *cinfo; |
| 2116 | struct fb_info *info; | 2116 | struct fb_info *info; |
| @@ -2215,7 +2215,7 @@ err_out: | |||
| 2215 | return ret; | 2215 | return ret; |
| 2216 | } | 2216 | } |
| 2217 | 2217 | ||
| 2218 | static void __devexit cirrusfb_pci_unregister(struct pci_dev *pdev) | 2218 | static void cirrusfb_pci_unregister(struct pci_dev *pdev) |
| 2219 | { | 2219 | { |
| 2220 | struct fb_info *info = pci_get_drvdata(pdev); | 2220 | struct fb_info *info = pci_get_drvdata(pdev); |
| 2221 | 2221 | ||
| @@ -2226,7 +2226,7 @@ static struct pci_driver cirrusfb_pci_driver = { | |||
| 2226 | .name = "cirrusfb", | 2226 | .name = "cirrusfb", |
| 2227 | .id_table = cirrusfb_pci_table, | 2227 | .id_table = cirrusfb_pci_table, |
| 2228 | .probe = cirrusfb_pci_register, | 2228 | .probe = cirrusfb_pci_register, |
| 2229 | .remove = __devexit_p(cirrusfb_pci_unregister), | 2229 | .remove = cirrusfb_pci_unregister, |
| 2230 | #ifdef CONFIG_PM | 2230 | #ifdef CONFIG_PM |
| 2231 | #if 0 | 2231 | #if 0 |
| 2232 | .suspend = cirrusfb_pci_suspend, | 2232 | .suspend = cirrusfb_pci_suspend, |
| @@ -2237,8 +2237,8 @@ static struct pci_driver cirrusfb_pci_driver = { | |||
| 2237 | #endif /* CONFIG_PCI */ | 2237 | #endif /* CONFIG_PCI */ |
| 2238 | 2238 | ||
| 2239 | #ifdef CONFIG_ZORRO | 2239 | #ifdef CONFIG_ZORRO |
| 2240 | static int __devinit cirrusfb_zorro_register(struct zorro_dev *z, | 2240 | static int cirrusfb_zorro_register(struct zorro_dev *z, |
| 2241 | const struct zorro_device_id *ent) | 2241 | const struct zorro_device_id *ent) |
| 2242 | { | 2242 | { |
| 2243 | struct fb_info *info; | 2243 | struct fb_info *info; |
| 2244 | int error; | 2244 | int error; |
| @@ -2352,7 +2352,7 @@ err_release_fb: | |||
| 2352 | return error; | 2352 | return error; |
| 2353 | } | 2353 | } |
| 2354 | 2354 | ||
| 2355 | void __devexit cirrusfb_zorro_unregister(struct zorro_dev *z) | 2355 | void cirrusfb_zorro_unregister(struct zorro_dev *z) |
| 2356 | { | 2356 | { |
| 2357 | struct fb_info *info = zorro_get_drvdata(z); | 2357 | struct fb_info *info = zorro_get_drvdata(z); |
| 2358 | 2358 | ||
| @@ -2364,7 +2364,7 @@ static struct zorro_driver cirrusfb_zorro_driver = { | |||
| 2364 | .name = "cirrusfb", | 2364 | .name = "cirrusfb", |
| 2365 | .id_table = cirrusfb_zorro_table, | 2365 | .id_table = cirrusfb_zorro_table, |
| 2366 | .probe = cirrusfb_zorro_register, | 2366 | .probe = cirrusfb_zorro_register, |
| 2367 | .remove = __devexit_p(cirrusfb_zorro_unregister), | 2367 | .remove = cirrusfb_zorro_unregister, |
| 2368 | }; | 2368 | }; |
| 2369 | #endif /* CONFIG_ZORRO */ | 2369 | #endif /* CONFIG_ZORRO */ |
| 2370 | 2370 | ||
diff --git a/drivers/video/clps711xfb.c b/drivers/video/clps711xfb.c index 63ecdf8f7baf..5a7af0deced2 100644 --- a/drivers/video/clps711xfb.c +++ b/drivers/video/clps711xfb.c | |||
| @@ -178,7 +178,7 @@ static struct fb_ops clps7111fb_ops = { | |||
| 178 | .fb_imageblit = cfb_imageblit, | 178 | .fb_imageblit = cfb_imageblit, |
| 179 | }; | 179 | }; |
| 180 | 180 | ||
| 181 | static void __devinit clps711x_guess_lcd_params(struct fb_info *info) | 181 | static void clps711x_guess_lcd_params(struct fb_info *info) |
| 182 | { | 182 | { |
| 183 | unsigned int lcdcon, syscon, size; | 183 | unsigned int lcdcon, syscon, size; |
| 184 | unsigned long phys_base = PAGE_OFFSET; | 184 | unsigned long phys_base = PAGE_OFFSET; |
| @@ -266,7 +266,7 @@ static void __devinit clps711x_guess_lcd_params(struct fb_info *info) | |||
| 266 | info->fix.type = FB_TYPE_PACKED_PIXELS; | 266 | info->fix.type = FB_TYPE_PACKED_PIXELS; |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | static int __devinit clps711x_fb_probe(struct platform_device *pdev) | 269 | static int clps711x_fb_probe(struct platform_device *pdev) |
| 270 | { | 270 | { |
| 271 | int err = -ENOMEM; | 271 | int err = -ENOMEM; |
| 272 | 272 | ||
| @@ -291,7 +291,7 @@ static int __devinit clps711x_fb_probe(struct platform_device *pdev) | |||
| 291 | out: return err; | 291 | out: return err; |
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | static int __devexit clps711x_fb_remove(struct platform_device *pdev) | 294 | static int clps711x_fb_remove(struct platform_device *pdev) |
| 295 | { | 295 | { |
| 296 | unregister_framebuffer(cfb); | 296 | unregister_framebuffer(cfb); |
| 297 | kfree(cfb); | 297 | kfree(cfb); |
| @@ -305,7 +305,7 @@ static struct platform_driver clps711x_fb_driver = { | |||
| 305 | .owner = THIS_MODULE, | 305 | .owner = THIS_MODULE, |
| 306 | }, | 306 | }, |
| 307 | .probe = clps711x_fb_probe, | 307 | .probe = clps711x_fb_probe, |
| 308 | .remove = __devexit_p(clps711x_fb_remove), | 308 | .remove = clps711x_fb_remove, |
| 309 | }; | 309 | }; |
| 310 | module_platform_driver(clps711x_fb_driver); | 310 | module_platform_driver(clps711x_fb_driver); |
| 311 | 311 | ||
diff --git a/drivers/video/cobalt_lcdfb.c b/drivers/video/cobalt_lcdfb.c index 01a4ee7cc6b1..a9031498e10c 100644 --- a/drivers/video/cobalt_lcdfb.c +++ b/drivers/video/cobalt_lcdfb.c | |||
| @@ -167,7 +167,7 @@ static void lcd_clear(struct fb_info *info) | |||
| 167 | lcd_write_control(info, LCD_RESET); | 167 | lcd_write_control(info, LCD_RESET); |
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | static struct fb_fix_screeninfo cobalt_lcdfb_fix __devinitdata = { | 170 | static struct fb_fix_screeninfo cobalt_lcdfb_fix = { |
| 171 | .id = "cobalt-lcd", | 171 | .id = "cobalt-lcd", |
| 172 | .type = FB_TYPE_TEXT, | 172 | .type = FB_TYPE_TEXT, |
| 173 | .type_aux = FB_AUX_TEXT_MDA, | 173 | .type_aux = FB_AUX_TEXT_MDA, |
| @@ -331,7 +331,7 @@ static struct fb_ops cobalt_lcd_fbops = { | |||
| 331 | .fb_cursor = cobalt_lcdfb_cursor, | 331 | .fb_cursor = cobalt_lcdfb_cursor, |
| 332 | }; | 332 | }; |
| 333 | 333 | ||
| 334 | static int __devinit cobalt_lcdfb_probe(struct platform_device *dev) | 334 | static int cobalt_lcdfb_probe(struct platform_device *dev) |
| 335 | { | 335 | { |
| 336 | struct fb_info *info; | 336 | struct fb_info *info; |
| 337 | struct resource *res; | 337 | struct resource *res; |
| @@ -374,7 +374,7 @@ static int __devinit cobalt_lcdfb_probe(struct platform_device *dev) | |||
| 374 | return 0; | 374 | return 0; |
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | static int __devexit cobalt_lcdfb_remove(struct platform_device *dev) | 377 | static int cobalt_lcdfb_remove(struct platform_device *dev) |
| 378 | { | 378 | { |
| 379 | struct fb_info *info; | 379 | struct fb_info *info; |
| 380 | 380 | ||
| @@ -389,7 +389,7 @@ static int __devexit cobalt_lcdfb_remove(struct platform_device *dev) | |||
| 389 | 389 | ||
| 390 | static struct platform_driver cobalt_lcdfb_driver = { | 390 | static struct platform_driver cobalt_lcdfb_driver = { |
| 391 | .probe = cobalt_lcdfb_probe, | 391 | .probe = cobalt_lcdfb_probe, |
| 392 | .remove = __devexit_p(cobalt_lcdfb_remove), | 392 | .remove = cobalt_lcdfb_remove, |
| 393 | .driver = { | 393 | .driver = { |
| 394 | .name = "cobalt-lcd", | 394 | .name = "cobalt-lcd", |
| 395 | .owner = THIS_MODULE, | 395 | .owner = THIS_MODULE, |
diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index 39571f9e0162..35687fd56456 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c | |||
| @@ -238,8 +238,7 @@ static void sti_flush(unsigned long start, unsigned long end) | |||
| 238 | flush_icache_range(start, end); | 238 | flush_icache_range(start, end); |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | static void __devinit sti_rom_copy(unsigned long base, unsigned long count, | 241 | static void sti_rom_copy(unsigned long base, unsigned long count, void *dest) |
| 242 | void *dest) | ||
| 243 | { | 242 | { |
| 244 | unsigned long dest_start = (unsigned long) dest; | 243 | unsigned long dest_start = (unsigned long) dest; |
| 245 | 244 | ||
| @@ -266,7 +265,7 @@ static void __devinit sti_rom_copy(unsigned long base, unsigned long count, | |||
| 266 | static char default_sti_path[21] __read_mostly; | 265 | static char default_sti_path[21] __read_mostly; |
| 267 | 266 | ||
| 268 | #ifndef MODULE | 267 | #ifndef MODULE |
| 269 | static int __devinit sti_setup(char *str) | 268 | static int sti_setup(char *str) |
| 270 | { | 269 | { |
| 271 | if (str) | 270 | if (str) |
| 272 | strlcpy (default_sti_path, str, sizeof (default_sti_path)); | 271 | strlcpy (default_sti_path, str, sizeof (default_sti_path)); |
| @@ -285,12 +284,12 @@ __setup("sti=", sti_setup); | |||
| 285 | 284 | ||
| 286 | 285 | ||
| 287 | 286 | ||
| 288 | static char __devinitdata *font_name[MAX_STI_ROMS] = { "VGA8x16", }; | 287 | static char *font_name[MAX_STI_ROMS] = { "VGA8x16", }; |
| 289 | static int __devinitdata font_index[MAX_STI_ROMS], | 288 | static int font_index[MAX_STI_ROMS], |
| 290 | font_height[MAX_STI_ROMS], | 289 | font_height[MAX_STI_ROMS], |
| 291 | font_width[MAX_STI_ROMS]; | 290 | font_width[MAX_STI_ROMS]; |
| 292 | #ifndef MODULE | 291 | #ifndef MODULE |
| 293 | static int __devinit sti_font_setup(char *str) | 292 | static int sti_font_setup(char *str) |
| 294 | { | 293 | { |
| 295 | char *x; | 294 | char *x; |
| 296 | int i = 0; | 295 | int i = 0; |
| @@ -343,8 +342,8 @@ __setup("sti_font=", sti_font_setup); | |||
| 343 | 342 | ||
| 344 | 343 | ||
| 345 | 344 | ||
| 346 | static void __devinit | 345 | static void sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, |
| 347 | sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request) | 346 | unsigned int sti_mem_request) |
| 348 | { | 347 | { |
| 349 | struct sti_glob_cfg_ext *cfg; | 348 | struct sti_glob_cfg_ext *cfg; |
| 350 | 349 | ||
| @@ -383,8 +382,7 @@ sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request) | |||
| 383 | cfg->sti_mem_addr, sti_mem_request)); | 382 | cfg->sti_mem_addr, sti_mem_request)); |
| 384 | } | 383 | } |
| 385 | 384 | ||
| 386 | static void __devinit | 385 | static void sti_dump_outptr(struct sti_struct *sti) |
| 387 | sti_dump_outptr(struct sti_struct *sti) | ||
| 388 | { | 386 | { |
| 389 | DPRINTK((KERN_INFO | 387 | DPRINTK((KERN_INFO |
| 390 | "%d bits per pixel\n" | 388 | "%d bits per pixel\n" |
| @@ -397,9 +395,8 @@ sti_dump_outptr(struct sti_struct *sti) | |||
| 397 | sti->outptr.attributes)); | 395 | sti->outptr.attributes)); |
| 398 | } | 396 | } |
| 399 | 397 | ||
| 400 | static int __devinit | 398 | static int sti_init_glob_cfg(struct sti_struct *sti, unsigned long rom_address, |
| 401 | sti_init_glob_cfg(struct sti_struct *sti, | 399 | unsigned long hpa) |
| 402 | unsigned long rom_address, unsigned long hpa) | ||
| 403 | { | 400 | { |
| 404 | struct sti_glob_cfg *glob_cfg; | 401 | struct sti_glob_cfg *glob_cfg; |
| 405 | struct sti_glob_cfg_ext *glob_cfg_ext; | 402 | struct sti_glob_cfg_ext *glob_cfg_ext; |
| @@ -479,8 +476,8 @@ sti_init_glob_cfg(struct sti_struct *sti, | |||
| 479 | } | 476 | } |
| 480 | 477 | ||
| 481 | #ifdef CONFIG_FB | 478 | #ifdef CONFIG_FB |
| 482 | static struct sti_cooked_font __devinit | 479 | static struct sti_cooked_font * |
| 483 | *sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) | 480 | sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) |
| 484 | { | 481 | { |
| 485 | const struct font_desc *fbfont; | 482 | const struct font_desc *fbfont; |
| 486 | unsigned int size, bpc; | 483 | unsigned int size, bpc; |
| @@ -535,16 +532,15 @@ static struct sti_cooked_font __devinit | |||
| 535 | return cooked_font; | 532 | return cooked_font; |
| 536 | } | 533 | } |
| 537 | #else | 534 | #else |
| 538 | static struct sti_cooked_font __devinit | 535 | static struct sti_cooked_font * |
| 539 | *sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) | 536 | sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) |
| 540 | { | 537 | { |
| 541 | return NULL; | 538 | return NULL; |
| 542 | } | 539 | } |
| 543 | #endif | 540 | #endif |
| 544 | 541 | ||
| 545 | static struct sti_cooked_font __devinit | 542 | static struct sti_cooked_font *sti_select_font(struct sti_cooked_rom *rom, |
| 546 | *sti_select_font(struct sti_cooked_rom *rom, | 543 | int (*search_font_fnc)(struct sti_cooked_rom *, int, int)) |
| 547 | int (*search_font_fnc)(struct sti_cooked_rom *, int, int)) | ||
| 548 | { | 544 | { |
| 549 | struct sti_cooked_font *font; | 545 | struct sti_cooked_font *font; |
| 550 | int i; | 546 | int i; |
| @@ -569,8 +565,7 @@ static struct sti_cooked_font __devinit | |||
| 569 | } | 565 | } |
| 570 | 566 | ||
| 571 | 567 | ||
| 572 | static void __devinit | 568 | static void sti_dump_rom(struct sti_rom *rom) |
| 573 | sti_dump_rom(struct sti_rom *rom) | ||
| 574 | { | 569 | { |
| 575 | printk(KERN_INFO " id %04x-%04x, conforms to spec rev. %d.%02x\n", | 570 | printk(KERN_INFO " id %04x-%04x, conforms to spec rev. %d.%02x\n", |
| 576 | rom->graphics_id[0], | 571 | rom->graphics_id[0], |
| @@ -587,9 +582,8 @@ sti_dump_rom(struct sti_rom *rom) | |||
| 587 | } | 582 | } |
| 588 | 583 | ||
| 589 | 584 | ||
| 590 | static int __devinit | 585 | static int sti_cook_fonts(struct sti_cooked_rom *cooked_rom, |
| 591 | sti_cook_fonts(struct sti_cooked_rom *cooked_rom, | 586 | struct sti_rom *raw_rom) |
| 592 | struct sti_rom *raw_rom) | ||
| 593 | { | 587 | { |
| 594 | struct sti_rom_font *raw_font, *font_start; | 588 | struct sti_rom_font *raw_font, *font_start; |
| 595 | struct sti_cooked_font *cooked_font; | 589 | struct sti_cooked_font *cooked_font; |
| @@ -622,8 +616,7 @@ sti_cook_fonts(struct sti_cooked_rom *cooked_rom, | |||
| 622 | } | 616 | } |
| 623 | 617 | ||
| 624 | 618 | ||
| 625 | static int __devinit | 619 | static int sti_search_font(struct sti_cooked_rom *rom, int height, int width) |
| 626 | sti_search_font(struct sti_cooked_rom *rom, int height, int width) | ||
| 627 | { | 620 | { |
| 628 | struct sti_cooked_font *font; | 621 | struct sti_cooked_font *font; |
| 629 | int i = 0; | 622 | int i = 0; |
| @@ -639,8 +632,7 @@ sti_search_font(struct sti_cooked_rom *rom, int height, int width) | |||
| 639 | #define BMODE_RELOCATE(offset) offset = (offset) / 4; | 632 | #define BMODE_RELOCATE(offset) offset = (offset) / 4; |
| 640 | #define BMODE_LAST_ADDR_OFFS 0x50 | 633 | #define BMODE_LAST_ADDR_OFFS 0x50 |
| 641 | 634 | ||
| 642 | static void * __devinit | 635 | static void *sti_bmode_font_raw(struct sti_cooked_font *f) |
| 643 | sti_bmode_font_raw(struct sti_cooked_font *f) | ||
| 644 | { | 636 | { |
| 645 | unsigned char *n, *p, *q; | 637 | unsigned char *n, *p, *q; |
| 646 | int size = f->raw->bytes_per_char*256+sizeof(struct sti_rom_font); | 638 | int size = f->raw->bytes_per_char*256+sizeof(struct sti_rom_font); |
| @@ -657,8 +649,8 @@ sti_bmode_font_raw(struct sti_cooked_font *f) | |||
| 657 | return n + 3; | 649 | return n + 3; |
| 658 | } | 650 | } |
| 659 | 651 | ||
| 660 | static void __devinit | 652 | static void sti_bmode_rom_copy(unsigned long base, unsigned long count, |
| 661 | sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) | 653 | void *dest) |
| 662 | { | 654 | { |
| 663 | unsigned long dest_start = (unsigned long) dest; | 655 | unsigned long dest_start = (unsigned long) dest; |
| 664 | 656 | ||
| @@ -672,8 +664,7 @@ sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) | |||
| 672 | sti_flush(dest_start, (unsigned long)dest); | 664 | sti_flush(dest_start, (unsigned long)dest); |
| 673 | } | 665 | } |
| 674 | 666 | ||
| 675 | static struct sti_rom * __devinit | 667 | static struct sti_rom *sti_get_bmode_rom (unsigned long address) |
| 676 | sti_get_bmode_rom (unsigned long address) | ||
| 677 | { | 668 | { |
| 678 | struct sti_rom *raw; | 669 | struct sti_rom *raw; |
| 679 | u32 size; | 670 | u32 size; |
| @@ -708,7 +699,7 @@ sti_get_bmode_rom (unsigned long address) | |||
| 708 | return raw; | 699 | return raw; |
| 709 | } | 700 | } |
| 710 | 701 | ||
| 711 | static struct sti_rom __devinit *sti_get_wmode_rom(unsigned long address) | 702 | static struct sti_rom *sti_get_wmode_rom(unsigned long address) |
| 712 | { | 703 | { |
| 713 | struct sti_rom *raw; | 704 | struct sti_rom *raw; |
| 714 | unsigned long size; | 705 | unsigned long size; |
| @@ -723,8 +714,8 @@ static struct sti_rom __devinit *sti_get_wmode_rom(unsigned long address) | |||
| 723 | return raw; | 714 | return raw; |
| 724 | } | 715 | } |
| 725 | 716 | ||
| 726 | static int __devinit sti_read_rom(int wordmode, struct sti_struct *sti, | 717 | static int sti_read_rom(int wordmode, struct sti_struct *sti, |
| 727 | unsigned long address) | 718 | unsigned long address) |
| 728 | { | 719 | { |
| 729 | struct sti_cooked_rom *cooked; | 720 | struct sti_cooked_rom *cooked; |
| 730 | struct sti_rom *raw = NULL; | 721 | struct sti_rom *raw = NULL; |
| @@ -806,8 +797,9 @@ out_err: | |||
| 806 | return 0; | 797 | return 0; |
| 807 | } | 798 | } |
| 808 | 799 | ||
| 809 | static struct sti_struct * __devinit | 800 | static struct sti_struct *sti_try_rom_generic(unsigned long address, |
| 810 | sti_try_rom_generic(unsigned long address, unsigned long hpa, struct pci_dev *pd) | 801 | unsigned long hpa, |
| 802 | struct pci_dev *pd) | ||
| 811 | { | 803 | { |
| 812 | struct sti_struct *sti; | 804 | struct sti_struct *sti; |
| 813 | int ok; | 805 | int ok; |
| @@ -921,7 +913,7 @@ out_err: | |||
| 921 | return NULL; | 913 | return NULL; |
| 922 | } | 914 | } |
| 923 | 915 | ||
| 924 | static void __devinit sticore_check_for_default_sti(struct sti_struct *sti, char *path) | 916 | static void sticore_check_for_default_sti(struct sti_struct *sti, char *path) |
| 925 | { | 917 | { |
| 926 | if (strcmp (path, default_sti_path) == 0) | 918 | if (strcmp (path, default_sti_path) == 0) |
| 927 | default_sti = sti; | 919 | default_sti = sti; |
| @@ -932,7 +924,7 @@ static void __devinit sticore_check_for_default_sti(struct sti_struct *sti, char | |||
| 932 | * in the additional address field addr[1] while on | 924 | * in the additional address field addr[1] while on |
| 933 | * older Systems the PDC stores it in page0->proc_sti | 925 | * older Systems the PDC stores it in page0->proc_sti |
| 934 | */ | 926 | */ |
| 935 | static int __devinit sticore_pa_init(struct parisc_device *dev) | 927 | static int sticore_pa_init(struct parisc_device *dev) |
| 936 | { | 928 | { |
| 937 | char pa_path[21]; | 929 | char pa_path[21]; |
| 938 | struct sti_struct *sti = NULL; | 930 | struct sti_struct *sti = NULL; |
| @@ -953,8 +945,7 @@ static int __devinit sticore_pa_init(struct parisc_device *dev) | |||
| 953 | } | 945 | } |
| 954 | 946 | ||
| 955 | 947 | ||
| 956 | static int __devinit sticore_pci_init(struct pci_dev *pd, | 948 | static int sticore_pci_init(struct pci_dev *pd, const struct pci_device_id *ent) |
| 957 | const struct pci_device_id *ent) | ||
| 958 | { | 949 | { |
| 959 | #ifdef CONFIG_PCI | 950 | #ifdef CONFIG_PCI |
| 960 | unsigned long fb_base, rom_base; | 951 | unsigned long fb_base, rom_base; |
| @@ -1001,7 +992,7 @@ static int __devinit sticore_pci_init(struct pci_dev *pd, | |||
| 1001 | } | 992 | } |
| 1002 | 993 | ||
| 1003 | 994 | ||
| 1004 | static void __devexit sticore_pci_remove(struct pci_dev *pd) | 995 | static void sticore_pci_remove(struct pci_dev *pd) |
| 1005 | { | 996 | { |
| 1006 | BUG(); | 997 | BUG(); |
| 1007 | } | 998 | } |
| @@ -1043,7 +1034,7 @@ static struct parisc_driver pa_sti_driver = { | |||
| 1043 | 1034 | ||
| 1044 | static int sticore_initialized __read_mostly; | 1035 | static int sticore_initialized __read_mostly; |
| 1045 | 1036 | ||
| 1046 | static void __devinit sti_init_roms(void) | 1037 | static void sti_init_roms(void) |
| 1047 | { | 1038 | { |
| 1048 | if (sticore_initialized) | 1039 | if (sticore_initialized) |
| 1049 | return; | 1040 | return; |
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c index e40125cb313e..57886787ead0 100644 --- a/drivers/video/cyber2000fb.c +++ b/drivers/video/cyber2000fb.c | |||
| @@ -1230,7 +1230,7 @@ static int cyber2000fb_ddc_getsda(void *data) | |||
| 1230 | return retval; | 1230 | return retval; |
| 1231 | } | 1231 | } |
| 1232 | 1232 | ||
| 1233 | static int __devinit cyber2000fb_setup_ddc_bus(struct cfb_info *cfb) | 1233 | static int cyber2000fb_setup_ddc_bus(struct cfb_info *cfb) |
| 1234 | { | 1234 | { |
| 1235 | strlcpy(cfb->ddc_adapter.name, cfb->fb.fix.id, | 1235 | strlcpy(cfb->ddc_adapter.name, cfb->fb.fix.id, |
| 1236 | sizeof(cfb->ddc_adapter.name)); | 1236 | sizeof(cfb->ddc_adapter.name)); |
| @@ -1305,7 +1305,7 @@ static int cyber2000fb_i2c_getscl(void *data) | |||
| 1305 | return ret; | 1305 | return ret; |
| 1306 | } | 1306 | } |
| 1307 | 1307 | ||
| 1308 | static int __devinit cyber2000fb_i2c_register(struct cfb_info *cfb) | 1308 | static int cyber2000fb_i2c_register(struct cfb_info *cfb) |
| 1309 | { | 1309 | { |
| 1310 | strlcpy(cfb->i2c_adapter.name, cfb->fb.fix.id, | 1310 | strlcpy(cfb->i2c_adapter.name, cfb->fb.fix.id, |
| 1311 | sizeof(cfb->i2c_adapter.name)); | 1311 | sizeof(cfb->i2c_adapter.name)); |
| @@ -1336,7 +1336,7 @@ static void cyber2000fb_i2c_unregister(struct cfb_info *cfb) | |||
| 1336 | * These parameters give | 1336 | * These parameters give |
| 1337 | * 640x480, hsync 31.5kHz, vsync 60Hz | 1337 | * 640x480, hsync 31.5kHz, vsync 60Hz |
| 1338 | */ | 1338 | */ |
| 1339 | static struct fb_videomode __devinitdata cyber2000fb_default_mode = { | 1339 | static struct fb_videomode cyber2000fb_default_mode = { |
| 1340 | .refresh = 60, | 1340 | .refresh = 60, |
| 1341 | .xres = 640, | 1341 | .xres = 640, |
| 1342 | .yres = 480, | 1342 | .yres = 480, |
| @@ -1404,8 +1404,7 @@ static void cyberpro_init_hw(struct cfb_info *cfb) | |||
| 1404 | } | 1404 | } |
| 1405 | } | 1405 | } |
| 1406 | 1406 | ||
| 1407 | static struct cfb_info __devinit *cyberpro_alloc_fb_info(unsigned int id, | 1407 | static struct cfb_info *cyberpro_alloc_fb_info(unsigned int id, char *name) |
| 1408 | char *name) | ||
| 1409 | { | 1408 | { |
| 1410 | struct cfb_info *cfb; | 1409 | struct cfb_info *cfb; |
| 1411 | 1410 | ||
| @@ -1524,7 +1523,7 @@ static int cyber2000fb_setup(char *options) | |||
| 1524 | * - memory mapped access to the registers | 1523 | * - memory mapped access to the registers |
| 1525 | * - initialised mem_ctl1 and mem_ctl2 appropriately. | 1524 | * - initialised mem_ctl1 and mem_ctl2 appropriately. |
| 1526 | */ | 1525 | */ |
| 1527 | static int __devinit cyberpro_common_probe(struct cfb_info *cfb) | 1526 | static int cyberpro_common_probe(struct cfb_info *cfb) |
| 1528 | { | 1527 | { |
| 1529 | u_long smem_size; | 1528 | u_long smem_size; |
| 1530 | u_int h_sync, v_sync; | 1529 | u_int h_sync, v_sync; |
| @@ -1615,7 +1614,7 @@ failed: | |||
| 1615 | return err; | 1614 | return err; |
| 1616 | } | 1615 | } |
| 1617 | 1616 | ||
| 1618 | static void __devexit cyberpro_common_remove(struct cfb_info *cfb) | 1617 | static void cyberpro_common_remove(struct cfb_info *cfb) |
| 1619 | { | 1618 | { |
| 1620 | unregister_framebuffer(&cfb->fb); | 1619 | unregister_framebuffer(&cfb->fb); |
| 1621 | #ifdef CONFIG_FB_CYBER2000_DDC | 1620 | #ifdef CONFIG_FB_CYBER2000_DDC |
| @@ -1646,7 +1645,7 @@ static void cyberpro_common_resume(struct cfb_info *cfb) | |||
| 1646 | 1645 | ||
| 1647 | #include <mach/framebuffer.h> | 1646 | #include <mach/framebuffer.h> |
| 1648 | 1647 | ||
| 1649 | static int __devinit cyberpro_vl_probe(void) | 1648 | static int cyberpro_vl_probe(void) |
| 1650 | { | 1649 | { |
| 1651 | struct cfb_info *cfb; | 1650 | struct cfb_info *cfb; |
| 1652 | int err = -ENOMEM; | 1651 | int err = -ENOMEM; |
| @@ -1780,8 +1779,8 @@ static int cyberpro_pci_enable_mmio(struct cfb_info *cfb) | |||
| 1780 | return 0; | 1779 | return 0; |
| 1781 | } | 1780 | } |
| 1782 | 1781 | ||
| 1783 | static int __devinit | 1782 | static int cyberpro_pci_probe(struct pci_dev *dev, |
| 1784 | cyberpro_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | 1783 | const struct pci_device_id *id) |
| 1785 | { | 1784 | { |
| 1786 | struct cfb_info *cfb; | 1785 | struct cfb_info *cfb; |
| 1787 | char name[16]; | 1786 | char name[16]; |
| @@ -1863,7 +1862,7 @@ failed_release: | |||
| 1863 | return err; | 1862 | return err; |
| 1864 | } | 1863 | } |
| 1865 | 1864 | ||
| 1866 | static void __devexit cyberpro_pci_remove(struct pci_dev *dev) | 1865 | static void cyberpro_pci_remove(struct pci_dev *dev) |
| 1867 | { | 1866 | { |
| 1868 | struct cfb_info *cfb = pci_get_drvdata(dev); | 1867 | struct cfb_info *cfb = pci_get_drvdata(dev); |
| 1869 | 1868 | ||
| @@ -1923,7 +1922,7 @@ MODULE_DEVICE_TABLE(pci, cyberpro_pci_table); | |||
| 1923 | static struct pci_driver cyberpro_driver = { | 1922 | static struct pci_driver cyberpro_driver = { |
| 1924 | .name = "CyberPro", | 1923 | .name = "CyberPro", |
| 1925 | .probe = cyberpro_pci_probe, | 1924 | .probe = cyberpro_pci_probe, |
| 1926 | .remove = __devexit_p(cyberpro_pci_remove), | 1925 | .remove = cyberpro_pci_remove, |
| 1927 | .suspend = cyberpro_pci_suspend, | 1926 | .suspend = cyberpro_pci_suspend, |
| 1928 | .resume = cyberpro_pci_resume, | 1927 | .resume = cyberpro_pci_resume, |
| 1929 | .id_table = cyberpro_pci_table | 1928 | .id_table = cyberpro_pci_table |
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index 46534e00fe01..0810939936f4 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c | |||
| @@ -185,7 +185,7 @@ struct da8xx_fb_par { | |||
| 185 | }; | 185 | }; |
| 186 | 186 | ||
| 187 | /* Variable Screen Information */ | 187 | /* Variable Screen Information */ |
| 188 | static struct fb_var_screeninfo da8xx_fb_var __devinitdata = { | 188 | static struct fb_var_screeninfo da8xx_fb_var = { |
| 189 | .xoffset = 0, | 189 | .xoffset = 0, |
| 190 | .yoffset = 0, | 190 | .yoffset = 0, |
| 191 | .transp = {0, 0, 0}, | 191 | .transp = {0, 0, 0}, |
| @@ -202,7 +202,7 @@ static struct fb_var_screeninfo da8xx_fb_var __devinitdata = { | |||
| 202 | .vmode = FB_VMODE_NONINTERLACED | 202 | .vmode = FB_VMODE_NONINTERLACED |
| 203 | }; | 203 | }; |
| 204 | 204 | ||
| 205 | static struct fb_fix_screeninfo da8xx_fb_fix __devinitdata = { | 205 | static struct fb_fix_screeninfo da8xx_fb_fix = { |
| 206 | .id = "DA8xx FB Drv", | 206 | .id = "DA8xx FB Drv", |
| 207 | .type = FB_TYPE_PACKED_PIXELS, | 207 | .type = FB_TYPE_PACKED_PIXELS, |
| 208 | .type_aux = 0, | 208 | .type_aux = 0, |
| @@ -993,7 +993,7 @@ static inline void lcd_da8xx_cpufreq_deregister(struct da8xx_fb_par *par) | |||
| 993 | } | 993 | } |
| 994 | #endif | 994 | #endif |
| 995 | 995 | ||
| 996 | static int __devexit fb_remove(struct platform_device *dev) | 996 | static int fb_remove(struct platform_device *dev) |
| 997 | { | 997 | { |
| 998 | struct fb_info *info = dev_get_drvdata(&dev->dev); | 998 | struct fb_info *info = dev_get_drvdata(&dev->dev); |
| 999 | 999 | ||
| @@ -1211,7 +1211,7 @@ static unsigned int da8xxfb_pixel_clk_period(struct da8xx_fb_par *par) | |||
| 1211 | return pix_clk_period_picosec; | 1211 | return pix_clk_period_picosec; |
| 1212 | } | 1212 | } |
| 1213 | 1213 | ||
| 1214 | static int __devinit fb_probe(struct platform_device *device) | 1214 | static int fb_probe(struct platform_device *device) |
| 1215 | { | 1215 | { |
| 1216 | struct da8xx_lcdc_platform_data *fb_pdata = | 1216 | struct da8xx_lcdc_platform_data *fb_pdata = |
| 1217 | device->dev.platform_data; | 1217 | device->dev.platform_data; |
| @@ -1580,7 +1580,7 @@ static int fb_resume(struct platform_device *dev) | |||
| 1580 | 1580 | ||
| 1581 | static struct platform_driver da8xx_fb_driver = { | 1581 | static struct platform_driver da8xx_fb_driver = { |
| 1582 | .probe = fb_probe, | 1582 | .probe = fb_probe, |
| 1583 | .remove = __devexit_p(fb_remove), | 1583 | .remove = fb_remove, |
| 1584 | .suspend = fb_suspend, | 1584 | .suspend = fb_suspend, |
| 1585 | .resume = fb_resume, | 1585 | .resume = fb_resume, |
| 1586 | .driver = { | 1586 | .driver = { |
diff --git a/drivers/video/dnfb.c b/drivers/video/dnfb.c index 49e3dda1a361..3526899da61b 100644 --- a/drivers/video/dnfb.c +++ b/drivers/video/dnfb.c | |||
| @@ -115,7 +115,7 @@ static struct fb_ops dn_fb_ops = { | |||
| 115 | .fb_imageblit = cfb_imageblit, | 115 | .fb_imageblit = cfb_imageblit, |
| 116 | }; | 116 | }; |
| 117 | 117 | ||
| 118 | struct fb_var_screeninfo dnfb_var __devinitdata = { | 118 | struct fb_var_screeninfo dnfb_var = { |
| 119 | .xres = 1280, | 119 | .xres = 1280, |
| 120 | .yres = 1024, | 120 | .yres = 1024, |
| 121 | .xres_virtual = 2048, | 121 | .xres_virtual = 2048, |
| @@ -126,7 +126,7 @@ struct fb_var_screeninfo dnfb_var __devinitdata = { | |||
| 126 | .vmode = FB_VMODE_NONINTERLACED, | 126 | .vmode = FB_VMODE_NONINTERLACED, |
| 127 | }; | 127 | }; |
| 128 | 128 | ||
| 129 | static struct fb_fix_screeninfo dnfb_fix __devinitdata = { | 129 | static struct fb_fix_screeninfo dnfb_fix = { |
| 130 | .id = "Apollo Mono", | 130 | .id = "Apollo Mono", |
| 131 | .smem_start = (FRAME_BUFFER_START + IO_BASE), | 131 | .smem_start = (FRAME_BUFFER_START + IO_BASE), |
| 132 | .smem_len = FRAME_BUFFER_LEN, | 132 | .smem_len = FRAME_BUFFER_LEN, |
| @@ -224,7 +224,7 @@ void dnfb_copyarea(struct fb_info *info, const struct fb_copyarea *area) | |||
| 224 | * Initialization | 224 | * Initialization |
| 225 | */ | 225 | */ |
| 226 | 226 | ||
| 227 | static int __devinit dnfb_probe(struct platform_device *dev) | 227 | static int dnfb_probe(struct platform_device *dev) |
| 228 | { | 228 | { |
| 229 | struct fb_info *info; | 229 | struct fb_info *info; |
| 230 | int err = 0; | 230 | int err = 0; |
diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c index 932abaa58a89..50fe668c6172 100644 --- a/drivers/video/efifb.c +++ b/drivers/video/efifb.c | |||
| @@ -20,7 +20,7 @@ static bool request_mem_succeeded = false; | |||
| 20 | 20 | ||
| 21 | static struct pci_dev *default_vga; | 21 | static struct pci_dev *default_vga; |
| 22 | 22 | ||
| 23 | static struct fb_var_screeninfo efifb_defined __devinitdata = { | 23 | static struct fb_var_screeninfo efifb_defined = { |
| 24 | .activate = FB_ACTIVATE_NOW, | 24 | .activate = FB_ACTIVATE_NOW, |
| 25 | .height = -1, | 25 | .height = -1, |
| 26 | .width = -1, | 26 | .width = -1, |
| @@ -31,7 +31,7 @@ static struct fb_var_screeninfo efifb_defined __devinitdata = { | |||
| 31 | .vmode = FB_VMODE_NONINTERLACED, | 31 | .vmode = FB_VMODE_NONINTERLACED, |
| 32 | }; | 32 | }; |
| 33 | 33 | ||
| 34 | static struct fb_fix_screeninfo efifb_fix __devinitdata = { | 34 | static struct fb_fix_screeninfo efifb_fix = { |
| 35 | .id = "EFI VGA", | 35 | .id = "EFI VGA", |
| 36 | .type = FB_TYPE_PACKED_PIXELS, | 36 | .type = FB_TYPE_PACKED_PIXELS, |
| 37 | .accel = FB_ACCEL_NONE, | 37 | .accel = FB_ACCEL_NONE, |
diff --git a/drivers/video/ep93xx-fb.c b/drivers/video/ep93xx-fb.c index 755ef3e65caf..3f2519d30715 100644 --- a/drivers/video/ep93xx-fb.c +++ b/drivers/video/ep93xx-fb.c | |||
| @@ -484,7 +484,7 @@ static void ep93xxfb_dealloc_videomem(struct fb_info *info) | |||
| 484 | info->screen_base, info->fix.smem_start); | 484 | info->screen_base, info->fix.smem_start); |
| 485 | } | 485 | } |
| 486 | 486 | ||
| 487 | static int __devinit ep93xxfb_probe(struct platform_device *pdev) | 487 | static int ep93xxfb_probe(struct platform_device *pdev) |
| 488 | { | 488 | { |
| 489 | struct ep93xxfb_mach_info *mach_info = pdev->dev.platform_data; | 489 | struct ep93xxfb_mach_info *mach_info = pdev->dev.platform_data; |
| 490 | struct fb_info *info; | 490 | struct fb_info *info; |
| @@ -599,7 +599,7 @@ failed_cmap: | |||
| 599 | return err; | 599 | return err; |
| 600 | } | 600 | } |
| 601 | 601 | ||
| 602 | static int __devexit ep93xxfb_remove(struct platform_device *pdev) | 602 | static int ep93xxfb_remove(struct platform_device *pdev) |
| 603 | { | 603 | { |
| 604 | struct fb_info *info = platform_get_drvdata(pdev); | 604 | struct fb_info *info = platform_get_drvdata(pdev); |
| 605 | struct ep93xx_fbi *fbi = info->par; | 605 | struct ep93xx_fbi *fbi = info->par; |
| @@ -620,14 +620,14 @@ static int __devexit ep93xxfb_remove(struct platform_device *pdev) | |||
| 620 | 620 | ||
| 621 | static struct platform_driver ep93xxfb_driver = { | 621 | static struct platform_driver ep93xxfb_driver = { |
| 622 | .probe = ep93xxfb_probe, | 622 | .probe = ep93xxfb_probe, |
| 623 | .remove = __devexit_p(ep93xxfb_remove), | 623 | .remove = ep93xxfb_remove, |
| 624 | .driver = { | 624 | .driver = { |
| 625 | .name = "ep93xx-fb", | 625 | .name = "ep93xx-fb", |
| 626 | .owner = THIS_MODULE, | 626 | .owner = THIS_MODULE, |
| 627 | }, | 627 | }, |
| 628 | }; | 628 | }; |
| 629 | 629 | ||
| 630 | static int __devinit ep93xxfb_init(void) | 630 | static int ep93xxfb_init(void) |
| 631 | { | 631 | { |
| 632 | return platform_driver_register(&ep93xxfb_driver); | 632 | return platform_driver_register(&ep93xxfb_driver); |
| 633 | } | 633 | } |
diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c index 28fd686c6b81..4ef18e2e90cc 100644 --- a/drivers/video/exynos/exynos_dp_core.c +++ b/drivers/video/exynos/exynos_dp_core.c | |||
| @@ -1033,7 +1033,7 @@ static void exynos_dp_phy_exit(struct exynos_dp_device *dp) | |||
| 1033 | } | 1033 | } |
| 1034 | #endif /* CONFIG_OF */ | 1034 | #endif /* CONFIG_OF */ |
| 1035 | 1035 | ||
| 1036 | static int __devinit exynos_dp_probe(struct platform_device *pdev) | 1036 | static int exynos_dp_probe(struct platform_device *pdev) |
| 1037 | { | 1037 | { |
| 1038 | struct resource *res; | 1038 | struct resource *res; |
| 1039 | struct exynos_dp_device *dp; | 1039 | struct exynos_dp_device *dp; |
| @@ -1114,7 +1114,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev) | |||
| 1114 | return 0; | 1114 | return 0; |
| 1115 | } | 1115 | } |
| 1116 | 1116 | ||
| 1117 | static int __devexit exynos_dp_remove(struct platform_device *pdev) | 1117 | static int exynos_dp_remove(struct platform_device *pdev) |
| 1118 | { | 1118 | { |
| 1119 | struct exynos_dp_platdata *pdata = pdev->dev.platform_data; | 1119 | struct exynos_dp_platdata *pdata = pdev->dev.platform_data; |
| 1120 | struct exynos_dp_device *dp = platform_get_drvdata(pdev); | 1120 | struct exynos_dp_device *dp = platform_get_drvdata(pdev); |
| @@ -1195,7 +1195,7 @@ MODULE_DEVICE_TABLE(of, exynos_dp_match); | |||
| 1195 | 1195 | ||
| 1196 | static struct platform_driver exynos_dp_driver = { | 1196 | static struct platform_driver exynos_dp_driver = { |
| 1197 | .probe = exynos_dp_probe, | 1197 | .probe = exynos_dp_probe, |
| 1198 | .remove = __devexit_p(exynos_dp_remove), | 1198 | .remove = exynos_dp_remove, |
| 1199 | .driver = { | 1199 | .driver = { |
| 1200 | .name = "exynos-dp", | 1200 | .name = "exynos-dp", |
| 1201 | .owner = THIS_MODULE, | 1201 | .owner = THIS_MODULE, |
diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c index 07d70a3a628b..4a17cdccef34 100644 --- a/drivers/video/exynos/exynos_mipi_dsi.c +++ b/drivers/video/exynos/exynos_mipi_dsi.c | |||
| @@ -490,7 +490,7 @@ err_platform_get_irq: | |||
| 490 | return ret; | 490 | return ret; |
| 491 | } | 491 | } |
| 492 | 492 | ||
| 493 | static int __devexit exynos_mipi_dsi_remove(struct platform_device *pdev) | 493 | static int exynos_mipi_dsi_remove(struct platform_device *pdev) |
| 494 | { | 494 | { |
| 495 | struct mipi_dsim_device *dsim = platform_get_drvdata(pdev); | 495 | struct mipi_dsim_device *dsim = platform_get_drvdata(pdev); |
| 496 | struct mipi_dsim_ddi *dsim_ddi, *next; | 496 | struct mipi_dsim_ddi *dsim_ddi, *next; |
| @@ -595,7 +595,7 @@ static const struct dev_pm_ops exynos_mipi_dsi_pm_ops = { | |||
| 595 | 595 | ||
| 596 | static struct platform_driver exynos_mipi_dsi_driver = { | 596 | static struct platform_driver exynos_mipi_dsi_driver = { |
| 597 | .probe = exynos_mipi_dsi_probe, | 597 | .probe = exynos_mipi_dsi_probe, |
| 598 | .remove = __devexit_p(exynos_mipi_dsi_remove), | 598 | .remove = exynos_mipi_dsi_remove, |
| 599 | .driver = { | 599 | .driver = { |
| 600 | .name = "exynos-mipi-dsim", | 600 | .name = "exynos-mipi-dsim", |
| 601 | .owner = THIS_MODULE, | 601 | .owner = THIS_MODULE, |
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c index 14102a3f70f5..6d2744794dd1 100644 --- a/drivers/video/ffb.c +++ b/drivers/video/ffb.c | |||
| @@ -893,7 +893,7 @@ static void ffb_init_fix(struct fb_info *info) | |||
| 893 | info->fix.accel = FB_ACCEL_SUN_CREATOR; | 893 | info->fix.accel = FB_ACCEL_SUN_CREATOR; |
| 894 | } | 894 | } |
| 895 | 895 | ||
| 896 | static int __devinit ffb_probe(struct platform_device *op) | 896 | static int ffb_probe(struct platform_device *op) |
| 897 | { | 897 | { |
| 898 | struct device_node *dp = op->dev.of_node; | 898 | struct device_node *dp = op->dev.of_node; |
| 899 | struct ffb_fbc __iomem *fbc; | 899 | struct ffb_fbc __iomem *fbc; |
| @@ -1022,7 +1022,7 @@ out_err: | |||
| 1022 | return err; | 1022 | return err; |
| 1023 | } | 1023 | } |
| 1024 | 1024 | ||
| 1025 | static int __devexit ffb_remove(struct platform_device *op) | 1025 | static int ffb_remove(struct platform_device *op) |
| 1026 | { | 1026 | { |
| 1027 | struct fb_info *info = dev_get_drvdata(&op->dev); | 1027 | struct fb_info *info = dev_get_drvdata(&op->dev); |
| 1028 | struct ffb_par *par = info->par; | 1028 | struct ffb_par *par = info->par; |
| @@ -1058,7 +1058,7 @@ static struct platform_driver ffb_driver = { | |||
| 1058 | .of_match_table = ffb_match, | 1058 | .of_match_table = ffb_match, |
| 1059 | }, | 1059 | }, |
| 1060 | .probe = ffb_probe, | 1060 | .probe = ffb_probe, |
| 1061 | .remove = __devexit_p(ffb_remove), | 1061 | .remove = ffb_remove, |
| 1062 | }; | 1062 | }; |
| 1063 | 1063 | ||
| 1064 | static int __init ffb_init(void) | 1064 | static int __init ffb_init(void) |
diff --git a/drivers/video/fm2fb.c b/drivers/video/fm2fb.c index d0533b7aad79..c99c9671302b 100644 --- a/drivers/video/fm2fb.c +++ b/drivers/video/fm2fb.c | |||
| @@ -127,7 +127,7 @@ | |||
| 127 | 127 | ||
| 128 | static volatile unsigned char *fm2fb_reg; | 128 | static volatile unsigned char *fm2fb_reg; |
| 129 | 129 | ||
| 130 | static struct fb_fix_screeninfo fb_fix __devinitdata = { | 130 | static struct fb_fix_screeninfo fb_fix = { |
| 131 | .smem_len = FRAMEMASTER_REG, | 131 | .smem_len = FRAMEMASTER_REG, |
| 132 | .type = FB_TYPE_PACKED_PIXELS, | 132 | .type = FB_TYPE_PACKED_PIXELS, |
| 133 | .visual = FB_VISUAL_TRUECOLOR, | 133 | .visual = FB_VISUAL_TRUECOLOR, |
| @@ -136,12 +136,12 @@ static struct fb_fix_screeninfo fb_fix __devinitdata = { | |||
| 136 | .accel = FB_ACCEL_NONE, | 136 | .accel = FB_ACCEL_NONE, |
| 137 | }; | 137 | }; |
| 138 | 138 | ||
| 139 | static int fm2fb_mode __devinitdata = -1; | 139 | static int fm2fb_mode = -1; |
| 140 | 140 | ||
| 141 | #define FM2FB_MODE_PAL 0 | 141 | #define FM2FB_MODE_PAL 0 |
| 142 | #define FM2FB_MODE_NTSC 1 | 142 | #define FM2FB_MODE_NTSC 1 |
| 143 | 143 | ||
| 144 | static struct fb_var_screeninfo fb_var_modes[] __devinitdata = { | 144 | static struct fb_var_screeninfo fb_var_modes[] = { |
| 145 | { | 145 | { |
| 146 | /* 768 x 576, 32 bpp (PAL) */ | 146 | /* 768 x 576, 32 bpp (PAL) */ |
| 147 | 768, 576, 768, 576, 0, 0, 32, 0, | 147 | 768, 576, 768, 576, 0, 0, 32, 0, |
| @@ -211,10 +211,9 @@ static int fm2fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | |||
| 211 | * Initialisation | 211 | * Initialisation |
| 212 | */ | 212 | */ |
| 213 | 213 | ||
| 214 | static int __devinit fm2fb_probe(struct zorro_dev *z, | 214 | static int fm2fb_probe(struct zorro_dev *z, const struct zorro_device_id *id); |
| 215 | const struct zorro_device_id *id); | ||
| 216 | 215 | ||
| 217 | static struct zorro_device_id fm2fb_devices[] __devinitdata = { | 216 | static struct zorro_device_id fm2fb_devices[] = { |
| 218 | { ZORRO_PROD_BSC_FRAMEMASTER_II }, | 217 | { ZORRO_PROD_BSC_FRAMEMASTER_II }, |
| 219 | { ZORRO_PROD_HELFRICH_RAINBOW_II }, | 218 | { ZORRO_PROD_HELFRICH_RAINBOW_II }, |
| 220 | { 0 } | 219 | { 0 } |
| @@ -227,8 +226,7 @@ static struct zorro_driver fm2fb_driver = { | |||
| 227 | .probe = fm2fb_probe, | 226 | .probe = fm2fb_probe, |
| 228 | }; | 227 | }; |
| 229 | 228 | ||
| 230 | static int __devinit fm2fb_probe(struct zorro_dev *z, | 229 | static int fm2fb_probe(struct zorro_dev *z, const struct zorro_device_id *id) |
| 231 | const struct zorro_device_id *id) | ||
| 232 | { | 230 | { |
| 233 | struct fb_info *info; | 231 | struct fb_info *info; |
| 234 | unsigned long *ptr; | 232 | unsigned long *ptr; |
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index d3fc92eaee89..19cfd7a92563 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c | |||
| @@ -55,7 +55,7 @@ | |||
| 55 | * order if increasing resolution and frequency. The 320x240-60 mode is | 55 | * order if increasing resolution and frequency. The 320x240-60 mode is |
| 56 | * the initial AOI for the second and third planes. | 56 | * the initial AOI for the second and third planes. |
| 57 | */ | 57 | */ |
| 58 | static struct fb_videomode __devinitdata fsl_diu_mode_db[] = { | 58 | static struct fb_videomode fsl_diu_mode_db[] = { |
| 59 | { | 59 | { |
| 60 | .refresh = 60, | 60 | .refresh = 60, |
| 61 | .xres = 1024, | 61 | .xres = 1024, |
| @@ -1307,7 +1307,7 @@ static struct fb_ops fsl_diu_ops = { | |||
| 1307 | .fb_release = fsl_diu_release, | 1307 | .fb_release = fsl_diu_release, |
| 1308 | }; | 1308 | }; |
| 1309 | 1309 | ||
| 1310 | static int __devinit install_fb(struct fb_info *info) | 1310 | static int install_fb(struct fb_info *info) |
| 1311 | { | 1311 | { |
| 1312 | int rc; | 1312 | int rc; |
| 1313 | struct mfb_info *mfbi = info->par; | 1313 | struct mfb_info *mfbi = info->par; |
| @@ -1518,7 +1518,7 @@ static ssize_t show_monitor(struct device *device, | |||
| 1518 | return 0; | 1518 | return 0; |
| 1519 | } | 1519 | } |
| 1520 | 1520 | ||
| 1521 | static int __devinit fsl_diu_probe(struct platform_device *pdev) | 1521 | static int fsl_diu_probe(struct platform_device *pdev) |
| 1522 | { | 1522 | { |
| 1523 | struct device_node *np = pdev->dev.of_node; | 1523 | struct device_node *np = pdev->dev.of_node; |
| 1524 | struct mfb_info *mfbi; | 1524 | struct mfb_info *mfbi; |
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c index 3dad31975db8..bda5e3941510 100644 --- a/drivers/video/gbefb.c +++ b/drivers/video/gbefb.c | |||
| @@ -91,10 +91,10 @@ static uint32_t pseudo_palette[16]; | |||
| 91 | static uint32_t gbe_cmap[256]; | 91 | static uint32_t gbe_cmap[256]; |
| 92 | static int gbe_turned_on; /* 0 turned off, 1 turned on */ | 92 | static int gbe_turned_on; /* 0 turned off, 1 turned on */ |
| 93 | 93 | ||
| 94 | static char *mode_option __devinitdata = NULL; | 94 | static char *mode_option = NULL; |
| 95 | 95 | ||
| 96 | /* default CRT mode */ | 96 | /* default CRT mode */ |
| 97 | static struct fb_var_screeninfo default_var_CRT __devinitdata = { | 97 | static struct fb_var_screeninfo default_var_CRT = { |
| 98 | /* 640x480, 60 Hz, Non-Interlaced (25.175 MHz dotclock) */ | 98 | /* 640x480, 60 Hz, Non-Interlaced (25.175 MHz dotclock) */ |
| 99 | .xres = 640, | 99 | .xres = 640, |
| 100 | .yres = 480, | 100 | .yres = 480, |
| @@ -125,7 +125,7 @@ static struct fb_var_screeninfo default_var_CRT __devinitdata = { | |||
| 125 | }; | 125 | }; |
| 126 | 126 | ||
| 127 | /* default LCD mode */ | 127 | /* default LCD mode */ |
| 128 | static struct fb_var_screeninfo default_var_LCD __devinitdata = { | 128 | static struct fb_var_screeninfo default_var_LCD = { |
| 129 | /* 1600x1024, 8 bpp */ | 129 | /* 1600x1024, 8 bpp */ |
| 130 | .xres = 1600, | 130 | .xres = 1600, |
| 131 | .yres = 1024, | 131 | .yres = 1024, |
| @@ -157,7 +157,7 @@ static struct fb_var_screeninfo default_var_LCD __devinitdata = { | |||
| 157 | 157 | ||
| 158 | /* default modedb mode */ | 158 | /* default modedb mode */ |
| 159 | /* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */ | 159 | /* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */ |
| 160 | static struct fb_videomode default_mode_CRT __devinitdata = { | 160 | static struct fb_videomode default_mode_CRT = { |
| 161 | .refresh = 60, | 161 | .refresh = 60, |
| 162 | .xres = 640, | 162 | .xres = 640, |
| 163 | .yres = 480, | 163 | .yres = 480, |
| @@ -172,7 +172,7 @@ static struct fb_videomode default_mode_CRT __devinitdata = { | |||
| 172 | .vmode = FB_VMODE_NONINTERLACED, | 172 | .vmode = FB_VMODE_NONINTERLACED, |
| 173 | }; | 173 | }; |
| 174 | /* 1600x1024 SGI flatpanel 1600sw */ | 174 | /* 1600x1024 SGI flatpanel 1600sw */ |
| 175 | static struct fb_videomode default_mode_LCD __devinitdata = { | 175 | static struct fb_videomode default_mode_LCD = { |
| 176 | /* 1600x1024, 8 bpp */ | 176 | /* 1600x1024, 8 bpp */ |
| 177 | .xres = 1600, | 177 | .xres = 1600, |
| 178 | .yres = 1024, | 178 | .yres = 1024, |
| @@ -186,8 +186,8 @@ static struct fb_videomode default_mode_LCD __devinitdata = { | |||
| 186 | .vmode = FB_VMODE_NONINTERLACED, | 186 | .vmode = FB_VMODE_NONINTERLACED, |
| 187 | }; | 187 | }; |
| 188 | 188 | ||
| 189 | static struct fb_videomode *default_mode __devinitdata = &default_mode_CRT; | 189 | static struct fb_videomode *default_mode = &default_mode_CRT; |
| 190 | static struct fb_var_screeninfo *default_var __devinitdata = &default_var_CRT; | 190 | static struct fb_var_screeninfo *default_var = &default_var_CRT; |
| 191 | 191 | ||
| 192 | static int flat_panel_enabled = 0; | 192 | static int flat_panel_enabled = 0; |
| 193 | 193 | ||
| @@ -1082,7 +1082,7 @@ static ssize_t gbefb_show_rev(struct device *device, struct device_attribute *at | |||
| 1082 | 1082 | ||
| 1083 | static DEVICE_ATTR(revision, S_IRUGO, gbefb_show_rev, NULL); | 1083 | static DEVICE_ATTR(revision, S_IRUGO, gbefb_show_rev, NULL); |
| 1084 | 1084 | ||
| 1085 | static void __devexit gbefb_remove_sysfs(struct device *dev) | 1085 | static void gbefb_remove_sysfs(struct device *dev) |
| 1086 | { | 1086 | { |
| 1087 | device_remove_file(dev, &dev_attr_size); | 1087 | device_remove_file(dev, &dev_attr_size); |
| 1088 | device_remove_file(dev, &dev_attr_revision); | 1088 | device_remove_file(dev, &dev_attr_revision); |
| @@ -1098,7 +1098,7 @@ static void gbefb_create_sysfs(struct device *dev) | |||
| 1098 | * Initialization | 1098 | * Initialization |
| 1099 | */ | 1099 | */ |
| 1100 | 1100 | ||
| 1101 | static int __devinit gbefb_setup(char *options) | 1101 | static int gbefb_setup(char *options) |
| 1102 | { | 1102 | { |
| 1103 | char *this_opt; | 1103 | char *this_opt; |
| 1104 | 1104 | ||
| @@ -1129,7 +1129,7 @@ static int __devinit gbefb_setup(char *options) | |||
| 1129 | return 0; | 1129 | return 0; |
| 1130 | } | 1130 | } |
| 1131 | 1131 | ||
| 1132 | static int __devinit gbefb_probe(struct platform_device *p_dev) | 1132 | static int gbefb_probe(struct platform_device *p_dev) |
| 1133 | { | 1133 | { |
| 1134 | int i, ret = 0; | 1134 | int i, ret = 0; |
| 1135 | struct fb_info *info; | 1135 | struct fb_info *info; |
| @@ -1254,7 +1254,7 @@ out_release_framebuffer: | |||
| 1254 | return ret; | 1254 | return ret; |
| 1255 | } | 1255 | } |
| 1256 | 1256 | ||
| 1257 | static int __devexit gbefb_remove(struct platform_device* p_dev) | 1257 | static int gbefb_remove(struct platform_device* p_dev) |
| 1258 | { | 1258 | { |
| 1259 | struct fb_info *info = platform_get_drvdata(p_dev); | 1259 | struct fb_info *info = platform_get_drvdata(p_dev); |
| 1260 | 1260 | ||
| @@ -1273,7 +1273,7 @@ static int __devexit gbefb_remove(struct platform_device* p_dev) | |||
| 1273 | 1273 | ||
| 1274 | static struct platform_driver gbefb_driver = { | 1274 | static struct platform_driver gbefb_driver = { |
| 1275 | .probe = gbefb_probe, | 1275 | .probe = gbefb_probe, |
| 1276 | .remove = __devexit_p(gbefb_remove), | 1276 | .remove = gbefb_remove, |
| 1277 | .driver = { | 1277 | .driver = { |
| 1278 | .name = "gbefb", | 1278 | .name = "gbefb", |
| 1279 | }, | 1279 | }, |
diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c index 265c5ed59ade..ebbaada7b941 100644 --- a/drivers/video/geode/gx1fb_core.c +++ b/drivers/video/geode/gx1fb_core.c | |||
| @@ -29,7 +29,7 @@ static int crt_option = 1; | |||
| 29 | static char panel_option[32] = ""; | 29 | static char panel_option[32] = ""; |
| 30 | 30 | ||
| 31 | /* Modes relevant to the GX1 (taken from modedb.c) */ | 31 | /* Modes relevant to the GX1 (taken from modedb.c) */ |
| 32 | static const struct fb_videomode __devinitconst gx1_modedb[] = { | 32 | static const struct fb_videomode gx1_modedb[] = { |
| 33 | /* 640x480-60 VESA */ | 33 | /* 640x480-60 VESA */ |
| 34 | { NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2, | 34 | { NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2, |
| 35 | 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, | 35 | 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, |
| @@ -195,7 +195,7 @@ static int gx1fb_blank(int blank_mode, struct fb_info *info) | |||
| 195 | return par->vid_ops->blank_display(info, blank_mode); | 195 | return par->vid_ops->blank_display(info, blank_mode); |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | static int __devinit gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *dev) | 198 | static int gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *dev) |
| 199 | { | 199 | { |
| 200 | struct geodefb_par *par = info->par; | 200 | struct geodefb_par *par = info->par; |
| 201 | unsigned gx_base; | 201 | unsigned gx_base; |
| @@ -268,7 +268,7 @@ static struct fb_ops gx1fb_ops = { | |||
| 268 | .fb_imageblit = cfb_imageblit, | 268 | .fb_imageblit = cfb_imageblit, |
| 269 | }; | 269 | }; |
| 270 | 270 | ||
| 271 | static struct fb_info * __devinit gx1fb_init_fbinfo(struct device *dev) | 271 | static struct fb_info *gx1fb_init_fbinfo(struct device *dev) |
| 272 | { | 272 | { |
| 273 | struct geodefb_par *par; | 273 | struct geodefb_par *par; |
| 274 | struct fb_info *info; | 274 | struct fb_info *info; |
| @@ -318,7 +318,7 @@ static struct fb_info * __devinit gx1fb_init_fbinfo(struct device *dev) | |||
| 318 | return info; | 318 | return info; |
| 319 | } | 319 | } |
| 320 | 320 | ||
| 321 | static int __devinit gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id) | 321 | static int gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 322 | { | 322 | { |
| 323 | struct geodefb_par *par; | 323 | struct geodefb_par *par; |
| 324 | struct fb_info *info; | 324 | struct fb_info *info; |
| @@ -382,7 +382,7 @@ static int __devinit gx1fb_probe(struct pci_dev *pdev, const struct pci_device_i | |||
| 382 | return ret; | 382 | return ret; |
| 383 | } | 383 | } |
| 384 | 384 | ||
| 385 | static void __devexit gx1fb_remove(struct pci_dev *pdev) | 385 | static void gx1fb_remove(struct pci_dev *pdev) |
| 386 | { | 386 | { |
| 387 | struct fb_info *info = pci_get_drvdata(pdev); | 387 | struct fb_info *info = pci_get_drvdata(pdev); |
| 388 | struct geodefb_par *par = info->par; | 388 | struct geodefb_par *par = info->par; |
| @@ -441,7 +441,7 @@ static struct pci_driver gx1fb_driver = { | |||
| 441 | .name = "gx1fb", | 441 | .name = "gx1fb", |
| 442 | .id_table = gx1fb_id_table, | 442 | .id_table = gx1fb_id_table, |
| 443 | .probe = gx1fb_probe, | 443 | .probe = gx1fb_probe, |
| 444 | .remove = __devexit_p(gx1fb_remove), | 444 | .remove = gx1fb_remove, |
| 445 | }; | 445 | }; |
| 446 | 446 | ||
| 447 | static int __init gx1fb_init(void) | 447 | static int __init gx1fb_init(void) |
| @@ -456,7 +456,7 @@ static int __init gx1fb_init(void) | |||
| 456 | return pci_register_driver(&gx1fb_driver); | 456 | return pci_register_driver(&gx1fb_driver); |
| 457 | } | 457 | } |
| 458 | 458 | ||
| 459 | static void __devexit gx1fb_cleanup(void) | 459 | static void gx1fb_cleanup(void) |
| 460 | { | 460 | { |
| 461 | pci_unregister_driver(&gx1fb_driver); | 461 | pci_unregister_driver(&gx1fb_driver); |
| 462 | } | 462 | } |
diff --git a/drivers/video/geode/gxfb_core.c b/drivers/video/geode/gxfb_core.c index b4f19db9bb54..19f0c1add747 100644 --- a/drivers/video/geode/gxfb_core.c +++ b/drivers/video/geode/gxfb_core.c | |||
| @@ -40,7 +40,7 @@ static int vram; | |||
| 40 | static int vt_switch; | 40 | static int vt_switch; |
| 41 | 41 | ||
| 42 | /* Modes relevant to the GX (taken from modedb.c) */ | 42 | /* Modes relevant to the GX (taken from modedb.c) */ |
| 43 | static struct fb_videomode gx_modedb[] __devinitdata = { | 43 | static struct fb_videomode gx_modedb[] = { |
| 44 | /* 640x480-60 VESA */ | 44 | /* 640x480-60 VESA */ |
| 45 | { NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2, | 45 | { NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2, |
| 46 | 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, | 46 | 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, |
| @@ -110,15 +110,14 @@ static struct fb_videomode gx_modedb[] __devinitdata = { | |||
| 110 | #ifdef CONFIG_OLPC | 110 | #ifdef CONFIG_OLPC |
| 111 | #include <asm/olpc.h> | 111 | #include <asm/olpc.h> |
| 112 | 112 | ||
| 113 | static struct fb_videomode gx_dcon_modedb[] __devinitdata = { | 113 | static struct fb_videomode gx_dcon_modedb[] = { |
| 114 | /* The only mode the DCON has is 1200x900 */ | 114 | /* The only mode the DCON has is 1200x900 */ |
| 115 | { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3, | 115 | { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3, |
| 116 | FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | 116 | FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, |
| 117 | FB_VMODE_NONINTERLACED, 0 } | 117 | FB_VMODE_NONINTERLACED, 0 } |
| 118 | }; | 118 | }; |
| 119 | 119 | ||
| 120 | static void __devinit get_modedb(struct fb_videomode **modedb, | 120 | static void get_modedb(struct fb_videomode **modedb, unsigned int *size) |
| 121 | unsigned int *size) | ||
| 122 | { | 121 | { |
| 123 | if (olpc_has_dcon()) { | 122 | if (olpc_has_dcon()) { |
| 124 | *modedb = (struct fb_videomode *) gx_dcon_modedb; | 123 | *modedb = (struct fb_videomode *) gx_dcon_modedb; |
| @@ -130,8 +129,7 @@ static void __devinit get_modedb(struct fb_videomode **modedb, | |||
| 130 | } | 129 | } |
| 131 | 130 | ||
| 132 | #else | 131 | #else |
| 133 | static void __devinit get_modedb(struct fb_videomode **modedb, | 132 | static void get_modedb(struct fb_videomode **modedb, unsigned int *size) |
| 134 | unsigned int *size) | ||
| 135 | { | 133 | { |
| 136 | *modedb = (struct fb_videomode *) gx_modedb; | 134 | *modedb = (struct fb_videomode *) gx_modedb; |
| 137 | *size = ARRAY_SIZE(gx_modedb); | 135 | *size = ARRAY_SIZE(gx_modedb); |
| @@ -228,8 +226,7 @@ static int gxfb_blank(int blank_mode, struct fb_info *info) | |||
| 228 | return gx_blank_display(info, blank_mode); | 226 | return gx_blank_display(info, blank_mode); |
| 229 | } | 227 | } |
| 230 | 228 | ||
| 231 | static int __devinit gxfb_map_video_memory(struct fb_info *info, | 229 | static int gxfb_map_video_memory(struct fb_info *info, struct pci_dev *dev) |
| 232 | struct pci_dev *dev) | ||
| 233 | { | 230 | { |
| 234 | struct gxfb_par *par = info->par; | 231 | struct gxfb_par *par = info->par; |
| 235 | int ret; | 232 | int ret; |
| @@ -293,7 +290,7 @@ static struct fb_ops gxfb_ops = { | |||
| 293 | .fb_imageblit = cfb_imageblit, | 290 | .fb_imageblit = cfb_imageblit, |
| 294 | }; | 291 | }; |
| 295 | 292 | ||
| 296 | static struct fb_info *__devinit gxfb_init_fbinfo(struct device *dev) | 293 | static struct fb_info *gxfb_init_fbinfo(struct device *dev) |
| 297 | { | 294 | { |
| 298 | struct gxfb_par *par; | 295 | struct gxfb_par *par; |
| 299 | struct fb_info *info; | 296 | struct fb_info *info; |
| @@ -374,8 +371,7 @@ static int gxfb_resume(struct pci_dev *pdev) | |||
| 374 | } | 371 | } |
| 375 | #endif | 372 | #endif |
| 376 | 373 | ||
| 377 | static int __devinit gxfb_probe(struct pci_dev *pdev, | 374 | static int gxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 378 | const struct pci_device_id *id) | ||
| 379 | { | 375 | { |
| 380 | struct gxfb_par *par; | 376 | struct gxfb_par *par; |
| 381 | struct fb_info *info; | 377 | struct fb_info *info; |
| @@ -455,7 +451,7 @@ static int __devinit gxfb_probe(struct pci_dev *pdev, | |||
| 455 | return ret; | 451 | return ret; |
| 456 | } | 452 | } |
| 457 | 453 | ||
| 458 | static void __devexit gxfb_remove(struct pci_dev *pdev) | 454 | static void gxfb_remove(struct pci_dev *pdev) |
| 459 | { | 455 | { |
| 460 | struct fb_info *info = pci_get_drvdata(pdev); | 456 | struct fb_info *info = pci_get_drvdata(pdev); |
| 461 | struct gxfb_par *par = info->par; | 457 | struct gxfb_par *par = info->par; |
diff --git a/drivers/video/geode/lxfb_core.c b/drivers/video/geode/lxfb_core.c index 416851ca8754..4dd7b5566962 100644 --- a/drivers/video/geode/lxfb_core.c +++ b/drivers/video/geode/lxfb_core.c | |||
| @@ -35,7 +35,7 @@ static int vt_switch; | |||
| 35 | * we try to make it something sane - 640x480-60 is sane | 35 | * we try to make it something sane - 640x480-60 is sane |
| 36 | */ | 36 | */ |
| 37 | 37 | ||
| 38 | static struct fb_videomode geode_modedb[] __devinitdata = { | 38 | static struct fb_videomode geode_modedb[] = { |
| 39 | /* 640x480-60 */ | 39 | /* 640x480-60 */ |
| 40 | { NULL, 60, 640, 480, 39682, 48, 8, 25, 2, 88, 2, | 40 | { NULL, 60, 640, 480, 39682, 48, 8, 25, 2, 88, 2, |
| 41 | FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | 41 | FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, |
| @@ -219,15 +219,14 @@ static struct fb_videomode geode_modedb[] __devinitdata = { | |||
| 219 | #ifdef CONFIG_OLPC | 219 | #ifdef CONFIG_OLPC |
| 220 | #include <asm/olpc.h> | 220 | #include <asm/olpc.h> |
| 221 | 221 | ||
| 222 | static struct fb_videomode olpc_dcon_modedb[] __devinitdata = { | 222 | static struct fb_videomode olpc_dcon_modedb[] = { |
| 223 | /* The only mode the DCON has is 1200x900 */ | 223 | /* The only mode the DCON has is 1200x900 */ |
| 224 | { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3, | 224 | { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3, |
| 225 | FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | 225 | FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, |
| 226 | FB_VMODE_NONINTERLACED, 0 } | 226 | FB_VMODE_NONINTERLACED, 0 } |
| 227 | }; | 227 | }; |
| 228 | 228 | ||
| 229 | static void __devinit get_modedb(struct fb_videomode **modedb, | 229 | static void get_modedb(struct fb_videomode **modedb, unsigned int *size) |
| 230 | unsigned int *size) | ||
| 231 | { | 230 | { |
| 232 | if (olpc_has_dcon()) { | 231 | if (olpc_has_dcon()) { |
| 233 | *modedb = (struct fb_videomode *) olpc_dcon_modedb; | 232 | *modedb = (struct fb_videomode *) olpc_dcon_modedb; |
| @@ -239,8 +238,7 @@ static void __devinit get_modedb(struct fb_videomode **modedb, | |||
| 239 | } | 238 | } |
| 240 | 239 | ||
| 241 | #else | 240 | #else |
| 242 | static void __devinit get_modedb(struct fb_videomode **modedb, | 241 | static void get_modedb(struct fb_videomode **modedb, unsigned int *size) |
| 243 | unsigned int *size) | ||
| 244 | { | 242 | { |
| 245 | *modedb = (struct fb_videomode *) geode_modedb; | 243 | *modedb = (struct fb_videomode *) geode_modedb; |
| 246 | *size = ARRAY_SIZE(geode_modedb); | 244 | *size = ARRAY_SIZE(geode_modedb); |
| @@ -336,8 +334,7 @@ static int lxfb_blank(int blank_mode, struct fb_info *info) | |||
| 336 | } | 334 | } |
| 337 | 335 | ||
| 338 | 336 | ||
| 339 | static int __devinit lxfb_map_video_memory(struct fb_info *info, | 337 | static int lxfb_map_video_memory(struct fb_info *info, struct pci_dev *dev) |
| 340 | struct pci_dev *dev) | ||
| 341 | { | 338 | { |
| 342 | struct lxfb_par *par = info->par; | 339 | struct lxfb_par *par = info->par; |
| 343 | int ret; | 340 | int ret; |
| @@ -414,7 +411,7 @@ static struct fb_ops lxfb_ops = { | |||
| 414 | .fb_imageblit = cfb_imageblit, | 411 | .fb_imageblit = cfb_imageblit, |
| 415 | }; | 412 | }; |
| 416 | 413 | ||
| 417 | static struct fb_info * __devinit lxfb_init_fbinfo(struct device *dev) | 414 | static struct fb_info *lxfb_init_fbinfo(struct device *dev) |
| 418 | { | 415 | { |
| 419 | struct lxfb_par *par; | 416 | struct lxfb_par *par; |
| 420 | struct fb_info *info; | 417 | struct fb_info *info; |
| @@ -498,8 +495,7 @@ static int lxfb_resume(struct pci_dev *pdev) | |||
| 498 | #define lxfb_resume NULL | 495 | #define lxfb_resume NULL |
| 499 | #endif | 496 | #endif |
| 500 | 497 | ||
| 501 | static int __devinit lxfb_probe(struct pci_dev *pdev, | 498 | static int lxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 502 | const struct pci_device_id *id) | ||
| 503 | { | 499 | { |
| 504 | struct lxfb_par *par; | 500 | struct lxfb_par *par; |
| 505 | struct fb_info *info; | 501 | struct fb_info *info; |
| @@ -590,7 +586,7 @@ err: | |||
| 590 | return ret; | 586 | return ret; |
| 591 | } | 587 | } |
| 592 | 588 | ||
| 593 | static void __devexit lxfb_remove(struct pci_dev *pdev) | 589 | static void lxfb_remove(struct pci_dev *pdev) |
| 594 | { | 590 | { |
| 595 | struct fb_info *info = pci_get_drvdata(pdev); | 591 | struct fb_info *info = pci_get_drvdata(pdev); |
| 596 | struct lxfb_par *par = info->par; | 592 | struct lxfb_par *par = info->par; |
diff --git a/drivers/video/grvga.c b/drivers/video/grvga.c index 5245f9a71892..861109e7de1b 100644 --- a/drivers/video/grvga.c +++ b/drivers/video/grvga.c | |||
| @@ -70,7 +70,7 @@ static const struct fb_videomode grvga_modedb[] = { | |||
| 70 | } | 70 | } |
| 71 | }; | 71 | }; |
| 72 | 72 | ||
| 73 | static struct fb_fix_screeninfo grvga_fix __devinitdata = { | 73 | static struct fb_fix_screeninfo grvga_fix = { |
| 74 | .id = "AG SVGACTRL", | 74 | .id = "AG SVGACTRL", |
| 75 | .type = FB_TYPE_PACKED_PIXELS, | 75 | .type = FB_TYPE_PACKED_PIXELS, |
| 76 | .visual = FB_VISUAL_PSEUDOCOLOR, | 76 | .visual = FB_VISUAL_PSEUDOCOLOR, |
| @@ -267,8 +267,8 @@ static struct fb_ops grvga_ops = { | |||
| 267 | .fb_imageblit = cfb_imageblit | 267 | .fb_imageblit = cfb_imageblit |
| 268 | }; | 268 | }; |
| 269 | 269 | ||
| 270 | static int __devinit grvga_parse_custom(char *options, | 270 | static int grvga_parse_custom(char *options, |
| 271 | struct fb_var_screeninfo *screendata) | 271 | struct fb_var_screeninfo *screendata) |
| 272 | { | 272 | { |
| 273 | char *this_opt; | 273 | char *this_opt; |
| 274 | int count = 0; | 274 | int count = 0; |
| @@ -329,7 +329,7 @@ static int __devinit grvga_parse_custom(char *options, | |||
| 329 | return 0; | 329 | return 0; |
| 330 | } | 330 | } |
| 331 | 331 | ||
| 332 | static int __devinit grvga_probe(struct platform_device *dev) | 332 | static int grvga_probe(struct platform_device *dev) |
| 333 | { | 333 | { |
| 334 | struct fb_info *info; | 334 | struct fb_info *info; |
| 335 | int retval = -ENOMEM; | 335 | int retval = -ENOMEM; |
| @@ -512,7 +512,7 @@ free_fb: | |||
| 512 | return retval; | 512 | return retval; |
| 513 | } | 513 | } |
| 514 | 514 | ||
| 515 | static int __devexit grvga_remove(struct platform_device *device) | 515 | static int grvga_remove(struct platform_device *device) |
| 516 | { | 516 | { |
| 517 | struct fb_info *info = dev_get_drvdata(&device->dev); | 517 | struct fb_info *info = dev_get_drvdata(&device->dev); |
| 518 | struct grvga_par *par = info->par; | 518 | struct grvga_par *par = info->par; |
| @@ -554,7 +554,7 @@ static struct platform_driver grvga_driver = { | |||
| 554 | .of_match_table = svgactrl_of_match, | 554 | .of_match_table = svgactrl_of_match, |
| 555 | }, | 555 | }, |
| 556 | .probe = grvga_probe, | 556 | .probe = grvga_probe, |
| 557 | .remove = __devexit_p(grvga_remove), | 557 | .remove = grvga_remove, |
| 558 | }; | 558 | }; |
| 559 | 559 | ||
| 560 | 560 | ||
diff --git a/drivers/video/gxt4500.c b/drivers/video/gxt4500.c index 4bdea6e9bd55..c35663f6a54a 100644 --- a/drivers/video/gxt4500.c +++ b/drivers/video/gxt4500.c | |||
| @@ -159,7 +159,7 @@ struct gxt4500_par { | |||
| 159 | static char *mode_option; | 159 | static char *mode_option; |
| 160 | 160 | ||
| 161 | /* default mode: 1280x1024 @ 60 Hz, 8 bpp */ | 161 | /* default mode: 1280x1024 @ 60 Hz, 8 bpp */ |
| 162 | static const struct fb_videomode defaultmode __devinitconst = { | 162 | static const struct fb_videomode defaultmode = { |
| 163 | .refresh = 60, | 163 | .refresh = 60, |
| 164 | .xres = 1280, | 164 | .xres = 1280, |
| 165 | .yres = 1024, | 165 | .yres = 1024, |
| @@ -588,7 +588,7 @@ static int gxt4500_blank(int blank, struct fb_info *info) | |||
| 588 | return 0; | 588 | return 0; |
| 589 | } | 589 | } |
| 590 | 590 | ||
| 591 | static const struct fb_fix_screeninfo gxt4500_fix __devinitconst = { | 591 | static const struct fb_fix_screeninfo gxt4500_fix = { |
| 592 | .id = "IBM GXT4500P", | 592 | .id = "IBM GXT4500P", |
| 593 | .type = FB_TYPE_PACKED_PIXELS, | 593 | .type = FB_TYPE_PACKED_PIXELS, |
| 594 | .visual = FB_VISUAL_PSEUDOCOLOR, | 594 | .visual = FB_VISUAL_PSEUDOCOLOR, |
| @@ -610,8 +610,7 @@ static struct fb_ops gxt4500_ops = { | |||
| 610 | }; | 610 | }; |
| 611 | 611 | ||
| 612 | /* PCI functions */ | 612 | /* PCI functions */ |
| 613 | static int __devinit gxt4500_probe(struct pci_dev *pdev, | 613 | static int gxt4500_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 614 | const struct pci_device_id *ent) | ||
| 615 | { | 614 | { |
| 616 | int err; | 615 | int err; |
| 617 | unsigned long reg_phys, fb_phys; | 616 | unsigned long reg_phys, fb_phys; |
| @@ -720,7 +719,7 @@ static int __devinit gxt4500_probe(struct pci_dev *pdev, | |||
| 720 | return -ENODEV; | 719 | return -ENODEV; |
| 721 | } | 720 | } |
| 722 | 721 | ||
| 723 | static void __devexit gxt4500_remove(struct pci_dev *pdev) | 722 | static void gxt4500_remove(struct pci_dev *pdev) |
| 724 | { | 723 | { |
| 725 | struct fb_info *info = pci_get_drvdata(pdev); | 724 | struct fb_info *info = pci_get_drvdata(pdev); |
| 726 | struct gxt4500_par *par; | 725 | struct gxt4500_par *par; |
| @@ -758,10 +757,10 @@ static struct pci_driver gxt4500_driver = { | |||
| 758 | .name = "gxt4500", | 757 | .name = "gxt4500", |
| 759 | .id_table = gxt4500_pci_tbl, | 758 | .id_table = gxt4500_pci_tbl, |
| 760 | .probe = gxt4500_probe, | 759 | .probe = gxt4500_probe, |
| 761 | .remove = __devexit_p(gxt4500_remove), | 760 | .remove = gxt4500_remove, |
| 762 | }; | 761 | }; |
| 763 | 762 | ||
| 764 | static int __devinit gxt4500_init(void) | 763 | static int gxt4500_init(void) |
| 765 | { | 764 | { |
| 766 | #ifndef MODULE | 765 | #ifndef MODULE |
| 767 | if (fb_get_options("gxt4500", &mode_option)) | 766 | if (fb_get_options("gxt4500", &mode_option)) |
diff --git a/drivers/video/hecubafb.c b/drivers/video/hecubafb.c index 614251a9af91..59d23181fdb0 100644 --- a/drivers/video/hecubafb.c +++ b/drivers/video/hecubafb.c | |||
| @@ -47,7 +47,7 @@ | |||
| 47 | #define DPY_W 600 | 47 | #define DPY_W 600 |
| 48 | #define DPY_H 800 | 48 | #define DPY_H 800 |
| 49 | 49 | ||
| 50 | static struct fb_fix_screeninfo hecubafb_fix __devinitdata = { | 50 | static struct fb_fix_screeninfo hecubafb_fix = { |
| 51 | .id = "hecubafb", | 51 | .id = "hecubafb", |
| 52 | .type = FB_TYPE_PACKED_PIXELS, | 52 | .type = FB_TYPE_PACKED_PIXELS, |
| 53 | .visual = FB_VISUAL_MONO01, | 53 | .visual = FB_VISUAL_MONO01, |
| @@ -58,7 +58,7 @@ static struct fb_fix_screeninfo hecubafb_fix __devinitdata = { | |||
| 58 | .accel = FB_ACCEL_NONE, | 58 | .accel = FB_ACCEL_NONE, |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | static struct fb_var_screeninfo hecubafb_var __devinitdata = { | 61 | static struct fb_var_screeninfo hecubafb_var = { |
| 62 | .xres = DPY_W, | 62 | .xres = DPY_W, |
| 63 | .yres = DPY_H, | 63 | .yres = DPY_H, |
| 64 | .xres_virtual = DPY_W, | 64 | .xres_virtual = DPY_W, |
| @@ -211,7 +211,7 @@ static struct fb_deferred_io hecubafb_defio = { | |||
| 211 | .deferred_io = hecubafb_dpy_deferred_io, | 211 | .deferred_io = hecubafb_dpy_deferred_io, |
| 212 | }; | 212 | }; |
| 213 | 213 | ||
| 214 | static int __devinit hecubafb_probe(struct platform_device *dev) | 214 | static int hecubafb_probe(struct platform_device *dev) |
| 215 | { | 215 | { |
| 216 | struct fb_info *info; | 216 | struct fb_info *info; |
| 217 | struct hecuba_board *board; | 217 | struct hecuba_board *board; |
| @@ -280,7 +280,7 @@ err_videomem_alloc: | |||
| 280 | return retval; | 280 | return retval; |
| 281 | } | 281 | } |
| 282 | 282 | ||
| 283 | static int __devexit hecubafb_remove(struct platform_device *dev) | 283 | static int hecubafb_remove(struct platform_device *dev) |
| 284 | { | 284 | { |
| 285 | struct fb_info *info = platform_get_drvdata(dev); | 285 | struct fb_info *info = platform_get_drvdata(dev); |
| 286 | 286 | ||
| @@ -299,7 +299,7 @@ static int __devexit hecubafb_remove(struct platform_device *dev) | |||
| 299 | 299 | ||
| 300 | static struct platform_driver hecubafb_driver = { | 300 | static struct platform_driver hecubafb_driver = { |
| 301 | .probe = hecubafb_probe, | 301 | .probe = hecubafb_probe, |
| 302 | .remove = __devexit_p(hecubafb_remove), | 302 | .remove = hecubafb_remove, |
| 303 | .driver = { | 303 | .driver = { |
| 304 | .owner = THIS_MODULE, | 304 | .owner = THIS_MODULE, |
| 305 | .name = "hecubafb", | 305 | .name = "hecubafb", |
diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c index c645f9282650..1e9e2d819d1f 100644 --- a/drivers/video/hgafb.c +++ b/drivers/video/hgafb.c | |||
| @@ -106,7 +106,7 @@ static DEFINE_SPINLOCK(hga_reg_lock); | |||
| 106 | 106 | ||
| 107 | /* Framebuffer driver structures */ | 107 | /* Framebuffer driver structures */ |
| 108 | 108 | ||
| 109 | static struct fb_var_screeninfo hga_default_var __devinitdata = { | 109 | static struct fb_var_screeninfo hga_default_var = { |
| 110 | .xres = 720, | 110 | .xres = 720, |
| 111 | .yres = 348, | 111 | .yres = 348, |
| 112 | .xres_virtual = 720, | 112 | .xres_virtual = 720, |
| @@ -120,7 +120,7 @@ static struct fb_var_screeninfo hga_default_var __devinitdata = { | |||
| 120 | .width = -1, | 120 | .width = -1, |
| 121 | }; | 121 | }; |
| 122 | 122 | ||
| 123 | static struct fb_fix_screeninfo hga_fix __devinitdata = { | 123 | static struct fb_fix_screeninfo hga_fix = { |
| 124 | .id = "HGA", | 124 | .id = "HGA", |
| 125 | .type = FB_TYPE_PACKED_PIXELS, /* (not sure) */ | 125 | .type = FB_TYPE_PACKED_PIXELS, /* (not sure) */ |
| 126 | .visual = FB_VISUAL_MONO10, | 126 | .visual = FB_VISUAL_MONO10, |
| @@ -276,7 +276,7 @@ static void hga_blank(int blank_mode) | |||
| 276 | spin_unlock_irqrestore(&hga_reg_lock, flags); | 276 | spin_unlock_irqrestore(&hga_reg_lock, flags); |
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | static int __devinit hga_card_detect(void) | 279 | static int hga_card_detect(void) |
| 280 | { | 280 | { |
| 281 | int count = 0; | 281 | int count = 0; |
| 282 | void __iomem *p, *q; | 282 | void __iomem *p, *q; |
| @@ -546,7 +546,7 @@ static struct fb_ops hgafb_ops = { | |||
| 546 | * Initialization | 546 | * Initialization |
| 547 | */ | 547 | */ |
| 548 | 548 | ||
| 549 | static int __devinit hgafb_probe(struct platform_device *pdev) | 549 | static int hgafb_probe(struct platform_device *pdev) |
| 550 | { | 550 | { |
| 551 | struct fb_info *info; | 551 | struct fb_info *info; |
| 552 | 552 | ||
| @@ -592,7 +592,7 @@ static int __devinit hgafb_probe(struct platform_device *pdev) | |||
| 592 | return 0; | 592 | return 0; |
| 593 | } | 593 | } |
| 594 | 594 | ||
| 595 | static int __devexit hgafb_remove(struct platform_device *pdev) | 595 | static int hgafb_remove(struct platform_device *pdev) |
| 596 | { | 596 | { |
| 597 | struct fb_info *info = platform_get_drvdata(pdev); | 597 | struct fb_info *info = platform_get_drvdata(pdev); |
| 598 | 598 | ||
| @@ -617,7 +617,7 @@ static int __devexit hgafb_remove(struct platform_device *pdev) | |||
| 617 | 617 | ||
| 618 | static struct platform_driver hgafb_driver = { | 618 | static struct platform_driver hgafb_driver = { |
| 619 | .probe = hgafb_probe, | 619 | .probe = hgafb_probe, |
| 620 | .remove = __devexit_p(hgafb_remove), | 620 | .remove = hgafb_remove, |
| 621 | .driver = { | 621 | .driver = { |
| 622 | .name = "hgafb", | 622 | .name = "hgafb", |
| 623 | }, | 623 | }, |
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c index cfb8d6451014..c2414d6ab646 100644 --- a/drivers/video/hitfb.c +++ b/drivers/video/hitfb.c | |||
| @@ -30,14 +30,14 @@ | |||
| 30 | 30 | ||
| 31 | #define WIDTH 640 | 31 | #define WIDTH 640 |
| 32 | 32 | ||
| 33 | static struct fb_var_screeninfo hitfb_var __devinitdata = { | 33 | static struct fb_var_screeninfo hitfb_var = { |
| 34 | .activate = FB_ACTIVATE_NOW, | 34 | .activate = FB_ACTIVATE_NOW, |
| 35 | .height = -1, | 35 | .height = -1, |
| 36 | .width = -1, | 36 | .width = -1, |
| 37 | .vmode = FB_VMODE_NONINTERLACED, | 37 | .vmode = FB_VMODE_NONINTERLACED, |
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | static struct fb_fix_screeninfo hitfb_fix __devinitdata = { | 40 | static struct fb_fix_screeninfo hitfb_fix = { |
| 41 | .id = "Hitachi HD64461", | 41 | .id = "Hitachi HD64461", |
| 42 | .type = FB_TYPE_PACKED_PIXELS, | 42 | .type = FB_TYPE_PACKED_PIXELS, |
| 43 | .accel = FB_ACCEL_NONE, | 43 | .accel = FB_ACCEL_NONE, |
| @@ -324,7 +324,7 @@ static struct fb_ops hitfb_ops = { | |||
| 324 | .fb_imageblit = cfb_imageblit, | 324 | .fb_imageblit = cfb_imageblit, |
| 325 | }; | 325 | }; |
| 326 | 326 | ||
| 327 | static int __devinit hitfb_probe(struct platform_device *dev) | 327 | static int hitfb_probe(struct platform_device *dev) |
| 328 | { | 328 | { |
| 329 | unsigned short lcdclor, ldr3, ldvndr; | 329 | unsigned short lcdclor, ldr3, ldvndr; |
| 330 | struct fb_info *info; | 330 | struct fb_info *info; |
| @@ -417,7 +417,7 @@ err_fb: | |||
| 417 | return ret; | 417 | return ret; |
| 418 | } | 418 | } |
| 419 | 419 | ||
| 420 | static int __devexit hitfb_remove(struct platform_device *dev) | 420 | static int hitfb_remove(struct platform_device *dev) |
| 421 | { | 421 | { |
| 422 | struct fb_info *info = platform_get_drvdata(dev); | 422 | struct fb_info *info = platform_get_drvdata(dev); |
| 423 | 423 | ||
| @@ -462,7 +462,7 @@ static const struct dev_pm_ops hitfb_dev_pm_ops = { | |||
| 462 | 462 | ||
| 463 | static struct platform_driver hitfb_driver = { | 463 | static struct platform_driver hitfb_driver = { |
| 464 | .probe = hitfb_probe, | 464 | .probe = hitfb_probe, |
| 465 | .remove = __devexit_p(hitfb_remove), | 465 | .remove = hitfb_remove, |
| 466 | .driver = { | 466 | .driver = { |
| 467 | .name = "hitfb", | 467 | .name = "hitfb", |
| 468 | .owner = THIS_MODULE, | 468 | .owner = THIS_MODULE, |
diff --git a/drivers/video/hpfb.c b/drivers/video/hpfb.c index 7324865f965f..b802f93cef5d 100644 --- a/drivers/video/hpfb.c +++ b/drivers/video/hpfb.c | |||
| @@ -206,8 +206,7 @@ static struct fb_ops hpfb_ops = { | |||
| 206 | #define HPFB_FBOMSB 0x5d /* Frame buffer offset */ | 206 | #define HPFB_FBOMSB 0x5d /* Frame buffer offset */ |
| 207 | #define HPFB_FBOLSB 0x5f | 207 | #define HPFB_FBOLSB 0x5f |
| 208 | 208 | ||
| 209 | static int __devinit hpfb_init_one(unsigned long phys_base, | 209 | static int hpfb_init_one(unsigned long phys_base, unsigned long virt_base) |
| 210 | unsigned long virt_base) | ||
| 211 | { | 210 | { |
| 212 | unsigned long fboff, fb_width, fb_height, fb_start; | 211 | unsigned long fboff, fb_width, fb_height, fb_start; |
| 213 | int ret; | 212 | int ret; |
| @@ -327,7 +326,7 @@ unmap_screen_base: | |||
| 327 | /* | 326 | /* |
| 328 | * Initialise the framebuffer | 327 | * Initialise the framebuffer |
| 329 | */ | 328 | */ |
| 330 | static int __devinit hpfb_dio_probe(struct dio_dev * d, const struct dio_device_id * ent) | 329 | static int hpfb_dio_probe(struct dio_dev *d, const struct dio_device_id *ent) |
| 331 | { | 330 | { |
| 332 | unsigned long paddr, vaddr; | 331 | unsigned long paddr, vaddr; |
| 333 | 332 | ||
| @@ -350,7 +349,7 @@ static int __devinit hpfb_dio_probe(struct dio_dev * d, const struct dio_device_ | |||
| 350 | return 0; | 349 | return 0; |
| 351 | } | 350 | } |
| 352 | 351 | ||
| 353 | static void __devexit hpfb_remove_one(struct dio_dev *d) | 352 | static void hpfb_remove_one(struct dio_dev *d) |
| 354 | { | 353 | { |
| 355 | unregister_framebuffer(&fb_info); | 354 | unregister_framebuffer(&fb_info); |
| 356 | if (d->scode >= DIOII_SCBASE) | 355 | if (d->scode >= DIOII_SCBASE) |
| @@ -373,7 +372,7 @@ static struct dio_driver hpfb_driver = { | |||
| 373 | .name = "hpfb", | 372 | .name = "hpfb", |
| 374 | .id_table = hpfb_dio_tbl, | 373 | .id_table = hpfb_dio_tbl, |
| 375 | .probe = hpfb_dio_probe, | 374 | .probe = hpfb_dio_probe, |
| 376 | .remove = __devexit_p(hpfb_remove_one), | 375 | .remove = hpfb_remove_one, |
| 377 | }; | 376 | }; |
| 378 | 377 | ||
| 379 | int __init hpfb_init(void) | 378 | int __init hpfb_init(void) |
diff --git a/drivers/video/i740fb.c b/drivers/video/i740fb.c index ff3f8808e4e9..cfd0c52e8f73 100644 --- a/drivers/video/i740fb.c +++ b/drivers/video/i740fb.c | |||
| @@ -33,10 +33,10 @@ | |||
| 33 | 33 | ||
| 34 | #include "i740_reg.h" | 34 | #include "i740_reg.h" |
| 35 | 35 | ||
| 36 | static char *mode_option __devinitdata; | 36 | static char *mode_option; |
| 37 | 37 | ||
| 38 | #ifdef CONFIG_MTRR | 38 | #ifdef CONFIG_MTRR |
| 39 | static int mtrr __devinitdata = 1; | 39 | static int mtrr = 1; |
| 40 | #endif | 40 | #endif |
| 41 | 41 | ||
| 42 | struct i740fb_par { | 42 | struct i740fb_par { |
| @@ -91,7 +91,7 @@ struct i740fb_par { | |||
| 91 | #define DACSPEED24_SD 128 | 91 | #define DACSPEED24_SD 128 |
| 92 | #define DACSPEED32 86 | 92 | #define DACSPEED32 86 |
| 93 | 93 | ||
| 94 | static struct fb_fix_screeninfo i740fb_fix __devinitdata = { | 94 | static struct fb_fix_screeninfo i740fb_fix = { |
| 95 | .id = "i740fb", | 95 | .id = "i740fb", |
| 96 | .type = FB_TYPE_PACKED_PIXELS, | 96 | .type = FB_TYPE_PACKED_PIXELS, |
| 97 | .visual = FB_VISUAL_TRUECOLOR, | 97 | .visual = FB_VISUAL_TRUECOLOR, |
| @@ -163,7 +163,7 @@ static int i740fb_ddc_getsda(void *data) | |||
| 163 | return !!(i740inreg(par, XRX, REG_DDC_STATE) & DDC_SDA); | 163 | return !!(i740inreg(par, XRX, REG_DDC_STATE) & DDC_SDA); |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | static int __devinit i740fb_setup_ddc_bus(struct fb_info *info) | 166 | static int i740fb_setup_ddc_bus(struct fb_info *info) |
| 167 | { | 167 | { |
| 168 | struct i740fb_par *par = info->par; | 168 | struct i740fb_par *par = info->par; |
| 169 | 169 | ||
| @@ -1007,8 +1007,7 @@ static struct fb_ops i740fb_ops = { | |||
| 1007 | 1007 | ||
| 1008 | /* ------------------------------------------------------------------------- */ | 1008 | /* ------------------------------------------------------------------------- */ |
| 1009 | 1009 | ||
| 1010 | static int __devinit i740fb_probe(struct pci_dev *dev, | 1010 | static int i740fb_probe(struct pci_dev *dev, const struct pci_device_id *ent) |
| 1011 | const struct pci_device_id *ent) | ||
| 1012 | { | 1011 | { |
| 1013 | struct fb_info *info; | 1012 | struct fb_info *info; |
| 1014 | struct i740fb_par *par; | 1013 | struct i740fb_par *par; |
| @@ -1174,7 +1173,7 @@ err_enable_device: | |||
| 1174 | return ret; | 1173 | return ret; |
| 1175 | } | 1174 | } |
| 1176 | 1175 | ||
| 1177 | static void __devexit i740fb_remove(struct pci_dev *dev) | 1176 | static void i740fb_remove(struct pci_dev *dev) |
| 1178 | { | 1177 | { |
| 1179 | struct fb_info *info = pci_get_drvdata(dev); | 1178 | struct fb_info *info = pci_get_drvdata(dev); |
| 1180 | 1179 | ||
| @@ -1275,7 +1274,7 @@ static struct pci_driver i740fb_driver = { | |||
| 1275 | .name = "i740fb", | 1274 | .name = "i740fb", |
| 1276 | .id_table = i740fb_id_table, | 1275 | .id_table = i740fb_id_table, |
| 1277 | .probe = i740fb_probe, | 1276 | .probe = i740fb_probe, |
| 1278 | .remove = __devexit_p(i740fb_remove), | 1277 | .remove = i740fb_remove, |
| 1279 | .suspend = i740fb_suspend, | 1278 | .suspend = i740fb_suspend, |
| 1280 | .resume = i740fb_resume, | 1279 | .resume = i740fb_resume, |
| 1281 | }; | 1280 | }; |
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c index 5c067816a81d..4ce3438ade6f 100644 --- a/drivers/video/i810/i810_main.c +++ b/drivers/video/i810/i810_main.c | |||
| @@ -74,12 +74,12 @@ | |||
| 74 | * | 74 | * |
| 75 | * Experiment with v_offset to find out which works best for you. | 75 | * Experiment with v_offset to find out which works best for you. |
| 76 | */ | 76 | */ |
| 77 | static u32 v_offset_default __devinitdata; /* For 32 MiB Aper size, 8 should be the default */ | 77 | static u32 v_offset_default; /* For 32 MiB Aper size, 8 should be the default */ |
| 78 | static u32 voffset __devinitdata; | 78 | static u32 voffset; |
| 79 | 79 | ||
| 80 | static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor); | 80 | static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor); |
| 81 | static int __devinit i810fb_init_pci (struct pci_dev *dev, | 81 | static int i810fb_init_pci(struct pci_dev *dev, |
| 82 | const struct pci_device_id *entry); | 82 | const struct pci_device_id *entry); |
| 83 | static void __exit i810fb_remove_pci(struct pci_dev *dev); | 83 | static void __exit i810fb_remove_pci(struct pci_dev *dev); |
| 84 | static int i810fb_resume(struct pci_dev *dev); | 84 | static int i810fb_resume(struct pci_dev *dev); |
| 85 | static int i810fb_suspend(struct pci_dev *dev, pm_message_t state); | 85 | static int i810fb_suspend(struct pci_dev *dev, pm_message_t state); |
| @@ -97,7 +97,7 @@ static int i810fb_blank (int blank_mode, struct fb_info *info); | |||
| 97 | static void i810fb_release_resource (struct fb_info *info, struct i810fb_par *par); | 97 | static void i810fb_release_resource (struct fb_info *info, struct i810fb_par *par); |
| 98 | 98 | ||
| 99 | /* PCI */ | 99 | /* PCI */ |
| 100 | static const char * const i810_pci_list[] __devinitconst = { | 100 | static const char * const i810_pci_list[] = { |
| 101 | "Intel(R) 810 Framebuffer Device" , | 101 | "Intel(R) 810 Framebuffer Device" , |
| 102 | "Intel(R) 810-DC100 Framebuffer Device" , | 102 | "Intel(R) 810-DC100 Framebuffer Device" , |
| 103 | "Intel(R) 810E Framebuffer Device" , | 103 | "Intel(R) 810E Framebuffer Device" , |
| @@ -132,22 +132,22 @@ static struct pci_driver i810fb_driver = { | |||
| 132 | .resume = i810fb_resume, | 132 | .resume = i810fb_resume, |
| 133 | }; | 133 | }; |
| 134 | 134 | ||
| 135 | static char *mode_option __devinitdata = NULL; | 135 | static char *mode_option = NULL; |
| 136 | static int vram __devinitdata = 4; | 136 | static int vram = 4; |
| 137 | static int bpp __devinitdata = 8; | 137 | static int bpp = 8; |
| 138 | static bool mtrr __devinitdata; | 138 | static bool mtrr; |
| 139 | static bool accel __devinitdata; | 139 | static bool accel; |
| 140 | static int hsync1 __devinitdata; | 140 | static int hsync1; |
| 141 | static int hsync2 __devinitdata; | 141 | static int hsync2; |
| 142 | static int vsync1 __devinitdata; | 142 | static int vsync1; |
| 143 | static int vsync2 __devinitdata; | 143 | static int vsync2; |
| 144 | static int xres __devinitdata; | 144 | static int xres; |
| 145 | static int yres; | 145 | static int yres; |
| 146 | static int vyres __devinitdata; | 146 | static int vyres; |
| 147 | static bool sync __devinitdata; | 147 | static bool sync; |
| 148 | static bool extvga __devinitdata; | 148 | static bool extvga; |
| 149 | static bool dcolor __devinitdata; | 149 | static bool dcolor; |
| 150 | static bool ddc3 __devinitdata; | 150 | static bool ddc3; |
| 151 | 151 | ||
| 152 | /*------------------------------------------------------------*/ | 152 | /*------------------------------------------------------------*/ |
| 153 | 153 | ||
| @@ -1541,7 +1541,7 @@ static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor) | |||
| 1541 | return 0; | 1541 | return 0; |
| 1542 | } | 1542 | } |
| 1543 | 1543 | ||
| 1544 | static struct fb_ops i810fb_ops __devinitdata = { | 1544 | static struct fb_ops i810fb_ops = { |
| 1545 | .owner = THIS_MODULE, | 1545 | .owner = THIS_MODULE, |
| 1546 | .fb_open = i810fb_open, | 1546 | .fb_open = i810fb_open, |
| 1547 | .fb_release = i810fb_release, | 1547 | .fb_release = i810fb_release, |
| @@ -1628,7 +1628,7 @@ fail: | |||
| 1628 | * AGP resource allocation * | 1628 | * AGP resource allocation * |
| 1629 | ***********************************************************************/ | 1629 | ***********************************************************************/ |
| 1630 | 1630 | ||
| 1631 | static void __devinit i810_fix_pointers(struct i810fb_par *par) | 1631 | static void i810_fix_pointers(struct i810fb_par *par) |
| 1632 | { | 1632 | { |
| 1633 | par->fb.physical = par->aperture.physical+(par->fb.offset << 12); | 1633 | par->fb.physical = par->aperture.physical+(par->fb.offset << 12); |
| 1634 | par->fb.virtual = par->aperture.virtual+(par->fb.offset << 12); | 1634 | par->fb.virtual = par->aperture.virtual+(par->fb.offset << 12); |
| @@ -1640,7 +1640,7 @@ static void __devinit i810_fix_pointers(struct i810fb_par *par) | |||
| 1640 | (par->cursor_heap.offset << 12); | 1640 | (par->cursor_heap.offset << 12); |
| 1641 | } | 1641 | } |
| 1642 | 1642 | ||
| 1643 | static void __devinit i810_fix_offsets(struct i810fb_par *par) | 1643 | static void i810_fix_offsets(struct i810fb_par *par) |
| 1644 | { | 1644 | { |
| 1645 | if (vram + 1 > par->aperture.size >> 20) | 1645 | if (vram + 1 > par->aperture.size >> 20) |
| 1646 | vram = (par->aperture.size >> 20) - 1; | 1646 | vram = (par->aperture.size >> 20) - 1; |
| @@ -1660,7 +1660,7 @@ static void __devinit i810_fix_offsets(struct i810fb_par *par) | |||
| 1660 | par->cursor_heap.size = 4096; | 1660 | par->cursor_heap.size = 4096; |
| 1661 | } | 1661 | } |
| 1662 | 1662 | ||
| 1663 | static int __devinit i810_alloc_agp_mem(struct fb_info *info) | 1663 | static int i810_alloc_agp_mem(struct fb_info *info) |
| 1664 | { | 1664 | { |
| 1665 | struct i810fb_par *par = info->par; | 1665 | struct i810fb_par *par = info->par; |
| 1666 | int size; | 1666 | int size; |
| @@ -1723,7 +1723,7 @@ static int __devinit i810_alloc_agp_mem(struct fb_info *info) | |||
| 1723 | * Sets the user monitor's horizontal and vertical | 1723 | * Sets the user monitor's horizontal and vertical |
| 1724 | * frequency limits | 1724 | * frequency limits |
| 1725 | */ | 1725 | */ |
| 1726 | static void __devinit i810_init_monspecs(struct fb_info *info) | 1726 | static void i810_init_monspecs(struct fb_info *info) |
| 1727 | { | 1727 | { |
| 1728 | if (!hsync1) | 1728 | if (!hsync1) |
| 1729 | hsync1 = HFMIN; | 1729 | hsync1 = HFMIN; |
| @@ -1755,8 +1755,7 @@ static void __devinit i810_init_monspecs(struct fb_info *info) | |||
| 1755 | * @par: pointer to i810fb_par structure | 1755 | * @par: pointer to i810fb_par structure |
| 1756 | * @info: pointer to current fb_info structure | 1756 | * @info: pointer to current fb_info structure |
| 1757 | */ | 1757 | */ |
| 1758 | static void __devinit i810_init_defaults(struct i810fb_par *par, | 1758 | static void i810_init_defaults(struct i810fb_par *par, struct fb_info *info) |
| 1759 | struct fb_info *info) | ||
| 1760 | { | 1759 | { |
| 1761 | mutex_init(&par->open_lock); | 1760 | mutex_init(&par->open_lock); |
| 1762 | 1761 | ||
| @@ -1812,7 +1811,7 @@ static void __devinit i810_init_defaults(struct i810fb_par *par, | |||
| 1812 | * i810_init_device - initialize device | 1811 | * i810_init_device - initialize device |
| 1813 | * @par: pointer to i810fb_par structure | 1812 | * @par: pointer to i810fb_par structure |
| 1814 | */ | 1813 | */ |
| 1815 | static void __devinit i810_init_device(struct i810fb_par *par) | 1814 | static void i810_init_device(struct i810fb_par *par) |
| 1816 | { | 1815 | { |
| 1817 | u8 reg; | 1816 | u8 reg; |
| 1818 | u8 __iomem *mmio = par->mmio_start_virtual; | 1817 | u8 __iomem *mmio = par->mmio_start_virtual; |
| @@ -1833,9 +1832,8 @@ static void __devinit i810_init_device(struct i810fb_par *par) | |||
| 1833 | 1832 | ||
| 1834 | } | 1833 | } |
| 1835 | 1834 | ||
| 1836 | static int __devinit | 1835 | static int i810_allocate_pci_resource(struct i810fb_par *par, |
| 1837 | i810_allocate_pci_resource(struct i810fb_par *par, | 1836 | const struct pci_device_id *entry) |
| 1838 | const struct pci_device_id *entry) | ||
| 1839 | { | 1837 | { |
| 1840 | int err; | 1838 | int err; |
| 1841 | 1839 | ||
| @@ -1892,7 +1890,7 @@ i810_allocate_pci_resource(struct i810fb_par *par, | |||
| 1892 | return 0; | 1890 | return 0; |
| 1893 | } | 1891 | } |
| 1894 | 1892 | ||
| 1895 | static void __devinit i810fb_find_init_mode(struct fb_info *info) | 1893 | static void i810fb_find_init_mode(struct fb_info *info) |
| 1896 | { | 1894 | { |
| 1897 | struct fb_videomode mode; | 1895 | struct fb_videomode mode; |
| 1898 | struct fb_var_screeninfo var; | 1896 | struct fb_var_screeninfo var; |
| @@ -1956,7 +1954,7 @@ static void __devinit i810fb_find_init_mode(struct fb_info *info) | |||
| 1956 | } | 1954 | } |
| 1957 | 1955 | ||
| 1958 | #ifndef MODULE | 1956 | #ifndef MODULE |
| 1959 | static int __devinit i810fb_setup(char *options) | 1957 | static int i810fb_setup(char *options) |
| 1960 | { | 1958 | { |
| 1961 | char *this_opt, *suffix = NULL; | 1959 | char *this_opt, *suffix = NULL; |
| 1962 | 1960 | ||
| @@ -2007,8 +2005,8 @@ static int __devinit i810fb_setup(char *options) | |||
| 2007 | } | 2005 | } |
| 2008 | #endif | 2006 | #endif |
| 2009 | 2007 | ||
| 2010 | static int __devinit i810fb_init_pci (struct pci_dev *dev, | 2008 | static int i810fb_init_pci(struct pci_dev *dev, |
| 2011 | const struct pci_device_id *entry) | 2009 | const struct pci_device_id *entry) |
| 2012 | { | 2010 | { |
| 2013 | struct fb_info *info; | 2011 | struct fb_info *info; |
| 2014 | struct i810fb_par *par = NULL; | 2012 | struct i810fb_par *par = NULL; |
| @@ -2136,7 +2134,7 @@ static void __exit i810fb_remove_pci(struct pci_dev *dev) | |||
| 2136 | } | 2134 | } |
| 2137 | 2135 | ||
| 2138 | #ifndef MODULE | 2136 | #ifndef MODULE |
| 2139 | static int __devinit i810fb_init(void) | 2137 | static int i810fb_init(void) |
| 2140 | { | 2138 | { |
| 2141 | char *option = NULL; | 2139 | char *option = NULL; |
| 2142 | 2140 | ||
| @@ -2154,7 +2152,7 @@ static int __devinit i810fb_init(void) | |||
| 2154 | 2152 | ||
| 2155 | #ifdef MODULE | 2153 | #ifdef MODULE |
| 2156 | 2154 | ||
| 2157 | static int __devinit i810fb_init(void) | 2155 | static int i810fb_init(void) |
| 2158 | { | 2156 | { |
| 2159 | hsync1 *= 1000; | 2157 | hsync1 *= 1000; |
| 2160 | hsync2 *= 1000; | 2158 | hsync2 *= 1000; |
diff --git a/drivers/video/i810/i810_main.h b/drivers/video/i810/i810_main.h index 51d4f3d4116d..a25afaa534ba 100644 --- a/drivers/video/i810/i810_main.h +++ b/drivers/video/i810/i810_main.h | |||
| @@ -64,7 +64,7 @@ static inline void flush_cache(void) | |||
| 64 | 64 | ||
| 65 | #include <asm/mtrr.h> | 65 | #include <asm/mtrr.h> |
| 66 | 66 | ||
| 67 | static inline void __devinit set_mtrr(struct i810fb_par *par) | 67 | static inline void set_mtrr(struct i810fb_par *par) |
| 68 | { | 68 | { |
| 69 | par->mtrr_reg = mtrr_add((u32) par->aperture.physical, | 69 | par->mtrr_reg = mtrr_add((u32) par->aperture.physical, |
| 70 | par->aperture.size, MTRR_TYPE_WRCOMB, 1); | 70 | par->aperture.size, MTRR_TYPE_WRCOMB, 1); |
diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c index 2d97752f79a5..79cbfa7d1a9b 100644 --- a/drivers/video/igafb.c +++ b/drivers/video/igafb.c | |||
| @@ -571,7 +571,7 @@ static int __init igafb_setup(char *options) | |||
| 571 | 571 | ||
| 572 | module_init(igafb_init); | 572 | module_init(igafb_init); |
| 573 | MODULE_LICENSE("GPL"); | 573 | MODULE_LICENSE("GPL"); |
| 574 | static struct pci_device_id igafb_pci_tbl[] __devinitdata = { | 574 | static struct pci_device_id igafb_pci_tbl[] = { |
| 575 | { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_1682, | 575 | { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_1682, |
| 576 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 576 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
| 577 | { } | 577 | { } |
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c index 8149356471e4..d5220cc90e93 100644 --- a/drivers/video/imsttfb.c +++ b/drivers/video/imsttfb.c | |||
| @@ -225,7 +225,7 @@ struct initvalues { | |||
| 225 | __u8 addr, value; | 225 | __u8 addr, value; |
| 226 | }; | 226 | }; |
| 227 | 227 | ||
| 228 | static struct initvalues ibm_initregs[] __devinitdata = { | 228 | static struct initvalues ibm_initregs[] = { |
| 229 | { CLKCTL, 0x21 }, | 229 | { CLKCTL, 0x21 }, |
| 230 | { SYNCCTL, 0x00 }, | 230 | { SYNCCTL, 0x00 }, |
| 231 | { HSYNCPOS, 0x00 }, | 231 | { HSYNCPOS, 0x00 }, |
| @@ -272,7 +272,7 @@ static struct initvalues ibm_initregs[] __devinitdata = { | |||
| 272 | { KEYCTL, 0x00 } | 272 | { KEYCTL, 0x00 } |
| 273 | }; | 273 | }; |
| 274 | 274 | ||
| 275 | static struct initvalues tvp_initregs[] __devinitdata = { | 275 | static struct initvalues tvp_initregs[] = { |
| 276 | { TVPIRICC, 0x00 }, | 276 | { TVPIRICC, 0x00 }, |
| 277 | { TVPIRBRC, 0xe4 }, | 277 | { TVPIRBRC, 0xe4 }, |
| 278 | { TVPIRLAC, 0x06 }, | 278 | { TVPIRLAC, 0x06 }, |
| @@ -336,7 +336,7 @@ enum { | |||
| 336 | static int inverse = 0; | 336 | static int inverse = 0; |
| 337 | static char fontname[40] __initdata = { 0 }; | 337 | static char fontname[40] __initdata = { 0 }; |
| 338 | #if defined(CONFIG_PPC) | 338 | #if defined(CONFIG_PPC) |
| 339 | static signed char init_vmode __devinitdata = -1, init_cmode __devinitdata = -1; | 339 | static signed char init_vmode = -1, init_cmode = -1; |
| 340 | #endif | 340 | #endif |
| 341 | 341 | ||
| 342 | static struct imstt_regvals tvp_reg_init_2 = { | 342 | static struct imstt_regvals tvp_reg_init_2 = { |
| @@ -1333,7 +1333,7 @@ static struct pci_driver imsttfb_pci_driver = { | |||
| 1333 | .name = "imsttfb", | 1333 | .name = "imsttfb", |
| 1334 | .id_table = imsttfb_pci_tbl, | 1334 | .id_table = imsttfb_pci_tbl, |
| 1335 | .probe = imsttfb_probe, | 1335 | .probe = imsttfb_probe, |
| 1336 | .remove = __devexit_p(imsttfb_remove), | 1336 | .remove = imsttfb_remove, |
| 1337 | }; | 1337 | }; |
| 1338 | 1338 | ||
| 1339 | static struct fb_ops imsttfb_ops = { | 1339 | static struct fb_ops imsttfb_ops = { |
| @@ -1349,8 +1349,7 @@ static struct fb_ops imsttfb_ops = { | |||
| 1349 | .fb_ioctl = imsttfb_ioctl, | 1349 | .fb_ioctl = imsttfb_ioctl, |
| 1350 | }; | 1350 | }; |
| 1351 | 1351 | ||
| 1352 | static void __devinit | 1352 | static void init_imstt(struct fb_info *info) |
| 1353 | init_imstt(struct fb_info *info) | ||
| 1354 | { | 1353 | { |
| 1355 | struct imstt_par *par = info->par; | 1354 | struct imstt_par *par = info->par; |
| 1356 | __u32 i, tmp, *ip, *end; | 1355 | __u32 i, tmp, *ip, *end; |
| @@ -1466,8 +1465,7 @@ init_imstt(struct fb_info *info) | |||
| 1466 | info->node, info->fix.id, info->fix.smem_len >> 20, tmp); | 1465 | info->node, info->fix.id, info->fix.smem_len >> 20, tmp); |
| 1467 | } | 1466 | } |
| 1468 | 1467 | ||
| 1469 | static int __devinit | 1468 | static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 1470 | imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | ||
| 1471 | { | 1469 | { |
| 1472 | unsigned long addr, size; | 1470 | unsigned long addr, size; |
| 1473 | struct imstt_par *par; | 1471 | struct imstt_par *par; |
| @@ -1534,8 +1532,7 @@ imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 1534 | return 0; | 1532 | return 0; |
| 1535 | } | 1533 | } |
| 1536 | 1534 | ||
| 1537 | static void __devexit | 1535 | static void imsttfb_remove(struct pci_dev *pdev) |
| 1538 | imsttfb_remove(struct pci_dev *pdev) | ||
| 1539 | { | 1536 | { |
| 1540 | struct fb_info *info = pci_get_drvdata(pdev); | 1537 | struct fb_info *info = pci_get_drvdata(pdev); |
| 1541 | struct imstt_par *par = info->par; | 1538 | struct imstt_par *par = info->par; |
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index e501dbc966b3..12526787a7c7 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c | |||
| @@ -917,7 +917,7 @@ failed_init: | |||
| 917 | return ret; | 917 | return ret; |
| 918 | } | 918 | } |
| 919 | 919 | ||
| 920 | static int __devexit imxfb_remove(struct platform_device *pdev) | 920 | static int imxfb_remove(struct platform_device *pdev) |
| 921 | { | 921 | { |
| 922 | struct imx_fb_platform_data *pdata; | 922 | struct imx_fb_platform_data *pdata; |
| 923 | struct fb_info *info = platform_get_drvdata(pdev); | 923 | struct fb_info *info = platform_get_drvdata(pdev); |
| @@ -959,7 +959,7 @@ void imxfb_shutdown(struct platform_device * dev) | |||
| 959 | static struct platform_driver imxfb_driver = { | 959 | static struct platform_driver imxfb_driver = { |
| 960 | .suspend = imxfb_suspend, | 960 | .suspend = imxfb_suspend, |
| 961 | .resume = imxfb_resume, | 961 | .resume = imxfb_resume, |
| 962 | .remove = __devexit_p(imxfb_remove), | 962 | .remove = imxfb_remove, |
| 963 | .shutdown = imxfb_shutdown, | 963 | .shutdown = imxfb_shutdown, |
| 964 | .driver = { | 964 | .driver = { |
| 965 | .name = DRIVER_NAME, | 965 | .name = DRIVER_NAME, |
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index bdcbfbae2777..8209e46c5d28 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c | |||
| @@ -132,7 +132,7 @@ | |||
| 132 | #include "intelfbhw.h" | 132 | #include "intelfbhw.h" |
| 133 | #include "../edid.h" | 133 | #include "../edid.h" |
| 134 | 134 | ||
| 135 | static void __devinit get_initial_mode(struct intelfb_info *dinfo); | 135 | static void get_initial_mode(struct intelfb_info *dinfo); |
| 136 | static void update_dinfo(struct intelfb_info *dinfo, | 136 | static void update_dinfo(struct intelfb_info *dinfo, |
| 137 | struct fb_var_screeninfo *var); | 137 | struct fb_var_screeninfo *var); |
| 138 | static int intelfb_open(struct fb_info *info, int user); | 138 | static int intelfb_open(struct fb_info *info, int user); |
| @@ -162,10 +162,10 @@ static int intelfb_sync(struct fb_info *info); | |||
| 162 | static int intelfb_ioctl(struct fb_info *info, | 162 | static int intelfb_ioctl(struct fb_info *info, |
| 163 | unsigned int cmd, unsigned long arg); | 163 | unsigned int cmd, unsigned long arg); |
| 164 | 164 | ||
| 165 | static int __devinit intelfb_pci_register(struct pci_dev *pdev, | 165 | static int intelfb_pci_register(struct pci_dev *pdev, |
| 166 | const struct pci_device_id *ent); | 166 | const struct pci_device_id *ent); |
| 167 | static void __devexit intelfb_pci_unregister(struct pci_dev *pdev); | 167 | static void intelfb_pci_unregister(struct pci_dev *pdev); |
| 168 | static int __devinit intelfb_set_fbinfo(struct intelfb_info *dinfo); | 168 | static int intelfb_set_fbinfo(struct intelfb_info *dinfo); |
| 169 | 169 | ||
| 170 | /* | 170 | /* |
| 171 | * Limiting the class to PCI_CLASS_DISPLAY_VGA prevents function 1 of the | 171 | * Limiting the class to PCI_CLASS_DISPLAY_VGA prevents function 1 of the |
| @@ -177,7 +177,7 @@ static int __devinit intelfb_set_fbinfo(struct intelfb_info *dinfo); | |||
| 177 | #define INTELFB_CLASS_MASK 0 | 177 | #define INTELFB_CLASS_MASK 0 |
| 178 | #endif | 178 | #endif |
| 179 | 179 | ||
| 180 | static struct pci_device_id intelfb_pci_table[] __devinitdata = { | 180 | static struct pci_device_id intelfb_pci_table[] = { |
| 181 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_830M, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_830M }, | 181 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_830M, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_830M }, |
| 182 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_845G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_845G }, | 182 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_845G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_845G }, |
| 183 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_85XGM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_85XGM }, | 183 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_85XGM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_85XGM }, |
| @@ -219,7 +219,7 @@ static struct pci_driver intelfb_driver = { | |||
| 219 | .name = "intelfb", | 219 | .name = "intelfb", |
| 220 | .id_table = intelfb_pci_table, | 220 | .id_table = intelfb_pci_table, |
| 221 | .probe = intelfb_pci_register, | 221 | .probe = intelfb_pci_register, |
| 222 | .remove = __devexit_p(intelfb_pci_unregister) | 222 | .remove = intelfb_pci_unregister, |
| 223 | }; | 223 | }; |
| 224 | 224 | ||
| 225 | /* Module description/parameters */ | 225 | /* Module description/parameters */ |
| @@ -415,7 +415,7 @@ module_exit(intelfb_exit); | |||
| 415 | ***************************************************************/ | 415 | ***************************************************************/ |
| 416 | 416 | ||
| 417 | #ifdef CONFIG_MTRR | 417 | #ifdef CONFIG_MTRR |
| 418 | static inline void __devinit set_mtrr(struct intelfb_info *dinfo) | 418 | static inline void set_mtrr(struct intelfb_info *dinfo) |
| 419 | { | 419 | { |
| 420 | dinfo->mtrr_reg = mtrr_add(dinfo->aperture.physical, | 420 | dinfo->mtrr_reg = mtrr_add(dinfo->aperture.physical, |
| 421 | dinfo->aperture.size, MTRR_TYPE_WRCOMB, 1); | 421 | dinfo->aperture.size, MTRR_TYPE_WRCOMB, 1); |
| @@ -497,8 +497,8 @@ static void cleanup(struct intelfb_info *dinfo) | |||
| 497 | } while (0) | 497 | } while (0) |
| 498 | 498 | ||
| 499 | 499 | ||
| 500 | static int __devinit intelfb_pci_register(struct pci_dev *pdev, | 500 | static int intelfb_pci_register(struct pci_dev *pdev, |
| 501 | const struct pci_device_id *ent) | 501 | const struct pci_device_id *ent) |
| 502 | { | 502 | { |
| 503 | struct fb_info *info; | 503 | struct fb_info *info; |
| 504 | struct intelfb_info *dinfo; | 504 | struct intelfb_info *dinfo; |
| @@ -921,8 +921,7 @@ err_out_cmap: | |||
| 921 | return -ENODEV; | 921 | return -ENODEV; |
| 922 | } | 922 | } |
| 923 | 923 | ||
| 924 | static void __devexit | 924 | static void intelfb_pci_unregister(struct pci_dev *pdev) |
| 925 | intelfb_pci_unregister(struct pci_dev *pdev) | ||
| 926 | { | 925 | { |
| 927 | struct intelfb_info *dinfo = pci_get_drvdata(pdev); | 926 | struct intelfb_info *dinfo = pci_get_drvdata(pdev); |
| 928 | 927 | ||
| @@ -970,7 +969,7 @@ static __inline__ int var_to_refresh(const struct fb_var_screeninfo *var) | |||
| 970 | * Various intialisation functions * | 969 | * Various intialisation functions * |
| 971 | ***************************************************************/ | 970 | ***************************************************************/ |
| 972 | 971 | ||
| 973 | static void __devinit get_initial_mode(struct intelfb_info *dinfo) | 972 | static void get_initial_mode(struct intelfb_info *dinfo) |
| 974 | { | 973 | { |
| 975 | struct fb_var_screeninfo *var; | 974 | struct fb_var_screeninfo *var; |
| 976 | int xtot, ytot; | 975 | int xtot, ytot; |
| @@ -1037,7 +1036,7 @@ static void __devinit get_initial_mode(struct intelfb_info *dinfo) | |||
| 1037 | } | 1036 | } |
| 1038 | } | 1037 | } |
| 1039 | 1038 | ||
| 1040 | static int __devinit intelfb_init_var(struct intelfb_info *dinfo) | 1039 | static int intelfb_init_var(struct intelfb_info *dinfo) |
| 1041 | { | 1040 | { |
| 1042 | struct fb_var_screeninfo *var; | 1041 | struct fb_var_screeninfo *var; |
| 1043 | int msrc = 0; | 1042 | int msrc = 0; |
| @@ -1118,7 +1117,7 @@ static int __devinit intelfb_init_var(struct intelfb_info *dinfo) | |||
| 1118 | return 0; | 1117 | return 0; |
| 1119 | } | 1118 | } |
| 1120 | 1119 | ||
| 1121 | static int __devinit intelfb_set_fbinfo(struct intelfb_info *dinfo) | 1120 | static int intelfb_set_fbinfo(struct intelfb_info *dinfo) |
| 1122 | { | 1121 | { |
| 1123 | struct fb_info *info = dinfo->info; | 1122 | struct fb_info *info = dinfo->info; |
| 1124 | 1123 | ||
diff --git a/drivers/video/jz4740_fb.c b/drivers/video/jz4740_fb.c index 4d25711b9982..d999bb5e0485 100644 --- a/drivers/video/jz4740_fb.c +++ b/drivers/video/jz4740_fb.c | |||
| @@ -136,7 +136,7 @@ struct jzfb { | |||
| 136 | uint32_t pseudo_palette[16]; | 136 | uint32_t pseudo_palette[16]; |
| 137 | }; | 137 | }; |
| 138 | 138 | ||
| 139 | static const struct fb_fix_screeninfo jzfb_fix __devinitconst = { | 139 | static const struct fb_fix_screeninfo jzfb_fix = { |
| 140 | .id = "JZ4740 FB", | 140 | .id = "JZ4740 FB", |
| 141 | .type = FB_TYPE_PACKED_PIXELS, | 141 | .type = FB_TYPE_PACKED_PIXELS, |
| 142 | .visual = FB_VISUAL_TRUECOLOR, | 142 | .visual = FB_VISUAL_TRUECOLOR, |
| @@ -619,7 +619,7 @@ static struct fb_ops jzfb_ops = { | |||
| 619 | .fb_setcolreg = jzfb_setcolreg, | 619 | .fb_setcolreg = jzfb_setcolreg, |
| 620 | }; | 620 | }; |
| 621 | 621 | ||
| 622 | static int __devinit jzfb_probe(struct platform_device *pdev) | 622 | static int jzfb_probe(struct platform_device *pdev) |
| 623 | { | 623 | { |
| 624 | int ret; | 624 | int ret; |
| 625 | struct jzfb *jzfb; | 625 | struct jzfb *jzfb; |
| @@ -725,7 +725,7 @@ err_framebuffer_release: | |||
| 725 | return ret; | 725 | return ret; |
| 726 | } | 726 | } |
| 727 | 727 | ||
| 728 | static int __devexit jzfb_remove(struct platform_device *pdev) | 728 | static int jzfb_remove(struct platform_device *pdev) |
| 729 | { | 729 | { |
| 730 | struct jzfb *jzfb = platform_get_drvdata(pdev); | 730 | struct jzfb *jzfb = platform_get_drvdata(pdev); |
| 731 | 731 | ||
| @@ -794,7 +794,7 @@ static const struct dev_pm_ops jzfb_pm_ops = { | |||
| 794 | 794 | ||
| 795 | static struct platform_driver jzfb_driver = { | 795 | static struct platform_driver jzfb_driver = { |
| 796 | .probe = jzfb_probe, | 796 | .probe = jzfb_probe, |
| 797 | .remove = __devexit_p(jzfb_remove), | 797 | .remove = jzfb_remove, |
| 798 | .driver = { | 798 | .driver = { |
| 799 | .name = "jz4740-fb", | 799 | .name = "jz4740-fb", |
| 800 | .pm = JZFB_PM_OPS, | 800 | .pm = JZFB_PM_OPS, |
diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c index acb9370fdb14..6157f74ac600 100644 --- a/drivers/video/kyro/fbdev.c +++ b/drivers/video/kyro/fbdev.c | |||
| @@ -40,14 +40,14 @@ | |||
| 40 | #define KHZ2PICOS(a) (1000000000UL/(a)) | 40 | #define KHZ2PICOS(a) (1000000000UL/(a)) |
| 41 | 41 | ||
| 42 | /****************************************************************************/ | 42 | /****************************************************************************/ |
| 43 | static struct fb_fix_screeninfo kyro_fix __devinitdata = { | 43 | static struct fb_fix_screeninfo kyro_fix = { |
| 44 | .id = "ST Kyro", | 44 | .id = "ST Kyro", |
| 45 | .type = FB_TYPE_PACKED_PIXELS, | 45 | .type = FB_TYPE_PACKED_PIXELS, |
| 46 | .visual = FB_VISUAL_TRUECOLOR, | 46 | .visual = FB_VISUAL_TRUECOLOR, |
| 47 | .accel = FB_ACCEL_NONE, | 47 | .accel = FB_ACCEL_NONE, |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | static struct fb_var_screeninfo kyro_var __devinitdata = { | 50 | static struct fb_var_screeninfo kyro_var = { |
| 51 | /* 640x480, 16bpp @ 60 Hz */ | 51 | /* 640x480, 16bpp @ 60 Hz */ |
| 52 | .xres = 640, | 52 | .xres = 640, |
| 53 | .yres = 480, | 53 | .yres = 480, |
| @@ -81,18 +81,18 @@ typedef struct { | |||
| 81 | /* global graphics card info structure (one per card) */ | 81 | /* global graphics card info structure (one per card) */ |
| 82 | static device_info_t deviceInfo; | 82 | static device_info_t deviceInfo; |
| 83 | 83 | ||
| 84 | static char *mode_option __devinitdata = NULL; | 84 | static char *mode_option = NULL; |
| 85 | static int nopan __devinitdata = 0; | 85 | static int nopan = 0; |
| 86 | static int nowrap __devinitdata = 1; | 86 | static int nowrap = 1; |
| 87 | #ifdef CONFIG_MTRR | 87 | #ifdef CONFIG_MTRR |
| 88 | static int nomtrr __devinitdata = 0; | 88 | static int nomtrr = 0; |
| 89 | #endif | 89 | #endif |
| 90 | 90 | ||
| 91 | /* PCI driver prototypes */ | 91 | /* PCI driver prototypes */ |
| 92 | static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent); | 92 | static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent); |
| 93 | static void kyrofb_remove(struct pci_dev *pdev); | 93 | static void kyrofb_remove(struct pci_dev *pdev); |
| 94 | 94 | ||
| 95 | static struct fb_videomode kyro_modedb[] __devinitdata = { | 95 | static struct fb_videomode kyro_modedb[] = { |
| 96 | { | 96 | { |
| 97 | /* 640x350 @ 85Hz */ | 97 | /* 640x350 @ 85Hz */ |
| 98 | NULL, 85, 640, 350, KHZ2PICOS(31500), | 98 | NULL, 85, 640, 350, KHZ2PICOS(31500), |
| @@ -653,7 +653,7 @@ static struct pci_driver kyrofb_pci_driver = { | |||
| 653 | .name = "kyrofb", | 653 | .name = "kyrofb", |
| 654 | .id_table = kyrofb_pci_tbl, | 654 | .id_table = kyrofb_pci_tbl, |
| 655 | .probe = kyrofb_probe, | 655 | .probe = kyrofb_probe, |
| 656 | .remove = __devexit_p(kyrofb_remove), | 656 | .remove = kyrofb_remove, |
| 657 | }; | 657 | }; |
| 658 | 658 | ||
| 659 | static struct fb_ops kyrofb_ops = { | 659 | static struct fb_ops kyrofb_ops = { |
| @@ -667,8 +667,7 @@ static struct fb_ops kyrofb_ops = { | |||
| 667 | .fb_imageblit = cfb_imageblit, | 667 | .fb_imageblit = cfb_imageblit, |
| 668 | }; | 668 | }; |
| 669 | 669 | ||
| 670 | static int __devinit kyrofb_probe(struct pci_dev *pdev, | 670 | static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 671 | const struct pci_device_id *ent) | ||
| 672 | { | 671 | { |
| 673 | struct fb_info *info; | 672 | struct fb_info *info; |
| 674 | struct kyrofb_info *currentpar; | 673 | struct kyrofb_info *currentpar; |
| @@ -754,7 +753,7 @@ out_unmap: | |||
| 754 | return -EINVAL; | 753 | return -EINVAL; |
| 755 | } | 754 | } |
| 756 | 755 | ||
| 757 | static void __devexit kyrofb_remove(struct pci_dev *pdev) | 756 | static void kyrofb_remove(struct pci_dev *pdev) |
| 758 | { | 757 | { |
| 759 | struct fb_info *info = pci_get_drvdata(pdev); | 758 | struct fb_info *info = pci_get_drvdata(pdev); |
| 760 | struct kyrofb_info *par = info->par; | 759 | struct kyrofb_info *par = info->par; |
diff --git a/drivers/video/leo.c b/drivers/video/leo.c index 9e946e2c1da9..b17f5009a436 100644 --- a/drivers/video/leo.c +++ b/drivers/video/leo.c | |||
| @@ -547,7 +547,7 @@ static void leo_unmap_regs(struct platform_device *op, struct fb_info *info, | |||
| 547 | of_iounmap(&op->resource[0], info->screen_base, 0x800000); | 547 | of_iounmap(&op->resource[0], info->screen_base, 0x800000); |
| 548 | } | 548 | } |
| 549 | 549 | ||
| 550 | static int __devinit leo_probe(struct platform_device *op) | 550 | static int leo_probe(struct platform_device *op) |
| 551 | { | 551 | { |
| 552 | struct device_node *dp = op->dev.of_node; | 552 | struct device_node *dp = op->dev.of_node; |
| 553 | struct fb_info *info; | 553 | struct fb_info *info; |
| @@ -636,7 +636,7 @@ out_err: | |||
| 636 | return err; | 636 | return err; |
| 637 | } | 637 | } |
| 638 | 638 | ||
| 639 | static int __devexit leo_remove(struct platform_device *op) | 639 | static int leo_remove(struct platform_device *op) |
| 640 | { | 640 | { |
| 641 | struct fb_info *info = dev_get_drvdata(&op->dev); | 641 | struct fb_info *info = dev_get_drvdata(&op->dev); |
| 642 | struct leo_par *par = info->par; | 642 | struct leo_par *par = info->par; |
| @@ -668,7 +668,7 @@ static struct platform_driver leo_driver = { | |||
| 668 | .of_match_table = leo_match, | 668 | .of_match_table = leo_match, |
| 669 | }, | 669 | }, |
| 670 | .probe = leo_probe, | 670 | .probe = leo_probe, |
| 671 | .remove = __devexit_p(leo_remove), | 671 | .remove = leo_remove, |
| 672 | }; | 672 | }; |
| 673 | 673 | ||
| 674 | static int __init leo_init(void) | 674 | static int __init leo_init(void) |
diff --git a/drivers/video/mb862xx/mb862xxfbdrv.c b/drivers/video/mb862xx/mb862xxfbdrv.c index d68e332aa21c..91c59c9fb082 100644 --- a/drivers/video/mb862xx/mb862xxfbdrv.c +++ b/drivers/video/mb862xx/mb862xxfbdrv.c | |||
| @@ -668,7 +668,7 @@ static int mb862xx_gdc_init(struct mb862xxfb_par *par) | |||
| 668 | return 0; | 668 | return 0; |
| 669 | } | 669 | } |
| 670 | 670 | ||
| 671 | static int __devinit of_platform_mb862xx_probe(struct platform_device *ofdev) | 671 | static int of_platform_mb862xx_probe(struct platform_device *ofdev) |
| 672 | { | 672 | { |
| 673 | struct device_node *np = ofdev->dev.of_node; | 673 | struct device_node *np = ofdev->dev.of_node; |
| 674 | struct device *dev = &ofdev->dev; | 674 | struct device *dev = &ofdev->dev; |
| @@ -786,7 +786,7 @@ fbrel: | |||
| 786 | return ret; | 786 | return ret; |
| 787 | } | 787 | } |
| 788 | 788 | ||
| 789 | static int __devexit of_platform_mb862xx_remove(struct platform_device *ofdev) | 789 | static int of_platform_mb862xx_remove(struct platform_device *ofdev) |
| 790 | { | 790 | { |
| 791 | struct fb_info *fbi = dev_get_drvdata(&ofdev->dev); | 791 | struct fb_info *fbi = dev_get_drvdata(&ofdev->dev); |
| 792 | struct mb862xxfb_par *par = fbi->par; | 792 | struct mb862xxfb_par *par = fbi->par; |
| @@ -823,7 +823,7 @@ static int __devexit of_platform_mb862xx_remove(struct platform_device *ofdev) | |||
| 823 | /* | 823 | /* |
| 824 | * common types | 824 | * common types |
| 825 | */ | 825 | */ |
| 826 | static struct of_device_id __devinitdata of_platform_mb862xx_tbl[] = { | 826 | static struct of_device_id of_platform_mb862xx_tbl[] = { |
| 827 | { .compatible = "fujitsu,MB86276", }, | 827 | { .compatible = "fujitsu,MB86276", }, |
| 828 | { .compatible = "fujitsu,lime", }, | 828 | { .compatible = "fujitsu,lime", }, |
| 829 | { .compatible = "fujitsu,MB86277", }, | 829 | { .compatible = "fujitsu,MB86277", }, |
| @@ -841,7 +841,7 @@ static struct platform_driver of_platform_mb862xxfb_driver = { | |||
| 841 | .of_match_table = of_platform_mb862xx_tbl, | 841 | .of_match_table = of_platform_mb862xx_tbl, |
| 842 | }, | 842 | }, |
| 843 | .probe = of_platform_mb862xx_probe, | 843 | .probe = of_platform_mb862xx_probe, |
| 844 | .remove = __devexit_p(of_platform_mb862xx_remove), | 844 | .remove = of_platform_mb862xx_remove, |
| 845 | }; | 845 | }; |
| 846 | #endif | 846 | #endif |
| 847 | 847 | ||
| @@ -984,7 +984,7 @@ static inline int mb862xx_pci_gdc_init(struct mb862xxfb_par *par) | |||
| 984 | #define CHIP_ID(id) \ | 984 | #define CHIP_ID(id) \ |
| 985 | { PCI_DEVICE(PCI_VENDOR_ID_FUJITSU_LIMITED, id) } | 985 | { PCI_DEVICE(PCI_VENDOR_ID_FUJITSU_LIMITED, id) } |
| 986 | 986 | ||
| 987 | static struct pci_device_id mb862xx_pci_tbl[] __devinitdata = { | 987 | static struct pci_device_id mb862xx_pci_tbl[] = { |
| 988 | /* MB86295/MB86296 */ | 988 | /* MB86295/MB86296 */ |
| 989 | CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALP), | 989 | CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALP), |
| 990 | CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALPA), | 990 | CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALPA), |
| @@ -995,8 +995,8 @@ static struct pci_device_id mb862xx_pci_tbl[] __devinitdata = { | |||
| 995 | 995 | ||
| 996 | MODULE_DEVICE_TABLE(pci, mb862xx_pci_tbl); | 996 | MODULE_DEVICE_TABLE(pci, mb862xx_pci_tbl); |
| 997 | 997 | ||
| 998 | static int __devinit mb862xx_pci_probe(struct pci_dev *pdev, | 998 | static int mb862xx_pci_probe(struct pci_dev *pdev, |
| 999 | const struct pci_device_id *ent) | 999 | const struct pci_device_id *ent) |
| 1000 | { | 1000 | { |
| 1001 | struct mb862xxfb_par *par; | 1001 | struct mb862xxfb_par *par; |
| 1002 | struct fb_info *info; | 1002 | struct fb_info *info; |
| @@ -1133,7 +1133,7 @@ out: | |||
| 1133 | return ret; | 1133 | return ret; |
| 1134 | } | 1134 | } |
| 1135 | 1135 | ||
| 1136 | static void __devexit mb862xx_pci_remove(struct pci_dev *pdev) | 1136 | static void mb862xx_pci_remove(struct pci_dev *pdev) |
| 1137 | { | 1137 | { |
| 1138 | struct fb_info *fbi = pci_get_drvdata(pdev); | 1138 | struct fb_info *fbi = pci_get_drvdata(pdev); |
| 1139 | struct mb862xxfb_par *par = fbi->par; | 1139 | struct mb862xxfb_par *par = fbi->par; |
| @@ -1174,11 +1174,11 @@ static struct pci_driver mb862xxfb_pci_driver = { | |||
| 1174 | .name = DRV_NAME, | 1174 | .name = DRV_NAME, |
| 1175 | .id_table = mb862xx_pci_tbl, | 1175 | .id_table = mb862xx_pci_tbl, |
| 1176 | .probe = mb862xx_pci_probe, | 1176 | .probe = mb862xx_pci_probe, |
| 1177 | .remove = __devexit_p(mb862xx_pci_remove), | 1177 | .remove = mb862xx_pci_remove, |
| 1178 | }; | 1178 | }; |
| 1179 | #endif | 1179 | #endif |
| 1180 | 1180 | ||
| 1181 | static int __devinit mb862xxfb_init(void) | 1181 | static int mb862xxfb_init(void) |
| 1182 | { | 1182 | { |
| 1183 | int ret = -ENODEV; | 1183 | int ret = -ENODEV; |
| 1184 | 1184 | ||
diff --git a/drivers/video/mbx/mbxdebugfs.c b/drivers/video/mbx/mbxdebugfs.c index 12dec7634c55..4449f249b0e7 100644 --- a/drivers/video/mbx/mbxdebugfs.c +++ b/drivers/video/mbx/mbxdebugfs.c | |||
| @@ -213,7 +213,7 @@ static const struct file_operations misc_fops = { | |||
| 213 | .llseek = default_llseek, | 213 | .llseek = default_llseek, |
| 214 | }; | 214 | }; |
| 215 | 215 | ||
| 216 | static void __devinit mbxfb_debugfs_init(struct fb_info *fbi) | 216 | static void mbxfb_debugfs_init(struct fb_info *fbi) |
| 217 | { | 217 | { |
| 218 | struct mbxfb_info *mfbi = fbi->par; | 218 | struct mbxfb_info *mfbi = fbi->par; |
| 219 | struct mbxfb_debugfs_data *dbg; | 219 | struct mbxfb_debugfs_data *dbg; |
| @@ -236,7 +236,7 @@ static void __devinit mbxfb_debugfs_init(struct fb_info *fbi) | |||
| 236 | fbi, &misc_fops); | 236 | fbi, &misc_fops); |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | static void __devexit mbxfb_debugfs_remove(struct fb_info *fbi) | 239 | static void mbxfb_debugfs_remove(struct fb_info *fbi) |
| 240 | { | 240 | { |
| 241 | struct mbxfb_info *mfbi = fbi->par; | 241 | struct mbxfb_info *mfbi = fbi->par; |
| 242 | struct mbxfb_debugfs_data *dbg = mfbi->debugfs_data; | 242 | struct mbxfb_debugfs_data *dbg = mfbi->debugfs_data; |
diff --git a/drivers/video/mbx/mbxfb.c b/drivers/video/mbx/mbxfb.c index 6563e50413c1..0c1a874ffd2b 100644 --- a/drivers/video/mbx/mbxfb.c +++ b/drivers/video/mbx/mbxfb.c | |||
| @@ -79,7 +79,7 @@ struct mbxfb_info { | |||
| 79 | 79 | ||
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | static struct fb_var_screeninfo mbxfb_default __devinitdata = { | 82 | static struct fb_var_screeninfo mbxfb_default = { |
| 83 | .xres = 640, | 83 | .xres = 640, |
| 84 | .yres = 480, | 84 | .yres = 480, |
| 85 | .xres_virtual = 640, | 85 | .xres_virtual = 640, |
| @@ -102,7 +102,7 @@ static struct fb_var_screeninfo mbxfb_default __devinitdata = { | |||
| 102 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | 102 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, |
| 103 | }; | 103 | }; |
| 104 | 104 | ||
| 105 | static struct fb_fix_screeninfo mbxfb_fix __devinitdata = { | 105 | static struct fb_fix_screeninfo mbxfb_fix = { |
| 106 | .id = "MBX", | 106 | .id = "MBX", |
| 107 | .type = FB_TYPE_PACKED_PIXELS, | 107 | .type = FB_TYPE_PACKED_PIXELS, |
| 108 | .visual = FB_VISUAL_TRUECOLOR, | 108 | .visual = FB_VISUAL_TRUECOLOR, |
| @@ -687,7 +687,7 @@ static struct fb_ops mbxfb_ops = { | |||
| 687 | Enable external SDRAM controller. Assume that all clocks are active | 687 | Enable external SDRAM controller. Assume that all clocks are active |
| 688 | by now. | 688 | by now. |
| 689 | */ | 689 | */ |
| 690 | static void __devinit setup_memc(struct fb_info *fbi) | 690 | static void setup_memc(struct fb_info *fbi) |
| 691 | { | 691 | { |
| 692 | unsigned long tmp; | 692 | unsigned long tmp; |
| 693 | int i; | 693 | int i; |
| @@ -747,7 +747,7 @@ static void enable_clocks(struct fb_info *fbi) | |||
| 747 | write_reg_dly(0x00000001, PIXCLKDIV); | 747 | write_reg_dly(0x00000001, PIXCLKDIV); |
| 748 | } | 748 | } |
| 749 | 749 | ||
| 750 | static void __devinit setup_graphics(struct fb_info *fbi) | 750 | static void setup_graphics(struct fb_info *fbi) |
| 751 | { | 751 | { |
| 752 | unsigned long gsctrl; | 752 | unsigned long gsctrl; |
| 753 | unsigned long vscadr; | 753 | unsigned long vscadr; |
| @@ -781,7 +781,7 @@ static void __devinit setup_graphics(struct fb_info *fbi) | |||
| 781 | write_reg_dly(vscadr, VSCADR); | 781 | write_reg_dly(vscadr, VSCADR); |
| 782 | } | 782 | } |
| 783 | 783 | ||
| 784 | static void __devinit setup_display(struct fb_info *fbi) | 784 | static void setup_display(struct fb_info *fbi) |
| 785 | { | 785 | { |
| 786 | unsigned long dsctrl = 0; | 786 | unsigned long dsctrl = 0; |
| 787 | 787 | ||
| @@ -795,7 +795,7 @@ static void __devinit setup_display(struct fb_info *fbi) | |||
| 795 | write_reg_dly((readl(DSCTRL) | DSCTRL_SYNCGEN_EN), DSCTRL); | 795 | write_reg_dly((readl(DSCTRL) | DSCTRL_SYNCGEN_EN), DSCTRL); |
| 796 | } | 796 | } |
| 797 | 797 | ||
| 798 | static void __devinit enable_controller(struct fb_info *fbi) | 798 | static void enable_controller(struct fb_info *fbi) |
| 799 | { | 799 | { |
| 800 | u32 svctrl, shctrl; | 800 | u32 svctrl, shctrl; |
| 801 | 801 | ||
| @@ -881,7 +881,7 @@ static int mbxfb_resume(struct platform_device *dev) | |||
| 881 | 881 | ||
| 882 | #define res_size(_r) (((_r)->end - (_r)->start) + 1) | 882 | #define res_size(_r) (((_r)->end - (_r)->start) + 1) |
| 883 | 883 | ||
| 884 | static int __devinit mbxfb_probe(struct platform_device *dev) | 884 | static int mbxfb_probe(struct platform_device *dev) |
| 885 | { | 885 | { |
| 886 | int ret; | 886 | int ret; |
| 887 | struct fb_info *fbi; | 887 | struct fb_info *fbi; |
| @@ -1006,7 +1006,7 @@ err1: | |||
| 1006 | return ret; | 1006 | return ret; |
| 1007 | } | 1007 | } |
| 1008 | 1008 | ||
| 1009 | static int __devexit mbxfb_remove(struct platform_device *dev) | 1009 | static int mbxfb_remove(struct platform_device *dev) |
| 1010 | { | 1010 | { |
| 1011 | struct fb_info *fbi = platform_get_drvdata(dev); | 1011 | struct fb_info *fbi = platform_get_drvdata(dev); |
| 1012 | 1012 | ||
| @@ -1038,7 +1038,7 @@ static int __devexit mbxfb_remove(struct platform_device *dev) | |||
| 1038 | 1038 | ||
| 1039 | static struct platform_driver mbxfb_driver = { | 1039 | static struct platform_driver mbxfb_driver = { |
| 1040 | .probe = mbxfb_probe, | 1040 | .probe = mbxfb_probe, |
| 1041 | .remove = __devexit_p(mbxfb_remove), | 1041 | .remove = mbxfb_remove, |
| 1042 | .suspend = mbxfb_suspend, | 1042 | .suspend = mbxfb_suspend, |
| 1043 | .resume = mbxfb_resume, | 1043 | .resume = mbxfb_resume, |
| 1044 | .driver = { | 1044 | .driver = { |
diff --git a/drivers/video/metronomefb.c b/drivers/video/metronomefb.c index 97d45e5115e2..f30150d71be9 100644 --- a/drivers/video/metronomefb.c +++ b/drivers/video/metronomefb.c | |||
| @@ -99,7 +99,7 @@ static struct epd_frame epd_frame_table[] = { | |||
| 99 | }, | 99 | }, |
| 100 | }; | 100 | }; |
| 101 | 101 | ||
| 102 | static struct fb_fix_screeninfo metronomefb_fix __devinitdata = { | 102 | static struct fb_fix_screeninfo metronomefb_fix = { |
| 103 | .id = "metronomefb", | 103 | .id = "metronomefb", |
| 104 | .type = FB_TYPE_PACKED_PIXELS, | 104 | .type = FB_TYPE_PACKED_PIXELS, |
| 105 | .visual = FB_VISUAL_STATIC_PSEUDOCOLOR, | 105 | .visual = FB_VISUAL_STATIC_PSEUDOCOLOR, |
| @@ -110,7 +110,7 @@ static struct fb_fix_screeninfo metronomefb_fix __devinitdata = { | |||
| 110 | .accel = FB_ACCEL_NONE, | 110 | .accel = FB_ACCEL_NONE, |
| 111 | }; | 111 | }; |
| 112 | 112 | ||
| 113 | static struct fb_var_screeninfo metronomefb_var __devinitdata = { | 113 | static struct fb_var_screeninfo metronomefb_var = { |
| 114 | .xres = DPY_W, | 114 | .xres = DPY_W, |
| 115 | .yres = DPY_H, | 115 | .yres = DPY_H, |
| 116 | .xres_virtual = DPY_W, | 116 | .xres_virtual = DPY_W, |
| @@ -167,8 +167,8 @@ static u16 calc_img_cksum(u16 *start, int length) | |||
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | /* here we decode the incoming waveform file and populate metromem */ | 169 | /* here we decode the incoming waveform file and populate metromem */ |
| 170 | static int __devinit load_waveform(u8 *mem, size_t size, int m, int t, | 170 | static int load_waveform(u8 *mem, size_t size, int m, int t, |
| 171 | struct metronomefb_par *par) | 171 | struct metronomefb_par *par) |
| 172 | { | 172 | { |
| 173 | int tta; | 173 | int tta; |
| 174 | int wmta; | 174 | int wmta; |
| @@ -338,7 +338,7 @@ static int metronome_display_cmd(struct metronomefb_par *par) | |||
| 338 | return par->board->met_wait_event_intr(par); | 338 | return par->board->met_wait_event_intr(par); |
| 339 | } | 339 | } |
| 340 | 340 | ||
| 341 | static int __devinit metronome_powerup_cmd(struct metronomefb_par *par) | 341 | static int metronome_powerup_cmd(struct metronomefb_par *par) |
| 342 | { | 342 | { |
| 343 | int i; | 343 | int i; |
| 344 | u16 cs; | 344 | u16 cs; |
| @@ -367,7 +367,7 @@ static int __devinit metronome_powerup_cmd(struct metronomefb_par *par) | |||
| 367 | return par->board->met_wait_event(par); | 367 | return par->board->met_wait_event(par); |
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | static int __devinit metronome_config_cmd(struct metronomefb_par *par) | 370 | static int metronome_config_cmd(struct metronomefb_par *par) |
| 371 | { | 371 | { |
| 372 | /* setup config command | 372 | /* setup config command |
| 373 | we can't immediately set the opcode since the controller | 373 | we can't immediately set the opcode since the controller |
| @@ -385,7 +385,7 @@ static int __devinit metronome_config_cmd(struct metronomefb_par *par) | |||
| 385 | return par->board->met_wait_event(par); | 385 | return par->board->met_wait_event(par); |
| 386 | } | 386 | } |
| 387 | 387 | ||
| 388 | static int __devinit metronome_init_cmd(struct metronomefb_par *par) | 388 | static int metronome_init_cmd(struct metronomefb_par *par) |
| 389 | { | 389 | { |
| 390 | int i; | 390 | int i; |
| 391 | u16 cs; | 391 | u16 cs; |
| @@ -411,7 +411,7 @@ static int __devinit metronome_init_cmd(struct metronomefb_par *par) | |||
| 411 | return par->board->met_wait_event(par); | 411 | return par->board->met_wait_event(par); |
| 412 | } | 412 | } |
| 413 | 413 | ||
| 414 | static int __devinit metronome_init_regs(struct metronomefb_par *par) | 414 | static int metronome_init_regs(struct metronomefb_par *par) |
| 415 | { | 415 | { |
| 416 | int res; | 416 | int res; |
| 417 | 417 | ||
| @@ -569,7 +569,7 @@ static struct fb_deferred_io metronomefb_defio = { | |||
| 569 | .deferred_io = metronomefb_dpy_deferred_io, | 569 | .deferred_io = metronomefb_dpy_deferred_io, |
| 570 | }; | 570 | }; |
| 571 | 571 | ||
| 572 | static int __devinit metronomefb_probe(struct platform_device *dev) | 572 | static int metronomefb_probe(struct platform_device *dev) |
| 573 | { | 573 | { |
| 574 | struct fb_info *info; | 574 | struct fb_info *info; |
| 575 | struct metronome_board *board; | 575 | struct metronome_board *board; |
| @@ -741,7 +741,7 @@ err: | |||
| 741 | return retval; | 741 | return retval; |
| 742 | } | 742 | } |
| 743 | 743 | ||
| 744 | static int __devexit metronomefb_remove(struct platform_device *dev) | 744 | static int metronomefb_remove(struct platform_device *dev) |
| 745 | { | 745 | { |
| 746 | struct fb_info *info = platform_get_drvdata(dev); | 746 | struct fb_info *info = platform_get_drvdata(dev); |
| 747 | 747 | ||
| @@ -763,7 +763,7 @@ static int __devexit metronomefb_remove(struct platform_device *dev) | |||
| 763 | 763 | ||
| 764 | static struct platform_driver metronomefb_driver = { | 764 | static struct platform_driver metronomefb_driver = { |
| 765 | .probe = metronomefb_probe, | 765 | .probe = metronomefb_probe, |
| 766 | .remove = __devexit_p(metronomefb_remove), | 766 | .remove = metronomefb_remove, |
| 767 | .driver = { | 767 | .driver = { |
| 768 | .owner = THIS_MODULE, | 768 | .owner = THIS_MODULE, |
| 769 | .name = "metronomefb", | 769 | .name = "metronomefb", |
diff --git a/drivers/video/msm/mddi.c b/drivers/video/msm/mddi.c index 35ac9e8bee63..e0f8011a3c4b 100644 --- a/drivers/video/msm/mddi.c +++ b/drivers/video/msm/mddi.c | |||
| @@ -417,7 +417,7 @@ static void mddi_resume(struct msm_mddi_client_data *cdata) | |||
| 417 | mddi_set_auto_hibernate(&mddi->client_data, 1); | 417 | mddi_set_auto_hibernate(&mddi->client_data, 1); |
| 418 | } | 418 | } |
| 419 | 419 | ||
| 420 | static int __devinit mddi_get_client_caps(struct mddi_info *mddi) | 420 | static int mddi_get_client_caps(struct mddi_info *mddi) |
| 421 | { | 421 | { |
| 422 | int i, j; | 422 | int i, j; |
| 423 | 423 | ||
| @@ -619,9 +619,8 @@ uint32_t mddi_remote_read(struct msm_mddi_client_data *cdata, uint32_t reg) | |||
| 619 | 619 | ||
| 620 | static struct mddi_info mddi_info[2]; | 620 | static struct mddi_info mddi_info[2]; |
| 621 | 621 | ||
| 622 | static int __devinit mddi_clk_setup(struct platform_device *pdev, | 622 | static int mddi_clk_setup(struct platform_device *pdev, struct mddi_info *mddi, |
| 623 | struct mddi_info *mddi, | 623 | unsigned long clk_rate) |
| 624 | unsigned long clk_rate) | ||
| 625 | { | 624 | { |
| 626 | int ret; | 625 | int ret; |
| 627 | 626 | ||
| @@ -664,7 +663,7 @@ static int __init mddi_rev_data_setup(struct mddi_info *mddi) | |||
| 664 | return 0; | 663 | return 0; |
| 665 | } | 664 | } |
| 666 | 665 | ||
| 667 | static int __devinit mddi_probe(struct platform_device *pdev) | 666 | static int mddi_probe(struct platform_device *pdev) |
| 668 | { | 667 | { |
| 669 | struct msm_mddi_platform_data *pdata = pdev->dev.platform_data; | 668 | struct msm_mddi_platform_data *pdata = pdev->dev.platform_data; |
| 670 | struct mddi_info *mddi = &mddi_info[pdev->id]; | 669 | struct mddi_info *mddi = &mddi_info[pdev->id]; |
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 49619b441500..755556ca5b2d 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c | |||
| @@ -369,7 +369,8 @@ static void mxsfb_disable_controller(struct fb_info *fb_info) | |||
| 369 | loop--; | 369 | loop--; |
| 370 | } | 370 | } |
| 371 | 371 | ||
| 372 | writel(VDCTRL4_SYNC_SIGNALS_ON, host->base + LCDC_VDCTRL4 + REG_CLR); | 372 | reg = readl(host->base + LCDC_VDCTRL4); |
| 373 | writel(reg & ~VDCTRL4_SYNC_SIGNALS_ON, host->base + LCDC_VDCTRL4); | ||
| 373 | 374 | ||
| 374 | clk_disable_unprepare(host->clk); | 375 | clk_disable_unprepare(host->clk); |
| 375 | 376 | ||
| @@ -586,7 +587,7 @@ static struct fb_ops mxsfb_ops = { | |||
| 586 | .fb_imageblit = cfb_imageblit, | 587 | .fb_imageblit = cfb_imageblit, |
| 587 | }; | 588 | }; |
| 588 | 589 | ||
| 589 | static int __devinit mxsfb_restore_mode(struct mxsfb_info *host) | 590 | static int mxsfb_restore_mode(struct mxsfb_info *host) |
| 590 | { | 591 | { |
| 591 | struct fb_info *fb_info = &host->fb_info; | 592 | struct fb_info *fb_info = &host->fb_info; |
| 592 | unsigned line_count; | 593 | unsigned line_count; |
| @@ -677,7 +678,7 @@ static int __devinit mxsfb_restore_mode(struct mxsfb_info *host) | |||
| 677 | return 0; | 678 | return 0; |
| 678 | } | 679 | } |
| 679 | 680 | ||
| 680 | static int __devinit mxsfb_init_fbinfo(struct mxsfb_info *host) | 681 | static int mxsfb_init_fbinfo(struct mxsfb_info *host) |
| 681 | { | 682 | { |
| 682 | struct fb_info *fb_info = &host->fb_info; | 683 | struct fb_info *fb_info = &host->fb_info; |
| 683 | struct fb_var_screeninfo *var = &fb_info->var; | 684 | struct fb_var_screeninfo *var = &fb_info->var; |
| @@ -739,7 +740,7 @@ static int __devinit mxsfb_init_fbinfo(struct mxsfb_info *host) | |||
| 739 | return 0; | 740 | return 0; |
| 740 | } | 741 | } |
| 741 | 742 | ||
| 742 | static void __devexit mxsfb_free_videomem(struct mxsfb_info *host) | 743 | static void mxsfb_free_videomem(struct mxsfb_info *host) |
| 743 | { | 744 | { |
| 744 | struct fb_info *fb_info = &host->fb_info; | 745 | struct fb_info *fb_info = &host->fb_info; |
| 745 | 746 | ||
| @@ -772,7 +773,7 @@ static const struct of_device_id mxsfb_dt_ids[] = { | |||
| 772 | }; | 773 | }; |
| 773 | MODULE_DEVICE_TABLE(of, mxsfb_dt_ids); | 774 | MODULE_DEVICE_TABLE(of, mxsfb_dt_ids); |
| 774 | 775 | ||
| 775 | static int __devinit mxsfb_probe(struct platform_device *pdev) | 776 | static int mxsfb_probe(struct platform_device *pdev) |
| 776 | { | 777 | { |
| 777 | const struct of_device_id *of_id = | 778 | const struct of_device_id *of_id = |
| 778 | of_match_device(mxsfb_dt_ids, &pdev->dev); | 779 | of_match_device(mxsfb_dt_ids, &pdev->dev); |
| @@ -912,7 +913,7 @@ error_alloc_info: | |||
| 912 | return ret; | 913 | return ret; |
| 913 | } | 914 | } |
| 914 | 915 | ||
| 915 | static int __devexit mxsfb_remove(struct platform_device *pdev) | 916 | static int mxsfb_remove(struct platform_device *pdev) |
| 916 | { | 917 | { |
| 917 | struct fb_info *fb_info = platform_get_drvdata(pdev); | 918 | struct fb_info *fb_info = platform_get_drvdata(pdev); |
| 918 | struct mxsfb_info *host = to_imxfb_host(fb_info); | 919 | struct mxsfb_info *host = to_imxfb_host(fb_info); |
| @@ -949,7 +950,7 @@ static void mxsfb_shutdown(struct platform_device *pdev) | |||
| 949 | 950 | ||
| 950 | static struct platform_driver mxsfb_driver = { | 951 | static struct platform_driver mxsfb_driver = { |
| 951 | .probe = mxsfb_probe, | 952 | .probe = mxsfb_probe, |
| 952 | .remove = __devexit_p(mxsfb_remove), | 953 | .remove = mxsfb_remove, |
| 953 | .shutdown = mxsfb_shutdown, | 954 | .shutdown = mxsfb_shutdown, |
| 954 | .id_table = mxsfb_devtype, | 955 | .id_table = mxsfb_devtype, |
| 955 | .driver = { | 956 | .driver = { |
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c index afc9521173ef..7ef079c146e7 100644 --- a/drivers/video/neofb.c +++ b/drivers/video/neofb.c | |||
| @@ -88,7 +88,7 @@ static bool external; | |||
| 88 | static bool libretto; | 88 | static bool libretto; |
| 89 | static bool nostretch; | 89 | static bool nostretch; |
| 90 | static bool nopciburst; | 90 | static bool nopciburst; |
| 91 | static char *mode_option __devinitdata = NULL; | 91 | static char *mode_option = NULL; |
| 92 | 92 | ||
| 93 | #ifdef MODULE | 93 | #ifdef MODULE |
| 94 | 94 | ||
| @@ -1632,7 +1632,7 @@ static struct fb_ops neofb_ops = { | |||
| 1632 | 1632 | ||
| 1633 | /* --------------------------------------------------------------------- */ | 1633 | /* --------------------------------------------------------------------- */ |
| 1634 | 1634 | ||
| 1635 | static struct fb_videomode __devinitdata mode800x480 = { | 1635 | static struct fb_videomode mode800x480 = { |
| 1636 | .xres = 800, | 1636 | .xres = 800, |
| 1637 | .yres = 480, | 1637 | .yres = 480, |
| 1638 | .pixclock = 25000, | 1638 | .pixclock = 25000, |
| @@ -1646,8 +1646,7 @@ static struct fb_videomode __devinitdata mode800x480 = { | |||
| 1646 | .vmode = FB_VMODE_NONINTERLACED | 1646 | .vmode = FB_VMODE_NONINTERLACED |
| 1647 | }; | 1647 | }; |
| 1648 | 1648 | ||
| 1649 | static int __devinit neo_map_mmio(struct fb_info *info, | 1649 | static int neo_map_mmio(struct fb_info *info, struct pci_dev *dev) |
| 1650 | struct pci_dev *dev) | ||
| 1651 | { | 1650 | { |
| 1652 | struct neofb_par *par = info->par; | 1651 | struct neofb_par *par = info->par; |
| 1653 | 1652 | ||
| @@ -1707,8 +1706,8 @@ static void neo_unmap_mmio(struct fb_info *info) | |||
| 1707 | info->fix.mmio_len); | 1706 | info->fix.mmio_len); |
| 1708 | } | 1707 | } |
| 1709 | 1708 | ||
| 1710 | static int __devinit neo_map_video(struct fb_info *info, | 1709 | static int neo_map_video(struct fb_info *info, struct pci_dev *dev, |
| 1711 | struct pci_dev *dev, int video_len) | 1710 | int video_len) |
| 1712 | { | 1711 | { |
| 1713 | //unsigned long addr; | 1712 | //unsigned long addr; |
| 1714 | 1713 | ||
| @@ -1772,7 +1771,7 @@ static void neo_unmap_video(struct fb_info *info) | |||
| 1772 | info->fix.smem_len); | 1771 | info->fix.smem_len); |
| 1773 | } | 1772 | } |
| 1774 | 1773 | ||
| 1775 | static int __devinit neo_scan_monitor(struct fb_info *info) | 1774 | static int neo_scan_monitor(struct fb_info *info) |
| 1776 | { | 1775 | { |
| 1777 | struct neofb_par *par = info->par; | 1776 | struct neofb_par *par = info->par; |
| 1778 | unsigned char type, display; | 1777 | unsigned char type, display; |
| @@ -1851,7 +1850,7 @@ static int __devinit neo_scan_monitor(struct fb_info *info) | |||
| 1851 | return 0; | 1850 | return 0; |
| 1852 | } | 1851 | } |
| 1853 | 1852 | ||
| 1854 | static int __devinit neo_init_hw(struct fb_info *info) | 1853 | static int neo_init_hw(struct fb_info *info) |
| 1855 | { | 1854 | { |
| 1856 | struct neofb_par *par = info->par; | 1855 | struct neofb_par *par = info->par; |
| 1857 | int videoRam = 896; | 1856 | int videoRam = 896; |
| @@ -1939,8 +1938,8 @@ static int __devinit neo_init_hw(struct fb_info *info) | |||
| 1939 | } | 1938 | } |
| 1940 | 1939 | ||
| 1941 | 1940 | ||
| 1942 | static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const struct | 1941 | static struct fb_info *neo_alloc_fb_info(struct pci_dev *dev, |
| 1943 | pci_device_id *id) | 1942 | const struct pci_device_id *id) |
| 1944 | { | 1943 | { |
| 1945 | struct fb_info *info; | 1944 | struct fb_info *info; |
| 1946 | struct neofb_par *par; | 1945 | struct neofb_par *par; |
| @@ -2038,8 +2037,7 @@ static void neo_free_fb_info(struct fb_info *info) | |||
| 2038 | 2037 | ||
| 2039 | /* --------------------------------------------------------------------- */ | 2038 | /* --------------------------------------------------------------------- */ |
| 2040 | 2039 | ||
| 2041 | static int __devinit neofb_probe(struct pci_dev *dev, | 2040 | static int neofb_probe(struct pci_dev *dev, const struct pci_device_id *id) |
| 2042 | const struct pci_device_id *id) | ||
| 2043 | { | 2041 | { |
| 2044 | struct fb_info *info; | 2042 | struct fb_info *info; |
| 2045 | u_int h_sync, v_sync; | 2043 | u_int h_sync, v_sync; |
| @@ -2128,7 +2126,7 @@ err_map_mmio: | |||
| 2128 | return err; | 2126 | return err; |
| 2129 | } | 2127 | } |
| 2130 | 2128 | ||
| 2131 | static void __devexit neofb_remove(struct pci_dev *dev) | 2129 | static void neofb_remove(struct pci_dev *dev) |
| 2132 | { | 2130 | { |
| 2133 | struct fb_info *info = pci_get_drvdata(dev); | 2131 | struct fb_info *info = pci_get_drvdata(dev); |
| 2134 | 2132 | ||
| @@ -2194,7 +2192,7 @@ static struct pci_driver neofb_driver = { | |||
| 2194 | .name = "neofb", | 2192 | .name = "neofb", |
| 2195 | .id_table = neofb_devices, | 2193 | .id_table = neofb_devices, |
| 2196 | .probe = neofb_probe, | 2194 | .probe = neofb_probe, |
| 2197 | .remove = __devexit_p(neofb_remove) | 2195 | .remove = neofb_remove, |
| 2198 | }; | 2196 | }; |
| 2199 | 2197 | ||
| 2200 | /* ************************* init in-kernel code ************************** */ | 2198 | /* ************************* init in-kernel code ************************** */ |
diff --git a/drivers/video/nuc900fb.c b/drivers/video/nuc900fb.c index 475dfee82c4a..32581c72ad09 100644 --- a/drivers/video/nuc900fb.c +++ b/drivers/video/nuc900fb.c | |||
| @@ -387,7 +387,7 @@ static int nuc900fb_init_registers(struct fb_info *info) | |||
| 387 | * The buffer should be a non-cached, non-buffered, memory region | 387 | * The buffer should be a non-cached, non-buffered, memory region |
| 388 | * to allow palette and pixel writes without flushing the cache. | 388 | * to allow palette and pixel writes without flushing the cache. |
| 389 | */ | 389 | */ |
| 390 | static int __devinit nuc900fb_map_video_memory(struct fb_info *info) | 390 | static int nuc900fb_map_video_memory(struct fb_info *info) |
| 391 | { | 391 | { |
| 392 | struct nuc900fb_info *fbi = info->par; | 392 | struct nuc900fb_info *fbi = info->par; |
| 393 | dma_addr_t map_dma; | 393 | dma_addr_t map_dma; |
| @@ -499,7 +499,7 @@ static inline void nuc900fb_cpufreq_deregister(struct nuc900fb_info *info) | |||
| 499 | 499 | ||
| 500 | static char driver_name[] = "nuc900fb"; | 500 | static char driver_name[] = "nuc900fb"; |
| 501 | 501 | ||
| 502 | static int __devinit nuc900fb_probe(struct platform_device *pdev) | 502 | static int nuc900fb_probe(struct platform_device *pdev) |
| 503 | { | 503 | { |
| 504 | struct nuc900fb_info *fbi; | 504 | struct nuc900fb_info *fbi; |
| 505 | struct nuc900fb_display *display; | 505 | struct nuc900fb_display *display; |
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index fe13ac567d54..ff228713425e 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c | |||
| @@ -70,34 +70,34 @@ static struct pci_device_id nvidiafb_pci_tbl[] = { | |||
| 70 | MODULE_DEVICE_TABLE(pci, nvidiafb_pci_tbl); | 70 | MODULE_DEVICE_TABLE(pci, nvidiafb_pci_tbl); |
| 71 | 71 | ||
| 72 | /* command line data, set in nvidiafb_setup() */ | 72 | /* command line data, set in nvidiafb_setup() */ |
| 73 | static int flatpanel __devinitdata = -1; /* Autodetect later */ | 73 | static int flatpanel = -1; /* Autodetect later */ |
| 74 | static int fpdither __devinitdata = -1; | 74 | static int fpdither = -1; |
| 75 | static int forceCRTC __devinitdata = -1; | 75 | static int forceCRTC = -1; |
| 76 | static int hwcur __devinitdata = 0; | 76 | static int hwcur = 0; |
| 77 | static int noaccel __devinitdata = 0; | 77 | static int noaccel = 0; |
| 78 | static int noscale __devinitdata = 0; | 78 | static int noscale = 0; |
| 79 | static int paneltweak __devinitdata = 0; | 79 | static int paneltweak = 0; |
| 80 | static int vram __devinitdata = 0; | 80 | static int vram = 0; |
| 81 | static int bpp __devinitdata = 8; | 81 | static int bpp = 8; |
| 82 | static int reverse_i2c __devinitdata; | 82 | static int reverse_i2c; |
| 83 | #ifdef CONFIG_MTRR | 83 | #ifdef CONFIG_MTRR |
| 84 | static bool nomtrr __devinitdata = false; | 84 | static bool nomtrr = false; |
| 85 | #endif | 85 | #endif |
| 86 | #ifdef CONFIG_PMAC_BACKLIGHT | 86 | #ifdef CONFIG_PMAC_BACKLIGHT |
| 87 | static int backlight __devinitdata = 1; | 87 | static int backlight = 1; |
| 88 | #else | 88 | #else |
| 89 | static int backlight __devinitdata = 0; | 89 | static int backlight = 0; |
| 90 | #endif | 90 | #endif |
| 91 | 91 | ||
| 92 | static char *mode_option __devinitdata = NULL; | 92 | static char *mode_option = NULL; |
| 93 | 93 | ||
| 94 | static struct fb_fix_screeninfo __devinitdata nvidiafb_fix = { | 94 | static struct fb_fix_screeninfo nvidiafb_fix = { |
| 95 | .type = FB_TYPE_PACKED_PIXELS, | 95 | .type = FB_TYPE_PACKED_PIXELS, |
| 96 | .xpanstep = 8, | 96 | .xpanstep = 8, |
| 97 | .ypanstep = 1, | 97 | .ypanstep = 1, |
| 98 | }; | 98 | }; |
| 99 | 99 | ||
| 100 | static struct fb_var_screeninfo __devinitdata nvidiafb_default_var = { | 100 | static struct fb_var_screeninfo nvidiafb_default_var = { |
| 101 | .xres = 640, | 101 | .xres = 640, |
| 102 | .yres = 480, | 102 | .yres = 480, |
| 103 | .xres_virtual = 640, | 103 | .xres_virtual = 640, |
| @@ -1105,7 +1105,7 @@ fail: | |||
| 1105 | #define nvidiafb_resume NULL | 1105 | #define nvidiafb_resume NULL |
| 1106 | #endif | 1106 | #endif |
| 1107 | 1107 | ||
| 1108 | static int __devinit nvidia_set_fbinfo(struct fb_info *info) | 1108 | static int nvidia_set_fbinfo(struct fb_info *info) |
| 1109 | { | 1109 | { |
| 1110 | struct fb_monspecs *specs = &info->monspecs; | 1110 | struct fb_monspecs *specs = &info->monspecs; |
| 1111 | struct fb_videomode modedb; | 1111 | struct fb_videomode modedb; |
| @@ -1201,7 +1201,7 @@ static int __devinit nvidia_set_fbinfo(struct fb_info *info) | |||
| 1201 | return nvidiafb_check_var(&info->var, info); | 1201 | return nvidiafb_check_var(&info->var, info); |
| 1202 | } | 1202 | } |
| 1203 | 1203 | ||
| 1204 | static u32 __devinit nvidia_get_chipset(struct fb_info *info) | 1204 | static u32 nvidia_get_chipset(struct fb_info *info) |
| 1205 | { | 1205 | { |
| 1206 | struct nvidia_par *par = info->par; | 1206 | struct nvidia_par *par = info->par; |
| 1207 | u32 id = (par->pci_dev->vendor << 16) | par->pci_dev->device; | 1207 | u32 id = (par->pci_dev->vendor << 16) | par->pci_dev->device; |
| @@ -1224,7 +1224,7 @@ static u32 __devinit nvidia_get_chipset(struct fb_info *info) | |||
| 1224 | return id; | 1224 | return id; |
| 1225 | } | 1225 | } |
| 1226 | 1226 | ||
| 1227 | static u32 __devinit nvidia_get_arch(struct fb_info *info) | 1227 | static u32 nvidia_get_arch(struct fb_info *info) |
| 1228 | { | 1228 | { |
| 1229 | struct nvidia_par *par = info->par; | 1229 | struct nvidia_par *par = info->par; |
| 1230 | u32 arch = 0; | 1230 | u32 arch = 0; |
| @@ -1276,8 +1276,7 @@ static u32 __devinit nvidia_get_arch(struct fb_info *info) | |||
| 1276 | return arch; | 1276 | return arch; |
| 1277 | } | 1277 | } |
| 1278 | 1278 | ||
| 1279 | static int __devinit nvidiafb_probe(struct pci_dev *pd, | 1279 | static int nvidiafb_probe(struct pci_dev *pd, const struct pci_device_id *ent) |
| 1280 | const struct pci_device_id *ent) | ||
| 1281 | { | 1280 | { |
| 1282 | struct nvidia_par *par; | 1281 | struct nvidia_par *par; |
| 1283 | struct fb_info *info; | 1282 | struct fb_info *info; |
| @@ -1438,7 +1437,7 @@ err_out: | |||
| 1438 | return -ENODEV; | 1437 | return -ENODEV; |
| 1439 | } | 1438 | } |
| 1440 | 1439 | ||
| 1441 | static void __devexit nvidiafb_remove(struct pci_dev *pd) | 1440 | static void nvidiafb_remove(struct pci_dev *pd) |
| 1442 | { | 1441 | { |
| 1443 | struct fb_info *info = pci_get_drvdata(pd); | 1442 | struct fb_info *info = pci_get_drvdata(pd); |
| 1444 | struct nvidia_par *par = info->par; | 1443 | struct nvidia_par *par = info->par; |
| @@ -1473,7 +1472,7 @@ static void __devexit nvidiafb_remove(struct pci_dev *pd) | |||
| 1473 | * ------------------------------------------------------------------------- */ | 1472 | * ------------------------------------------------------------------------- */ |
| 1474 | 1473 | ||
| 1475 | #ifndef MODULE | 1474 | #ifndef MODULE |
| 1476 | static int __devinit nvidiafb_setup(char *options) | 1475 | static int nvidiafb_setup(char *options) |
| 1477 | { | 1476 | { |
| 1478 | char *this_opt; | 1477 | char *this_opt; |
| 1479 | 1478 | ||
| @@ -1529,7 +1528,7 @@ static struct pci_driver nvidiafb_driver = { | |||
| 1529 | .probe = nvidiafb_probe, | 1528 | .probe = nvidiafb_probe, |
| 1530 | .suspend = nvidiafb_suspend, | 1529 | .suspend = nvidiafb_suspend, |
| 1531 | .resume = nvidiafb_resume, | 1530 | .resume = nvidiafb_resume, |
| 1532 | .remove = __devexit_p(nvidiafb_remove), | 1531 | .remove = nvidiafb_remove, |
| 1533 | }; | 1532 | }; |
| 1534 | 1533 | ||
| 1535 | /* ------------------------------------------------------------------------- * | 1534 | /* ------------------------------------------------------------------------- * |
| @@ -1538,7 +1537,7 @@ static struct pci_driver nvidiafb_driver = { | |||
| 1538 | * | 1537 | * |
| 1539 | * ------------------------------------------------------------------------- */ | 1538 | * ------------------------------------------------------------------------- */ |
| 1540 | 1539 | ||
| 1541 | static int __devinit nvidiafb_init(void) | 1540 | static int nvidiafb_init(void) |
| 1542 | { | 1541 | { |
| 1543 | #ifndef MODULE | 1542 | #ifndef MODULE |
| 1544 | char *option = NULL; | 1543 | char *option = NULL; |
diff --git a/drivers/video/omap/lcd_mipid.c b/drivers/video/omap/lcd_mipid.c index b739600c51ac..803fee618d57 100644 --- a/drivers/video/omap/lcd_mipid.c +++ b/drivers/video/omap/lcd_mipid.c | |||
| @@ -606,7 +606,7 @@ static struct spi_driver mipid_spi_driver = { | |||
| 606 | .owner = THIS_MODULE, | 606 | .owner = THIS_MODULE, |
| 607 | }, | 607 | }, |
| 608 | .probe = mipid_spi_probe, | 608 | .probe = mipid_spi_probe, |
| 609 | .remove = __devexit_p(mipid_spi_remove), | 609 | .remove = mipid_spi_remove, |
| 610 | }; | 610 | }; |
| 611 | 611 | ||
| 612 | module_spi_driver(mipid_spi_driver); | 612 | module_spi_driver(mipid_spi_driver); |
diff --git a/drivers/video/omap2/displays/panel-acx565akm.c b/drivers/video/omap2/displays/panel-acx565akm.c index 65eb76c840a1..72699f88c002 100644 --- a/drivers/video/omap2/displays/panel-acx565akm.c +++ b/drivers/video/omap2/displays/panel-acx565akm.c | |||
| @@ -777,7 +777,7 @@ static struct spi_driver acx565akm_spi_driver = { | |||
| 777 | .owner = THIS_MODULE, | 777 | .owner = THIS_MODULE, |
| 778 | }, | 778 | }, |
| 779 | .probe = acx565akm_spi_probe, | 779 | .probe = acx565akm_spi_probe, |
| 780 | .remove = __devexit_p(acx565akm_spi_remove), | 780 | .remove = acx565akm_spi_remove, |
| 781 | }; | 781 | }; |
| 782 | 782 | ||
| 783 | module_spi_driver(acx565akm_spi_driver); | 783 | module_spi_driver(acx565akm_spi_driver); |
diff --git a/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c b/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c index ace419b801eb..6e5abe8fd2dd 100644 --- a/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c +++ b/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c | |||
| @@ -216,13 +216,13 @@ static void init_lb035q02_panel(struct spi_device *spi) | |||
| 216 | lb035q02_write_reg(spi, 0x3b, 0x0806); | 216 | lb035q02_write_reg(spi, 0x3b, 0x0806); |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | static int __devinit lb035q02_panel_spi_probe(struct spi_device *spi) | 219 | static int lb035q02_panel_spi_probe(struct spi_device *spi) |
| 220 | { | 220 | { |
| 221 | init_lb035q02_panel(spi); | 221 | init_lb035q02_panel(spi); |
| 222 | return omap_dss_register_driver(&lb035q02_driver); | 222 | return omap_dss_register_driver(&lb035q02_driver); |
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | static int __devexit lb035q02_panel_spi_remove(struct spi_device *spi) | 225 | static int lb035q02_panel_spi_remove(struct spi_device *spi) |
| 226 | { | 226 | { |
| 227 | omap_dss_unregister_driver(&lb035q02_driver); | 227 | omap_dss_unregister_driver(&lb035q02_driver); |
| 228 | return 0; | 228 | return 0; |
| @@ -234,7 +234,7 @@ static struct spi_driver lb035q02_spi_driver = { | |||
| 234 | .owner = THIS_MODULE, | 234 | .owner = THIS_MODULE, |
| 235 | }, | 235 | }, |
| 236 | .probe = lb035q02_panel_spi_probe, | 236 | .probe = lb035q02_panel_spi_probe, |
| 237 | .remove = __devexit_p(lb035q02_panel_spi_remove), | 237 | .remove = lb035q02_panel_spi_remove, |
| 238 | }; | 238 | }; |
| 239 | 239 | ||
| 240 | module_spi_driver(lb035q02_spi_driver); | 240 | module_spi_driver(lb035q02_spi_driver); |
diff --git a/drivers/video/omap2/displays/panel-n8x0.c b/drivers/video/omap2/displays/panel-n8x0.c index d1cb722fcdbc..dd1294750802 100644 --- a/drivers/video/omap2/displays/panel-n8x0.c +++ b/drivers/video/omap2/displays/panel-n8x0.c | |||
| @@ -680,7 +680,7 @@ static struct spi_driver mipid_spi_driver = { | |||
| 680 | .owner = THIS_MODULE, | 680 | .owner = THIS_MODULE, |
| 681 | }, | 681 | }, |
| 682 | .probe = mipid_spi_probe, | 682 | .probe = mipid_spi_probe, |
| 683 | .remove = __devexit_p(mipid_spi_remove), | 683 | .remove = mipid_spi_remove, |
| 684 | }; | 684 | }; |
| 685 | module_spi_driver(mipid_spi_driver); | 685 | module_spi_driver(mipid_spi_driver); |
| 686 | 686 | ||
diff --git a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c index 2a79c283bebe..c4e9c2b1b465 100644 --- a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c +++ b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c | |||
| @@ -323,7 +323,7 @@ static int nec_8048_spi_resume(struct spi_device *spi) | |||
| 323 | 323 | ||
| 324 | static struct spi_driver nec_8048_spi_driver = { | 324 | static struct spi_driver nec_8048_spi_driver = { |
| 325 | .probe = nec_8048_spi_probe, | 325 | .probe = nec_8048_spi_probe, |
| 326 | .remove = __devexit_p(nec_8048_spi_remove), | 326 | .remove = nec_8048_spi_remove, |
| 327 | .suspend = nec_8048_spi_suspend, | 327 | .suspend = nec_8048_spi_suspend, |
| 328 | .resume = nec_8048_spi_resume, | 328 | .resume = nec_8048_spi_resume, |
| 329 | .driver = { | 329 | .driver = { |
diff --git a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c index 316b3da6d2cb..6b6643911d29 100644 --- a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c +++ b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c | |||
| @@ -528,7 +528,7 @@ static int tpo_td043_spi_probe(struct spi_device *spi) | |||
| 528 | return 0; | 528 | return 0; |
| 529 | } | 529 | } |
| 530 | 530 | ||
| 531 | static int __devexit tpo_td043_spi_remove(struct spi_device *spi) | 531 | static int tpo_td043_spi_remove(struct spi_device *spi) |
| 532 | { | 532 | { |
| 533 | struct tpo_td043_device *tpo_td043 = dev_get_drvdata(&spi->dev); | 533 | struct tpo_td043_device *tpo_td043 = dev_get_drvdata(&spi->dev); |
| 534 | 534 | ||
| @@ -580,7 +580,7 @@ static struct spi_driver tpo_td043_spi_driver = { | |||
| 580 | .pm = &tpo_td043_spi_pm, | 580 | .pm = &tpo_td043_spi_pm, |
| 581 | }, | 581 | }, |
| 582 | .probe = tpo_td043_spi_probe, | 582 | .probe = tpo_td043_spi_probe, |
| 583 | .remove = __devexit_p(tpo_td043_spi_remove), | 583 | .remove = tpo_td043_spi_remove, |
| 584 | }; | 584 | }; |
| 585 | 585 | ||
| 586 | module_spi_driver(tpo_td043_spi_driver); | 586 | module_spi_driver(tpo_td043_spi_driver); |
diff --git a/drivers/video/p9100.c b/drivers/video/p9100.c index d57cc58c5168..4b23af6e5c28 100644 --- a/drivers/video/p9100.c +++ b/drivers/video/p9100.c | |||
| @@ -249,7 +249,7 @@ static void p9100_init_fix(struct fb_info *info, int linebytes, struct device_no | |||
| 249 | info->fix.accel = FB_ACCEL_SUN_CGTHREE; | 249 | info->fix.accel = FB_ACCEL_SUN_CGTHREE; |
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | static int __devinit p9100_probe(struct platform_device *op) | 252 | static int p9100_probe(struct platform_device *op) |
| 253 | { | 253 | { |
| 254 | struct device_node *dp = op->dev.of_node; | 254 | struct device_node *dp = op->dev.of_node; |
| 255 | struct fb_info *info; | 255 | struct fb_info *info; |
| @@ -326,7 +326,7 @@ out_err: | |||
| 326 | return err; | 326 | return err; |
| 327 | } | 327 | } |
| 328 | 328 | ||
| 329 | static int __devexit p9100_remove(struct platform_device *op) | 329 | static int p9100_remove(struct platform_device *op) |
| 330 | { | 330 | { |
| 331 | struct fb_info *info = dev_get_drvdata(&op->dev); | 331 | struct fb_info *info = dev_get_drvdata(&op->dev); |
| 332 | struct p9100_par *par = info->par; | 332 | struct p9100_par *par = info->par; |
| @@ -359,7 +359,7 @@ static struct platform_driver p9100_driver = { | |||
| 359 | .of_match_table = p9100_match, | 359 | .of_match_table = p9100_match, |
| 360 | }, | 360 | }, |
| 361 | .probe = p9100_probe, | 361 | .probe = p9100_probe, |
| 362 | .remove = __devexit_p(p9100_remove), | 362 | .remove = p9100_remove, |
| 363 | }; | 363 | }; |
| 364 | 364 | ||
| 365 | static int __init p9100_init(void) | 365 | static int __init p9100_init(void) |
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c index ae3caa6755c2..3d86bac62d3e 100644 --- a/drivers/video/platinumfb.c +++ b/drivers/video/platinumfb.c | |||
| @@ -313,7 +313,8 @@ static void platinum_set_hardware(struct fb_info_platinum *pinfo) | |||
| 313 | /* | 313 | /* |
| 314 | * Set misc info vars for this driver | 314 | * Set misc info vars for this driver |
| 315 | */ | 315 | */ |
| 316 | static void __devinit platinum_init_info(struct fb_info *info, struct fb_info_platinum *pinfo) | 316 | static void platinum_init_info(struct fb_info *info, |
| 317 | struct fb_info_platinum *pinfo) | ||
| 317 | { | 318 | { |
| 318 | /* Fill fb_info */ | 319 | /* Fill fb_info */ |
| 319 | info->fbops = &platinumfb_ops; | 320 | info->fbops = &platinumfb_ops; |
| @@ -338,7 +339,7 @@ static void __devinit platinum_init_info(struct fb_info *info, struct fb_info_pl | |||
| 338 | } | 339 | } |
| 339 | 340 | ||
| 340 | 341 | ||
| 341 | static int __devinit platinum_init_fb(struct fb_info *info) | 342 | static int platinum_init_fb(struct fb_info *info) |
| 342 | { | 343 | { |
| 343 | struct fb_info_platinum *pinfo = info->par; | 344 | struct fb_info_platinum *pinfo = info->par; |
| 344 | struct fb_var_screeninfo var; | 345 | struct fb_var_screeninfo var; |
| @@ -533,7 +534,7 @@ static int __init platinumfb_setup(char *options) | |||
| 533 | #define invalidate_cache(addr) | 534 | #define invalidate_cache(addr) |
| 534 | #endif | 535 | #endif |
| 535 | 536 | ||
| 536 | static int __devinit platinumfb_probe(struct platform_device* odev) | 537 | static int platinumfb_probe(struct platform_device* odev) |
| 537 | { | 538 | { |
| 538 | struct device_node *dp = odev->dev.of_node; | 539 | struct device_node *dp = odev->dev.of_node; |
| 539 | struct fb_info *info; | 540 | struct fb_info *info; |
| @@ -645,7 +646,7 @@ static int __devinit platinumfb_probe(struct platform_device* odev) | |||
| 645 | return rc; | 646 | return rc; |
| 646 | } | 647 | } |
| 647 | 648 | ||
| 648 | static int __devexit platinumfb_remove(struct platform_device* odev) | 649 | static int platinumfb_remove(struct platform_device* odev) |
| 649 | { | 650 | { |
| 650 | struct fb_info *info = dev_get_drvdata(&odev->dev); | 651 | struct fb_info *info = dev_get_drvdata(&odev->dev); |
| 651 | struct fb_info_platinum *pinfo = info->par; | 652 | struct fb_info_platinum *pinfo = info->par; |
| @@ -683,7 +684,7 @@ static struct platform_driver platinum_driver = | |||
| 683 | .of_match_table = platinumfb_match, | 684 | .of_match_table = platinumfb_match, |
| 684 | }, | 685 | }, |
| 685 | .probe = platinumfb_probe, | 686 | .probe = platinumfb_probe, |
| 686 | .remove = __devexit_p(platinumfb_remove), | 687 | .remove = platinumfb_remove, |
| 687 | }; | 688 | }; |
| 688 | 689 | ||
| 689 | static int __init platinumfb_init(void) | 690 | static int __init platinumfb_init(void) |
diff --git a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c index df31a24a5026..81354eeab021 100644 --- a/drivers/video/pm2fb.c +++ b/drivers/video/pm2fb.c | |||
| @@ -67,7 +67,7 @@ | |||
| 67 | * Driver data | 67 | * Driver data |
| 68 | */ | 68 | */ |
| 69 | static int hwcursor = 1; | 69 | static int hwcursor = 1; |
| 70 | static char *mode_option __devinitdata; | 70 | static char *mode_option; |
| 71 | 71 | ||
| 72 | /* | 72 | /* |
| 73 | * The XFree GLINT driver will (I think to implement hardware cursor | 73 | * The XFree GLINT driver will (I think to implement hardware cursor |
| @@ -80,10 +80,10 @@ static char *mode_option __devinitdata; | |||
| 80 | */ | 80 | */ |
| 81 | static bool lowhsync; | 81 | static bool lowhsync; |
| 82 | static bool lowvsync; | 82 | static bool lowvsync; |
| 83 | static bool noaccel __devinitdata; | 83 | static bool noaccel; |
| 84 | /* mtrr option */ | 84 | /* mtrr option */ |
| 85 | #ifdef CONFIG_MTRR | 85 | #ifdef CONFIG_MTRR |
| 86 | static bool nomtrr __devinitdata; | 86 | static bool nomtrr; |
| 87 | #endif | 87 | #endif |
| 88 | 88 | ||
| 89 | /* | 89 | /* |
| @@ -107,7 +107,7 @@ struct pm2fb_par | |||
| 107 | * Here we define the default structs fb_fix_screeninfo and fb_var_screeninfo | 107 | * Here we define the default structs fb_fix_screeninfo and fb_var_screeninfo |
| 108 | * if we don't use modedb. | 108 | * if we don't use modedb. |
| 109 | */ | 109 | */ |
| 110 | static struct fb_fix_screeninfo pm2fb_fix __devinitdata = { | 110 | static struct fb_fix_screeninfo pm2fb_fix = { |
| 111 | .id = "", | 111 | .id = "", |
| 112 | .type = FB_TYPE_PACKED_PIXELS, | 112 | .type = FB_TYPE_PACKED_PIXELS, |
| 113 | .visual = FB_VISUAL_PSEUDOCOLOR, | 113 | .visual = FB_VISUAL_PSEUDOCOLOR, |
| @@ -120,7 +120,7 @@ static struct fb_fix_screeninfo pm2fb_fix __devinitdata = { | |||
| 120 | /* | 120 | /* |
| 121 | * Default video mode. In case the modedb doesn't work. | 121 | * Default video mode. In case the modedb doesn't work. |
| 122 | */ | 122 | */ |
| 123 | static struct fb_var_screeninfo pm2fb_var __devinitdata = { | 123 | static struct fb_var_screeninfo pm2fb_var = { |
| 124 | /* "640x480, 8 bpp @ 60 Hz */ | 124 | /* "640x480, 8 bpp @ 60 Hz */ |
| 125 | .xres = 640, | 125 | .xres = 640, |
| 126 | .yres = 480, | 126 | .yres = 480, |
| @@ -1515,8 +1515,7 @@ static struct fb_ops pm2fb_ops = { | |||
| 1515 | * @param pdev PCI device. | 1515 | * @param pdev PCI device. |
| 1516 | * @param id PCI device ID. | 1516 | * @param id PCI device ID. |
| 1517 | */ | 1517 | */ |
| 1518 | static int __devinit pm2fb_probe(struct pci_dev *pdev, | 1518 | static int pm2fb_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 1519 | const struct pci_device_id *id) | ||
| 1520 | { | 1519 | { |
| 1521 | struct pm2fb_par *default_par; | 1520 | struct pm2fb_par *default_par; |
| 1522 | struct fb_info *info; | 1521 | struct fb_info *info; |
| @@ -1727,7 +1726,7 @@ static int __devinit pm2fb_probe(struct pci_dev *pdev, | |||
| 1727 | * | 1726 | * |
| 1728 | * @param pdev PCI device to clean up. | 1727 | * @param pdev PCI device to clean up. |
| 1729 | */ | 1728 | */ |
| 1730 | static void __devexit pm2fb_remove(struct pci_dev *pdev) | 1729 | static void pm2fb_remove(struct pci_dev *pdev) |
| 1731 | { | 1730 | { |
| 1732 | struct fb_info *info = pci_get_drvdata(pdev); | 1731 | struct fb_info *info = pci_get_drvdata(pdev); |
| 1733 | struct fb_fix_screeninfo *fix = &info->fix; | 1732 | struct fb_fix_screeninfo *fix = &info->fix; |
| @@ -1765,7 +1764,7 @@ static struct pci_driver pm2fb_driver = { | |||
| 1765 | .name = "pm2fb", | 1764 | .name = "pm2fb", |
| 1766 | .id_table = pm2fb_id_table, | 1765 | .id_table = pm2fb_id_table, |
| 1767 | .probe = pm2fb_probe, | 1766 | .probe = pm2fb_probe, |
| 1768 | .remove = __devexit_p(pm2fb_remove), | 1767 | .remove = pm2fb_remove, |
| 1769 | }; | 1768 | }; |
| 1770 | 1769 | ||
| 1771 | MODULE_DEVICE_TABLE(pci, pm2fb_id_table); | 1770 | MODULE_DEVICE_TABLE(pci, pm2fb_id_table); |
diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c index 055e527a8e45..7718faa4a73b 100644 --- a/drivers/video/pm3fb.c +++ b/drivers/video/pm3fb.c | |||
| @@ -56,12 +56,12 @@ | |||
| 56 | * Driver data | 56 | * Driver data |
| 57 | */ | 57 | */ |
| 58 | static int hwcursor = 1; | 58 | static int hwcursor = 1; |
| 59 | static char *mode_option __devinitdata; | 59 | static char *mode_option; |
| 60 | static bool noaccel __devinitdata; | 60 | static bool noaccel; |
| 61 | 61 | ||
| 62 | /* mtrr option */ | 62 | /* mtrr option */ |
| 63 | #ifdef CONFIG_MTRR | 63 | #ifdef CONFIG_MTRR |
| 64 | static bool nomtrr __devinitdata; | 64 | static bool nomtrr; |
| 65 | #endif | 65 | #endif |
| 66 | 66 | ||
| 67 | /* | 67 | /* |
| @@ -84,7 +84,7 @@ struct pm3_par { | |||
| 84 | * if we don't use modedb. If we do use modedb see pm3fb_init how to use it | 84 | * if we don't use modedb. If we do use modedb see pm3fb_init how to use it |
| 85 | * to get a fb_var_screeninfo. Otherwise define a default var as well. | 85 | * to get a fb_var_screeninfo. Otherwise define a default var as well. |
| 86 | */ | 86 | */ |
| 87 | static struct fb_fix_screeninfo pm3fb_fix __devinitdata = { | 87 | static struct fb_fix_screeninfo pm3fb_fix = { |
| 88 | .id = "Permedia3", | 88 | .id = "Permedia3", |
| 89 | .type = FB_TYPE_PACKED_PIXELS, | 89 | .type = FB_TYPE_PACKED_PIXELS, |
| 90 | .visual = FB_VISUAL_PSEUDOCOLOR, | 90 | .visual = FB_VISUAL_PSEUDOCOLOR, |
| @@ -1229,7 +1229,7 @@ static struct fb_ops pm3fb_ops = { | |||
| 1229 | 1229 | ||
| 1230 | /* mmio register are already mapped when this function is called */ | 1230 | /* mmio register are already mapped when this function is called */ |
| 1231 | /* the pm3fb_fix.smem_start is also set */ | 1231 | /* the pm3fb_fix.smem_start is also set */ |
| 1232 | static unsigned long __devinit pm3fb_size_memory(struct pm3_par *par) | 1232 | static unsigned long pm3fb_size_memory(struct pm3_par *par) |
| 1233 | { | 1233 | { |
| 1234 | unsigned long memsize = 0; | 1234 | unsigned long memsize = 0; |
| 1235 | unsigned long tempBypass, i, temp1, temp2; | 1235 | unsigned long tempBypass, i, temp1, temp2; |
| @@ -1314,8 +1314,7 @@ static unsigned long __devinit pm3fb_size_memory(struct pm3_par *par) | |||
| 1314 | return memsize; | 1314 | return memsize; |
| 1315 | } | 1315 | } |
| 1316 | 1316 | ||
| 1317 | static int __devinit pm3fb_probe(struct pci_dev *dev, | 1317 | static int pm3fb_probe(struct pci_dev *dev, const struct pci_device_id *ent) |
| 1318 | const struct pci_device_id *ent) | ||
| 1319 | { | 1318 | { |
| 1320 | struct fb_info *info; | 1319 | struct fb_info *info; |
| 1321 | struct pm3_par *par; | 1320 | struct pm3_par *par; |
| @@ -1469,7 +1468,7 @@ static int __devinit pm3fb_probe(struct pci_dev *dev, | |||
| 1469 | /* | 1468 | /* |
| 1470 | * Cleanup | 1469 | * Cleanup |
| 1471 | */ | 1470 | */ |
| 1472 | static void __devexit pm3fb_remove(struct pci_dev *dev) | 1471 | static void pm3fb_remove(struct pci_dev *dev) |
| 1473 | { | 1472 | { |
| 1474 | struct fb_info *info = pci_get_drvdata(dev); | 1473 | struct fb_info *info = pci_get_drvdata(dev); |
| 1475 | 1474 | ||
| @@ -1507,7 +1506,7 @@ static struct pci_driver pm3fb_driver = { | |||
| 1507 | .name = "pm3fb", | 1506 | .name = "pm3fb", |
| 1508 | .id_table = pm3fb_id_table, | 1507 | .id_table = pm3fb_id_table, |
| 1509 | .probe = pm3fb_probe, | 1508 | .probe = pm3fb_probe, |
| 1510 | .remove = __devexit_p(pm3fb_remove), | 1509 | .remove = pm3fb_remove, |
| 1511 | }; | 1510 | }; |
| 1512 | 1511 | ||
| 1513 | MODULE_DEVICE_TABLE(pci, pm3fb_id_table); | 1512 | MODULE_DEVICE_TABLE(pci, pm3fb_id_table); |
diff --git a/drivers/video/pmag-ba-fb.c b/drivers/video/pmag-ba-fb.c index 9b4a60b52a4c..d1e46cedb1f7 100644 --- a/drivers/video/pmag-ba-fb.c +++ b/drivers/video/pmag-ba-fb.c | |||
| @@ -43,7 +43,7 @@ struct pmagbafb_par { | |||
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| 45 | 45 | ||
| 46 | static struct fb_var_screeninfo pmagbafb_defined __devinitdata = { | 46 | static struct fb_var_screeninfo pmagbafb_defined = { |
| 47 | .xres = 1024, | 47 | .xres = 1024, |
| 48 | .yres = 864, | 48 | .yres = 864, |
| 49 | .xres_virtual = 1024, | 49 | .xres_virtual = 1024, |
| @@ -67,7 +67,7 @@ static struct fb_var_screeninfo pmagbafb_defined __devinitdata = { | |||
| 67 | .vmode = FB_VMODE_NONINTERLACED, | 67 | .vmode = FB_VMODE_NONINTERLACED, |
| 68 | }; | 68 | }; |
| 69 | 69 | ||
| 70 | static struct fb_fix_screeninfo pmagbafb_fix __devinitdata = { | 70 | static struct fb_fix_screeninfo pmagbafb_fix = { |
| 71 | .id = "PMAG-BA", | 71 | .id = "PMAG-BA", |
| 72 | .smem_len = (1024 * 1024), | 72 | .smem_len = (1024 * 1024), |
| 73 | .type = FB_TYPE_PACKED_PIXELS, | 73 | .type = FB_TYPE_PACKED_PIXELS, |
| @@ -141,7 +141,7 @@ static void __init pmagbafb_erase_cursor(struct fb_info *info) | |||
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | 143 | ||
| 144 | static int __devinit pmagbafb_probe(struct device *dev) | 144 | static int pmagbafb_probe(struct device *dev) |
| 145 | { | 145 | { |
| 146 | struct tc_dev *tdev = to_tc_dev(dev); | 146 | struct tc_dev *tdev = to_tc_dev(dev); |
| 147 | resource_size_t start, len; | 147 | resource_size_t start, len; |
diff --git a/drivers/video/pmagb-b-fb.c b/drivers/video/pmagb-b-fb.c index 4e7a9c46e112..0e1317400328 100644 --- a/drivers/video/pmagb-b-fb.c +++ b/drivers/video/pmagb-b-fb.c | |||
| @@ -44,7 +44,7 @@ struct pmagbbfb_par { | |||
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | 46 | ||
| 47 | static struct fb_var_screeninfo pmagbbfb_defined __devinitdata = { | 47 | static struct fb_var_screeninfo pmagbbfb_defined = { |
| 48 | .bits_per_pixel = 8, | 48 | .bits_per_pixel = 8, |
| 49 | .red.length = 8, | 49 | .red.length = 8, |
| 50 | .green.length = 8, | 50 | .green.length = 8, |
| @@ -57,7 +57,7 @@ static struct fb_var_screeninfo pmagbbfb_defined __devinitdata = { | |||
| 57 | .vmode = FB_VMODE_NONINTERLACED, | 57 | .vmode = FB_VMODE_NONINTERLACED, |
| 58 | }; | 58 | }; |
| 59 | 59 | ||
| 60 | static struct fb_fix_screeninfo pmagbbfb_fix __devinitdata = { | 60 | static struct fb_fix_screeninfo pmagbbfb_fix = { |
| 61 | .id = "PMAGB-BA", | 61 | .id = "PMAGB-BA", |
| 62 | .smem_len = (2048 * 1024), | 62 | .smem_len = (2048 * 1024), |
| 63 | .type = FB_TYPE_PACKED_PIXELS, | 63 | .type = FB_TYPE_PACKED_PIXELS, |
| @@ -147,7 +147,7 @@ static void __init pmagbbfb_erase_cursor(struct fb_info *info) | |||
| 147 | /* | 147 | /* |
| 148 | * Set up screen parameters. | 148 | * Set up screen parameters. |
| 149 | */ | 149 | */ |
| 150 | static void __devinit pmagbbfb_screen_setup(struct fb_info *info) | 150 | static void pmagbbfb_screen_setup(struct fb_info *info) |
| 151 | { | 151 | { |
| 152 | struct pmagbbfb_par *par = info->par; | 152 | struct pmagbbfb_par *par = info->par; |
| 153 | 153 | ||
| @@ -179,9 +179,9 @@ static void __devinit pmagbbfb_screen_setup(struct fb_info *info) | |||
| 179 | /* | 179 | /* |
| 180 | * Determine oscillator configuration. | 180 | * Determine oscillator configuration. |
| 181 | */ | 181 | */ |
| 182 | static void __devinit pmagbbfb_osc_setup(struct fb_info *info) | 182 | static void pmagbbfb_osc_setup(struct fb_info *info) |
| 183 | { | 183 | { |
| 184 | static unsigned int pmagbbfb_freqs[] __devinitdata = { | 184 | static unsigned int pmagbbfb_freqs[] = { |
| 185 | 130808, 119843, 104000, 92980, 74370, 72800, | 185 | 130808, 119843, 104000, 92980, 74370, 72800, |
| 186 | 69197, 66000, 65000, 50350, 36000, 32000, 25175 | 186 | 69197, 66000, 65000, 50350, 36000, 32000, 25175 |
| 187 | }; | 187 | }; |
| @@ -246,7 +246,7 @@ static void __devinit pmagbbfb_osc_setup(struct fb_info *info) | |||
| 246 | }; | 246 | }; |
| 247 | 247 | ||
| 248 | 248 | ||
| 249 | static int __devinit pmagbbfb_probe(struct device *dev) | 249 | static int pmagbbfb_probe(struct device *dev) |
| 250 | { | 250 | { |
| 251 | struct tc_dev *tdev = to_tc_dev(dev); | 251 | struct tc_dev *tdev = to_tc_dev(dev); |
| 252 | resource_size_t start, len; | 252 | resource_size_t start, len; |
diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c index 0b340d6ff8a4..920c27bf3947 100644 --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c | |||
| @@ -259,7 +259,7 @@ static const struct fb_videomode ps3fb_modedb[] = { | |||
| 259 | static int ps3fb_mode; | 259 | static int ps3fb_mode; |
| 260 | module_param(ps3fb_mode, int, 0); | 260 | module_param(ps3fb_mode, int, 0); |
| 261 | 261 | ||
| 262 | static char *mode_option __devinitdata; | 262 | static char *mode_option; |
| 263 | 263 | ||
| 264 | static int ps3fb_cmp_mode(const struct fb_videomode *vmode, | 264 | static int ps3fb_cmp_mode(const struct fb_videomode *vmode, |
| 265 | const struct fb_var_screeninfo *var) | 265 | const struct fb_var_screeninfo *var) |
| @@ -965,7 +965,7 @@ static struct fb_fix_screeninfo ps3fb_fix __initdata = { | |||
| 965 | .accel = FB_ACCEL_NONE, | 965 | .accel = FB_ACCEL_NONE, |
| 966 | }; | 966 | }; |
| 967 | 967 | ||
| 968 | static int __devinit ps3fb_probe(struct ps3_system_bus_device *dev) | 968 | static int ps3fb_probe(struct ps3_system_bus_device *dev) |
| 969 | { | 969 | { |
| 970 | struct fb_info *info; | 970 | struct fb_info *info; |
| 971 | struct ps3fb_par *par; | 971 | struct ps3fb_par *par; |
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c index bcd44c32a2ed..df07860563e6 100644 --- a/drivers/video/pvr2fb.c +++ b/drivers/video/pvr2fb.c | |||
| @@ -112,11 +112,11 @@ enum { VO_PAL, VO_NTSC, VO_VGA }; | |||
| 112 | enum { PAL_ARGB1555, PAL_RGB565, PAL_ARGB4444, PAL_ARGB8888 }; | 112 | enum { PAL_ARGB1555, PAL_RGB565, PAL_ARGB4444, PAL_ARGB8888 }; |
| 113 | 113 | ||
| 114 | struct pvr2_params { unsigned int val; char *name; }; | 114 | struct pvr2_params { unsigned int val; char *name; }; |
| 115 | static struct pvr2_params cables[] __devinitdata = { | 115 | static struct pvr2_params cables[] = { |
| 116 | { CT_VGA, "VGA" }, { CT_RGB, "RGB" }, { CT_COMPOSITE, "COMPOSITE" }, | 116 | { CT_VGA, "VGA" }, { CT_RGB, "RGB" }, { CT_COMPOSITE, "COMPOSITE" }, |
| 117 | }; | 117 | }; |
| 118 | 118 | ||
| 119 | static struct pvr2_params outputs[] __devinitdata = { | 119 | static struct pvr2_params outputs[] = { |
| 120 | { VO_PAL, "PAL" }, { VO_NTSC, "NTSC" }, { VO_VGA, "VGA" }, | 120 | { VO_PAL, "PAL" }, { VO_NTSC, "NTSC" }, { VO_VGA, "VGA" }, |
| 121 | }; | 121 | }; |
| 122 | 122 | ||
| @@ -145,7 +145,7 @@ static struct pvr2fb_par { | |||
| 145 | 145 | ||
| 146 | static struct fb_info *fb_info; | 146 | static struct fb_info *fb_info; |
| 147 | 147 | ||
| 148 | static struct fb_fix_screeninfo pvr2_fix __devinitdata = { | 148 | static struct fb_fix_screeninfo pvr2_fix = { |
| 149 | .id = "NEC PowerVR2", | 149 | .id = "NEC PowerVR2", |
| 150 | .type = FB_TYPE_PACKED_PIXELS, | 150 | .type = FB_TYPE_PACKED_PIXELS, |
| 151 | .visual = FB_VISUAL_TRUECOLOR, | 151 | .visual = FB_VISUAL_TRUECOLOR, |
| @@ -154,7 +154,7 @@ static struct fb_fix_screeninfo pvr2_fix __devinitdata = { | |||
| 154 | .accel = FB_ACCEL_NONE, | 154 | .accel = FB_ACCEL_NONE, |
| 155 | }; | 155 | }; |
| 156 | 156 | ||
| 157 | static struct fb_var_screeninfo pvr2_var __devinitdata = { | 157 | static struct fb_var_screeninfo pvr2_var = { |
| 158 | .xres = 640, | 158 | .xres = 640, |
| 159 | .yres = 480, | 159 | .yres = 480, |
| 160 | .xres_virtual = 640, | 160 | .xres_virtual = 640, |
| @@ -226,7 +226,7 @@ static struct fb_ops pvr2fb_ops = { | |||
| 226 | .fb_imageblit = cfb_imageblit, | 226 | .fb_imageblit = cfb_imageblit, |
| 227 | }; | 227 | }; |
| 228 | 228 | ||
| 229 | static struct fb_videomode pvr2_modedb[] __devinitdata = { | 229 | static struct fb_videomode pvr2_modedb[] = { |
| 230 | /* | 230 | /* |
| 231 | * Broadcast video modes (PAL and NTSC). I'm unfamiliar with | 231 | * Broadcast video modes (PAL and NTSC). I'm unfamiliar with |
| 232 | * PAL-M and PAL-N, but from what I've read both modes parallel PAL and | 232 | * PAL-M and PAL-N, but from what I've read both modes parallel PAL and |
| @@ -256,7 +256,7 @@ static struct fb_videomode pvr2_modedb[] __devinitdata = { | |||
| 256 | #define DEFMODE_VGA 2 | 256 | #define DEFMODE_VGA 2 |
| 257 | 257 | ||
| 258 | static int defmode = DEFMODE_NTSC; | 258 | static int defmode = DEFMODE_NTSC; |
| 259 | static char *mode_option __devinitdata = NULL; | 259 | static char *mode_option = NULL; |
| 260 | 260 | ||
| 261 | static inline void pvr2fb_set_pal_type(unsigned int type) | 261 | static inline void pvr2fb_set_pal_type(unsigned int type) |
| 262 | { | 262 | { |
| @@ -763,7 +763,7 @@ out_unmap: | |||
| 763 | * in for flexibility anyways. Who knows, maybe someone has tv-out on a | 763 | * in for flexibility anyways. Who knows, maybe someone has tv-out on a |
| 764 | * PCI-based version of these things ;-) | 764 | * PCI-based version of these things ;-) |
| 765 | */ | 765 | */ |
| 766 | static int __devinit pvr2fb_common_init(void) | 766 | static int pvr2fb_common_init(void) |
| 767 | { | 767 | { |
| 768 | struct pvr2fb_par *par = currentpar; | 768 | struct pvr2fb_par *par = currentpar; |
| 769 | unsigned long modememused, rev; | 769 | unsigned long modememused, rev; |
| @@ -922,8 +922,8 @@ static void __exit pvr2fb_dc_exit(void) | |||
| 922 | #endif /* CONFIG_SH_DREAMCAST */ | 922 | #endif /* CONFIG_SH_DREAMCAST */ |
| 923 | 923 | ||
| 924 | #ifdef CONFIG_PCI | 924 | #ifdef CONFIG_PCI |
| 925 | static int __devinit pvr2fb_pci_probe(struct pci_dev *pdev, | 925 | static int pvr2fb_pci_probe(struct pci_dev *pdev, |
| 926 | const struct pci_device_id *ent) | 926 | const struct pci_device_id *ent) |
| 927 | { | 927 | { |
| 928 | int ret; | 928 | int ret; |
| 929 | 929 | ||
| @@ -953,7 +953,7 @@ static int __devinit pvr2fb_pci_probe(struct pci_dev *pdev, | |||
| 953 | return pvr2fb_common_init(); | 953 | return pvr2fb_common_init(); |
| 954 | } | 954 | } |
| 955 | 955 | ||
| 956 | static void __devexit pvr2fb_pci_remove(struct pci_dev *pdev) | 956 | static void pvr2fb_pci_remove(struct pci_dev *pdev) |
| 957 | { | 957 | { |
| 958 | if (fb_info->screen_base) { | 958 | if (fb_info->screen_base) { |
| 959 | iounmap(fb_info->screen_base); | 959 | iounmap(fb_info->screen_base); |
| @@ -967,7 +967,7 @@ static void __devexit pvr2fb_pci_remove(struct pci_dev *pdev) | |||
| 967 | pci_release_regions(pdev); | 967 | pci_release_regions(pdev); |
| 968 | } | 968 | } |
| 969 | 969 | ||
| 970 | static struct pci_device_id pvr2fb_pci_tbl[] __devinitdata = { | 970 | static struct pci_device_id pvr2fb_pci_tbl[] = { |
| 971 | { PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_NEON250, | 971 | { PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_NEON250, |
| 972 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 972 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
| 973 | { 0, }, | 973 | { 0, }, |
| @@ -979,7 +979,7 @@ static struct pci_driver pvr2fb_pci_driver = { | |||
| 979 | .name = "pvr2fb", | 979 | .name = "pvr2fb", |
| 980 | .id_table = pvr2fb_pci_tbl, | 980 | .id_table = pvr2fb_pci_tbl, |
| 981 | .probe = pvr2fb_pci_probe, | 981 | .probe = pvr2fb_pci_probe, |
| 982 | .remove = __devexit_p(pvr2fb_pci_remove), | 982 | .remove = pvr2fb_pci_remove, |
| 983 | }; | 983 | }; |
| 984 | 984 | ||
| 985 | static int __init pvr2fb_pci_init(void) | 985 | static int __init pvr2fb_pci_init(void) |
| @@ -993,8 +993,8 @@ static void __exit pvr2fb_pci_exit(void) | |||
| 993 | } | 993 | } |
| 994 | #endif /* CONFIG_PCI */ | 994 | #endif /* CONFIG_PCI */ |
| 995 | 995 | ||
| 996 | static int __devinit pvr2_get_param(const struct pvr2_params *p, const char *s, | 996 | static int pvr2_get_param(const struct pvr2_params *p, const char *s, int val, |
| 997 | int val, int size) | 997 | int size) |
| 998 | { | 998 | { |
| 999 | int i; | 999 | int i; |
| 1000 | 1000 | ||
diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c index f146089261f4..aa9bd1f76d60 100644 --- a/drivers/video/pxa168fb.c +++ b/drivers/video/pxa168fb.c | |||
| @@ -560,7 +560,7 @@ static struct fb_ops pxa168fb_ops = { | |||
| 560 | .fb_imageblit = cfb_imageblit, | 560 | .fb_imageblit = cfb_imageblit, |
| 561 | }; | 561 | }; |
| 562 | 562 | ||
| 563 | static int __devinit pxa168fb_init_mode(struct fb_info *info, | 563 | static int pxa168fb_init_mode(struct fb_info *info, |
| 564 | struct pxa168fb_mach_info *mi) | 564 | struct pxa168fb_mach_info *mi) |
| 565 | { | 565 | { |
| 566 | struct pxa168fb_info *fbi = info->par; | 566 | struct pxa168fb_info *fbi = info->par; |
| @@ -600,7 +600,7 @@ static int __devinit pxa168fb_init_mode(struct fb_info *info, | |||
| 600 | return ret; | 600 | return ret; |
| 601 | } | 601 | } |
| 602 | 602 | ||
| 603 | static int __devinit pxa168fb_probe(struct platform_device *pdev) | 603 | static int pxa168fb_probe(struct platform_device *pdev) |
| 604 | { | 604 | { |
| 605 | struct pxa168fb_mach_info *mi; | 605 | struct pxa168fb_mach_info *mi; |
| 606 | struct fb_info *info = 0; | 606 | struct fb_info *info = 0; |
| @@ -783,7 +783,7 @@ failed_put_clk: | |||
| 783 | return ret; | 783 | return ret; |
| 784 | } | 784 | } |
| 785 | 785 | ||
| 786 | static int __devexit pxa168fb_remove(struct platform_device *pdev) | 786 | static int pxa168fb_remove(struct platform_device *pdev) |
| 787 | { | 787 | { |
| 788 | struct pxa168fb_info *fbi = platform_get_drvdata(pdev); | 788 | struct pxa168fb_info *fbi = platform_get_drvdata(pdev); |
| 789 | struct fb_info *info; | 789 | struct fb_info *info; |
| @@ -826,7 +826,7 @@ static struct platform_driver pxa168fb_driver = { | |||
| 826 | .owner = THIS_MODULE, | 826 | .owner = THIS_MODULE, |
| 827 | }, | 827 | }, |
| 828 | .probe = pxa168fb_probe, | 828 | .probe = pxa168fb_probe, |
| 829 | .remove = __devexit_p(pxa168fb_remove), | 829 | .remove = pxa168fb_remove, |
| 830 | }; | 830 | }; |
| 831 | 831 | ||
| 832 | module_platform_driver(pxa168fb_driver); | 832 | module_platform_driver(pxa168fb_driver); |
diff --git a/drivers/video/pxa3xx-gcu.c b/drivers/video/pxa3xx-gcu.c index 0b4ae0cebeda..6c984eacc7e3 100644 --- a/drivers/video/pxa3xx-gcu.c +++ b/drivers/video/pxa3xx-gcu.c | |||
| @@ -574,8 +574,7 @@ free_buffers(struct platform_device *dev, | |||
| 574 | priv->free = NULL; | 574 | priv->free = NULL; |
| 575 | } | 575 | } |
| 576 | 576 | ||
| 577 | static int __devinit | 577 | static int pxa3xx_gcu_probe(struct platform_device *dev) |
| 578 | pxa3xx_gcu_probe(struct platform_device *dev) | ||
| 579 | { | 578 | { |
| 580 | int i, ret, irq; | 579 | int i, ret, irq; |
| 581 | struct resource *r; | 580 | struct resource *r; |
| @@ -714,8 +713,7 @@ err_free_priv: | |||
| 714 | return ret; | 713 | return ret; |
| 715 | } | 714 | } |
| 716 | 715 | ||
| 717 | static int __devexit | 716 | static int pxa3xx_gcu_remove(struct platform_device *dev) |
| 718 | pxa3xx_gcu_remove(struct platform_device *dev) | ||
| 719 | { | 717 | { |
| 720 | struct pxa3xx_gcu_priv *priv = platform_get_drvdata(dev); | 718 | struct pxa3xx_gcu_priv *priv = platform_get_drvdata(dev); |
| 721 | struct resource *r = priv->resource_mem; | 719 | struct resource *r = priv->resource_mem; |
| @@ -737,7 +735,7 @@ pxa3xx_gcu_remove(struct platform_device *dev) | |||
| 737 | 735 | ||
| 738 | static struct platform_driver pxa3xx_gcu_driver = { | 736 | static struct platform_driver pxa3xx_gcu_driver = { |
| 739 | .probe = pxa3xx_gcu_probe, | 737 | .probe = pxa3xx_gcu_probe, |
| 740 | .remove = __devexit_p(pxa3xx_gcu_remove), | 738 | .remove = pxa3xx_gcu_remove, |
| 741 | .driver = { | 739 | .driver = { |
| 742 | .owner = THIS_MODULE, | 740 | .owner = THIS_MODULE, |
| 743 | .name = DRV_NAME, | 741 | .name = DRV_NAME, |
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 4fa2ad43fd97..580f80cc586f 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
| @@ -869,8 +869,8 @@ static struct fb_ops overlay_fb_ops = { | |||
| 869 | .fb_set_par = overlayfb_set_par, | 869 | .fb_set_par = overlayfb_set_par, |
| 870 | }; | 870 | }; |
| 871 | 871 | ||
| 872 | static void __devinit init_pxafb_overlay(struct pxafb_info *fbi, | 872 | static void init_pxafb_overlay(struct pxafb_info *fbi, struct pxafb_layer *ofb, |
| 873 | struct pxafb_layer *ofb, int id) | 873 | int id) |
| 874 | { | 874 | { |
| 875 | sprintf(ofb->fb.fix.id, "overlay%d", id + 1); | 875 | sprintf(ofb->fb.fix.id, "overlay%d", id + 1); |
| 876 | 876 | ||
| @@ -903,8 +903,8 @@ static inline int pxafb_overlay_supported(void) | |||
| 903 | return 0; | 903 | return 0; |
| 904 | } | 904 | } |
| 905 | 905 | ||
| 906 | static int __devinit pxafb_overlay_map_video_memory(struct pxafb_info *pxafb, | 906 | static int pxafb_overlay_map_video_memory(struct pxafb_info *pxafb, |
| 907 | struct pxafb_layer *ofb) | 907 | struct pxafb_layer *ofb) |
| 908 | { | 908 | { |
| 909 | /* We assume that user will use at most video_mem_size for overlay fb, | 909 | /* We assume that user will use at most video_mem_size for overlay fb, |
| 910 | * anyway, it's useless to use 16bpp main plane and 24bpp overlay | 910 | * anyway, it's useless to use 16bpp main plane and 24bpp overlay |
| @@ -927,7 +927,7 @@ static int __devinit pxafb_overlay_map_video_memory(struct pxafb_info *pxafb, | |||
| 927 | return 0; | 927 | return 0; |
| 928 | } | 928 | } |
| 929 | 929 | ||
| 930 | static void __devinit pxafb_overlay_init(struct pxafb_info *fbi) | 930 | static void pxafb_overlay_init(struct pxafb_info *fbi) |
| 931 | { | 931 | { |
| 932 | int i, ret; | 932 | int i, ret; |
| 933 | 933 | ||
| @@ -959,7 +959,7 @@ static void __devinit pxafb_overlay_init(struct pxafb_info *fbi) | |||
| 959 | pr_info("PXA Overlay driver loaded successfully!\n"); | 959 | pr_info("PXA Overlay driver loaded successfully!\n"); |
| 960 | } | 960 | } |
| 961 | 961 | ||
| 962 | static void __devexit pxafb_overlay_exit(struct pxafb_info *fbi) | 962 | static void pxafb_overlay_exit(struct pxafb_info *fbi) |
| 963 | { | 963 | { |
| 964 | int i; | 964 | int i; |
| 965 | 965 | ||
| @@ -1706,7 +1706,7 @@ static const struct dev_pm_ops pxafb_pm_ops = { | |||
| 1706 | }; | 1706 | }; |
| 1707 | #endif | 1707 | #endif |
| 1708 | 1708 | ||
| 1709 | static int __devinit pxafb_init_video_memory(struct pxafb_info *fbi) | 1709 | static int pxafb_init_video_memory(struct pxafb_info *fbi) |
| 1710 | { | 1710 | { |
| 1711 | int size = PAGE_ALIGN(fbi->video_mem_size); | 1711 | int size = PAGE_ALIGN(fbi->video_mem_size); |
| 1712 | 1712 | ||
| @@ -1789,7 +1789,7 @@ decode_mode: | |||
| 1789 | fbi->video_mem_size = video_mem_size; | 1789 | fbi->video_mem_size = video_mem_size; |
| 1790 | } | 1790 | } |
| 1791 | 1791 | ||
| 1792 | static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev) | 1792 | static struct pxafb_info *pxafb_init_fbinfo(struct device *dev) |
| 1793 | { | 1793 | { |
| 1794 | struct pxafb_info *fbi; | 1794 | struct pxafb_info *fbi; |
| 1795 | void *addr; | 1795 | void *addr; |
| @@ -1853,7 +1853,7 @@ static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev) | |||
| 1853 | } | 1853 | } |
| 1854 | 1854 | ||
| 1855 | #ifdef CONFIG_FB_PXA_PARAMETERS | 1855 | #ifdef CONFIG_FB_PXA_PARAMETERS |
| 1856 | static int __devinit parse_opt_mode(struct device *dev, const char *this_opt) | 1856 | static int parse_opt_mode(struct device *dev, const char *this_opt) |
| 1857 | { | 1857 | { |
| 1858 | struct pxafb_mach_info *inf = dev->platform_data; | 1858 | struct pxafb_mach_info *inf = dev->platform_data; |
| 1859 | 1859 | ||
| @@ -1912,7 +1912,7 @@ done: | |||
| 1912 | return 0; | 1912 | return 0; |
| 1913 | } | 1913 | } |
| 1914 | 1914 | ||
| 1915 | static int __devinit parse_opt(struct device *dev, char *this_opt) | 1915 | static int parse_opt(struct device *dev, char *this_opt) |
| 1916 | { | 1916 | { |
| 1917 | struct pxafb_mach_info *inf = dev->platform_data; | 1917 | struct pxafb_mach_info *inf = dev->platform_data; |
| 1918 | struct pxafb_mode_info *mode = &inf->modes[0]; | 1918 | struct pxafb_mode_info *mode = &inf->modes[0]; |
| @@ -2012,7 +2012,7 @@ static int __devinit parse_opt(struct device *dev, char *this_opt) | |||
| 2012 | return 0; | 2012 | return 0; |
| 2013 | } | 2013 | } |
| 2014 | 2014 | ||
| 2015 | static int __devinit pxafb_parse_options(struct device *dev, char *options) | 2015 | static int pxafb_parse_options(struct device *dev, char *options) |
| 2016 | { | 2016 | { |
| 2017 | char *this_opt; | 2017 | char *this_opt; |
| 2018 | int ret; | 2018 | int ret; |
| @@ -2031,7 +2031,7 @@ static int __devinit pxafb_parse_options(struct device *dev, char *options) | |||
| 2031 | return 0; | 2031 | return 0; |
| 2032 | } | 2032 | } |
| 2033 | 2033 | ||
| 2034 | static char g_options[256] __devinitdata = ""; | 2034 | static char g_options[256] = ""; |
| 2035 | 2035 | ||
| 2036 | #ifndef MODULE | 2036 | #ifndef MODULE |
| 2037 | static int __init pxafb_setup_options(void) | 2037 | static int __init pxafb_setup_options(void) |
| @@ -2061,8 +2061,7 @@ MODULE_PARM_DESC(options, "LCD parameters (see Documentation/fb/pxafb.txt)"); | |||
| 2061 | #ifdef DEBUG_VAR | 2061 | #ifdef DEBUG_VAR |
| 2062 | /* Check for various illegal bit-combinations. Currently only | 2062 | /* Check for various illegal bit-combinations. Currently only |
| 2063 | * a warning is given. */ | 2063 | * a warning is given. */ |
| 2064 | static void __devinit pxafb_check_options(struct device *dev, | 2064 | static void pxafb_check_options(struct device *dev, struct pxafb_mach_info *inf) |
| 2065 | struct pxafb_mach_info *inf) | ||
| 2066 | { | 2065 | { |
| 2067 | if (inf->lcd_conn) | 2066 | if (inf->lcd_conn) |
| 2068 | return; | 2067 | return; |
| @@ -2094,7 +2093,7 @@ static void __devinit pxafb_check_options(struct device *dev, | |||
| 2094 | #define pxafb_check_options(...) do {} while (0) | 2093 | #define pxafb_check_options(...) do {} while (0) |
| 2095 | #endif | 2094 | #endif |
| 2096 | 2095 | ||
| 2097 | static int __devinit pxafb_probe(struct platform_device *dev) | 2096 | static int pxafb_probe(struct platform_device *dev) |
| 2098 | { | 2097 | { |
| 2099 | struct pxafb_info *fbi; | 2098 | struct pxafb_info *fbi; |
| 2100 | struct pxafb_mach_info *inf; | 2099 | struct pxafb_mach_info *inf; |
| @@ -2263,7 +2262,7 @@ failed: | |||
| 2263 | return ret; | 2262 | return ret; |
| 2264 | } | 2263 | } |
| 2265 | 2264 | ||
| 2266 | static int __devexit pxafb_remove(struct platform_device *dev) | 2265 | static int pxafb_remove(struct platform_device *dev) |
| 2267 | { | 2266 | { |
| 2268 | struct pxafb_info *fbi = platform_get_drvdata(dev); | 2267 | struct pxafb_info *fbi = platform_get_drvdata(dev); |
| 2269 | struct resource *r; | 2268 | struct resource *r; |
| @@ -2304,7 +2303,7 @@ static int __devexit pxafb_remove(struct platform_device *dev) | |||
| 2304 | 2303 | ||
| 2305 | static struct platform_driver pxafb_driver = { | 2304 | static struct platform_driver pxafb_driver = { |
| 2306 | .probe = pxafb_probe, | 2305 | .probe = pxafb_probe, |
| 2307 | .remove = __devexit_p(pxafb_remove), | 2306 | .remove = pxafb_remove, |
| 2308 | .driver = { | 2307 | .driver = { |
| 2309 | .owner = THIS_MODULE, | 2308 | .owner = THIS_MODULE, |
| 2310 | .name = "pxa2xx-fb", | 2309 | .name = "pxa2xx-fb", |
diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c index a104e8cd2f54..d44c7351de0f 100644 --- a/drivers/video/q40fb.c +++ b/drivers/video/q40fb.c | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | #define Q40_PHYS_SCREEN_ADDR 0xFE800000 | 28 | #define Q40_PHYS_SCREEN_ADDR 0xFE800000 |
| 29 | 29 | ||
| 30 | static struct fb_fix_screeninfo q40fb_fix __devinitdata = { | 30 | static struct fb_fix_screeninfo q40fb_fix = { |
| 31 | .id = "Q40", | 31 | .id = "Q40", |
| 32 | .smem_len = 1024*1024, | 32 | .smem_len = 1024*1024, |
| 33 | .type = FB_TYPE_PACKED_PIXELS, | 33 | .type = FB_TYPE_PACKED_PIXELS, |
| @@ -36,7 +36,7 @@ static struct fb_fix_screeninfo q40fb_fix __devinitdata = { | |||
| 36 | .accel = FB_ACCEL_NONE, | 36 | .accel = FB_ACCEL_NONE, |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | static struct fb_var_screeninfo q40fb_var __devinitdata = { | 39 | static struct fb_var_screeninfo q40fb_var = { |
| 40 | .xres = 1024, | 40 | .xres = 1024, |
| 41 | .yres = 512, | 41 | .yres = 512, |
| 42 | .xres_virtual = 1024, | 42 | .xres_virtual = 1024, |
| @@ -83,7 +83,7 @@ static struct fb_ops q40fb_ops = { | |||
| 83 | .fb_imageblit = cfb_imageblit, | 83 | .fb_imageblit = cfb_imageblit, |
| 84 | }; | 84 | }; |
| 85 | 85 | ||
| 86 | static int __devinit q40fb_probe(struct platform_device *dev) | 86 | static int q40fb_probe(struct platform_device *dev) |
| 87 | { | 87 | { |
| 88 | struct fb_info *info; | 88 | struct fb_info *info; |
| 89 | 89 | ||
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index 90df1a60bd16..9536715b5a1b 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c | |||
| @@ -205,28 +205,28 @@ MODULE_DEVICE_TABLE(pci, rivafb_pci_tbl); | |||
| 205 | * ------------------------------------------------------------------------- */ | 205 | * ------------------------------------------------------------------------- */ |
| 206 | 206 | ||
| 207 | /* command line data, set in rivafb_setup() */ | 207 | /* command line data, set in rivafb_setup() */ |
| 208 | static int flatpanel __devinitdata = -1; /* Autodetect later */ | 208 | static int flatpanel = -1; /* Autodetect later */ |
| 209 | static int forceCRTC __devinitdata = -1; | 209 | static int forceCRTC = -1; |
| 210 | static bool noaccel __devinitdata = 0; | 210 | static bool noaccel = 0; |
| 211 | #ifdef CONFIG_MTRR | 211 | #ifdef CONFIG_MTRR |
| 212 | static bool nomtrr __devinitdata = 0; | 212 | static bool nomtrr = 0; |
| 213 | #endif | 213 | #endif |
| 214 | #ifdef CONFIG_PMAC_BACKLIGHT | 214 | #ifdef CONFIG_PMAC_BACKLIGHT |
| 215 | static int backlight __devinitdata = 1; | 215 | static int backlight = 1; |
| 216 | #else | 216 | #else |
| 217 | static int backlight __devinitdata = 0; | 217 | static int backlight = 0; |
| 218 | #endif | 218 | #endif |
| 219 | 219 | ||
| 220 | static char *mode_option __devinitdata = NULL; | 220 | static char *mode_option = NULL; |
| 221 | static bool strictmode = 0; | 221 | static bool strictmode = 0; |
| 222 | 222 | ||
| 223 | static struct fb_fix_screeninfo __devinitdata rivafb_fix = { | 223 | static struct fb_fix_screeninfo rivafb_fix = { |
| 224 | .type = FB_TYPE_PACKED_PIXELS, | 224 | .type = FB_TYPE_PACKED_PIXELS, |
| 225 | .xpanstep = 1, | 225 | .xpanstep = 1, |
| 226 | .ypanstep = 1, | 226 | .ypanstep = 1, |
| 227 | }; | 227 | }; |
| 228 | 228 | ||
| 229 | static struct fb_var_screeninfo __devinitdata rivafb_default_var = { | 229 | static struct fb_var_screeninfo rivafb_default_var = { |
| 230 | .xres = 640, | 230 | .xres = 640, |
| 231 | .yres = 480, | 231 | .yres = 480, |
| 232 | .xres_virtual = 640, | 232 | .xres_virtual = 640, |
| @@ -1709,7 +1709,7 @@ static struct fb_ops riva_fb_ops = { | |||
| 1709 | .fb_sync = rivafb_sync, | 1709 | .fb_sync = rivafb_sync, |
| 1710 | }; | 1710 | }; |
| 1711 | 1711 | ||
| 1712 | static int __devinit riva_set_fbinfo(struct fb_info *info) | 1712 | static int riva_set_fbinfo(struct fb_info *info) |
| 1713 | { | 1713 | { |
| 1714 | unsigned int cmap_len; | 1714 | unsigned int cmap_len; |
| 1715 | struct riva_par *par = info->par; | 1715 | struct riva_par *par = info->par; |
| @@ -1747,7 +1747,7 @@ static int __devinit riva_set_fbinfo(struct fb_info *info) | |||
| 1747 | } | 1747 | } |
| 1748 | 1748 | ||
| 1749 | #ifdef CONFIG_PPC_OF | 1749 | #ifdef CONFIG_PPC_OF |
| 1750 | static int __devinit riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd) | 1750 | static int riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd) |
| 1751 | { | 1751 | { |
| 1752 | struct riva_par *par = info->par; | 1752 | struct riva_par *par = info->par; |
| 1753 | struct device_node *dp; | 1753 | struct device_node *dp; |
| @@ -1780,7 +1780,7 @@ static int __devinit riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd) | |||
| 1780 | #endif /* CONFIG_PPC_OF */ | 1780 | #endif /* CONFIG_PPC_OF */ |
| 1781 | 1781 | ||
| 1782 | #if defined(CONFIG_FB_RIVA_I2C) && !defined(CONFIG_PPC_OF) | 1782 | #if defined(CONFIG_FB_RIVA_I2C) && !defined(CONFIG_PPC_OF) |
| 1783 | static int __devinit riva_get_EDID_i2c(struct fb_info *info) | 1783 | static int riva_get_EDID_i2c(struct fb_info *info) |
| 1784 | { | 1784 | { |
| 1785 | struct riva_par *par = info->par; | 1785 | struct riva_par *par = info->par; |
| 1786 | struct fb_var_screeninfo var; | 1786 | struct fb_var_screeninfo var; |
| @@ -1803,8 +1803,8 @@ static int __devinit riva_get_EDID_i2c(struct fb_info *info) | |||
| 1803 | } | 1803 | } |
| 1804 | #endif /* CONFIG_FB_RIVA_I2C */ | 1804 | #endif /* CONFIG_FB_RIVA_I2C */ |
| 1805 | 1805 | ||
| 1806 | static void __devinit riva_update_default_var(struct fb_var_screeninfo *var, | 1806 | static void riva_update_default_var(struct fb_var_screeninfo *var, |
| 1807 | struct fb_info *info) | 1807 | struct fb_info *info) |
| 1808 | { | 1808 | { |
| 1809 | struct fb_monspecs *specs = &info->monspecs; | 1809 | struct fb_monspecs *specs = &info->monspecs; |
| 1810 | struct fb_videomode modedb; | 1810 | struct fb_videomode modedb; |
| @@ -1836,7 +1836,7 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var, | |||
| 1836 | } | 1836 | } |
| 1837 | 1837 | ||
| 1838 | 1838 | ||
| 1839 | static void __devinit riva_get_EDID(struct fb_info *info, struct pci_dev *pdev) | 1839 | static void riva_get_EDID(struct fb_info *info, struct pci_dev *pdev) |
| 1840 | { | 1840 | { |
| 1841 | NVTRACE_ENTER(); | 1841 | NVTRACE_ENTER(); |
| 1842 | #ifdef CONFIG_PPC_OF | 1842 | #ifdef CONFIG_PPC_OF |
| @@ -1850,7 +1850,7 @@ static void __devinit riva_get_EDID(struct fb_info *info, struct pci_dev *pdev) | |||
| 1850 | } | 1850 | } |
| 1851 | 1851 | ||
| 1852 | 1852 | ||
| 1853 | static void __devinit riva_get_edidinfo(struct fb_info *info) | 1853 | static void riva_get_edidinfo(struct fb_info *info) |
| 1854 | { | 1854 | { |
| 1855 | struct fb_var_screeninfo *var = &rivafb_default_var; | 1855 | struct fb_var_screeninfo *var = &rivafb_default_var; |
| 1856 | struct riva_par *par = info->par; | 1856 | struct riva_par *par = info->par; |
| @@ -1871,7 +1871,7 @@ static void __devinit riva_get_edidinfo(struct fb_info *info) | |||
| 1871 | * | 1871 | * |
| 1872 | * ------------------------------------------------------------------------- */ | 1872 | * ------------------------------------------------------------------------- */ |
| 1873 | 1873 | ||
| 1874 | static u32 __devinit riva_get_arch(struct pci_dev *pd) | 1874 | static u32 riva_get_arch(struct pci_dev *pd) |
| 1875 | { | 1875 | { |
| 1876 | u32 arch = 0; | 1876 | u32 arch = 0; |
| 1877 | 1877 | ||
| @@ -1909,8 +1909,7 @@ static u32 __devinit riva_get_arch(struct pci_dev *pd) | |||
| 1909 | return arch; | 1909 | return arch; |
| 1910 | } | 1910 | } |
| 1911 | 1911 | ||
| 1912 | static int __devinit rivafb_probe(struct pci_dev *pd, | 1912 | static int rivafb_probe(struct pci_dev *pd, const struct pci_device_id *ent) |
| 1913 | const struct pci_device_id *ent) | ||
| 1914 | { | 1913 | { |
| 1915 | struct riva_par *default_par; | 1914 | struct riva_par *default_par; |
| 1916 | struct fb_info *info; | 1915 | struct fb_info *info; |
| @@ -2105,7 +2104,7 @@ err_ret: | |||
| 2105 | return ret; | 2104 | return ret; |
| 2106 | } | 2105 | } |
| 2107 | 2106 | ||
| 2108 | static void __devexit rivafb_remove(struct pci_dev *pd) | 2107 | static void rivafb_remove(struct pci_dev *pd) |
| 2109 | { | 2108 | { |
| 2110 | struct fb_info *info = pci_get_drvdata(pd); | 2109 | struct fb_info *info = pci_get_drvdata(pd); |
| 2111 | struct riva_par *par = info->par; | 2110 | struct riva_par *par = info->par; |
| @@ -2145,7 +2144,7 @@ static void __devexit rivafb_remove(struct pci_dev *pd) | |||
| 2145 | * ------------------------------------------------------------------------- */ | 2144 | * ------------------------------------------------------------------------- */ |
| 2146 | 2145 | ||
| 2147 | #ifndef MODULE | 2146 | #ifndef MODULE |
| 2148 | static int __devinit rivafb_setup(char *options) | 2147 | static int rivafb_setup(char *options) |
| 2149 | { | 2148 | { |
| 2150 | char *this_opt; | 2149 | char *this_opt; |
| 2151 | 2150 | ||
| @@ -2186,7 +2185,7 @@ static struct pci_driver rivafb_driver = { | |||
| 2186 | .name = "rivafb", | 2185 | .name = "rivafb", |
| 2187 | .id_table = rivafb_pci_tbl, | 2186 | .id_table = rivafb_pci_tbl, |
| 2188 | .probe = rivafb_probe, | 2187 | .probe = rivafb_probe, |
| 2189 | .remove = __devexit_p(rivafb_remove), | 2188 | .remove = rivafb_remove, |
| 2190 | }; | 2189 | }; |
| 2191 | 2190 | ||
| 2192 | 2191 | ||
| @@ -2197,7 +2196,7 @@ static struct pci_driver rivafb_driver = { | |||
| 2197 | * | 2196 | * |
| 2198 | * ------------------------------------------------------------------------- */ | 2197 | * ------------------------------------------------------------------------- */ |
| 2199 | 2198 | ||
| 2200 | static int __devinit rivafb_init(void) | 2199 | static int rivafb_init(void) |
| 2201 | { | 2200 | { |
| 2202 | #ifndef MODULE | 2201 | #ifndef MODULE |
| 2203 | char *option = NULL; | 2202 | char *option = NULL; |
diff --git a/drivers/video/riva/rivafb-i2c.c b/drivers/video/riva/rivafb-i2c.c index 167400e2a182..6a183375ced1 100644 --- a/drivers/video/riva/rivafb-i2c.c +++ b/drivers/video/riva/rivafb-i2c.c | |||
| @@ -86,9 +86,8 @@ static int riva_gpio_getsda(void* data) | |||
| 86 | return val; | 86 | return val; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | static int __devinit riva_setup_i2c_bus(struct riva_i2c_chan *chan, | 89 | static int riva_setup_i2c_bus(struct riva_i2c_chan *chan, const char *name, |
| 90 | const char *name, | 90 | unsigned int i2c_class) |
| 91 | unsigned int i2c_class) | ||
| 92 | { | 91 | { |
| 93 | int rc; | 92 | int rc; |
| 94 | 93 | ||
| @@ -124,7 +123,7 @@ static int __devinit riva_setup_i2c_bus(struct riva_i2c_chan *chan, | |||
| 124 | return rc; | 123 | return rc; |
| 125 | } | 124 | } |
| 126 | 125 | ||
| 127 | void __devinit riva_create_i2c_busses(struct riva_par *par) | 126 | void riva_create_i2c_busses(struct riva_par *par) |
| 128 | { | 127 | { |
| 129 | par->chan[0].par = par; | 128 | par->chan[0].par = par; |
| 130 | par->chan[1].par = par; | 129 | par->chan[1].par = par; |
| @@ -150,7 +149,7 @@ void riva_delete_i2c_busses(struct riva_par *par) | |||
| 150 | } | 149 | } |
| 151 | } | 150 | } |
| 152 | 151 | ||
| 153 | int __devinit riva_probe_i2c_connector(struct riva_par *par, int conn, u8 **out_edid) | 152 | int riva_probe_i2c_connector(struct riva_par *par, int conn, u8 **out_edid) |
| 154 | { | 153 | { |
| 155 | u8 *edid = NULL; | 154 | u8 *edid = NULL; |
| 156 | 155 | ||
diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c index 28b1c6c3d8ac..76d9053d88c1 100644 --- a/drivers/video/s1d13xxxfb.c +++ b/drivers/video/s1d13xxxfb.c | |||
| @@ -84,7 +84,7 @@ static const char *s1d13xxxfb_prod_names[] = { | |||
| 84 | /* | 84 | /* |
| 85 | * here we define the default struct fb_fix_screeninfo | 85 | * here we define the default struct fb_fix_screeninfo |
| 86 | */ | 86 | */ |
| 87 | static struct fb_fix_screeninfo __devinitdata s1d13xxxfb_fix = { | 87 | static struct fb_fix_screeninfo s1d13xxxfb_fix = { |
| 88 | .id = S1D_FBID, | 88 | .id = S1D_FBID, |
| 89 | .type = FB_TYPE_PACKED_PIXELS, | 89 | .type = FB_TYPE_PACKED_PIXELS, |
| 90 | .visual = FB_VISUAL_PSEUDOCOLOR, | 90 | .visual = FB_VISUAL_PSEUDOCOLOR, |
| @@ -622,7 +622,7 @@ static struct fb_ops s1d13xxxfb_fbops = { | |||
| 622 | .fb_imageblit = cfb_imageblit, | 622 | .fb_imageblit = cfb_imageblit, |
| 623 | }; | 623 | }; |
| 624 | 624 | ||
| 625 | static int s1d13xxxfb_width_tab[2][4] __devinitdata = { | 625 | static int s1d13xxxfb_width_tab[2][4] = { |
| 626 | {4, 8, 16, -1}, | 626 | {4, 8, 16, -1}, |
| 627 | {9, 12, 18, -1}, | 627 | {9, 12, 18, -1}, |
| 628 | }; | 628 | }; |
| @@ -642,8 +642,7 @@ static int s1d13xxxfb_width_tab[2][4] __devinitdata = { | |||
| 642 | * Note: some of the hardcoded values here might need some love to | 642 | * Note: some of the hardcoded values here might need some love to |
| 643 | * work on various chips, and might need to no longer be hardcoded. | 643 | * work on various chips, and might need to no longer be hardcoded. |
| 644 | */ | 644 | */ |
| 645 | static void __devinit | 645 | static void s1d13xxxfb_fetch_hw_state(struct fb_info *info) |
| 646 | s1d13xxxfb_fetch_hw_state(struct fb_info *info) | ||
| 647 | { | 646 | { |
| 648 | struct fb_var_screeninfo *var = &info->var; | 647 | struct fb_var_screeninfo *var = &info->var; |
| 649 | struct fb_fix_screeninfo *fix = &info->fix; | 648 | struct fb_fix_screeninfo *fix = &info->fix; |
| @@ -764,8 +763,7 @@ s1d13xxxfb_remove(struct platform_device *pdev) | |||
| 764 | return 0; | 763 | return 0; |
| 765 | } | 764 | } |
| 766 | 765 | ||
| 767 | static int __devinit | 766 | static int s1d13xxxfb_probe(struct platform_device *pdev) |
| 768 | s1d13xxxfb_probe(struct platform_device *pdev) | ||
| 769 | { | 767 | { |
| 770 | struct s1d13xxxfb_par *default_par; | 768 | struct s1d13xxxfb_par *default_par; |
| 771 | struct fb_info *info; | 769 | struct fb_info *info; |
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 1a00ad241edd..9b57a235c9bc 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c | |||
| @@ -1081,8 +1081,7 @@ static void s3c_fb_missing_pixclock(struct fb_videomode *mode) | |||
| 1081 | * | 1081 | * |
| 1082 | * Allocate memory for the given framebuffer. | 1082 | * Allocate memory for the given framebuffer. |
| 1083 | */ | 1083 | */ |
| 1084 | static int __devinit s3c_fb_alloc_memory(struct s3c_fb *sfb, | 1084 | static int s3c_fb_alloc_memory(struct s3c_fb *sfb, struct s3c_fb_win *win) |
| 1085 | struct s3c_fb_win *win) | ||
| 1086 | { | 1085 | { |
| 1087 | struct s3c_fb_pd_win *windata = win->windata; | 1086 | struct s3c_fb_pd_win *windata = win->windata; |
| 1088 | unsigned int real_size, virt_size, size; | 1087 | unsigned int real_size, virt_size, size; |
| @@ -1172,9 +1171,9 @@ static void s3c_fb_release_win(struct s3c_fb *sfb, struct s3c_fb_win *win) | |||
| 1172 | * Allocate and do the basic initialisation for one of the hardware's graphics | 1171 | * Allocate and do the basic initialisation for one of the hardware's graphics |
| 1173 | * windows. | 1172 | * windows. |
| 1174 | */ | 1173 | */ |
| 1175 | static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no, | 1174 | static int s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no, |
| 1176 | struct s3c_fb_win_variant *variant, | 1175 | struct s3c_fb_win_variant *variant, |
| 1177 | struct s3c_fb_win **res) | 1176 | struct s3c_fb_win **res) |
| 1178 | { | 1177 | { |
| 1179 | struct fb_var_screeninfo *var; | 1178 | struct fb_var_screeninfo *var; |
| 1180 | struct fb_videomode initmode; | 1179 | struct fb_videomode initmode; |
| @@ -1360,7 +1359,7 @@ static void s3c_fb_clear_win(struct s3c_fb *sfb, int win) | |||
| 1360 | } | 1359 | } |
| 1361 | } | 1360 | } |
| 1362 | 1361 | ||
| 1363 | static int __devinit s3c_fb_probe(struct platform_device *pdev) | 1362 | static int s3c_fb_probe(struct platform_device *pdev) |
| 1364 | { | 1363 | { |
| 1365 | const struct platform_device_id *platid; | 1364 | const struct platform_device_id *platid; |
| 1366 | struct s3c_fb_driverdata *fbdrv; | 1365 | struct s3c_fb_driverdata *fbdrv; |
| @@ -1521,7 +1520,7 @@ err_bus_clk: | |||
| 1521 | * Shutdown and then release all the resources that the driver allocated | 1520 | * Shutdown and then release all the resources that the driver allocated |
| 1522 | * on initialisation. | 1521 | * on initialisation. |
| 1523 | */ | 1522 | */ |
| 1524 | static int __devexit s3c_fb_remove(struct platform_device *pdev) | 1523 | static int s3c_fb_remove(struct platform_device *pdev) |
| 1525 | { | 1524 | { |
| 1526 | struct s3c_fb *sfb = platform_get_drvdata(pdev); | 1525 | struct s3c_fb *sfb = platform_get_drvdata(pdev); |
| 1527 | int win; | 1526 | int win; |
| @@ -2035,7 +2034,7 @@ static const struct dev_pm_ops s3cfb_pm_ops = { | |||
| 2035 | 2034 | ||
| 2036 | static struct platform_driver s3c_fb_driver = { | 2035 | static struct platform_driver s3c_fb_driver = { |
| 2037 | .probe = s3c_fb_probe, | 2036 | .probe = s3c_fb_probe, |
| 2038 | .remove = __devexit_p(s3c_fb_remove), | 2037 | .remove = s3c_fb_remove, |
| 2039 | .id_table = s3c_fb_driver_ids, | 2038 | .id_table = s3c_fb_driver_ids, |
| 2040 | .driver = { | 2039 | .driver = { |
| 2041 | .name = "s3c-fb", | 2040 | .name = "s3c-fb", |
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 1083bb9469ee..76a0e7fbd692 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
| @@ -637,7 +637,7 @@ static struct fb_ops s3c2410fb_ops = { | |||
| 637 | * cache. Once this area is remapped, all virtual memory | 637 | * cache. Once this area is remapped, all virtual memory |
| 638 | * access to the video memory should occur at the new region. | 638 | * access to the video memory should occur at the new region. |
| 639 | */ | 639 | */ |
| 640 | static int __devinit s3c2410fb_map_video_memory(struct fb_info *info) | 640 | static int s3c2410fb_map_video_memory(struct fb_info *info) |
| 641 | { | 641 | { |
| 642 | struct s3c2410fb_info *fbi = info->par; | 642 | struct s3c2410fb_info *fbi = info->par; |
| 643 | dma_addr_t map_dma; | 643 | dma_addr_t map_dma; |
| @@ -819,8 +819,8 @@ static inline void s3c2410fb_cpufreq_deregister(struct s3c2410fb_info *info) | |||
| 819 | 819 | ||
| 820 | static const char driver_name[] = "s3c2410fb"; | 820 | static const char driver_name[] = "s3c2410fb"; |
| 821 | 821 | ||
| 822 | static int __devinit s3c24xxfb_probe(struct platform_device *pdev, | 822 | static int s3c24xxfb_probe(struct platform_device *pdev, |
| 823 | enum s3c_drv_type drv_type) | 823 | enum s3c_drv_type drv_type) |
| 824 | { | 824 | { |
| 825 | struct s3c2410fb_info *info; | 825 | struct s3c2410fb_info *info; |
| 826 | struct s3c2410fb_display *display; | 826 | struct s3c2410fb_display *display; |
| @@ -1010,12 +1010,12 @@ dealloc_fb: | |||
| 1010 | return ret; | 1010 | return ret; |
| 1011 | } | 1011 | } |
| 1012 | 1012 | ||
| 1013 | static int __devinit s3c2410fb_probe(struct platform_device *pdev) | 1013 | static int s3c2410fb_probe(struct platform_device *pdev) |
| 1014 | { | 1014 | { |
| 1015 | return s3c24xxfb_probe(pdev, DRV_S3C2410); | 1015 | return s3c24xxfb_probe(pdev, DRV_S3C2410); |
| 1016 | } | 1016 | } |
| 1017 | 1017 | ||
| 1018 | static int __devinit s3c2412fb_probe(struct platform_device *pdev) | 1018 | static int s3c2412fb_probe(struct platform_device *pdev) |
| 1019 | { | 1019 | { |
| 1020 | return s3c24xxfb_probe(pdev, DRV_S3C2412); | 1020 | return s3c24xxfb_probe(pdev, DRV_S3C2412); |
| 1021 | } | 1021 | } |
| @@ -1024,7 +1024,7 @@ static int __devinit s3c2412fb_probe(struct platform_device *pdev) | |||
| 1024 | /* | 1024 | /* |
| 1025 | * Cleanup | 1025 | * Cleanup |
| 1026 | */ | 1026 | */ |
| 1027 | static int __devexit s3c2410fb_remove(struct platform_device *pdev) | 1027 | static int s3c2410fb_remove(struct platform_device *pdev) |
| 1028 | { | 1028 | { |
| 1029 | struct fb_info *fbinfo = platform_get_drvdata(pdev); | 1029 | struct fb_info *fbinfo = platform_get_drvdata(pdev); |
| 1030 | struct s3c2410fb_info *info = fbinfo->par; | 1030 | struct s3c2410fb_info *info = fbinfo->par; |
| @@ -1101,7 +1101,7 @@ static int s3c2410fb_resume(struct platform_device *dev) | |||
| 1101 | 1101 | ||
| 1102 | static struct platform_driver s3c2410fb_driver = { | 1102 | static struct platform_driver s3c2410fb_driver = { |
| 1103 | .probe = s3c2410fb_probe, | 1103 | .probe = s3c2410fb_probe, |
| 1104 | .remove = __devexit_p(s3c2410fb_remove), | 1104 | .remove = s3c2410fb_remove, |
| 1105 | .suspend = s3c2410fb_suspend, | 1105 | .suspend = s3c2410fb_suspend, |
| 1106 | .resume = s3c2410fb_resume, | 1106 | .resume = s3c2410fb_resume, |
| 1107 | .driver = { | 1107 | .driver = { |
| @@ -1112,7 +1112,7 @@ static struct platform_driver s3c2410fb_driver = { | |||
| 1112 | 1112 | ||
| 1113 | static struct platform_driver s3c2412fb_driver = { | 1113 | static struct platform_driver s3c2412fb_driver = { |
| 1114 | .probe = s3c2412fb_probe, | 1114 | .probe = s3c2412fb_probe, |
| 1115 | .remove = __devexit_p(s3c2410fb_remove), | 1115 | .remove = s3c2410fb_remove, |
| 1116 | .suspend = s3c2410fb_suspend, | 1116 | .suspend = s3c2410fb_suspend, |
| 1117 | .resume = s3c2410fb_resume, | 1117 | .resume = s3c2410fb_resume, |
| 1118 | .driver = { | 1118 | .driver = { |
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c index 1d007366b917..47ca86c5c6c0 100644 --- a/drivers/video/s3fb.c +++ b/drivers/video/s3fb.c | |||
| @@ -153,10 +153,10 @@ static const struct svga_timing_regs s3_timing_regs = { | |||
| 153 | /* Module parameters */ | 153 | /* Module parameters */ |
| 154 | 154 | ||
| 155 | 155 | ||
| 156 | static char *mode_option __devinitdata; | 156 | static char *mode_option; |
| 157 | 157 | ||
| 158 | #ifdef CONFIG_MTRR | 158 | #ifdef CONFIG_MTRR |
| 159 | static int mtrr __devinitdata = 1; | 159 | static int mtrr = 1; |
| 160 | #endif | 160 | #endif |
| 161 | 161 | ||
| 162 | static int fasttext = 1; | 162 | static int fasttext = 1; |
| @@ -255,7 +255,7 @@ static int s3fb_ddc_getsda(void *data) | |||
| 255 | return !!(s3fb_ddc_read(par) & DDC_SDA_IN); | 255 | return !!(s3fb_ddc_read(par) & DDC_SDA_IN); |
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | static int __devinit s3fb_setup_ddc_bus(struct fb_info *info) | 258 | static int s3fb_setup_ddc_bus(struct fb_info *info) |
| 259 | { | 259 | { |
| 260 | struct s3fb_info *par = info->par; | 260 | struct s3fb_info *par = info->par; |
| 261 | 261 | ||
| @@ -1066,7 +1066,7 @@ static struct fb_ops s3fb_ops = { | |||
| 1066 | 1066 | ||
| 1067 | /* ------------------------------------------------------------------------- */ | 1067 | /* ------------------------------------------------------------------------- */ |
| 1068 | 1068 | ||
| 1069 | static int __devinit s3_identification(struct s3fb_info *par) | 1069 | static int s3_identification(struct s3fb_info *par) |
| 1070 | { | 1070 | { |
| 1071 | int chip = par->chip; | 1071 | int chip = par->chip; |
| 1072 | 1072 | ||
| @@ -1122,7 +1122,7 @@ static int __devinit s3_identification(struct s3fb_info *par) | |||
| 1122 | 1122 | ||
| 1123 | /* PCI probe */ | 1123 | /* PCI probe */ |
| 1124 | 1124 | ||
| 1125 | static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | 1125 | static int s3_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) |
| 1126 | { | 1126 | { |
| 1127 | struct pci_bus_region bus_reg; | 1127 | struct pci_bus_region bus_reg; |
| 1128 | struct resource vga_res; | 1128 | struct resource vga_res; |
| @@ -1403,7 +1403,7 @@ err_enable_device: | |||
| 1403 | 1403 | ||
| 1404 | /* PCI remove */ | 1404 | /* PCI remove */ |
| 1405 | 1405 | ||
| 1406 | static void __devexit s3_pci_remove(struct pci_dev *dev) | 1406 | static void s3_pci_remove(struct pci_dev *dev) |
| 1407 | { | 1407 | { |
| 1408 | struct fb_info *info = pci_get_drvdata(dev); | 1408 | struct fb_info *info = pci_get_drvdata(dev); |
| 1409 | struct s3fb_info __maybe_unused *par = info->par; | 1409 | struct s3fb_info __maybe_unused *par = info->par; |
| @@ -1509,7 +1509,7 @@ static int s3_pci_resume(struct pci_dev* dev) | |||
| 1509 | 1509 | ||
| 1510 | /* List of boards that we are trying to support */ | 1510 | /* List of boards that we are trying to support */ |
| 1511 | 1511 | ||
| 1512 | static struct pci_device_id s3_devices[] __devinitdata = { | 1512 | static struct pci_device_id s3_devices[] = { |
| 1513 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8810), .driver_data = CHIP_XXX_TRIO}, | 1513 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8810), .driver_data = CHIP_XXX_TRIO}, |
| 1514 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8811), .driver_data = CHIP_XXX_TRIO}, | 1514 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8811), .driver_data = CHIP_XXX_TRIO}, |
| 1515 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8812), .driver_data = CHIP_M65_AURORA64VP}, | 1515 | {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8812), .driver_data = CHIP_M65_AURORA64VP}, |
| @@ -1537,7 +1537,7 @@ static struct pci_driver s3fb_pci_driver = { | |||
| 1537 | .name = "s3fb", | 1537 | .name = "s3fb", |
| 1538 | .id_table = s3_devices, | 1538 | .id_table = s3_devices, |
| 1539 | .probe = s3_pci_probe, | 1539 | .probe = s3_pci_probe, |
| 1540 | .remove = __devexit_p(s3_pci_remove), | 1540 | .remove = s3_pci_remove, |
| 1541 | .suspend = s3_pci_suspend, | 1541 | .suspend = s3_pci_suspend, |
| 1542 | .resume = s3_pci_resume, | 1542 | .resume = s3_pci_resume, |
| 1543 | }; | 1543 | }; |
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c index b6325848ad61..cfbde5e85cbf 100644 --- a/drivers/video/sa1100fb.c +++ b/drivers/video/sa1100fb.c | |||
| @@ -1090,7 +1090,7 @@ static int sa1100fb_resume(struct platform_device *dev) | |||
| 1090 | * cache. Once this area is remapped, all virtual memory | 1090 | * cache. Once this area is remapped, all virtual memory |
| 1091 | * access to the video memory should occur at the new region. | 1091 | * access to the video memory should occur at the new region. |
| 1092 | */ | 1092 | */ |
| 1093 | static int __devinit sa1100fb_map_video_memory(struct sa1100fb_info *fbi) | 1093 | static int sa1100fb_map_video_memory(struct sa1100fb_info *fbi) |
| 1094 | { | 1094 | { |
| 1095 | /* | 1095 | /* |
| 1096 | * We reserve one page for the palette, plus the size | 1096 | * We reserve one page for the palette, plus the size |
| @@ -1116,7 +1116,7 @@ static int __devinit sa1100fb_map_video_memory(struct sa1100fb_info *fbi) | |||
| 1116 | } | 1116 | } |
| 1117 | 1117 | ||
| 1118 | /* Fake monspecs to fill in fbinfo structure */ | 1118 | /* Fake monspecs to fill in fbinfo structure */ |
| 1119 | static struct fb_monspecs monspecs __devinitdata = { | 1119 | static struct fb_monspecs monspecs = { |
| 1120 | .hfmin = 30000, | 1120 | .hfmin = 30000, |
| 1121 | .hfmax = 70000, | 1121 | .hfmax = 70000, |
| 1122 | .vfmin = 50, | 1122 | .vfmin = 50, |
| @@ -1124,7 +1124,7 @@ static struct fb_monspecs monspecs __devinitdata = { | |||
| 1124 | }; | 1124 | }; |
| 1125 | 1125 | ||
| 1126 | 1126 | ||
| 1127 | static struct sa1100fb_info * __devinit sa1100fb_init_fbinfo(struct device *dev) | 1127 | static struct sa1100fb_info *sa1100fb_init_fbinfo(struct device *dev) |
| 1128 | { | 1128 | { |
| 1129 | struct sa1100fb_mach_info *inf = dev->platform_data; | 1129 | struct sa1100fb_mach_info *inf = dev->platform_data; |
| 1130 | struct sa1100fb_info *fbi; | 1130 | struct sa1100fb_info *fbi; |
| @@ -1205,7 +1205,7 @@ static struct sa1100fb_info * __devinit sa1100fb_init_fbinfo(struct device *dev) | |||
| 1205 | return fbi; | 1205 | return fbi; |
| 1206 | } | 1206 | } |
| 1207 | 1207 | ||
| 1208 | static int __devinit sa1100fb_probe(struct platform_device *pdev) | 1208 | static int sa1100fb_probe(struct platform_device *pdev) |
| 1209 | { | 1209 | { |
| 1210 | struct sa1100fb_info *fbi; | 1210 | struct sa1100fb_info *fbi; |
| 1211 | struct resource *res; | 1211 | struct resource *res; |
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c index f4f53b082d05..741b2395d01e 100644 --- a/drivers/video/savage/savagefb_driver.c +++ b/drivers/video/savage/savagefb_driver.c | |||
| @@ -69,7 +69,7 @@ | |||
| 69 | /* --------------------------------------------------------------------- */ | 69 | /* --------------------------------------------------------------------- */ |
| 70 | 70 | ||
| 71 | 71 | ||
| 72 | static char *mode_option __devinitdata = NULL; | 72 | static char *mode_option = NULL; |
| 73 | 73 | ||
| 74 | #ifdef MODULE | 74 | #ifdef MODULE |
| 75 | 75 | ||
| @@ -1664,7 +1664,7 @@ static struct fb_ops savagefb_ops = { | |||
| 1664 | 1664 | ||
| 1665 | /* --------------------------------------------------------------------- */ | 1665 | /* --------------------------------------------------------------------- */ |
| 1666 | 1666 | ||
| 1667 | static struct fb_var_screeninfo __devinitdata savagefb_var800x600x8 = { | 1667 | static struct fb_var_screeninfo savagefb_var800x600x8 = { |
| 1668 | .accel_flags = FB_ACCELF_TEXT, | 1668 | .accel_flags = FB_ACCELF_TEXT, |
| 1669 | .xres = 800, | 1669 | .xres = 800, |
| 1670 | .yres = 600, | 1670 | .yres = 600, |
| @@ -1715,7 +1715,7 @@ static void savage_disable_mmio(struct savagefb_par *par) | |||
| 1715 | } | 1715 | } |
| 1716 | 1716 | ||
| 1717 | 1717 | ||
| 1718 | static int __devinit savage_map_mmio(struct fb_info *info) | 1718 | static int savage_map_mmio(struct fb_info *info) |
| 1719 | { | 1719 | { |
| 1720 | struct savagefb_par *par = info->par; | 1720 | struct savagefb_par *par = info->par; |
| 1721 | DBG("savage_map_mmio"); | 1721 | DBG("savage_map_mmio"); |
| @@ -1761,8 +1761,7 @@ static void savage_unmap_mmio(struct fb_info *info) | |||
| 1761 | } | 1761 | } |
| 1762 | } | 1762 | } |
| 1763 | 1763 | ||
| 1764 | static int __devinit savage_map_video(struct fb_info *info, | 1764 | static int savage_map_video(struct fb_info *info, int video_len) |
| 1765 | int video_len) | ||
| 1766 | { | 1765 | { |
| 1767 | struct savagefb_par *par = info->par; | 1766 | struct savagefb_par *par = info->par; |
| 1768 | int resource; | 1767 | int resource; |
| @@ -2052,9 +2051,8 @@ static int savage_init_hw(struct savagefb_par *par) | |||
| 2052 | return videoRambytes; | 2051 | return videoRambytes; |
| 2053 | } | 2052 | } |
| 2054 | 2053 | ||
| 2055 | static int __devinit savage_init_fb_info(struct fb_info *info, | 2054 | static int savage_init_fb_info(struct fb_info *info, struct pci_dev *dev, |
| 2056 | struct pci_dev *dev, | 2055 | const struct pci_device_id *id) |
| 2057 | const struct pci_device_id *id) | ||
| 2058 | { | 2056 | { |
| 2059 | struct savagefb_par *par = info->par; | 2057 | struct savagefb_par *par = info->par; |
| 2060 | int err = 0; | 2058 | int err = 0; |
| @@ -2178,8 +2176,7 @@ static int __devinit savage_init_fb_info(struct fb_info *info, | |||
| 2178 | 2176 | ||
| 2179 | /* --------------------------------------------------------------------- */ | 2177 | /* --------------------------------------------------------------------- */ |
| 2180 | 2178 | ||
| 2181 | static int __devinit savagefb_probe(struct pci_dev* dev, | 2179 | static int savagefb_probe(struct pci_dev *dev, const struct pci_device_id *id) |
| 2182 | const struct pci_device_id* id) | ||
| 2183 | { | 2180 | { |
| 2184 | struct fb_info *info; | 2181 | struct fb_info *info; |
| 2185 | struct savagefb_par *par; | 2182 | struct savagefb_par *par; |
| @@ -2340,7 +2337,7 @@ static int __devinit savagefb_probe(struct pci_dev* dev, | |||
| 2340 | return err; | 2337 | return err; |
| 2341 | } | 2338 | } |
| 2342 | 2339 | ||
| 2343 | static void __devexit savagefb_remove(struct pci_dev *dev) | 2340 | static void savagefb_remove(struct pci_dev *dev) |
| 2344 | { | 2341 | { |
| 2345 | struct fb_info *info = pci_get_drvdata(dev); | 2342 | struct fb_info *info = pci_get_drvdata(dev); |
| 2346 | 2343 | ||
| @@ -2449,7 +2446,7 @@ static int savagefb_resume(struct pci_dev* dev) | |||
| 2449 | } | 2446 | } |
| 2450 | 2447 | ||
| 2451 | 2448 | ||
| 2452 | static struct pci_device_id savagefb_devices[] __devinitdata = { | 2449 | static struct pci_device_id savagefb_devices[] = { |
| 2453 | {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX128, | 2450 | {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX128, |
| 2454 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE}, | 2451 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE}, |
| 2455 | 2452 | ||
| @@ -2530,7 +2527,7 @@ static struct pci_driver savagefb_driver = { | |||
| 2530 | .probe = savagefb_probe, | 2527 | .probe = savagefb_probe, |
| 2531 | .suspend = savagefb_suspend, | 2528 | .suspend = savagefb_suspend, |
| 2532 | .resume = savagefb_resume, | 2529 | .resume = savagefb_resume, |
| 2533 | .remove = __devexit_p(savagefb_remove) | 2530 | .remove = savagefb_remove, |
| 2534 | }; | 2531 | }; |
| 2535 | 2532 | ||
| 2536 | /* **************************** exit-time only **************************** */ | 2533 | /* **************************** exit-time only **************************** */ |
diff --git a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c index 53455f295510..2331fadc272b 100644 --- a/drivers/video/sgivwfb.c +++ b/drivers/video/sgivwfb.c | |||
| @@ -47,7 +47,7 @@ static int ywrap = 0; | |||
| 47 | 47 | ||
| 48 | static int flatpanel_id = -1; | 48 | static int flatpanel_id = -1; |
| 49 | 49 | ||
| 50 | static struct fb_fix_screeninfo sgivwfb_fix __devinitdata = { | 50 | static struct fb_fix_screeninfo sgivwfb_fix = { |
| 51 | .id = "SGI Vis WS FB", | 51 | .id = "SGI Vis WS FB", |
| 52 | .type = FB_TYPE_PACKED_PIXELS, | 52 | .type = FB_TYPE_PACKED_PIXELS, |
| 53 | .visual = FB_VISUAL_PSEUDOCOLOR, | 53 | .visual = FB_VISUAL_PSEUDOCOLOR, |
| @@ -57,7 +57,7 @@ static struct fb_fix_screeninfo sgivwfb_fix __devinitdata = { | |||
| 57 | .line_length = 640, | 57 | .line_length = 640, |
| 58 | }; | 58 | }; |
| 59 | 59 | ||
| 60 | static struct fb_var_screeninfo sgivwfb_var __devinitdata = { | 60 | static struct fb_var_screeninfo sgivwfb_var = { |
| 61 | /* 640x480, 8 bpp */ | 61 | /* 640x480, 8 bpp */ |
| 62 | .xres = 640, | 62 | .xres = 640, |
| 63 | .yres = 480, | 63 | .yres = 480, |
| @@ -79,7 +79,7 @@ static struct fb_var_screeninfo sgivwfb_var __devinitdata = { | |||
| 79 | .vmode = FB_VMODE_NONINTERLACED | 79 | .vmode = FB_VMODE_NONINTERLACED |
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | static struct fb_var_screeninfo sgivwfb_var1600sw __devinitdata = { | 82 | static struct fb_var_screeninfo sgivwfb_var1600sw = { |
| 83 | /* 1600x1024, 8 bpp */ | 83 | /* 1600x1024, 8 bpp */ |
| 84 | .xres = 1600, | 84 | .xres = 1600, |
| 85 | .yres = 1024, | 85 | .yres = 1024, |
| @@ -745,7 +745,7 @@ int __init sgivwfb_setup(char *options) | |||
| 745 | /* | 745 | /* |
| 746 | * Initialisation | 746 | * Initialisation |
| 747 | */ | 747 | */ |
| 748 | static int __devinit sgivwfb_probe(struct platform_device *dev) | 748 | static int sgivwfb_probe(struct platform_device *dev) |
| 749 | { | 749 | { |
| 750 | struct sgivw_par *par; | 750 | struct sgivw_par *par; |
| 751 | struct fb_info *info; | 751 | struct fb_info *info; |
| @@ -825,7 +825,7 @@ fail_ioremap_regs: | |||
| 825 | return -ENXIO; | 825 | return -ENXIO; |
| 826 | } | 826 | } |
| 827 | 827 | ||
| 828 | static int __devexit sgivwfb_remove(struct platform_device *dev) | 828 | static int sgivwfb_remove(struct platform_device *dev) |
| 829 | { | 829 | { |
| 830 | struct fb_info *info = platform_get_drvdata(dev); | 830 | struct fb_info *info = platform_get_drvdata(dev); |
| 831 | 831 | ||
| @@ -845,7 +845,7 @@ static int __devexit sgivwfb_remove(struct platform_device *dev) | |||
| 845 | 845 | ||
| 846 | static struct platform_driver sgivwfb_driver = { | 846 | static struct platform_driver sgivwfb_driver = { |
| 847 | .probe = sgivwfb_probe, | 847 | .probe = sgivwfb_probe, |
| 848 | .remove = __devexit_p(sgivwfb_remove), | 848 | .remove = sgivwfb_remove, |
| 849 | .driver = { | 849 | .driver = { |
| 850 | .name = "sgivwfb", | 850 | .name = "sgivwfb", |
| 851 | }, | 851 | }, |
diff --git a/drivers/video/sh7760fb.c b/drivers/video/sh7760fb.c index 83b16e237a0e..5fbb0c7ab0c8 100644 --- a/drivers/video/sh7760fb.c +++ b/drivers/video/sh7760fb.c | |||
| @@ -431,7 +431,7 @@ static int sh7760fb_alloc_mem(struct fb_info *info) | |||
| 431 | return 0; | 431 | return 0; |
| 432 | } | 432 | } |
| 433 | 433 | ||
| 434 | static int __devinit sh7760fb_probe(struct platform_device *pdev) | 434 | static int sh7760fb_probe(struct platform_device *pdev) |
| 435 | { | 435 | { |
| 436 | struct fb_info *info; | 436 | struct fb_info *info; |
| 437 | struct resource *res; | 437 | struct resource *res; |
| @@ -557,7 +557,7 @@ out_fb: | |||
| 557 | return ret; | 557 | return ret; |
| 558 | } | 558 | } |
| 559 | 559 | ||
| 560 | static int __devexit sh7760fb_remove(struct platform_device *dev) | 560 | static int sh7760fb_remove(struct platform_device *dev) |
| 561 | { | 561 | { |
| 562 | struct fb_info *info = platform_get_drvdata(dev); | 562 | struct fb_info *info = platform_get_drvdata(dev); |
| 563 | struct sh7760fb_par *par = info->par; | 563 | struct sh7760fb_par *par = info->par; |
| @@ -582,7 +582,7 @@ static struct platform_driver sh7760_lcdc_driver = { | |||
| 582 | .owner = THIS_MODULE, | 582 | .owner = THIS_MODULE, |
| 583 | }, | 583 | }, |
| 584 | .probe = sh7760fb_probe, | 584 | .probe = sh7760fb_probe, |
| 585 | .remove = __devexit_p(sh7760fb_remove), | 585 | .remove = sh7760fb_remove, |
| 586 | }; | 586 | }; |
| 587 | 587 | ||
| 588 | module_platform_driver(sh7760_lcdc_driver); | 588 | module_platform_driver(sh7760_lcdc_driver); |
diff --git a/drivers/video/sh_mipi_dsi.c b/drivers/video/sh_mipi_dsi.c index f4962292792c..701b461cf8a9 100644 --- a/drivers/video/sh_mipi_dsi.c +++ b/drivers/video/sh_mipi_dsi.c | |||
| @@ -533,7 +533,7 @@ efindslot: | |||
| 533 | return ret; | 533 | return ret; |
| 534 | } | 534 | } |
| 535 | 535 | ||
| 536 | static int __devexit sh_mipi_remove(struct platform_device *pdev) | 536 | static int sh_mipi_remove(struct platform_device *pdev) |
| 537 | { | 537 | { |
| 538 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 538 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 539 | struct resource *res2 = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 539 | struct resource *res2 = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
| @@ -574,7 +574,7 @@ static int __devexit sh_mipi_remove(struct platform_device *pdev) | |||
| 574 | } | 574 | } |
| 575 | 575 | ||
| 576 | static struct platform_driver sh_mipi_driver = { | 576 | static struct platform_driver sh_mipi_driver = { |
| 577 | .remove = __devexit_p(sh_mipi_remove), | 577 | .remove = sh_mipi_remove, |
| 578 | .shutdown = sh_mipi_shutdown, | 578 | .shutdown = sh_mipi_shutdown, |
| 579 | .driver = { | 579 | .driver = { |
| 580 | .name = "sh-mipi-dsi", | 580 | .name = "sh-mipi-dsi", |
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index e78fe4bc1524..63203acef812 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
| @@ -1649,7 +1649,7 @@ sh_mobile_lcdc_overlay_fb_unregister(struct sh_mobile_lcdc_overlay *ovl) | |||
| 1649 | unregister_framebuffer(ovl->info); | 1649 | unregister_framebuffer(ovl->info); |
| 1650 | } | 1650 | } |
| 1651 | 1651 | ||
| 1652 | static int __devinit | 1652 | static int |
| 1653 | sh_mobile_lcdc_overlay_fb_register(struct sh_mobile_lcdc_overlay *ovl) | 1653 | sh_mobile_lcdc_overlay_fb_register(struct sh_mobile_lcdc_overlay *ovl) |
| 1654 | { | 1654 | { |
| 1655 | struct sh_mobile_lcdc_priv *lcdc = ovl->channel->lcdc; | 1655 | struct sh_mobile_lcdc_priv *lcdc = ovl->channel->lcdc; |
| @@ -1688,7 +1688,7 @@ sh_mobile_lcdc_overlay_fb_cleanup(struct sh_mobile_lcdc_overlay *ovl) | |||
| 1688 | framebuffer_release(info); | 1688 | framebuffer_release(info); |
| 1689 | } | 1689 | } |
| 1690 | 1690 | ||
| 1691 | static int __devinit | 1691 | static int |
| 1692 | sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl) | 1692 | sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl) |
| 1693 | { | 1693 | { |
| 1694 | struct sh_mobile_lcdc_priv *priv = ovl->channel->lcdc; | 1694 | struct sh_mobile_lcdc_priv *priv = ovl->channel->lcdc; |
| @@ -2137,7 +2137,7 @@ sh_mobile_lcdc_channel_fb_unregister(struct sh_mobile_lcdc_chan *ch) | |||
| 2137 | unregister_framebuffer(ch->info); | 2137 | unregister_framebuffer(ch->info); |
| 2138 | } | 2138 | } |
| 2139 | 2139 | ||
| 2140 | static int __devinit | 2140 | static int |
| 2141 | sh_mobile_lcdc_channel_fb_register(struct sh_mobile_lcdc_chan *ch) | 2141 | sh_mobile_lcdc_channel_fb_register(struct sh_mobile_lcdc_chan *ch) |
| 2142 | { | 2142 | { |
| 2143 | struct fb_info *info = ch->info; | 2143 | struct fb_info *info = ch->info; |
| @@ -2185,7 +2185,7 @@ sh_mobile_lcdc_channel_fb_cleanup(struct sh_mobile_lcdc_chan *ch) | |||
| 2185 | framebuffer_release(info); | 2185 | framebuffer_release(info); |
| 2186 | } | 2186 | } |
| 2187 | 2187 | ||
| 2188 | static int __devinit | 2188 | static int |
| 2189 | sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch, | 2189 | sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch, |
| 2190 | const struct fb_videomode *modes, | 2190 | const struct fb_videomode *modes, |
| 2191 | unsigned int num_modes) | 2191 | unsigned int num_modes) |
| @@ -2417,7 +2417,7 @@ static int sh_mobile_lcdc_notify(struct notifier_block *nb, | |||
| 2417 | * Probe/remove and driver init/exit | 2417 | * Probe/remove and driver init/exit |
| 2418 | */ | 2418 | */ |
| 2419 | 2419 | ||
| 2420 | static const struct fb_videomode default_720p __devinitconst = { | 2420 | static const struct fb_videomode default_720p = { |
| 2421 | .name = "HDMI 720p", | 2421 | .name = "HDMI 720p", |
| 2422 | .xres = 1280, | 2422 | .xres = 1280, |
| 2423 | .yres = 720, | 2423 | .yres = 720, |
| @@ -2496,7 +2496,7 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev) | |||
| 2496 | return 0; | 2496 | return 0; |
| 2497 | } | 2497 | } |
| 2498 | 2498 | ||
| 2499 | static int __devinit sh_mobile_lcdc_check_interface(struct sh_mobile_lcdc_chan *ch) | 2499 | static int sh_mobile_lcdc_check_interface(struct sh_mobile_lcdc_chan *ch) |
| 2500 | { | 2500 | { |
| 2501 | int interface_type = ch->cfg->interface_type; | 2501 | int interface_type = ch->cfg->interface_type; |
| 2502 | 2502 | ||
| @@ -2536,7 +2536,7 @@ static int __devinit sh_mobile_lcdc_check_interface(struct sh_mobile_lcdc_chan * | |||
| 2536 | return 0; | 2536 | return 0; |
| 2537 | } | 2537 | } |
| 2538 | 2538 | ||
| 2539 | static int __devinit | 2539 | static int |
| 2540 | sh_mobile_lcdc_overlay_init(struct sh_mobile_lcdc_overlay *ovl) | 2540 | sh_mobile_lcdc_overlay_init(struct sh_mobile_lcdc_overlay *ovl) |
| 2541 | { | 2541 | { |
| 2542 | const struct sh_mobile_lcdc_format_info *format; | 2542 | const struct sh_mobile_lcdc_format_info *format; |
| @@ -2591,7 +2591,7 @@ sh_mobile_lcdc_overlay_init(struct sh_mobile_lcdc_overlay *ovl) | |||
| 2591 | return 0; | 2591 | return 0; |
| 2592 | } | 2592 | } |
| 2593 | 2593 | ||
| 2594 | static int __devinit | 2594 | static int |
| 2595 | sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_chan *ch) | 2595 | sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_chan *ch) |
| 2596 | { | 2596 | { |
| 2597 | const struct sh_mobile_lcdc_format_info *format; | 2597 | const struct sh_mobile_lcdc_format_info *format; |
| @@ -2695,7 +2695,7 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_chan *ch) | |||
| 2695 | return sh_mobile_lcdc_channel_fb_init(ch, mode, num_modes); | 2695 | return sh_mobile_lcdc_channel_fb_init(ch, mode, num_modes); |
| 2696 | } | 2696 | } |
| 2697 | 2697 | ||
| 2698 | static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev) | 2698 | static int sh_mobile_lcdc_probe(struct platform_device *pdev) |
| 2699 | { | 2699 | { |
| 2700 | struct sh_mobile_lcdc_info *pdata = pdev->dev.platform_data; | 2700 | struct sh_mobile_lcdc_info *pdata = pdev->dev.platform_data; |
| 2701 | struct sh_mobile_lcdc_priv *priv; | 2701 | struct sh_mobile_lcdc_priv *priv; |
diff --git a/drivers/video/sh_mobile_meram.c b/drivers/video/sh_mobile_meram.c index 7a0ba8bb3fbe..e0f098562a74 100644 --- a/drivers/video/sh_mobile_meram.c +++ b/drivers/video/sh_mobile_meram.c | |||
| @@ -620,7 +620,7 @@ static UNIVERSAL_DEV_PM_OPS(sh_mobile_meram_dev_pm_ops, | |||
| 620 | * Probe/remove and driver init/exit | 620 | * Probe/remove and driver init/exit |
| 621 | */ | 621 | */ |
| 622 | 622 | ||
| 623 | static int __devinit sh_mobile_meram_probe(struct platform_device *pdev) | 623 | static int sh_mobile_meram_probe(struct platform_device *pdev) |
| 624 | { | 624 | { |
| 625 | struct sh_mobile_meram_priv *priv; | 625 | struct sh_mobile_meram_priv *priv; |
| 626 | struct sh_mobile_meram_info *pdata = pdev->dev.platform_data; | 626 | struct sh_mobile_meram_info *pdata = pdev->dev.platform_data; |
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c index a7a48db64ce2..977e27927a21 100644 --- a/drivers/video/sis/sis_main.c +++ b/drivers/video/sis/sis_main.c | |||
| @@ -106,8 +106,7 @@ sisfb_setdefaultparms(void) | |||
| 106 | 106 | ||
| 107 | /* ------------- Parameter parsing -------------- */ | 107 | /* ------------- Parameter parsing -------------- */ |
| 108 | 108 | ||
| 109 | static void __devinit | 109 | static void sisfb_search_vesamode(unsigned int vesamode, bool quiet) |
| 110 | sisfb_search_vesamode(unsigned int vesamode, bool quiet) | ||
| 111 | { | 110 | { |
| 112 | int i = 0, j = 0; | 111 | int i = 0, j = 0; |
| 113 | 112 | ||
| @@ -146,8 +145,7 @@ sisfb_search_vesamode(unsigned int vesamode, bool quiet) | |||
| 146 | printk(KERN_ERR "sisfb: Invalid VESA mode 0x%x'\n", vesamode); | 145 | printk(KERN_ERR "sisfb: Invalid VESA mode 0x%x'\n", vesamode); |
| 147 | } | 146 | } |
| 148 | 147 | ||
| 149 | static void __devinit | 148 | static void sisfb_search_mode(char *name, bool quiet) |
| 150 | sisfb_search_mode(char *name, bool quiet) | ||
| 151 | { | 149 | { |
| 152 | unsigned int j = 0, xres = 0, yres = 0, depth = 0, rate = 0; | 150 | unsigned int j = 0, xres = 0, yres = 0, depth = 0, rate = 0; |
| 153 | int i = 0; | 151 | int i = 0; |
| @@ -225,8 +223,7 @@ sisfb_search_mode(char *name, bool quiet) | |||
| 225 | } | 223 | } |
| 226 | 224 | ||
| 227 | #ifndef MODULE | 225 | #ifndef MODULE |
| 228 | static void __devinit | 226 | static void sisfb_get_vga_mode_from_kernel(void) |
| 229 | sisfb_get_vga_mode_from_kernel(void) | ||
| 230 | { | 227 | { |
| 231 | #ifdef CONFIG_X86 | 228 | #ifdef CONFIG_X86 |
| 232 | char mymode[32]; | 229 | char mymode[32]; |
| @@ -345,8 +342,7 @@ sisfb_search_specialtiming(const char *name) | |||
| 345 | 342 | ||
| 346 | /* ----------- Various detection routines ----------- */ | 343 | /* ----------- Various detection routines ----------- */ |
| 347 | 344 | ||
| 348 | static void __devinit | 345 | static void sisfb_detect_custom_timing(struct sis_video_info *ivideo) |
| 349 | sisfb_detect_custom_timing(struct sis_video_info *ivideo) | ||
| 350 | { | 346 | { |
| 351 | unsigned char *biosver = NULL; | 347 | unsigned char *biosver = NULL; |
| 352 | unsigned char *biosdate = NULL; | 348 | unsigned char *biosdate = NULL; |
| @@ -403,8 +399,7 @@ sisfb_detect_custom_timing(struct sis_video_info *ivideo) | |||
| 403 | } while(mycustomttable[i].chipID); | 399 | } while(mycustomttable[i].chipID); |
| 404 | } | 400 | } |
| 405 | 401 | ||
| 406 | static bool __devinit | 402 | static bool sisfb_interpret_edid(struct sisfb_monitor *monitor, u8 *buffer) |
| 407 | sisfb_interpret_edid(struct sisfb_monitor *monitor, u8 *buffer) | ||
| 408 | { | 403 | { |
| 409 | int i, j, xres, yres, refresh, index; | 404 | int i, j, xres, yres, refresh, index; |
| 410 | u32 emodes; | 405 | u32 emodes; |
| @@ -505,8 +500,8 @@ sisfb_interpret_edid(struct sisfb_monitor *monitor, u8 *buffer) | |||
| 505 | return monitor->datavalid; | 500 | return monitor->datavalid; |
| 506 | } | 501 | } |
| 507 | 502 | ||
| 508 | static void __devinit | 503 | static void sisfb_handle_ddc(struct sis_video_info *ivideo, |
| 509 | sisfb_handle_ddc(struct sis_video_info *ivideo, struct sisfb_monitor *monitor, int crtno) | 504 | struct sisfb_monitor *monitor, int crtno) |
| 510 | { | 505 | { |
| 511 | unsigned short temp, i, realcrtno = crtno; | 506 | unsigned short temp, i, realcrtno = crtno; |
| 512 | unsigned char buffer[256]; | 507 | unsigned char buffer[256]; |
| @@ -1898,8 +1893,7 @@ static struct fb_ops sisfb_ops = { | |||
| 1898 | 1893 | ||
| 1899 | /* ---------------- Chip generation dependent routines ---------------- */ | 1894 | /* ---------------- Chip generation dependent routines ---------------- */ |
| 1900 | 1895 | ||
| 1901 | static struct pci_dev * __devinit | 1896 | static struct pci_dev *sisfb_get_northbridge(int basechipid) |
| 1902 | sisfb_get_northbridge(int basechipid) | ||
| 1903 | { | 1897 | { |
| 1904 | struct pci_dev *pdev = NULL; | 1898 | struct pci_dev *pdev = NULL; |
| 1905 | int nbridgenum, nbridgeidx, i; | 1899 | int nbridgenum, nbridgeidx, i; |
| @@ -1938,8 +1932,7 @@ sisfb_get_northbridge(int basechipid) | |||
| 1938 | return pdev; | 1932 | return pdev; |
| 1939 | } | 1933 | } |
| 1940 | 1934 | ||
| 1941 | static int __devinit | 1935 | static int sisfb_get_dram_size(struct sis_video_info *ivideo) |
| 1942 | sisfb_get_dram_size(struct sis_video_info *ivideo) | ||
| 1943 | { | 1936 | { |
| 1944 | #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315) | 1937 | #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315) |
| 1945 | u8 reg; | 1938 | u8 reg; |
| @@ -2038,8 +2031,7 @@ sisfb_get_dram_size(struct sis_video_info *ivideo) | |||
| 2038 | 2031 | ||
| 2039 | /* -------------- video bridge device detection --------------- */ | 2032 | /* -------------- video bridge device detection --------------- */ |
| 2040 | 2033 | ||
| 2041 | static void __devinit | 2034 | static void sisfb_detect_VB_connect(struct sis_video_info *ivideo) |
| 2042 | sisfb_detect_VB_connect(struct sis_video_info *ivideo) | ||
| 2043 | { | 2035 | { |
| 2044 | u8 cr32, temp; | 2036 | u8 cr32, temp; |
| 2045 | 2037 | ||
| @@ -2164,8 +2156,7 @@ sisfb_detect_VB_connect(struct sis_video_info *ivideo) | |||
| 2164 | 2156 | ||
| 2165 | /* ------------------ Sensing routines ------------------ */ | 2157 | /* ------------------ Sensing routines ------------------ */ |
| 2166 | 2158 | ||
| 2167 | static bool __devinit | 2159 | static bool sisfb_test_DDC1(struct sis_video_info *ivideo) |
| 2168 | sisfb_test_DDC1(struct sis_video_info *ivideo) | ||
| 2169 | { | 2160 | { |
| 2170 | unsigned short old; | 2161 | unsigned short old; |
| 2171 | int count = 48; | 2162 | int count = 48; |
| @@ -2177,8 +2168,7 @@ sisfb_test_DDC1(struct sis_video_info *ivideo) | |||
| 2177 | return (count != -1); | 2168 | return (count != -1); |
| 2178 | } | 2169 | } |
| 2179 | 2170 | ||
| 2180 | static void __devinit | 2171 | static void sisfb_sense_crt1(struct sis_video_info *ivideo) |
| 2181 | sisfb_sense_crt1(struct sis_video_info *ivideo) | ||
| 2182 | { | 2172 | { |
| 2183 | bool mustwait = false; | 2173 | bool mustwait = false; |
| 2184 | u8 sr1F, cr17; | 2174 | u8 sr1F, cr17; |
| @@ -2259,8 +2249,7 @@ sisfb_sense_crt1(struct sis_video_info *ivideo) | |||
| 2259 | } | 2249 | } |
| 2260 | 2250 | ||
| 2261 | /* Determine and detect attached devices on SiS30x */ | 2251 | /* Determine and detect attached devices on SiS30x */ |
| 2262 | static void __devinit | 2252 | static void SiS_SenseLCD(struct sis_video_info *ivideo) |
| 2263 | SiS_SenseLCD(struct sis_video_info *ivideo) | ||
| 2264 | { | 2253 | { |
| 2265 | unsigned char buffer[256]; | 2254 | unsigned char buffer[256]; |
| 2266 | unsigned short temp, realcrtno, i; | 2255 | unsigned short temp, realcrtno, i; |
| @@ -2347,8 +2336,7 @@ SiS_SenseLCD(struct sis_video_info *ivideo) | |||
| 2347 | ivideo->SiS_Pr.PanelSelfDetected = true; | 2336 | ivideo->SiS_Pr.PanelSelfDetected = true; |
| 2348 | } | 2337 | } |
| 2349 | 2338 | ||
| 2350 | static int __devinit | 2339 | static int SISDoSense(struct sis_video_info *ivideo, u16 type, u16 test) |
| 2351 | SISDoSense(struct sis_video_info *ivideo, u16 type, u16 test) | ||
| 2352 | { | 2340 | { |
| 2353 | int temp, mytest, result, i, j; | 2341 | int temp, mytest, result, i, j; |
| 2354 | 2342 | ||
| @@ -2377,8 +2365,7 @@ SISDoSense(struct sis_video_info *ivideo, u16 type, u16 test) | |||
| 2377 | return result; | 2365 | return result; |
| 2378 | } | 2366 | } |
| 2379 | 2367 | ||
| 2380 | static void __devinit | 2368 | static void SiS_Sense30x(struct sis_video_info *ivideo) |
| 2381 | SiS_Sense30x(struct sis_video_info *ivideo) | ||
| 2382 | { | 2369 | { |
| 2383 | u8 backupP4_0d,backupP2_00,backupP2_4d,backupSR_1e,biosflag=0; | 2370 | u8 backupP4_0d,backupP2_00,backupP2_4d,backupSR_1e,biosflag=0; |
| 2384 | u16 svhs=0, svhs_c=0; | 2371 | u16 svhs=0, svhs_c=0; |
| @@ -2518,8 +2505,7 @@ SiS_Sense30x(struct sis_video_info *ivideo) | |||
| 2518 | } | 2505 | } |
| 2519 | 2506 | ||
| 2520 | /* Determine and detect attached TV's on Chrontel */ | 2507 | /* Determine and detect attached TV's on Chrontel */ |
| 2521 | static void __devinit | 2508 | static void SiS_SenseCh(struct sis_video_info *ivideo) |
| 2522 | SiS_SenseCh(struct sis_video_info *ivideo) | ||
| 2523 | { | 2509 | { |
| 2524 | #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315) | 2510 | #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315) |
| 2525 | u8 temp1, temp2; | 2511 | u8 temp1, temp2; |
| @@ -2643,8 +2629,7 @@ SiS_SenseCh(struct sis_video_info *ivideo) | |||
| 2643 | } | 2629 | } |
| 2644 | } | 2630 | } |
| 2645 | 2631 | ||
| 2646 | static void __devinit | 2632 | static void sisfb_get_VB_type(struct sis_video_info *ivideo) |
| 2647 | sisfb_get_VB_type(struct sis_video_info *ivideo) | ||
| 2648 | { | 2633 | { |
| 2649 | char stdstr[] = "sisfb: Detected"; | 2634 | char stdstr[] = "sisfb: Detected"; |
| 2650 | char bridgestr[] = "video bridge"; | 2635 | char bridgestr[] = "video bridge"; |
| @@ -2906,8 +2891,7 @@ sisfb_engine_init(struct sis_video_info *ivideo) | |||
| 2906 | ivideo->engineok = 1; | 2891 | ivideo->engineok = 1; |
| 2907 | } | 2892 | } |
| 2908 | 2893 | ||
| 2909 | static void __devinit | 2894 | static void sisfb_detect_lcd_type(struct sis_video_info *ivideo) |
| 2910 | sisfb_detect_lcd_type(struct sis_video_info *ivideo) | ||
| 2911 | { | 2895 | { |
| 2912 | u8 reg; | 2896 | u8 reg; |
| 2913 | int i; | 2897 | int i; |
| @@ -2962,8 +2946,7 @@ sisfb_detect_lcd_type(struct sis_video_info *ivideo) | |||
| 2962 | ivideo->lcdxres, ivideo->lcdyres); | 2946 | ivideo->lcdxres, ivideo->lcdyres); |
| 2963 | } | 2947 | } |
| 2964 | 2948 | ||
| 2965 | static void __devinit | 2949 | static void sisfb_save_pdc_emi(struct sis_video_info *ivideo) |
| 2966 | sisfb_save_pdc_emi(struct sis_video_info *ivideo) | ||
| 2967 | { | 2950 | { |
| 2968 | #ifdef CONFIG_FB_SIS_300 | 2951 | #ifdef CONFIG_FB_SIS_300 |
| 2969 | /* Save the current PanelDelayCompensation if the LCD is currently used */ | 2952 | /* Save the current PanelDelayCompensation if the LCD is currently used */ |
| @@ -3081,8 +3064,7 @@ sisfb_save_pdc_emi(struct sis_video_info *ivideo) | |||
| 3081 | 3064 | ||
| 3082 | /* -------------------- Memory manager routines ---------------------- */ | 3065 | /* -------------------- Memory manager routines ---------------------- */ |
| 3083 | 3066 | ||
| 3084 | static u32 __devinit | 3067 | static u32 sisfb_getheapstart(struct sis_video_info *ivideo) |
| 3085 | sisfb_getheapstart(struct sis_video_info *ivideo) | ||
| 3086 | { | 3068 | { |
| 3087 | u32 ret = ivideo->sisfb_parm_mem * 1024; | 3069 | u32 ret = ivideo->sisfb_parm_mem * 1024; |
| 3088 | u32 maxoffs = ivideo->video_size - ivideo->hwcursor_size - ivideo->cmdQueueSize; | 3070 | u32 maxoffs = ivideo->video_size - ivideo->hwcursor_size - ivideo->cmdQueueSize; |
| @@ -3128,8 +3110,7 @@ sisfb_getheapstart(struct sis_video_info *ivideo) | |||
| 3128 | return ret; | 3110 | return ret; |
| 3129 | } | 3111 | } |
| 3130 | 3112 | ||
| 3131 | static u32 __devinit | 3113 | static u32 sisfb_getheapsize(struct sis_video_info *ivideo) |
| 3132 | sisfb_getheapsize(struct sis_video_info *ivideo) | ||
| 3133 | { | 3114 | { |
| 3134 | u32 max = ivideo->video_size - ivideo->hwcursor_size - ivideo->cmdQueueSize; | 3115 | u32 max = ivideo->video_size - ivideo->hwcursor_size - ivideo->cmdQueueSize; |
| 3135 | u32 ret = 0; | 3116 | u32 ret = 0; |
| @@ -3154,8 +3135,7 @@ sisfb_getheapsize(struct sis_video_info *ivideo) | |||
| 3154 | return ret; | 3135 | return ret; |
| 3155 | } | 3136 | } |
| 3156 | 3137 | ||
| 3157 | static int __devinit | 3138 | static int sisfb_heap_init(struct sis_video_info *ivideo) |
| 3158 | sisfb_heap_init(struct sis_video_info *ivideo) | ||
| 3159 | { | 3139 | { |
| 3160 | struct SIS_OH *poh; | 3140 | struct SIS_OH *poh; |
| 3161 | 3141 | ||
| @@ -4061,8 +4041,8 @@ static int __init sisfb_setup(char *options) | |||
| 4061 | } | 4041 | } |
| 4062 | #endif | 4042 | #endif |
| 4063 | 4043 | ||
| 4064 | static int __devinit | 4044 | static int sisfb_check_rom(void __iomem *rom_base, |
| 4065 | sisfb_check_rom(void __iomem *rom_base, struct sis_video_info *ivideo) | 4045 | struct sis_video_info *ivideo) |
| 4066 | { | 4046 | { |
| 4067 | void __iomem *rom; | 4047 | void __iomem *rom; |
| 4068 | int romptr; | 4048 | int romptr; |
| @@ -4089,8 +4069,7 @@ sisfb_check_rom(void __iomem *rom_base, struct sis_video_info *ivideo) | |||
| 4089 | return 1; | 4069 | return 1; |
| 4090 | } | 4070 | } |
| 4091 | 4071 | ||
| 4092 | static unsigned char * __devinit | 4072 | static unsigned char *sisfb_find_rom(struct pci_dev *pdev) |
| 4093 | sisfb_find_rom(struct pci_dev *pdev) | ||
| 4094 | { | 4073 | { |
| 4095 | struct sis_video_info *ivideo = pci_get_drvdata(pdev); | 4074 | struct sis_video_info *ivideo = pci_get_drvdata(pdev); |
| 4096 | void __iomem *rom_base; | 4075 | void __iomem *rom_base; |
| @@ -4149,9 +4128,8 @@ sisfb_find_rom(struct pci_dev *pdev) | |||
| 4149 | return myrombase; | 4128 | return myrombase; |
| 4150 | } | 4129 | } |
| 4151 | 4130 | ||
| 4152 | static void __devinit | 4131 | static void sisfb_post_map_vram(struct sis_video_info *ivideo, |
| 4153 | sisfb_post_map_vram(struct sis_video_info *ivideo, unsigned int *mapsize, | 4132 | unsigned int *mapsize, unsigned int min) |
| 4154 | unsigned int min) | ||
| 4155 | { | 4133 | { |
| 4156 | if (*mapsize < (min << 20)) | 4134 | if (*mapsize < (min << 20)) |
| 4157 | return; | 4135 | return; |
| @@ -4176,8 +4154,7 @@ sisfb_post_map_vram(struct sis_video_info *ivideo, unsigned int *mapsize, | |||
| 4176 | } | 4154 | } |
| 4177 | 4155 | ||
| 4178 | #ifdef CONFIG_FB_SIS_300 | 4156 | #ifdef CONFIG_FB_SIS_300 |
| 4179 | static int __devinit | 4157 | static int sisfb_post_300_buswidth(struct sis_video_info *ivideo) |
| 4180 | sisfb_post_300_buswidth(struct sis_video_info *ivideo) | ||
| 4181 | { | 4158 | { |
| 4182 | void __iomem *FBAddress = ivideo->video_vbase; | 4159 | void __iomem *FBAddress = ivideo->video_vbase; |
| 4183 | unsigned short temp; | 4160 | unsigned short temp; |
| @@ -4222,7 +4199,7 @@ sisfb_post_300_buswidth(struct sis_video_info *ivideo) | |||
| 4222 | return 1; /* 32bit */ | 4199 | return 1; /* 32bit */ |
| 4223 | } | 4200 | } |
| 4224 | 4201 | ||
| 4225 | static const unsigned short __devinitconst SiS_DRAMType[17][5] = { | 4202 | static const unsigned short SiS_DRAMType[17][5] = { |
| 4226 | {0x0C,0x0A,0x02,0x40,0x39}, | 4203 | {0x0C,0x0A,0x02,0x40,0x39}, |
| 4227 | {0x0D,0x0A,0x01,0x40,0x48}, | 4204 | {0x0D,0x0A,0x01,0x40,0x48}, |
| 4228 | {0x0C,0x09,0x02,0x20,0x35}, | 4205 | {0x0C,0x09,0x02,0x20,0x35}, |
| @@ -4242,10 +4219,9 @@ static const unsigned short __devinitconst SiS_DRAMType[17][5] = { | |||
| 4242 | {0x09,0x08,0x01,0x01,0x00} | 4219 | {0x09,0x08,0x01,0x01,0x00} |
| 4243 | }; | 4220 | }; |
| 4244 | 4221 | ||
| 4245 | static int __devinit | 4222 | static int sisfb_post_300_rwtest(struct sis_video_info *ivideo, int iteration, |
| 4246 | sisfb_post_300_rwtest(struct sis_video_info *ivideo, int iteration, int buswidth, | 4223 | int buswidth, int PseudoRankCapacity, |
| 4247 | int PseudoRankCapacity, int PseudoAdrPinCount, | 4224 | int PseudoAdrPinCount, unsigned int mapsize) |
| 4248 | unsigned int mapsize) | ||
| 4249 | { | 4225 | { |
| 4250 | void __iomem *FBAddr = ivideo->video_vbase; | 4226 | void __iomem *FBAddr = ivideo->video_vbase; |
| 4251 | unsigned short sr14; | 4227 | unsigned short sr14; |
| @@ -4309,8 +4285,7 @@ sisfb_post_300_rwtest(struct sis_video_info *ivideo, int iteration, int buswidth | |||
| 4309 | return 0; | 4285 | return 0; |
| 4310 | } | 4286 | } |
| 4311 | 4287 | ||
| 4312 | static void __devinit | 4288 | static void sisfb_post_300_ramsize(struct pci_dev *pdev, unsigned int mapsize) |
| 4313 | sisfb_post_300_ramsize(struct pci_dev *pdev, unsigned int mapsize) | ||
| 4314 | { | 4289 | { |
| 4315 | struct sis_video_info *ivideo = pci_get_drvdata(pdev); | 4290 | struct sis_video_info *ivideo = pci_get_drvdata(pdev); |
| 4316 | int i, j, buswidth; | 4291 | int i, j, buswidth; |
| @@ -4335,8 +4310,7 @@ sisfb_post_300_ramsize(struct pci_dev *pdev, unsigned int mapsize) | |||
| 4335 | } | 4310 | } |
| 4336 | } | 4311 | } |
| 4337 | 4312 | ||
| 4338 | static void __devinit | 4313 | static void sisfb_post_sis300(struct pci_dev *pdev) |
| 4339 | sisfb_post_sis300(struct pci_dev *pdev) | ||
| 4340 | { | 4314 | { |
| 4341 | struct sis_video_info *ivideo = pci_get_drvdata(pdev); | 4315 | struct sis_video_info *ivideo = pci_get_drvdata(pdev); |
| 4342 | unsigned char *bios = ivideo->SiS_Pr.VirtualRomBase; | 4316 | unsigned char *bios = ivideo->SiS_Pr.VirtualRomBase; |
| @@ -4547,8 +4521,7 @@ sisfb_post_sis300(struct pci_dev *pdev) | |||
| 4547 | 4521 | ||
| 4548 | #ifdef CONFIG_FB_SIS_315 | 4522 | #ifdef CONFIG_FB_SIS_315 |
| 4549 | #if 0 | 4523 | #if 0 |
| 4550 | static void __devinit | 4524 | static void sisfb_post_sis315330(struct pci_dev *pdev) |
| 4551 | sisfb_post_sis315330(struct pci_dev *pdev) | ||
| 4552 | { | 4525 | { |
| 4553 | /* TODO */ | 4526 | /* TODO */ |
| 4554 | } | 4527 | } |
| @@ -4559,8 +4532,7 @@ static inline int sisfb_xgi_is21(struct sis_video_info *ivideo) | |||
| 4559 | return ivideo->chip_real_id == XGI_21; | 4532 | return ivideo->chip_real_id == XGI_21; |
| 4560 | } | 4533 | } |
| 4561 | 4534 | ||
| 4562 | static void __devinit | 4535 | static void sisfb_post_xgi_delay(struct sis_video_info *ivideo, int delay) |
| 4563 | sisfb_post_xgi_delay(struct sis_video_info *ivideo, int delay) | ||
| 4564 | { | 4536 | { |
| 4565 | unsigned int i; | 4537 | unsigned int i; |
| 4566 | u8 reg; | 4538 | u8 reg; |
| @@ -4571,9 +4543,9 @@ sisfb_post_xgi_delay(struct sis_video_info *ivideo, int delay) | |||
| 4571 | } | 4543 | } |
| 4572 | } | 4544 | } |
| 4573 | 4545 | ||
| 4574 | static int __devinit | 4546 | static int sisfb_find_host_bridge(struct sis_video_info *ivideo, |
| 4575 | sisfb_find_host_bridge(struct sis_video_info *ivideo, struct pci_dev *mypdev, | 4547 | struct pci_dev *mypdev, |
| 4576 | unsigned short pcivendor) | 4548 | unsigned short pcivendor) |
| 4577 | { | 4549 | { |
| 4578 | struct pci_dev *pdev = NULL; | 4550 | struct pci_dev *pdev = NULL; |
| 4579 | unsigned short temp; | 4551 | unsigned short temp; |
| @@ -4591,9 +4563,8 @@ sisfb_find_host_bridge(struct sis_video_info *ivideo, struct pci_dev *mypdev, | |||
| 4591 | return ret; | 4563 | return ret; |
| 4592 | } | 4564 | } |
| 4593 | 4565 | ||
| 4594 | static int __devinit | 4566 | static int sisfb_post_xgi_rwtest(struct sis_video_info *ivideo, int starta, |
| 4595 | sisfb_post_xgi_rwtest(struct sis_video_info *ivideo, int starta, | 4567 | unsigned int enda, unsigned int mapsize) |
| 4596 | unsigned int enda, unsigned int mapsize) | ||
| 4597 | { | 4568 | { |
| 4598 | unsigned int pos; | 4569 | unsigned int pos; |
| 4599 | int i; | 4570 | int i; |
| @@ -4623,8 +4594,7 @@ sisfb_post_xgi_rwtest(struct sis_video_info *ivideo, int starta, | |||
| 4623 | return 1; | 4594 | return 1; |
| 4624 | } | 4595 | } |
| 4625 | 4596 | ||
| 4626 | static int __devinit | 4597 | static int sisfb_post_xgi_ramsize(struct sis_video_info *ivideo) |
| 4627 | sisfb_post_xgi_ramsize(struct sis_video_info *ivideo) | ||
| 4628 | { | 4598 | { |
| 4629 | unsigned int buswidth, ranksize, channelab, mapsize; | 4599 | unsigned int buswidth, ranksize, channelab, mapsize; |
| 4630 | int i, j, k, l, status; | 4600 | int i, j, k, l, status; |
| @@ -4876,8 +4846,7 @@ bail_out: | |||
| 4876 | return status; | 4846 | return status; |
| 4877 | } | 4847 | } |
| 4878 | 4848 | ||
| 4879 | static void __devinit | 4849 | static void sisfb_post_xgi_setclocks(struct sis_video_info *ivideo, u8 regb) |
| 4880 | sisfb_post_xgi_setclocks(struct sis_video_info *ivideo, u8 regb) | ||
| 4881 | { | 4850 | { |
| 4882 | u8 v1, v2, v3; | 4851 | u8 v1, v2, v3; |
| 4883 | int index; | 4852 | int index; |
| @@ -4932,8 +4901,8 @@ sisfb_post_xgi_setclocks(struct sis_video_info *ivideo, u8 regb) | |||
| 4932 | sisfb_post_xgi_delay(ivideo, 0x43); | 4901 | sisfb_post_xgi_delay(ivideo, 0x43); |
| 4933 | } | 4902 | } |
| 4934 | 4903 | ||
| 4935 | static void __devinit | 4904 | static void sisfb_post_xgi_ddr2_mrs_default(struct sis_video_info *ivideo, |
| 4936 | sisfb_post_xgi_ddr2_mrs_default(struct sis_video_info *ivideo, u8 regb) | 4905 | u8 regb) |
| 4937 | { | 4906 | { |
| 4938 | unsigned char *bios = ivideo->bios_abase; | 4907 | unsigned char *bios = ivideo->bios_abase; |
| 4939 | u8 v1; | 4908 | u8 v1; |
| @@ -4973,8 +4942,7 @@ sisfb_post_xgi_ddr2_mrs_default(struct sis_video_info *ivideo, u8 regb) | |||
| 4973 | sisfb_post_xgi_delay(ivideo, 1); | 4942 | sisfb_post_xgi_delay(ivideo, 1); |
| 4974 | } | 4943 | } |
| 4975 | 4944 | ||
| 4976 | static void __devinit | 4945 | static void sisfb_post_xgi_ddr2_mrs_xg21(struct sis_video_info *ivideo) |
| 4977 | sisfb_post_xgi_ddr2_mrs_xg21(struct sis_video_info *ivideo) | ||
| 4978 | { | 4946 | { |
| 4979 | sisfb_post_xgi_setclocks(ivideo, 1); | 4947 | sisfb_post_xgi_setclocks(ivideo, 1); |
| 4980 | 4948 | ||
| @@ -5015,8 +4983,7 @@ sisfb_post_xgi_ddr2_mrs_xg21(struct sis_video_info *ivideo) | |||
| 5015 | sisfb_post_xgi_delay(ivideo, 1); | 4983 | sisfb_post_xgi_delay(ivideo, 1); |
| 5016 | } | 4984 | } |
| 5017 | 4985 | ||
| 5018 | static void __devinit | 4986 | static void sisfb_post_xgi_ddr2(struct sis_video_info *ivideo, u8 regb) |
| 5019 | sisfb_post_xgi_ddr2(struct sis_video_info *ivideo, u8 regb) | ||
| 5020 | { | 4987 | { |
| 5021 | unsigned char *bios = ivideo->bios_abase; | 4988 | unsigned char *bios = ivideo->bios_abase; |
| 5022 | static const u8 cs158[8] = { | 4989 | static const u8 cs158[8] = { |
| @@ -5061,8 +5028,7 @@ sisfb_post_xgi_ddr2(struct sis_video_info *ivideo, u8 regb) | |||
| 5061 | sisfb_post_xgi_ddr2_mrs_default(ivideo, regb); | 5028 | sisfb_post_xgi_ddr2_mrs_default(ivideo, regb); |
| 5062 | } | 5029 | } |
| 5063 | 5030 | ||
| 5064 | static u8 __devinit | 5031 | static u8 sisfb_post_xgi_ramtype(struct sis_video_info *ivideo) |
| 5065 | sisfb_post_xgi_ramtype(struct sis_video_info *ivideo) | ||
| 5066 | { | 5032 | { |
| 5067 | unsigned char *bios = ivideo->bios_abase; | 5033 | unsigned char *bios = ivideo->bios_abase; |
| 5068 | u8 ramtype; | 5034 | u8 ramtype; |
| @@ -5101,8 +5067,7 @@ sisfb_post_xgi_ramtype(struct sis_video_info *ivideo) | |||
| 5101 | return ramtype; | 5067 | return ramtype; |
| 5102 | } | 5068 | } |
| 5103 | 5069 | ||
| 5104 | static int __devinit | 5070 | static int sisfb_post_xgi(struct pci_dev *pdev) |
| 5105 | sisfb_post_xgi(struct pci_dev *pdev) | ||
| 5106 | { | 5071 | { |
| 5107 | struct sis_video_info *ivideo = pci_get_drvdata(pdev); | 5072 | struct sis_video_info *ivideo = pci_get_drvdata(pdev); |
| 5108 | unsigned char *bios = ivideo->bios_abase; | 5073 | unsigned char *bios = ivideo->bios_abase; |
| @@ -5839,8 +5804,7 @@ sisfb_post_xgi(struct pci_dev *pdev) | |||
| 5839 | } | 5804 | } |
| 5840 | #endif | 5805 | #endif |
| 5841 | 5806 | ||
| 5842 | static int __devinit | 5807 | static int sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 5843 | sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | ||
| 5844 | { | 5808 | { |
| 5845 | struct sisfb_chip_info *chipinfo = &sisfb_chip_info[ent->driver_data]; | 5809 | struct sisfb_chip_info *chipinfo = &sisfb_chip_info[ent->driver_data]; |
| 5846 | struct sis_video_info *ivideo = NULL; | 5810 | struct sis_video_info *ivideo = NULL; |
| @@ -6530,7 +6494,7 @@ error_3: vfree(ivideo->bios_abase); | |||
| 6530 | /* PCI DEVICE HANDLING */ | 6494 | /* PCI DEVICE HANDLING */ |
| 6531 | /*****************************************************/ | 6495 | /*****************************************************/ |
| 6532 | 6496 | ||
| 6533 | static void __devexit sisfb_remove(struct pci_dev *pdev) | 6497 | static void sisfb_remove(struct pci_dev *pdev) |
| 6534 | { | 6498 | { |
| 6535 | struct sis_video_info *ivideo = pci_get_drvdata(pdev); | 6499 | struct sis_video_info *ivideo = pci_get_drvdata(pdev); |
| 6536 | struct fb_info *sis_fb_info = ivideo->memyselfandi; | 6500 | struct fb_info *sis_fb_info = ivideo->memyselfandi; |
| @@ -6591,7 +6555,7 @@ static struct pci_driver sisfb_driver = { | |||
| 6591 | .name = "sisfb", | 6555 | .name = "sisfb", |
| 6592 | .id_table = sisfb_pci_table, | 6556 | .id_table = sisfb_pci_table, |
| 6593 | .probe = sisfb_probe, | 6557 | .probe = sisfb_probe, |
| 6594 | .remove = __devexit_p(sisfb_remove) | 6558 | .remove = sisfb_remove, |
| 6595 | }; | 6559 | }; |
| 6596 | 6560 | ||
| 6597 | static int __init sisfb_init(void) | 6561 | static int __init sisfb_init(void) |
diff --git a/drivers/video/sis/sis_main.h b/drivers/video/sis/sis_main.h index 9540e977270e..32e23c209430 100644 --- a/drivers/video/sis/sis_main.h +++ b/drivers/video/sis/sis_main.h | |||
| @@ -98,7 +98,7 @@ static struct sisfb_chip_info { | |||
| 98 | int hwcursor_size; | 98 | int hwcursor_size; |
| 99 | int CRT2_write_enable; | 99 | int CRT2_write_enable; |
| 100 | const char *chip_name; | 100 | const char *chip_name; |
| 101 | } sisfb_chip_info[] __devinitdata = { | 101 | } sisfb_chip_info[] = { |
| 102 | { SIS_300, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 300/305" }, | 102 | { SIS_300, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 300/305" }, |
| 103 | { SIS_540, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 540" }, | 103 | { SIS_540, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 540" }, |
| 104 | { SIS_630, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 630" }, | 104 | { SIS_630, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 630" }, |
| @@ -113,7 +113,7 @@ static struct sisfb_chip_info { | |||
| 113 | { XGI_40, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "XGI V3XT/V5/V8" }, | 113 | { XGI_40, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "XGI V3XT/V5/V8" }, |
| 114 | }; | 114 | }; |
| 115 | 115 | ||
| 116 | static struct pci_device_id __devinitdata sisfb_pci_table[] = { | 116 | static struct pci_device_id sisfb_pci_table[] = { |
| 117 | #ifdef CONFIG_FB_SIS_300 | 117 | #ifdef CONFIG_FB_SIS_300 |
| 118 | { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 118 | { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
| 119 | { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_540_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, | 119 | { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_540_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, |
| @@ -317,7 +317,7 @@ static struct _sis_lcd_data { | |||
| 317 | u16 xres; | 317 | u16 xres; |
| 318 | u16 yres; | 318 | u16 yres; |
| 319 | u8 default_mode_idx; | 319 | u8 default_mode_idx; |
| 320 | } sis_lcd_data[] __devinitdata = { | 320 | } sis_lcd_data[] = { |
| 321 | { LCD_640x480, 640, 480, 23 }, | 321 | { LCD_640x480, 640, 480, 23 }, |
| 322 | { LCD_800x600, 800, 600, 43 }, | 322 | { LCD_800x600, 800, 600, 43 }, |
| 323 | { LCD_1024x600, 1024, 600, 67 }, | 323 | { LCD_1024x600, 1024, 600, 67 }, |
| @@ -339,21 +339,21 @@ static struct _sis_lcd_data { | |||
| 339 | }; | 339 | }; |
| 340 | 340 | ||
| 341 | /* CR36 evaluation */ | 341 | /* CR36 evaluation */ |
| 342 | static unsigned short sis300paneltype[] __devinitdata = { | 342 | static unsigned short sis300paneltype[] = { |
| 343 | LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, | 343 | LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, |
| 344 | LCD_1280x960, LCD_640x480, LCD_1024x600, LCD_1152x768, | 344 | LCD_1280x960, LCD_640x480, LCD_1024x600, LCD_1152x768, |
| 345 | LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, | 345 | LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, |
| 346 | LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN | 346 | LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN |
| 347 | }; | 347 | }; |
| 348 | 348 | ||
| 349 | static unsigned short sis310paneltype[] __devinitdata = { | 349 | static unsigned short sis310paneltype[] = { |
| 350 | LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, | 350 | LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, |
| 351 | LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960, | 351 | LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960, |
| 352 | LCD_1152x768, LCD_1400x1050, LCD_1280x768, LCD_1600x1200, | 352 | LCD_1152x768, LCD_1400x1050, LCD_1280x768, LCD_1600x1200, |
| 353 | LCD_320x240_2, LCD_320x240_3, LCD_UNKNOWN, LCD_UNKNOWN | 353 | LCD_320x240_2, LCD_320x240_3, LCD_UNKNOWN, LCD_UNKNOWN |
| 354 | }; | 354 | }; |
| 355 | 355 | ||
| 356 | static unsigned short sis661paneltype[] __devinitdata = { | 356 | static unsigned short sis661paneltype[] = { |
| 357 | LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, | 357 | LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, |
| 358 | LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960, | 358 | LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960, |
| 359 | LCD_1280x854, LCD_1400x1050, LCD_1280x768, LCD_1600x1200, | 359 | LCD_1280x854, LCD_1400x1050, LCD_1280x768, LCD_1600x1200, |
| @@ -466,7 +466,7 @@ static struct _sisfbddcsmodes { | |||
| 466 | u16 h; | 466 | u16 h; |
| 467 | u16 v; | 467 | u16 v; |
| 468 | u32 d; | 468 | u32 d; |
| 469 | } sisfb_ddcsmodes[] __devinitdata = { | 469 | } sisfb_ddcsmodes[] = { |
| 470 | { 0x10000, 67, 75, 108000}, | 470 | { 0x10000, 67, 75, 108000}, |
| 471 | { 0x08000, 48, 72, 50000}, | 471 | { 0x08000, 48, 72, 50000}, |
| 472 | { 0x04000, 46, 75, 49500}, | 472 | { 0x04000, 46, 75, 49500}, |
| @@ -488,7 +488,7 @@ static struct _sisfbddcfmodes { | |||
| 488 | u16 v; | 488 | u16 v; |
| 489 | u16 h; | 489 | u16 h; |
| 490 | u32 d; | 490 | u32 d; |
| 491 | } sisfb_ddcfmodes[] __devinitdata = { | 491 | } sisfb_ddcfmodes[] = { |
| 492 | { 1280, 1024, 85, 92, 157500}, | 492 | { 1280, 1024, 85, 92, 157500}, |
| 493 | { 1600, 1200, 60, 75, 162000}, | 493 | { 1600, 1200, 60, 75, 162000}, |
| 494 | { 1600, 1200, 65, 82, 175500}, | 494 | { 1600, 1200, 65, 82, 175500}, |
| @@ -505,7 +505,7 @@ static struct _chswtable { | |||
| 505 | u16 subsysCard; | 505 | u16 subsysCard; |
| 506 | char *vendorName; | 506 | char *vendorName; |
| 507 | char *cardName; | 507 | char *cardName; |
| 508 | } mychswtable[] __devinitdata = { | 508 | } mychswtable[] = { |
| 509 | { 0x1631, 0x1002, "Mitachi", "0x1002" }, | 509 | { 0x1631, 0x1002, "Mitachi", "0x1002" }, |
| 510 | { 0x1071, 0x7521, "Mitac" , "7521P" }, | 510 | { 0x1071, 0x7521, "Mitac" , "7521P" }, |
| 511 | { 0, 0, "" , "" } | 511 | { 0, 0, "" , "" } |
| @@ -525,7 +525,7 @@ static struct _customttable { | |||
| 525 | char *cardName; | 525 | char *cardName; |
| 526 | u32 SpecialID; | 526 | u32 SpecialID; |
| 527 | char *optionName; | 527 | char *optionName; |
| 528 | } mycustomttable[] __devinitdata = { | 528 | } mycustomttable[] = { |
| 529 | { SIS_630, "2.00.07", "09/27/2002-13:38:25", | 529 | { SIS_630, "2.00.07", "09/27/2002-13:38:25", |
| 530 | 0x3240A8, | 530 | 0x3240A8, |
| 531 | { 0x220, 0x227, 0x228, 0x229, 0x0ee }, | 531 | { 0x220, 0x227, 0x228, 0x229, 0x0ee }, |
diff --git a/drivers/video/skeletonfb.c b/drivers/video/skeletonfb.c index 5b6abc6de84b..2d4694c6b9e0 100644 --- a/drivers/video/skeletonfb.c +++ b/drivers/video/skeletonfb.c | |||
| @@ -63,7 +63,7 @@ | |||
| 63 | /* | 63 | /* |
| 64 | * Driver data | 64 | * Driver data |
| 65 | */ | 65 | */ |
| 66 | static char *mode_option __devinitdata; | 66 | static char *mode_option; |
| 67 | 67 | ||
| 68 | /* | 68 | /* |
| 69 | * If your driver supports multiple boards, you should make the | 69 | * If your driver supports multiple boards, you should make the |
| @@ -84,7 +84,7 @@ struct xxx_par; | |||
| 84 | * if we don't use modedb. If we do use modedb see xxxfb_init how to use it | 84 | * if we don't use modedb. If we do use modedb see xxxfb_init how to use it |
| 85 | * to get a fb_var_screeninfo. Otherwise define a default var as well. | 85 | * to get a fb_var_screeninfo. Otherwise define a default var as well. |
| 86 | */ | 86 | */ |
| 87 | static struct fb_fix_screeninfo xxxfb_fix __devinitdata = { | 87 | static struct fb_fix_screeninfo xxxfb_fix = { |
| 88 | .id = "FB's name", | 88 | .id = "FB's name", |
| 89 | .type = FB_TYPE_PACKED_PIXELS, | 89 | .type = FB_TYPE_PACKED_PIXELS, |
| 90 | .visual = FB_VISUAL_PSEUDOCOLOR, | 90 | .visual = FB_VISUAL_PSEUDOCOLOR, |
| @@ -678,8 +678,7 @@ static struct fb_ops xxxfb_ops = { | |||
| 678 | */ | 678 | */ |
| 679 | 679 | ||
| 680 | /* static int __init xxfb_probe (struct platform_device *pdev) -- for platform devs */ | 680 | /* static int __init xxfb_probe (struct platform_device *pdev) -- for platform devs */ |
| 681 | static int __devinit xxxfb_probe(struct pci_dev *dev, | 681 | static int xxxfb_probe(struct pci_dev *dev, const struct pci_device_id *ent) |
| 682 | const struct pci_device_id *ent) | ||
| 683 | { | 682 | { |
| 684 | struct fb_info *info; | 683 | struct fb_info *info; |
| 685 | struct xxx_par *par; | 684 | struct xxx_par *par; |
| @@ -705,9 +704,7 @@ static int __devinit xxxfb_probe(struct pci_dev *dev, | |||
| 705 | */ | 704 | */ |
| 706 | info->screen_base = framebuffer_virtual_memory; | 705 | info->screen_base = framebuffer_virtual_memory; |
| 707 | info->fbops = &xxxfb_ops; | 706 | info->fbops = &xxxfb_ops; |
| 708 | info->fix = xxxfb_fix; /* this will be the only time xxxfb_fix will be | 707 | info->fix = xxxfb_fix; |
| 709 | * used, so mark it as __devinitdata | ||
| 710 | */ | ||
| 711 | info->pseudo_palette = pseudo_palette; /* The pseudopalette is an | 708 | info->pseudo_palette = pseudo_palette; /* The pseudopalette is an |
| 712 | * 16-member array | 709 | * 16-member array |
| 713 | */ | 710 | */ |
| @@ -836,8 +833,8 @@ static int __devinit xxxfb_probe(struct pci_dev *dev, | |||
| 836 | /* | 833 | /* |
| 837 | * Cleanup | 834 | * Cleanup |
| 838 | */ | 835 | */ |
| 839 | /* static void __devexit xxxfb_remove(struct platform_device *pdev) */ | 836 | /* static void xxxfb_remove(struct platform_device *pdev) */ |
| 840 | static void __devexit xxxfb_remove(struct pci_dev *dev) | 837 | static void xxxfb_remove(struct pci_dev *dev) |
| 841 | { | 838 | { |
| 842 | struct fb_info *info = pci_get_drvdata(dev); | 839 | struct fb_info *info = pci_get_drvdata(dev); |
| 843 | /* or platform_get_drvdata(pdev); */ | 840 | /* or platform_get_drvdata(pdev); */ |
| @@ -899,7 +896,7 @@ static struct pci_driver xxxfb_driver = { | |||
| 899 | .name = "xxxfb", | 896 | .name = "xxxfb", |
| 900 | .id_table = xxxfb_id_table, | 897 | .id_table = xxxfb_id_table, |
| 901 | .probe = xxxfb_probe, | 898 | .probe = xxxfb_probe, |
| 902 | .remove = __devexit_p(xxxfb_remove), | 899 | .remove = xxxfb_remove, |
| 903 | .suspend = xxxfb_suspend, /* optional but recommended */ | 900 | .suspend = xxxfb_suspend, /* optional but recommended */ |
| 904 | .resume = xxxfb_resume, /* optional but recommended */ | 901 | .resume = xxxfb_resume, /* optional but recommended */ |
| 905 | }; | 902 | }; |
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c index 3690effbedcc..1501979099dc 100644 --- a/drivers/video/sm501fb.c +++ b/drivers/video/sm501fb.c | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | static char *fb_mode = "640x480-16@60"; | 46 | static char *fb_mode = "640x480-16@60"; |
| 47 | static unsigned long default_bpp = 16; | 47 | static unsigned long default_bpp = 16; |
| 48 | 48 | ||
| 49 | static struct fb_videomode __devinitdata sm501_default_mode = { | 49 | static struct fb_videomode sm501_default_mode = { |
| 50 | .refresh = 60, | 50 | .refresh = 60, |
| 51 | .xres = 640, | 51 | .xres = 640, |
| 52 | .yres = 480, | 52 | .yres = 480, |
| @@ -1664,8 +1664,7 @@ static void sm501fb_stop(struct sm501fb_info *info) | |||
| 1664 | resource_size(info->regs_res)); | 1664 | resource_size(info->regs_res)); |
| 1665 | } | 1665 | } |
| 1666 | 1666 | ||
| 1667 | static int __devinit sm501fb_init_fb(struct fb_info *fb, | 1667 | static int sm501fb_init_fb(struct fb_info *fb, enum sm501_controller head, |
| 1668 | enum sm501_controller head, | ||
| 1669 | const char *fbname) | 1668 | const char *fbname) |
| 1670 | { | 1669 | { |
| 1671 | struct sm501_platdata_fbsub *pd; | 1670 | struct sm501_platdata_fbsub *pd; |
| @@ -1850,8 +1849,8 @@ static struct sm501_platdata_fb sm501fb_def_pdata = { | |||
| 1850 | static char driver_name_crt[] = "sm501fb-crt"; | 1849 | static char driver_name_crt[] = "sm501fb-crt"; |
| 1851 | static char driver_name_pnl[] = "sm501fb-panel"; | 1850 | static char driver_name_pnl[] = "sm501fb-panel"; |
| 1852 | 1851 | ||
| 1853 | static int __devinit sm501fb_probe_one(struct sm501fb_info *info, | 1852 | static int sm501fb_probe_one(struct sm501fb_info *info, |
| 1854 | enum sm501_controller head) | 1853 | enum sm501_controller head) |
| 1855 | { | 1854 | { |
| 1856 | unsigned char *name = (head == HEAD_CRT) ? "crt" : "panel"; | 1855 | unsigned char *name = (head == HEAD_CRT) ? "crt" : "panel"; |
| 1857 | struct sm501_platdata_fbsub *pd; | 1856 | struct sm501_platdata_fbsub *pd; |
| @@ -1892,9 +1891,8 @@ static void sm501_free_init_fb(struct sm501fb_info *info, | |||
| 1892 | fb_dealloc_cmap(&fbi->cmap); | 1891 | fb_dealloc_cmap(&fbi->cmap); |
| 1893 | } | 1892 | } |
| 1894 | 1893 | ||
| 1895 | static int __devinit sm501fb_start_one(struct sm501fb_info *info, | 1894 | static int sm501fb_start_one(struct sm501fb_info *info, |
| 1896 | enum sm501_controller head, | 1895 | enum sm501_controller head, const char *drvname) |
| 1897 | const char *drvname) | ||
| 1898 | { | 1896 | { |
| 1899 | struct fb_info *fbi = info->fb[head]; | 1897 | struct fb_info *fbi = info->fb[head]; |
| 1900 | int ret; | 1898 | int ret; |
| @@ -1922,7 +1920,7 @@ static int __devinit sm501fb_start_one(struct sm501fb_info *info, | |||
| 1922 | return 0; | 1920 | return 0; |
| 1923 | } | 1921 | } |
| 1924 | 1922 | ||
| 1925 | static int __devinit sm501fb_probe(struct platform_device *pdev) | 1923 | static int sm501fb_probe(struct platform_device *pdev) |
| 1926 | { | 1924 | { |
| 1927 | struct sm501fb_info *info; | 1925 | struct sm501fb_info *info; |
| 1928 | struct device *dev = &pdev->dev; | 1926 | struct device *dev = &pdev->dev; |
diff --git a/drivers/video/ssd1307fb.c b/drivers/video/ssd1307fb.c index 6101f5c2f62f..395cb6a8d8f3 100644 --- a/drivers/video/ssd1307fb.c +++ b/drivers/video/ssd1307fb.c | |||
| @@ -36,7 +36,7 @@ struct ssd1307fb_par { | |||
| 36 | int reset; | 36 | int reset; |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | static struct fb_fix_screeninfo ssd1307fb_fix __devinitdata = { | 39 | static struct fb_fix_screeninfo ssd1307fb_fix = { |
| 40 | .id = "Solomon SSD1307", | 40 | .id = "Solomon SSD1307", |
| 41 | .type = FB_TYPE_PACKED_PIXELS, | 41 | .type = FB_TYPE_PACKED_PIXELS, |
| 42 | .visual = FB_VISUAL_MONO10, | 42 | .visual = FB_VISUAL_MONO10, |
| @@ -47,7 +47,7 @@ static struct fb_fix_screeninfo ssd1307fb_fix __devinitdata = { | |||
| 47 | .accel = FB_ACCEL_NONE, | 47 | .accel = FB_ACCEL_NONE, |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | static struct fb_var_screeninfo ssd1307fb_var __devinitdata = { | 50 | static struct fb_var_screeninfo ssd1307fb_var = { |
| 51 | .xres = SSD1307FB_WIDTH, | 51 | .xres = SSD1307FB_WIDTH, |
| 52 | .yres = SSD1307FB_HEIGHT, | 52 | .yres = SSD1307FB_HEIGHT, |
| 53 | .xres_virtual = SSD1307FB_WIDTH, | 53 | .xres_virtual = SSD1307FB_WIDTH, |
| @@ -145,8 +145,8 @@ static void ssd1307fb_update_display(struct ssd1307fb_par *par) | |||
| 145 | u32 page_length = SSD1307FB_WIDTH * i; | 145 | u32 page_length = SSD1307FB_WIDTH * i; |
| 146 | u32 index = page_length + (SSD1307FB_WIDTH * k + j) / 8; | 146 | u32 index = page_length + (SSD1307FB_WIDTH * k + j) / 8; |
| 147 | u8 byte = *(vmem + index); | 147 | u8 byte = *(vmem + index); |
| 148 | u8 bit = byte & (1 << (7 - (j % 8))); | 148 | u8 bit = byte & (1 << (j % 8)); |
| 149 | bit = bit >> (7 - (j % 8)); | 149 | bit = bit >> (j % 8); |
| 150 | buf |= bit << k; | 150 | buf |= bit << k; |
| 151 | } | 151 | } |
| 152 | ssd1307fb_write_data(par->client, buf); | 152 | ssd1307fb_write_data(par->client, buf); |
| @@ -227,7 +227,8 @@ static struct fb_deferred_io ssd1307fb_defio = { | |||
| 227 | .deferred_io = ssd1307fb_deferred_io, | 227 | .deferred_io = ssd1307fb_deferred_io, |
| 228 | }; | 228 | }; |
| 229 | 229 | ||
| 230 | static int __devinit ssd1307fb_probe(struct i2c_client *client, const struct i2c_device_id *id) | 230 | static int ssd1307fb_probe(struct i2c_client *client, |
| 231 | const struct i2c_device_id *id) | ||
| 231 | { | 232 | { |
| 232 | struct fb_info *info; | 233 | struct fb_info *info; |
| 233 | u32 vmem_size = SSD1307FB_WIDTH * SSD1307FB_HEIGHT / 8; | 234 | u32 vmem_size = SSD1307FB_WIDTH * SSD1307FB_HEIGHT / 8; |
| @@ -352,7 +353,7 @@ fb_alloc_error: | |||
| 352 | return ret; | 353 | return ret; |
| 353 | } | 354 | } |
| 354 | 355 | ||
| 355 | static int __devexit ssd1307fb_remove(struct i2c_client *client) | 356 | static int ssd1307fb_remove(struct i2c_client *client) |
| 356 | { | 357 | { |
| 357 | struct fb_info *info = i2c_get_clientdata(client); | 358 | struct fb_info *info = i2c_get_clientdata(client); |
| 358 | struct ssd1307fb_par *par = info->par; | 359 | struct ssd1307fb_par *par = info->par; |
| @@ -380,7 +381,7 @@ MODULE_DEVICE_TABLE(of, ssd1307fb_of_match); | |||
| 380 | 381 | ||
| 381 | static struct i2c_driver ssd1307fb_driver = { | 382 | static struct i2c_driver ssd1307fb_driver = { |
| 382 | .probe = ssd1307fb_probe, | 383 | .probe = ssd1307fb_probe, |
| 383 | .remove = __devexit_p(ssd1307fb_remove), | 384 | .remove = ssd1307fb_remove, |
| 384 | .id_table = ssd1307fb_i2c_id, | 385 | .id_table = ssd1307fb_i2c_id, |
| 385 | .driver = { | 386 | .driver = { |
| 386 | .name = "ssd1307fb", | 387 | .name = "ssd1307fb", |
diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c index 111fb32e8769..9c00026e3ae2 100644 --- a/drivers/video/sstfb.c +++ b/drivers/video/sstfb.c | |||
| @@ -104,7 +104,7 @@ static bool slowpci; /* slow PCI settings */ | |||
| 104 | */ | 104 | */ |
| 105 | #define DEFAULT_VIDEO_MODE "640x480@60" | 105 | #define DEFAULT_VIDEO_MODE "640x480@60" |
| 106 | 106 | ||
| 107 | static char *mode_option __devinitdata = DEFAULT_VIDEO_MODE; | 107 | static char *mode_option = DEFAULT_VIDEO_MODE; |
| 108 | 108 | ||
| 109 | enum { | 109 | enum { |
| 110 | ID_VOODOO1 = 0, | 110 | ID_VOODOO1 = 0, |
| @@ -113,7 +113,7 @@ enum { | |||
| 113 | 113 | ||
| 114 | #define IS_VOODOO2(par) ((par)->type == ID_VOODOO2) | 114 | #define IS_VOODOO2(par) ((par)->type == ID_VOODOO2) |
| 115 | 115 | ||
| 116 | static struct sst_spec voodoo_spec[] __devinitdata = { | 116 | static struct sst_spec voodoo_spec[] = { |
| 117 | { .name = "Voodoo Graphics", .default_gfx_clock = 50000, .max_gfxclk = 60 }, | 117 | { .name = "Voodoo Graphics", .default_gfx_clock = 50000, .max_gfxclk = 60 }, |
| 118 | { .name = "Voodoo2", .default_gfx_clock = 75000, .max_gfxclk = 85 }, | 118 | { .name = "Voodoo2", .default_gfx_clock = 75000, .max_gfxclk = 85 }, |
| 119 | }; | 119 | }; |
| @@ -822,7 +822,7 @@ static void sstfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) | |||
| 822 | /* | 822 | /* |
| 823 | * get lfb size | 823 | * get lfb size |
| 824 | */ | 824 | */ |
| 825 | static int __devinit sst_get_memsize(struct fb_info *info, __u32 *memsize) | 825 | static int sst_get_memsize(struct fb_info *info, __u32 *memsize) |
| 826 | { | 826 | { |
| 827 | u8 __iomem *fbbase_virt = info->screen_base; | 827 | u8 __iomem *fbbase_virt = info->screen_base; |
| 828 | 828 | ||
| @@ -865,7 +865,7 @@ static int __devinit sst_get_memsize(struct fb_info *info, __u32 *memsize) | |||
| 865 | /* fbi should be idle, and fifo emty and mem disabled */ | 865 | /* fbi should be idle, and fifo emty and mem disabled */ |
| 866 | /* supposed to detect AT&T ATT20C409 and Ti TVP3409 ramdacs */ | 866 | /* supposed to detect AT&T ATT20C409 and Ti TVP3409 ramdacs */ |
| 867 | 867 | ||
| 868 | static int __devinit sst_detect_att(struct fb_info *info) | 868 | static int sst_detect_att(struct fb_info *info) |
| 869 | { | 869 | { |
| 870 | struct sstfb_par *par = info->par; | 870 | struct sstfb_par *par = info->par; |
| 871 | int i, mir, dir; | 871 | int i, mir, dir; |
| @@ -890,7 +890,7 @@ static int __devinit sst_detect_att(struct fb_info *info) | |||
| 890 | return 0; | 890 | return 0; |
| 891 | } | 891 | } |
| 892 | 892 | ||
| 893 | static int __devinit sst_detect_ti(struct fb_info *info) | 893 | static int sst_detect_ti(struct fb_info *info) |
| 894 | { | 894 | { |
| 895 | struct sstfb_par *par = info->par; | 895 | struct sstfb_par *par = info->par; |
| 896 | int i, mir, dir; | 896 | int i, mir, dir; |
| @@ -926,7 +926,7 @@ static int __devinit sst_detect_ti(struct fb_info *info) | |||
| 926 | * touched... | 926 | * touched... |
| 927 | * is it really safe ? how can i reset this ramdac ? geee... | 927 | * is it really safe ? how can i reset this ramdac ? geee... |
| 928 | */ | 928 | */ |
| 929 | static int __devinit sst_detect_ics(struct fb_info *info) | 929 | static int sst_detect_ics(struct fb_info *info) |
| 930 | { | 930 | { |
| 931 | struct sstfb_par *par = info->par; | 931 | struct sstfb_par *par = info->par; |
| 932 | int m_clk0_1, m_clk0_7, m_clk1_b; | 932 | int m_clk0_1, m_clk0_7, m_clk1_b; |
| @@ -1105,7 +1105,7 @@ static void sst_set_vidmod_ics(struct fb_info *info, const int bpp) | |||
| 1105 | */ | 1105 | */ |
| 1106 | 1106 | ||
| 1107 | 1107 | ||
| 1108 | static struct dac_switch dacs[] __devinitdata = { | 1108 | static struct dac_switch dacs[] = { |
| 1109 | { .name = "TI TVP3409", | 1109 | { .name = "TI TVP3409", |
| 1110 | .detect = sst_detect_ti, | 1110 | .detect = sst_detect_ti, |
| 1111 | .set_pll = sst_set_pll_att_ti, | 1111 | .set_pll = sst_set_pll_att_ti, |
| @@ -1121,7 +1121,7 @@ static struct dac_switch dacs[] __devinitdata = { | |||
| 1121 | .set_vidmod = sst_set_vidmod_ics }, | 1121 | .set_vidmod = sst_set_vidmod_ics }, |
| 1122 | }; | 1122 | }; |
| 1123 | 1123 | ||
| 1124 | static int __devinit sst_detect_dactype(struct fb_info *info, struct sstfb_par *par) | 1124 | static int sst_detect_dactype(struct fb_info *info, struct sstfb_par *par) |
| 1125 | { | 1125 | { |
| 1126 | int i, ret = 0; | 1126 | int i, ret = 0; |
| 1127 | 1127 | ||
| @@ -1140,7 +1140,7 @@ static int __devinit sst_detect_dactype(struct fb_info *info, struct sstfb_par * | |||
| 1140 | /* | 1140 | /* |
| 1141 | * Internal Routines | 1141 | * Internal Routines |
| 1142 | */ | 1142 | */ |
| 1143 | static int __devinit sst_init(struct fb_info *info, struct sstfb_par *par) | 1143 | static int sst_init(struct fb_info *info, struct sstfb_par *par) |
| 1144 | { | 1144 | { |
| 1145 | u32 fbiinit0, fbiinit1, fbiinit4; | 1145 | u32 fbiinit0, fbiinit1, fbiinit4; |
| 1146 | struct pci_dev *dev = par->dev; | 1146 | struct pci_dev *dev = par->dev; |
| @@ -1239,7 +1239,7 @@ static int __devinit sst_init(struct fb_info *info, struct sstfb_par *par) | |||
| 1239 | return 1; | 1239 | return 1; |
| 1240 | } | 1240 | } |
| 1241 | 1241 | ||
| 1242 | static void __devexit sst_shutdown(struct fb_info *info) | 1242 | static void sst_shutdown(struct fb_info *info) |
| 1243 | { | 1243 | { |
| 1244 | struct sstfb_par *par = info->par; | 1244 | struct sstfb_par *par = info->par; |
| 1245 | struct pci_dev *dev = par->dev; | 1245 | struct pci_dev *dev = par->dev; |
| @@ -1271,7 +1271,7 @@ static void __devexit sst_shutdown(struct fb_info *info) | |||
| 1271 | /* | 1271 | /* |
| 1272 | * Interface to the world | 1272 | * Interface to the world |
| 1273 | */ | 1273 | */ |
| 1274 | static int __devinit sstfb_setup(char *options) | 1274 | static int sstfb_setup(char *options) |
| 1275 | { | 1275 | { |
| 1276 | char *this_opt; | 1276 | char *this_opt; |
| 1277 | 1277 | ||
| @@ -1317,8 +1317,7 @@ static struct fb_ops sstfb_ops = { | |||
| 1317 | .fb_ioctl = sstfb_ioctl, | 1317 | .fb_ioctl = sstfb_ioctl, |
| 1318 | }; | 1318 | }; |
| 1319 | 1319 | ||
| 1320 | static int __devinit sstfb_probe(struct pci_dev *pdev, | 1320 | static int sstfb_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 1321 | const struct pci_device_id *id) | ||
| 1322 | { | 1321 | { |
| 1323 | struct fb_info *info; | 1322 | struct fb_info *info; |
| 1324 | struct fb_fix_screeninfo *fix; | 1323 | struct fb_fix_screeninfo *fix; |
| @@ -1458,7 +1457,7 @@ fail_mmio_mem: | |||
| 1458 | return -ENXIO; /* no voodoo detected */ | 1457 | return -ENXIO; /* no voodoo detected */ |
| 1459 | } | 1458 | } |
| 1460 | 1459 | ||
| 1461 | static void __devexit sstfb_remove(struct pci_dev *pdev) | 1460 | static void sstfb_remove(struct pci_dev *pdev) |
| 1462 | { | 1461 | { |
| 1463 | struct sstfb_par *par; | 1462 | struct sstfb_par *par; |
| 1464 | struct fb_info *info; | 1463 | struct fb_info *info; |
| @@ -1490,11 +1489,11 @@ static struct pci_driver sstfb_driver = { | |||
| 1490 | .name = "sstfb", | 1489 | .name = "sstfb", |
| 1491 | .id_table = sstfb_id_tbl, | 1490 | .id_table = sstfb_id_tbl, |
| 1492 | .probe = sstfb_probe, | 1491 | .probe = sstfb_probe, |
| 1493 | .remove = __devexit_p(sstfb_remove), | 1492 | .remove = sstfb_remove, |
| 1494 | }; | 1493 | }; |
| 1495 | 1494 | ||
| 1496 | 1495 | ||
| 1497 | static int __devinit sstfb_init(void) | 1496 | static int sstfb_init(void) |
| 1498 | { | 1497 | { |
| 1499 | char *option = NULL; | 1498 | char *option = NULL; |
| 1500 | 1499 | ||
| @@ -1505,7 +1504,7 @@ static int __devinit sstfb_init(void) | |||
| 1505 | return pci_register_driver(&sstfb_driver); | 1504 | return pci_register_driver(&sstfb_driver); |
| 1506 | } | 1505 | } |
| 1507 | 1506 | ||
| 1508 | static void __devexit sstfb_exit(void) | 1507 | static void sstfb_exit(void) |
| 1509 | { | 1508 | { |
| 1510 | pci_unregister_driver(&sstfb_driver); | 1509 | pci_unregister_driver(&sstfb_driver); |
| 1511 | } | 1510 | } |
diff --git a/drivers/video/sunxvr1000.c b/drivers/video/sunxvr1000.c index 729a50722bdf..cc6f48bba36b 100644 --- a/drivers/video/sunxvr1000.c +++ b/drivers/video/sunxvr1000.c | |||
| @@ -25,7 +25,7 @@ struct gfb_info { | |||
| 25 | u32 pseudo_palette[16]; | 25 | u32 pseudo_palette[16]; |
| 26 | }; | 26 | }; |
| 27 | 27 | ||
| 28 | static int __devinit gfb_get_props(struct gfb_info *gp) | 28 | static int gfb_get_props(struct gfb_info *gp) |
| 29 | { | 29 | { |
| 30 | gp->width = of_getintprop_default(gp->of_node, "width", 0); | 30 | gp->width = of_getintprop_default(gp->of_node, "width", 0); |
| 31 | gp->height = of_getintprop_default(gp->of_node, "height", 0); | 31 | gp->height = of_getintprop_default(gp->of_node, "height", 0); |
| @@ -66,7 +66,7 @@ static struct fb_ops gfb_ops = { | |||
| 66 | .fb_imageblit = cfb_imageblit, | 66 | .fb_imageblit = cfb_imageblit, |
| 67 | }; | 67 | }; |
| 68 | 68 | ||
| 69 | static int __devinit gfb_set_fbinfo(struct gfb_info *gp) | 69 | static int gfb_set_fbinfo(struct gfb_info *gp) |
| 70 | { | 70 | { |
| 71 | struct fb_info *info = gp->info; | 71 | struct fb_info *info = gp->info; |
| 72 | struct fb_var_screeninfo *var = &info->var; | 72 | struct fb_var_screeninfo *var = &info->var; |
| @@ -111,7 +111,7 @@ static int __devinit gfb_set_fbinfo(struct gfb_info *gp) | |||
| 111 | return 0; | 111 | return 0; |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | static int __devinit gfb_probe(struct platform_device *op) | 114 | static int gfb_probe(struct platform_device *op) |
| 115 | { | 115 | { |
| 116 | struct device_node *dp = op->dev.of_node; | 116 | struct device_node *dp = op->dev.of_node; |
| 117 | struct fb_info *info; | 117 | struct fb_info *info; |
| @@ -173,7 +173,7 @@ err_out: | |||
| 173 | return err; | 173 | return err; |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | static int __devexit gfb_remove(struct platform_device *op) | 176 | static int gfb_remove(struct platform_device *op) |
| 177 | { | 177 | { |
| 178 | struct fb_info *info = dev_get_drvdata(&op->dev); | 178 | struct fb_info *info = dev_get_drvdata(&op->dev); |
| 179 | struct gfb_info *gp = info->par; | 179 | struct gfb_info *gp = info->par; |
| @@ -201,7 +201,7 @@ MODULE_DEVICE_TABLE(of, ffb_match); | |||
| 201 | 201 | ||
| 202 | static struct platform_driver gfb_driver = { | 202 | static struct platform_driver gfb_driver = { |
| 203 | .probe = gfb_probe, | 203 | .probe = gfb_probe, |
| 204 | .remove = __devexit_p(gfb_remove), | 204 | .remove = gfb_remove, |
| 205 | .driver = { | 205 | .driver = { |
| 206 | .name = "gfb", | 206 | .name = "gfb", |
| 207 | .owner = THIS_MODULE, | 207 | .owner = THIS_MODULE, |
diff --git a/drivers/video/sunxvr2500.c b/drivers/video/sunxvr2500.c index 7fbcba86d1a2..843b6bab0483 100644 --- a/drivers/video/sunxvr2500.c +++ b/drivers/video/sunxvr2500.c | |||
| @@ -29,7 +29,7 @@ struct s3d_info { | |||
| 29 | u32 pseudo_palette[16]; | 29 | u32 pseudo_palette[16]; |
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | static int __devinit s3d_get_props(struct s3d_info *sp) | 32 | static int s3d_get_props(struct s3d_info *sp) |
| 33 | { | 33 | { |
| 34 | sp->width = of_getintprop_default(sp->of_node, "width", 0); | 34 | sp->width = of_getintprop_default(sp->of_node, "width", 0); |
| 35 | sp->height = of_getintprop_default(sp->of_node, "height", 0); | 35 | sp->height = of_getintprop_default(sp->of_node, "height", 0); |
| @@ -70,7 +70,7 @@ static struct fb_ops s3d_ops = { | |||
| 70 | .fb_imageblit = cfb_imageblit, | 70 | .fb_imageblit = cfb_imageblit, |
| 71 | }; | 71 | }; |
| 72 | 72 | ||
| 73 | static int __devinit s3d_set_fbinfo(struct s3d_info *sp) | 73 | static int s3d_set_fbinfo(struct s3d_info *sp) |
| 74 | { | 74 | { |
| 75 | struct fb_info *info = sp->info; | 75 | struct fb_info *info = sp->info; |
| 76 | struct fb_var_screeninfo *var = &info->var; | 76 | struct fb_var_screeninfo *var = &info->var; |
| @@ -115,8 +115,8 @@ static int __devinit s3d_set_fbinfo(struct s3d_info *sp) | |||
| 115 | return 0; | 115 | return 0; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | static int __devinit s3d_pci_register(struct pci_dev *pdev, | 118 | static int s3d_pci_register(struct pci_dev *pdev, |
| 119 | const struct pci_device_id *ent) | 119 | const struct pci_device_id *ent) |
| 120 | { | 120 | { |
| 121 | struct fb_info *info; | 121 | struct fb_info *info; |
| 122 | struct s3d_info *sp; | 122 | struct s3d_info *sp; |
| @@ -219,7 +219,7 @@ err_out: | |||
| 219 | return err; | 219 | return err; |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | static void __devexit s3d_pci_unregister(struct pci_dev *pdev) | 222 | static void s3d_pci_unregister(struct pci_dev *pdev) |
| 223 | { | 223 | { |
| 224 | struct fb_info *info = pci_get_drvdata(pdev); | 224 | struct fb_info *info = pci_get_drvdata(pdev); |
| 225 | struct s3d_info *sp = info->par; | 225 | struct s3d_info *sp = info->par; |
| @@ -251,7 +251,7 @@ static struct pci_driver s3d_driver = { | |||
| 251 | .name = "s3d", | 251 | .name = "s3d", |
| 252 | .id_table = s3d_pci_table, | 252 | .id_table = s3d_pci_table, |
| 253 | .probe = s3d_pci_register, | 253 | .probe = s3d_pci_register, |
| 254 | .remove = __devexit_p(s3d_pci_unregister), | 254 | .remove = s3d_pci_unregister, |
| 255 | }; | 255 | }; |
| 256 | 256 | ||
| 257 | static int __init s3d_init(void) | 257 | static int __init s3d_init(void) |
diff --git a/drivers/video/sunxvr500.c b/drivers/video/sunxvr500.c index 6c71b1b44477..387350d004df 100644 --- a/drivers/video/sunxvr500.c +++ b/drivers/video/sunxvr500.c | |||
| @@ -51,7 +51,7 @@ struct e3d_info { | |||
| 51 | u32 pseudo_palette[16]; | 51 | u32 pseudo_palette[16]; |
| 52 | }; | 52 | }; |
| 53 | 53 | ||
| 54 | static int __devinit e3d_get_props(struct e3d_info *ep) | 54 | static int e3d_get_props(struct e3d_info *ep) |
| 55 | { | 55 | { |
| 56 | ep->width = of_getintprop_default(ep->of_node, "width", 0); | 56 | ep->width = of_getintprop_default(ep->of_node, "width", 0); |
| 57 | ep->height = of_getintprop_default(ep->of_node, "height", 0); | 57 | ep->height = of_getintprop_default(ep->of_node, "height", 0); |
| @@ -193,7 +193,7 @@ static struct fb_ops e3d_ops = { | |||
| 193 | .fb_imageblit = e3d_imageblit, | 193 | .fb_imageblit = e3d_imageblit, |
| 194 | }; | 194 | }; |
| 195 | 195 | ||
| 196 | static int __devinit e3d_set_fbinfo(struct e3d_info *ep) | 196 | static int e3d_set_fbinfo(struct e3d_info *ep) |
| 197 | { | 197 | { |
| 198 | struct fb_info *info = ep->info; | 198 | struct fb_info *info = ep->info; |
| 199 | struct fb_var_screeninfo *var = &info->var; | 199 | struct fb_var_screeninfo *var = &info->var; |
| @@ -238,8 +238,8 @@ static int __devinit e3d_set_fbinfo(struct e3d_info *ep) | |||
| 238 | return 0; | 238 | return 0; |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | static int __devinit e3d_pci_register(struct pci_dev *pdev, | 241 | static int e3d_pci_register(struct pci_dev *pdev, |
| 242 | const struct pci_device_id *ent) | 242 | const struct pci_device_id *ent) |
| 243 | { | 243 | { |
| 244 | struct device_node *of_node; | 244 | struct device_node *of_node; |
| 245 | const char *device_type; | 245 | const char *device_type; |
| @@ -392,7 +392,7 @@ err_out: | |||
| 392 | return err; | 392 | return err; |
| 393 | } | 393 | } |
| 394 | 394 | ||
| 395 | static void __devexit e3d_pci_unregister(struct pci_dev *pdev) | 395 | static void e3d_pci_unregister(struct pci_dev *pdev) |
| 396 | { | 396 | { |
| 397 | struct fb_info *info = pci_get_drvdata(pdev); | 397 | struct fb_info *info = pci_get_drvdata(pdev); |
| 398 | struct e3d_info *ep = info->par; | 398 | struct e3d_info *ep = info->par; |
| @@ -437,7 +437,7 @@ static struct pci_driver e3d_driver = { | |||
| 437 | .name = "e3d", | 437 | .name = "e3d", |
| 438 | .id_table = e3d_pci_table, | 438 | .id_table = e3d_pci_table, |
| 439 | .probe = e3d_pci_register, | 439 | .probe = e3d_pci_register, |
| 440 | .remove = __devexit_p(e3d_pci_unregister), | 440 | .remove = e3d_pci_unregister, |
| 441 | }; | 441 | }; |
| 442 | 442 | ||
| 443 | static int __init e3d_init(void) | 443 | static int __init e3d_init(void) |
diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c index 07c66e946634..c000852500aa 100644 --- a/drivers/video/tcx.c +++ b/drivers/video/tcx.c | |||
| @@ -362,7 +362,7 @@ static void tcx_unmap_regs(struct platform_device *op, struct fb_info *info, | |||
| 362 | info->screen_base, info->fix.smem_len); | 362 | info->screen_base, info->fix.smem_len); |
| 363 | } | 363 | } |
| 364 | 364 | ||
| 365 | static int __devinit tcx_probe(struct platform_device *op) | 365 | static int tcx_probe(struct platform_device *op) |
| 366 | { | 366 | { |
| 367 | struct device_node *dp = op->dev.of_node; | 367 | struct device_node *dp = op->dev.of_node; |
| 368 | struct fb_info *info; | 368 | struct fb_info *info; |
| @@ -486,7 +486,7 @@ out_err: | |||
| 486 | return err; | 486 | return err; |
| 487 | } | 487 | } |
| 488 | 488 | ||
| 489 | static int __devexit tcx_remove(struct platform_device *op) | 489 | static int tcx_remove(struct platform_device *op) |
| 490 | { | 490 | { |
| 491 | struct fb_info *info = dev_get_drvdata(&op->dev); | 491 | struct fb_info *info = dev_get_drvdata(&op->dev); |
| 492 | struct tcx_par *par = info->par; | 492 | struct tcx_par *par = info->par; |
| @@ -518,7 +518,7 @@ static struct platform_driver tcx_driver = { | |||
| 518 | .of_match_table = tcx_match, | 518 | .of_match_table = tcx_match, |
| 519 | }, | 519 | }, |
| 520 | .probe = tcx_probe, | 520 | .probe = tcx_probe, |
| 521 | .remove = __devexit_p(tcx_remove), | 521 | .remove = tcx_remove, |
| 522 | }; | 522 | }; |
| 523 | 523 | ||
| 524 | static int __init tcx_init(void) | 524 | static int __init tcx_init(void) |
diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c index e026724a3a56..64bc28ba4037 100644 --- a/drivers/video/tdfxfb.c +++ b/drivers/video/tdfxfb.c | |||
| @@ -100,7 +100,7 @@ static inline int mtrr_del(int reg, unsigned long base, | |||
| 100 | #define VOODOO3_MAX_PIXCLOCK 300000 | 100 | #define VOODOO3_MAX_PIXCLOCK 300000 |
| 101 | #define VOODOO5_MAX_PIXCLOCK 350000 | 101 | #define VOODOO5_MAX_PIXCLOCK 350000 |
| 102 | 102 | ||
| 103 | static struct fb_fix_screeninfo tdfx_fix __devinitdata = { | 103 | static struct fb_fix_screeninfo tdfx_fix = { |
| 104 | .type = FB_TYPE_PACKED_PIXELS, | 104 | .type = FB_TYPE_PACKED_PIXELS, |
| 105 | .visual = FB_VISUAL_PSEUDOCOLOR, | 105 | .visual = FB_VISUAL_PSEUDOCOLOR, |
| 106 | .ypanstep = 1, | 106 | .ypanstep = 1, |
| @@ -108,7 +108,7 @@ static struct fb_fix_screeninfo tdfx_fix __devinitdata = { | |||
| 108 | .accel = FB_ACCEL_3DFX_BANSHEE | 108 | .accel = FB_ACCEL_3DFX_BANSHEE |
| 109 | }; | 109 | }; |
| 110 | 110 | ||
| 111 | static struct fb_var_screeninfo tdfx_var __devinitdata = { | 111 | static struct fb_var_screeninfo tdfx_var = { |
| 112 | /* "640x480, 8 bpp @ 60 Hz */ | 112 | /* "640x480, 8 bpp @ 60 Hz */ |
| 113 | .xres = 640, | 113 | .xres = 640, |
| 114 | .yres = 480, | 114 | .yres = 480, |
| @@ -135,9 +135,8 @@ static struct fb_var_screeninfo tdfx_var __devinitdata = { | |||
| 135 | /* | 135 | /* |
| 136 | * PCI driver prototypes | 136 | * PCI driver prototypes |
| 137 | */ | 137 | */ |
| 138 | static int __devinit tdfxfb_probe(struct pci_dev *pdev, | 138 | static int tdfxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id); |
| 139 | const struct pci_device_id *id); | 139 | static void tdfxfb_remove(struct pci_dev *pdev); |
| 140 | static void __devexit tdfxfb_remove(struct pci_dev *pdev); | ||
| 141 | 140 | ||
| 142 | static struct pci_device_id tdfxfb_id_table[] = { | 141 | static struct pci_device_id tdfxfb_id_table[] = { |
| 143 | { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE, | 142 | { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE, |
| @@ -156,7 +155,7 @@ static struct pci_driver tdfxfb_driver = { | |||
| 156 | .name = "tdfxfb", | 155 | .name = "tdfxfb", |
| 157 | .id_table = tdfxfb_id_table, | 156 | .id_table = tdfxfb_id_table, |
| 158 | .probe = tdfxfb_probe, | 157 | .probe = tdfxfb_probe, |
| 159 | .remove = __devexit_p(tdfxfb_remove), | 158 | .remove = tdfxfb_remove, |
| 160 | }; | 159 | }; |
| 161 | 160 | ||
| 162 | MODULE_DEVICE_TABLE(pci, tdfxfb_id_table); | 161 | MODULE_DEVICE_TABLE(pci, tdfxfb_id_table); |
| @@ -167,9 +166,9 @@ MODULE_DEVICE_TABLE(pci, tdfxfb_id_table); | |||
| 167 | static int nopan; | 166 | static int nopan; |
| 168 | static int nowrap = 1; /* not implemented (yet) */ | 167 | static int nowrap = 1; /* not implemented (yet) */ |
| 169 | static int hwcursor = 1; | 168 | static int hwcursor = 1; |
| 170 | static char *mode_option __devinitdata; | 169 | static char *mode_option; |
| 171 | /* mtrr option */ | 170 | /* mtrr option */ |
| 172 | static bool nomtrr __devinitdata; | 171 | static bool nomtrr; |
| 173 | 172 | ||
| 174 | /* ------------------------------------------------------------------------- | 173 | /* ------------------------------------------------------------------------- |
| 175 | * Hardware-specific funcions | 174 | * Hardware-specific funcions |
| @@ -1279,8 +1278,8 @@ static int tdfxfb_ddc_getsda(void *data) | |||
| 1279 | return (0 != (tdfx_inl(par, VIDSERPARPORT) & DDC_SDA_IN)); | 1278 | return (0 != (tdfx_inl(par, VIDSERPARPORT) & DDC_SDA_IN)); |
| 1280 | } | 1279 | } |
| 1281 | 1280 | ||
| 1282 | static int __devinit tdfxfb_setup_ddc_bus(struct tdfxfb_i2c_chan *chan, | 1281 | static int tdfxfb_setup_ddc_bus(struct tdfxfb_i2c_chan *chan, const char *name, |
| 1283 | const char *name, struct device *dev) | 1282 | struct device *dev) |
| 1284 | { | 1283 | { |
| 1285 | int rc; | 1284 | int rc; |
| 1286 | 1285 | ||
| @@ -1308,8 +1307,8 @@ static int __devinit tdfxfb_setup_ddc_bus(struct tdfxfb_i2c_chan *chan, | |||
| 1308 | return rc; | 1307 | return rc; |
| 1309 | } | 1308 | } |
| 1310 | 1309 | ||
| 1311 | static int __devinit tdfxfb_setup_i2c_bus(struct tdfxfb_i2c_chan *chan, | 1310 | static int tdfxfb_setup_i2c_bus(struct tdfxfb_i2c_chan *chan, const char *name, |
| 1312 | const char *name, struct device *dev) | 1311 | struct device *dev) |
| 1313 | { | 1312 | { |
| 1314 | int rc; | 1313 | int rc; |
| 1315 | 1314 | ||
| @@ -1336,7 +1335,7 @@ static int __devinit tdfxfb_setup_i2c_bus(struct tdfxfb_i2c_chan *chan, | |||
| 1336 | return rc; | 1335 | return rc; |
| 1337 | } | 1336 | } |
| 1338 | 1337 | ||
| 1339 | static void __devinit tdfxfb_create_i2c_busses(struct fb_info *info) | 1338 | static void tdfxfb_create_i2c_busses(struct fb_info *info) |
| 1340 | { | 1339 | { |
| 1341 | struct tdfx_par *par = info->par; | 1340 | struct tdfx_par *par = info->par; |
| 1342 | 1341 | ||
| @@ -1388,8 +1387,7 @@ static int tdfxfb_probe_i2c_connector(struct tdfx_par *par, | |||
| 1388 | * Initializes and allocates resources for PCI device @pdev. | 1387 | * Initializes and allocates resources for PCI device @pdev. |
| 1389 | * | 1388 | * |
| 1390 | */ | 1389 | */ |
| 1391 | static int __devinit tdfxfb_probe(struct pci_dev *pdev, | 1390 | static int tdfxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
| 1392 | const struct pci_device_id *id) | ||
| 1393 | { | 1391 | { |
| 1394 | struct tdfx_par *default_par; | 1392 | struct tdfx_par *default_par; |
| 1395 | struct fb_info *info; | 1393 | struct fb_info *info; |
| @@ -1626,7 +1624,7 @@ static void __init tdfxfb_setup(char *options) | |||
| 1626 | * lifetime for the PCI device @pdev. | 1624 | * lifetime for the PCI device @pdev. |
| 1627 | * | 1625 | * |
| 1628 | */ | 1626 | */ |
| 1629 | static void __devexit tdfxfb_remove(struct pci_dev *pdev) | 1627 | static void tdfxfb_remove(struct pci_dev *pdev) |
| 1630 | { | 1628 | { |
| 1631 | struct fb_info *info = pci_get_drvdata(pdev); | 1629 | struct fb_info *info = pci_get_drvdata(pdev); |
| 1632 | struct tdfx_par *par = info->par; | 1630 | struct tdfx_par *par = info->par; |
diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c index aba7686b1a32..c9c8e5a1fdee 100644 --- a/drivers/video/tgafb.c +++ b/drivers/video/tgafb.c | |||
| @@ -61,8 +61,8 @@ static void tgafb_fillrect(struct fb_info *, const struct fb_fillrect *); | |||
| 61 | static void tgafb_copyarea(struct fb_info *, const struct fb_copyarea *); | 61 | static void tgafb_copyarea(struct fb_info *, const struct fb_copyarea *); |
| 62 | static int tgafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info); | 62 | static int tgafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info); |
| 63 | 63 | ||
| 64 | static int __devinit tgafb_register(struct device *dev); | 64 | static int tgafb_register(struct device *dev); |
| 65 | static void __devexit tgafb_unregister(struct device *dev); | 65 | static void tgafb_unregister(struct device *dev); |
| 66 | 66 | ||
| 67 | static const char *mode_option; | 67 | static const char *mode_option; |
| 68 | static const char *mode_option_pci = "640x480@60"; | 68 | static const char *mode_option_pci = "640x480@60"; |
| @@ -93,9 +93,8 @@ static struct fb_ops tgafb_ops = { | |||
| 93 | /* | 93 | /* |
| 94 | * PCI registration operations | 94 | * PCI registration operations |
| 95 | */ | 95 | */ |
| 96 | static int __devinit tgafb_pci_register(struct pci_dev *, | 96 | static int tgafb_pci_register(struct pci_dev *, const struct pci_device_id *); |
| 97 | const struct pci_device_id *); | 97 | static void tgafb_pci_unregister(struct pci_dev *); |
| 98 | static void __devexit tgafb_pci_unregister(struct pci_dev *); | ||
| 99 | 98 | ||
| 100 | static struct pci_device_id const tgafb_pci_table[] = { | 99 | static struct pci_device_id const tgafb_pci_table[] = { |
| 101 | { PCI_DEVICE(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TGA) }, | 100 | { PCI_DEVICE(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TGA) }, |
| @@ -107,17 +106,16 @@ static struct pci_driver tgafb_pci_driver = { | |||
| 107 | .name = "tgafb", | 106 | .name = "tgafb", |
| 108 | .id_table = tgafb_pci_table, | 107 | .id_table = tgafb_pci_table, |
| 109 | .probe = tgafb_pci_register, | 108 | .probe = tgafb_pci_register, |
| 110 | .remove = __devexit_p(tgafb_pci_unregister), | 109 | .remove = tgafb_pci_unregister, |
| 111 | }; | 110 | }; |
| 112 | 111 | ||
| 113 | static int __devinit | 112 | static int tgafb_pci_register(struct pci_dev *pdev, |
| 114 | tgafb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | 113 | const struct pci_device_id *ent) |
| 115 | { | 114 | { |
| 116 | return tgafb_register(&pdev->dev); | 115 | return tgafb_register(&pdev->dev); |
| 117 | } | 116 | } |
| 118 | 117 | ||
| 119 | static void __devexit | 118 | static void tgafb_pci_unregister(struct pci_dev *pdev) |
| 120 | tgafb_pci_unregister(struct pci_dev *pdev) | ||
| 121 | { | 119 | { |
| 122 | tgafb_unregister(&pdev->dev); | 120 | tgafb_unregister(&pdev->dev); |
| 123 | } | 121 | } |
| @@ -127,8 +125,8 @@ tgafb_pci_unregister(struct pci_dev *pdev) | |||
| 127 | /* | 125 | /* |
| 128 | * TC registration operations | 126 | * TC registration operations |
| 129 | */ | 127 | */ |
| 130 | static int __devinit tgafb_tc_register(struct device *); | 128 | static int tgafb_tc_register(struct device *); |
| 131 | static int __devexit tgafb_tc_unregister(struct device *); | 129 | static int tgafb_tc_unregister(struct device *); |
| 132 | 130 | ||
| 133 | static struct tc_device_id const tgafb_tc_table[] = { | 131 | static struct tc_device_id const tgafb_tc_table[] = { |
| 134 | { "DEC ", "PMAGD-AA" }, | 132 | { "DEC ", "PMAGD-AA" }, |
| @@ -143,12 +141,11 @@ static struct tc_driver tgafb_tc_driver = { | |||
| 143 | .name = "tgafb", | 141 | .name = "tgafb", |
| 144 | .bus = &tc_bus_type, | 142 | .bus = &tc_bus_type, |
| 145 | .probe = tgafb_tc_register, | 143 | .probe = tgafb_tc_register, |
| 146 | .remove = __devexit_p(tgafb_tc_unregister), | 144 | .remove = tgafb_tc_unregister, |
| 147 | }, | 145 | }, |
| 148 | }; | 146 | }; |
| 149 | 147 | ||
| 150 | static int __devinit | 148 | static int tgafb_tc_register(struct device *dev) |
| 151 | tgafb_tc_register(struct device *dev) | ||
| 152 | { | 149 | { |
| 153 | int status = tgafb_register(dev); | 150 | int status = tgafb_register(dev); |
| 154 | if (!status) | 151 | if (!status) |
| @@ -156,8 +153,7 @@ tgafb_tc_register(struct device *dev) | |||
| 156 | return status; | 153 | return status; |
| 157 | } | 154 | } |
| 158 | 155 | ||
| 159 | static int __devexit | 156 | static int tgafb_tc_unregister(struct device *dev) |
| 160 | tgafb_tc_unregister(struct device *dev) | ||
| 161 | { | 157 | { |
| 162 | put_device(dev); | 158 | put_device(dev); |
| 163 | tgafb_unregister(dev); | 159 | tgafb_unregister(dev); |
| @@ -1546,8 +1542,7 @@ static int tgafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info | |||
| 1546 | return 0; | 1542 | return 0; |
| 1547 | } | 1543 | } |
| 1548 | 1544 | ||
| 1549 | static int __devinit | 1545 | static int tgafb_register(struct device *dev) |
| 1550 | tgafb_register(struct device *dev) | ||
| 1551 | { | 1546 | { |
| 1552 | static const struct fb_videomode modedb_tc = { | 1547 | static const struct fb_videomode modedb_tc = { |
| 1553 | /* 1280x1024 @ 72 Hz, 76.8 kHz hsync */ | 1548 | /* 1280x1024 @ 72 Hz, 76.8 kHz hsync */ |
| @@ -1692,8 +1687,7 @@ tgafb_register(struct device *dev) | |||
| 1692 | return ret; | 1687 | return ret; |
| 1693 | } | 1688 | } |
| 1694 | 1689 | ||
| 1695 | static void __devexit | 1690 | static void tgafb_unregister(struct device *dev) |
| 1696 | tgafb_unregister(struct device *dev) | ||
| 1697 | { | 1691 | { |
| 1698 | resource_size_t bar0_start = 0, bar0_len = 0; | 1692 | resource_size_t bar0_start = 0, bar0_len = 0; |
| 1699 | int tga_bus_pci = TGA_BUS_PCI(dev); | 1693 | int tga_bus_pci = TGA_BUS_PCI(dev); |
| @@ -1721,16 +1715,14 @@ tgafb_unregister(struct device *dev) | |||
| 1721 | framebuffer_release(info); | 1715 | framebuffer_release(info); |
| 1722 | } | 1716 | } |
| 1723 | 1717 | ||
| 1724 | static void __devexit | 1718 | static void tgafb_exit(void) |
| 1725 | tgafb_exit(void) | ||
| 1726 | { | 1719 | { |
| 1727 | tc_unregister_driver(&tgafb_tc_driver); | 1720 | tc_unregister_driver(&tgafb_tc_driver); |
| 1728 | pci_unregister_driver(&tgafb_pci_driver); | 1721 | pci_unregister_driver(&tgafb_pci_driver); |
| 1729 | } | 1722 | } |
| 1730 | 1723 | ||
| 1731 | #ifndef MODULE | 1724 | #ifndef MODULE |
| 1732 | static int __devinit | 1725 | static int tgafb_setup(char *arg) |
| 1733 | tgafb_setup(char *arg) | ||
| 1734 | { | 1726 | { |
| 1735 | char *this_opt; | 1727 | char *this_opt; |
| 1736 | 1728 | ||
| @@ -1751,8 +1743,7 @@ tgafb_setup(char *arg) | |||
| 1751 | } | 1743 | } |
| 1752 | #endif /* !MODULE */ | 1744 | #endif /* !MODULE */ |
| 1753 | 1745 | ||
| 1754 | static int __devinit | 1746 | static int tgafb_init(void) |
| 1755 | tgafb_init(void) | ||
| 1756 | { | 1747 | { |
| 1757 | int status; | 1748 | int status; |
| 1758 | #ifndef MODULE | 1749 | #ifndef MODULE |
diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c index b244f060f151..dc4fb8620156 100644 --- a/drivers/video/tmiofb.c +++ b/drivers/video/tmiofb.c | |||
| @@ -191,7 +191,7 @@ | |||
| 191 | #define LCR_VCLKHW 0x1b4 /* VCLK High Width */ | 191 | #define LCR_VCLKHW 0x1b4 /* VCLK High Width */ |
| 192 | #define LCR_OC 0x1b6 /* Output Control */ | 192 | #define LCR_OC 0x1b6 /* Output Control */ |
| 193 | 193 | ||
| 194 | static char *mode_option __devinitdata; | 194 | static char *mode_option; |
| 195 | 195 | ||
| 196 | struct tmiofb_par { | 196 | struct tmiofb_par { |
| 197 | u32 pseudo_palette[16]; | 197 | u32 pseudo_palette[16]; |
| @@ -675,7 +675,7 @@ static struct fb_ops tmiofb_ops = { | |||
| 675 | 675 | ||
| 676 | /*--------------------------------------------------------------------------*/ | 676 | /*--------------------------------------------------------------------------*/ |
| 677 | 677 | ||
| 678 | static int __devinit tmiofb_probe(struct platform_device *dev) | 678 | static int tmiofb_probe(struct platform_device *dev) |
| 679 | { | 679 | { |
| 680 | const struct mfd_cell *cell = mfd_get_cell(dev); | 680 | const struct mfd_cell *cell = mfd_get_cell(dev); |
| 681 | struct tmio_fb_data *data = dev->dev.platform_data; | 681 | struct tmio_fb_data *data = dev->dev.platform_data; |
| @@ -807,7 +807,7 @@ err_ioremap_ccr: | |||
| 807 | return retval; | 807 | return retval; |
| 808 | } | 808 | } |
| 809 | 809 | ||
| 810 | static int __devexit tmiofb_remove(struct platform_device *dev) | 810 | static int tmiofb_remove(struct platform_device *dev) |
| 811 | { | 811 | { |
| 812 | const struct mfd_cell *cell = mfd_get_cell(dev); | 812 | const struct mfd_cell *cell = mfd_get_cell(dev); |
| 813 | struct fb_info *info = platform_get_drvdata(dev); | 813 | struct fb_info *info = platform_get_drvdata(dev); |
| @@ -1002,7 +1002,7 @@ static struct platform_driver tmiofb_driver = { | |||
| 1002 | .driver.name = "tmio-fb", | 1002 | .driver.name = "tmio-fb", |
| 1003 | .driver.owner = THIS_MODULE, | 1003 | .driver.owner = THIS_MODULE, |
| 1004 | .probe = tmiofb_probe, | 1004 | .probe = tmiofb_probe, |
| 1005 | .remove = __devexit_p(tmiofb_remove), | 1005 | .remove = tmiofb_remove, |
| 1006 | .suspend = tmiofb_suspend, | 1006 | .suspend = tmiofb_suspend, |
| 1007 | .resume = tmiofb_resume, | 1007 | .resume = tmiofb_resume, |
| 1008 | }; | 1008 | }; |
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c index 34cf019bba44..ab57d387d6b5 100644 --- a/drivers/video/tridentfb.c +++ b/drivers/video/tridentfb.c | |||
| @@ -53,19 +53,19 @@ static struct fb_fix_screeninfo tridentfb_fix = { | |||
| 53 | /* defaults which are normally overriden by user values */ | 53 | /* defaults which are normally overriden by user values */ |
| 54 | 54 | ||
| 55 | /* video mode */ | 55 | /* video mode */ |
| 56 | static char *mode_option __devinitdata = "640x480-8@60"; | 56 | static char *mode_option = "640x480-8@60"; |
| 57 | static int bpp __devinitdata = 8; | 57 | static int bpp = 8; |
| 58 | 58 | ||
| 59 | static int noaccel __devinitdata; | 59 | static int noaccel; |
| 60 | 60 | ||
| 61 | static int center; | 61 | static int center; |
| 62 | static int stretch; | 62 | static int stretch; |
| 63 | 63 | ||
| 64 | static int fp __devinitdata; | 64 | static int fp; |
| 65 | static int crt __devinitdata; | 65 | static int crt; |
| 66 | 66 | ||
| 67 | static int memsize __devinitdata; | 67 | static int memsize; |
| 68 | static int memdiff __devinitdata; | 68 | static int memdiff; |
| 69 | static int nativex; | 69 | static int nativex; |
| 70 | 70 | ||
| 71 | module_param(mode_option, charp, 0); | 71 | module_param(mode_option, charp, 0); |
| @@ -637,7 +637,7 @@ static inline void crtc_unlock(struct tridentfb_par *par) | |||
| 637 | } | 637 | } |
| 638 | 638 | ||
| 639 | /* Return flat panel's maximum x resolution */ | 639 | /* Return flat panel's maximum x resolution */ |
| 640 | static int __devinit get_nativex(struct tridentfb_par *par) | 640 | static int get_nativex(struct tridentfb_par *par) |
| 641 | { | 641 | { |
| 642 | int x, y, tmp; | 642 | int x, y, tmp; |
| 643 | 643 | ||
| @@ -771,7 +771,7 @@ static void set_number_of_lines(struct tridentfb_par *par, int lines) | |||
| 771 | * If we see that FP is active we assume we have one. | 771 | * If we see that FP is active we assume we have one. |
| 772 | * Otherwise we have a CRT display. User can override. | 772 | * Otherwise we have a CRT display. User can override. |
| 773 | */ | 773 | */ |
| 774 | static int __devinit is_flatpanel(struct tridentfb_par *par) | 774 | static int is_flatpanel(struct tridentfb_par *par) |
| 775 | { | 775 | { |
| 776 | if (fp) | 776 | if (fp) |
| 777 | return 1; | 777 | return 1; |
| @@ -781,7 +781,7 @@ static int __devinit is_flatpanel(struct tridentfb_par *par) | |||
| 781 | } | 781 | } |
| 782 | 782 | ||
| 783 | /* Try detecting the video memory size */ | 783 | /* Try detecting the video memory size */ |
| 784 | static unsigned int __devinit get_memsize(struct tridentfb_par *par) | 784 | static unsigned int get_memsize(struct tridentfb_par *par) |
| 785 | { | 785 | { |
| 786 | unsigned char tmp, tmp2; | 786 | unsigned char tmp, tmp2; |
| 787 | unsigned int k; | 787 | unsigned int k; |
| @@ -1331,8 +1331,8 @@ static struct fb_ops tridentfb_ops = { | |||
| 1331 | .fb_sync = tridentfb_sync, | 1331 | .fb_sync = tridentfb_sync, |
| 1332 | }; | 1332 | }; |
| 1333 | 1333 | ||
| 1334 | static int __devinit trident_pci_probe(struct pci_dev *dev, | 1334 | static int trident_pci_probe(struct pci_dev *dev, |
| 1335 | const struct pci_device_id *id) | 1335 | const struct pci_device_id *id) |
| 1336 | { | 1336 | { |
| 1337 | int err; | 1337 | int err; |
| 1338 | unsigned char revision; | 1338 | unsigned char revision; |
| @@ -1543,7 +1543,7 @@ out_unmap1: | |||
| 1543 | return err; | 1543 | return err; |
| 1544 | } | 1544 | } |
| 1545 | 1545 | ||
| 1546 | static void __devexit trident_pci_remove(struct pci_dev *dev) | 1546 | static void trident_pci_remove(struct pci_dev *dev) |
| 1547 | { | 1547 | { |
| 1548 | struct fb_info *info = pci_get_drvdata(dev); | 1548 | struct fb_info *info = pci_get_drvdata(dev); |
| 1549 | struct tridentfb_par *par = info->par; | 1549 | struct tridentfb_par *par = info->par; |
| @@ -1591,7 +1591,7 @@ static struct pci_driver tridentfb_pci_driver = { | |||
| 1591 | .name = "tridentfb", | 1591 | .name = "tridentfb", |
| 1592 | .id_table = trident_devices, | 1592 | .id_table = trident_devices, |
| 1593 | .probe = trident_pci_probe, | 1593 | .probe = trident_pci_probe, |
| 1594 | .remove = __devexit_p(trident_pci_remove) | 1594 | .remove = trident_pci_remove, |
| 1595 | }; | 1595 | }; |
| 1596 | 1596 | ||
| 1597 | /* | 1597 | /* |
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c index 2f8f82d874a1..b75db0186488 100644 --- a/drivers/video/uvesafb.c +++ b/drivers/video/uvesafb.c | |||
| @@ -36,26 +36,26 @@ static struct cb_id uvesafb_cn_id = { | |||
| 36 | static char v86d_path[PATH_MAX] = "/sbin/v86d"; | 36 | static char v86d_path[PATH_MAX] = "/sbin/v86d"; |
| 37 | static char v86d_started; /* has v86d been started by uvesafb? */ | 37 | static char v86d_started; /* has v86d been started by uvesafb? */ |
| 38 | 38 | ||
| 39 | static struct fb_fix_screeninfo uvesafb_fix __devinitdata = { | 39 | static struct fb_fix_screeninfo uvesafb_fix = { |
| 40 | .id = "VESA VGA", | 40 | .id = "VESA VGA", |
| 41 | .type = FB_TYPE_PACKED_PIXELS, | 41 | .type = FB_TYPE_PACKED_PIXELS, |
| 42 | .accel = FB_ACCEL_NONE, | 42 | .accel = FB_ACCEL_NONE, |
| 43 | .visual = FB_VISUAL_TRUECOLOR, | 43 | .visual = FB_VISUAL_TRUECOLOR, |
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | static int mtrr __devinitdata = 3; /* enable mtrr by default */ | 46 | static int mtrr = 3; /* enable mtrr by default */ |
| 47 | static bool blank = 1; /* enable blanking by default */ | 47 | static bool blank = 1; /* enable blanking by default */ |
| 48 | static int ypan = 1; /* 0: scroll, 1: ypan, 2: ywrap */ | 48 | static int ypan = 1; /* 0: scroll, 1: ypan, 2: ywrap */ |
| 49 | static bool pmi_setpal __devinitdata = true; /* use PMI for palette changes */ | 49 | static bool pmi_setpal = true; /* use PMI for palette changes */ |
| 50 | static bool nocrtc __devinitdata; /* ignore CRTC settings */ | 50 | static bool nocrtc; /* ignore CRTC settings */ |
| 51 | static bool noedid __devinitdata; /* don't try DDC transfers */ | 51 | static bool noedid; /* don't try DDC transfers */ |
| 52 | static int vram_remap __devinitdata; /* set amt. of memory to be used */ | 52 | static int vram_remap; /* set amt. of memory to be used */ |
| 53 | static int vram_total __devinitdata; /* set total amount of memory */ | 53 | static int vram_total; /* set total amount of memory */ |
| 54 | static u16 maxclk __devinitdata; /* maximum pixel clock */ | 54 | static u16 maxclk; /* maximum pixel clock */ |
| 55 | static u16 maxvf __devinitdata; /* maximum vertical frequency */ | 55 | static u16 maxvf; /* maximum vertical frequency */ |
| 56 | static u16 maxhf __devinitdata; /* maximum horizontal frequency */ | 56 | static u16 maxhf; /* maximum horizontal frequency */ |
| 57 | static u16 vbemode __devinitdata; /* force use of a specific VBE mode */ | 57 | static u16 vbemode; /* force use of a specific VBE mode */ |
| 58 | static char *mode_option __devinitdata; | 58 | static char *mode_option; |
| 59 | static u8 dac_width = 6; | 59 | static u8 dac_width = 6; |
| 60 | 60 | ||
| 61 | static struct uvesafb_ktask *uvfb_tasks[UVESAFB_TASKS_MAX]; | 61 | static struct uvesafb_ktask *uvfb_tasks[UVESAFB_TASKS_MAX]; |
| @@ -418,8 +418,8 @@ static void uvesafb_vbe_state_restore(struct uvesafb_par *par, u8 *state_buf) | |||
| 418 | uvesafb_free(task); | 418 | uvesafb_free(task); |
| 419 | } | 419 | } |
| 420 | 420 | ||
| 421 | static int __devinit uvesafb_vbe_getinfo(struct uvesafb_ktask *task, | 421 | static int uvesafb_vbe_getinfo(struct uvesafb_ktask *task, |
| 422 | struct uvesafb_par *par) | 422 | struct uvesafb_par *par) |
| 423 | { | 423 | { |
| 424 | int err; | 424 | int err; |
| 425 | 425 | ||
| @@ -477,8 +477,8 @@ static int __devinit uvesafb_vbe_getinfo(struct uvesafb_ktask *task, | |||
| 477 | return 0; | 477 | return 0; |
| 478 | } | 478 | } |
| 479 | 479 | ||
| 480 | static int __devinit uvesafb_vbe_getmodes(struct uvesafb_ktask *task, | 480 | static int uvesafb_vbe_getmodes(struct uvesafb_ktask *task, |
| 481 | struct uvesafb_par *par) | 481 | struct uvesafb_par *par) |
| 482 | { | 482 | { |
| 483 | int off = 0, err; | 483 | int off = 0, err; |
| 484 | u16 *mode; | 484 | u16 *mode; |
| @@ -556,8 +556,8 @@ static int __devinit uvesafb_vbe_getmodes(struct uvesafb_ktask *task, | |||
| 556 | * x86 and not x86_64. | 556 | * x86 and not x86_64. |
| 557 | */ | 557 | */ |
| 558 | #ifdef CONFIG_X86_32 | 558 | #ifdef CONFIG_X86_32 |
| 559 | static int __devinit uvesafb_vbe_getpmi(struct uvesafb_ktask *task, | 559 | static int uvesafb_vbe_getpmi(struct uvesafb_ktask *task, |
| 560 | struct uvesafb_par *par) | 560 | struct uvesafb_par *par) |
| 561 | { | 561 | { |
| 562 | int i, err; | 562 | int i, err; |
| 563 | 563 | ||
| @@ -602,8 +602,8 @@ static int __devinit uvesafb_vbe_getpmi(struct uvesafb_ktask *task, | |||
| 602 | * Check whether a video mode is supported by the Video BIOS and is | 602 | * Check whether a video mode is supported by the Video BIOS and is |
| 603 | * compatible with the monitor limits. | 603 | * compatible with the monitor limits. |
| 604 | */ | 604 | */ |
| 605 | static int __devinit uvesafb_is_valid_mode(struct fb_videomode *mode, | 605 | static int uvesafb_is_valid_mode(struct fb_videomode *mode, |
| 606 | struct fb_info *info) | 606 | struct fb_info *info) |
| 607 | { | 607 | { |
| 608 | if (info->monspecs.gtf) { | 608 | if (info->monspecs.gtf) { |
| 609 | fb_videomode_to_var(&info->var, mode); | 609 | fb_videomode_to_var(&info->var, mode); |
| @@ -618,8 +618,7 @@ static int __devinit uvesafb_is_valid_mode(struct fb_videomode *mode, | |||
| 618 | return 1; | 618 | return 1; |
| 619 | } | 619 | } |
| 620 | 620 | ||
| 621 | static int __devinit uvesafb_vbe_getedid(struct uvesafb_ktask *task, | 621 | static int uvesafb_vbe_getedid(struct uvesafb_ktask *task, struct fb_info *info) |
| 622 | struct fb_info *info) | ||
| 623 | { | 622 | { |
| 624 | struct uvesafb_par *par = info->par; | 623 | struct uvesafb_par *par = info->par; |
| 625 | int err = 0; | 624 | int err = 0; |
| @@ -684,8 +683,8 @@ static int __devinit uvesafb_vbe_getedid(struct uvesafb_ktask *task, | |||
| 684 | return err; | 683 | return err; |
| 685 | } | 684 | } |
| 686 | 685 | ||
| 687 | static void __devinit uvesafb_vbe_getmonspecs(struct uvesafb_ktask *task, | 686 | static void uvesafb_vbe_getmonspecs(struct uvesafb_ktask *task, |
| 688 | struct fb_info *info) | 687 | struct fb_info *info) |
| 689 | { | 688 | { |
| 690 | struct uvesafb_par *par = info->par; | 689 | struct uvesafb_par *par = info->par; |
| 691 | int i; | 690 | int i; |
| @@ -765,8 +764,8 @@ static void __devinit uvesafb_vbe_getmonspecs(struct uvesafb_ktask *task, | |||
| 765 | return; | 764 | return; |
| 766 | } | 765 | } |
| 767 | 766 | ||
| 768 | static void __devinit uvesafb_vbe_getstatesize(struct uvesafb_ktask *task, | 767 | static void uvesafb_vbe_getstatesize(struct uvesafb_ktask *task, |
| 769 | struct uvesafb_par *par) | 768 | struct uvesafb_par *par) |
| 770 | { | 769 | { |
| 771 | int err; | 770 | int err; |
| 772 | 771 | ||
| @@ -794,7 +793,7 @@ static void __devinit uvesafb_vbe_getstatesize(struct uvesafb_ktask *task, | |||
| 794 | par->vbe_state_size = 64 * (task->t.regs.ebx & 0xffff); | 793 | par->vbe_state_size = 64 * (task->t.regs.ebx & 0xffff); |
| 795 | } | 794 | } |
| 796 | 795 | ||
| 797 | static int __devinit uvesafb_vbe_init(struct fb_info *info) | 796 | static int uvesafb_vbe_init(struct fb_info *info) |
| 798 | { | 797 | { |
| 799 | struct uvesafb_ktask *task = NULL; | 798 | struct uvesafb_ktask *task = NULL; |
| 800 | struct uvesafb_par *par = info->par; | 799 | struct uvesafb_par *par = info->par; |
| @@ -839,7 +838,7 @@ out: uvesafb_free(task); | |||
| 839 | return err; | 838 | return err; |
| 840 | } | 839 | } |
| 841 | 840 | ||
| 842 | static int __devinit uvesafb_vbe_init_mode(struct fb_info *info) | 841 | static int uvesafb_vbe_init_mode(struct fb_info *info) |
| 843 | { | 842 | { |
| 844 | struct list_head *pos; | 843 | struct list_head *pos; |
| 845 | struct fb_modelist *modelist; | 844 | struct fb_modelist *modelist; |
| @@ -1444,8 +1443,7 @@ static struct fb_ops uvesafb_ops = { | |||
| 1444 | .fb_set_par = uvesafb_set_par, | 1443 | .fb_set_par = uvesafb_set_par, |
| 1445 | }; | 1444 | }; |
| 1446 | 1445 | ||
| 1447 | static void __devinit uvesafb_init_info(struct fb_info *info, | 1446 | static void uvesafb_init_info(struct fb_info *info, struct vbe_mode_ib *mode) |
| 1448 | struct vbe_mode_ib *mode) | ||
| 1449 | { | 1447 | { |
| 1450 | unsigned int size_vmode; | 1448 | unsigned int size_vmode; |
| 1451 | unsigned int size_remap; | 1449 | unsigned int size_remap; |
| @@ -1540,7 +1538,7 @@ static void __devinit uvesafb_init_info(struct fb_info *info, | |||
| 1540 | info->fbops->fb_pan_display = NULL; | 1538 | info->fbops->fb_pan_display = NULL; |
| 1541 | } | 1539 | } |
| 1542 | 1540 | ||
| 1543 | static void __devinit uvesafb_init_mtrr(struct fb_info *info) | 1541 | static void uvesafb_init_mtrr(struct fb_info *info) |
| 1544 | { | 1542 | { |
| 1545 | #ifdef CONFIG_MTRR | 1543 | #ifdef CONFIG_MTRR |
| 1546 | if (mtrr && !(info->fix.smem_start & (PAGE_SIZE - 1))) { | 1544 | if (mtrr && !(info->fix.smem_start & (PAGE_SIZE - 1))) { |
| @@ -1582,7 +1580,7 @@ static void __devinit uvesafb_init_mtrr(struct fb_info *info) | |||
| 1582 | #endif /* CONFIG_MTRR */ | 1580 | #endif /* CONFIG_MTRR */ |
| 1583 | } | 1581 | } |
| 1584 | 1582 | ||
| 1585 | static void __devinit uvesafb_ioremap(struct fb_info *info) | 1583 | static void uvesafb_ioremap(struct fb_info *info) |
| 1586 | { | 1584 | { |
| 1587 | #ifdef CONFIG_X86 | 1585 | #ifdef CONFIG_X86 |
| 1588 | switch (mtrr) { | 1586 | switch (mtrr) { |
| @@ -1738,7 +1736,7 @@ static struct attribute_group uvesafb_dev_attgrp = { | |||
| 1738 | .attrs = uvesafb_dev_attrs, | 1736 | .attrs = uvesafb_dev_attrs, |
| 1739 | }; | 1737 | }; |
| 1740 | 1738 | ||
| 1741 | static int __devinit uvesafb_probe(struct platform_device *dev) | 1739 | static int uvesafb_probe(struct platform_device *dev) |
| 1742 | { | 1740 | { |
| 1743 | struct fb_info *info; | 1741 | struct fb_info *info; |
| 1744 | struct vbe_mode_ib *mode = NULL; | 1742 | struct vbe_mode_ib *mode = NULL; |
| @@ -1882,7 +1880,7 @@ static struct platform_driver uvesafb_driver = { | |||
| 1882 | static struct platform_device *uvesafb_device; | 1880 | static struct platform_device *uvesafb_device; |
| 1883 | 1881 | ||
| 1884 | #ifndef MODULE | 1882 | #ifndef MODULE |
| 1885 | static int __devinit uvesafb_setup(char *options) | 1883 | static int uvesafb_setup(char *options) |
| 1886 | { | 1884 | { |
| 1887 | char *this_opt; | 1885 | char *this_opt; |
| 1888 | 1886 | ||
| @@ -1950,7 +1948,7 @@ static ssize_t store_v86d(struct device_driver *dev, const char *buf, | |||
| 1950 | 1948 | ||
| 1951 | static DRIVER_ATTR(v86d, S_IRUGO | S_IWUSR, show_v86d, store_v86d); | 1949 | static DRIVER_ATTR(v86d, S_IRUGO | S_IWUSR, show_v86d, store_v86d); |
| 1952 | 1950 | ||
| 1953 | static int __devinit uvesafb_init(void) | 1951 | static int uvesafb_init(void) |
| 1954 | { | 1952 | { |
| 1955 | int err; | 1953 | int err; |
| 1956 | 1954 | ||
| @@ -1994,7 +1992,7 @@ static int __devinit uvesafb_init(void) | |||
| 1994 | 1992 | ||
| 1995 | module_init(uvesafb_init); | 1993 | module_init(uvesafb_init); |
| 1996 | 1994 | ||
| 1997 | static void __devexit uvesafb_exit(void) | 1995 | static void uvesafb_exit(void) |
| 1998 | { | 1996 | { |
| 1999 | struct uvesafb_ktask *task; | 1997 | struct uvesafb_ktask *task; |
| 2000 | 1998 | ||
diff --git a/drivers/video/vermilion/vermilion.c b/drivers/video/vermilion/vermilion.c index 4709edc3cb7f..0aa516fc59cd 100644 --- a/drivers/video/vermilion/vermilion.c +++ b/drivers/video/vermilion/vermilion.c | |||
| @@ -393,7 +393,7 @@ static void vmlfb_release_devices(struct vml_par *par) | |||
| 393 | * Free up allocated resources for a device. | 393 | * Free up allocated resources for a device. |
| 394 | */ | 394 | */ |
| 395 | 395 | ||
| 396 | static void __devexit vml_pci_remove(struct pci_dev *dev) | 396 | static void vml_pci_remove(struct pci_dev *dev) |
| 397 | { | 397 | { |
| 398 | struct fb_info *info; | 398 | struct fb_info *info; |
| 399 | struct vml_info *vinfo; | 399 | struct vml_info *vinfo; |
| @@ -452,8 +452,7 @@ static void vmlfb_set_pref_pixel_format(struct fb_var_screeninfo *var) | |||
| 452 | * struct per pipe. Currently we have only one pipe. | 452 | * struct per pipe. Currently we have only one pipe. |
| 453 | */ | 453 | */ |
| 454 | 454 | ||
| 455 | static int __devinit vml_pci_probe(struct pci_dev *dev, | 455 | static int vml_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) |
| 456 | const struct pci_device_id *id) | ||
| 457 | { | 456 | { |
| 458 | struct vml_info *vinfo; | 457 | struct vml_info *vinfo; |
| 459 | struct fb_info *info; | 458 | struct fb_info *info; |
| @@ -1060,7 +1059,7 @@ static struct pci_driver vmlfb_pci_driver = { | |||
| 1060 | .name = "vmlfb", | 1059 | .name = "vmlfb", |
| 1061 | .id_table = vml_ids, | 1060 | .id_table = vml_ids, |
| 1062 | .probe = vml_pci_probe, | 1061 | .probe = vml_pci_probe, |
| 1063 | .remove = __devexit_p(vml_pci_remove) | 1062 | .remove = vml_pci_remove, |
| 1064 | }; | 1063 | }; |
| 1065 | 1064 | ||
| 1066 | static void __exit vmlfb_cleanup(void) | 1065 | static void __exit vmlfb_cleanup(void) |
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c index c7f692525b88..8bc1f9398945 100644 --- a/drivers/video/vfb.c +++ b/drivers/video/vfb.c | |||
| @@ -78,7 +78,7 @@ static void rvfree(void *mem, unsigned long size) | |||
| 78 | vfree(mem); | 78 | vfree(mem); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | static struct fb_var_screeninfo vfb_default __devinitdata = { | 81 | static struct fb_var_screeninfo vfb_default = { |
| 82 | .xres = 640, | 82 | .xres = 640, |
| 83 | .yres = 480, | 83 | .yres = 480, |
| 84 | .xres_virtual = 640, | 84 | .xres_virtual = 640, |
| @@ -100,7 +100,7 @@ static struct fb_var_screeninfo vfb_default __devinitdata = { | |||
| 100 | .vmode = FB_VMODE_NONINTERLACED, | 100 | .vmode = FB_VMODE_NONINTERLACED, |
| 101 | }; | 101 | }; |
| 102 | 102 | ||
| 103 | static struct fb_fix_screeninfo vfb_fix __devinitdata = { | 103 | static struct fb_fix_screeninfo vfb_fix = { |
| 104 | .id = "Virtual FB", | 104 | .id = "Virtual FB", |
| 105 | .type = FB_TYPE_PACKED_PIXELS, | 105 | .type = FB_TYPE_PACKED_PIXELS, |
| 106 | .visual = FB_VISUAL_PSEUDOCOLOR, | 106 | .visual = FB_VISUAL_PSEUDOCOLOR, |
| @@ -477,7 +477,7 @@ static int __init vfb_setup(char *options) | |||
| 477 | * Initialisation | 477 | * Initialisation |
| 478 | */ | 478 | */ |
| 479 | 479 | ||
| 480 | static int __devinit vfb_probe(struct platform_device *dev) | 480 | static int vfb_probe(struct platform_device *dev) |
| 481 | { | 481 | { |
| 482 | struct fb_info *info; | 482 | struct fb_info *info; |
| 483 | int retval = -ENOMEM; | 483 | int retval = -ENOMEM; |
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c index 0267acd8dc83..545faeccdb44 100644 --- a/drivers/video/vga16fb.c +++ b/drivers/video/vga16fb.c | |||
| @@ -65,7 +65,7 @@ struct vga16fb_par { | |||
| 65 | 65 | ||
| 66 | /* --------------------------------------------------------------------- */ | 66 | /* --------------------------------------------------------------------- */ |
| 67 | 67 | ||
| 68 | static struct fb_var_screeninfo vga16fb_defined __devinitdata = { | 68 | static struct fb_var_screeninfo vga16fb_defined = { |
| 69 | .xres = 640, | 69 | .xres = 640, |
| 70 | .yres = 480, | 70 | .yres = 480, |
| 71 | .xres_virtual = 640, | 71 | .xres_virtual = 640, |
| @@ -85,7 +85,7 @@ static struct fb_var_screeninfo vga16fb_defined __devinitdata = { | |||
| 85 | }; | 85 | }; |
| 86 | 86 | ||
| 87 | /* name should not depend on EGA/VGA */ | 87 | /* name should not depend on EGA/VGA */ |
| 88 | static struct fb_fix_screeninfo vga16fb_fix __devinitdata = { | 88 | static struct fb_fix_screeninfo vga16fb_fix = { |
| 89 | .id = "VGA16 VGA", | 89 | .id = "VGA16 VGA", |
| 90 | .smem_start = VGA_FB_PHYS, | 90 | .smem_start = VGA_FB_PHYS, |
| 91 | .smem_len = VGA_FB_PHYS_LEN, | 91 | .smem_len = VGA_FB_PHYS_LEN, |
| @@ -1303,7 +1303,7 @@ static int __init vga16fb_setup(char *options) | |||
| 1303 | } | 1303 | } |
| 1304 | #endif | 1304 | #endif |
| 1305 | 1305 | ||
| 1306 | static int __devinit vga16fb_probe(struct platform_device *dev) | 1306 | static int vga16fb_probe(struct platform_device *dev) |
| 1307 | { | 1307 | { |
| 1308 | struct fb_info *info; | 1308 | struct fb_info *info; |
| 1309 | struct vga16fb_par *par; | 1309 | struct vga16fb_par *par; |
| @@ -1395,7 +1395,7 @@ static int __devinit vga16fb_probe(struct platform_device *dev) | |||
| 1395 | return ret; | 1395 | return ret; |
| 1396 | } | 1396 | } |
| 1397 | 1397 | ||
| 1398 | static int __devexit vga16fb_remove(struct platform_device *dev) | 1398 | static int vga16fb_remove(struct platform_device *dev) |
| 1399 | { | 1399 | { |
| 1400 | struct fb_info *info = platform_get_drvdata(dev); | 1400 | struct fb_info *info = platform_get_drvdata(dev); |
| 1401 | 1401 | ||
| @@ -1407,7 +1407,7 @@ static int __devexit vga16fb_remove(struct platform_device *dev) | |||
| 1407 | 1407 | ||
| 1408 | static struct platform_driver vga16fb_driver = { | 1408 | static struct platform_driver vga16fb_driver = { |
| 1409 | .probe = vga16fb_probe, | 1409 | .probe = vga16fb_probe, |
| 1410 | .remove = __devexit_p(vga16fb_remove), | 1410 | .remove = vga16fb_remove, |
| 1411 | .driver = { | 1411 | .driver = { |
| 1412 | .name = "vga16fb", | 1412 | .name = "vga16fb", |
| 1413 | }, | 1413 | }, |
diff --git a/drivers/video/via/dvi.c b/drivers/video/via/dvi.c index 6be72f0ba21d..7789553952d3 100644 --- a/drivers/video/via/dvi.c +++ b/drivers/video/via/dvi.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | static void tmds_register_write(int index, u8 data); | 25 | static void tmds_register_write(int index, u8 data); |
| 26 | static int tmds_register_read(int index); | 26 | static int tmds_register_read(int index); |
| 27 | static int tmds_register_read_bytes(int index, u8 *buff, int buff_len); | 27 | static int tmds_register_read_bytes(int index, u8 *buff, int buff_len); |
| 28 | static void __devinit dvi_get_panel_size_from_DDCv1( | 28 | static void dvi_get_panel_size_from_DDCv1( |
| 29 | struct tmds_chip_information *tmds_chip, | 29 | struct tmds_chip_information *tmds_chip, |
| 30 | struct tmds_setting_information *tmds_setting); | 30 | struct tmds_setting_information *tmds_setting); |
| 31 | static int viafb_dvi_query_EDID(void); | 31 | static int viafb_dvi_query_EDID(void); |
| @@ -35,8 +35,8 @@ static inline bool check_tmds_chip(int device_id_subaddr, int device_id) | |||
| 35 | return tmds_register_read(device_id_subaddr) == device_id; | 35 | return tmds_register_read(device_id_subaddr) == device_id; |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | void __devinit viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, | 38 | void viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, |
| 39 | struct tmds_setting_information *tmds_setting) | 39 | struct tmds_setting_information *tmds_setting) |
| 40 | { | 40 | { |
| 41 | DEBUG_MSG(KERN_INFO "viafb_init_dvi_size()\n"); | 41 | DEBUG_MSG(KERN_INFO "viafb_init_dvi_size()\n"); |
| 42 | 42 | ||
| @@ -47,7 +47,7 @@ void __devinit viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, | |||
| 47 | return; | 47 | return; |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | bool __devinit viafb_tmds_trasmitter_identify(void) | 50 | bool viafb_tmds_trasmitter_identify(void) |
| 51 | { | 51 | { |
| 52 | unsigned char sr2a = 0, sr1e = 0, sr3e = 0; | 52 | unsigned char sr2a = 0, sr1e = 0, sr3e = 0; |
| 53 | 53 | ||
| @@ -285,7 +285,7 @@ static int viafb_dvi_query_EDID(void) | |||
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | /* Get Panel Size Using EDID1 Table */ | 287 | /* Get Panel Size Using EDID1 Table */ |
| 288 | static void __devinit dvi_get_panel_size_from_DDCv1( | 288 | static void dvi_get_panel_size_from_DDCv1( |
| 289 | struct tmds_chip_information *tmds_chip, | 289 | struct tmds_chip_information *tmds_chip, |
| 290 | struct tmds_setting_information *tmds_setting) | 290 | struct tmds_setting_information *tmds_setting) |
| 291 | { | 291 | { |
diff --git a/drivers/video/via/dvi.h b/drivers/video/via/dvi.h index db757850c216..4c6bfba57d11 100644 --- a/drivers/video/via/dvi.h +++ b/drivers/video/via/dvi.h | |||
| @@ -56,8 +56,8 @@ | |||
| 56 | int viafb_dvi_sense(void); | 56 | int viafb_dvi_sense(void); |
| 57 | void viafb_dvi_disable(void); | 57 | void viafb_dvi_disable(void); |
| 58 | void viafb_dvi_enable(void); | 58 | void viafb_dvi_enable(void); |
| 59 | bool __devinit viafb_tmds_trasmitter_identify(void); | 59 | bool viafb_tmds_trasmitter_identify(void); |
| 60 | void __devinit viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, | 60 | void viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, |
| 61 | struct tmds_setting_information *tmds_setting); | 61 | struct tmds_setting_information *tmds_setting); |
| 62 | void viafb_dvi_set_mode(const struct fb_var_screeninfo *var, | 62 | void viafb_dvi_set_mode(const struct fb_var_screeninfo *var, |
| 63 | u16 cxres, u16 cyres, int iga); | 63 | u16 cxres, u16 cyres, int iga); |
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c index 898590db5e14..80233dae358a 100644 --- a/drivers/video/via/hw.c +++ b/drivers/video/via/hw.c | |||
| @@ -465,9 +465,9 @@ static struct via_device_mapping device_mapping[] = { | |||
| 465 | static struct via_clock clock; | 465 | static struct via_clock clock; |
| 466 | 466 | ||
| 467 | static void load_fix_bit_crtc_reg(void); | 467 | static void load_fix_bit_crtc_reg(void); |
| 468 | static void __devinit init_gfx_chip_info(int chip_type); | 468 | static void init_gfx_chip_info(int chip_type); |
| 469 | static void __devinit init_tmds_chip_info(void); | 469 | static void init_tmds_chip_info(void); |
| 470 | static void __devinit init_lvds_chip_info(void); | 470 | static void init_lvds_chip_info(void); |
| 471 | static void device_screen_off(void); | 471 | static void device_screen_off(void); |
| 472 | static void device_screen_on(void); | 472 | static void device_screen_on(void); |
| 473 | static void set_display_channel(void); | 473 | static void set_display_channel(void); |
| @@ -1507,7 +1507,7 @@ void viafb_fill_crtc_timing(const struct fb_var_screeninfo *var, | |||
| 1507 | viafb_set_vclock(PICOS2KHZ(var->pixclock) * 1000, iga); | 1507 | viafb_set_vclock(PICOS2KHZ(var->pixclock) * 1000, iga); |
| 1508 | } | 1508 | } |
| 1509 | 1509 | ||
| 1510 | void __devinit viafb_init_chip_info(int chip_type) | 1510 | void viafb_init_chip_info(int chip_type) |
| 1511 | { | 1511 | { |
| 1512 | via_clock_init(&clock, chip_type); | 1512 | via_clock_init(&clock, chip_type); |
| 1513 | init_gfx_chip_info(chip_type); | 1513 | init_gfx_chip_info(chip_type); |
| @@ -1540,7 +1540,7 @@ void viafb_update_device_setting(int hres, int vres, int bpp, int flag) | |||
| 1540 | } | 1540 | } |
| 1541 | } | 1541 | } |
| 1542 | 1542 | ||
| 1543 | static void __devinit init_gfx_chip_info(int chip_type) | 1543 | static void init_gfx_chip_info(int chip_type) |
| 1544 | { | 1544 | { |
| 1545 | u8 tmp; | 1545 | u8 tmp; |
| 1546 | 1546 | ||
| @@ -1593,7 +1593,7 @@ static void __devinit init_gfx_chip_info(int chip_type) | |||
| 1593 | } | 1593 | } |
| 1594 | } | 1594 | } |
| 1595 | 1595 | ||
| 1596 | static void __devinit init_tmds_chip_info(void) | 1596 | static void init_tmds_chip_info(void) |
| 1597 | { | 1597 | { |
| 1598 | viafb_tmds_trasmitter_identify(); | 1598 | viafb_tmds_trasmitter_identify(); |
| 1599 | 1599 | ||
| @@ -1638,7 +1638,7 @@ static void __devinit init_tmds_chip_info(void) | |||
| 1638 | &viaparinfo->shared->tmds_setting_info); | 1638 | &viaparinfo->shared->tmds_setting_info); |
| 1639 | } | 1639 | } |
| 1640 | 1640 | ||
| 1641 | static void __devinit init_lvds_chip_info(void) | 1641 | static void init_lvds_chip_info(void) |
| 1642 | { | 1642 | { |
| 1643 | viafb_lvds_trasmitter_identify(); | 1643 | viafb_lvds_trasmitter_identify(); |
| 1644 | viafb_init_lcd_size(); | 1644 | viafb_init_lcd_size(); |
| @@ -1672,7 +1672,7 @@ static void __devinit init_lvds_chip_info(void) | |||
| 1672 | viaparinfo->chip_info->lvds_chip_info.output_interface); | 1672 | viaparinfo->chip_info->lvds_chip_info.output_interface); |
| 1673 | } | 1673 | } |
| 1674 | 1674 | ||
| 1675 | void __devinit viafb_init_dac(int set_iga) | 1675 | void viafb_init_dac(int set_iga) |
| 1676 | { | 1676 | { |
| 1677 | int i; | 1677 | int i; |
| 1678 | u8 tmp; | 1678 | u8 tmp; |
diff --git a/drivers/video/via/hw.h b/drivers/video/via/hw.h index 6be243cfc823..a8205754c736 100644 --- a/drivers/video/via/hw.h +++ b/drivers/video/via/hw.h | |||
| @@ -663,8 +663,8 @@ void viafb_set_dpa_gfx(int output_interface, struct GFX_DPA_SETTING\ | |||
| 663 | int viafb_setmode(void); | 663 | int viafb_setmode(void); |
| 664 | void viafb_fill_var_timing_info(struct fb_var_screeninfo *var, | 664 | void viafb_fill_var_timing_info(struct fb_var_screeninfo *var, |
| 665 | const struct fb_videomode *mode); | 665 | const struct fb_videomode *mode); |
| 666 | void __devinit viafb_init_chip_info(int chip_type); | 666 | void viafb_init_chip_info(int chip_type); |
| 667 | void __devinit viafb_init_dac(int set_iga); | 667 | void viafb_init_dac(int set_iga); |
| 668 | int viafb_get_refresh(int hres, int vres, u32 float_refresh); | 668 | int viafb_get_refresh(int hres, int vres, u32 float_refresh); |
| 669 | void viafb_update_device_setting(int hres, int vres, int bpp, int flag); | 669 | void viafb_update_device_setting(int hres, int vres, int bpp, int flag); |
| 670 | 670 | ||
diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c index 165037910536..980ee1b1dcf3 100644 --- a/drivers/video/via/lcd.c +++ b/drivers/video/via/lcd.c | |||
| @@ -49,7 +49,7 @@ static struct _lcd_scaling_factor lcd_scaling_factor_CLE = { | |||
| 49 | }; | 49 | }; |
| 50 | 50 | ||
| 51 | static bool lvds_identify_integratedlvds(void); | 51 | static bool lvds_identify_integratedlvds(void); |
| 52 | static void __devinit fp_id_to_vindex(int panel_id); | 52 | static void fp_id_to_vindex(int panel_id); |
| 53 | static int lvds_register_read(int index); | 53 | static int lvds_register_read(int index); |
| 54 | static void load_lcd_scaling(int set_hres, int set_vres, int panel_hres, | 54 | static void load_lcd_scaling(int set_hres, int set_vres, int panel_hres, |
| 55 | int panel_vres); | 55 | int panel_vres); |
| @@ -81,7 +81,7 @@ static inline bool check_lvds_chip(int device_id_subaddr, int device_id) | |||
| 81 | return lvds_register_read(device_id_subaddr) == device_id; | 81 | return lvds_register_read(device_id_subaddr) == device_id; |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | void __devinit viafb_init_lcd_size(void) | 84 | void viafb_init_lcd_size(void) |
| 85 | { | 85 | { |
| 86 | DEBUG_MSG(KERN_INFO "viafb_init_lcd_size()\n"); | 86 | DEBUG_MSG(KERN_INFO "viafb_init_lcd_size()\n"); |
| 87 | 87 | ||
| @@ -139,7 +139,7 @@ static bool lvds_identify_integratedlvds(void) | |||
| 139 | return true; | 139 | return true; |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | bool __devinit viafb_lvds_trasmitter_identify(void) | 142 | bool viafb_lvds_trasmitter_identify(void) |
| 143 | { | 143 | { |
| 144 | if (viafb_lvds_identify_vt1636(VIA_PORT_31)) { | 144 | if (viafb_lvds_identify_vt1636(VIA_PORT_31)) { |
| 145 | viaparinfo->chip_info->lvds_chip_info.i2c_port = VIA_PORT_31; | 145 | viaparinfo->chip_info->lvds_chip_info.i2c_port = VIA_PORT_31; |
| @@ -180,7 +180,7 @@ bool __devinit viafb_lvds_trasmitter_identify(void) | |||
| 180 | return false; | 180 | return false; |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | static void __devinit fp_id_to_vindex(int panel_id) | 183 | static void fp_id_to_vindex(int panel_id) |
| 184 | { | 184 | { |
| 185 | DEBUG_MSG(KERN_INFO "fp_get_panel_id()\n"); | 185 | DEBUG_MSG(KERN_INFO "fp_get_panel_id()\n"); |
| 186 | 186 | ||
| @@ -914,7 +914,7 @@ static void check_diport_of_integrated_lvds( | |||
| 914 | plvds_chip_info->output_interface); | 914 | plvds_chip_info->output_interface); |
| 915 | } | 915 | } |
| 916 | 916 | ||
| 917 | void __devinit viafb_init_lvds_output_interface(struct lvds_chip_information | 917 | void viafb_init_lvds_output_interface(struct lvds_chip_information |
| 918 | *plvds_chip_info, | 918 | *plvds_chip_info, |
| 919 | struct lvds_setting_information | 919 | struct lvds_setting_information |
| 920 | *plvds_setting_info) | 920 | *plvds_setting_info) |
diff --git a/drivers/video/via/lcd.h b/drivers/video/via/lcd.h index 8f3e4e06156c..5c988a063ad5 100644 --- a/drivers/video/via/lcd.h +++ b/drivers/video/via/lcd.h | |||
| @@ -71,15 +71,15 @@ void viafb_enable_lvds_vt1636(struct lvds_setting_information | |||
| 71 | struct lvds_chip_information *plvds_chip_info); | 71 | struct lvds_chip_information *plvds_chip_info); |
| 72 | void viafb_lcd_disable(void); | 72 | void viafb_lcd_disable(void); |
| 73 | void viafb_lcd_enable(void); | 73 | void viafb_lcd_enable(void); |
| 74 | void __devinit viafb_init_lcd_size(void); | 74 | void viafb_init_lcd_size(void); |
| 75 | void __devinit viafb_init_lvds_output_interface(struct lvds_chip_information | 75 | void viafb_init_lvds_output_interface(struct lvds_chip_information |
| 76 | *plvds_chip_info, | 76 | *plvds_chip_info, |
| 77 | struct lvds_setting_information | 77 | struct lvds_setting_information |
| 78 | *plvds_setting_info); | 78 | *plvds_setting_info); |
| 79 | void viafb_lcd_set_mode(const struct fb_var_screeninfo *var, u16 cxres, | 79 | void viafb_lcd_set_mode(const struct fb_var_screeninfo *var, u16 cxres, |
| 80 | u16 cyres, struct lvds_setting_information *plvds_setting_info, | 80 | u16 cyres, struct lvds_setting_information *plvds_setting_info, |
| 81 | struct lvds_chip_information *plvds_chip_info); | 81 | struct lvds_chip_information *plvds_chip_info); |
| 82 | bool __devinit viafb_lvds_trasmitter_identify(void); | 82 | bool viafb_lvds_trasmitter_identify(void); |
| 83 | void viafb_init_lvds_output_interface(struct lvds_chip_information | 83 | void viafb_init_lvds_output_interface(struct lvds_chip_information |
| 84 | *plvds_chip_info, | 84 | *plvds_chip_info, |
| 85 | struct lvds_setting_information | 85 | struct lvds_setting_information |
diff --git a/drivers/video/via/via-core.c b/drivers/video/via/via-core.c index dd58b530c0df..6e274825fb31 100644 --- a/drivers/video/via/via-core.c +++ b/drivers/video/via/via-core.c | |||
| @@ -80,7 +80,7 @@ static inline int viafb_mmio_read(int reg) | |||
| 80 | */ | 80 | */ |
| 81 | static u32 viafb_enabled_ints; | 81 | static u32 viafb_enabled_ints; |
| 82 | 82 | ||
| 83 | static void __devinit viafb_int_init(void) | 83 | static void viafb_int_init(void) |
| 84 | { | 84 | { |
| 85 | viafb_enabled_ints = 0; | 85 | viafb_enabled_ints = 0; |
| 86 | 86 | ||
| @@ -475,7 +475,7 @@ static int viafb_get_fb_size_from_pci(int chip_type) | |||
| 475 | /* | 475 | /* |
| 476 | * Figure out and map our MMIO regions. | 476 | * Figure out and map our MMIO regions. |
| 477 | */ | 477 | */ |
| 478 | static int __devinit via_pci_setup_mmio(struct viafb_dev *vdev) | 478 | static int via_pci_setup_mmio(struct viafb_dev *vdev) |
| 479 | { | 479 | { |
| 480 | int ret; | 480 | int ret; |
| 481 | /* | 481 | /* |
| @@ -550,8 +550,8 @@ static struct viafb_subdev_info { | |||
| 550 | }; | 550 | }; |
| 551 | #define N_SUBDEVS ARRAY_SIZE(viafb_subdevs) | 551 | #define N_SUBDEVS ARRAY_SIZE(viafb_subdevs) |
| 552 | 552 | ||
| 553 | static int __devinit via_create_subdev(struct viafb_dev *vdev, | 553 | static int via_create_subdev(struct viafb_dev *vdev, |
| 554 | struct viafb_subdev_info *info) | 554 | struct viafb_subdev_info *info) |
| 555 | { | 555 | { |
| 556 | int ret; | 556 | int ret; |
| 557 | 557 | ||
| @@ -573,7 +573,7 @@ static int __devinit via_create_subdev(struct viafb_dev *vdev, | |||
| 573 | return ret; | 573 | return ret; |
| 574 | } | 574 | } |
| 575 | 575 | ||
| 576 | static int __devinit via_setup_subdevs(struct viafb_dev *vdev) | 576 | static int via_setup_subdevs(struct viafb_dev *vdev) |
| 577 | { | 577 | { |
| 578 | int i; | 578 | int i; |
| 579 | 579 | ||
| @@ -671,8 +671,7 @@ static int via_resume(struct pci_dev *pdev) | |||
| 671 | } | 671 | } |
| 672 | #endif /* CONFIG_PM */ | 672 | #endif /* CONFIG_PM */ |
| 673 | 673 | ||
| 674 | static int __devinit via_pci_probe(struct pci_dev *pdev, | 674 | static int via_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 675 | const struct pci_device_id *ent) | ||
| 676 | { | 675 | { |
| 677 | int ret; | 676 | int ret; |
| 678 | 677 | ||
| @@ -716,7 +715,7 @@ out_disable: | |||
| 716 | return ret; | 715 | return ret; |
| 717 | } | 716 | } |
| 718 | 717 | ||
| 719 | static void __devexit via_pci_remove(struct pci_dev *pdev) | 718 | static void via_pci_remove(struct pci_dev *pdev) |
| 720 | { | 719 | { |
| 721 | via_teardown_subdevs(); | 720 | via_teardown_subdevs(); |
| 722 | via_fb_pci_remove(pdev); | 721 | via_fb_pci_remove(pdev); |
| @@ -725,7 +724,7 @@ static void __devexit via_pci_remove(struct pci_dev *pdev) | |||
| 725 | } | 724 | } |
| 726 | 725 | ||
| 727 | 726 | ||
| 728 | static struct pci_device_id via_pci_table[] __devinitdata = { | 727 | static struct pci_device_id via_pci_table[] = { |
| 729 | { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_CLE266_DID), | 728 | { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_CLE266_DID), |
| 730 | .driver_data = UNICHROME_CLE266 }, | 729 | .driver_data = UNICHROME_CLE266 }, |
| 731 | { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_K400_DID), | 730 | { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_K400_DID), |
| @@ -760,7 +759,7 @@ static struct pci_driver via_driver = { | |||
| 760 | .name = "viafb", | 759 | .name = "viafb", |
| 761 | .id_table = via_pci_table, | 760 | .id_table = via_pci_table, |
| 762 | .probe = via_pci_probe, | 761 | .probe = via_pci_probe, |
| 763 | .remove = __devexit_p(via_pci_remove), | 762 | .remove = via_pci_remove, |
| 764 | #ifdef CONFIG_PM | 763 | #ifdef CONFIG_PM |
| 765 | .suspend = via_suspend, | 764 | .suspend = via_suspend, |
| 766 | .resume = via_resume, | 765 | .resume = via_resume, |
diff --git a/drivers/video/via/via-gpio.c b/drivers/video/via/via-gpio.c index d69cfef7c338..e408679081ab 100644 --- a/drivers/video/via/via-gpio.c +++ b/drivers/video/via/via-gpio.c | |||
| @@ -212,7 +212,7 @@ EXPORT_SYMBOL_GPL(viafb_gpio_lookup); | |||
| 212 | /* | 212 | /* |
| 213 | * Platform device stuff. | 213 | * Platform device stuff. |
| 214 | */ | 214 | */ |
| 215 | static __devinit int viafb_gpio_probe(struct platform_device *platdev) | 215 | static int viafb_gpio_probe(struct platform_device *platdev) |
| 216 | { | 216 | { |
| 217 | struct viafb_dev *vdev = platdev->dev.platform_data; | 217 | struct viafb_dev *vdev = platdev->dev.platform_data; |
| 218 | struct via_port_cfg *port_cfg = vdev->port_cfg; | 218 | struct via_port_cfg *port_cfg = vdev->port_cfg; |
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index c80e770e1800..325c43c6ff97 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c | |||
| @@ -1072,7 +1072,7 @@ static int __init parse_active_dev(void) | |||
| 1072 | return 0; | 1072 | return 0; |
| 1073 | } | 1073 | } |
| 1074 | 1074 | ||
| 1075 | static int __devinit parse_port(char *opt_str, int *output_interface) | 1075 | static int parse_port(char *opt_str, int *output_interface) |
| 1076 | { | 1076 | { |
| 1077 | if (!strncmp(opt_str, "DVP0", 4)) | 1077 | if (!strncmp(opt_str, "DVP0", 4)) |
| 1078 | *output_interface = INTERFACE_DVP0; | 1078 | *output_interface = INTERFACE_DVP0; |
| @@ -1089,7 +1089,7 @@ static int __devinit parse_port(char *opt_str, int *output_interface) | |||
| 1089 | return 0; | 1089 | return 0; |
| 1090 | } | 1090 | } |
| 1091 | 1091 | ||
| 1092 | static void __devinit parse_lcd_port(void) | 1092 | static void parse_lcd_port(void) |
| 1093 | { | 1093 | { |
| 1094 | parse_port(viafb_lcd_port, &viaparinfo->chip_info->lvds_chip_info. | 1094 | parse_port(viafb_lcd_port, &viaparinfo->chip_info->lvds_chip_info. |
| 1095 | output_interface); | 1095 | output_interface); |
| @@ -1102,7 +1102,7 @@ static void __devinit parse_lcd_port(void) | |||
| 1102 | output_interface); | 1102 | output_interface); |
| 1103 | } | 1103 | } |
| 1104 | 1104 | ||
| 1105 | static void __devinit parse_dvi_port(void) | 1105 | static void parse_dvi_port(void) |
| 1106 | { | 1106 | { |
| 1107 | parse_port(viafb_dvi_port, &viaparinfo->chip_info->tmds_chip_info. | 1107 | parse_port(viafb_dvi_port, &viaparinfo->chip_info->tmds_chip_info. |
| 1108 | output_interface); | 1108 | output_interface); |
| @@ -1727,7 +1727,7 @@ static struct viafb_pm_hooks viafb_fb_pm_hooks = { | |||
| 1727 | 1727 | ||
| 1728 | #endif | 1728 | #endif |
| 1729 | 1729 | ||
| 1730 | static void __devinit i2c_bus_probe(struct viafb_shared *shared) | 1730 | static void i2c_bus_probe(struct viafb_shared *shared) |
| 1731 | { | 1731 | { |
| 1732 | /* should be always CRT */ | 1732 | /* should be always CRT */ |
| 1733 | printk(KERN_INFO "viafb: Probing I2C bus 0x26\n"); | 1733 | printk(KERN_INFO "viafb: Probing I2C bus 0x26\n"); |
| @@ -1753,7 +1753,7 @@ static void i2c_bus_free(struct viafb_shared *shared) | |||
| 1753 | via_aux_free(shared->i2c_2C); | 1753 | via_aux_free(shared->i2c_2C); |
| 1754 | } | 1754 | } |
| 1755 | 1755 | ||
| 1756 | int __devinit via_fb_pci_probe(struct viafb_dev *vdev) | 1756 | int via_fb_pci_probe(struct viafb_dev *vdev) |
| 1757 | { | 1757 | { |
| 1758 | u32 default_xres, default_yres; | 1758 | u32 default_xres, default_yres; |
| 1759 | struct fb_var_screeninfo default_var; | 1759 | struct fb_var_screeninfo default_var; |
| @@ -1945,7 +1945,7 @@ out_fb_release: | |||
| 1945 | return rc; | 1945 | return rc; |
| 1946 | } | 1946 | } |
| 1947 | 1947 | ||
| 1948 | void __devexit via_fb_pci_remove(struct pci_dev *pdev) | 1948 | void via_fb_pci_remove(struct pci_dev *pdev) |
| 1949 | { | 1949 | { |
| 1950 | DEBUG_MSG(KERN_INFO "via_pci_remove!\n"); | 1950 | DEBUG_MSG(KERN_INFO "via_pci_remove!\n"); |
| 1951 | fb_dealloc_cmap(&viafbinfo->cmap); | 1951 | fb_dealloc_cmap(&viafbinfo->cmap); |
diff --git a/drivers/video/vt8500lcdfb.c b/drivers/video/vt8500lcdfb.c index 9af8da70e781..aa2579c2364a 100644 --- a/drivers/video/vt8500lcdfb.c +++ b/drivers/video/vt8500lcdfb.c | |||
| @@ -273,7 +273,7 @@ static irqreturn_t vt8500lcd_handle_irq(int irq, void *dev_id) | |||
| 273 | return IRQ_HANDLED; | 273 | return IRQ_HANDLED; |
| 274 | } | 274 | } |
| 275 | 275 | ||
| 276 | static int __devinit vt8500lcd_probe(struct platform_device *pdev) | 276 | static int vt8500lcd_probe(struct platform_device *pdev) |
| 277 | { | 277 | { |
| 278 | struct vt8500lcd_info *fbi; | 278 | struct vt8500lcd_info *fbi; |
| 279 | struct resource *res; | 279 | struct resource *res; |
| @@ -469,7 +469,7 @@ failed: | |||
| 469 | return ret; | 469 | return ret; |
| 470 | } | 470 | } |
| 471 | 471 | ||
| 472 | static int __devexit vt8500lcd_remove(struct platform_device *pdev) | 472 | static int vt8500lcd_remove(struct platform_device *pdev) |
| 473 | { | 473 | { |
| 474 | struct vt8500lcd_info *fbi = platform_get_drvdata(pdev); | 474 | struct vt8500lcd_info *fbi = platform_get_drvdata(pdev); |
| 475 | struct resource *res; | 475 | struct resource *res; |
| @@ -505,7 +505,7 @@ static const struct of_device_id via_dt_ids[] = { | |||
| 505 | 505 | ||
| 506 | static struct platform_driver vt8500lcd_driver = { | 506 | static struct platform_driver vt8500lcd_driver = { |
| 507 | .probe = vt8500lcd_probe, | 507 | .probe = vt8500lcd_probe, |
| 508 | .remove = __devexit_p(vt8500lcd_remove), | 508 | .remove = vt8500lcd_remove, |
| 509 | .driver = { | 509 | .driver = { |
| 510 | .owner = THIS_MODULE, | 510 | .owner = THIS_MODULE, |
| 511 | .name = "vt8500-lcd", | 511 | .name = "vt8500-lcd", |
diff --git a/drivers/video/vt8623fb.c b/drivers/video/vt8623fb.c index 4e74d262cf3e..e9557fa014ee 100644 --- a/drivers/video/vt8623fb.c +++ b/drivers/video/vt8623fb.c | |||
| @@ -660,7 +660,7 @@ static struct fb_ops vt8623fb_ops = { | |||
| 660 | 660 | ||
| 661 | /* PCI probe */ | 661 | /* PCI probe */ |
| 662 | 662 | ||
| 663 | static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | 663 | static int vt8623_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) |
| 664 | { | 664 | { |
| 665 | struct pci_bus_region bus_reg; | 665 | struct pci_bus_region bus_reg; |
| 666 | struct resource vga_res; | 666 | struct resource vga_res; |
| @@ -807,7 +807,7 @@ err_enable_device: | |||
| 807 | 807 | ||
| 808 | /* PCI remove */ | 808 | /* PCI remove */ |
| 809 | 809 | ||
| 810 | static void __devexit vt8623_pci_remove(struct pci_dev *dev) | 810 | static void vt8623_pci_remove(struct pci_dev *dev) |
| 811 | { | 811 | { |
| 812 | struct fb_info *info = pci_get_drvdata(dev); | 812 | struct fb_info *info = pci_get_drvdata(dev); |
| 813 | 813 | ||
| @@ -906,7 +906,7 @@ fail: | |||
| 906 | 906 | ||
| 907 | /* List of boards that we are trying to support */ | 907 | /* List of boards that we are trying to support */ |
| 908 | 908 | ||
| 909 | static struct pci_device_id vt8623_devices[] __devinitdata = { | 909 | static struct pci_device_id vt8623_devices[] = { |
| 910 | {PCI_DEVICE(PCI_VENDOR_ID_VIA, 0x3122)}, | 910 | {PCI_DEVICE(PCI_VENDOR_ID_VIA, 0x3122)}, |
| 911 | {0, 0, 0, 0, 0, 0, 0} | 911 | {0, 0, 0, 0, 0, 0, 0} |
| 912 | }; | 912 | }; |
| @@ -917,7 +917,7 @@ static struct pci_driver vt8623fb_pci_driver = { | |||
| 917 | .name = "vt8623fb", | 917 | .name = "vt8623fb", |
| 918 | .id_table = vt8623_devices, | 918 | .id_table = vt8623_devices, |
| 919 | .probe = vt8623_pci_probe, | 919 | .probe = vt8623_pci_probe, |
| 920 | .remove = __devexit_p(vt8623_pci_remove), | 920 | .remove = vt8623_pci_remove, |
| 921 | .suspend = vt8623_pci_suspend, | 921 | .suspend = vt8623_pci_suspend, |
| 922 | .resume = vt8623_pci_resume, | 922 | .resume = vt8623_pci_resume, |
| 923 | }; | 923 | }; |
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c index 2f6b2b835f88..7a299e951f75 100644 --- a/drivers/video/w100fb.c +++ b/drivers/video/w100fb.c | |||
| @@ -54,7 +54,7 @@ static void w100_update_enable(void); | |||
| 54 | static void w100_update_disable(void); | 54 | static void w100_update_disable(void); |
| 55 | static void calc_hsync(struct w100fb_par *par); | 55 | static void calc_hsync(struct w100fb_par *par); |
| 56 | static void w100_init_graphic_engine(struct w100fb_par *par); | 56 | static void w100_init_graphic_engine(struct w100fb_par *par); |
| 57 | struct w100_pll_info *w100_get_xtal_table(unsigned int freq) __devinit; | 57 | struct w100_pll_info *w100_get_xtal_table(unsigned int freq); |
| 58 | 58 | ||
| 59 | /* Pseudo palette size */ | 59 | /* Pseudo palette size */ |
| 60 | #define MAX_PALETTES 16 | 60 | #define MAX_PALETTES 16 |
| @@ -630,7 +630,7 @@ static int w100fb_resume(struct platform_device *dev) | |||
| 630 | #endif | 630 | #endif |
| 631 | 631 | ||
| 632 | 632 | ||
| 633 | int __devinit w100fb_probe(struct platform_device *pdev) | 633 | int w100fb_probe(struct platform_device *pdev) |
| 634 | { | 634 | { |
| 635 | int err = -EIO; | 635 | int err = -EIO; |
| 636 | struct w100fb_mach_info *inf; | 636 | struct w100fb_mach_info *inf; |
| @@ -783,7 +783,7 @@ out: | |||
| 783 | } | 783 | } |
| 784 | 784 | ||
| 785 | 785 | ||
| 786 | static int __devexit w100fb_remove(struct platform_device *pdev) | 786 | static int w100fb_remove(struct platform_device *pdev) |
| 787 | { | 787 | { |
| 788 | struct fb_info *info = platform_get_drvdata(pdev); | 788 | struct fb_info *info = platform_get_drvdata(pdev); |
| 789 | struct w100fb_par *par=info->par; | 789 | struct w100fb_par *par=info->par; |
| @@ -1021,7 +1021,7 @@ static struct pll_entries { | |||
| 1021 | { 0 }, | 1021 | { 0 }, |
| 1022 | }; | 1022 | }; |
| 1023 | 1023 | ||
| 1024 | struct w100_pll_info __devinit *w100_get_xtal_table(unsigned int freq) | 1024 | struct w100_pll_info *w100_get_xtal_table(unsigned int freq) |
| 1025 | { | 1025 | { |
| 1026 | struct pll_entries *pll_entry = w100_pll_tables; | 1026 | struct pll_entries *pll_entry = w100_pll_tables; |
| 1027 | 1027 | ||
| @@ -1624,7 +1624,7 @@ static void w100_vsync(void) | |||
| 1624 | 1624 | ||
| 1625 | static struct platform_driver w100fb_driver = { | 1625 | static struct platform_driver w100fb_driver = { |
| 1626 | .probe = w100fb_probe, | 1626 | .probe = w100fb_probe, |
| 1627 | .remove = __devexit_p(w100fb_remove), | 1627 | .remove = w100fb_remove, |
| 1628 | .suspend = w100fb_suspend, | 1628 | .suspend = w100fb_suspend, |
| 1629 | .resume = w100fb_resume, | 1629 | .resume = w100fb_resume, |
| 1630 | .driver = { | 1630 | .driver = { |
diff --git a/drivers/video/wm8505fb.c b/drivers/video/wm8505fb.c index 77539c1b56a0..4dd0580f96fd 100644 --- a/drivers/video/wm8505fb.c +++ b/drivers/video/wm8505fb.c | |||
| @@ -260,7 +260,7 @@ static struct fb_ops wm8505fb_ops = { | |||
| 260 | .fb_blank = wm8505fb_blank, | 260 | .fb_blank = wm8505fb_blank, |
| 261 | }; | 261 | }; |
| 262 | 262 | ||
| 263 | static int __devinit wm8505fb_probe(struct platform_device *pdev) | 263 | static int wm8505fb_probe(struct platform_device *pdev) |
| 264 | { | 264 | { |
| 265 | struct wm8505fb_info *fbi; | 265 | struct wm8505fb_info *fbi; |
| 266 | struct resource *res; | 266 | struct resource *res; |
| @@ -431,7 +431,7 @@ failed: | |||
| 431 | return ret; | 431 | return ret; |
| 432 | } | 432 | } |
| 433 | 433 | ||
| 434 | static int __devexit wm8505fb_remove(struct platform_device *pdev) | 434 | static int wm8505fb_remove(struct platform_device *pdev) |
| 435 | { | 435 | { |
| 436 | struct wm8505fb_info *fbi = platform_get_drvdata(pdev); | 436 | struct wm8505fb_info *fbi = platform_get_drvdata(pdev); |
| 437 | struct resource *res; | 437 | struct resource *res; |
| @@ -462,7 +462,7 @@ static const struct of_device_id wmt_dt_ids[] = { | |||
| 462 | 462 | ||
| 463 | static struct platform_driver wm8505fb_driver = { | 463 | static struct platform_driver wm8505fb_driver = { |
| 464 | .probe = wm8505fb_probe, | 464 | .probe = wm8505fb_probe, |
| 465 | .remove = __devexit_p(wm8505fb_remove), | 465 | .remove = wm8505fb_remove, |
| 466 | .driver = { | 466 | .driver = { |
| 467 | .owner = THIS_MODULE, | 467 | .owner = THIS_MODULE, |
| 468 | .name = DRIVER_NAME, | 468 | .name = DRIVER_NAME, |
diff --git a/drivers/video/wmt_ge_rops.c b/drivers/video/wmt_ge_rops.c index ba025b4c7d09..4aaeb18223bc 100644 --- a/drivers/video/wmt_ge_rops.c +++ b/drivers/video/wmt_ge_rops.c | |||
| @@ -124,7 +124,7 @@ int wmt_ge_sync(struct fb_info *p) | |||
| 124 | } | 124 | } |
| 125 | EXPORT_SYMBOL_GPL(wmt_ge_sync); | 125 | EXPORT_SYMBOL_GPL(wmt_ge_sync); |
| 126 | 126 | ||
| 127 | static int __devinit wmt_ge_rops_probe(struct platform_device *pdev) | 127 | static int wmt_ge_rops_probe(struct platform_device *pdev) |
| 128 | { | 128 | { |
| 129 | struct resource *res; | 129 | struct resource *res; |
| 130 | 130 | ||
| @@ -152,7 +152,7 @@ static int __devinit wmt_ge_rops_probe(struct platform_device *pdev) | |||
| 152 | return 0; | 152 | return 0; |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | static int __devexit wmt_ge_rops_remove(struct platform_device *pdev) | 155 | static int wmt_ge_rops_remove(struct platform_device *pdev) |
| 156 | { | 156 | { |
| 157 | iounmap(regbase); | 157 | iounmap(regbase); |
| 158 | return 0; | 158 | return 0; |
| @@ -165,7 +165,7 @@ static const struct of_device_id wmt_dt_ids[] = { | |||
| 165 | 165 | ||
| 166 | static struct platform_driver wmt_ge_rops_driver = { | 166 | static struct platform_driver wmt_ge_rops_driver = { |
| 167 | .probe = wmt_ge_rops_probe, | 167 | .probe = wmt_ge_rops_probe, |
| 168 | .remove = __devexit_p(wmt_ge_rops_remove), | 168 | .remove = wmt_ge_rops_remove, |
| 169 | .driver = { | 169 | .driver = { |
| 170 | .owner = THIS_MODULE, | 170 | .owner = THIS_MODULE, |
| 171 | .name = "wmt_ge_rops", | 171 | .name = "wmt_ge_rops", |
diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c index 917bb5681684..cd005c227a23 100644 --- a/drivers/video/xen-fbfront.c +++ b/drivers/video/xen-fbfront.c | |||
| @@ -358,8 +358,8 @@ static irqreturn_t xenfb_event_handler(int rq, void *dev_id) | |||
| 358 | return IRQ_HANDLED; | 358 | return IRQ_HANDLED; |
| 359 | } | 359 | } |
| 360 | 360 | ||
| 361 | static int __devinit xenfb_probe(struct xenbus_device *dev, | 361 | static int xenfb_probe(struct xenbus_device *dev, |
| 362 | const struct xenbus_device_id *id) | 362 | const struct xenbus_device_id *id) |
| 363 | { | 363 | { |
| 364 | struct xenfb_info *info; | 364 | struct xenfb_info *info; |
| 365 | struct fb_info *fb_info; | 365 | struct fb_info *fb_info; |
| @@ -487,8 +487,7 @@ error: | |||
| 487 | return ret; | 487 | return ret; |
| 488 | } | 488 | } |
| 489 | 489 | ||
| 490 | static __devinit void | 490 | static void xenfb_make_preferred_console(void) |
| 491 | xenfb_make_preferred_console(void) | ||
| 492 | { | 491 | { |
| 493 | struct console *c; | 492 | struct console *c; |
| 494 | 493 | ||
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c index 18084525402a..af0b4fdf9aa9 100644 --- a/drivers/video/xilinxfb.c +++ b/drivers/video/xilinxfb.c | |||
| @@ -403,7 +403,7 @@ static int xilinxfb_release(struct device *dev) | |||
| 403 | * OF bus binding | 403 | * OF bus binding |
| 404 | */ | 404 | */ |
| 405 | 405 | ||
| 406 | static int __devinit xilinxfb_of_probe(struct platform_device *op) | 406 | static int xilinxfb_of_probe(struct platform_device *op) |
| 407 | { | 407 | { |
| 408 | const u32 *prop; | 408 | const u32 *prop; |
| 409 | u32 *p; | 409 | u32 *p; |
| @@ -485,13 +485,13 @@ static int __devinit xilinxfb_of_probe(struct platform_device *op) | |||
| 485 | return -ENODEV; | 485 | return -ENODEV; |
| 486 | } | 486 | } |
| 487 | 487 | ||
| 488 | static int __devexit xilinxfb_of_remove(struct platform_device *op) | 488 | static int xilinxfb_of_remove(struct platform_device *op) |
| 489 | { | 489 | { |
| 490 | return xilinxfb_release(&op->dev); | 490 | return xilinxfb_release(&op->dev); |
| 491 | } | 491 | } |
| 492 | 492 | ||
| 493 | /* Match table for of_platform binding */ | 493 | /* Match table for of_platform binding */ |
| 494 | static struct of_device_id xilinxfb_of_match[] __devinitdata = { | 494 | static struct of_device_id xilinxfb_of_match[] = { |
| 495 | { .compatible = "xlnx,xps-tft-1.00.a", }, | 495 | { .compatible = "xlnx,xps-tft-1.00.a", }, |
| 496 | { .compatible = "xlnx,xps-tft-2.00.a", }, | 496 | { .compatible = "xlnx,xps-tft-2.00.a", }, |
| 497 | { .compatible = "xlnx,xps-tft-2.01.a", }, | 497 | { .compatible = "xlnx,xps-tft-2.01.a", }, |
| @@ -503,7 +503,7 @@ MODULE_DEVICE_TABLE(of, xilinxfb_of_match); | |||
| 503 | 503 | ||
| 504 | static struct platform_driver xilinxfb_of_driver = { | 504 | static struct platform_driver xilinxfb_of_driver = { |
| 505 | .probe = xilinxfb_of_probe, | 505 | .probe = xilinxfb_of_probe, |
| 506 | .remove = __devexit_p(xilinxfb_of_remove), | 506 | .remove = xilinxfb_of_remove, |
| 507 | .driver = { | 507 | .driver = { |
| 508 | .name = DRIVER_NAME, | 508 | .name = DRIVER_NAME, |
| 509 | .owner = THIS_MODULE, | 509 | .owner = THIS_MODULE, |
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index d19fe3e323b4..797e1c79a104 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c | |||
| @@ -500,7 +500,7 @@ static void remove_common(struct virtio_balloon *vb) | |||
| 500 | vb->vdev->config->del_vqs(vb->vdev); | 500 | vb->vdev->config->del_vqs(vb->vdev); |
| 501 | } | 501 | } |
| 502 | 502 | ||
| 503 | static void __devexit virtballoon_remove(struct virtio_device *vdev) | 503 | static void virtballoon_remove(struct virtio_device *vdev) |
| 504 | { | 504 | { |
| 505 | struct virtio_balloon *vb = vdev->priv; | 505 | struct virtio_balloon *vb = vdev->priv; |
| 506 | 506 | ||
| @@ -552,7 +552,7 @@ static struct virtio_driver virtio_balloon_driver = { | |||
| 552 | .driver.owner = THIS_MODULE, | 552 | .driver.owner = THIS_MODULE, |
| 553 | .id_table = id_table, | 553 | .id_table = id_table, |
| 554 | .probe = virtballoon_probe, | 554 | .probe = virtballoon_probe, |
| 555 | .remove = __devexit_p(virtballoon_remove), | 555 | .remove = virtballoon_remove, |
| 556 | .config_changed = virtballoon_changed, | 556 | .config_changed = virtballoon_changed, |
| 557 | #ifdef CONFIG_PM | 557 | #ifdef CONFIG_PM |
| 558 | .freeze = virtballoon_freeze, | 558 | .freeze = virtballoon_freeze, |
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 634f80bcdbd7..31f966f4d27f 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c | |||
| @@ -440,7 +440,7 @@ static struct virtio_config_ops virtio_mmio_config_ops = { | |||
| 440 | 440 | ||
| 441 | /* Platform device */ | 441 | /* Platform device */ |
| 442 | 442 | ||
| 443 | static int __devinit virtio_mmio_probe(struct platform_device *pdev) | 443 | static int virtio_mmio_probe(struct platform_device *pdev) |
| 444 | { | 444 | { |
| 445 | struct virtio_mmio_device *vm_dev; | 445 | struct virtio_mmio_device *vm_dev; |
| 446 | struct resource *mem; | 446 | struct resource *mem; |
| @@ -493,7 +493,7 @@ static int __devinit virtio_mmio_probe(struct platform_device *pdev) | |||
| 493 | return register_virtio_device(&vm_dev->vdev); | 493 | return register_virtio_device(&vm_dev->vdev); |
| 494 | } | 494 | } |
| 495 | 495 | ||
| 496 | static int __devexit virtio_mmio_remove(struct platform_device *pdev) | 496 | static int virtio_mmio_remove(struct platform_device *pdev) |
| 497 | { | 497 | { |
| 498 | struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev); | 498 | struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev); |
| 499 | 499 | ||
| @@ -638,7 +638,7 @@ MODULE_DEVICE_TABLE(of, virtio_mmio_match); | |||
| 638 | 638 | ||
| 639 | static struct platform_driver virtio_mmio_driver = { | 639 | static struct platform_driver virtio_mmio_driver = { |
| 640 | .probe = virtio_mmio_probe, | 640 | .probe = virtio_mmio_probe, |
| 641 | .remove = __devexit_p(virtio_mmio_remove), | 641 | .remove = virtio_mmio_remove, |
| 642 | .driver = { | 642 | .driver = { |
| 643 | .name = "virtio-mmio", | 643 | .name = "virtio-mmio", |
| 644 | .owner = THIS_MODULE, | 644 | .owner = THIS_MODULE, |
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index e3ecc94591ad..0c142892c105 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c | |||
| @@ -676,8 +676,8 @@ static void virtio_pci_release_dev(struct device *_d) | |||
| 676 | } | 676 | } |
| 677 | 677 | ||
| 678 | /* the PCI probing function */ | 678 | /* the PCI probing function */ |
| 679 | static int __devinit virtio_pci_probe(struct pci_dev *pci_dev, | 679 | static int virtio_pci_probe(struct pci_dev *pci_dev, |
| 680 | const struct pci_device_id *id) | 680 | const struct pci_device_id *id) |
| 681 | { | 681 | { |
| 682 | struct virtio_pci_device *vp_dev; | 682 | struct virtio_pci_device *vp_dev; |
| 683 | int err; | 683 | int err; |
| @@ -751,7 +751,7 @@ out: | |||
| 751 | return err; | 751 | return err; |
| 752 | } | 752 | } |
| 753 | 753 | ||
| 754 | static void __devexit virtio_pci_remove(struct pci_dev *pci_dev) | 754 | static void virtio_pci_remove(struct pci_dev *pci_dev) |
| 755 | { | 755 | { |
| 756 | struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); | 756 | struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); |
| 757 | 757 | ||
| @@ -822,7 +822,7 @@ static struct pci_driver virtio_pci_driver = { | |||
| 822 | .name = "virtio-pci", | 822 | .name = "virtio-pci", |
| 823 | .id_table = virtio_pci_id_table, | 823 | .id_table = virtio_pci_id_table, |
| 824 | .probe = virtio_pci_probe, | 824 | .probe = virtio_pci_probe, |
| 825 | .remove = __devexit_p(virtio_pci_remove), | 825 | .remove = virtio_pci_remove, |
| 826 | #ifdef CONFIG_PM | 826 | #ifdef CONFIG_PM |
| 827 | .driver.pm = &virtio_pci_pm_ops, | 827 | .driver.pm = &virtio_pci_pm_ops, |
| 828 | #endif | 828 | #endif |
diff --git a/drivers/vlynq/vlynq.c b/drivers/vlynq/vlynq.c index aa250cebecd2..7b07135ab26e 100644 --- a/drivers/vlynq/vlynq.c +++ b/drivers/vlynq/vlynq.c | |||
| @@ -772,7 +772,7 @@ static int vlynq_remove(struct platform_device *pdev) | |||
| 772 | static struct platform_driver vlynq_platform_driver = { | 772 | static struct platform_driver vlynq_platform_driver = { |
| 773 | .driver.name = "vlynq", | 773 | .driver.name = "vlynq", |
| 774 | .probe = vlynq_probe, | 774 | .probe = vlynq_probe, |
| 775 | .remove = __devexit_p(vlynq_remove), | 775 | .remove = vlynq_remove, |
| 776 | }; | 776 | }; |
| 777 | 777 | ||
| 778 | struct bus_type vlynq_bus_type = { | 778 | struct bus_type vlynq_bus_type = { |
| @@ -783,7 +783,7 @@ struct bus_type vlynq_bus_type = { | |||
| 783 | }; | 783 | }; |
| 784 | EXPORT_SYMBOL(vlynq_bus_type); | 784 | EXPORT_SYMBOL(vlynq_bus_type); |
| 785 | 785 | ||
| 786 | static int __devinit vlynq_init(void) | 786 | static int vlynq_init(void) |
| 787 | { | 787 | { |
| 788 | int res = 0; | 788 | int res = 0; |
| 789 | 789 | ||
| @@ -803,7 +803,7 @@ fail_bus: | |||
| 803 | return res; | 803 | return res; |
| 804 | } | 804 | } |
| 805 | 805 | ||
| 806 | static void __devexit vlynq_exit(void) | 806 | static void vlynq_exit(void) |
| 807 | { | 807 | { |
| 808 | platform_driver_unregister(&vlynq_platform_driver); | 808 | platform_driver_unregister(&vlynq_platform_driver); |
| 809 | bus_unregister(&vlynq_bus_type); | 809 | bus_unregister(&vlynq_bus_type); |
diff --git a/drivers/w1/masters/mxc_w1.c b/drivers/w1/masters/mxc_w1.c index d338b56ea2f0..708a25fc9961 100644 --- a/drivers/w1/masters/mxc_w1.c +++ b/drivers/w1/masters/mxc_w1.c | |||
| @@ -191,7 +191,7 @@ static struct platform_driver mxc_w1_driver = { | |||
| 191 | .name = "mxc_w1", | 191 | .name = "mxc_w1", |
| 192 | }, | 192 | }, |
| 193 | .probe = mxc_w1_probe, | 193 | .probe = mxc_w1_probe, |
| 194 | .remove = __devexit_p(mxc_w1_remove), | 194 | .remove = mxc_w1_remove, |
| 195 | }; | 195 | }; |
| 196 | module_platform_driver(mxc_w1_driver); | 196 | module_platform_driver(mxc_w1_driver); |
| 197 | 197 | ||
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index b91f14e83164..7038de53652b 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c | |||
| @@ -1239,7 +1239,7 @@ int gnttab_init(void) | |||
| 1239 | } | 1239 | } |
| 1240 | EXPORT_SYMBOL_GPL(gnttab_init); | 1240 | EXPORT_SYMBOL_GPL(gnttab_init); |
| 1241 | 1241 | ||
| 1242 | static int __devinit __gnttab_init(void) | 1242 | static int __gnttab_init(void) |
| 1243 | { | 1243 | { |
| 1244 | /* Delay grant-table initialization in the PV on HVM case */ | 1244 | /* Delay grant-table initialization in the PV on HVM case */ |
| 1245 | if (xen_hvm_domain()) | 1245 | if (xen_hvm_domain()) |
diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c index 97ca359ae2bd..99db9e1eb8ba 100644 --- a/drivers/xen/platform-pci.c +++ b/drivers/xen/platform-pci.c | |||
| @@ -101,8 +101,8 @@ static int platform_pci_resume(struct pci_dev *pdev) | |||
| 101 | return 0; | 101 | return 0; |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | static int __devinit platform_pci_init(struct pci_dev *pdev, | 104 | static int platform_pci_init(struct pci_dev *pdev, |
| 105 | const struct pci_device_id *ent) | 105 | const struct pci_device_id *ent) |
| 106 | { | 106 | { |
| 107 | int i, ret; | 107 | int i, ret; |
| 108 | long ioaddr; | 108 | long ioaddr; |
| @@ -170,7 +170,7 @@ pci_out: | |||
| 170 | return ret; | 170 | return ret; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | static struct pci_device_id platform_pci_tbl[] __devinitdata = { | 173 | static struct pci_device_id platform_pci_tbl[] = { |
| 174 | {PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM, | 174 | {PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM, |
| 175 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 175 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
| 176 | {0,} | 176 | {0,} |
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c index cd50d251998e..9204126f1560 100644 --- a/drivers/xen/xen-pciback/pci_stub.c +++ b/drivers/xen/xen-pciback/pci_stub.c | |||
| @@ -272,8 +272,8 @@ void pcistub_put_pci_dev(struct pci_dev *dev) | |||
| 272 | up_write(&pcistub_sem); | 272 | up_write(&pcistub_sem); |
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | static int __devinit pcistub_match_one(struct pci_dev *dev, | 275 | static int pcistub_match_one(struct pci_dev *dev, |
| 276 | struct pcistub_device_id *pdev_id) | 276 | struct pcistub_device_id *pdev_id) |
| 277 | { | 277 | { |
| 278 | /* Match the specified device by domain, bus, slot, func and also if | 278 | /* Match the specified device by domain, bus, slot, func and also if |
| 279 | * any of the device's parent bridges match. | 279 | * any of the device's parent bridges match. |
| @@ -292,7 +292,7 @@ static int __devinit pcistub_match_one(struct pci_dev *dev, | |||
| 292 | return 0; | 292 | return 0; |
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | static int __devinit pcistub_match(struct pci_dev *dev) | 295 | static int pcistub_match(struct pci_dev *dev) |
| 296 | { | 296 | { |
| 297 | struct pcistub_device_id *pdev_id; | 297 | struct pcistub_device_id *pdev_id; |
| 298 | unsigned long flags; | 298 | unsigned long flags; |
| @@ -310,7 +310,7 @@ static int __devinit pcistub_match(struct pci_dev *dev) | |||
| 310 | return found; | 310 | return found; |
| 311 | } | 311 | } |
| 312 | 312 | ||
| 313 | static int __devinit pcistub_init_device(struct pci_dev *dev) | 313 | static int pcistub_init_device(struct pci_dev *dev) |
| 314 | { | 314 | { |
| 315 | struct xen_pcibk_dev_data *dev_data; | 315 | struct xen_pcibk_dev_data *dev_data; |
| 316 | int err = 0; | 316 | int err = 0; |
| @@ -428,7 +428,7 @@ static int __init pcistub_init_devices_late(void) | |||
| 428 | return 0; | 428 | return 0; |
| 429 | } | 429 | } |
| 430 | 430 | ||
| 431 | static int __devinit pcistub_seize(struct pci_dev *dev) | 431 | static int pcistub_seize(struct pci_dev *dev) |
| 432 | { | 432 | { |
| 433 | struct pcistub_device *psdev; | 433 | struct pcistub_device *psdev; |
| 434 | unsigned long flags; | 434 | unsigned long flags; |
| @@ -463,8 +463,7 @@ static int __devinit pcistub_seize(struct pci_dev *dev) | |||
| 463 | return err; | 463 | return err; |
| 464 | } | 464 | } |
| 465 | 465 | ||
| 466 | static int __devinit pcistub_probe(struct pci_dev *dev, | 466 | static int pcistub_probe(struct pci_dev *dev, const struct pci_device_id *id) |
| 467 | const struct pci_device_id *id) | ||
| 468 | { | 467 | { |
| 469 | int err = 0; | 468 | int err = 0; |
| 470 | 469 | ||
diff --git a/drivers/zorro/zorro-driver.c b/drivers/zorro/zorro-driver.c index 229624f867d3..ac1db7f1bcab 100644 --- a/drivers/zorro/zorro-driver.c +++ b/drivers/zorro/zorro-driver.c | |||
| @@ -142,7 +142,6 @@ static int zorro_bus_match(struct device *dev, struct device_driver *drv) | |||
| 142 | 142 | ||
| 143 | static int zorro_uevent(struct device *dev, struct kobj_uevent_env *env) | 143 | static int zorro_uevent(struct device *dev, struct kobj_uevent_env *env) |
| 144 | { | 144 | { |
| 145 | #ifdef CONFIG_HOTPLUG | ||
| 146 | struct zorro_dev *z; | 145 | struct zorro_dev *z; |
| 147 | 146 | ||
| 148 | if (!dev) | 147 | if (!dev) |
| @@ -159,9 +158,6 @@ static int zorro_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
| 159 | return -ENOMEM; | 158 | return -ENOMEM; |
| 160 | 159 | ||
| 161 | return 0; | 160 | return 0; |
| 162 | #else /* !CONFIG_HOTPLUG */ | ||
| 163 | return -ENODEV; | ||
| 164 | #endif /* !CONFIG_HOTPLUG */ | ||
| 165 | } | 161 | } |
| 166 | 162 | ||
| 167 | struct bus_type zorro_bus_type = { | 163 | struct bus_type zorro_bus_type = { |
diff --git a/fs/buffer.c b/fs/buffer.c index c017a2dfb909..7a75c3e0fd58 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
| @@ -2935,6 +2935,7 @@ static void guard_bh_eod(int rw, struct bio *bio, struct buffer_head *bh) | |||
| 2935 | void *kaddr = kmap_atomic(bh->b_page); | 2935 | void *kaddr = kmap_atomic(bh->b_page); |
| 2936 | memset(kaddr + bh_offset(bh) + bytes, 0, bh->b_size - bytes); | 2936 | memset(kaddr + bh_offset(bh) + bytes, 0, bh->b_size - bytes); |
| 2937 | kunmap_atomic(kaddr); | 2937 | kunmap_atomic(kaddr); |
| 2938 | flush_dcache_page(bh->b_page); | ||
| 2938 | } | 2939 | } |
| 2939 | } | 2940 | } |
| 2940 | 2941 | ||
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index f653835d067b..de7f9168a118 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
| @@ -228,7 +228,6 @@ cifs_alloc_inode(struct super_block *sb) | |||
| 228 | cifs_set_oplock_level(cifs_inode, 0); | 228 | cifs_set_oplock_level(cifs_inode, 0); |
| 229 | cifs_inode->delete_pending = false; | 229 | cifs_inode->delete_pending = false; |
| 230 | cifs_inode->invalid_mapping = false; | 230 | cifs_inode->invalid_mapping = false; |
| 231 | cifs_inode->leave_pages_clean = false; | ||
| 232 | cifs_inode->vfs_inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */ | 231 | cifs_inode->vfs_inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */ |
| 233 | cifs_inode->server_eof = 0; | 232 | cifs_inode->server_eof = 0; |
| 234 | cifs_inode->uniqueid = 0; | 233 | cifs_inode->uniqueid = 0; |
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index aea1eec64911..e6899cea1c35 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
| @@ -386,6 +386,7 @@ struct smb_version_values { | |||
| 386 | unsigned int cap_unix; | 386 | unsigned int cap_unix; |
| 387 | unsigned int cap_nt_find; | 387 | unsigned int cap_nt_find; |
| 388 | unsigned int cap_large_files; | 388 | unsigned int cap_large_files; |
| 389 | unsigned int oplock_read; | ||
| 389 | }; | 390 | }; |
| 390 | 391 | ||
| 391 | #define HEADER_SIZE(server) (server->vals->header_size) | 392 | #define HEADER_SIZE(server) (server->vals->header_size) |
| @@ -1030,7 +1031,6 @@ struct cifsInodeInfo { | |||
| 1030 | bool clientCanCacheAll; /* read and writebehind oplock */ | 1031 | bool clientCanCacheAll; /* read and writebehind oplock */ |
| 1031 | bool delete_pending; /* DELETE_ON_CLOSE is set */ | 1032 | bool delete_pending; /* DELETE_ON_CLOSE is set */ |
| 1032 | bool invalid_mapping; /* pagecache is invalid */ | 1033 | bool invalid_mapping; /* pagecache is invalid */ |
| 1033 | bool leave_pages_clean; /* protected by i_mutex, not set pages dirty */ | ||
| 1034 | unsigned long time; /* jiffies of last update of inode */ | 1034 | unsigned long time; /* jiffies of last update of inode */ |
| 1035 | u64 server_eof; /* current file size on server -- protected by i_lock */ | 1035 | u64 server_eof; /* current file size on server -- protected by i_lock */ |
| 1036 | u64 uniqueid; /* server inode number */ | 1036 | u64 uniqueid; /* server inode number */ |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 0a6677ba212b..8ea6ca50a665 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
| @@ -238,6 +238,23 @@ out: | |||
| 238 | return rc; | 238 | return rc; |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | static bool | ||
| 242 | cifs_has_mand_locks(struct cifsInodeInfo *cinode) | ||
| 243 | { | ||
| 244 | struct cifs_fid_locks *cur; | ||
| 245 | bool has_locks = false; | ||
| 246 | |||
| 247 | down_read(&cinode->lock_sem); | ||
| 248 | list_for_each_entry(cur, &cinode->llist, llist) { | ||
| 249 | if (!list_empty(&cur->locks)) { | ||
| 250 | has_locks = true; | ||
| 251 | break; | ||
| 252 | } | ||
| 253 | } | ||
| 254 | up_read(&cinode->lock_sem); | ||
| 255 | return has_locks; | ||
| 256 | } | ||
| 257 | |||
| 241 | struct cifsFileInfo * | 258 | struct cifsFileInfo * |
| 242 | cifs_new_fileinfo(struct cifs_fid *fid, struct file *file, | 259 | cifs_new_fileinfo(struct cifs_fid *fid, struct file *file, |
| 243 | struct tcon_link *tlink, __u32 oplock) | 260 | struct tcon_link *tlink, __u32 oplock) |
| @@ -248,6 +265,7 @@ cifs_new_fileinfo(struct cifs_fid *fid, struct file *file, | |||
| 248 | struct cifsFileInfo *cfile; | 265 | struct cifsFileInfo *cfile; |
| 249 | struct cifs_fid_locks *fdlocks; | 266 | struct cifs_fid_locks *fdlocks; |
| 250 | struct cifs_tcon *tcon = tlink_tcon(tlink); | 267 | struct cifs_tcon *tcon = tlink_tcon(tlink); |
| 268 | struct TCP_Server_Info *server = tcon->ses->server; | ||
| 251 | 269 | ||
| 252 | cfile = kzalloc(sizeof(struct cifsFileInfo), GFP_KERNEL); | 270 | cfile = kzalloc(sizeof(struct cifsFileInfo), GFP_KERNEL); |
| 253 | if (cfile == NULL) | 271 | if (cfile == NULL) |
| @@ -276,12 +294,22 @@ cifs_new_fileinfo(struct cifs_fid *fid, struct file *file, | |||
| 276 | INIT_WORK(&cfile->oplock_break, cifs_oplock_break); | 294 | INIT_WORK(&cfile->oplock_break, cifs_oplock_break); |
| 277 | mutex_init(&cfile->fh_mutex); | 295 | mutex_init(&cfile->fh_mutex); |
| 278 | 296 | ||
| 297 | /* | ||
| 298 | * If the server returned a read oplock and we have mandatory brlocks, | ||
| 299 | * set oplock level to None. | ||
| 300 | */ | ||
| 301 | if (oplock == server->vals->oplock_read && | ||
| 302 | cifs_has_mand_locks(cinode)) { | ||
| 303 | cFYI(1, "Reset oplock val from read to None due to mand locks"); | ||
| 304 | oplock = 0; | ||
| 305 | } | ||
| 306 | |||
| 279 | spin_lock(&cifs_file_list_lock); | 307 | spin_lock(&cifs_file_list_lock); |
| 280 | if (fid->pending_open->oplock != CIFS_OPLOCK_NO_CHANGE) | 308 | if (fid->pending_open->oplock != CIFS_OPLOCK_NO_CHANGE && oplock) |
| 281 | oplock = fid->pending_open->oplock; | 309 | oplock = fid->pending_open->oplock; |
| 282 | list_del(&fid->pending_open->olist); | 310 | list_del(&fid->pending_open->olist); |
| 283 | 311 | ||
| 284 | tlink_tcon(tlink)->ses->server->ops->set_fid(cfile, fid, oplock); | 312 | server->ops->set_fid(cfile, fid, oplock); |
| 285 | 313 | ||
| 286 | list_add(&cfile->tlist, &tcon->openFileList); | 314 | list_add(&cfile->tlist, &tcon->openFileList); |
| 287 | /* if readable file instance put first in list*/ | 315 | /* if readable file instance put first in list*/ |
| @@ -1422,6 +1450,7 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u32 type, | |||
| 1422 | struct cifsFileInfo *cfile = (struct cifsFileInfo *)file->private_data; | 1450 | struct cifsFileInfo *cfile = (struct cifsFileInfo *)file->private_data; |
| 1423 | struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); | 1451 | struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); |
| 1424 | struct TCP_Server_Info *server = tcon->ses->server; | 1452 | struct TCP_Server_Info *server = tcon->ses->server; |
| 1453 | struct inode *inode = cfile->dentry->d_inode; | ||
| 1425 | 1454 | ||
| 1426 | if (posix_lck) { | 1455 | if (posix_lck) { |
| 1427 | int posix_lock_type; | 1456 | int posix_lock_type; |
| @@ -1459,6 +1488,21 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u32 type, | |||
| 1459 | if (!rc) | 1488 | if (!rc) |
| 1460 | goto out; | 1489 | goto out; |
| 1461 | 1490 | ||
| 1491 | /* | ||
| 1492 | * Windows 7 server can delay breaking lease from read to None | ||
| 1493 | * if we set a byte-range lock on a file - break it explicitly | ||
| 1494 | * before sending the lock to the server to be sure the next | ||
| 1495 | * read won't conflict with non-overlapted locks due to | ||
| 1496 | * pagereading. | ||
| 1497 | */ | ||
| 1498 | if (!CIFS_I(inode)->clientCanCacheAll && | ||
| 1499 | CIFS_I(inode)->clientCanCacheRead) { | ||
| 1500 | cifs_invalidate_mapping(inode); | ||
| 1501 | cFYI(1, "Set no oplock for inode=%p due to mand locks", | ||
| 1502 | inode); | ||
| 1503 | CIFS_I(inode)->clientCanCacheRead = false; | ||
| 1504 | } | ||
| 1505 | |||
| 1462 | rc = server->ops->mand_lock(xid, cfile, flock->fl_start, length, | 1506 | rc = server->ops->mand_lock(xid, cfile, flock->fl_start, length, |
| 1463 | type, 1, 0, wait_flag); | 1507 | type, 1, 0, wait_flag); |
| 1464 | if (rc) { | 1508 | if (rc) { |
| @@ -2103,15 +2147,7 @@ static int cifs_write_end(struct file *file, struct address_space *mapping, | |||
| 2103 | } else { | 2147 | } else { |
| 2104 | rc = copied; | 2148 | rc = copied; |
| 2105 | pos += copied; | 2149 | pos += copied; |
| 2106 | /* | 2150 | set_page_dirty(page); |
| 2107 | * When we use strict cache mode and cifs_strict_writev was run | ||
| 2108 | * with level II oplock (indicated by leave_pages_clean field of | ||
| 2109 | * CIFS_I(inode)), we can leave pages clean - cifs_strict_writev | ||
| 2110 | * sent the data to the server itself. | ||
| 2111 | */ | ||
| 2112 | if (!CIFS_I(inode)->leave_pages_clean || | ||
| 2113 | !(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_STRICT_IO)) | ||
| 2114 | set_page_dirty(page); | ||
| 2115 | } | 2151 | } |
| 2116 | 2152 | ||
| 2117 | if (rc > 0) { | 2153 | if (rc > 0) { |
| @@ -2462,8 +2498,8 @@ ssize_t cifs_user_writev(struct kiocb *iocb, const struct iovec *iov, | |||
| 2462 | } | 2498 | } |
| 2463 | 2499 | ||
| 2464 | static ssize_t | 2500 | static ssize_t |
| 2465 | cifs_pagecache_writev(struct kiocb *iocb, const struct iovec *iov, | 2501 | cifs_writev(struct kiocb *iocb, const struct iovec *iov, |
| 2466 | unsigned long nr_segs, loff_t pos, bool cache_ex) | 2502 | unsigned long nr_segs, loff_t pos) |
| 2467 | { | 2503 | { |
| 2468 | struct file *file = iocb->ki_filp; | 2504 | struct file *file = iocb->ki_filp; |
| 2469 | struct cifsFileInfo *cfile = (struct cifsFileInfo *)file->private_data; | 2505 | struct cifsFileInfo *cfile = (struct cifsFileInfo *)file->private_data; |
| @@ -2485,12 +2521,8 @@ cifs_pagecache_writev(struct kiocb *iocb, const struct iovec *iov, | |||
| 2485 | server->vals->exclusive_lock_type, NULL, | 2521 | server->vals->exclusive_lock_type, NULL, |
| 2486 | CIFS_WRITE_OP)) { | 2522 | CIFS_WRITE_OP)) { |
| 2487 | mutex_lock(&inode->i_mutex); | 2523 | mutex_lock(&inode->i_mutex); |
| 2488 | if (!cache_ex) | ||
| 2489 | cinode->leave_pages_clean = true; | ||
| 2490 | rc = __generic_file_aio_write(iocb, iov, nr_segs, | 2524 | rc = __generic_file_aio_write(iocb, iov, nr_segs, |
| 2491 | &iocb->ki_pos); | 2525 | &iocb->ki_pos); |
| 2492 | if (!cache_ex) | ||
| 2493 | cinode->leave_pages_clean = false; | ||
| 2494 | mutex_unlock(&inode->i_mutex); | 2526 | mutex_unlock(&inode->i_mutex); |
| 2495 | } | 2527 | } |
| 2496 | 2528 | ||
| @@ -2517,60 +2549,32 @@ cifs_strict_writev(struct kiocb *iocb, const struct iovec *iov, | |||
| 2517 | struct cifsFileInfo *cfile = (struct cifsFileInfo *) | 2549 | struct cifsFileInfo *cfile = (struct cifsFileInfo *) |
| 2518 | iocb->ki_filp->private_data; | 2550 | iocb->ki_filp->private_data; |
| 2519 | struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); | 2551 | struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); |
| 2520 | ssize_t written, written2; | 2552 | ssize_t written; |
| 2521 | /* | ||
| 2522 | * We need to store clientCanCacheAll here to prevent race | ||
| 2523 | * conditions - this value can be changed during an execution | ||
| 2524 | * of generic_file_aio_write. For CIFS it can be changed from | ||
| 2525 | * true to false only, but for SMB2 it can be changed both from | ||
| 2526 | * true to false and vice versa. So, we can end up with a data | ||
| 2527 | * stored in the cache, not marked dirty and not sent to the | ||
| 2528 | * server if this value changes its state from false to true | ||
| 2529 | * after cifs_write_end. | ||
| 2530 | */ | ||
| 2531 | bool cache_ex = cinode->clientCanCacheAll; | ||
| 2532 | bool cache_read = cinode->clientCanCacheRead; | ||
| 2533 | int rc; | ||
| 2534 | loff_t saved_pos; | ||
| 2535 | 2553 | ||
| 2536 | if (cache_ex) { | 2554 | if (cinode->clientCanCacheAll) { |
| 2537 | if (cap_unix(tcon->ses) && | 2555 | if (cap_unix(tcon->ses) && |
| 2538 | ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) == 0) && | 2556 | (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) |
| 2539 | (CIFS_UNIX_FCNTL_CAP & le64_to_cpu( | 2557 | && ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) == 0)) |
| 2540 | tcon->fsUnixInfo.Capability))) | ||
| 2541 | return generic_file_aio_write(iocb, iov, nr_segs, pos); | 2558 | return generic_file_aio_write(iocb, iov, nr_segs, pos); |
| 2542 | return cifs_pagecache_writev(iocb, iov, nr_segs, pos, cache_ex); | 2559 | return cifs_writev(iocb, iov, nr_segs, pos); |
| 2543 | } | 2560 | } |
| 2544 | |||
| 2545 | /* | 2561 | /* |
| 2546 | * For files without exclusive oplock in strict cache mode we need to | 2562 | * For non-oplocked files in strict cache mode we need to write the data |
| 2547 | * write the data to the server exactly from the pos to pos+len-1 rather | 2563 | * to the server exactly from the pos to pos+len-1 rather than flush all |
| 2548 | * than flush all affected pages because it may cause a error with | 2564 | * affected pages because it may cause a error with mandatory locks on |
| 2549 | * mandatory locks on these pages but not on the region from pos to | 2565 | * these pages but not on the region from pos to ppos+len-1. |
| 2550 | * ppos+len-1. | ||
| 2551 | */ | 2566 | */ |
| 2552 | written = cifs_user_writev(iocb, iov, nr_segs, pos); | 2567 | written = cifs_user_writev(iocb, iov, nr_segs, pos); |
| 2553 | if (!cache_read || written <= 0) | 2568 | if (written > 0 && cinode->clientCanCacheRead) { |
| 2554 | return written; | 2569 | /* |
| 2555 | 2570 | * Windows 7 server can delay breaking level2 oplock if a write | |
| 2556 | saved_pos = iocb->ki_pos; | 2571 | * request comes - break it on the client to prevent reading |
| 2557 | iocb->ki_pos = pos; | 2572 | * an old data. |
| 2558 | /* we have a read oplock - need to store a data in the page cache */ | 2573 | */ |
| 2559 | if (cap_unix(tcon->ses) && | 2574 | cifs_invalidate_mapping(inode); |
| 2560 | ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) == 0) && | 2575 | cFYI(1, "Set no oplock for inode=%p after a write operation", |
| 2561 | (CIFS_UNIX_FCNTL_CAP & le64_to_cpu( | 2576 | inode); |
| 2562 | tcon->fsUnixInfo.Capability))) | 2577 | cinode->clientCanCacheRead = false; |
| 2563 | written2 = generic_file_aio_write(iocb, iov, nr_segs, pos); | ||
| 2564 | else | ||
| 2565 | written2 = cifs_pagecache_writev(iocb, iov, nr_segs, pos, | ||
| 2566 | cache_ex); | ||
| 2567 | /* errors occured during writing - invalidate the page cache */ | ||
| 2568 | if (written2 < 0) { | ||
| 2569 | rc = cifs_invalidate_mapping(inode); | ||
| 2570 | if (rc) | ||
| 2571 | written = (ssize_t)rc; | ||
| 2572 | else | ||
| 2573 | iocb->ki_pos = saved_pos; | ||
| 2574 | } | 2578 | } |
| 2575 | return written; | 2579 | return written; |
| 2576 | } | 2580 | } |
| @@ -3577,6 +3581,13 @@ void cifs_oplock_break(struct work_struct *work) | |||
| 3577 | struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); | 3581 | struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); |
| 3578 | int rc = 0; | 3582 | int rc = 0; |
| 3579 | 3583 | ||
| 3584 | if (!cinode->clientCanCacheAll && cinode->clientCanCacheRead && | ||
| 3585 | cifs_has_mand_locks(cinode)) { | ||
| 3586 | cFYI(1, "Reset oplock to None for inode=%p due to mand locks", | ||
| 3587 | inode); | ||
| 3588 | cinode->clientCanCacheRead = false; | ||
| 3589 | } | ||
| 3590 | |||
| 3580 | if (inode && S_ISREG(inode->i_mode)) { | 3591 | if (inode && S_ISREG(inode->i_mode)) { |
| 3581 | if (cinode->clientCanCacheRead) | 3592 | if (cinode->clientCanCacheRead) |
| 3582 | break_lease(inode, O_RDONLY); | 3593 | break_lease(inode, O_RDONLY); |
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c index a5d234c8d5d9..47bc5a87f94e 100644 --- a/fs/cifs/smb1ops.c +++ b/fs/cifs/smb1ops.c | |||
| @@ -53,6 +53,13 @@ send_nt_cancel(struct TCP_Server_Info *server, void *buf, | |||
| 53 | mutex_unlock(&server->srv_mutex); | 53 | mutex_unlock(&server->srv_mutex); |
| 54 | return rc; | 54 | return rc; |
| 55 | } | 55 | } |
| 56 | |||
| 57 | /* | ||
| 58 | * The response to this call was already factored into the sequence | ||
| 59 | * number when the call went out, so we must adjust it back downward | ||
| 60 | * after signing here. | ||
| 61 | */ | ||
| 62 | --server->sequence_number; | ||
| 56 | rc = smb_send(server, in_buf, be32_to_cpu(in_buf->smb_buf_length)); | 63 | rc = smb_send(server, in_buf, be32_to_cpu(in_buf->smb_buf_length)); |
| 57 | mutex_unlock(&server->srv_mutex); | 64 | mutex_unlock(&server->srv_mutex); |
| 58 | 65 | ||
| @@ -952,4 +959,5 @@ struct smb_version_values smb1_values = { | |||
| 952 | .cap_unix = CAP_UNIX, | 959 | .cap_unix = CAP_UNIX, |
| 953 | .cap_nt_find = CAP_NT_SMBS | CAP_NT_FIND, | 960 | .cap_nt_find = CAP_NT_SMBS | CAP_NT_FIND, |
| 954 | .cap_large_files = CAP_LARGE_FILES, | 961 | .cap_large_files = CAP_LARGE_FILES, |
| 962 | .oplock_read = OPLOCK_READ, | ||
| 955 | }; | 963 | }; |
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index d79de7bc4435..c9c7aa7ed966 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c | |||
| @@ -708,6 +708,7 @@ struct smb_version_values smb20_values = { | |||
| 708 | .cap_unix = 0, | 708 | .cap_unix = 0, |
| 709 | .cap_nt_find = SMB2_NT_FIND, | 709 | .cap_nt_find = SMB2_NT_FIND, |
| 710 | .cap_large_files = SMB2_LARGE_FILES, | 710 | .cap_large_files = SMB2_LARGE_FILES, |
| 711 | .oplock_read = SMB2_OPLOCK_LEVEL_II, | ||
| 711 | }; | 712 | }; |
| 712 | 713 | ||
| 713 | struct smb_version_values smb21_values = { | 714 | struct smb_version_values smb21_values = { |
| @@ -725,6 +726,7 @@ struct smb_version_values smb21_values = { | |||
| 725 | .cap_unix = 0, | 726 | .cap_unix = 0, |
| 726 | .cap_nt_find = SMB2_NT_FIND, | 727 | .cap_nt_find = SMB2_NT_FIND, |
| 727 | .cap_large_files = SMB2_LARGE_FILES, | 728 | .cap_large_files = SMB2_LARGE_FILES, |
| 729 | .oplock_read = SMB2_OPLOCK_LEVEL_II, | ||
| 728 | }; | 730 | }; |
| 729 | 731 | ||
| 730 | struct smb_version_values smb30_values = { | 732 | struct smb_version_values smb30_values = { |
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 76d974c952fe..1a528680ec5a 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c | |||
| @@ -144,9 +144,6 @@ smb_send_kvec(struct TCP_Server_Info *server, struct kvec *iov, size_t n_vec, | |||
| 144 | 144 | ||
| 145 | *sent = 0; | 145 | *sent = 0; |
| 146 | 146 | ||
| 147 | if (ssocket == NULL) | ||
| 148 | return -ENOTSOCK; /* BB eventually add reconnect code here */ | ||
| 149 | |||
| 150 | smb_msg.msg_name = (struct sockaddr *) &server->dstaddr; | 147 | smb_msg.msg_name = (struct sockaddr *) &server->dstaddr; |
| 151 | smb_msg.msg_namelen = sizeof(struct sockaddr); | 148 | smb_msg.msg_namelen = sizeof(struct sockaddr); |
| 152 | smb_msg.msg_control = NULL; | 149 | smb_msg.msg_control = NULL; |
| @@ -291,6 +288,9 @@ smb_send_rqst(struct TCP_Server_Info *server, struct smb_rqst *rqst) | |||
| 291 | struct socket *ssocket = server->ssocket; | 288 | struct socket *ssocket = server->ssocket; |
| 292 | int val = 1; | 289 | int val = 1; |
| 293 | 290 | ||
| 291 | if (ssocket == NULL) | ||
| 292 | return -ENOTSOCK; | ||
| 293 | |||
| 294 | cFYI(1, "Sending smb: smb_len=%u", smb_buf_length); | 294 | cFYI(1, "Sending smb: smb_len=%u", smb_buf_length); |
| 295 | dump_smb(iov[0].iov_base, iov[0].iov_len); | 295 | dump_smb(iov[0].iov_base, iov[0].iov_len); |
| 296 | 296 | ||
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 153bb1e42e63..a5f12b7e228d 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c | |||
| @@ -176,7 +176,7 @@ static int debugfs_parse_options(char *data, struct debugfs_mount_opts *opts) | |||
| 176 | opts->uid = uid; | 176 | opts->uid = uid; |
| 177 | break; | 177 | break; |
| 178 | case Opt_gid: | 178 | case Opt_gid: |
| 179 | if (match_octal(&args[0], &option)) | 179 | if (match_int(&args[0], &option)) |
| 180 | return -EINVAL; | 180 | return -EINVAL; |
| 181 | gid = make_kgid(current_user_ns(), option); | 181 | gid = make_kgid(current_user_ns(), option); |
| 182 | if (!gid_valid(gid)) | 182 | if (!gid_valid(gid)) |
| @@ -434,8 +434,9 @@ static int count(struct user_arg_ptr argv, int max) | |||
| 434 | if (IS_ERR(p)) | 434 | if (IS_ERR(p)) |
| 435 | return -EFAULT; | 435 | return -EFAULT; |
| 436 | 436 | ||
| 437 | if (i++ >= max) | 437 | if (i >= max) |
| 438 | return -E2BIG; | 438 | return -E2BIG; |
| 439 | ++i; | ||
| 439 | 440 | ||
| 440 | if (fatal_signal_pending(current)) | 441 | if (fatal_signal_pending(current)) |
| 441 | return -ERESTARTNOHAND; | 442 | return -ERESTARTNOHAND; |
diff --git a/fs/ext4/Kconfig b/fs/ext4/Kconfig index 0a475c881852..987358740cb9 100644 --- a/fs/ext4/Kconfig +++ b/fs/ext4/Kconfig | |||
| @@ -41,6 +41,7 @@ config EXT4_USE_FOR_EXT23 | |||
| 41 | 41 | ||
| 42 | config EXT4_FS_POSIX_ACL | 42 | config EXT4_FS_POSIX_ACL |
| 43 | bool "Ext4 POSIX Access Control Lists" | 43 | bool "Ext4 POSIX Access Control Lists" |
| 44 | depends on EXT4_FS | ||
| 44 | select FS_POSIX_ACL | 45 | select FS_POSIX_ACL |
| 45 | help | 46 | help |
| 46 | POSIX Access Control Lists (ACLs) support permissions for users and | 47 | POSIX Access Control Lists (ACLs) support permissions for users and |
| @@ -53,6 +54,7 @@ config EXT4_FS_POSIX_ACL | |||
| 53 | 54 | ||
| 54 | config EXT4_FS_SECURITY | 55 | config EXT4_FS_SECURITY |
| 55 | bool "Ext4 Security Labels" | 56 | bool "Ext4 Security Labels" |
| 57 | depends on EXT4_FS | ||
| 56 | help | 58 | help |
| 57 | Security labels support alternative access control models | 59 | Security labels support alternative access control models |
| 58 | implemented by security modules like SELinux. This option | 60 | implemented by security modules like SELinux. This option |
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 8990165346ee..f9ed946a448e 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c | |||
| @@ -722,7 +722,7 @@ dx_probe(const struct qstr *d_name, struct inode *dir, | |||
| 722 | ext4_warning(dir->i_sb, "Node failed checksum"); | 722 | ext4_warning(dir->i_sb, "Node failed checksum"); |
| 723 | brelse(bh); | 723 | brelse(bh); |
| 724 | *err = ERR_BAD_DX_DIR; | 724 | *err = ERR_BAD_DX_DIR; |
| 725 | goto fail; | 725 | goto fail2; |
| 726 | } | 726 | } |
| 727 | set_buffer_verified(bh); | 727 | set_buffer_verified(bh); |
| 728 | 728 | ||
| @@ -2368,7 +2368,6 @@ static int ext4_init_new_dir(handle_t *handle, struct inode *dir, | |||
| 2368 | } | 2368 | } |
| 2369 | 2369 | ||
| 2370 | inode->i_size = EXT4_I(inode)->i_disksize = blocksize; | 2370 | inode->i_size = EXT4_I(inode)->i_disksize = blocksize; |
| 2371 | dir_block = ext4_bread(handle, inode, 0, 1, &err); | ||
| 2372 | if (!(dir_block = ext4_bread(handle, inode, 0, 1, &err))) { | 2371 | if (!(dir_block = ext4_bread(handle, inode, 0, 1, &err))) { |
| 2373 | if (!err) { | 2372 | if (!err) { |
| 2374 | err = -EIO; | 2373 | err = -EIO; |
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 655aeabc1dd4..3aa5ce7cab83 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/backing-dev.h> | 16 | #include <linux/backing-dev.h> |
| 17 | #include <linux/blkdev.h> | 17 | #include <linux/blkdev.h> |
| 18 | #include <linux/bio.h> | 18 | #include <linux/bio.h> |
| 19 | #include <linux/prefetch.h> | ||
| 19 | 20 | ||
| 20 | #include "f2fs.h" | 21 | #include "f2fs.h" |
| 21 | #include "node.h" | 22 | #include "node.h" |
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index b4e24f32b54e..951ed52748f6 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
| 12 | #include <linux/f2fs_fs.h> | 12 | #include <linux/f2fs_fs.h> |
| 13 | #include "f2fs.h" | 13 | #include "f2fs.h" |
| 14 | #include "node.h" | ||
| 14 | #include "acl.h" | 15 | #include "acl.h" |
| 15 | 16 | ||
| 16 | static unsigned long dir_blocks(struct inode *inode) | 17 | static unsigned long dir_blocks(struct inode *inode) |
| @@ -74,7 +75,7 @@ static unsigned long dir_block_index(unsigned int level, unsigned int idx) | |||
| 74 | return bidx; | 75 | return bidx; |
| 75 | } | 76 | } |
| 76 | 77 | ||
| 77 | static bool early_match_name(const char *name, int namelen, | 78 | static bool early_match_name(const char *name, size_t namelen, |
| 78 | f2fs_hash_t namehash, struct f2fs_dir_entry *de) | 79 | f2fs_hash_t namehash, struct f2fs_dir_entry *de) |
| 79 | { | 80 | { |
| 80 | if (le16_to_cpu(de->name_len) != namelen) | 81 | if (le16_to_cpu(de->name_len) != namelen) |
| @@ -87,7 +88,7 @@ static bool early_match_name(const char *name, int namelen, | |||
| 87 | } | 88 | } |
| 88 | 89 | ||
| 89 | static struct f2fs_dir_entry *find_in_block(struct page *dentry_page, | 90 | static struct f2fs_dir_entry *find_in_block(struct page *dentry_page, |
| 90 | const char *name, int namelen, int *max_slots, | 91 | const char *name, size_t namelen, int *max_slots, |
| 91 | f2fs_hash_t namehash, struct page **res_page) | 92 | f2fs_hash_t namehash, struct page **res_page) |
| 92 | { | 93 | { |
| 93 | struct f2fs_dir_entry *de; | 94 | struct f2fs_dir_entry *de; |
| @@ -126,7 +127,7 @@ found: | |||
| 126 | } | 127 | } |
| 127 | 128 | ||
| 128 | static struct f2fs_dir_entry *find_in_level(struct inode *dir, | 129 | static struct f2fs_dir_entry *find_in_level(struct inode *dir, |
| 129 | unsigned int level, const char *name, int namelen, | 130 | unsigned int level, const char *name, size_t namelen, |
| 130 | f2fs_hash_t namehash, struct page **res_page) | 131 | f2fs_hash_t namehash, struct page **res_page) |
| 131 | { | 132 | { |
| 132 | int s = GET_DENTRY_SLOTS(namelen); | 133 | int s = GET_DENTRY_SLOTS(namelen); |
| @@ -181,7 +182,7 @@ struct f2fs_dir_entry *f2fs_find_entry(struct inode *dir, | |||
| 181 | struct qstr *child, struct page **res_page) | 182 | struct qstr *child, struct page **res_page) |
| 182 | { | 183 | { |
| 183 | const char *name = child->name; | 184 | const char *name = child->name; |
| 184 | int namelen = child->len; | 185 | size_t namelen = child->len; |
| 185 | unsigned long npages = dir_blocks(dir); | 186 | unsigned long npages = dir_blocks(dir); |
| 186 | struct f2fs_dir_entry *de = NULL; | 187 | struct f2fs_dir_entry *de = NULL; |
| 187 | f2fs_hash_t name_hash; | 188 | f2fs_hash_t name_hash; |
| @@ -308,6 +309,7 @@ static int init_inode_metadata(struct inode *inode, struct dentry *dentry) | |||
| 308 | ipage = get_node_page(F2FS_SB(dir->i_sb), inode->i_ino); | 309 | ipage = get_node_page(F2FS_SB(dir->i_sb), inode->i_ino); |
| 309 | if (IS_ERR(ipage)) | 310 | if (IS_ERR(ipage)) |
| 310 | return PTR_ERR(ipage); | 311 | return PTR_ERR(ipage); |
| 312 | set_cold_node(inode, ipage); | ||
| 311 | init_dent_inode(dentry, ipage); | 313 | init_dent_inode(dentry, ipage); |
| 312 | f2fs_put_page(ipage, 1); | 314 | f2fs_put_page(ipage, 1); |
| 313 | } | 315 | } |
| @@ -381,7 +383,7 @@ int f2fs_add_link(struct dentry *dentry, struct inode *inode) | |||
| 381 | struct inode *dir = dentry->d_parent->d_inode; | 383 | struct inode *dir = dentry->d_parent->d_inode; |
| 382 | struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); | 384 | struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); |
| 383 | const char *name = dentry->d_name.name; | 385 | const char *name = dentry->d_name.name; |
| 384 | int namelen = dentry->d_name.len; | 386 | size_t namelen = dentry->d_name.len; |
| 385 | struct page *dentry_page = NULL; | 387 | struct page *dentry_page = NULL; |
| 386 | struct f2fs_dentry_block *dentry_blk = NULL; | 388 | struct f2fs_dentry_block *dentry_blk = NULL; |
| 387 | int slots = GET_DENTRY_SLOTS(namelen); | 389 | int slots = GET_DENTRY_SLOTS(namelen); |
| @@ -540,13 +542,13 @@ int f2fs_make_empty(struct inode *inode, struct inode *parent) | |||
| 540 | 542 | ||
| 541 | de = &dentry_blk->dentry[0]; | 543 | de = &dentry_blk->dentry[0]; |
| 542 | de->name_len = cpu_to_le16(1); | 544 | de->name_len = cpu_to_le16(1); |
| 543 | de->hash_code = 0; | 545 | de->hash_code = f2fs_dentry_hash(".", 1); |
| 544 | de->ino = cpu_to_le32(inode->i_ino); | 546 | de->ino = cpu_to_le32(inode->i_ino); |
| 545 | memcpy(dentry_blk->filename[0], ".", 1); | 547 | memcpy(dentry_blk->filename[0], ".", 1); |
| 546 | set_de_type(de, inode); | 548 | set_de_type(de, inode); |
| 547 | 549 | ||
| 548 | de = &dentry_blk->dentry[1]; | 550 | de = &dentry_blk->dentry[1]; |
| 549 | de->hash_code = 0; | 551 | de->hash_code = f2fs_dentry_hash("..", 2); |
| 550 | de->name_len = cpu_to_le16(2); | 552 | de->name_len = cpu_to_le16(2); |
| 551 | de->ino = cpu_to_le32(parent->i_ino); | 553 | de->ino = cpu_to_le32(parent->i_ino); |
| 552 | memcpy(dentry_blk->filename[1], "..", 2); | 554 | memcpy(dentry_blk->filename[1], "..", 2); |
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index a18d63db2fb6..13c6dfbb7183 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
| @@ -881,7 +881,7 @@ int f2fs_sync_fs(struct super_block *, int); | |||
| 881 | /* | 881 | /* |
| 882 | * hash.c | 882 | * hash.c |
| 883 | */ | 883 | */ |
| 884 | f2fs_hash_t f2fs_dentry_hash(const char *, int); | 884 | f2fs_hash_t f2fs_dentry_hash(const char *, size_t); |
| 885 | 885 | ||
| 886 | /* | 886 | /* |
| 887 | * node.c | 887 | * node.c |
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index f9e085dfb1f0..7f9ea9271ebe 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c | |||
| @@ -160,15 +160,17 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) | |||
| 160 | if (need_to_sync_dir(sbi, inode)) | 160 | if (need_to_sync_dir(sbi, inode)) |
| 161 | need_cp = true; | 161 | need_cp = true; |
| 162 | 162 | ||
| 163 | f2fs_write_inode(inode, NULL); | ||
| 164 | |||
| 165 | if (need_cp) { | 163 | if (need_cp) { |
| 166 | /* all the dirty node pages should be flushed for POR */ | 164 | /* all the dirty node pages should be flushed for POR */ |
| 167 | ret = f2fs_sync_fs(inode->i_sb, 1); | 165 | ret = f2fs_sync_fs(inode->i_sb, 1); |
| 168 | clear_inode_flag(F2FS_I(inode), FI_NEED_CP); | 166 | clear_inode_flag(F2FS_I(inode), FI_NEED_CP); |
| 169 | } else { | 167 | } else { |
| 170 | while (sync_node_pages(sbi, inode->i_ino, &wbc) == 0) | 168 | /* if there is no written node page, write its inode page */ |
| 171 | f2fs_write_inode(inode, NULL); | 169 | while (!sync_node_pages(sbi, inode->i_ino, &wbc)) { |
| 170 | ret = f2fs_write_inode(inode, NULL); | ||
| 171 | if (ret) | ||
| 172 | goto out; | ||
| 173 | } | ||
| 172 | filemap_fdatawait_range(sbi->node_inode->i_mapping, | 174 | filemap_fdatawait_range(sbi->node_inode->i_mapping, |
| 173 | 0, LONG_MAX); | 175 | 0, LONG_MAX); |
| 174 | } | 176 | } |
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 644aa3808273..b0ec721e984a 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c | |||
| @@ -390,9 +390,7 @@ next_step: | |||
| 390 | } | 390 | } |
| 391 | 391 | ||
| 392 | err = check_valid_map(sbi, segno, off); | 392 | err = check_valid_map(sbi, segno, off); |
| 393 | if (err == GC_ERROR) | 393 | if (err == GC_NEXT) |
| 394 | return err; | ||
| 395 | else if (err == GC_NEXT) | ||
| 396 | continue; | 394 | continue; |
| 397 | 395 | ||
| 398 | if (initial) { | 396 | if (initial) { |
| @@ -430,28 +428,22 @@ next_step: | |||
| 430 | */ | 428 | */ |
| 431 | block_t start_bidx_of_node(unsigned int node_ofs) | 429 | block_t start_bidx_of_node(unsigned int node_ofs) |
| 432 | { | 430 | { |
| 433 | block_t start_bidx; | 431 | unsigned int indirect_blks = 2 * NIDS_PER_BLOCK + 4; |
| 434 | unsigned int bidx, indirect_blks; | 432 | unsigned int bidx; |
| 435 | int dec; | ||
| 436 | 433 | ||
| 437 | indirect_blks = 2 * NIDS_PER_BLOCK + 4; | 434 | if (node_ofs == 0) |
| 435 | return 0; | ||
| 438 | 436 | ||
| 439 | start_bidx = 1; | 437 | if (node_ofs <= 2) { |
| 440 | if (node_ofs == 0) { | ||
| 441 | start_bidx = 0; | ||
| 442 | } else if (node_ofs <= 2) { | ||
| 443 | bidx = node_ofs - 1; | 438 | bidx = node_ofs - 1; |
| 444 | } else if (node_ofs <= indirect_blks) { | 439 | } else if (node_ofs <= indirect_blks) { |
| 445 | dec = (node_ofs - 4) / (NIDS_PER_BLOCK + 1); | 440 | int dec = (node_ofs - 4) / (NIDS_PER_BLOCK + 1); |
| 446 | bidx = node_ofs - 2 - dec; | 441 | bidx = node_ofs - 2 - dec; |
| 447 | } else { | 442 | } else { |
| 448 | dec = (node_ofs - indirect_blks - 3) / (NIDS_PER_BLOCK + 1); | 443 | int dec = (node_ofs - indirect_blks - 3) / (NIDS_PER_BLOCK + 1); |
| 449 | bidx = node_ofs - 5 - dec; | 444 | bidx = node_ofs - 5 - dec; |
| 450 | } | 445 | } |
| 451 | 446 | return bidx * ADDRS_PER_BLOCK + ADDRS_PER_INODE; | |
| 452 | if (start_bidx) | ||
| 453 | start_bidx = bidx * ADDRS_PER_BLOCK + ADDRS_PER_INODE; | ||
| 454 | return start_bidx; | ||
| 455 | } | 447 | } |
| 456 | 448 | ||
| 457 | static int check_dnode(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, | 449 | static int check_dnode(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, |
| @@ -556,9 +548,7 @@ next_step: | |||
| 556 | } | 548 | } |
| 557 | 549 | ||
| 558 | err = check_valid_map(sbi, segno, off); | 550 | err = check_valid_map(sbi, segno, off); |
| 559 | if (err == GC_ERROR) | 551 | if (err == GC_NEXT) |
| 560 | goto stop; | ||
| 561 | else if (err == GC_NEXT) | ||
| 562 | continue; | 552 | continue; |
| 563 | 553 | ||
| 564 | if (phase == 0) { | 554 | if (phase == 0) { |
| @@ -568,9 +558,7 @@ next_step: | |||
| 568 | 558 | ||
| 569 | /* Get an inode by ino with checking validity */ | 559 | /* Get an inode by ino with checking validity */ |
| 570 | err = check_dnode(sbi, entry, &dni, start_addr + off, &nofs); | 560 | err = check_dnode(sbi, entry, &dni, start_addr + off, &nofs); |
| 571 | if (err == GC_ERROR) | 561 | if (err == GC_NEXT) |
| 572 | goto stop; | ||
| 573 | else if (err == GC_NEXT) | ||
| 574 | continue; | 562 | continue; |
| 575 | 563 | ||
| 576 | if (phase == 1) { | 564 | if (phase == 1) { |
diff --git a/fs/f2fs/hash.c b/fs/f2fs/hash.c index a60f04200f8b..6eb8d269b53b 100644 --- a/fs/f2fs/hash.c +++ b/fs/f2fs/hash.c | |||
| @@ -42,7 +42,7 @@ static void TEA_transform(unsigned int buf[4], unsigned int const in[]) | |||
| 42 | buf[1] += b1; | 42 | buf[1] += b1; |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | static void str2hashbuf(const char *msg, int len, unsigned int *buf, int num) | 45 | static void str2hashbuf(const char *msg, size_t len, unsigned int *buf, int num) |
| 46 | { | 46 | { |
| 47 | unsigned pad, val; | 47 | unsigned pad, val; |
| 48 | int i; | 48 | int i; |
| @@ -69,13 +69,17 @@ static void str2hashbuf(const char *msg, int len, unsigned int *buf, int num) | |||
| 69 | *buf++ = pad; | 69 | *buf++ = pad; |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | f2fs_hash_t f2fs_dentry_hash(const char *name, int len) | 72 | f2fs_hash_t f2fs_dentry_hash(const char *name, size_t len) |
| 73 | { | 73 | { |
| 74 | __u32 hash, minor_hash; | 74 | __u32 hash; |
| 75 | f2fs_hash_t f2fs_hash; | 75 | f2fs_hash_t f2fs_hash; |
| 76 | const char *p; | 76 | const char *p; |
| 77 | __u32 in[8], buf[4]; | 77 | __u32 in[8], buf[4]; |
| 78 | 78 | ||
| 79 | if ((len <= 2) && (name[0] == '.') && | ||
| 80 | (name[1] == '.' || name[1] == '\0')) | ||
| 81 | return 0; | ||
| 82 | |||
| 79 | /* Initialize the default seed for the hash checksum functions */ | 83 | /* Initialize the default seed for the hash checksum functions */ |
| 80 | buf[0] = 0x67452301; | 84 | buf[0] = 0x67452301; |
| 81 | buf[1] = 0xefcdab89; | 85 | buf[1] = 0xefcdab89; |
| @@ -83,15 +87,15 @@ f2fs_hash_t f2fs_dentry_hash(const char *name, int len) | |||
| 83 | buf[3] = 0x10325476; | 87 | buf[3] = 0x10325476; |
| 84 | 88 | ||
| 85 | p = name; | 89 | p = name; |
| 86 | while (len > 0) { | 90 | while (1) { |
| 87 | str2hashbuf(p, len, in, 4); | 91 | str2hashbuf(p, len, in, 4); |
| 88 | TEA_transform(buf, in); | 92 | TEA_transform(buf, in); |
| 89 | len -= 16; | ||
| 90 | p += 16; | 93 | p += 16; |
| 94 | if (len <= 16) | ||
| 95 | break; | ||
| 96 | len -= 16; | ||
| 91 | } | 97 | } |
| 92 | hash = buf[0]; | 98 | hash = buf[0]; |
| 93 | minor_hash = buf[1]; | ||
| 94 | |||
| 95 | f2fs_hash = cpu_to_le32(hash & ~F2FS_HASH_COL_BIT); | 99 | f2fs_hash = cpu_to_le32(hash & ~F2FS_HASH_COL_BIT); |
| 96 | return f2fs_hash; | 100 | return f2fs_hash; |
| 97 | } | 101 | } |
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index df5fb381ebf1..bf20b4d03214 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c | |||
| @@ -203,6 +203,7 @@ void update_inode(struct inode *inode, struct page *node_page) | |||
| 203 | ri->i_flags = cpu_to_le32(F2FS_I(inode)->i_flags); | 203 | ri->i_flags = cpu_to_le32(F2FS_I(inode)->i_flags); |
| 204 | ri->i_pino = cpu_to_le32(F2FS_I(inode)->i_pino); | 204 | ri->i_pino = cpu_to_le32(F2FS_I(inode)->i_pino); |
| 205 | ri->i_generation = cpu_to_le32(inode->i_generation); | 205 | ri->i_generation = cpu_to_le32(inode->i_generation); |
| 206 | set_cold_node(inode, node_page); | ||
| 206 | set_page_dirty(node_page); | 207 | set_page_dirty(node_page); |
| 207 | } | 208 | } |
| 208 | 209 | ||
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 89b7675dc377..1a49b881bac0 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c | |||
| @@ -77,8 +77,8 @@ fail: | |||
| 77 | 77 | ||
| 78 | static int is_multimedia_file(const unsigned char *s, const char *sub) | 78 | static int is_multimedia_file(const unsigned char *s, const char *sub) |
| 79 | { | 79 | { |
| 80 | int slen = strlen(s); | 80 | size_t slen = strlen(s); |
| 81 | int sublen = strlen(sub); | 81 | size_t sublen = strlen(sub); |
| 82 | int ret; | 82 | int ret; |
| 83 | 83 | ||
| 84 | if (sublen > slen) | 84 | if (sublen > slen) |
| @@ -123,6 +123,8 @@ static int f2fs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |||
| 123 | nid_t ino = 0; | 123 | nid_t ino = 0; |
| 124 | int err; | 124 | int err; |
| 125 | 125 | ||
| 126 | f2fs_balance_fs(sbi); | ||
| 127 | |||
| 126 | inode = f2fs_new_inode(dir, mode); | 128 | inode = f2fs_new_inode(dir, mode); |
| 127 | if (IS_ERR(inode)) | 129 | if (IS_ERR(inode)) |
| 128 | return PTR_ERR(inode); | 130 | return PTR_ERR(inode); |
| @@ -144,8 +146,6 @@ static int f2fs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |||
| 144 | if (!sbi->por_doing) | 146 | if (!sbi->por_doing) |
| 145 | d_instantiate(dentry, inode); | 147 | d_instantiate(dentry, inode); |
| 146 | unlock_new_inode(inode); | 148 | unlock_new_inode(inode); |
| 147 | |||
| 148 | f2fs_balance_fs(sbi); | ||
| 149 | return 0; | 149 | return 0; |
| 150 | out: | 150 | out: |
| 151 | clear_nlink(inode); | 151 | clear_nlink(inode); |
| @@ -163,6 +163,8 @@ static int f2fs_link(struct dentry *old_dentry, struct inode *dir, | |||
| 163 | struct f2fs_sb_info *sbi = F2FS_SB(sb); | 163 | struct f2fs_sb_info *sbi = F2FS_SB(sb); |
| 164 | int err; | 164 | int err; |
| 165 | 165 | ||
| 166 | f2fs_balance_fs(sbi); | ||
| 167 | |||
| 166 | inode->i_ctime = CURRENT_TIME; | 168 | inode->i_ctime = CURRENT_TIME; |
| 167 | atomic_inc(&inode->i_count); | 169 | atomic_inc(&inode->i_count); |
| 168 | 170 | ||
| @@ -172,8 +174,6 @@ static int f2fs_link(struct dentry *old_dentry, struct inode *dir, | |||
| 172 | goto out; | 174 | goto out; |
| 173 | 175 | ||
| 174 | d_instantiate(dentry, inode); | 176 | d_instantiate(dentry, inode); |
| 175 | |||
| 176 | f2fs_balance_fs(sbi); | ||
| 177 | return 0; | 177 | return 0; |
| 178 | out: | 178 | out: |
| 179 | clear_inode_flag(F2FS_I(inode), FI_INC_LINK); | 179 | clear_inode_flag(F2FS_I(inode), FI_INC_LINK); |
| @@ -223,6 +223,8 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry) | |||
| 223 | struct page *page; | 223 | struct page *page; |
| 224 | int err = -ENOENT; | 224 | int err = -ENOENT; |
| 225 | 225 | ||
| 226 | f2fs_balance_fs(sbi); | ||
| 227 | |||
| 226 | de = f2fs_find_entry(dir, &dentry->d_name, &page); | 228 | de = f2fs_find_entry(dir, &dentry->d_name, &page); |
| 227 | if (!de) | 229 | if (!de) |
| 228 | goto fail; | 230 | goto fail; |
| @@ -238,7 +240,6 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry) | |||
| 238 | 240 | ||
| 239 | /* In order to evict this inode, we set it dirty */ | 241 | /* In order to evict this inode, we set it dirty */ |
| 240 | mark_inode_dirty(inode); | 242 | mark_inode_dirty(inode); |
| 241 | f2fs_balance_fs(sbi); | ||
| 242 | fail: | 243 | fail: |
| 243 | return err; | 244 | return err; |
| 244 | } | 245 | } |
| @@ -249,9 +250,11 @@ static int f2fs_symlink(struct inode *dir, struct dentry *dentry, | |||
| 249 | struct super_block *sb = dir->i_sb; | 250 | struct super_block *sb = dir->i_sb; |
| 250 | struct f2fs_sb_info *sbi = F2FS_SB(sb); | 251 | struct f2fs_sb_info *sbi = F2FS_SB(sb); |
| 251 | struct inode *inode; | 252 | struct inode *inode; |
| 252 | unsigned symlen = strlen(symname) + 1; | 253 | size_t symlen = strlen(symname) + 1; |
| 253 | int err; | 254 | int err; |
| 254 | 255 | ||
| 256 | f2fs_balance_fs(sbi); | ||
| 257 | |||
| 255 | inode = f2fs_new_inode(dir, S_IFLNK | S_IRWXUGO); | 258 | inode = f2fs_new_inode(dir, S_IFLNK | S_IRWXUGO); |
| 256 | if (IS_ERR(inode)) | 259 | if (IS_ERR(inode)) |
| 257 | return PTR_ERR(inode); | 260 | return PTR_ERR(inode); |
| @@ -268,9 +271,6 @@ static int f2fs_symlink(struct inode *dir, struct dentry *dentry, | |||
| 268 | 271 | ||
| 269 | d_instantiate(dentry, inode); | 272 | d_instantiate(dentry, inode); |
| 270 | unlock_new_inode(inode); | 273 | unlock_new_inode(inode); |
| 271 | |||
| 272 | f2fs_balance_fs(sbi); | ||
| 273 | |||
| 274 | return err; | 274 | return err; |
| 275 | out: | 275 | out: |
| 276 | clear_nlink(inode); | 276 | clear_nlink(inode); |
| @@ -286,6 +286,8 @@ static int f2fs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) | |||
| 286 | struct inode *inode; | 286 | struct inode *inode; |
| 287 | int err; | 287 | int err; |
| 288 | 288 | ||
| 289 | f2fs_balance_fs(sbi); | ||
| 290 | |||
| 289 | inode = f2fs_new_inode(dir, S_IFDIR | mode); | 291 | inode = f2fs_new_inode(dir, S_IFDIR | mode); |
| 290 | if (IS_ERR(inode)) | 292 | if (IS_ERR(inode)) |
| 291 | return PTR_ERR(inode); | 293 | return PTR_ERR(inode); |
| @@ -305,7 +307,6 @@ static int f2fs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) | |||
| 305 | d_instantiate(dentry, inode); | 307 | d_instantiate(dentry, inode); |
| 306 | unlock_new_inode(inode); | 308 | unlock_new_inode(inode); |
| 307 | 309 | ||
| 308 | f2fs_balance_fs(sbi); | ||
| 309 | return 0; | 310 | return 0; |
| 310 | 311 | ||
| 311 | out_fail: | 312 | out_fail: |
| @@ -336,6 +337,8 @@ static int f2fs_mknod(struct inode *dir, struct dentry *dentry, | |||
| 336 | if (!new_valid_dev(rdev)) | 337 | if (!new_valid_dev(rdev)) |
| 337 | return -EINVAL; | 338 | return -EINVAL; |
| 338 | 339 | ||
| 340 | f2fs_balance_fs(sbi); | ||
| 341 | |||
| 339 | inode = f2fs_new_inode(dir, mode); | 342 | inode = f2fs_new_inode(dir, mode); |
| 340 | if (IS_ERR(inode)) | 343 | if (IS_ERR(inode)) |
| 341 | return PTR_ERR(inode); | 344 | return PTR_ERR(inode); |
| @@ -350,9 +353,6 @@ static int f2fs_mknod(struct inode *dir, struct dentry *dentry, | |||
| 350 | alloc_nid_done(sbi, inode->i_ino); | 353 | alloc_nid_done(sbi, inode->i_ino); |
| 351 | d_instantiate(dentry, inode); | 354 | d_instantiate(dentry, inode); |
| 352 | unlock_new_inode(inode); | 355 | unlock_new_inode(inode); |
| 353 | |||
| 354 | f2fs_balance_fs(sbi); | ||
| 355 | |||
| 356 | return 0; | 356 | return 0; |
| 357 | out: | 357 | out: |
| 358 | clear_nlink(inode); | 358 | clear_nlink(inode); |
| @@ -376,6 +376,8 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
| 376 | struct f2fs_dir_entry *new_entry; | 376 | struct f2fs_dir_entry *new_entry; |
| 377 | int err = -ENOENT; | 377 | int err = -ENOENT; |
| 378 | 378 | ||
| 379 | f2fs_balance_fs(sbi); | ||
| 380 | |||
| 379 | old_entry = f2fs_find_entry(old_dir, &old_dentry->d_name, &old_page); | 381 | old_entry = f2fs_find_entry(old_dir, &old_dentry->d_name, &old_page); |
| 380 | if (!old_entry) | 382 | if (!old_entry) |
| 381 | goto out; | 383 | goto out; |
| @@ -441,8 +443,6 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
| 441 | } | 443 | } |
| 442 | 444 | ||
| 443 | mutex_unlock_op(sbi, RENAME); | 445 | mutex_unlock_op(sbi, RENAME); |
| 444 | |||
| 445 | f2fs_balance_fs(sbi); | ||
| 446 | return 0; | 446 | return 0; |
| 447 | 447 | ||
| 448 | out_dir: | 448 | out_dir: |
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 19870361497e..5066bfd256c9 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c | |||
| @@ -484,12 +484,14 @@ static void truncate_node(struct dnode_of_data *dn) | |||
| 484 | struct node_info ni; | 484 | struct node_info ni; |
| 485 | 485 | ||
| 486 | get_node_info(sbi, dn->nid, &ni); | 486 | get_node_info(sbi, dn->nid, &ni); |
| 487 | if (dn->inode->i_blocks == 0) { | ||
| 488 | BUG_ON(ni.blk_addr != NULL_ADDR); | ||
| 489 | goto invalidate; | ||
| 490 | } | ||
| 487 | BUG_ON(ni.blk_addr == NULL_ADDR); | 491 | BUG_ON(ni.blk_addr == NULL_ADDR); |
| 488 | 492 | ||
| 489 | if (ni.blk_addr != NULL_ADDR) | ||
| 490 | invalidate_blocks(sbi, ni.blk_addr); | ||
| 491 | |||
| 492 | /* Deallocate node address */ | 493 | /* Deallocate node address */ |
| 494 | invalidate_blocks(sbi, ni.blk_addr); | ||
| 493 | dec_valid_node_count(sbi, dn->inode, 1); | 495 | dec_valid_node_count(sbi, dn->inode, 1); |
| 494 | set_node_addr(sbi, &ni, NULL_ADDR); | 496 | set_node_addr(sbi, &ni, NULL_ADDR); |
| 495 | 497 | ||
| @@ -499,7 +501,7 @@ static void truncate_node(struct dnode_of_data *dn) | |||
| 499 | } else { | 501 | } else { |
| 500 | sync_inode_page(dn); | 502 | sync_inode_page(dn); |
| 501 | } | 503 | } |
| 502 | 504 | invalidate: | |
| 503 | clear_node_page_dirty(dn->node_page); | 505 | clear_node_page_dirty(dn->node_page); |
| 504 | F2FS_SET_SB_DIRT(sbi); | 506 | F2FS_SET_SB_DIRT(sbi); |
| 505 | 507 | ||
| @@ -768,20 +770,12 @@ int remove_inode_page(struct inode *inode) | |||
| 768 | dn.inode_page_locked = 1; | 770 | dn.inode_page_locked = 1; |
| 769 | truncate_node(&dn); | 771 | truncate_node(&dn); |
| 770 | } | 772 | } |
| 771 | if (inode->i_blocks == 1) { | ||
| 772 | /* inernally call f2fs_put_page() */ | ||
| 773 | set_new_dnode(&dn, inode, page, page, ino); | ||
| 774 | truncate_node(&dn); | ||
| 775 | } else if (inode->i_blocks == 0) { | ||
| 776 | struct node_info ni; | ||
| 777 | get_node_info(sbi, inode->i_ino, &ni); | ||
| 778 | 773 | ||
| 779 | /* called after f2fs_new_inode() is failed */ | 774 | /* 0 is possible, after f2fs_new_inode() is failed */ |
| 780 | BUG_ON(ni.blk_addr != NULL_ADDR); | 775 | BUG_ON(inode->i_blocks != 0 && inode->i_blocks != 1); |
| 781 | f2fs_put_page(page, 1); | 776 | set_new_dnode(&dn, inode, page, page, ino); |
| 782 | } else { | 777 | truncate_node(&dn); |
| 783 | BUG(); | 778 | |
| 784 | } | ||
| 785 | mutex_unlock_op(sbi, NODE_TRUNC); | 779 | mutex_unlock_op(sbi, NODE_TRUNC); |
| 786 | return 0; | 780 | return 0; |
| 787 | } | 781 | } |
| @@ -834,17 +828,18 @@ struct page *new_node_page(struct dnode_of_data *dn, unsigned int ofs) | |||
| 834 | goto fail; | 828 | goto fail; |
| 835 | } | 829 | } |
| 836 | set_node_addr(sbi, &new_ni, NEW_ADDR); | 830 | set_node_addr(sbi, &new_ni, NEW_ADDR); |
| 831 | set_cold_node(dn->inode, page); | ||
| 837 | 832 | ||
| 838 | dn->node_page = page; | 833 | dn->node_page = page; |
| 839 | sync_inode_page(dn); | 834 | sync_inode_page(dn); |
| 840 | set_page_dirty(page); | 835 | set_page_dirty(page); |
| 841 | set_cold_node(dn->inode, page); | ||
| 842 | if (ofs == 0) | 836 | if (ofs == 0) |
| 843 | inc_valid_inode_count(sbi); | 837 | inc_valid_inode_count(sbi); |
| 844 | 838 | ||
| 845 | return page; | 839 | return page; |
| 846 | 840 | ||
| 847 | fail: | 841 | fail: |
| 842 | clear_node_page_dirty(page); | ||
| 848 | f2fs_put_page(page, 1); | 843 | f2fs_put_page(page, 1); |
| 849 | return ERR_PTR(err); | 844 | return ERR_PTR(err); |
| 850 | } | 845 | } |
| @@ -1093,7 +1088,6 @@ static int f2fs_write_node_page(struct page *page, | |||
| 1093 | { | 1088 | { |
| 1094 | struct f2fs_sb_info *sbi = F2FS_SB(page->mapping->host->i_sb); | 1089 | struct f2fs_sb_info *sbi = F2FS_SB(page->mapping->host->i_sb); |
| 1095 | nid_t nid; | 1090 | nid_t nid; |
| 1096 | unsigned int nofs; | ||
| 1097 | block_t new_addr; | 1091 | block_t new_addr; |
| 1098 | struct node_info ni; | 1092 | struct node_info ni; |
| 1099 | 1093 | ||
| @@ -1110,7 +1104,6 @@ static int f2fs_write_node_page(struct page *page, | |||
| 1110 | 1104 | ||
| 1111 | /* get old block addr of this node page */ | 1105 | /* get old block addr of this node page */ |
| 1112 | nid = nid_of_node(page); | 1106 | nid = nid_of_node(page); |
| 1113 | nofs = ofs_of_node(page); | ||
| 1114 | BUG_ON(page->index != nid); | 1107 | BUG_ON(page->index != nid); |
| 1115 | 1108 | ||
| 1116 | get_node_info(sbi, nid, &ni); | 1109 | get_node_info(sbi, nid, &ni); |
| @@ -1571,7 +1564,7 @@ void flush_nat_entries(struct f2fs_sb_info *sbi) | |||
| 1571 | nid_t nid; | 1564 | nid_t nid; |
| 1572 | struct f2fs_nat_entry raw_ne; | 1565 | struct f2fs_nat_entry raw_ne; |
| 1573 | int offset = -1; | 1566 | int offset = -1; |
| 1574 | block_t old_blkaddr, new_blkaddr; | 1567 | block_t new_blkaddr; |
| 1575 | 1568 | ||
| 1576 | ne = list_entry(cur, struct nat_entry, list); | 1569 | ne = list_entry(cur, struct nat_entry, list); |
| 1577 | nid = nat_get_nid(ne); | 1570 | nid = nat_get_nid(ne); |
| @@ -1585,7 +1578,6 @@ void flush_nat_entries(struct f2fs_sb_info *sbi) | |||
| 1585 | offset = lookup_journal_in_cursum(sum, NAT_JOURNAL, nid, 1); | 1578 | offset = lookup_journal_in_cursum(sum, NAT_JOURNAL, nid, 1); |
| 1586 | if (offset >= 0) { | 1579 | if (offset >= 0) { |
| 1587 | raw_ne = nat_in_journal(sum, offset); | 1580 | raw_ne = nat_in_journal(sum, offset); |
| 1588 | old_blkaddr = le32_to_cpu(raw_ne.block_addr); | ||
| 1589 | goto flush_now; | 1581 | goto flush_now; |
| 1590 | } | 1582 | } |
| 1591 | to_nat_page: | 1583 | to_nat_page: |
| @@ -1607,7 +1599,6 @@ to_nat_page: | |||
| 1607 | 1599 | ||
| 1608 | BUG_ON(!nat_blk); | 1600 | BUG_ON(!nat_blk); |
| 1609 | raw_ne = nat_blk->entries[nid - start_nid]; | 1601 | raw_ne = nat_blk->entries[nid - start_nid]; |
| 1610 | old_blkaddr = le32_to_cpu(raw_ne.block_addr); | ||
| 1611 | flush_now: | 1602 | flush_now: |
| 1612 | new_blkaddr = nat_get_blkaddr(ne); | 1603 | new_blkaddr = nat_get_blkaddr(ne); |
| 1613 | 1604 | ||
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index b07e9b6ef376..b571fee677d5 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c | |||
| @@ -144,14 +144,15 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head) | |||
| 144 | goto out; | 144 | goto out; |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | INIT_LIST_HEAD(&entry->list); | ||
| 148 | list_add_tail(&entry->list, head); | ||
| 149 | |||
| 150 | entry->inode = f2fs_iget(sbi->sb, ino_of_node(page)); | 147 | entry->inode = f2fs_iget(sbi->sb, ino_of_node(page)); |
| 151 | if (IS_ERR(entry->inode)) { | 148 | if (IS_ERR(entry->inode)) { |
| 152 | err = PTR_ERR(entry->inode); | 149 | err = PTR_ERR(entry->inode); |
| 150 | kmem_cache_free(fsync_entry_slab, entry); | ||
| 153 | goto out; | 151 | goto out; |
| 154 | } | 152 | } |
| 153 | |||
| 154 | INIT_LIST_HEAD(&entry->list); | ||
| 155 | list_add_tail(&entry->list, head); | ||
| 155 | entry->blkaddr = blkaddr; | 156 | entry->blkaddr = blkaddr; |
| 156 | } | 157 | } |
| 157 | if (IS_INODE(page)) { | 158 | if (IS_INODE(page)) { |
| @@ -228,6 +229,9 @@ static void check_index_in_prev_nodes(struct f2fs_sb_info *sbi, | |||
| 228 | 229 | ||
| 229 | /* Deallocate previous index in the node page */ | 230 | /* Deallocate previous index in the node page */ |
| 230 | inode = f2fs_iget_nowait(sbi->sb, ino); | 231 | inode = f2fs_iget_nowait(sbi->sb, ino); |
| 232 | if (IS_ERR(inode)) | ||
| 233 | return; | ||
| 234 | |||
| 231 | truncate_hole(inode, bidx, bidx + 1); | 235 | truncate_hole(inode, bidx, bidx + 1); |
| 232 | iput(inode); | 236 | iput(inode); |
| 233 | } | 237 | } |
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 1b26e4ea1016..de6240922b0a 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c | |||
| @@ -12,54 +12,23 @@ | |||
| 12 | #include <linux/f2fs_fs.h> | 12 | #include <linux/f2fs_fs.h> |
| 13 | #include <linux/bio.h> | 13 | #include <linux/bio.h> |
| 14 | #include <linux/blkdev.h> | 14 | #include <linux/blkdev.h> |
| 15 | #include <linux/prefetch.h> | ||
| 15 | #include <linux/vmalloc.h> | 16 | #include <linux/vmalloc.h> |
| 16 | 17 | ||
| 17 | #include "f2fs.h" | 18 | #include "f2fs.h" |
| 18 | #include "segment.h" | 19 | #include "segment.h" |
| 19 | #include "node.h" | 20 | #include "node.h" |
| 20 | 21 | ||
| 21 | static int need_to_flush(struct f2fs_sb_info *sbi) | ||
| 22 | { | ||
| 23 | unsigned int pages_per_sec = (1 << sbi->log_blocks_per_seg) * | ||
| 24 | sbi->segs_per_sec; | ||
| 25 | int node_secs = ((get_pages(sbi, F2FS_DIRTY_NODES) + pages_per_sec - 1) | ||
| 26 | >> sbi->log_blocks_per_seg) / sbi->segs_per_sec; | ||
| 27 | int dent_secs = ((get_pages(sbi, F2FS_DIRTY_DENTS) + pages_per_sec - 1) | ||
| 28 | >> sbi->log_blocks_per_seg) / sbi->segs_per_sec; | ||
| 29 | |||
| 30 | if (sbi->por_doing) | ||
| 31 | return 0; | ||
| 32 | |||
| 33 | if (free_sections(sbi) <= (node_secs + 2 * dent_secs + | ||
| 34 | reserved_sections(sbi))) | ||
| 35 | return 1; | ||
| 36 | return 0; | ||
| 37 | } | ||
| 38 | |||
| 39 | /* | 22 | /* |
| 40 | * This function balances dirty node and dentry pages. | 23 | * This function balances dirty node and dentry pages. |
| 41 | * In addition, it controls garbage collection. | 24 | * In addition, it controls garbage collection. |
| 42 | */ | 25 | */ |
| 43 | void f2fs_balance_fs(struct f2fs_sb_info *sbi) | 26 | void f2fs_balance_fs(struct f2fs_sb_info *sbi) |
| 44 | { | 27 | { |
| 45 | struct writeback_control wbc = { | ||
| 46 | .sync_mode = WB_SYNC_ALL, | ||
| 47 | .nr_to_write = LONG_MAX, | ||
| 48 | .for_reclaim = 0, | ||
| 49 | }; | ||
| 50 | |||
| 51 | if (sbi->por_doing) | ||
| 52 | return; | ||
| 53 | |||
| 54 | /* | 28 | /* |
| 55 | * We should do checkpoint when there are so many dirty node pages | 29 | * We should do GC or end up with checkpoint, if there are so many dirty |
| 56 | * with enough free segments. After then, we should do GC. | 30 | * dir/node pages without enough free segments. |
| 57 | */ | 31 | */ |
| 58 | if (need_to_flush(sbi)) { | ||
| 59 | sync_dirty_dir_inodes(sbi); | ||
| 60 | sync_node_pages(sbi, 0, &wbc); | ||
| 61 | } | ||
| 62 | |||
| 63 | if (has_not_enough_free_secs(sbi)) { | 32 | if (has_not_enough_free_secs(sbi)) { |
| 64 | mutex_lock(&sbi->gc_mutex); | 33 | mutex_lock(&sbi->gc_mutex); |
| 65 | f2fs_gc(sbi, 1); | 34 | f2fs_gc(sbi, 1); |
| @@ -631,7 +600,6 @@ static void f2fs_end_io_write(struct bio *bio, int err) | |||
| 631 | if (page->mapping) | 600 | if (page->mapping) |
| 632 | set_bit(AS_EIO, &page->mapping->flags); | 601 | set_bit(AS_EIO, &page->mapping->flags); |
| 633 | set_ckpt_flags(p->sbi->ckpt, CP_ERROR_FLAG); | 602 | set_ckpt_flags(p->sbi->ckpt, CP_ERROR_FLAG); |
| 634 | set_page_dirty(page); | ||
| 635 | } | 603 | } |
| 636 | end_page_writeback(page); | 604 | end_page_writeback(page); |
| 637 | dec_page_count(p->sbi, F2FS_WRITEBACK); | 605 | dec_page_count(p->sbi, F2FS_WRITEBACK); |
| @@ -791,11 +759,10 @@ static int __get_segment_type(struct page *page, enum page_type p_type) | |||
| 791 | return __get_segment_type_2(page, p_type); | 759 | return __get_segment_type_2(page, p_type); |
| 792 | case 4: | 760 | case 4: |
| 793 | return __get_segment_type_4(page, p_type); | 761 | return __get_segment_type_4(page, p_type); |
| 794 | case 6: | ||
| 795 | return __get_segment_type_6(page, p_type); | ||
| 796 | default: | ||
| 797 | BUG(); | ||
| 798 | } | 762 | } |
| 763 | /* NR_CURSEG_TYPE(6) logs by default */ | ||
| 764 | BUG_ON(sbi->active_logs != NR_CURSEG_TYPE); | ||
| 765 | return __get_segment_type_6(page, p_type); | ||
| 799 | } | 766 | } |
| 800 | 767 | ||
| 801 | static void do_write_page(struct f2fs_sb_info *sbi, struct page *page, | 768 | static void do_write_page(struct f2fs_sb_info *sbi, struct page *page, |
| @@ -1608,7 +1575,6 @@ static int build_dirty_segmap(struct f2fs_sb_info *sbi) | |||
| 1608 | 1575 | ||
| 1609 | for (i = 0; i < NR_DIRTY_TYPE; i++) { | 1576 | for (i = 0; i < NR_DIRTY_TYPE; i++) { |
| 1610 | dirty_i->dirty_segmap[i] = kzalloc(bitmap_size, GFP_KERNEL); | 1577 | dirty_i->dirty_segmap[i] = kzalloc(bitmap_size, GFP_KERNEL); |
| 1611 | dirty_i->nr_dirty[i] = 0; | ||
| 1612 | if (!dirty_i->dirty_segmap[i]) | 1578 | if (!dirty_i->dirty_segmap[i]) |
| 1613 | return -ENOMEM; | 1579 | return -ENOMEM; |
| 1614 | } | 1580 | } |
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 0948405af6f5..66a288a52fd3 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h | |||
| @@ -459,7 +459,20 @@ static inline int get_ssr_segment(struct f2fs_sb_info *sbi, int type) | |||
| 459 | 459 | ||
| 460 | static inline bool has_not_enough_free_secs(struct f2fs_sb_info *sbi) | 460 | static inline bool has_not_enough_free_secs(struct f2fs_sb_info *sbi) |
| 461 | { | 461 | { |
| 462 | return free_sections(sbi) <= reserved_sections(sbi); | 462 | unsigned int pages_per_sec = (1 << sbi->log_blocks_per_seg) * |
| 463 | sbi->segs_per_sec; | ||
| 464 | int node_secs = ((get_pages(sbi, F2FS_DIRTY_NODES) + pages_per_sec - 1) | ||
| 465 | >> sbi->log_blocks_per_seg) / sbi->segs_per_sec; | ||
| 466 | int dent_secs = ((get_pages(sbi, F2FS_DIRTY_DENTS) + pages_per_sec - 1) | ||
| 467 | >> sbi->log_blocks_per_seg) / sbi->segs_per_sec; | ||
| 468 | |||
| 469 | if (sbi->por_doing) | ||
| 470 | return false; | ||
| 471 | |||
| 472 | if (free_sections(sbi) <= (node_secs + 2 * dent_secs + | ||
| 473 | reserved_sections(sbi))) | ||
| 474 | return true; | ||
| 475 | return false; | ||
| 463 | } | 476 | } |
| 464 | 477 | ||
| 465 | static inline int utilization(struct f2fs_sb_info *sbi) | 478 | static inline int utilization(struct f2fs_sb_info *sbi) |
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 13867322cf5a..08a94c814bdc 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c | |||
| @@ -119,7 +119,6 @@ static void f2fs_put_super(struct super_block *sb) | |||
| 119 | int f2fs_sync_fs(struct super_block *sb, int sync) | 119 | int f2fs_sync_fs(struct super_block *sb, int sync) |
| 120 | { | 120 | { |
| 121 | struct f2fs_sb_info *sbi = F2FS_SB(sb); | 121 | struct f2fs_sb_info *sbi = F2FS_SB(sb); |
| 122 | int ret = 0; | ||
| 123 | 122 | ||
| 124 | if (!sbi->s_dirty && !get_pages(sbi, F2FS_DIRTY_NODES)) | 123 | if (!sbi->s_dirty && !get_pages(sbi, F2FS_DIRTY_NODES)) |
| 125 | return 0; | 124 | return 0; |
| @@ -127,7 +126,7 @@ int f2fs_sync_fs(struct super_block *sb, int sync) | |||
| 127 | if (sync) | 126 | if (sync) |
| 128 | write_checkpoint(sbi, false, false); | 127 | write_checkpoint(sbi, false, false); |
| 129 | 128 | ||
| 130 | return ret; | 129 | return 0; |
| 131 | } | 130 | } |
| 132 | 131 | ||
| 133 | static int f2fs_statfs(struct dentry *dentry, struct kstatfs *buf) | 132 | static int f2fs_statfs(struct dentry *dentry, struct kstatfs *buf) |
| @@ -148,8 +147,8 @@ static int f2fs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
| 148 | buf->f_bfree = buf->f_blocks - valid_user_blocks(sbi) - ovp_count; | 147 | buf->f_bfree = buf->f_blocks - valid_user_blocks(sbi) - ovp_count; |
| 149 | buf->f_bavail = user_block_count - valid_user_blocks(sbi); | 148 | buf->f_bavail = user_block_count - valid_user_blocks(sbi); |
| 150 | 149 | ||
| 151 | buf->f_files = valid_inode_count(sbi); | 150 | buf->f_files = sbi->total_node_count; |
| 152 | buf->f_ffree = sbi->total_node_count - valid_node_count(sbi); | 151 | buf->f_ffree = sbi->total_node_count - valid_inode_count(sbi); |
| 153 | 152 | ||
| 154 | buf->f_namelen = F2FS_MAX_NAME_LEN; | 153 | buf->f_namelen = F2FS_MAX_NAME_LEN; |
| 155 | buf->f_fsid.val[0] = (u32)id; | 154 | buf->f_fsid.val[0] = (u32)id; |
| @@ -302,7 +301,7 @@ static int parse_options(struct f2fs_sb_info *sbi, char *options) | |||
| 302 | case Opt_active_logs: | 301 | case Opt_active_logs: |
| 303 | if (args->from && match_int(args, &arg)) | 302 | if (args->from && match_int(args, &arg)) |
| 304 | return -EINVAL; | 303 | return -EINVAL; |
| 305 | if (arg != 2 && arg != 4 && arg != 6) | 304 | if (arg != 2 && arg != 4 && arg != NR_CURSEG_TYPE) |
| 306 | return -EINVAL; | 305 | return -EINVAL; |
| 307 | sbi->active_logs = arg; | 306 | sbi->active_logs = arg; |
| 308 | break; | 307 | break; |
| @@ -528,8 +527,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) | |||
| 528 | 527 | ||
| 529 | /* if there are nt orphan nodes free them */ | 528 | /* if there are nt orphan nodes free them */ |
| 530 | err = -EINVAL; | 529 | err = -EINVAL; |
| 531 | if (!is_set_ckpt_flags(F2FS_CKPT(sbi), CP_UMOUNT_FLAG) && | 530 | if (recover_orphan_inodes(sbi)) |
| 532 | recover_orphan_inodes(sbi)) | ||
| 533 | goto free_node_inode; | 531 | goto free_node_inode; |
| 534 | 532 | ||
| 535 | /* read root inode and dentry */ | 533 | /* read root inode and dentry */ |
| @@ -548,8 +546,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) | |||
| 548 | } | 546 | } |
| 549 | 547 | ||
| 550 | /* recover fsynced data */ | 548 | /* recover fsynced data */ |
| 551 | if (!is_set_ckpt_flags(F2FS_CKPT(sbi), CP_UMOUNT_FLAG) && | 549 | if (!test_opt(sbi, DISABLE_ROLL_FORWARD)) |
| 552 | !test_opt(sbi, DISABLE_ROLL_FORWARD)) | ||
| 553 | recover_fsync_data(sbi); | 550 | recover_fsync_data(sbi); |
| 554 | 551 | ||
| 555 | /* After POR, we can run background GC thread */ | 552 | /* After POR, we can run background GC thread */ |
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index 7d52e8dc0c59..940136a3d3a6 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs/xattr.c | |||
| @@ -208,7 +208,7 @@ int f2fs_getxattr(struct inode *inode, int name_index, const char *name, | |||
| 208 | struct page *page; | 208 | struct page *page; |
| 209 | void *base_addr; | 209 | void *base_addr; |
| 210 | int error = 0, found = 0; | 210 | int error = 0, found = 0; |
| 211 | int value_len, name_len; | 211 | size_t value_len, name_len; |
| 212 | 212 | ||
| 213 | if (name == NULL) | 213 | if (name == NULL) |
| 214 | return -EINVAL; | 214 | return -EINVAL; |
| @@ -304,7 +304,8 @@ int f2fs_setxattr(struct inode *inode, int name_index, const char *name, | |||
| 304 | struct f2fs_xattr_entry *here, *last; | 304 | struct f2fs_xattr_entry *here, *last; |
| 305 | struct page *page; | 305 | struct page *page; |
| 306 | void *base_addr; | 306 | void *base_addr; |
| 307 | int error, found, free, name_len, newsize; | 307 | int error, found, free, newsize; |
| 308 | size_t name_len; | ||
| 308 | char *pval; | 309 | char *pval; |
| 309 | 310 | ||
| 310 | if (name == NULL) | 311 | if (name == NULL) |
| @@ -490,7 +490,7 @@ void exit_files(struct task_struct *tsk) | |||
| 490 | } | 490 | } |
| 491 | } | 491 | } |
| 492 | 492 | ||
| 493 | static void __devinit fdtable_defer_list_init(int cpu) | 493 | static void fdtable_defer_list_init(int cpu) |
| 494 | { | 494 | { |
| 495 | struct fdtable_defer *fddef = &per_cpu(fdtable_defer_list, cpu); | 495 | struct fdtable_defer *fddef = &per_cpu(fdtable_defer_list, cpu); |
| 496 | spin_lock_init(&fddef->lock); | 496 | spin_lock_init(&fddef->lock); |
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c index 8dad6b093716..b906ed17a839 100644 --- a/fs/gfs2/lock_dlm.c +++ b/fs/gfs2/lock_dlm.c | |||
| @@ -241,6 +241,7 @@ static u32 make_flags(struct gfs2_glock *gl, const unsigned int gfs_flags, | |||
| 241 | 241 | ||
| 242 | static void gfs2_reverse_hex(char *c, u64 value) | 242 | static void gfs2_reverse_hex(char *c, u64 value) |
| 243 | { | 243 | { |
| 244 | *c = '0'; | ||
| 244 | while (value) { | 245 | while (value) { |
| 245 | *c-- = hex_asc[value & 0x0f]; | 246 | *c-- = hex_asc[value & 0x0f]; |
| 246 | value >>= 4; | 247 | value >>= 4; |
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 37ee061d899e..b7eff078fe90 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
| @@ -350,10 +350,14 @@ static u32 gfs2_free_extlen(const struct gfs2_rbm *rrbm, u32 len) | |||
| 350 | BUG_ON(len < chunk_size); | 350 | BUG_ON(len < chunk_size); |
| 351 | len -= chunk_size; | 351 | len -= chunk_size; |
| 352 | block = gfs2_rbm_to_block(&rbm); | 352 | block = gfs2_rbm_to_block(&rbm); |
| 353 | gfs2_rbm_from_block(&rbm, block + chunk_size); | 353 | if (gfs2_rbm_from_block(&rbm, block + chunk_size)) { |
| 354 | n_unaligned = 3; | 354 | n_unaligned = 0; |
| 355 | if (ptr) | ||
| 356 | break; | 355 | break; |
| 356 | } | ||
| 357 | if (ptr) { | ||
| 358 | n_unaligned = 3; | ||
| 359 | break; | ||
| 360 | } | ||
| 357 | n_unaligned = len & 3; | 361 | n_unaligned = len & 3; |
| 358 | } | 362 | } |
| 359 | 363 | ||
| @@ -557,22 +561,20 @@ void gfs2_free_clones(struct gfs2_rgrpd *rgd) | |||
| 557 | */ | 561 | */ |
| 558 | int gfs2_rs_alloc(struct gfs2_inode *ip) | 562 | int gfs2_rs_alloc(struct gfs2_inode *ip) |
| 559 | { | 563 | { |
| 560 | struct gfs2_blkreserv *res; | 564 | int error = 0; |
| 561 | 565 | ||
| 566 | down_write(&ip->i_rw_mutex); | ||
| 562 | if (ip->i_res) | 567 | if (ip->i_res) |
| 563 | return 0; | 568 | goto out; |
| 564 | |||
| 565 | res = kmem_cache_zalloc(gfs2_rsrv_cachep, GFP_NOFS); | ||
| 566 | if (!res) | ||
| 567 | return -ENOMEM; | ||
| 568 | 569 | ||
| 569 | RB_CLEAR_NODE(&res->rs_node); | 570 | ip->i_res = kmem_cache_zalloc(gfs2_rsrv_cachep, GFP_NOFS); |
| 571 | if (!ip->i_res) { | ||
| 572 | error = -ENOMEM; | ||
| 573 | goto out; | ||
| 574 | } | ||
| 570 | 575 | ||
| 571 | down_write(&ip->i_rw_mutex); | 576 | RB_CLEAR_NODE(&ip->i_res->rs_node); |
| 572 | if (ip->i_res) | 577 | out: |
| 573 | kmem_cache_free(gfs2_rsrv_cachep, res); | ||
| 574 | else | ||
| 575 | ip->i_res = res; | ||
| 576 | up_write(&ip->i_rw_mutex); | 578 | up_write(&ip->i_rw_mutex); |
| 577 | return 0; | 579 | return 0; |
| 578 | } | 580 | } |
| @@ -1424,6 +1426,9 @@ static void rg_mblk_search(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip, | |||
| 1424 | rs->rs_free = extlen; | 1426 | rs->rs_free = extlen; |
| 1425 | rs->rs_inum = ip->i_no_addr; | 1427 | rs->rs_inum = ip->i_no_addr; |
| 1426 | rs_insert(ip); | 1428 | rs_insert(ip); |
| 1429 | } else { | ||
| 1430 | if (goal == rgd->rd_last_alloc + rgd->rd_data0) | ||
| 1431 | rgd->rd_last_alloc = 0; | ||
| 1427 | } | 1432 | } |
| 1428 | } | 1433 | } |
| 1429 | 1434 | ||
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c index a2862339323b..81cc7eaff863 100644 --- a/fs/jbd/journal.c +++ b/fs/jbd/journal.c | |||
| @@ -446,7 +446,8 @@ int __log_start_commit(journal_t *journal, tid_t target) | |||
| 446 | * currently running transaction (if it exists). Otherwise, | 446 | * currently running transaction (if it exists). Otherwise, |
| 447 | * the target tid must be an old one. | 447 | * the target tid must be an old one. |
| 448 | */ | 448 | */ |
| 449 | if (journal->j_running_transaction && | 449 | if (journal->j_commit_request != target && |
| 450 | journal->j_running_transaction && | ||
| 450 | journal->j_running_transaction->t_tid == target) { | 451 | journal->j_running_transaction->t_tid == target) { |
| 451 | /* | 452 | /* |
| 452 | * We want a new commit: OK, mark the request and wakeup the | 453 | * We want a new commit: OK, mark the request and wakeup the |
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index c89b26bc9759..264d1aa935f2 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c | |||
| @@ -206,7 +206,7 @@ static u32 initiate_bulk_draining(struct nfs_client *clp, | |||
| 206 | 206 | ||
| 207 | list_for_each_entry(lo, &server->layouts, plh_layouts) { | 207 | list_for_each_entry(lo, &server->layouts, plh_layouts) { |
| 208 | ino = igrab(lo->plh_inode); | 208 | ino = igrab(lo->plh_inode); |
| 209 | if (ino) | 209 | if (!ino) |
| 210 | continue; | 210 | continue; |
| 211 | spin_lock(&ino->i_lock); | 211 | spin_lock(&ino->i_lock); |
| 212 | /* Is this layout in the process of being freed? */ | 212 | /* Is this layout in the process of being freed? */ |
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 32e6c53520e2..1b2d7eb93796 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
| @@ -2153,12 +2153,16 @@ static int nfs_open_permission_mask(int openflags) | |||
| 2153 | { | 2153 | { |
| 2154 | int mask = 0; | 2154 | int mask = 0; |
| 2155 | 2155 | ||
| 2156 | if ((openflags & O_ACCMODE) != O_WRONLY) | 2156 | if (openflags & __FMODE_EXEC) { |
| 2157 | mask |= MAY_READ; | 2157 | /* ONLY check exec rights */ |
| 2158 | if ((openflags & O_ACCMODE) != O_RDONLY) | 2158 | mask = MAY_EXEC; |
| 2159 | mask |= MAY_WRITE; | 2159 | } else { |
| 2160 | if (openflags & __FMODE_EXEC) | 2160 | if ((openflags & O_ACCMODE) != O_WRONLY) |
| 2161 | mask |= MAY_EXEC; | 2161 | mask |= MAY_READ; |
| 2162 | if ((openflags & O_ACCMODE) != O_RDONLY) | ||
| 2163 | mask |= MAY_WRITE; | ||
| 2164 | } | ||
| 2165 | |||
| 2162 | return mask; | 2166 | return mask; |
| 2163 | } | 2167 | } |
| 2164 | 2168 | ||
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 5d864fb36578..cf747ef86650 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
| @@ -1626,7 +1626,8 @@ static int _nfs4_recover_proc_open(struct nfs4_opendata *data) | |||
| 1626 | 1626 | ||
| 1627 | static int nfs4_opendata_access(struct rpc_cred *cred, | 1627 | static int nfs4_opendata_access(struct rpc_cred *cred, |
| 1628 | struct nfs4_opendata *opendata, | 1628 | struct nfs4_opendata *opendata, |
| 1629 | struct nfs4_state *state, fmode_t fmode) | 1629 | struct nfs4_state *state, fmode_t fmode, |
| 1630 | int openflags) | ||
| 1630 | { | 1631 | { |
| 1631 | struct nfs_access_entry cache; | 1632 | struct nfs_access_entry cache; |
| 1632 | u32 mask; | 1633 | u32 mask; |
| @@ -1638,11 +1639,14 @@ static int nfs4_opendata_access(struct rpc_cred *cred, | |||
| 1638 | 1639 | ||
| 1639 | mask = 0; | 1640 | mask = 0; |
| 1640 | /* don't check MAY_WRITE - a newly created file may not have | 1641 | /* don't check MAY_WRITE - a newly created file may not have |
| 1641 | * write mode bits, but POSIX allows the creating process to write */ | 1642 | * write mode bits, but POSIX allows the creating process to write. |
| 1642 | if (fmode & FMODE_READ) | 1643 | * use openflags to check for exec, because fmode won't |
| 1643 | mask |= MAY_READ; | 1644 | * always have FMODE_EXEC set when file open for exec. */ |
| 1644 | if (fmode & FMODE_EXEC) | 1645 | if (openflags & __FMODE_EXEC) { |
| 1645 | mask |= MAY_EXEC; | 1646 | /* ONLY check for exec rights */ |
| 1647 | mask = MAY_EXEC; | ||
| 1648 | } else if (fmode & FMODE_READ) | ||
| 1649 | mask = MAY_READ; | ||
| 1646 | 1650 | ||
| 1647 | cache.cred = cred; | 1651 | cache.cred = cred; |
| 1648 | cache.jiffies = jiffies; | 1652 | cache.jiffies = jiffies; |
| @@ -1896,7 +1900,7 @@ static int _nfs4_do_open(struct inode *dir, | |||
| 1896 | if (server->caps & NFS_CAP_POSIX_LOCK) | 1900 | if (server->caps & NFS_CAP_POSIX_LOCK) |
| 1897 | set_bit(NFS_STATE_POSIX_LOCKS, &state->flags); | 1901 | set_bit(NFS_STATE_POSIX_LOCKS, &state->flags); |
| 1898 | 1902 | ||
| 1899 | status = nfs4_opendata_access(cred, opendata, state, fmode); | 1903 | status = nfs4_opendata_access(cred, opendata, state, fmode, flags); |
| 1900 | if (status != 0) | 1904 | if (status != 0) |
| 1901 | goto err_opendata_put; | 1905 | goto err_opendata_put; |
| 1902 | 1906 | ||
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index e7165d915362..d00260b08103 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c | |||
| @@ -254,7 +254,7 @@ static void | |||
| 254 | pnfs_layout_set_fail_bit(struct pnfs_layout_hdr *lo, int fail_bit) | 254 | pnfs_layout_set_fail_bit(struct pnfs_layout_hdr *lo, int fail_bit) |
| 255 | { | 255 | { |
| 256 | lo->plh_retry_timestamp = jiffies; | 256 | lo->plh_retry_timestamp = jiffies; |
| 257 | if (test_and_set_bit(fail_bit, &lo->plh_flags)) | 257 | if (!test_and_set_bit(fail_bit, &lo->plh_flags)) |
| 258 | atomic_inc(&lo->plh_refcount); | 258 | atomic_inc(&lo->plh_refcount); |
| 259 | } | 259 | } |
| 260 | 260 | ||
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index b6bdb18e892c..a5e5d9899d56 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
| @@ -91,12 +91,16 @@ void nfs_readdata_release(struct nfs_read_data *rdata) | |||
| 91 | put_nfs_open_context(rdata->args.context); | 91 | put_nfs_open_context(rdata->args.context); |
| 92 | if (rdata->pages.pagevec != rdata->pages.page_array) | 92 | if (rdata->pages.pagevec != rdata->pages.page_array) |
| 93 | kfree(rdata->pages.pagevec); | 93 | kfree(rdata->pages.pagevec); |
| 94 | if (rdata != &read_header->rpc_data) | 94 | if (rdata == &read_header->rpc_data) { |
| 95 | kfree(rdata); | ||
| 96 | else | ||
| 97 | rdata->header = NULL; | 95 | rdata->header = NULL; |
| 96 | rdata = NULL; | ||
| 97 | } | ||
| 98 | if (atomic_dec_and_test(&hdr->refcnt)) | 98 | if (atomic_dec_and_test(&hdr->refcnt)) |
| 99 | hdr->completion_ops->completion(hdr); | 99 | hdr->completion_ops->completion(hdr); |
| 100 | /* Note: we only free the rpc_task after callbacks are done. | ||
| 101 | * See the comment in rpc_free_task() for why | ||
| 102 | */ | ||
| 103 | kfree(rdata); | ||
| 100 | } | 104 | } |
| 101 | EXPORT_SYMBOL_GPL(nfs_readdata_release); | 105 | EXPORT_SYMBOL_GPL(nfs_readdata_release); |
| 102 | 106 | ||
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index c25cadf8f8c4..2e7e8c878e5d 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
| @@ -1152,7 +1152,7 @@ static int nfs_get_option_str(substring_t args[], char **option) | |||
| 1152 | { | 1152 | { |
| 1153 | kfree(*option); | 1153 | kfree(*option); |
| 1154 | *option = match_strdup(args); | 1154 | *option = match_strdup(args); |
| 1155 | return !option; | 1155 | return !*option; |
| 1156 | } | 1156 | } |
| 1157 | 1157 | ||
| 1158 | static int nfs_get_option_ul(substring_t args[], unsigned long *option) | 1158 | static int nfs_get_option_ul(substring_t args[], unsigned long *option) |
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index b673be31590e..c483cc50b82e 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
| @@ -126,12 +126,16 @@ void nfs_writedata_release(struct nfs_write_data *wdata) | |||
| 126 | put_nfs_open_context(wdata->args.context); | 126 | put_nfs_open_context(wdata->args.context); |
| 127 | if (wdata->pages.pagevec != wdata->pages.page_array) | 127 | if (wdata->pages.pagevec != wdata->pages.page_array) |
| 128 | kfree(wdata->pages.pagevec); | 128 | kfree(wdata->pages.pagevec); |
| 129 | if (wdata != &write_header->rpc_data) | 129 | if (wdata == &write_header->rpc_data) { |
| 130 | kfree(wdata); | ||
| 131 | else | ||
| 132 | wdata->header = NULL; | 130 | wdata->header = NULL; |
| 131 | wdata = NULL; | ||
| 132 | } | ||
| 133 | if (atomic_dec_and_test(&hdr->refcnt)) | 133 | if (atomic_dec_and_test(&hdr->refcnt)) |
| 134 | hdr->completion_ops->completion(hdr); | 134 | hdr->completion_ops->completion(hdr); |
| 135 | /* Note: we only free the rpc_task after callbacks are done. | ||
| 136 | * See the comment in rpc_free_task() for why | ||
| 137 | */ | ||
| 138 | kfree(wdata); | ||
| 135 | } | 139 | } |
| 136 | EXPORT_SYMBOL_GPL(nfs_writedata_release); | 140 | EXPORT_SYMBOL_GPL(nfs_writedata_release); |
| 137 | 141 | ||
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index f883e7e74305..7003e5266f25 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c | |||
| @@ -291,9 +291,8 @@ static void ramoops_free_przs(struct ramoops_context *cxt) | |||
| 291 | kfree(cxt->przs); | 291 | kfree(cxt->przs); |
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | static int __devinit ramoops_init_przs(struct device *dev, | 294 | static int ramoops_init_przs(struct device *dev, struct ramoops_context *cxt, |
| 295 | struct ramoops_context *cxt, | 295 | phys_addr_t *paddr, size_t dump_mem_sz) |
| 296 | phys_addr_t *paddr, size_t dump_mem_sz) | ||
| 297 | { | 296 | { |
| 298 | int err = -ENOMEM; | 297 | int err = -ENOMEM; |
| 299 | int i; | 298 | int i; |
| @@ -336,10 +335,9 @@ fail_prz: | |||
| 336 | return err; | 335 | return err; |
| 337 | } | 336 | } |
| 338 | 337 | ||
| 339 | static int __devinit ramoops_init_prz(struct device *dev, | 338 | static int ramoops_init_prz(struct device *dev, struct ramoops_context *cxt, |
| 340 | struct ramoops_context *cxt, | 339 | struct persistent_ram_zone **prz, |
| 341 | struct persistent_ram_zone **prz, | 340 | phys_addr_t *paddr, size_t sz, u32 sig) |
| 342 | phys_addr_t *paddr, size_t sz, u32 sig) | ||
| 343 | { | 341 | { |
| 344 | if (!sz) | 342 | if (!sz) |
| 345 | return 0; | 343 | return 0; |
| @@ -367,7 +365,7 @@ static int __devinit ramoops_init_prz(struct device *dev, | |||
| 367 | return 0; | 365 | return 0; |
| 368 | } | 366 | } |
| 369 | 367 | ||
| 370 | static int __devinit ramoops_probe(struct platform_device *pdev) | 368 | static int ramoops_probe(struct platform_device *pdev) |
| 371 | { | 369 | { |
| 372 | struct device *dev = &pdev->dev; | 370 | struct device *dev = &pdev->dev; |
| 373 | struct ramoops_platform_data *pdata = pdev->dev.platform_data; | 371 | struct ramoops_platform_data *pdata = pdev->dev.platform_data; |
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index eecd2a8a84dd..0306303be372 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c | |||
| @@ -390,8 +390,8 @@ static int persistent_ram_buffer_map(phys_addr_t start, phys_addr_t size, | |||
| 390 | return 0; | 390 | return 0; |
| 391 | } | 391 | } |
| 392 | 392 | ||
| 393 | static int __devinit persistent_ram_post_init(struct persistent_ram_zone *prz, | 393 | static int persistent_ram_post_init(struct persistent_ram_zone *prz, u32 sig, |
| 394 | u32 sig, int ecc_size) | 394 | int ecc_size) |
| 395 | { | 395 | { |
| 396 | int ret; | 396 | int ret; |
| 397 | 397 | ||
| @@ -443,9 +443,8 @@ void persistent_ram_free(struct persistent_ram_zone *prz) | |||
| 443 | kfree(prz); | 443 | kfree(prz); |
| 444 | } | 444 | } |
| 445 | 445 | ||
| 446 | struct persistent_ram_zone * __devinit persistent_ram_new(phys_addr_t start, | 446 | struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size, |
| 447 | size_t size, u32 sig, | 447 | u32 sig, int ecc_size) |
| 448 | int ecc_size) | ||
| 449 | { | 448 | { |
| 450 | struct persistent_ram_zone *prz; | 449 | struct persistent_ram_zone *prz; |
| 451 | int ret = -ENOMEM; | 450 | int ret = -ENOMEM; |
diff --git a/fs/seq_file.c b/fs/seq_file.c index 9d863fb501f9..f2bc3dfd0b88 100644 --- a/fs/seq_file.c +++ b/fs/seq_file.c | |||
| @@ -296,7 +296,7 @@ EXPORT_SYMBOL(seq_read); | |||
| 296 | * seq_lseek - ->llseek() method for sequential files. | 296 | * seq_lseek - ->llseek() method for sequential files. |
| 297 | * @file: the file in question | 297 | * @file: the file in question |
| 298 | * @offset: new position | 298 | * @offset: new position |
| 299 | * @origin: 0 for absolute, 1 for relative position | 299 | * @whence: 0 for absolute, 1 for relative position |
| 300 | * | 300 | * |
| 301 | * Ready-made ->f_op->llseek() | 301 | * Ready-made ->f_op->llseek() |
| 302 | */ | 302 | */ |
diff --git a/fs/splice.c b/fs/splice.c index 8890604e3fcd..6909d89d0da5 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
| @@ -696,8 +696,10 @@ static int pipe_to_sendpage(struct pipe_inode_info *pipe, | |||
| 696 | return -EINVAL; | 696 | return -EINVAL; |
| 697 | 697 | ||
| 698 | more = (sd->flags & SPLICE_F_MORE) ? MSG_MORE : 0; | 698 | more = (sd->flags & SPLICE_F_MORE) ? MSG_MORE : 0; |
| 699 | if (sd->len < sd->total_len) | 699 | |
| 700 | if (sd->len < sd->total_len && pipe->nrbufs > 1) | ||
| 700 | more |= MSG_SENDPAGE_NOTLAST; | 701 | more |= MSG_SENDPAGE_NOTLAST; |
| 702 | |||
| 701 | return file->f_op->sendpage(file, buf->page, buf->offset, | 703 | return file->f_op->sendpage(file, buf->page, buf->offset, |
| 702 | sd->len, &pos, more); | 704 | sd->len, &pos, more); |
| 703 | } | 705 | } |
diff --git a/fs/udf/super.c b/fs/udf/super.c index d44fb568abe1..e9be396a558d 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c | |||
| @@ -307,7 +307,8 @@ static void udf_sb_free_partitions(struct super_block *sb) | |||
| 307 | { | 307 | { |
| 308 | struct udf_sb_info *sbi = UDF_SB(sb); | 308 | struct udf_sb_info *sbi = UDF_SB(sb); |
| 309 | int i; | 309 | int i; |
| 310 | 310 | if (sbi->s_partmaps == NULL) | |
| 311 | return; | ||
| 311 | for (i = 0; i < sbi->s_partitions; i++) | 312 | for (i = 0; i < sbi->s_partitions; i++) |
| 312 | udf_free_partition(&sbi->s_partmaps[i]); | 313 | udf_free_partition(&sbi->s_partmaps[i]); |
| 313 | kfree(sbi->s_partmaps); | 314 | kfree(sbi->s_partmaps); |
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 26673a0b20e7..56d1614760cf 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c | |||
| @@ -175,7 +175,7 @@ xfs_buf_get_maps( | |||
| 175 | bp->b_map_count = map_count; | 175 | bp->b_map_count = map_count; |
| 176 | 176 | ||
| 177 | if (map_count == 1) { | 177 | if (map_count == 1) { |
| 178 | bp->b_maps = &bp->b_map; | 178 | bp->b_maps = &bp->__b_map; |
| 179 | return 0; | 179 | return 0; |
| 180 | } | 180 | } |
| 181 | 181 | ||
| @@ -193,7 +193,7 @@ static void | |||
| 193 | xfs_buf_free_maps( | 193 | xfs_buf_free_maps( |
| 194 | struct xfs_buf *bp) | 194 | struct xfs_buf *bp) |
| 195 | { | 195 | { |
| 196 | if (bp->b_maps != &bp->b_map) { | 196 | if (bp->b_maps != &bp->__b_map) { |
| 197 | kmem_free(bp->b_maps); | 197 | kmem_free(bp->b_maps); |
| 198 | bp->b_maps = NULL; | 198 | bp->b_maps = NULL; |
| 199 | } | 199 | } |
| @@ -377,8 +377,8 @@ xfs_buf_allocate_memory( | |||
| 377 | } | 377 | } |
| 378 | 378 | ||
| 379 | use_alloc_page: | 379 | use_alloc_page: |
| 380 | start = BBTOB(bp->b_map.bm_bn) >> PAGE_SHIFT; | 380 | start = BBTOB(bp->b_maps[0].bm_bn) >> PAGE_SHIFT; |
| 381 | end = (BBTOB(bp->b_map.bm_bn + bp->b_length) + PAGE_SIZE - 1) | 381 | end = (BBTOB(bp->b_maps[0].bm_bn + bp->b_length) + PAGE_SIZE - 1) |
| 382 | >> PAGE_SHIFT; | 382 | >> PAGE_SHIFT; |
| 383 | page_count = end - start; | 383 | page_count = end - start; |
| 384 | error = _xfs_buf_get_pages(bp, page_count, flags); | 384 | error = _xfs_buf_get_pages(bp, page_count, flags); |
| @@ -640,7 +640,7 @@ _xfs_buf_read( | |||
| 640 | xfs_buf_flags_t flags) | 640 | xfs_buf_flags_t flags) |
| 641 | { | 641 | { |
| 642 | ASSERT(!(flags & XBF_WRITE)); | 642 | ASSERT(!(flags & XBF_WRITE)); |
| 643 | ASSERT(bp->b_map.bm_bn != XFS_BUF_DADDR_NULL); | 643 | ASSERT(bp->b_maps[0].bm_bn != XFS_BUF_DADDR_NULL); |
| 644 | 644 | ||
| 645 | bp->b_flags &= ~(XBF_WRITE | XBF_ASYNC | XBF_READ_AHEAD); | 645 | bp->b_flags &= ~(XBF_WRITE | XBF_ASYNC | XBF_READ_AHEAD); |
| 646 | bp->b_flags |= flags & (XBF_READ | XBF_ASYNC | XBF_READ_AHEAD); | 646 | bp->b_flags |= flags & (XBF_READ | XBF_ASYNC | XBF_READ_AHEAD); |
| @@ -1709,7 +1709,7 @@ xfs_buf_cmp( | |||
| 1709 | struct xfs_buf *bp = container_of(b, struct xfs_buf, b_list); | 1709 | struct xfs_buf *bp = container_of(b, struct xfs_buf, b_list); |
| 1710 | xfs_daddr_t diff; | 1710 | xfs_daddr_t diff; |
| 1711 | 1711 | ||
| 1712 | diff = ap->b_map.bm_bn - bp->b_map.bm_bn; | 1712 | diff = ap->b_maps[0].bm_bn - bp->b_maps[0].bm_bn; |
| 1713 | if (diff < 0) | 1713 | if (diff < 0) |
| 1714 | return -1; | 1714 | return -1; |
| 1715 | if (diff > 0) | 1715 | if (diff > 0) |
diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h index 23f5642480bb..433a12ed7b17 100644 --- a/fs/xfs/xfs_buf.h +++ b/fs/xfs/xfs_buf.h | |||
| @@ -151,7 +151,7 @@ typedef struct xfs_buf { | |||
| 151 | struct page **b_pages; /* array of page pointers */ | 151 | struct page **b_pages; /* array of page pointers */ |
| 152 | struct page *b_page_array[XB_PAGES]; /* inline pages */ | 152 | struct page *b_page_array[XB_PAGES]; /* inline pages */ |
| 153 | struct xfs_buf_map *b_maps; /* compound buffer map */ | 153 | struct xfs_buf_map *b_maps; /* compound buffer map */ |
| 154 | struct xfs_buf_map b_map; /* inline compound buffer map */ | 154 | struct xfs_buf_map __b_map; /* inline compound buffer map */ |
| 155 | int b_map_count; | 155 | int b_map_count; |
| 156 | int b_io_length; /* IO size in BBs */ | 156 | int b_io_length; /* IO size in BBs */ |
| 157 | atomic_t b_pin_count; /* pin count */ | 157 | atomic_t b_pin_count; /* pin count */ |
| @@ -330,8 +330,8 @@ void xfs_buf_stale(struct xfs_buf *bp); | |||
| 330 | * In future, uncached buffers will pass the block number directly to the io | 330 | * In future, uncached buffers will pass the block number directly to the io |
| 331 | * request function and hence these macros will go away at that point. | 331 | * request function and hence these macros will go away at that point. |
| 332 | */ | 332 | */ |
| 333 | #define XFS_BUF_ADDR(bp) ((bp)->b_map.bm_bn) | 333 | #define XFS_BUF_ADDR(bp) ((bp)->b_maps[0].bm_bn) |
| 334 | #define XFS_BUF_SET_ADDR(bp, bno) ((bp)->b_map.bm_bn = (xfs_daddr_t)(bno)) | 334 | #define XFS_BUF_SET_ADDR(bp, bno) ((bp)->b_maps[0].bm_bn = (xfs_daddr_t)(bno)) |
| 335 | 335 | ||
| 336 | static inline void xfs_buf_set_ref(struct xfs_buf *bp, int lru_ref) | 336 | static inline void xfs_buf_set_ref(struct xfs_buf *bp, int lru_ref) |
| 337 | { | 337 | { |
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index becf4a97efc6..77b09750e92c 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c | |||
| @@ -71,7 +71,7 @@ xfs_buf_item_log_debug( | |||
| 71 | chunk_num = byte >> XFS_BLF_SHIFT; | 71 | chunk_num = byte >> XFS_BLF_SHIFT; |
| 72 | word_num = chunk_num >> BIT_TO_WORD_SHIFT; | 72 | word_num = chunk_num >> BIT_TO_WORD_SHIFT; |
| 73 | bit_num = chunk_num & (NBWORD - 1); | 73 | bit_num = chunk_num & (NBWORD - 1); |
| 74 | wordp = &(bip->bli_format.blf_data_map[word_num]); | 74 | wordp = &(bip->__bli_format.blf_data_map[word_num]); |
| 75 | bit_set = *wordp & (1 << bit_num); | 75 | bit_set = *wordp & (1 << bit_num); |
| 76 | ASSERT(bit_set); | 76 | ASSERT(bit_set); |
| 77 | byte++; | 77 | byte++; |
| @@ -237,7 +237,7 @@ xfs_buf_item_size( | |||
| 237 | * cancel flag in it. | 237 | * cancel flag in it. |
| 238 | */ | 238 | */ |
| 239 | trace_xfs_buf_item_size_stale(bip); | 239 | trace_xfs_buf_item_size_stale(bip); |
| 240 | ASSERT(bip->bli_format.blf_flags & XFS_BLF_CANCEL); | 240 | ASSERT(bip->__bli_format.blf_flags & XFS_BLF_CANCEL); |
| 241 | return bip->bli_format_count; | 241 | return bip->bli_format_count; |
| 242 | } | 242 | } |
| 243 | 243 | ||
| @@ -278,7 +278,7 @@ xfs_buf_item_format_segment( | |||
| 278 | uint buffer_offset; | 278 | uint buffer_offset; |
| 279 | 279 | ||
| 280 | /* copy the flags across from the base format item */ | 280 | /* copy the flags across from the base format item */ |
| 281 | blfp->blf_flags = bip->bli_format.blf_flags; | 281 | blfp->blf_flags = bip->__bli_format.blf_flags; |
| 282 | 282 | ||
| 283 | /* | 283 | /* |
| 284 | * Base size is the actual size of the ondisk structure - it reflects | 284 | * Base size is the actual size of the ondisk structure - it reflects |
| @@ -287,6 +287,17 @@ xfs_buf_item_format_segment( | |||
| 287 | */ | 287 | */ |
| 288 | base_size = offsetof(struct xfs_buf_log_format, blf_data_map) + | 288 | base_size = offsetof(struct xfs_buf_log_format, blf_data_map) + |
| 289 | (blfp->blf_map_size * sizeof(blfp->blf_data_map[0])); | 289 | (blfp->blf_map_size * sizeof(blfp->blf_data_map[0])); |
| 290 | |||
| 291 | nvecs = 0; | ||
| 292 | first_bit = xfs_next_bit(blfp->blf_data_map, blfp->blf_map_size, 0); | ||
| 293 | if (!(bip->bli_flags & XFS_BLI_STALE) && first_bit == -1) { | ||
| 294 | /* | ||
| 295 | * If the map is not be dirty in the transaction, mark | ||
| 296 | * the size as zero and do not advance the vector pointer. | ||
| 297 | */ | ||
| 298 | goto out; | ||
| 299 | } | ||
| 300 | |||
| 290 | vecp->i_addr = blfp; | 301 | vecp->i_addr = blfp; |
| 291 | vecp->i_len = base_size; | 302 | vecp->i_len = base_size; |
| 292 | vecp->i_type = XLOG_REG_TYPE_BFORMAT; | 303 | vecp->i_type = XLOG_REG_TYPE_BFORMAT; |
| @@ -301,15 +312,13 @@ xfs_buf_item_format_segment( | |||
| 301 | */ | 312 | */ |
| 302 | trace_xfs_buf_item_format_stale(bip); | 313 | trace_xfs_buf_item_format_stale(bip); |
| 303 | ASSERT(blfp->blf_flags & XFS_BLF_CANCEL); | 314 | ASSERT(blfp->blf_flags & XFS_BLF_CANCEL); |
| 304 | blfp->blf_size = nvecs; | 315 | goto out; |
| 305 | return vecp; | ||
| 306 | } | 316 | } |
| 307 | 317 | ||
| 308 | /* | 318 | /* |
| 309 | * Fill in an iovec for each set of contiguous chunks. | 319 | * Fill in an iovec for each set of contiguous chunks. |
| 310 | */ | 320 | */ |
| 311 | first_bit = xfs_next_bit(blfp->blf_data_map, blfp->blf_map_size, 0); | 321 | |
| 312 | ASSERT(first_bit != -1); | ||
| 313 | last_bit = first_bit; | 322 | last_bit = first_bit; |
| 314 | nbits = 1; | 323 | nbits = 1; |
| 315 | for (;;) { | 324 | for (;;) { |
| @@ -371,7 +380,8 @@ xfs_buf_item_format_segment( | |||
| 371 | nbits++; | 380 | nbits++; |
| 372 | } | 381 | } |
| 373 | } | 382 | } |
| 374 | bip->bli_format.blf_size = nvecs; | 383 | out: |
| 384 | blfp->blf_size = nvecs; | ||
| 375 | return vecp; | 385 | return vecp; |
| 376 | } | 386 | } |
| 377 | 387 | ||
| @@ -405,7 +415,7 @@ xfs_buf_item_format( | |||
| 405 | if (bip->bli_flags & XFS_BLI_INODE_BUF) { | 415 | if (bip->bli_flags & XFS_BLI_INODE_BUF) { |
| 406 | if (!((bip->bli_flags & XFS_BLI_INODE_ALLOC_BUF) && | 416 | if (!((bip->bli_flags & XFS_BLI_INODE_ALLOC_BUF) && |
| 407 | xfs_log_item_in_current_chkpt(lip))) | 417 | xfs_log_item_in_current_chkpt(lip))) |
| 408 | bip->bli_format.blf_flags |= XFS_BLF_INODE_BUF; | 418 | bip->__bli_format.blf_flags |= XFS_BLF_INODE_BUF; |
| 409 | bip->bli_flags &= ~XFS_BLI_INODE_BUF; | 419 | bip->bli_flags &= ~XFS_BLI_INODE_BUF; |
| 410 | } | 420 | } |
| 411 | 421 | ||
| @@ -485,7 +495,7 @@ xfs_buf_item_unpin( | |||
| 485 | ASSERT(bip->bli_flags & XFS_BLI_STALE); | 495 | ASSERT(bip->bli_flags & XFS_BLI_STALE); |
| 486 | ASSERT(xfs_buf_islocked(bp)); | 496 | ASSERT(xfs_buf_islocked(bp)); |
| 487 | ASSERT(XFS_BUF_ISSTALE(bp)); | 497 | ASSERT(XFS_BUF_ISSTALE(bp)); |
| 488 | ASSERT(bip->bli_format.blf_flags & XFS_BLF_CANCEL); | 498 | ASSERT(bip->__bli_format.blf_flags & XFS_BLF_CANCEL); |
| 489 | 499 | ||
| 490 | trace_xfs_buf_item_unpin_stale(bip); | 500 | trace_xfs_buf_item_unpin_stale(bip); |
| 491 | 501 | ||
| @@ -601,7 +611,7 @@ xfs_buf_item_unlock( | |||
| 601 | { | 611 | { |
| 602 | struct xfs_buf_log_item *bip = BUF_ITEM(lip); | 612 | struct xfs_buf_log_item *bip = BUF_ITEM(lip); |
| 603 | struct xfs_buf *bp = bip->bli_buf; | 613 | struct xfs_buf *bp = bip->bli_buf; |
| 604 | int aborted; | 614 | int aborted, clean, i; |
| 605 | uint hold; | 615 | uint hold; |
| 606 | 616 | ||
| 607 | /* Clear the buffer's association with this transaction. */ | 617 | /* Clear the buffer's association with this transaction. */ |
| @@ -631,7 +641,7 @@ xfs_buf_item_unlock( | |||
| 631 | */ | 641 | */ |
| 632 | if (bip->bli_flags & XFS_BLI_STALE) { | 642 | if (bip->bli_flags & XFS_BLI_STALE) { |
| 633 | trace_xfs_buf_item_unlock_stale(bip); | 643 | trace_xfs_buf_item_unlock_stale(bip); |
| 634 | ASSERT(bip->bli_format.blf_flags & XFS_BLF_CANCEL); | 644 | ASSERT(bip->__bli_format.blf_flags & XFS_BLF_CANCEL); |
| 635 | if (!aborted) { | 645 | if (!aborted) { |
| 636 | atomic_dec(&bip->bli_refcount); | 646 | atomic_dec(&bip->bli_refcount); |
| 637 | return; | 647 | return; |
| @@ -644,8 +654,15 @@ xfs_buf_item_unlock( | |||
| 644 | * If the buf item isn't tracking any data, free it, otherwise drop the | 654 | * If the buf item isn't tracking any data, free it, otherwise drop the |
| 645 | * reference we hold to it. | 655 | * reference we hold to it. |
| 646 | */ | 656 | */ |
| 647 | if (xfs_bitmap_empty(bip->bli_format.blf_data_map, | 657 | clean = 1; |
| 648 | bip->bli_format.blf_map_size)) | 658 | for (i = 0; i < bip->bli_format_count; i++) { |
| 659 | if (!xfs_bitmap_empty(bip->bli_formats[i].blf_data_map, | ||
| 660 | bip->bli_formats[i].blf_map_size)) { | ||
| 661 | clean = 0; | ||
| 662 | break; | ||
| 663 | } | ||
| 664 | } | ||
| 665 | if (clean) | ||
| 649 | xfs_buf_item_relse(bp); | 666 | xfs_buf_item_relse(bp); |
| 650 | else | 667 | else |
| 651 | atomic_dec(&bip->bli_refcount); | 668 | atomic_dec(&bip->bli_refcount); |
| @@ -716,7 +733,7 @@ xfs_buf_item_get_format( | |||
| 716 | bip->bli_format_count = count; | 733 | bip->bli_format_count = count; |
| 717 | 734 | ||
| 718 | if (count == 1) { | 735 | if (count == 1) { |
| 719 | bip->bli_formats = &bip->bli_format; | 736 | bip->bli_formats = &bip->__bli_format; |
| 720 | return 0; | 737 | return 0; |
| 721 | } | 738 | } |
| 722 | 739 | ||
| @@ -731,7 +748,7 @@ STATIC void | |||
| 731 | xfs_buf_item_free_format( | 748 | xfs_buf_item_free_format( |
| 732 | struct xfs_buf_log_item *bip) | 749 | struct xfs_buf_log_item *bip) |
| 733 | { | 750 | { |
| 734 | if (bip->bli_formats != &bip->bli_format) { | 751 | if (bip->bli_formats != &bip->__bli_format) { |
| 735 | kmem_free(bip->bli_formats); | 752 | kmem_free(bip->bli_formats); |
| 736 | bip->bli_formats = NULL; | 753 | bip->bli_formats = NULL; |
| 737 | } | 754 | } |
diff --git a/fs/xfs/xfs_buf_item.h b/fs/xfs/xfs_buf_item.h index 6850f49f4af3..16def435944a 100644 --- a/fs/xfs/xfs_buf_item.h +++ b/fs/xfs/xfs_buf_item.h | |||
| @@ -104,7 +104,7 @@ typedef struct xfs_buf_log_item { | |||
| 104 | #endif | 104 | #endif |
| 105 | int bli_format_count; /* count of headers */ | 105 | int bli_format_count; /* count of headers */ |
| 106 | struct xfs_buf_log_format *bli_formats; /* array of in-log header ptrs */ | 106 | struct xfs_buf_log_format *bli_formats; /* array of in-log header ptrs */ |
| 107 | struct xfs_buf_log_format bli_format; /* embedded in-log header */ | 107 | struct xfs_buf_log_format __bli_format; /* embedded in-log header */ |
| 108 | } xfs_buf_log_item_t; | 108 | } xfs_buf_log_item_t; |
| 109 | 109 | ||
| 110 | void xfs_buf_item_init(struct xfs_buf *, struct xfs_mount *); | 110 | void xfs_buf_item_init(struct xfs_buf *, struct xfs_mount *); |
diff --git a/fs/xfs/xfs_dir2_block.c b/fs/xfs/xfs_dir2_block.c index 7536faaa61e7..12afe07a91d7 100644 --- a/fs/xfs/xfs_dir2_block.c +++ b/fs/xfs/xfs_dir2_block.c | |||
| @@ -355,10 +355,12 @@ xfs_dir2_block_addname( | |||
| 355 | /* | 355 | /* |
| 356 | * If need to compact the leaf entries, do it now. | 356 | * If need to compact the leaf entries, do it now. |
| 357 | */ | 357 | */ |
| 358 | if (compact) | 358 | if (compact) { |
| 359 | xfs_dir2_block_compact(tp, bp, hdr, btp, blp, &needlog, | 359 | xfs_dir2_block_compact(tp, bp, hdr, btp, blp, &needlog, |
| 360 | &lfloghigh, &lfloglow); | 360 | &lfloghigh, &lfloglow); |
| 361 | else if (btp->stale) { | 361 | /* recalculate blp post-compaction */ |
| 362 | blp = xfs_dir2_block_leaf_p(btp); | ||
| 363 | } else if (btp->stale) { | ||
| 362 | /* | 364 | /* |
| 363 | * Set leaf logging boundaries to impossible state. | 365 | * Set leaf logging boundaries to impossible state. |
| 364 | * For the no-stale case they're set explicitly. | 366 | * For the no-stale case they're set explicitly. |
diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c index 5f53e75409b8..8a59f8546552 100644 --- a/fs/xfs/xfs_qm_syscalls.c +++ b/fs/xfs/xfs_qm_syscalls.c | |||
| @@ -784,11 +784,11 @@ xfs_qm_scall_getquota( | |||
| 784 | (XFS_IS_OQUOTA_ENFORCED(mp) && | 784 | (XFS_IS_OQUOTA_ENFORCED(mp) && |
| 785 | (dst->d_flags & (FS_PROJ_QUOTA | FS_GROUP_QUOTA)))) && | 785 | (dst->d_flags & (FS_PROJ_QUOTA | FS_GROUP_QUOTA)))) && |
| 786 | dst->d_id != 0) { | 786 | dst->d_id != 0) { |
| 787 | if (((int) dst->d_bcount > (int) dst->d_blk_softlimit) && | 787 | if ((dst->d_bcount > dst->d_blk_softlimit) && |
| 788 | (dst->d_blk_softlimit > 0)) { | 788 | (dst->d_blk_softlimit > 0)) { |
| 789 | ASSERT(dst->d_btimer != 0); | 789 | ASSERT(dst->d_btimer != 0); |
| 790 | } | 790 | } |
| 791 | if (((int) dst->d_icount > (int) dst->d_ino_softlimit) && | 791 | if ((dst->d_icount > dst->d_ino_softlimit) && |
| 792 | (dst->d_ino_softlimit > 0)) { | 792 | (dst->d_ino_softlimit > 0)) { |
| 793 | ASSERT(dst->d_itimer != 0); | 793 | ASSERT(dst->d_itimer != 0); |
| 794 | } | 794 | } |
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c index 4fc17d479d42..3edf5dbee001 100644 --- a/fs/xfs/xfs_trans_buf.c +++ b/fs/xfs/xfs_trans_buf.c | |||
| @@ -93,7 +93,7 @@ _xfs_trans_bjoin( | |||
| 93 | xfs_buf_item_init(bp, tp->t_mountp); | 93 | xfs_buf_item_init(bp, tp->t_mountp); |
| 94 | bip = bp->b_fspriv; | 94 | bip = bp->b_fspriv; |
| 95 | ASSERT(!(bip->bli_flags & XFS_BLI_STALE)); | 95 | ASSERT(!(bip->bli_flags & XFS_BLI_STALE)); |
| 96 | ASSERT(!(bip->bli_format.blf_flags & XFS_BLF_CANCEL)); | 96 | ASSERT(!(bip->__bli_format.blf_flags & XFS_BLF_CANCEL)); |
| 97 | ASSERT(!(bip->bli_flags & XFS_BLI_LOGGED)); | 97 | ASSERT(!(bip->bli_flags & XFS_BLI_LOGGED)); |
| 98 | if (reset_recur) | 98 | if (reset_recur) |
| 99 | bip->bli_recur = 0; | 99 | bip->bli_recur = 0; |
| @@ -432,7 +432,7 @@ xfs_trans_brelse(xfs_trans_t *tp, | |||
| 432 | bip = bp->b_fspriv; | 432 | bip = bp->b_fspriv; |
| 433 | ASSERT(bip->bli_item.li_type == XFS_LI_BUF); | 433 | ASSERT(bip->bli_item.li_type == XFS_LI_BUF); |
| 434 | ASSERT(!(bip->bli_flags & XFS_BLI_STALE)); | 434 | ASSERT(!(bip->bli_flags & XFS_BLI_STALE)); |
| 435 | ASSERT(!(bip->bli_format.blf_flags & XFS_BLF_CANCEL)); | 435 | ASSERT(!(bip->__bli_format.blf_flags & XFS_BLF_CANCEL)); |
| 436 | ASSERT(atomic_read(&bip->bli_refcount) > 0); | 436 | ASSERT(atomic_read(&bip->bli_refcount) > 0); |
| 437 | 437 | ||
| 438 | trace_xfs_trans_brelse(bip); | 438 | trace_xfs_trans_brelse(bip); |
| @@ -519,7 +519,7 @@ xfs_trans_bhold(xfs_trans_t *tp, | |||
| 519 | ASSERT(bp->b_transp == tp); | 519 | ASSERT(bp->b_transp == tp); |
| 520 | ASSERT(bip != NULL); | 520 | ASSERT(bip != NULL); |
| 521 | ASSERT(!(bip->bli_flags & XFS_BLI_STALE)); | 521 | ASSERT(!(bip->bli_flags & XFS_BLI_STALE)); |
| 522 | ASSERT(!(bip->bli_format.blf_flags & XFS_BLF_CANCEL)); | 522 | ASSERT(!(bip->__bli_format.blf_flags & XFS_BLF_CANCEL)); |
| 523 | ASSERT(atomic_read(&bip->bli_refcount) > 0); | 523 | ASSERT(atomic_read(&bip->bli_refcount) > 0); |
| 524 | 524 | ||
| 525 | bip->bli_flags |= XFS_BLI_HOLD; | 525 | bip->bli_flags |= XFS_BLI_HOLD; |
| @@ -539,7 +539,7 @@ xfs_trans_bhold_release(xfs_trans_t *tp, | |||
| 539 | ASSERT(bp->b_transp == tp); | 539 | ASSERT(bp->b_transp == tp); |
| 540 | ASSERT(bip != NULL); | 540 | ASSERT(bip != NULL); |
| 541 | ASSERT(!(bip->bli_flags & XFS_BLI_STALE)); | 541 | ASSERT(!(bip->bli_flags & XFS_BLI_STALE)); |
| 542 | ASSERT(!(bip->bli_format.blf_flags & XFS_BLF_CANCEL)); | 542 | ASSERT(!(bip->__bli_format.blf_flags & XFS_BLF_CANCEL)); |
| 543 | ASSERT(atomic_read(&bip->bli_refcount) > 0); | 543 | ASSERT(atomic_read(&bip->bli_refcount) > 0); |
| 544 | ASSERT(bip->bli_flags & XFS_BLI_HOLD); | 544 | ASSERT(bip->bli_flags & XFS_BLI_HOLD); |
| 545 | 545 | ||
| @@ -598,7 +598,7 @@ xfs_trans_log_buf(xfs_trans_t *tp, | |||
| 598 | bip->bli_flags &= ~XFS_BLI_STALE; | 598 | bip->bli_flags &= ~XFS_BLI_STALE; |
| 599 | ASSERT(XFS_BUF_ISSTALE(bp)); | 599 | ASSERT(XFS_BUF_ISSTALE(bp)); |
| 600 | XFS_BUF_UNSTALE(bp); | 600 | XFS_BUF_UNSTALE(bp); |
| 601 | bip->bli_format.blf_flags &= ~XFS_BLF_CANCEL; | 601 | bip->__bli_format.blf_flags &= ~XFS_BLF_CANCEL; |
| 602 | } | 602 | } |
| 603 | 603 | ||
| 604 | tp->t_flags |= XFS_TRANS_DIRTY; | 604 | tp->t_flags |= XFS_TRANS_DIRTY; |
| @@ -643,6 +643,7 @@ xfs_trans_binval( | |||
| 643 | xfs_buf_t *bp) | 643 | xfs_buf_t *bp) |
| 644 | { | 644 | { |
| 645 | xfs_buf_log_item_t *bip = bp->b_fspriv; | 645 | xfs_buf_log_item_t *bip = bp->b_fspriv; |
| 646 | int i; | ||
| 646 | 647 | ||
| 647 | ASSERT(bp->b_transp == tp); | 648 | ASSERT(bp->b_transp == tp); |
| 648 | ASSERT(bip != NULL); | 649 | ASSERT(bip != NULL); |
| @@ -657,8 +658,8 @@ xfs_trans_binval( | |||
| 657 | */ | 658 | */ |
| 658 | ASSERT(XFS_BUF_ISSTALE(bp)); | 659 | ASSERT(XFS_BUF_ISSTALE(bp)); |
| 659 | ASSERT(!(bip->bli_flags & (XFS_BLI_LOGGED | XFS_BLI_DIRTY))); | 660 | ASSERT(!(bip->bli_flags & (XFS_BLI_LOGGED | XFS_BLI_DIRTY))); |
| 660 | ASSERT(!(bip->bli_format.blf_flags & XFS_BLF_INODE_BUF)); | 661 | ASSERT(!(bip->__bli_format.blf_flags & XFS_BLF_INODE_BUF)); |
| 661 | ASSERT(bip->bli_format.blf_flags & XFS_BLF_CANCEL); | 662 | ASSERT(bip->__bli_format.blf_flags & XFS_BLF_CANCEL); |
| 662 | ASSERT(bip->bli_item.li_desc->lid_flags & XFS_LID_DIRTY); | 663 | ASSERT(bip->bli_item.li_desc->lid_flags & XFS_LID_DIRTY); |
| 663 | ASSERT(tp->t_flags & XFS_TRANS_DIRTY); | 664 | ASSERT(tp->t_flags & XFS_TRANS_DIRTY); |
| 664 | return; | 665 | return; |
| @@ -668,10 +669,12 @@ xfs_trans_binval( | |||
| 668 | 669 | ||
| 669 | bip->bli_flags |= XFS_BLI_STALE; | 670 | bip->bli_flags |= XFS_BLI_STALE; |
| 670 | bip->bli_flags &= ~(XFS_BLI_INODE_BUF | XFS_BLI_LOGGED | XFS_BLI_DIRTY); | 671 | bip->bli_flags &= ~(XFS_BLI_INODE_BUF | XFS_BLI_LOGGED | XFS_BLI_DIRTY); |
| 671 | bip->bli_format.blf_flags &= ~XFS_BLF_INODE_BUF; | 672 | bip->__bli_format.blf_flags &= ~XFS_BLF_INODE_BUF; |
| 672 | bip->bli_format.blf_flags |= XFS_BLF_CANCEL; | 673 | bip->__bli_format.blf_flags |= XFS_BLF_CANCEL; |
| 673 | memset((char *)(bip->bli_format.blf_data_map), 0, | 674 | for (i = 0; i < bip->bli_format_count; i++) { |
| 674 | (bip->bli_format.blf_map_size * sizeof(uint))); | 675 | memset(bip->bli_formats[i].blf_data_map, 0, |
| 676 | (bip->bli_formats[i].blf_map_size * sizeof(uint))); | ||
| 677 | } | ||
| 675 | bip->bli_item.li_desc->lid_flags |= XFS_LID_DIRTY; | 678 | bip->bli_item.li_desc->lid_flags |= XFS_LID_DIRTY; |
| 676 | tp->t_flags |= XFS_TRANS_DIRTY; | 679 | tp->t_flags |= XFS_TRANS_DIRTY; |
| 677 | } | 680 | } |
| @@ -775,5 +778,5 @@ xfs_trans_dquot_buf( | |||
| 775 | type == XFS_BLF_GDQUOT_BUF); | 778 | type == XFS_BLF_GDQUOT_BUF); |
| 776 | ASSERT(atomic_read(&bip->bli_refcount) > 0); | 779 | ASSERT(atomic_read(&bip->bli_refcount) > 0); |
| 777 | 780 | ||
| 778 | bip->bli_format.blf_flags |= type; | 781 | bip->__bli_format.blf_flags |= type; |
| 779 | } | 782 | } |
diff --git a/include/asm-generic/parport.h b/include/asm-generic/parport.h index 40528cb977e8..2c9f9d4336ca 100644 --- a/include/asm-generic/parport.h +++ b/include/asm-generic/parport.h | |||
| @@ -10,8 +10,8 @@ | |||
| 10 | * to devices on the PCI bus. | 10 | * to devices on the PCI bus. |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | static int __devinit parport_pc_find_isa_ports(int autoirq, int autodma); | 13 | static int parport_pc_find_isa_ports(int autoirq, int autodma); |
| 14 | static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma) | 14 | static int parport_pc_find_nonpci_ports(int autoirq, int autodma) |
| 15 | { | 15 | { |
| 16 | #ifdef CONFIG_ISA | 16 | #ifdef CONFIG_ISA |
| 17 | return parport_pc_find_isa_ports(autoirq, autodma); | 17 | return parport_pc_find_isa_ports(autoirq, autodma); |
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index ed6642ad03e0..25f01d0bc149 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h | |||
| @@ -78,6 +78,14 @@ struct mmu_gather_batch { | |||
| 78 | #define MAX_GATHER_BATCH \ | 78 | #define MAX_GATHER_BATCH \ |
| 79 | ((PAGE_SIZE - sizeof(struct mmu_gather_batch)) / sizeof(void *)) | 79 | ((PAGE_SIZE - sizeof(struct mmu_gather_batch)) / sizeof(void *)) |
| 80 | 80 | ||
| 81 | /* | ||
| 82 | * Limit the maximum number of mmu_gather batches to reduce a risk of soft | ||
| 83 | * lockups for non-preemptible kernels on huge machines when a lot of memory | ||
| 84 | * is zapped during unmapping. | ||
| 85 | * 10K pages freed at once should be safe even without a preemption point. | ||
| 86 | */ | ||
| 87 | #define MAX_GATHER_BATCH_COUNT (10000UL/MAX_GATHER_BATCH) | ||
| 88 | |||
| 81 | /* struct mmu_gather is an opaque type used by the mm code for passing around | 89 | /* struct mmu_gather is an opaque type used by the mm code for passing around |
| 82 | * any data needed by arch specific code for tlb_remove_page. | 90 | * any data needed by arch specific code for tlb_remove_page. |
| 83 | */ | 91 | */ |
| @@ -96,6 +104,7 @@ struct mmu_gather { | |||
| 96 | struct mmu_gather_batch *active; | 104 | struct mmu_gather_batch *active; |
| 97 | struct mmu_gather_batch local; | 105 | struct mmu_gather_batch local; |
| 98 | struct page *__pages[MMU_GATHER_BUNDLE]; | 106 | struct page *__pages[MMU_GATHER_BUNDLE]; |
| 107 | unsigned int batch_count; | ||
| 99 | }; | 108 | }; |
| 100 | 109 | ||
| 101 | #define HAVE_GENERIC_MMU_GATHER | 110 | #define HAVE_GENERIC_MMU_GATHER |
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index 0f4a366f6fa6..3527fb3f75bb 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h | |||
| @@ -70,7 +70,7 @@ struct drm_mm { | |||
| 70 | unsigned long scan_color; | 70 | unsigned long scan_color; |
| 71 | unsigned long scan_size; | 71 | unsigned long scan_size; |
| 72 | unsigned long scan_hit_start; | 72 | unsigned long scan_hit_start; |
| 73 | unsigned scan_hit_size; | 73 | unsigned long scan_hit_end; |
| 74 | unsigned scanned_blocks; | 74 | unsigned scanned_blocks; |
| 75 | unsigned long scan_start; | 75 | unsigned long scan_start; |
| 76 | unsigned long scan_end; | 76 | unsigned long scan_end; |
diff --git a/include/drm/exynos_drm.h b/include/drm/exynos_drm.h index 808dad29607a..d6aeaf3c6d6c 100644 --- a/include/drm/exynos_drm.h +++ b/include/drm/exynos_drm.h | |||
| @@ -6,24 +6,10 @@ | |||
| 6 | * Joonyoung Shim <jy0922.shim@samsung.com> | 6 | * Joonyoung Shim <jy0922.shim@samsung.com> |
| 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 8 | * | 8 | * |
| 9 | * Permission is hereby granted, free of charge, to any person obtaining a | 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * copy of this software and associated documentation files (the "Software"), | 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * to deal in the Software without restriction, including without limitation | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
| 12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 12 | * option) any later version. |
| 13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 14 | * Software is furnished to do so, subject to the following conditions: | ||
| 15 | * | ||
| 16 | * The above copyright notice and this permission notice (including the next | ||
| 17 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 18 | * Software. | ||
| 19 | * | ||
| 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 23 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 24 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 25 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 26 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 27 | */ | 13 | */ |
| 28 | #ifndef _EXYNOS_DRM_H_ | 14 | #ifndef _EXYNOS_DRM_H_ |
| 29 | #define _EXYNOS_DRM_H_ | 15 | #define _EXYNOS_DRM_H_ |
diff --git a/include/linux/ata_platform.h b/include/linux/ata_platform.h index fe9989636b62..b9fde17f767c 100644 --- a/include/linux/ata_platform.h +++ b/include/linux/ata_platform.h | |||
| @@ -15,12 +15,12 @@ struct pata_platform_info { | |||
| 15 | unsigned int irq_flags; | 15 | unsigned int irq_flags; |
| 16 | }; | 16 | }; |
| 17 | 17 | ||
| 18 | extern int __devinit __pata_platform_probe(struct device *dev, | 18 | extern int __pata_platform_probe(struct device *dev, |
| 19 | struct resource *io_res, | 19 | struct resource *io_res, |
| 20 | struct resource *ctl_res, | 20 | struct resource *ctl_res, |
| 21 | struct resource *irq_res, | 21 | struct resource *irq_res, |
| 22 | unsigned int ioport_shift, | 22 | unsigned int ioport_shift, |
| 23 | int __pio_mask); | 23 | int __pio_mask); |
| 24 | 24 | ||
| 25 | /* | 25 | /* |
| 26 | * Marvell SATA private data | 26 | * Marvell SATA private data |
diff --git a/include/linux/audit.h b/include/linux/audit.h index bce729afbcf9..5a6d718adf34 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #define _LINUX_AUDIT_H_ | 24 | #define _LINUX_AUDIT_H_ |
| 25 | 25 | ||
| 26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
| 27 | #include <linux/ptrace.h> | ||
| 27 | #include <uapi/linux/audit.h> | 28 | #include <uapi/linux/audit.h> |
| 28 | 29 | ||
| 29 | struct audit_sig_info { | 30 | struct audit_sig_info { |
| @@ -157,7 +158,8 @@ void audit_core_dumps(long signr); | |||
| 157 | 158 | ||
| 158 | static inline void audit_seccomp(unsigned long syscall, long signr, int code) | 159 | static inline void audit_seccomp(unsigned long syscall, long signr, int code) |
| 159 | { | 160 | { |
| 160 | if (unlikely(!audit_dummy_context())) | 161 | /* Force a record to be reported if a signal was delivered. */ |
| 162 | if (signr || unlikely(!audit_dummy_context())) | ||
| 161 | __audit_seccomp(syscall, signr, code); | 163 | __audit_seccomp(syscall, signr, code); |
| 162 | } | 164 | } |
| 163 | 165 | ||
diff --git a/include/linux/bcma/bcma_driver_gmac_cmn.h b/include/linux/bcma/bcma_driver_gmac_cmn.h index def894b83b0d..4dd1f33e36a2 100644 --- a/include/linux/bcma/bcma_driver_gmac_cmn.h +++ b/include/linux/bcma/bcma_driver_gmac_cmn.h | |||
| @@ -92,7 +92,7 @@ struct bcma_drv_gmac_cmn { | |||
| 92 | #define gmac_cmn_write32(gc, offset, val) bcma_write32((gc)->core, offset, val) | 92 | #define gmac_cmn_write32(gc, offset, val) bcma_write32((gc)->core, offset, val) |
| 93 | 93 | ||
| 94 | #ifdef CONFIG_BCMA_DRIVER_GMAC_CMN | 94 | #ifdef CONFIG_BCMA_DRIVER_GMAC_CMN |
| 95 | extern void __devinit bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc); | 95 | extern void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc); |
| 96 | #else | 96 | #else |
| 97 | static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) { } | 97 | static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) { } |
| 98 | #endif | 98 | #endif |
diff --git a/include/linux/bcma/bcma_driver_pci.h b/include/linux/bcma/bcma_driver_pci.h index 41da581e1612..c48d98d27b77 100644 --- a/include/linux/bcma/bcma_driver_pci.h +++ b/include/linux/bcma/bcma_driver_pci.h | |||
| @@ -214,7 +214,7 @@ struct bcma_drv_pci { | |||
| 214 | #define pcicore_write16(pc, offset, val) bcma_write16((pc)->core, offset, val) | 214 | #define pcicore_write16(pc, offset, val) bcma_write16((pc)->core, offset, val) |
| 215 | #define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val) | 215 | #define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val) |
| 216 | 216 | ||
| 217 | extern void __devinit bcma_core_pci_init(struct bcma_drv_pci *pc); | 217 | extern void bcma_core_pci_init(struct bcma_drv_pci *pc); |
| 218 | extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, | 218 | extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, |
| 219 | struct bcma_device *core, bool enable); | 219 | struct bcma_device *core, bool enable); |
| 220 | extern void bcma_core_pci_extend_L1timer(struct bcma_drv_pci *pc, bool extend); | 220 | extern void bcma_core_pci_extend_L1timer(struct bcma_drv_pci *pc, bool extend); |
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index 6ecb6dc2f303..cc7bddeaf553 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h | |||
| @@ -22,7 +22,7 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write, | |||
| 22 | extern int fragmentation_index(struct zone *zone, unsigned int order); | 22 | extern int fragmentation_index(struct zone *zone, unsigned int order); |
| 23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, | 23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, |
| 24 | int order, gfp_t gfp_mask, nodemask_t *mask, | 24 | int order, gfp_t gfp_mask, nodemask_t *mask, |
| 25 | bool sync, bool *contended, struct page **page); | 25 | bool sync, bool *contended); |
| 26 | extern int compact_pgdat(pg_data_t *pgdat, int order); | 26 | extern int compact_pgdat(pg_data_t *pgdat, int order); |
| 27 | extern void reset_isolation_suitable(pg_data_t *pgdat); | 27 | extern void reset_isolation_suitable(pg_data_t *pgdat); |
| 28 | extern unsigned long compaction_suitable(struct zone *zone, int order); | 28 | extern unsigned long compaction_suitable(struct zone *zone, int order); |
| @@ -75,7 +75,7 @@ static inline bool compaction_restarting(struct zone *zone, int order) | |||
| 75 | #else | 75 | #else |
| 76 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, | 76 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, |
| 77 | int order, gfp_t gfp_mask, nodemask_t *nodemask, | 77 | int order, gfp_t gfp_mask, nodemask_t *nodemask, |
| 78 | bool sync, bool *contended, struct page **page) | 78 | bool sync, bool *contended) |
| 79 | { | 79 | { |
| 80 | return COMPACT_CONTINUE; | 80 | return COMPACT_CONTINUE; |
| 81 | } | 81 | } |
diff --git a/include/linux/cpu_rmap.h b/include/linux/cpu_rmap.h index ac3bbb5b9502..1739510d8994 100644 --- a/include/linux/cpu_rmap.h +++ b/include/linux/cpu_rmap.h | |||
| @@ -13,9 +13,11 @@ | |||
| 13 | #include <linux/cpumask.h> | 13 | #include <linux/cpumask.h> |
| 14 | #include <linux/gfp.h> | 14 | #include <linux/gfp.h> |
| 15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
| 16 | #include <linux/kref.h> | ||
| 16 | 17 | ||
| 17 | /** | 18 | /** |
| 18 | * struct cpu_rmap - CPU affinity reverse-map | 19 | * struct cpu_rmap - CPU affinity reverse-map |
| 20 | * @refcount: kref for object | ||
| 19 | * @size: Number of objects to be reverse-mapped | 21 | * @size: Number of objects to be reverse-mapped |
| 20 | * @used: Number of objects added | 22 | * @used: Number of objects added |
| 21 | * @obj: Pointer to array of object pointers | 23 | * @obj: Pointer to array of object pointers |
| @@ -23,6 +25,7 @@ | |||
| 23 | * based on affinity masks | 25 | * based on affinity masks |
| 24 | */ | 26 | */ |
| 25 | struct cpu_rmap { | 27 | struct cpu_rmap { |
| 28 | struct kref refcount; | ||
| 26 | u16 size, used; | 29 | u16 size, used; |
| 27 | void **obj; | 30 | void **obj; |
| 28 | struct { | 31 | struct { |
| @@ -33,15 +36,7 @@ struct cpu_rmap { | |||
| 33 | #define CPU_RMAP_DIST_INF 0xffff | 36 | #define CPU_RMAP_DIST_INF 0xffff |
| 34 | 37 | ||
| 35 | extern struct cpu_rmap *alloc_cpu_rmap(unsigned int size, gfp_t flags); | 38 | extern struct cpu_rmap *alloc_cpu_rmap(unsigned int size, gfp_t flags); |
| 36 | 39 | extern int cpu_rmap_put(struct cpu_rmap *rmap); | |
| 37 | /** | ||
| 38 | * free_cpu_rmap - free CPU affinity reverse-map | ||
| 39 | * @rmap: Reverse-map allocated with alloc_cpu_rmap(), or %NULL | ||
| 40 | */ | ||
| 41 | static inline void free_cpu_rmap(struct cpu_rmap *rmap) | ||
| 42 | { | ||
| 43 | kfree(rmap); | ||
| 44 | } | ||
| 45 | 40 | ||
| 46 | extern int cpu_rmap_add(struct cpu_rmap *rmap, void *obj); | 41 | extern int cpu_rmap_add(struct cpu_rmap *rmap, void *obj); |
| 47 | extern int cpu_rmap_update(struct cpu_rmap *rmap, u16 index, | 42 | extern int cpu_rmap_update(struct cpu_rmap *rmap, u16 index, |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 3711b34dc4f9..24cd1037b6d6 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
| @@ -126,9 +126,9 @@ struct cpuidle_driver { | |||
| 126 | struct module *owner; | 126 | struct module *owner; |
| 127 | int refcnt; | 127 | int refcnt; |
| 128 | 128 | ||
| 129 | unsigned int power_specified:1; | ||
| 130 | /* set to 1 to use the core cpuidle time keeping (for all states). */ | 129 | /* set to 1 to use the core cpuidle time keeping (for all states). */ |
| 131 | unsigned int en_core_tk_irqen:1; | 130 | unsigned int en_core_tk_irqen:1; |
| 131 | /* states array must be ordered in decreasing power consumption */ | ||
| 132 | struct cpuidle_state states[CPUIDLE_STATE_MAX]; | 132 | struct cpuidle_state states[CPUIDLE_STATE_MAX]; |
| 133 | int state_count; | 133 | int state_count; |
| 134 | int safe_state_index; | 134 | int safe_state_index; |
diff --git a/include/linux/cred.h b/include/linux/cred.h index abb2cd50f6b2..04421e825365 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
| @@ -128,7 +128,6 @@ struct cred { | |||
| 128 | struct key *process_keyring; /* keyring private to this process */ | 128 | struct key *process_keyring; /* keyring private to this process */ |
| 129 | struct key *thread_keyring; /* keyring private to this thread */ | 129 | struct key *thread_keyring; /* keyring private to this thread */ |
| 130 | struct key *request_key_auth; /* assumed request_key authority */ | 130 | struct key *request_key_auth; /* assumed request_key authority */ |
| 131 | struct thread_group_cred *tgcred; /* thread-group shared credentials */ | ||
| 132 | #endif | 131 | #endif |
| 133 | #ifdef CONFIG_SECURITY | 132 | #ifdef CONFIG_SECURITY |
| 134 | void *security; /* subjective LSM security */ | 133 | void *security; /* subjective LSM security */ |
diff --git a/include/linux/init.h b/include/linux/init.h index a799273714ac..10ed4f436458 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
| @@ -93,14 +93,6 @@ | |||
| 93 | 93 | ||
| 94 | #define __exit __section(.exit.text) __exitused __cold notrace | 94 | #define __exit __section(.exit.text) __exitused __cold notrace |
| 95 | 95 | ||
| 96 | /* Used for HOTPLUG, but that is always enabled now, so just make them noops */ | ||
| 97 | #define __devinit | ||
| 98 | #define __devinitdata | ||
| 99 | #define __devinitconst | ||
| 100 | #define __devexit | ||
| 101 | #define __devexitdata | ||
| 102 | #define __devexitconst | ||
| 103 | |||
| 104 | /* Used for HOTPLUG_CPU */ | 96 | /* Used for HOTPLUG_CPU */ |
| 105 | #define __cpuinit __section(.cpuinit.text) __cold notrace | 97 | #define __cpuinit __section(.cpuinit.text) __cold notrace |
| 106 | #define __cpuinitdata __section(.cpuinit.data) | 98 | #define __cpuinitdata __section(.cpuinit.data) |
| @@ -337,18 +329,6 @@ void __init parse_early_options(char *cmdline); | |||
| 337 | #define __INITRODATA_OR_MODULE __INITRODATA | 329 | #define __INITRODATA_OR_MODULE __INITRODATA |
| 338 | #endif /*CONFIG_MODULES*/ | 330 | #endif /*CONFIG_MODULES*/ |
| 339 | 331 | ||
| 340 | /* Functions marked as __devexit may be discarded at kernel link time, depending | ||
| 341 | on config options. Newer versions of binutils detect references from | ||
| 342 | retained sections to discarded sections and flag an error. Pointers to | ||
| 343 | __devexit functions must use __devexit_p(function_name), the wrapper will | ||
| 344 | insert either the function_name or NULL, depending on the config options. | ||
| 345 | */ | ||
| 346 | #if defined(MODULE) || defined(CONFIG_HOTPLUG) | ||
| 347 | #define __devexit_p(x) x | ||
| 348 | #else | ||
| 349 | #define __devexit_p(x) NULL | ||
| 350 | #endif | ||
| 351 | |||
| 352 | #ifdef MODULE | 332 | #ifdef MODULE |
| 353 | #define __exit_p(x) x | 333 | #define __exit_p(x) x |
| 354 | #else | 334 | #else |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 5e4e6170f43a..5fa5afeeb759 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -268,11 +268,6 @@ struct irq_affinity_notify { | |||
| 268 | extern int | 268 | extern int |
| 269 | irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify); | 269 | irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify); |
| 270 | 270 | ||
| 271 | static inline void irq_run_affinity_notifiers(void) | ||
| 272 | { | ||
| 273 | flush_scheduled_work(); | ||
| 274 | } | ||
| 275 | |||
| 276 | #else /* CONFIG_SMP */ | 271 | #else /* CONFIG_SMP */ |
| 277 | 272 | ||
| 278 | static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m) | 273 | static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m) |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index fe771978e877..ae221a7b5092 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
| @@ -24,6 +24,7 @@ struct ipc_ids { | |||
| 24 | unsigned short seq_max; | 24 | unsigned short seq_max; |
| 25 | struct rw_semaphore rw_mutex; | 25 | struct rw_semaphore rw_mutex; |
| 26 | struct idr ipcs_idr; | 26 | struct idr ipcs_idr; |
| 27 | int next_id; | ||
| 27 | }; | 28 | }; |
| 28 | 29 | ||
| 29 | struct ipc_namespace { | 30 | struct ipc_namespace { |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 00e46376e28f..2bca44b0893c 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
| @@ -524,14 +524,17 @@ static inline void print_irqtrace_events(struct task_struct *curr) | |||
| 524 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 524 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
| 525 | # ifdef CONFIG_PROVE_LOCKING | 525 | # ifdef CONFIG_PROVE_LOCKING |
| 526 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) | 526 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) |
| 527 | # define rwsem_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 2, n, i) | ||
| 527 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, NULL, i) | 528 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, NULL, i) |
| 528 | # else | 529 | # else |
| 529 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) | 530 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) |
| 531 | # define rwsem_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, n, i) | ||
| 530 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, NULL, i) | 532 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, NULL, i) |
| 531 | # endif | 533 | # endif |
| 532 | # define rwsem_release(l, n, i) lock_release(l, n, i) | 534 | # define rwsem_release(l, n, i) lock_release(l, n, i) |
| 533 | #else | 535 | #else |
| 534 | # define rwsem_acquire(l, s, t, i) do { } while (0) | 536 | # define rwsem_acquire(l, s, t, i) do { } while (0) |
| 537 | # define rwsem_acquire_nest(l, s, t, n, i) do { } while (0) | ||
| 535 | # define rwsem_acquire_read(l, s, t, i) do { } while (0) | 538 | # define rwsem_acquire_read(l, s, t, i) do { } while (0) |
| 536 | # define rwsem_release(l, n, i) do { } while (0) | 539 | # define rwsem_release(l, n, i) do { } while (0) |
| 537 | #endif | 540 | #endif |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 63204078f72b..66e2f7c61e5c 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -455,7 +455,6 @@ void put_pages_list(struct list_head *pages); | |||
| 455 | 455 | ||
| 456 | void split_page(struct page *page, unsigned int order); | 456 | void split_page(struct page *page, unsigned int order); |
| 457 | int split_free_page(struct page *page); | 457 | int split_free_page(struct page *page); |
| 458 | int capture_free_page(struct page *page, int alloc_order, int migratetype); | ||
| 459 | 458 | ||
| 460 | /* | 459 | /* |
| 461 | * Compound pages have a destructor function. Provide a | 460 | * Compound pages have a destructor function. Provide a |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 4bec5be82cab..73b64a38b984 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -503,14 +503,6 @@ struct zone { | |||
| 503 | * rarely used fields: | 503 | * rarely used fields: |
| 504 | */ | 504 | */ |
| 505 | const char *name; | 505 | const char *name; |
| 506 | #ifdef CONFIG_MEMORY_ISOLATION | ||
| 507 | /* | ||
| 508 | * the number of MIGRATE_ISOLATE *pageblock*. | ||
| 509 | * We need this for free page counting. Look at zone_watermark_ok_safe. | ||
| 510 | * It's protected by zone->lock | ||
| 511 | */ | ||
| 512 | int nr_pageblock_isolate; | ||
| 513 | #endif | ||
| 514 | } ____cacheline_internodealigned_in_smp; | 506 | } ____cacheline_internodealigned_in_smp; |
| 515 | 507 | ||
| 516 | typedef enum { | 508 | typedef enum { |
diff --git a/include/linux/msg.h b/include/linux/msg.h index 7a4b9e97d29a..391af8d11cce 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h | |||
| @@ -34,7 +34,9 @@ struct msg_queue { | |||
| 34 | /* Helper routines for sys_msgsnd and sys_msgrcv */ | 34 | /* Helper routines for sys_msgsnd and sys_msgrcv */ |
| 35 | extern long do_msgsnd(int msqid, long mtype, void __user *mtext, | 35 | extern long do_msgsnd(int msqid, long mtype, void __user *mtext, |
| 36 | size_t msgsz, int msgflg); | 36 | size_t msgsz, int msgflg); |
| 37 | extern long do_msgrcv(int msqid, long *pmtype, void __user *mtext, | 37 | extern long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, |
| 38 | size_t msgsz, long msgtyp, int msgflg); | 38 | int msgflg, |
| 39 | long (*msg_fill)(void __user *, struct msg_msg *, | ||
| 40 | size_t)); | ||
| 39 | 41 | ||
| 40 | #endif /* _LINUX_MSG_H */ | 42 | #endif /* _LINUX_MSG_H */ |
diff --git a/include/linux/namei.h b/include/linux/namei.h index e998c030061d..5a5ff57ceed4 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _LINUX_NAMEI_H | 2 | #define _LINUX_NAMEI_H |
| 3 | 3 | ||
| 4 | #include <linux/dcache.h> | 4 | #include <linux/dcache.h> |
| 5 | #include <linux/errno.h> | ||
| 5 | #include <linux/linkage.h> | 6 | #include <linux/linkage.h> |
| 6 | #include <linux/path.h> | 7 | #include <linux/path.h> |
| 7 | 8 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c599e4782d45..9ef07d0868b6 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -60,6 +60,9 @@ struct wireless_dev; | |||
| 60 | #define SET_ETHTOOL_OPS(netdev,ops) \ | 60 | #define SET_ETHTOOL_OPS(netdev,ops) \ |
| 61 | ( (netdev)->ethtool_ops = (ops) ) | 61 | ( (netdev)->ethtool_ops = (ops) ) |
| 62 | 62 | ||
| 63 | extern void netdev_set_default_ethtool_ops(struct net_device *dev, | ||
| 64 | const struct ethtool_ops *ops); | ||
| 65 | |||
| 63 | /* hardware address assignment types */ | 66 | /* hardware address assignment types */ |
| 64 | #define NET_ADDR_PERM 0 /* address is permanent (default) */ | 67 | #define NET_ADDR_PERM 0 /* address is permanent (default) */ |
| 65 | #define NET_ADDR_RANDOM 1 /* address is generated randomly */ | 68 | #define NET_ADDR_RANDOM 1 /* address is generated randomly */ |
diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h index 098d2a838296..cb6ab5feab67 100644 --- a/include/linux/pstore_ram.h +++ b/include/linux/pstore_ram.h | |||
| @@ -46,9 +46,8 @@ struct persistent_ram_zone { | |||
| 46 | size_t old_log_size; | 46 | size_t old_log_size; |
| 47 | }; | 47 | }; |
| 48 | 48 | ||
| 49 | struct persistent_ram_zone * __devinit persistent_ram_new(phys_addr_t start, | 49 | struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size, |
| 50 | size_t size, u32 sig, | 50 | u32 sig, int ecc_size); |
| 51 | int ecc_size); | ||
| 52 | void persistent_ram_free(struct persistent_ram_zone *prz); | 51 | void persistent_ram_free(struct persistent_ram_zone *prz); |
| 53 | void persistent_ram_zap(struct persistent_ram_zone *prz); | 52 | void persistent_ram_zap(struct persistent_ram_zone *prz); |
| 54 | 53 | ||
diff --git a/include/linux/rbtree_augmented.h b/include/linux/rbtree_augmented.h index 2ac60c9cf644..fea49b5da12a 100644 --- a/include/linux/rbtree_augmented.h +++ b/include/linux/rbtree_augmented.h | |||
| @@ -123,9 +123,9 @@ __rb_change_child(struct rb_node *old, struct rb_node *new, | |||
| 123 | extern void __rb_erase_color(struct rb_node *parent, struct rb_root *root, | 123 | extern void __rb_erase_color(struct rb_node *parent, struct rb_root *root, |
| 124 | void (*augment_rotate)(struct rb_node *old, struct rb_node *new)); | 124 | void (*augment_rotate)(struct rb_node *old, struct rb_node *new)); |
| 125 | 125 | ||
| 126 | static __always_inline void | 126 | static __always_inline struct rb_node * |
| 127 | rb_erase_augmented(struct rb_node *node, struct rb_root *root, | 127 | __rb_erase_augmented(struct rb_node *node, struct rb_root *root, |
| 128 | const struct rb_augment_callbacks *augment) | 128 | const struct rb_augment_callbacks *augment) |
| 129 | { | 129 | { |
| 130 | struct rb_node *child = node->rb_right, *tmp = node->rb_left; | 130 | struct rb_node *child = node->rb_right, *tmp = node->rb_left; |
| 131 | struct rb_node *parent, *rebalance; | 131 | struct rb_node *parent, *rebalance; |
| @@ -217,6 +217,14 @@ rb_erase_augmented(struct rb_node *node, struct rb_root *root, | |||
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | augment->propagate(tmp, NULL); | 219 | augment->propagate(tmp, NULL); |
| 220 | return rebalance; | ||
| 221 | } | ||
| 222 | |||
| 223 | static __always_inline void | ||
| 224 | rb_erase_augmented(struct rb_node *node, struct rb_root *root, | ||
| 225 | const struct rb_augment_callbacks *augment) | ||
| 226 | { | ||
| 227 | struct rb_node *rebalance = __rb_erase_augmented(node, root, augment); | ||
| 220 | if (rebalance) | 228 | if (rebalance) |
| 221 | __rb_erase_color(rebalance, root, augment->rotate); | 229 | __rb_erase_color(rebalance, root, augment->rotate); |
| 222 | } | 230 | } |
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index 54bd7cd7ecbd..8da67d625e13 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h | |||
| @@ -125,8 +125,17 @@ extern void downgrade_write(struct rw_semaphore *sem); | |||
| 125 | */ | 125 | */ |
| 126 | extern void down_read_nested(struct rw_semaphore *sem, int subclass); | 126 | extern void down_read_nested(struct rw_semaphore *sem, int subclass); |
| 127 | extern void down_write_nested(struct rw_semaphore *sem, int subclass); | 127 | extern void down_write_nested(struct rw_semaphore *sem, int subclass); |
| 128 | extern void _down_write_nest_lock(struct rw_semaphore *sem, struct lockdep_map *nest_lock); | ||
| 129 | |||
| 130 | # define down_write_nest_lock(sem, nest_lock) \ | ||
| 131 | do { \ | ||
| 132 | typecheck(struct lockdep_map *, &(nest_lock)->dep_map); \ | ||
| 133 | _down_write_nest_lock(sem, &(nest_lock)->dep_map); \ | ||
| 134 | } while (0); | ||
| 135 | |||
| 128 | #else | 136 | #else |
| 129 | # define down_read_nested(sem, subclass) down_read(sem) | 137 | # define down_read_nested(sem, subclass) down_read(sem) |
| 138 | # define down_write_nest_lock(sem, nest_lock) down_write(sem) | ||
| 130 | # define down_write_nested(sem, subclass) down_write(sem) | 139 | # define down_write_nested(sem, subclass) down_write(sem) |
| 131 | #endif | 140 | #endif |
| 132 | 141 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 206bb089c06b..6fc8f45de4e9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1810,6 +1810,7 @@ extern void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut, | |||
| 1810 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ | 1810 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ |
| 1811 | #define PF_NPROC_EXCEEDED 0x00001000 /* set_user noticed that RLIMIT_NPROC was exceeded */ | 1811 | #define PF_NPROC_EXCEEDED 0x00001000 /* set_user noticed that RLIMIT_NPROC was exceeded */ |
| 1812 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ | 1812 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ |
| 1813 | #define PF_USED_ASYNC 0x00004000 /* used async_schedule*(), used by module init */ | ||
| 1813 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ | 1814 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ |
| 1814 | #define PF_FROZEN 0x00010000 /* frozen for system suspend */ | 1815 | #define PF_FROZEN 0x00010000 /* frozen for system suspend */ |
| 1815 | #define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ | 1816 | #define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ |
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h index a1d83cc8bf85..923cb20051ed 100644 --- a/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h | |||
| @@ -71,6 +71,7 @@ struct netns_ct { | |||
| 71 | struct hlist_head *expect_hash; | 71 | struct hlist_head *expect_hash; |
| 72 | struct hlist_nulls_head unconfirmed; | 72 | struct hlist_nulls_head unconfirmed; |
| 73 | struct hlist_nulls_head dying; | 73 | struct hlist_nulls_head dying; |
| 74 | struct hlist_nulls_head tmpl; | ||
| 74 | struct ip_conntrack_stat __percpu *stat; | 75 | struct ip_conntrack_stat __percpu *stat; |
| 75 | struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb; | 76 | struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb; |
| 76 | struct nf_exp_event_notifier __rcu *nf_expect_event_cb; | 77 | struct nf_exp_event_notifier __rcu *nf_expect_event_cb; |
diff --git a/include/net/netns/x_tables.h b/include/net/netns/x_tables.h index 591db7d657a3..c24060ee411e 100644 --- a/include/net/netns/x_tables.h +++ b/include/net/netns/x_tables.h | |||
| @@ -8,6 +8,7 @@ struct ebt_table; | |||
| 8 | 8 | ||
| 9 | struct netns_xt { | 9 | struct netns_xt { |
| 10 | struct list_head tables[NFPROTO_NUMPROTO]; | 10 | struct list_head tables[NFPROTO_NUMPROTO]; |
| 11 | bool notrack_deprecated_warning; | ||
| 11 | #if defined(CONFIG_BRIDGE_NF_EBTABLES) || \ | 12 | #if defined(CONFIG_BRIDGE_NF_EBTABLES) || \ |
| 12 | defined(CONFIG_BRIDGE_NF_EBTABLES_MODULE) | 13 | defined(CONFIG_BRIDGE_NF_EBTABLES_MODULE) |
| 13 | struct ebt_table *broute_table; | 14 | struct ebt_table *broute_table; |
diff --git a/include/sound/cs4271.h b/include/sound/cs4271.h index 6d9e15ed1dcf..dd8c48d14ed9 100644 --- a/include/sound/cs4271.h +++ b/include/sound/cs4271.h | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | 19 | ||
| 20 | struct cs4271_platform_data { | 20 | struct cs4271_platform_data { |
| 21 | int gpio_nreset; /* GPIO driving Reset pin, if any */ | 21 | int gpio_nreset; /* GPIO driving Reset pin, if any */ |
| 22 | int amutec_eq_bmutec:1; /* flag to enable AMUTEC=BMUTEC */ | 22 | bool amutec_eq_bmutec; /* flag to enable AMUTEC=BMUTEC */ |
| 23 | }; | 23 | }; |
| 24 | 24 | ||
| 25 | #endif /* __CS4271_H */ | 25 | #endif /* __CS4271_H */ |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 769e27c774a3..bc56738cb109 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
| @@ -58,8 +58,9 @@ | |||
| 58 | .info = snd_soc_info_volsw_range, .get = snd_soc_get_volsw_range, \ | 58 | .info = snd_soc_info_volsw_range, .get = snd_soc_get_volsw_range, \ |
| 59 | .put = snd_soc_put_volsw_range, \ | 59 | .put = snd_soc_put_volsw_range, \ |
| 60 | .private_value = (unsigned long)&(struct soc_mixer_control) \ | 60 | .private_value = (unsigned long)&(struct soc_mixer_control) \ |
| 61 | {.reg = xreg, .shift = xshift, .min = xmin,\ | 61 | {.reg = xreg, .rreg = xreg, .shift = xshift, \ |
| 62 | .max = xmax, .platform_max = xmax, .invert = xinvert} } | 62 | .rshift = xshift, .min = xmin, .max = xmax, \ |
| 63 | .platform_max = xmax, .invert = xinvert} } | ||
| 63 | #define SOC_SINGLE_TLV(xname, reg, shift, max, invert, tlv_array) \ | 64 | #define SOC_SINGLE_TLV(xname, reg, shift, max, invert, tlv_array) \ |
| 64 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 65 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
| 65 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ | 66 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ |
| @@ -88,8 +89,9 @@ | |||
| 88 | .info = snd_soc_info_volsw_range, \ | 89 | .info = snd_soc_info_volsw_range, \ |
| 89 | .get = snd_soc_get_volsw_range, .put = snd_soc_put_volsw_range, \ | 90 | .get = snd_soc_get_volsw_range, .put = snd_soc_put_volsw_range, \ |
| 90 | .private_value = (unsigned long)&(struct soc_mixer_control) \ | 91 | .private_value = (unsigned long)&(struct soc_mixer_control) \ |
| 91 | {.reg = xreg, .shift = xshift, .min = xmin,\ | 92 | {.reg = xreg, .rreg = xreg, .shift = xshift, \ |
| 92 | .max = xmax, .platform_max = xmax, .invert = xinvert} } | 93 | .rshift = xshift, .min = xmin, .max = xmax, \ |
| 94 | .platform_max = xmax, .invert = xinvert} } | ||
| 93 | #define SOC_DOUBLE(xname, reg, shift_left, shift_right, max, invert) \ | 95 | #define SOC_DOUBLE(xname, reg, shift_left, shift_right, max, invert) \ |
| 94 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ | 96 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ |
| 95 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \ | 97 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \ |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 7cae2360221e..663e34a5383f 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -174,6 +174,7 @@ typedef unsigned __bitwise__ sense_reason_t; | |||
| 174 | 174 | ||
| 175 | enum tcm_sense_reason_table { | 175 | enum tcm_sense_reason_table { |
| 176 | #define R(x) (__force sense_reason_t )(x) | 176 | #define R(x) (__force sense_reason_t )(x) |
| 177 | TCM_NO_SENSE = R(0x00), | ||
| 177 | TCM_NON_EXISTENT_LUN = R(0x01), | 178 | TCM_NON_EXISTENT_LUN = R(0x01), |
| 178 | TCM_UNSUPPORTED_SCSI_OPCODE = R(0x02), | 179 | TCM_UNSUPPORTED_SCSI_OPCODE = R(0x02), |
| 179 | TCM_INCORRECT_AMOUNT_OF_DATA = R(0x03), | 180 | TCM_INCORRECT_AMOUNT_OF_DATA = R(0x03), |
diff --git a/include/uapi/drm/exynos_drm.h b/include/uapi/drm/exynos_drm.h index e7f52c334005..d5844122ff32 100644 --- a/include/uapi/drm/exynos_drm.h +++ b/include/uapi/drm/exynos_drm.h | |||
| @@ -6,24 +6,10 @@ | |||
| 6 | * Joonyoung Shim <jy0922.shim@samsung.com> | 6 | * Joonyoung Shim <jy0922.shim@samsung.com> |
| 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> | 7 | * Seung-Woo Kim <sw0312.kim@samsung.com> |
| 8 | * | 8 | * |
| 9 | * Permission is hereby granted, free of charge, to any person obtaining a | 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * copy of this software and associated documentation files (the "Software"), | 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * to deal in the Software without restriction, including without limitation | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
| 12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 12 | * option) any later version. |
| 13 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 14 | * Software is furnished to do so, subject to the following conditions: | ||
| 15 | * | ||
| 16 | * The above copyright notice and this permission notice (including the next | ||
| 17 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 18 | * Software. | ||
| 19 | * | ||
| 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 23 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 24 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 25 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 26 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 27 | */ | 13 | */ |
| 28 | 14 | ||
| 29 | #ifndef _UAPI_EXYNOS_DRM_H_ | 15 | #ifndef _UAPI_EXYNOS_DRM_H_ |
| @@ -185,6 +171,8 @@ enum drm_exynos_flip { | |||
| 185 | EXYNOS_DRM_FLIP_NONE = (0 << 0), | 171 | EXYNOS_DRM_FLIP_NONE = (0 << 0), |
| 186 | EXYNOS_DRM_FLIP_VERTICAL = (1 << 0), | 172 | EXYNOS_DRM_FLIP_VERTICAL = (1 << 0), |
| 187 | EXYNOS_DRM_FLIP_HORIZONTAL = (1 << 1), | 173 | EXYNOS_DRM_FLIP_HORIZONTAL = (1 << 1), |
| 174 | EXYNOS_DRM_FLIP_BOTH = EXYNOS_DRM_FLIP_VERTICAL | | ||
| 175 | EXYNOS_DRM_FLIP_HORIZONTAL, | ||
| 188 | }; | 176 | }; |
| 189 | 177 | ||
| 190 | enum drm_exynos_degree { | 178 | enum drm_exynos_degree { |
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index 76352ac45f24..9f096f1c0907 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | 26 | ||
| 27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
| 28 | #include <linux/elf-em.h> | 28 | #include <linux/elf-em.h> |
| 29 | #include <linux/ptrace.h> | ||
| 30 | 29 | ||
| 31 | /* The netlink messages for the audit system is divided into blocks: | 30 | /* The netlink messages for the audit system is divided into blocks: |
| 32 | * 1000 - 1099 are for commanding the audit system | 31 | * 1000 - 1099 are for commanding the audit system |
| @@ -106,6 +105,7 @@ | |||
| 106 | #define AUDIT_MMAP 1323 /* Record showing descriptor and flags in mmap */ | 105 | #define AUDIT_MMAP 1323 /* Record showing descriptor and flags in mmap */ |
| 107 | #define AUDIT_NETFILTER_PKT 1324 /* Packets traversing netfilter chains */ | 106 | #define AUDIT_NETFILTER_PKT 1324 /* Packets traversing netfilter chains */ |
| 108 | #define AUDIT_NETFILTER_CFG 1325 /* Netfilter chain modifications */ | 107 | #define AUDIT_NETFILTER_CFG 1325 /* Netfilter chain modifications */ |
| 108 | #define AUDIT_SECCOMP 1326 /* Secure Computing event */ | ||
| 109 | 109 | ||
| 110 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ | 110 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ |
| 111 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ | 111 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ |
diff --git a/include/uapi/linux/msg.h b/include/uapi/linux/msg.h index 78dbd2f996a3..22d95c6854e0 100644 --- a/include/uapi/linux/msg.h +++ b/include/uapi/linux/msg.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | /* msgrcv options */ | 10 | /* msgrcv options */ |
| 11 | #define MSG_NOERROR 010000 /* no error if message is too big */ | 11 | #define MSG_NOERROR 010000 /* no error if message is too big */ |
| 12 | #define MSG_EXCEPT 020000 /* recv any msg except of specified type.*/ | 12 | #define MSG_EXCEPT 020000 /* recv any msg except of specified type.*/ |
| 13 | #define MSG_COPY 040000 /* copy (not remove) all queue messages */ | ||
| 13 | 14 | ||
| 14 | /* Obsolete, used only for backwards compatibility and libc5 compiles */ | 15 | /* Obsolete, used only for backwards compatibility and libc5 compiles */ |
| 15 | struct msqid_ds { | 16 | struct msqid_ds { |
diff --git a/init/Kconfig b/init/Kconfig index 7d30240e5bfe..be8b7f55312d 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
| @@ -1182,7 +1182,7 @@ config CC_OPTIMIZE_FOR_SIZE | |||
| 1182 | Enabling this option will pass "-Os" instead of "-O2" to gcc | 1182 | Enabling this option will pass "-Os" instead of "-O2" to gcc |
| 1183 | resulting in a smaller kernel. | 1183 | resulting in a smaller kernel. |
| 1184 | 1184 | ||
| 1185 | If unsure, say Y. | 1185 | If unsure, say N. |
| 1186 | 1186 | ||
| 1187 | config SYSCTL | 1187 | config SYSCTL |
| 1188 | bool | 1188 | bool |
diff --git a/ipc/compat.c b/ipc/compat.c index ad9518eb26e0..2547f29dcd1b 100644 --- a/ipc/compat.c +++ b/ipc/compat.c | |||
| @@ -306,6 +306,20 @@ static long do_compat_semctl(int first, int second, int third, u32 pad) | |||
| 306 | return err; | 306 | return err; |
| 307 | } | 307 | } |
| 308 | 308 | ||
| 309 | long compat_do_msg_fill(void __user *dest, struct msg_msg *msg, size_t bufsz) | ||
| 310 | { | ||
| 311 | struct compat_msgbuf __user *msgp = dest; | ||
| 312 | size_t msgsz; | ||
| 313 | |||
| 314 | if (put_user(msg->m_type, &msgp->mtype)) | ||
| 315 | return -EFAULT; | ||
| 316 | |||
| 317 | msgsz = (bufsz > msg->m_ts) ? msg->m_ts : bufsz; | ||
| 318 | if (store_msg(msgp->mtext, msg, msgsz)) | ||
| 319 | return -EFAULT; | ||
| 320 | return msgsz; | ||
| 321 | } | ||
| 322 | |||
| 309 | #ifdef CONFIG_ARCH_WANT_OLD_COMPAT_IPC | 323 | #ifdef CONFIG_ARCH_WANT_OLD_COMPAT_IPC |
| 310 | long compat_sys_semctl(int first, int second, int third, void __user *uptr) | 324 | long compat_sys_semctl(int first, int second, int third, void __user *uptr) |
| 311 | { | 325 | { |
| @@ -337,10 +351,6 @@ long compat_sys_msgsnd(int first, int second, int third, void __user *uptr) | |||
| 337 | long compat_sys_msgrcv(int first, int second, int msgtyp, int third, | 351 | long compat_sys_msgrcv(int first, int second, int msgtyp, int third, |
| 338 | int version, void __user *uptr) | 352 | int version, void __user *uptr) |
| 339 | { | 353 | { |
| 340 | struct compat_msgbuf __user *up; | ||
| 341 | long type; | ||
| 342 | int err; | ||
| 343 | |||
| 344 | if (first < 0) | 354 | if (first < 0) |
| 345 | return -EINVAL; | 355 | return -EINVAL; |
| 346 | if (second < 0) | 356 | if (second < 0) |
| @@ -348,23 +358,15 @@ long compat_sys_msgrcv(int first, int second, int msgtyp, int third, | |||
| 348 | 358 | ||
| 349 | if (!version) { | 359 | if (!version) { |
| 350 | struct compat_ipc_kludge ipck; | 360 | struct compat_ipc_kludge ipck; |
| 351 | err = -EINVAL; | ||
| 352 | if (!uptr) | 361 | if (!uptr) |
| 353 | goto out; | 362 | return -EINVAL; |
| 354 | err = -EFAULT; | ||
| 355 | if (copy_from_user (&ipck, uptr, sizeof(ipck))) | 363 | if (copy_from_user (&ipck, uptr, sizeof(ipck))) |
| 356 | goto out; | 364 | return -EFAULT; |
| 357 | uptr = compat_ptr(ipck.msgp); | 365 | uptr = compat_ptr(ipck.msgp); |
| 358 | msgtyp = ipck.msgtyp; | 366 | msgtyp = ipck.msgtyp; |
| 359 | } | 367 | } |
| 360 | up = uptr; | 368 | return do_msgrcv(first, uptr, second, msgtyp, third, |
| 361 | err = do_msgrcv(first, &type, up->mtext, second, msgtyp, third); | 369 | compat_do_msg_fill); |
| 362 | if (err < 0) | ||
| 363 | goto out; | ||
| 364 | if (put_user(type, &up->mtype)) | ||
| 365 | err = -EFAULT; | ||
| 366 | out: | ||
| 367 | return err; | ||
| 368 | } | 370 | } |
| 369 | #else | 371 | #else |
| 370 | long compat_sys_semctl(int semid, int semnum, int cmd, int arg) | 372 | long compat_sys_semctl(int semid, int semnum, int cmd, int arg) |
| @@ -385,16 +387,8 @@ long compat_sys_msgsnd(int msqid, struct compat_msgbuf __user *msgp, | |||
| 385 | long compat_sys_msgrcv(int msqid, struct compat_msgbuf __user *msgp, | 387 | long compat_sys_msgrcv(int msqid, struct compat_msgbuf __user *msgp, |
| 386 | compat_ssize_t msgsz, long msgtyp, int msgflg) | 388 | compat_ssize_t msgsz, long msgtyp, int msgflg) |
| 387 | { | 389 | { |
| 388 | long err, mtype; | 390 | return do_msgrcv(msqid, msgp, (ssize_t)msgsz, msgtyp, msgflg, |
| 389 | 391 | compat_do_msg_fill); | |
| 390 | err = do_msgrcv(msqid, &mtype, msgp->mtext, (ssize_t)msgsz, msgtyp, msgflg); | ||
| 391 | if (err < 0) | ||
| 392 | goto out; | ||
| 393 | |||
| 394 | if (put_user(mtype, &msgp->mtype)) | ||
| 395 | err = -EFAULT; | ||
| 396 | out: | ||
| 397 | return err; | ||
| 398 | } | 392 | } |
| 399 | #endif | 393 | #endif |
| 400 | 394 | ||
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c index 00fba2bab87d..130dfece27ac 100644 --- a/ipc/ipc_sysctl.c +++ b/ipc/ipc_sysctl.c | |||
| @@ -158,6 +158,9 @@ static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write, | |||
| 158 | 158 | ||
| 159 | static int zero; | 159 | static int zero; |
| 160 | static int one = 1; | 160 | static int one = 1; |
| 161 | #ifdef CONFIG_CHECKPOINT_RESTORE | ||
| 162 | static int int_max = INT_MAX; | ||
| 163 | #endif | ||
| 161 | 164 | ||
| 162 | static struct ctl_table ipc_kern_table[] = { | 165 | static struct ctl_table ipc_kern_table[] = { |
| 163 | { | 166 | { |
| @@ -227,6 +230,35 @@ static struct ctl_table ipc_kern_table[] = { | |||
| 227 | .extra1 = &zero, | 230 | .extra1 = &zero, |
| 228 | .extra2 = &one, | 231 | .extra2 = &one, |
| 229 | }, | 232 | }, |
| 233 | #ifdef CONFIG_CHECKPOINT_RESTORE | ||
| 234 | { | ||
| 235 | .procname = "sem_next_id", | ||
| 236 | .data = &init_ipc_ns.ids[IPC_SEM_IDS].next_id, | ||
| 237 | .maxlen = sizeof(init_ipc_ns.ids[IPC_SEM_IDS].next_id), | ||
| 238 | .mode = 0644, | ||
| 239 | .proc_handler = proc_ipc_dointvec_minmax, | ||
| 240 | .extra1 = &zero, | ||
| 241 | .extra2 = &int_max, | ||
| 242 | }, | ||
| 243 | { | ||
| 244 | .procname = "msg_next_id", | ||
| 245 | .data = &init_ipc_ns.ids[IPC_MSG_IDS].next_id, | ||
| 246 | .maxlen = sizeof(init_ipc_ns.ids[IPC_MSG_IDS].next_id), | ||
| 247 | .mode = 0644, | ||
| 248 | .proc_handler = proc_ipc_dointvec_minmax, | ||
| 249 | .extra1 = &zero, | ||
| 250 | .extra2 = &int_max, | ||
| 251 | }, | ||
| 252 | { | ||
| 253 | .procname = "shm_next_id", | ||
| 254 | .data = &init_ipc_ns.ids[IPC_SHM_IDS].next_id, | ||
| 255 | .maxlen = sizeof(init_ipc_ns.ids[IPC_SHM_IDS].next_id), | ||
| 256 | .mode = 0644, | ||
| 257 | .proc_handler = proc_ipc_dointvec_minmax, | ||
| 258 | .extra1 = &zero, | ||
| 259 | .extra2 = &int_max, | ||
| 260 | }, | ||
| 261 | #endif | ||
| 230 | {} | 262 | {} |
| 231 | }; | 263 | }; |
| 232 | 264 | ||
| @@ -755,26 +755,91 @@ static inline int convert_mode(long *msgtyp, int msgflg) | |||
| 755 | return SEARCH_EQUAL; | 755 | return SEARCH_EQUAL; |
| 756 | } | 756 | } |
| 757 | 757 | ||
| 758 | long do_msgrcv(int msqid, long *pmtype, void __user *mtext, | 758 | static long do_msg_fill(void __user *dest, struct msg_msg *msg, size_t bufsz) |
| 759 | size_t msgsz, long msgtyp, int msgflg) | 759 | { |
| 760 | struct msgbuf __user *msgp = dest; | ||
| 761 | size_t msgsz; | ||
| 762 | |||
| 763 | if (put_user(msg->m_type, &msgp->mtype)) | ||
| 764 | return -EFAULT; | ||
| 765 | |||
| 766 | msgsz = (bufsz > msg->m_ts) ? msg->m_ts : bufsz; | ||
| 767 | if (store_msg(msgp->mtext, msg, msgsz)) | ||
| 768 | return -EFAULT; | ||
| 769 | return msgsz; | ||
| 770 | } | ||
| 771 | |||
| 772 | #ifdef CONFIG_CHECKPOINT_RESTORE | ||
| 773 | /* | ||
| 774 | * This function creates new kernel message structure, large enough to store | ||
| 775 | * bufsz message bytes. | ||
| 776 | */ | ||
| 777 | static inline struct msg_msg *prepare_copy(void __user *buf, size_t bufsz, | ||
| 778 | int msgflg, long *msgtyp, | ||
| 779 | unsigned long *copy_number) | ||
| 780 | { | ||
| 781 | struct msg_msg *copy; | ||
| 782 | |||
| 783 | *copy_number = *msgtyp; | ||
| 784 | *msgtyp = 0; | ||
| 785 | /* | ||
| 786 | * Create dummy message to copy real message to. | ||
| 787 | */ | ||
| 788 | copy = load_msg(buf, bufsz); | ||
| 789 | if (!IS_ERR(copy)) | ||
| 790 | copy->m_ts = bufsz; | ||
| 791 | return copy; | ||
| 792 | } | ||
| 793 | |||
| 794 | static inline void free_copy(struct msg_msg *copy) | ||
| 795 | { | ||
| 796 | if (copy) | ||
| 797 | free_msg(copy); | ||
| 798 | } | ||
| 799 | #else | ||
| 800 | static inline struct msg_msg *prepare_copy(void __user *buf, size_t bufsz, | ||
| 801 | int msgflg, long *msgtyp, | ||
| 802 | unsigned long *copy_number) | ||
| 803 | { | ||
| 804 | return ERR_PTR(-ENOSYS); | ||
| 805 | } | ||
| 806 | |||
| 807 | static inline void free_copy(struct msg_msg *copy) | ||
| 808 | { | ||
| 809 | } | ||
| 810 | #endif | ||
| 811 | |||
| 812 | long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, | ||
| 813 | int msgflg, | ||
| 814 | long (*msg_handler)(void __user *, struct msg_msg *, size_t)) | ||
| 760 | { | 815 | { |
| 761 | struct msg_queue *msq; | 816 | struct msg_queue *msq; |
| 762 | struct msg_msg *msg; | 817 | struct msg_msg *msg; |
| 763 | int mode; | 818 | int mode; |
| 764 | struct ipc_namespace *ns; | 819 | struct ipc_namespace *ns; |
| 820 | struct msg_msg *copy = NULL; | ||
| 821 | unsigned long copy_number = 0; | ||
| 765 | 822 | ||
| 766 | if (msqid < 0 || (long) msgsz < 0) | 823 | if (msqid < 0 || (long) bufsz < 0) |
| 767 | return -EINVAL; | 824 | return -EINVAL; |
| 825 | if (msgflg & MSG_COPY) { | ||
| 826 | copy = prepare_copy(buf, bufsz, msgflg, &msgtyp, ©_number); | ||
| 827 | if (IS_ERR(copy)) | ||
| 828 | return PTR_ERR(copy); | ||
| 829 | } | ||
| 768 | mode = convert_mode(&msgtyp, msgflg); | 830 | mode = convert_mode(&msgtyp, msgflg); |
| 769 | ns = current->nsproxy->ipc_ns; | 831 | ns = current->nsproxy->ipc_ns; |
| 770 | 832 | ||
| 771 | msq = msg_lock_check(ns, msqid); | 833 | msq = msg_lock_check(ns, msqid); |
| 772 | if (IS_ERR(msq)) | 834 | if (IS_ERR(msq)) { |
| 835 | free_copy(copy); | ||
| 773 | return PTR_ERR(msq); | 836 | return PTR_ERR(msq); |
| 837 | } | ||
| 774 | 838 | ||
| 775 | for (;;) { | 839 | for (;;) { |
| 776 | struct msg_receiver msr_d; | 840 | struct msg_receiver msr_d; |
| 777 | struct list_head *tmp; | 841 | struct list_head *tmp; |
| 842 | long msg_counter = 0; | ||
| 778 | 843 | ||
| 779 | msg = ERR_PTR(-EACCES); | 844 | msg = ERR_PTR(-EACCES); |
| 780 | if (ipcperms(ns, &msq->q_perm, S_IRUGO)) | 845 | if (ipcperms(ns, &msq->q_perm, S_IRUGO)) |
| @@ -793,12 +858,21 @@ long do_msgrcv(int msqid, long *pmtype, void __user *mtext, | |||
| 793 | msg = walk_msg; | 858 | msg = walk_msg; |
| 794 | if (mode == SEARCH_LESSEQUAL && | 859 | if (mode == SEARCH_LESSEQUAL && |
| 795 | walk_msg->m_type != 1) { | 860 | walk_msg->m_type != 1) { |
| 796 | msg = walk_msg; | ||
| 797 | msgtyp = walk_msg->m_type - 1; | 861 | msgtyp = walk_msg->m_type - 1; |
| 798 | } else { | 862 | } else if (msgflg & MSG_COPY) { |
| 799 | msg = walk_msg; | 863 | if (copy_number == msg_counter) { |
| 864 | /* | ||
| 865 | * Found requested message. | ||
| 866 | * Copy it. | ||
| 867 | */ | ||
| 868 | msg = copy_msg(msg, copy); | ||
| 869 | if (IS_ERR(msg)) | ||
| 870 | goto out_unlock; | ||
| 871 | break; | ||
| 872 | } | ||
| 873 | } else | ||
| 800 | break; | 874 | break; |
| 801 | } | 875 | msg_counter++; |
| 802 | } | 876 | } |
| 803 | tmp = tmp->next; | 877 | tmp = tmp->next; |
| 804 | } | 878 | } |
| @@ -807,10 +881,16 @@ long do_msgrcv(int msqid, long *pmtype, void __user *mtext, | |||
| 807 | * Found a suitable message. | 881 | * Found a suitable message. |
| 808 | * Unlink it from the queue. | 882 | * Unlink it from the queue. |
| 809 | */ | 883 | */ |
| 810 | if ((msgsz < msg->m_ts) && !(msgflg & MSG_NOERROR)) { | 884 | if ((bufsz < msg->m_ts) && !(msgflg & MSG_NOERROR)) { |
| 811 | msg = ERR_PTR(-E2BIG); | 885 | msg = ERR_PTR(-E2BIG); |
| 812 | goto out_unlock; | 886 | goto out_unlock; |
| 813 | } | 887 | } |
| 888 | /* | ||
| 889 | * If we are copying, then do not unlink message and do | ||
| 890 | * not update queue parameters. | ||
| 891 | */ | ||
| 892 | if (msgflg & MSG_COPY) | ||
| 893 | goto out_unlock; | ||
| 814 | list_del(&msg->m_list); | 894 | list_del(&msg->m_list); |
| 815 | msq->q_qnum--; | 895 | msq->q_qnum--; |
| 816 | msq->q_rtime = get_seconds(); | 896 | msq->q_rtime = get_seconds(); |
| @@ -834,7 +914,7 @@ long do_msgrcv(int msqid, long *pmtype, void __user *mtext, | |||
| 834 | if (msgflg & MSG_NOERROR) | 914 | if (msgflg & MSG_NOERROR) |
| 835 | msr_d.r_maxsize = INT_MAX; | 915 | msr_d.r_maxsize = INT_MAX; |
| 836 | else | 916 | else |
| 837 | msr_d.r_maxsize = msgsz; | 917 | msr_d.r_maxsize = bufsz; |
| 838 | msr_d.r_msg = ERR_PTR(-EAGAIN); | 918 | msr_d.r_msg = ERR_PTR(-EAGAIN); |
| 839 | current->state = TASK_INTERRUPTIBLE; | 919 | current->state = TASK_INTERRUPTIBLE; |
| 840 | msg_unlock(msq); | 920 | msg_unlock(msq); |
| @@ -894,32 +974,21 @@ out_unlock: | |||
| 894 | break; | 974 | break; |
| 895 | } | 975 | } |
| 896 | } | 976 | } |
| 897 | if (IS_ERR(msg)) | 977 | if (IS_ERR(msg)) { |
| 978 | free_copy(copy); | ||
| 898 | return PTR_ERR(msg); | 979 | return PTR_ERR(msg); |
| 980 | } | ||
| 899 | 981 | ||
| 900 | msgsz = (msgsz > msg->m_ts) ? msg->m_ts : msgsz; | 982 | bufsz = msg_handler(buf, msg, bufsz); |
| 901 | *pmtype = msg->m_type; | ||
| 902 | if (store_msg(mtext, msg, msgsz)) | ||
| 903 | msgsz = -EFAULT; | ||
| 904 | |||
| 905 | free_msg(msg); | 983 | free_msg(msg); |
| 906 | 984 | ||
| 907 | return msgsz; | 985 | return bufsz; |
| 908 | } | 986 | } |
| 909 | 987 | ||
| 910 | SYSCALL_DEFINE5(msgrcv, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz, | 988 | SYSCALL_DEFINE5(msgrcv, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz, |
| 911 | long, msgtyp, int, msgflg) | 989 | long, msgtyp, int, msgflg) |
| 912 | { | 990 | { |
| 913 | long err, mtype; | 991 | return do_msgrcv(msqid, msgp, msgsz, msgtyp, msgflg, do_msg_fill); |
| 914 | |||
| 915 | err = do_msgrcv(msqid, &mtype, msgp->mtext, msgsz, msgtyp, msgflg); | ||
| 916 | if (err < 0) | ||
| 917 | goto out; | ||
| 918 | |||
| 919 | if (put_user(mtype, &msgp->mtype)) | ||
| 920 | err = -EFAULT; | ||
| 921 | out: | ||
| 922 | return err; | ||
| 923 | } | 992 | } |
| 924 | 993 | ||
| 925 | #ifdef CONFIG_PROC_FS | 994 | #ifdef CONFIG_PROC_FS |
diff --git a/ipc/msgutil.c b/ipc/msgutil.c index 6471f1bdae96..ebfcbfa8b7f2 100644 --- a/ipc/msgutil.c +++ b/ipc/msgutil.c | |||
| @@ -102,7 +102,50 @@ out_err: | |||
| 102 | free_msg(msg); | 102 | free_msg(msg); |
| 103 | return ERR_PTR(err); | 103 | return ERR_PTR(err); |
| 104 | } | 104 | } |
| 105 | #ifdef CONFIG_CHECKPOINT_RESTORE | ||
| 106 | struct msg_msg *copy_msg(struct msg_msg *src, struct msg_msg *dst) | ||
| 107 | { | ||
| 108 | struct msg_msgseg *dst_pseg, *src_pseg; | ||
| 109 | int len = src->m_ts; | ||
| 110 | int alen; | ||
| 111 | |||
| 112 | BUG_ON(dst == NULL); | ||
| 113 | if (src->m_ts > dst->m_ts) | ||
| 114 | return ERR_PTR(-EINVAL); | ||
| 105 | 115 | ||
| 116 | alen = len; | ||
| 117 | if (alen > DATALEN_MSG) | ||
| 118 | alen = DATALEN_MSG; | ||
| 119 | |||
| 120 | dst->next = NULL; | ||
| 121 | dst->security = NULL; | ||
| 122 | |||
| 123 | memcpy(dst + 1, src + 1, alen); | ||
| 124 | |||
| 125 | len -= alen; | ||
| 126 | dst_pseg = dst->next; | ||
| 127 | src_pseg = src->next; | ||
| 128 | while (len > 0) { | ||
| 129 | alen = len; | ||
| 130 | if (alen > DATALEN_SEG) | ||
| 131 | alen = DATALEN_SEG; | ||
| 132 | memcpy(dst_pseg + 1, src_pseg + 1, alen); | ||
| 133 | dst_pseg = dst_pseg->next; | ||
| 134 | len -= alen; | ||
| 135 | src_pseg = src_pseg->next; | ||
| 136 | } | ||
| 137 | |||
| 138 | dst->m_type = src->m_type; | ||
| 139 | dst->m_ts = src->m_ts; | ||
| 140 | |||
| 141 | return dst; | ||
| 142 | } | ||
| 143 | #else | ||
| 144 | struct msg_msg *copy_msg(struct msg_msg *src, struct msg_msg *dst) | ||
| 145 | { | ||
| 146 | return ERR_PTR(-ENOSYS); | ||
| 147 | } | ||
| 148 | #endif | ||
| 106 | int store_msg(void __user *dest, struct msg_msg *msg, int len) | 149 | int store_msg(void __user *dest, struct msg_msg *msg, int len) |
| 107 | { | 150 | { |
| 108 | int alen; | 151 | int alen; |
diff --git a/ipc/util.c b/ipc/util.c index 72fd0785ac94..74e1d9c7a98a 100644 --- a/ipc/util.c +++ b/ipc/util.c | |||
| @@ -122,6 +122,7 @@ void ipc_init_ids(struct ipc_ids *ids) | |||
| 122 | 122 | ||
| 123 | ids->in_use = 0; | 123 | ids->in_use = 0; |
| 124 | ids->seq = 0; | 124 | ids->seq = 0; |
| 125 | ids->next_id = -1; | ||
| 125 | { | 126 | { |
| 126 | int seq_limit = INT_MAX/SEQ_MULTIPLIER; | 127 | int seq_limit = INT_MAX/SEQ_MULTIPLIER; |
| 127 | if (seq_limit > USHRT_MAX) | 128 | if (seq_limit > USHRT_MAX) |
| @@ -252,6 +253,7 @@ int ipc_addid(struct ipc_ids* ids, struct kern_ipc_perm* new, int size) | |||
| 252 | kuid_t euid; | 253 | kuid_t euid; |
| 253 | kgid_t egid; | 254 | kgid_t egid; |
| 254 | int id, err; | 255 | int id, err; |
| 256 | int next_id = ids->next_id; | ||
| 255 | 257 | ||
| 256 | if (size > IPCMNI) | 258 | if (size > IPCMNI) |
| 257 | size = IPCMNI; | 259 | size = IPCMNI; |
| @@ -264,7 +266,8 @@ int ipc_addid(struct ipc_ids* ids, struct kern_ipc_perm* new, int size) | |||
| 264 | rcu_read_lock(); | 266 | rcu_read_lock(); |
| 265 | spin_lock(&new->lock); | 267 | spin_lock(&new->lock); |
| 266 | 268 | ||
| 267 | err = idr_get_new(&ids->ipcs_idr, new, &id); | 269 | err = idr_get_new_above(&ids->ipcs_idr, new, |
| 270 | (next_id < 0) ? 0 : ipcid_to_idx(next_id), &id); | ||
| 268 | if (err) { | 271 | if (err) { |
| 269 | spin_unlock(&new->lock); | 272 | spin_unlock(&new->lock); |
| 270 | rcu_read_unlock(); | 273 | rcu_read_unlock(); |
| @@ -277,9 +280,14 @@ int ipc_addid(struct ipc_ids* ids, struct kern_ipc_perm* new, int size) | |||
| 277 | new->cuid = new->uid = euid; | 280 | new->cuid = new->uid = euid; |
| 278 | new->gid = new->cgid = egid; | 281 | new->gid = new->cgid = egid; |
| 279 | 282 | ||
| 280 | new->seq = ids->seq++; | 283 | if (next_id < 0) { |
| 281 | if(ids->seq > ids->seq_max) | 284 | new->seq = ids->seq++; |
| 282 | ids->seq = 0; | 285 | if (ids->seq > ids->seq_max) |
| 286 | ids->seq = 0; | ||
| 287 | } else { | ||
| 288 | new->seq = ipcid_to_seqx(next_id); | ||
| 289 | ids->next_id = -1; | ||
| 290 | } | ||
| 283 | 291 | ||
| 284 | new->id = ipc_buildid(id, new->seq); | 292 | new->id = ipc_buildid(id, new->seq); |
| 285 | return id; | 293 | return id; |
diff --git a/ipc/util.h b/ipc/util.h index c8fe2f7631e9..eeb79a1fbd83 100644 --- a/ipc/util.h +++ b/ipc/util.h | |||
| @@ -92,6 +92,7 @@ void __init ipc_init_proc_interface(const char *path, const char *header, | |||
| 92 | #define IPC_SHM_IDS 2 | 92 | #define IPC_SHM_IDS 2 |
| 93 | 93 | ||
| 94 | #define ipcid_to_idx(id) ((id) % SEQ_MULTIPLIER) | 94 | #define ipcid_to_idx(id) ((id) % SEQ_MULTIPLIER) |
| 95 | #define ipcid_to_seqx(id) ((id) / SEQ_MULTIPLIER) | ||
| 95 | 96 | ||
| 96 | /* must be called with ids->rw_mutex acquired for writing */ | 97 | /* must be called with ids->rw_mutex acquired for writing */ |
| 97 | int ipc_addid(struct ipc_ids *, struct kern_ipc_perm *, int); | 98 | int ipc_addid(struct ipc_ids *, struct kern_ipc_perm *, int); |
| @@ -139,6 +140,7 @@ int ipc_parse_version (int *cmd); | |||
| 139 | 140 | ||
| 140 | extern void free_msg(struct msg_msg *msg); | 141 | extern void free_msg(struct msg_msg *msg); |
| 141 | extern struct msg_msg *load_msg(const void __user *src, int len); | 142 | extern struct msg_msg *load_msg(const void __user *src, int len); |
| 143 | extern struct msg_msg *copy_msg(struct msg_msg *src, struct msg_msg *dst); | ||
| 142 | extern int store_msg(void __user *dest, struct msg_msg *msg, int len); | 144 | extern int store_msg(void __user *dest, struct msg_msg *msg, int len); |
| 143 | 145 | ||
| 144 | extern void recompute_msgmni(struct ipc_namespace *); | 146 | extern void recompute_msgmni(struct ipc_namespace *); |
diff --git a/kernel/async.c b/kernel/async.c index 9d3118384858..a1d585c351d6 100644 --- a/kernel/async.c +++ b/kernel/async.c | |||
| @@ -196,6 +196,9 @@ static async_cookie_t __async_schedule(async_func_ptr *ptr, void *data, struct a | |||
| 196 | atomic_inc(&entry_count); | 196 | atomic_inc(&entry_count); |
| 197 | spin_unlock_irqrestore(&async_lock, flags); | 197 | spin_unlock_irqrestore(&async_lock, flags); |
| 198 | 198 | ||
| 199 | /* mark that this task has queued an async job, used by module init */ | ||
| 200 | current->flags |= PF_USED_ASYNC; | ||
| 201 | |||
| 199 | /* schedule for execution */ | 202 | /* schedule for execution */ |
| 200 | queue_work(system_unbound_wq, &entry->work); | 203 | queue_work(system_unbound_wq, &entry->work); |
| 201 | 204 | ||
diff --git a/kernel/audit.c b/kernel/audit.c index 40414e9143db..d596e5355f15 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
| @@ -272,6 +272,8 @@ static int audit_log_config_change(char *function_name, int new, int old, | |||
| 272 | int rc = 0; | 272 | int rc = 0; |
| 273 | 273 | ||
| 274 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); | 274 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); |
| 275 | if (unlikely(!ab)) | ||
| 276 | return rc; | ||
| 275 | audit_log_format(ab, "%s=%d old=%d auid=%u ses=%u", function_name, new, | 277 | audit_log_format(ab, "%s=%d old=%d auid=%u ses=%u", function_name, new, |
| 276 | old, from_kuid(&init_user_ns, loginuid), sessionid); | 278 | old, from_kuid(&init_user_ns, loginuid), sessionid); |
| 277 | if (sid) { | 279 | if (sid) { |
| @@ -619,6 +621,8 @@ static int audit_log_common_recv_msg(struct audit_buffer **ab, u16 msg_type, | |||
| 619 | } | 621 | } |
| 620 | 622 | ||
| 621 | *ab = audit_log_start(NULL, GFP_KERNEL, msg_type); | 623 | *ab = audit_log_start(NULL, GFP_KERNEL, msg_type); |
| 624 | if (unlikely(!*ab)) | ||
| 625 | return rc; | ||
| 622 | audit_log_format(*ab, "pid=%d uid=%u auid=%u ses=%u", | 626 | audit_log_format(*ab, "pid=%d uid=%u auid=%u ses=%u", |
| 623 | task_tgid_vnr(current), | 627 | task_tgid_vnr(current), |
| 624 | from_kuid(&init_user_ns, current_uid()), | 628 | from_kuid(&init_user_ns, current_uid()), |
| @@ -1097,6 +1101,23 @@ static inline void audit_get_stamp(struct audit_context *ctx, | |||
| 1097 | } | 1101 | } |
| 1098 | } | 1102 | } |
| 1099 | 1103 | ||
| 1104 | /* | ||
| 1105 | * Wait for auditd to drain the queue a little | ||
| 1106 | */ | ||
| 1107 | static void wait_for_auditd(unsigned long sleep_time) | ||
| 1108 | { | ||
| 1109 | DECLARE_WAITQUEUE(wait, current); | ||
| 1110 | set_current_state(TASK_INTERRUPTIBLE); | ||
| 1111 | add_wait_queue(&audit_backlog_wait, &wait); | ||
| 1112 | |||
| 1113 | if (audit_backlog_limit && | ||
| 1114 | skb_queue_len(&audit_skb_queue) > audit_backlog_limit) | ||
| 1115 | schedule_timeout(sleep_time); | ||
| 1116 | |||
| 1117 | __set_current_state(TASK_RUNNING); | ||
| 1118 | remove_wait_queue(&audit_backlog_wait, &wait); | ||
| 1119 | } | ||
| 1120 | |||
| 1100 | /* Obtain an audit buffer. This routine does locking to obtain the | 1121 | /* Obtain an audit buffer. This routine does locking to obtain the |
| 1101 | * audit buffer, but then no locking is required for calls to | 1122 | * audit buffer, but then no locking is required for calls to |
| 1102 | * audit_log_*format. If the tsk is a task that is currently in a | 1123 | * audit_log_*format. If the tsk is a task that is currently in a |
| @@ -1142,20 +1163,13 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, | |||
| 1142 | 1163 | ||
| 1143 | while (audit_backlog_limit | 1164 | while (audit_backlog_limit |
| 1144 | && skb_queue_len(&audit_skb_queue) > audit_backlog_limit + reserve) { | 1165 | && skb_queue_len(&audit_skb_queue) > audit_backlog_limit + reserve) { |
| 1145 | if (gfp_mask & __GFP_WAIT && audit_backlog_wait_time | 1166 | if (gfp_mask & __GFP_WAIT && audit_backlog_wait_time) { |
| 1146 | && time_before(jiffies, timeout_start + audit_backlog_wait_time)) { | 1167 | unsigned long sleep_time; |
| 1147 | 1168 | ||
| 1148 | /* Wait for auditd to drain the queue a little */ | 1169 | sleep_time = timeout_start + audit_backlog_wait_time - |
| 1149 | DECLARE_WAITQUEUE(wait, current); | 1170 | jiffies; |
| 1150 | set_current_state(TASK_INTERRUPTIBLE); | 1171 | if ((long)sleep_time > 0) |
| 1151 | add_wait_queue(&audit_backlog_wait, &wait); | 1172 | wait_for_auditd(sleep_time); |
| 1152 | |||
| 1153 | if (audit_backlog_limit && | ||
| 1154 | skb_queue_len(&audit_skb_queue) > audit_backlog_limit) | ||
| 1155 | schedule_timeout(timeout_start + audit_backlog_wait_time - jiffies); | ||
| 1156 | |||
| 1157 | __set_current_state(TASK_RUNNING); | ||
| 1158 | remove_wait_queue(&audit_backlog_wait, &wait); | ||
| 1159 | continue; | 1173 | continue; |
| 1160 | } | 1174 | } |
| 1161 | if (audit_rate_check() && printk_ratelimit()) | 1175 | if (audit_rate_check() && printk_ratelimit()) |
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index e81175ef25f8..642a89c4f3d6 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
| @@ -449,11 +449,26 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree) | |||
| 449 | return 0; | 449 | return 0; |
| 450 | } | 450 | } |
| 451 | 451 | ||
| 452 | static void audit_log_remove_rule(struct audit_krule *rule) | ||
| 453 | { | ||
| 454 | struct audit_buffer *ab; | ||
| 455 | |||
| 456 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); | ||
| 457 | if (unlikely(!ab)) | ||
| 458 | return; | ||
| 459 | audit_log_format(ab, "op="); | ||
| 460 | audit_log_string(ab, "remove rule"); | ||
| 461 | audit_log_format(ab, " dir="); | ||
| 462 | audit_log_untrustedstring(ab, rule->tree->pathname); | ||
| 463 | audit_log_key(ab, rule->filterkey); | ||
| 464 | audit_log_format(ab, " list=%d res=1", rule->listnr); | ||
| 465 | audit_log_end(ab); | ||
| 466 | } | ||
| 467 | |||
| 452 | static void kill_rules(struct audit_tree *tree) | 468 | static void kill_rules(struct audit_tree *tree) |
| 453 | { | 469 | { |
| 454 | struct audit_krule *rule, *next; | 470 | struct audit_krule *rule, *next; |
| 455 | struct audit_entry *entry; | 471 | struct audit_entry *entry; |
| 456 | struct audit_buffer *ab; | ||
| 457 | 472 | ||
| 458 | list_for_each_entry_safe(rule, next, &tree->rules, rlist) { | 473 | list_for_each_entry_safe(rule, next, &tree->rules, rlist) { |
| 459 | entry = container_of(rule, struct audit_entry, rule); | 474 | entry = container_of(rule, struct audit_entry, rule); |
| @@ -461,14 +476,7 @@ static void kill_rules(struct audit_tree *tree) | |||
| 461 | list_del_init(&rule->rlist); | 476 | list_del_init(&rule->rlist); |
| 462 | if (rule->tree) { | 477 | if (rule->tree) { |
| 463 | /* not a half-baked one */ | 478 | /* not a half-baked one */ |
| 464 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); | 479 | audit_log_remove_rule(rule); |
| 465 | audit_log_format(ab, "op="); | ||
| 466 | audit_log_string(ab, "remove rule"); | ||
| 467 | audit_log_format(ab, " dir="); | ||
| 468 | audit_log_untrustedstring(ab, rule->tree->pathname); | ||
| 469 | audit_log_key(ab, rule->filterkey); | ||
| 470 | audit_log_format(ab, " list=%d res=1", rule->listnr); | ||
| 471 | audit_log_end(ab); | ||
| 472 | rule->tree = NULL; | 480 | rule->tree = NULL; |
| 473 | list_del_rcu(&entry->list); | 481 | list_del_rcu(&entry->list); |
| 474 | list_del(&entry->rule.list); | 482 | list_del(&entry->rule.list); |
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index 4a599f699adc..22831c4d369c 100644 --- a/kernel/audit_watch.c +++ b/kernel/audit_watch.c | |||
| @@ -240,6 +240,8 @@ static void audit_watch_log_rule_change(struct audit_krule *r, struct audit_watc | |||
| 240 | if (audit_enabled) { | 240 | if (audit_enabled) { |
| 241 | struct audit_buffer *ab; | 241 | struct audit_buffer *ab; |
| 242 | ab = audit_log_start(NULL, GFP_NOFS, AUDIT_CONFIG_CHANGE); | 242 | ab = audit_log_start(NULL, GFP_NOFS, AUDIT_CONFIG_CHANGE); |
| 243 | if (unlikely(!ab)) | ||
| 244 | return; | ||
| 243 | audit_log_format(ab, "auid=%u ses=%u op=", | 245 | audit_log_format(ab, "auid=%u ses=%u op=", |
| 244 | from_kuid(&init_user_ns, audit_get_loginuid(current)), | 246 | from_kuid(&init_user_ns, audit_get_loginuid(current)), |
| 245 | audit_get_sessionid(current)); | 247 | audit_get_sessionid(current)); |
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 7f19f23d38a3..f9fc54bbe06f 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c | |||
| @@ -1144,7 +1144,6 @@ static void audit_log_rule_change(kuid_t loginuid, u32 sessionid, u32 sid, | |||
| 1144 | * audit_receive_filter - apply all rules to the specified message type | 1144 | * audit_receive_filter - apply all rules to the specified message type |
| 1145 | * @type: audit message type | 1145 | * @type: audit message type |
| 1146 | * @pid: target pid for netlink audit messages | 1146 | * @pid: target pid for netlink audit messages |
| 1147 | * @uid: target uid for netlink audit messages | ||
| 1148 | * @seq: netlink audit message sequence (serial) number | 1147 | * @seq: netlink audit message sequence (serial) number |
| 1149 | * @data: payload data | 1148 | * @data: payload data |
| 1150 | * @datasz: size of payload data | 1149 | * @datasz: size of payload data |
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index e37e6a12c5e3..a371f857a0a9 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
| @@ -1464,14 +1464,14 @@ static void show_special(struct audit_context *context, int *call_panic) | |||
| 1464 | audit_log_end(ab); | 1464 | audit_log_end(ab); |
| 1465 | ab = audit_log_start(context, GFP_KERNEL, | 1465 | ab = audit_log_start(context, GFP_KERNEL, |
| 1466 | AUDIT_IPC_SET_PERM); | 1466 | AUDIT_IPC_SET_PERM); |
| 1467 | if (unlikely(!ab)) | ||
| 1468 | return; | ||
| 1467 | audit_log_format(ab, | 1469 | audit_log_format(ab, |
| 1468 | "qbytes=%lx ouid=%u ogid=%u mode=%#ho", | 1470 | "qbytes=%lx ouid=%u ogid=%u mode=%#ho", |
| 1469 | context->ipc.qbytes, | 1471 | context->ipc.qbytes, |
| 1470 | context->ipc.perm_uid, | 1472 | context->ipc.perm_uid, |
| 1471 | context->ipc.perm_gid, | 1473 | context->ipc.perm_gid, |
| 1472 | context->ipc.perm_mode); | 1474 | context->ipc.perm_mode); |
| 1473 | if (!ab) | ||
| 1474 | return; | ||
| 1475 | } | 1475 | } |
| 1476 | break; } | 1476 | break; } |
| 1477 | case AUDIT_MQ_OPEN: { | 1477 | case AUDIT_MQ_OPEN: { |
| @@ -2675,7 +2675,7 @@ void __audit_mmap_fd(int fd, int flags) | |||
| 2675 | context->type = AUDIT_MMAP; | 2675 | context->type = AUDIT_MMAP; |
| 2676 | } | 2676 | } |
| 2677 | 2677 | ||
| 2678 | static void audit_log_abend(struct audit_buffer *ab, char *reason, long signr) | 2678 | static void audit_log_task(struct audit_buffer *ab) |
| 2679 | { | 2679 | { |
| 2680 | kuid_t auid, uid; | 2680 | kuid_t auid, uid; |
| 2681 | kgid_t gid; | 2681 | kgid_t gid; |
| @@ -2693,6 +2693,11 @@ static void audit_log_abend(struct audit_buffer *ab, char *reason, long signr) | |||
| 2693 | audit_log_task_context(ab); | 2693 | audit_log_task_context(ab); |
| 2694 | audit_log_format(ab, " pid=%d comm=", current->pid); | 2694 | audit_log_format(ab, " pid=%d comm=", current->pid); |
| 2695 | audit_log_untrustedstring(ab, current->comm); | 2695 | audit_log_untrustedstring(ab, current->comm); |
| 2696 | } | ||
| 2697 | |||
| 2698 | static void audit_log_abend(struct audit_buffer *ab, char *reason, long signr) | ||
| 2699 | { | ||
| 2700 | audit_log_task(ab); | ||
| 2696 | audit_log_format(ab, " reason="); | 2701 | audit_log_format(ab, " reason="); |
| 2697 | audit_log_string(ab, reason); | 2702 | audit_log_string(ab, reason); |
| 2698 | audit_log_format(ab, " sig=%ld", signr); | 2703 | audit_log_format(ab, " sig=%ld", signr); |
| @@ -2715,6 +2720,8 @@ void audit_core_dumps(long signr) | |||
| 2715 | return; | 2720 | return; |
| 2716 | 2721 | ||
| 2717 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_ANOM_ABEND); | 2722 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_ANOM_ABEND); |
| 2723 | if (unlikely(!ab)) | ||
| 2724 | return; | ||
| 2718 | audit_log_abend(ab, "memory violation", signr); | 2725 | audit_log_abend(ab, "memory violation", signr); |
| 2719 | audit_log_end(ab); | 2726 | audit_log_end(ab); |
| 2720 | } | 2727 | } |
| @@ -2723,8 +2730,11 @@ void __audit_seccomp(unsigned long syscall, long signr, int code) | |||
| 2723 | { | 2730 | { |
| 2724 | struct audit_buffer *ab; | 2731 | struct audit_buffer *ab; |
| 2725 | 2732 | ||
| 2726 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_ANOM_ABEND); | 2733 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_SECCOMP); |
| 2727 | audit_log_abend(ab, "seccomp", signr); | 2734 | if (unlikely(!ab)) |
| 2735 | return; | ||
| 2736 | audit_log_task(ab); | ||
| 2737 | audit_log_format(ab, " sig=%ld", signr); | ||
| 2728 | audit_log_format(ab, " syscall=%ld", syscall); | 2738 | audit_log_format(ab, " syscall=%ld", syscall); |
| 2729 | audit_log_format(ab, " compat=%d", is_compat_task()); | 2739 | audit_log_format(ab, " compat=%d", is_compat_task()); |
| 2730 | audit_log_format(ab, " ip=0x%lx", KSTK_EIP(current)); | 2740 | audit_log_format(ab, " ip=0x%lx", KSTK_EIP(current)); |
diff --git a/kernel/module.c b/kernel/module.c index 250092c1d57d..b10b048367e1 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
| @@ -3013,6 +3013,12 @@ static int do_init_module(struct module *mod) | |||
| 3013 | { | 3013 | { |
| 3014 | int ret = 0; | 3014 | int ret = 0; |
| 3015 | 3015 | ||
| 3016 | /* | ||
| 3017 | * We want to find out whether @mod uses async during init. Clear | ||
| 3018 | * PF_USED_ASYNC. async_schedule*() will set it. | ||
| 3019 | */ | ||
| 3020 | current->flags &= ~PF_USED_ASYNC; | ||
| 3021 | |||
| 3016 | blocking_notifier_call_chain(&module_notify_list, | 3022 | blocking_notifier_call_chain(&module_notify_list, |
| 3017 | MODULE_STATE_COMING, mod); | 3023 | MODULE_STATE_COMING, mod); |
| 3018 | 3024 | ||
| @@ -3058,8 +3064,25 @@ static int do_init_module(struct module *mod) | |||
| 3058 | blocking_notifier_call_chain(&module_notify_list, | 3064 | blocking_notifier_call_chain(&module_notify_list, |
| 3059 | MODULE_STATE_LIVE, mod); | 3065 | MODULE_STATE_LIVE, mod); |
| 3060 | 3066 | ||
| 3061 | /* We need to finish all async code before the module init sequence is done */ | 3067 | /* |
| 3062 | async_synchronize_full(); | 3068 | * We need to finish all async code before the module init sequence |
| 3069 | * is done. This has potential to deadlock. For example, a newly | ||
| 3070 | * detected block device can trigger request_module() of the | ||
| 3071 | * default iosched from async probing task. Once userland helper | ||
| 3072 | * reaches here, async_synchronize_full() will wait on the async | ||
| 3073 | * task waiting on request_module() and deadlock. | ||
| 3074 | * | ||
| 3075 | * This deadlock is avoided by perfomring async_synchronize_full() | ||
| 3076 | * iff module init queued any async jobs. This isn't a full | ||
| 3077 | * solution as it will deadlock the same if module loading from | ||
| 3078 | * async jobs nests more than once; however, due to the various | ||
| 3079 | * constraints, this hack seems to be the best option for now. | ||
| 3080 | * Please refer to the following thread for details. | ||
| 3081 | * | ||
| 3082 | * http://thread.gmane.org/gmane.linux.kernel/1420814 | ||
| 3083 | */ | ||
| 3084 | if (current->flags & PF_USED_ASYNC) | ||
| 3085 | async_synchronize_full(); | ||
| 3063 | 3086 | ||
| 3064 | mutex_lock(&module_mutex); | 3087 | mutex_lock(&module_mutex); |
| 3065 | /* Drop initial reference. */ | 3088 | /* Drop initial reference. */ |
diff --git a/kernel/printk.c b/kernel/printk.c index 19c0d7bcf24a..357f714ddd49 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
| @@ -870,10 +870,11 @@ static size_t print_time(u64 ts, char *buf) | |||
| 870 | if (!printk_time) | 870 | if (!printk_time) |
| 871 | return 0; | 871 | return 0; |
| 872 | 872 | ||
| 873 | rem_nsec = do_div(ts, 1000000000); | ||
| 874 | |||
| 873 | if (!buf) | 875 | if (!buf) |
| 874 | return 15; | 876 | return snprintf(NULL, 0, "[%5lu.000000] ", (unsigned long)ts); |
| 875 | 877 | ||
| 876 | rem_nsec = do_div(ts, 1000000000); | ||
| 877 | return sprintf(buf, "[%5lu.%06lu] ", | 878 | return sprintf(buf, "[%5lu.%06lu] ", |
| 878 | (unsigned long)ts, rem_nsec / 1000); | 879 | (unsigned long)ts, rem_nsec / 1000); |
| 879 | } | 880 | } |
diff --git a/kernel/rwsem.c b/kernel/rwsem.c index 6850f53e02d8..b3c6c3fcd847 100644 --- a/kernel/rwsem.c +++ b/kernel/rwsem.c | |||
| @@ -116,6 +116,16 @@ void down_read_nested(struct rw_semaphore *sem, int subclass) | |||
| 116 | 116 | ||
| 117 | EXPORT_SYMBOL(down_read_nested); | 117 | EXPORT_SYMBOL(down_read_nested); |
| 118 | 118 | ||
| 119 | void _down_write_nest_lock(struct rw_semaphore *sem, struct lockdep_map *nest) | ||
| 120 | { | ||
| 121 | might_sleep(); | ||
| 122 | rwsem_acquire_nest(&sem->dep_map, 0, 0, nest, _RET_IP_); | ||
| 123 | |||
| 124 | LOCK_CONTENDED(sem, __down_write_trylock, __down_write); | ||
| 125 | } | ||
| 126 | |||
| 127 | EXPORT_SYMBOL(_down_write_nest_lock); | ||
| 128 | |||
| 119 | void down_write_nested(struct rw_semaphore *sem, int subclass) | 129 | void down_write_nested(struct rw_semaphore *sem, int subclass) |
| 120 | { | 130 | { |
| 121 | might_sleep(); | 131 | might_sleep(); |
diff --git a/kernel/signal.c b/kernel/signal.c index 7aaa51d8e5b8..372771e948c2 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
| @@ -2528,11 +2528,8 @@ static void __set_task_blocked(struct task_struct *tsk, const sigset_t *newset) | |||
| 2528 | */ | 2528 | */ |
| 2529 | void set_current_blocked(sigset_t *newset) | 2529 | void set_current_blocked(sigset_t *newset) |
| 2530 | { | 2530 | { |
| 2531 | struct task_struct *tsk = current; | ||
| 2532 | sigdelsetmask(newset, sigmask(SIGKILL) | sigmask(SIGSTOP)); | 2531 | sigdelsetmask(newset, sigmask(SIGKILL) | sigmask(SIGSTOP)); |
| 2533 | spin_lock_irq(&tsk->sighand->siglock); | 2532 | __set_current_blocked(newset); |
| 2534 | __set_task_blocked(tsk, newset); | ||
| 2535 | spin_unlock_irq(&tsk->sighand->siglock); | ||
| 2536 | } | 2533 | } |
| 2537 | 2534 | ||
| 2538 | void __set_current_blocked(const sigset_t *newset) | 2535 | void __set_current_blocked(const sigset_t *newset) |
| @@ -3204,7 +3201,6 @@ SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, nset, | |||
| 3204 | if (nset) { | 3201 | if (nset) { |
| 3205 | if (copy_from_user(&new_set, nset, sizeof(*nset))) | 3202 | if (copy_from_user(&new_set, nset, sizeof(*nset))) |
| 3206 | return -EFAULT; | 3203 | return -EFAULT; |
| 3207 | new_set &= ~(sigmask(SIGKILL) | sigmask(SIGSTOP)); | ||
| 3208 | 3204 | ||
| 3209 | new_blocked = current->blocked; | 3205 | new_blocked = current->blocked; |
| 3210 | 3206 | ||
| @@ -3222,7 +3218,7 @@ SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, nset, | |||
| 3222 | return -EINVAL; | 3218 | return -EINVAL; |
| 3223 | } | 3219 | } |
| 3224 | 3220 | ||
| 3225 | __set_current_blocked(&new_blocked); | 3221 | set_current_blocked(&new_blocked); |
| 3226 | } | 3222 | } |
| 3227 | 3223 | ||
| 3228 | if (oset) { | 3224 | if (oset) { |
| @@ -3286,6 +3282,7 @@ SYSCALL_DEFINE1(ssetmask, int, newmask) | |||
| 3286 | int old = current->blocked.sig[0]; | 3282 | int old = current->blocked.sig[0]; |
| 3287 | sigset_t newset; | 3283 | sigset_t newset; |
| 3288 | 3284 | ||
| 3285 | siginitset(&newset, newmask); | ||
| 3289 | set_current_blocked(&newset); | 3286 | set_current_blocked(&newset); |
| 3290 | 3287 | ||
| 3291 | return old; | 3288 | return old; |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index e5125677efa0..3c13e46d7d24 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
| @@ -2899,6 +2899,8 @@ tracing_trace_options_write(struct file *filp, const char __user *ubuf, | |||
| 2899 | if (copy_from_user(&buf, ubuf, cnt)) | 2899 | if (copy_from_user(&buf, ubuf, cnt)) |
| 2900 | return -EFAULT; | 2900 | return -EFAULT; |
| 2901 | 2901 | ||
| 2902 | buf[cnt] = 0; | ||
| 2903 | |||
| 2902 | trace_set_options(buf); | 2904 | trace_set_options(buf); |
| 2903 | 2905 | ||
| 2904 | *ppos += cnt; | 2906 | *ppos += cnt; |
| @@ -3452,7 +3454,7 @@ static int tracing_wait_pipe(struct file *filp) | |||
| 3452 | return -EINTR; | 3454 | return -EINTR; |
| 3453 | 3455 | ||
| 3454 | /* | 3456 | /* |
| 3455 | * We block until we read something and tracing is enabled. | 3457 | * We block until we read something and tracing is disabled. |
| 3456 | * We still block if tracing is disabled, but we have never | 3458 | * We still block if tracing is disabled, but we have never |
| 3457 | * read anything. This allows a user to cat this file, and | 3459 | * read anything. This allows a user to cat this file, and |
| 3458 | * then enable tracing. But after we have read something, | 3460 | * then enable tracing. But after we have read something, |
| @@ -3460,7 +3462,7 @@ static int tracing_wait_pipe(struct file *filp) | |||
| 3460 | * | 3462 | * |
| 3461 | * iter->pos will be 0 if we haven't read anything. | 3463 | * iter->pos will be 0 if we haven't read anything. |
| 3462 | */ | 3464 | */ |
| 3463 | if (tracing_is_enabled() && iter->pos) | 3465 | if (!tracing_is_enabled() && iter->pos) |
| 3464 | break; | 3466 | break; |
| 3465 | } | 3467 | } |
| 3466 | 3468 | ||
| @@ -4815,10 +4817,17 @@ rb_simple_write(struct file *filp, const char __user *ubuf, | |||
| 4815 | return ret; | 4817 | return ret; |
| 4816 | 4818 | ||
| 4817 | if (buffer) { | 4819 | if (buffer) { |
| 4818 | if (val) | 4820 | mutex_lock(&trace_types_lock); |
| 4821 | if (val) { | ||
| 4819 | ring_buffer_record_on(buffer); | 4822 | ring_buffer_record_on(buffer); |
| 4820 | else | 4823 | if (current_trace->start) |
| 4824 | current_trace->start(tr); | ||
| 4825 | } else { | ||
| 4821 | ring_buffer_record_off(buffer); | 4826 | ring_buffer_record_off(buffer); |
| 4827 | if (current_trace->stop) | ||
| 4828 | current_trace->stop(tr); | ||
| 4829 | } | ||
| 4830 | mutex_unlock(&trace_types_lock); | ||
| 4822 | } | 4831 | } |
| 4823 | 4832 | ||
| 4824 | (*ppos)++; | 4833 | (*ppos)++; |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 3a353091a903..67604e599384 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -134,7 +134,7 @@ config DEBUG_SECTION_MISMATCH | |||
| 134 | any use of code/data previously in these sections would | 134 | any use of code/data previously in these sections would |
| 135 | most likely result in an oops. | 135 | most likely result in an oops. |
| 136 | In the code, functions and variables are annotated with | 136 | In the code, functions and variables are annotated with |
| 137 | __init, __devinit, etc. (see the full list in include/linux/init.h), | 137 | __init, __cpuinit, etc. (see the full list in include/linux/init.h), |
| 138 | which results in the code/data being placed in specific sections. | 138 | which results in the code/data being placed in specific sections. |
| 139 | The section mismatch analysis is always performed after a full | 139 | The section mismatch analysis is always performed after a full |
| 140 | kernel build, and enabling this option causes the following | 140 | kernel build, and enabling this option causes the following |
diff --git a/lib/cpu_rmap.c b/lib/cpu_rmap.c index 145dec5267c9..5fbed5caba6e 100644 --- a/lib/cpu_rmap.c +++ b/lib/cpu_rmap.c | |||
| @@ -45,6 +45,7 @@ struct cpu_rmap *alloc_cpu_rmap(unsigned int size, gfp_t flags) | |||
| 45 | if (!rmap) | 45 | if (!rmap) |
| 46 | return NULL; | 46 | return NULL; |
| 47 | 47 | ||
| 48 | kref_init(&rmap->refcount); | ||
| 48 | rmap->obj = (void **)((char *)rmap + obj_offset); | 49 | rmap->obj = (void **)((char *)rmap + obj_offset); |
| 49 | 50 | ||
| 50 | /* Initially assign CPUs to objects on a rota, since we have | 51 | /* Initially assign CPUs to objects on a rota, since we have |
| @@ -63,6 +64,35 @@ struct cpu_rmap *alloc_cpu_rmap(unsigned int size, gfp_t flags) | |||
| 63 | } | 64 | } |
| 64 | EXPORT_SYMBOL(alloc_cpu_rmap); | 65 | EXPORT_SYMBOL(alloc_cpu_rmap); |
| 65 | 66 | ||
| 67 | /** | ||
| 68 | * cpu_rmap_release - internal reclaiming helper called from kref_put | ||
| 69 | * @ref: kref to struct cpu_rmap | ||
| 70 | */ | ||
| 71 | static void cpu_rmap_release(struct kref *ref) | ||
| 72 | { | ||
| 73 | struct cpu_rmap *rmap = container_of(ref, struct cpu_rmap, refcount); | ||
| 74 | kfree(rmap); | ||
| 75 | } | ||
| 76 | |||
| 77 | /** | ||
| 78 | * cpu_rmap_get - internal helper to get new ref on a cpu_rmap | ||
| 79 | * @rmap: reverse-map allocated with alloc_cpu_rmap() | ||
| 80 | */ | ||
| 81 | static inline void cpu_rmap_get(struct cpu_rmap *rmap) | ||
| 82 | { | ||
| 83 | kref_get(&rmap->refcount); | ||
| 84 | } | ||
| 85 | |||
| 86 | /** | ||
| 87 | * cpu_rmap_put - release ref on a cpu_rmap | ||
| 88 | * @rmap: reverse-map allocated with alloc_cpu_rmap() | ||
| 89 | */ | ||
| 90 | int cpu_rmap_put(struct cpu_rmap *rmap) | ||
| 91 | { | ||
| 92 | return kref_put(&rmap->refcount, cpu_rmap_release); | ||
| 93 | } | ||
| 94 | EXPORT_SYMBOL(cpu_rmap_put); | ||
| 95 | |||
| 66 | /* Reevaluate nearest object for given CPU, comparing with the given | 96 | /* Reevaluate nearest object for given CPU, comparing with the given |
| 67 | * neighbours at the given distance. | 97 | * neighbours at the given distance. |
| 68 | */ | 98 | */ |
| @@ -197,8 +227,7 @@ struct irq_glue { | |||
| 197 | * free_irq_cpu_rmap - free a CPU affinity reverse-map used for IRQs | 227 | * free_irq_cpu_rmap - free a CPU affinity reverse-map used for IRQs |
| 198 | * @rmap: Reverse-map allocated with alloc_irq_cpu_map(), or %NULL | 228 | * @rmap: Reverse-map allocated with alloc_irq_cpu_map(), or %NULL |
| 199 | * | 229 | * |
| 200 | * Must be called in process context, before freeing the IRQs, and | 230 | * Must be called in process context, before freeing the IRQs. |
| 201 | * without holding any locks required by global workqueue items. | ||
| 202 | */ | 231 | */ |
| 203 | void free_irq_cpu_rmap(struct cpu_rmap *rmap) | 232 | void free_irq_cpu_rmap(struct cpu_rmap *rmap) |
| 204 | { | 233 | { |
| @@ -212,12 +241,18 @@ void free_irq_cpu_rmap(struct cpu_rmap *rmap) | |||
| 212 | glue = rmap->obj[index]; | 241 | glue = rmap->obj[index]; |
| 213 | irq_set_affinity_notifier(glue->notify.irq, NULL); | 242 | irq_set_affinity_notifier(glue->notify.irq, NULL); |
| 214 | } | 243 | } |
| 215 | irq_run_affinity_notifiers(); | ||
| 216 | 244 | ||
| 217 | kfree(rmap); | 245 | cpu_rmap_put(rmap); |
| 218 | } | 246 | } |
| 219 | EXPORT_SYMBOL(free_irq_cpu_rmap); | 247 | EXPORT_SYMBOL(free_irq_cpu_rmap); |
| 220 | 248 | ||
| 249 | /** | ||
| 250 | * irq_cpu_rmap_notify - callback for IRQ subsystem when IRQ affinity updated | ||
| 251 | * @notify: struct irq_affinity_notify passed by irq/manage.c | ||
| 252 | * @mask: cpu mask for new SMP affinity | ||
| 253 | * | ||
| 254 | * This is executed in workqueue context. | ||
| 255 | */ | ||
| 221 | static void | 256 | static void |
| 222 | irq_cpu_rmap_notify(struct irq_affinity_notify *notify, const cpumask_t *mask) | 257 | irq_cpu_rmap_notify(struct irq_affinity_notify *notify, const cpumask_t *mask) |
| 223 | { | 258 | { |
| @@ -230,10 +265,16 @@ irq_cpu_rmap_notify(struct irq_affinity_notify *notify, const cpumask_t *mask) | |||
| 230 | pr_warning("irq_cpu_rmap_notify: update failed: %d\n", rc); | 265 | pr_warning("irq_cpu_rmap_notify: update failed: %d\n", rc); |
| 231 | } | 266 | } |
| 232 | 267 | ||
| 268 | /** | ||
| 269 | * irq_cpu_rmap_release - reclaiming callback for IRQ subsystem | ||
| 270 | * @ref: kref to struct irq_affinity_notify passed by irq/manage.c | ||
| 271 | */ | ||
| 233 | static void irq_cpu_rmap_release(struct kref *ref) | 272 | static void irq_cpu_rmap_release(struct kref *ref) |
| 234 | { | 273 | { |
| 235 | struct irq_glue *glue = | 274 | struct irq_glue *glue = |
| 236 | container_of(ref, struct irq_glue, notify.kref); | 275 | container_of(ref, struct irq_glue, notify.kref); |
| 276 | |||
| 277 | cpu_rmap_put(glue->rmap); | ||
| 237 | kfree(glue); | 278 | kfree(glue); |
| 238 | } | 279 | } |
| 239 | 280 | ||
| @@ -258,10 +299,13 @@ int irq_cpu_rmap_add(struct cpu_rmap *rmap, int irq) | |||
| 258 | glue->notify.notify = irq_cpu_rmap_notify; | 299 | glue->notify.notify = irq_cpu_rmap_notify; |
| 259 | glue->notify.release = irq_cpu_rmap_release; | 300 | glue->notify.release = irq_cpu_rmap_release; |
| 260 | glue->rmap = rmap; | 301 | glue->rmap = rmap; |
| 302 | cpu_rmap_get(rmap); | ||
| 261 | glue->index = cpu_rmap_add(rmap, glue); | 303 | glue->index = cpu_rmap_add(rmap, glue); |
| 262 | rc = irq_set_affinity_notifier(irq, &glue->notify); | 304 | rc = irq_set_affinity_notifier(irq, &glue->notify); |
| 263 | if (rc) | 305 | if (rc) { |
| 306 | cpu_rmap_put(glue->rmap); | ||
| 264 | kfree(glue); | 307 | kfree(glue); |
| 308 | } | ||
| 265 | return rc; | 309 | return rc; |
| 266 | } | 310 | } |
| 267 | EXPORT_SYMBOL(irq_cpu_rmap_add); | 311 | EXPORT_SYMBOL(irq_cpu_rmap_add); |
diff --git a/lib/rbtree.c b/lib/rbtree.c index 4f56a11d67fa..c0e31fe2fabf 100644 --- a/lib/rbtree.c +++ b/lib/rbtree.c | |||
| @@ -194,8 +194,12 @@ __rb_insert(struct rb_node *node, struct rb_root *root, | |||
| 194 | } | 194 | } |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | __always_inline void | 197 | /* |
| 198 | __rb_erase_color(struct rb_node *parent, struct rb_root *root, | 198 | * Inline version for rb_erase() use - we want to be able to inline |
| 199 | * and eliminate the dummy_rotate callback there | ||
| 200 | */ | ||
| 201 | static __always_inline void | ||
| 202 | ____rb_erase_color(struct rb_node *parent, struct rb_root *root, | ||
| 199 | void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) | 203 | void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) |
| 200 | { | 204 | { |
| 201 | struct rb_node *node = NULL, *sibling, *tmp1, *tmp2; | 205 | struct rb_node *node = NULL, *sibling, *tmp1, *tmp2; |
| @@ -355,6 +359,13 @@ __rb_erase_color(struct rb_node *parent, struct rb_root *root, | |||
| 355 | } | 359 | } |
| 356 | } | 360 | } |
| 357 | } | 361 | } |
| 362 | |||
| 363 | /* Non-inline version for rb_erase_augmented() use */ | ||
| 364 | void __rb_erase_color(struct rb_node *parent, struct rb_root *root, | ||
| 365 | void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) | ||
| 366 | { | ||
| 367 | ____rb_erase_color(parent, root, augment_rotate); | ||
| 368 | } | ||
| 358 | EXPORT_SYMBOL(__rb_erase_color); | 369 | EXPORT_SYMBOL(__rb_erase_color); |
| 359 | 370 | ||
| 360 | /* | 371 | /* |
| @@ -380,7 +391,10 @@ EXPORT_SYMBOL(rb_insert_color); | |||
| 380 | 391 | ||
| 381 | void rb_erase(struct rb_node *node, struct rb_root *root) | 392 | void rb_erase(struct rb_node *node, struct rb_root *root) |
| 382 | { | 393 | { |
| 383 | rb_erase_augmented(node, root, &dummy_callbacks); | 394 | struct rb_node *rebalance; |
| 395 | rebalance = __rb_erase_augmented(node, root, &dummy_callbacks); | ||
| 396 | if (rebalance) | ||
| 397 | ____rb_erase_color(rebalance, root, dummy_rotate); | ||
| 384 | } | 398 | } |
| 385 | EXPORT_SYMBOL(rb_erase); | 399 | EXPORT_SYMBOL(rb_erase); |
| 386 | 400 | ||
diff --git a/mm/bootmem.c b/mm/bootmem.c index 1324cd74faec..b93376c39b61 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c | |||
| @@ -185,10 +185,23 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata) | |||
| 185 | 185 | ||
| 186 | while (start < end) { | 186 | while (start < end) { |
| 187 | unsigned long *map, idx, vec; | 187 | unsigned long *map, idx, vec; |
| 188 | unsigned shift; | ||
| 188 | 189 | ||
| 189 | map = bdata->node_bootmem_map; | 190 | map = bdata->node_bootmem_map; |
| 190 | idx = start - bdata->node_min_pfn; | 191 | idx = start - bdata->node_min_pfn; |
| 192 | shift = idx & (BITS_PER_LONG - 1); | ||
| 193 | /* | ||
| 194 | * vec holds at most BITS_PER_LONG map bits, | ||
| 195 | * bit 0 corresponds to start. | ||
| 196 | */ | ||
| 191 | vec = ~map[idx / BITS_PER_LONG]; | 197 | vec = ~map[idx / BITS_PER_LONG]; |
| 198 | |||
| 199 | if (shift) { | ||
| 200 | vec >>= shift; | ||
| 201 | if (end - start >= BITS_PER_LONG) | ||
| 202 | vec |= ~map[idx / BITS_PER_LONG + 1] << | ||
| 203 | (BITS_PER_LONG - shift); | ||
| 204 | } | ||
| 192 | /* | 205 | /* |
| 193 | * If we have a properly aligned and fully unreserved | 206 | * If we have a properly aligned and fully unreserved |
| 194 | * BITS_PER_LONG block of pages in front of us, free | 207 | * BITS_PER_LONG block of pages in front of us, free |
| @@ -201,19 +214,18 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata) | |||
| 201 | count += BITS_PER_LONG; | 214 | count += BITS_PER_LONG; |
| 202 | start += BITS_PER_LONG; | 215 | start += BITS_PER_LONG; |
| 203 | } else { | 216 | } else { |
| 204 | unsigned long off = 0; | 217 | unsigned long cur = start; |
| 205 | 218 | ||
| 206 | vec >>= start & (BITS_PER_LONG - 1); | 219 | start = ALIGN(start + 1, BITS_PER_LONG); |
| 207 | while (vec) { | 220 | while (vec && cur != start) { |
| 208 | if (vec & 1) { | 221 | if (vec & 1) { |
| 209 | page = pfn_to_page(start + off); | 222 | page = pfn_to_page(cur); |
| 210 | __free_pages_bootmem(page, 0); | 223 | __free_pages_bootmem(page, 0); |
| 211 | count++; | 224 | count++; |
| 212 | } | 225 | } |
| 213 | vec >>= 1; | 226 | vec >>= 1; |
| 214 | off++; | 227 | ++cur; |
| 215 | } | 228 | } |
| 216 | start = ALIGN(start + 1, BITS_PER_LONG); | ||
| 217 | } | 229 | } |
| 218 | } | 230 | } |
| 219 | 231 | ||
diff --git a/mm/compaction.c b/mm/compaction.c index 6b807e466497..c62bd063d766 100644 --- a/mm/compaction.c +++ b/mm/compaction.c | |||
| @@ -816,6 +816,7 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone, | |||
| 816 | static int compact_finished(struct zone *zone, | 816 | static int compact_finished(struct zone *zone, |
| 817 | struct compact_control *cc) | 817 | struct compact_control *cc) |
| 818 | { | 818 | { |
| 819 | unsigned int order; | ||
| 819 | unsigned long watermark; | 820 | unsigned long watermark; |
| 820 | 821 | ||
| 821 | if (fatal_signal_pending(current)) | 822 | if (fatal_signal_pending(current)) |
| @@ -850,22 +851,16 @@ static int compact_finished(struct zone *zone, | |||
| 850 | return COMPACT_CONTINUE; | 851 | return COMPACT_CONTINUE; |
| 851 | 852 | ||
| 852 | /* Direct compactor: Is a suitable page free? */ | 853 | /* Direct compactor: Is a suitable page free? */ |
| 853 | if (cc->page) { | 854 | for (order = cc->order; order < MAX_ORDER; order++) { |
| 854 | /* Was a suitable page captured? */ | 855 | struct free_area *area = &zone->free_area[order]; |
| 855 | if (*cc->page) | 856 | |
| 857 | /* Job done if page is free of the right migratetype */ | ||
| 858 | if (!list_empty(&area->free_list[cc->migratetype])) | ||
| 859 | return COMPACT_PARTIAL; | ||
| 860 | |||
| 861 | /* Job done if allocation would set block type */ | ||
| 862 | if (cc->order >= pageblock_order && area->nr_free) | ||
| 856 | return COMPACT_PARTIAL; | 863 | return COMPACT_PARTIAL; |
| 857 | } else { | ||
| 858 | unsigned int order; | ||
| 859 | for (order = cc->order; order < MAX_ORDER; order++) { | ||
| 860 | struct free_area *area = &zone->free_area[cc->order]; | ||
| 861 | /* Job done if page is free of the right migratetype */ | ||
| 862 | if (!list_empty(&area->free_list[cc->migratetype])) | ||
| 863 | return COMPACT_PARTIAL; | ||
| 864 | |||
| 865 | /* Job done if allocation would set block type */ | ||
| 866 | if (cc->order >= pageblock_order && area->nr_free) | ||
| 867 | return COMPACT_PARTIAL; | ||
| 868 | } | ||
| 869 | } | 864 | } |
| 870 | 865 | ||
| 871 | return COMPACT_CONTINUE; | 866 | return COMPACT_CONTINUE; |
| @@ -921,60 +916,6 @@ unsigned long compaction_suitable(struct zone *zone, int order) | |||
| 921 | return COMPACT_CONTINUE; | 916 | return COMPACT_CONTINUE; |
| 922 | } | 917 | } |
| 923 | 918 | ||
| 924 | static void compact_capture_page(struct compact_control *cc) | ||
| 925 | { | ||
| 926 | unsigned long flags; | ||
| 927 | int mtype, mtype_low, mtype_high; | ||
| 928 | |||
| 929 | if (!cc->page || *cc->page) | ||
| 930 | return; | ||
| 931 | |||
| 932 | /* | ||
| 933 | * For MIGRATE_MOVABLE allocations we capture a suitable page ASAP | ||
| 934 | * regardless of the migratetype of the freelist is is captured from. | ||
| 935 | * This is fine because the order for a high-order MIGRATE_MOVABLE | ||
| 936 | * allocation is typically at least a pageblock size and overall | ||
| 937 | * fragmentation is not impaired. Other allocation types must | ||
| 938 | * capture pages from their own migratelist because otherwise they | ||
| 939 | * could pollute other pageblocks like MIGRATE_MOVABLE with | ||
| 940 | * difficult to move pages and making fragmentation worse overall. | ||
| 941 | */ | ||
| 942 | if (cc->migratetype == MIGRATE_MOVABLE) { | ||
| 943 | mtype_low = 0; | ||
| 944 | mtype_high = MIGRATE_PCPTYPES; | ||
| 945 | } else { | ||
| 946 | mtype_low = cc->migratetype; | ||
| 947 | mtype_high = cc->migratetype + 1; | ||
| 948 | } | ||
| 949 | |||
| 950 | /* Speculatively examine the free lists without zone lock */ | ||
| 951 | for (mtype = mtype_low; mtype < mtype_high; mtype++) { | ||
| 952 | int order; | ||
| 953 | for (order = cc->order; order < MAX_ORDER; order++) { | ||
| 954 | struct page *page; | ||
| 955 | struct free_area *area; | ||
| 956 | area = &(cc->zone->free_area[order]); | ||
| 957 | if (list_empty(&area->free_list[mtype])) | ||
| 958 | continue; | ||
| 959 | |||
| 960 | /* Take the lock and attempt capture of the page */ | ||
| 961 | if (!compact_trylock_irqsave(&cc->zone->lock, &flags, cc)) | ||
| 962 | return; | ||
| 963 | if (!list_empty(&area->free_list[mtype])) { | ||
| 964 | page = list_entry(area->free_list[mtype].next, | ||
| 965 | struct page, lru); | ||
| 966 | if (capture_free_page(page, cc->order, mtype)) { | ||
| 967 | spin_unlock_irqrestore(&cc->zone->lock, | ||
| 968 | flags); | ||
| 969 | *cc->page = page; | ||
| 970 | return; | ||
| 971 | } | ||
| 972 | } | ||
| 973 | spin_unlock_irqrestore(&cc->zone->lock, flags); | ||
| 974 | } | ||
| 975 | } | ||
| 976 | } | ||
| 977 | |||
| 978 | static int compact_zone(struct zone *zone, struct compact_control *cc) | 919 | static int compact_zone(struct zone *zone, struct compact_control *cc) |
| 979 | { | 920 | { |
| 980 | int ret; | 921 | int ret; |
| @@ -1054,9 +995,6 @@ static int compact_zone(struct zone *zone, struct compact_control *cc) | |||
| 1054 | goto out; | 995 | goto out; |
| 1055 | } | 996 | } |
| 1056 | } | 997 | } |
| 1057 | |||
| 1058 | /* Capture a page now if it is a suitable size */ | ||
| 1059 | compact_capture_page(cc); | ||
| 1060 | } | 998 | } |
| 1061 | 999 | ||
| 1062 | out: | 1000 | out: |
| @@ -1069,8 +1007,7 @@ out: | |||
| 1069 | 1007 | ||
| 1070 | static unsigned long compact_zone_order(struct zone *zone, | 1008 | static unsigned long compact_zone_order(struct zone *zone, |
| 1071 | int order, gfp_t gfp_mask, | 1009 | int order, gfp_t gfp_mask, |
| 1072 | bool sync, bool *contended, | 1010 | bool sync, bool *contended) |
| 1073 | struct page **page) | ||
| 1074 | { | 1011 | { |
| 1075 | unsigned long ret; | 1012 | unsigned long ret; |
| 1076 | struct compact_control cc = { | 1013 | struct compact_control cc = { |
| @@ -1080,7 +1017,6 @@ static unsigned long compact_zone_order(struct zone *zone, | |||
| 1080 | .migratetype = allocflags_to_migratetype(gfp_mask), | 1017 | .migratetype = allocflags_to_migratetype(gfp_mask), |
| 1081 | .zone = zone, | 1018 | .zone = zone, |
| 1082 | .sync = sync, | 1019 | .sync = sync, |
| 1083 | .page = page, | ||
| 1084 | }; | 1020 | }; |
| 1085 | INIT_LIST_HEAD(&cc.freepages); | 1021 | INIT_LIST_HEAD(&cc.freepages); |
| 1086 | INIT_LIST_HEAD(&cc.migratepages); | 1022 | INIT_LIST_HEAD(&cc.migratepages); |
| @@ -1110,7 +1046,7 @@ int sysctl_extfrag_threshold = 500; | |||
| 1110 | */ | 1046 | */ |
| 1111 | unsigned long try_to_compact_pages(struct zonelist *zonelist, | 1047 | unsigned long try_to_compact_pages(struct zonelist *zonelist, |
| 1112 | int order, gfp_t gfp_mask, nodemask_t *nodemask, | 1048 | int order, gfp_t gfp_mask, nodemask_t *nodemask, |
| 1113 | bool sync, bool *contended, struct page **page) | 1049 | bool sync, bool *contended) |
| 1114 | { | 1050 | { |
| 1115 | enum zone_type high_zoneidx = gfp_zone(gfp_mask); | 1051 | enum zone_type high_zoneidx = gfp_zone(gfp_mask); |
| 1116 | int may_enter_fs = gfp_mask & __GFP_FS; | 1052 | int may_enter_fs = gfp_mask & __GFP_FS; |
| @@ -1136,7 +1072,7 @@ unsigned long try_to_compact_pages(struct zonelist *zonelist, | |||
| 1136 | int status; | 1072 | int status; |
| 1137 | 1073 | ||
| 1138 | status = compact_zone_order(zone, order, gfp_mask, sync, | 1074 | status = compact_zone_order(zone, order, gfp_mask, sync, |
| 1139 | contended, page); | 1075 | contended); |
| 1140 | rc = max(status, rc); | 1076 | rc = max(status, rc); |
| 1141 | 1077 | ||
| 1142 | /* If a normal allocation would succeed, stop compacting */ | 1078 | /* If a normal allocation would succeed, stop compacting */ |
| @@ -1192,7 +1128,6 @@ int compact_pgdat(pg_data_t *pgdat, int order) | |||
| 1192 | struct compact_control cc = { | 1128 | struct compact_control cc = { |
| 1193 | .order = order, | 1129 | .order = order, |
| 1194 | .sync = false, | 1130 | .sync = false, |
| 1195 | .page = NULL, | ||
| 1196 | }; | 1131 | }; |
| 1197 | 1132 | ||
| 1198 | return __compact_pgdat(pgdat, &cc); | 1133 | return __compact_pgdat(pgdat, &cc); |
| @@ -1203,14 +1138,13 @@ static int compact_node(int nid) | |||
| 1203 | struct compact_control cc = { | 1138 | struct compact_control cc = { |
| 1204 | .order = -1, | 1139 | .order = -1, |
| 1205 | .sync = true, | 1140 | .sync = true, |
| 1206 | .page = NULL, | ||
| 1207 | }; | 1141 | }; |
| 1208 | 1142 | ||
| 1209 | return __compact_pgdat(NODE_DATA(nid), &cc); | 1143 | return __compact_pgdat(NODE_DATA(nid), &cc); |
| 1210 | } | 1144 | } |
| 1211 | 1145 | ||
| 1212 | /* Compact all nodes in the system */ | 1146 | /* Compact all nodes in the system */ |
| 1213 | static int compact_nodes(void) | 1147 | static void compact_nodes(void) |
| 1214 | { | 1148 | { |
| 1215 | int nid; | 1149 | int nid; |
| 1216 | 1150 | ||
| @@ -1219,8 +1153,6 @@ static int compact_nodes(void) | |||
| 1219 | 1153 | ||
| 1220 | for_each_online_node(nid) | 1154 | for_each_online_node(nid) |
| 1221 | compact_node(nid); | 1155 | compact_node(nid); |
| 1222 | |||
| 1223 | return COMPACT_COMPLETE; | ||
| 1224 | } | 1156 | } |
| 1225 | 1157 | ||
| 1226 | /* The written value is actually unused, all memory is compacted */ | 1158 | /* The written value is actually unused, all memory is compacted */ |
| @@ -1231,7 +1163,7 @@ int sysctl_compaction_handler(struct ctl_table *table, int write, | |||
| 1231 | void __user *buffer, size_t *length, loff_t *ppos) | 1163 | void __user *buffer, size_t *length, loff_t *ppos) |
| 1232 | { | 1164 | { |
| 1233 | if (write) | 1165 | if (write) |
| 1234 | return compact_nodes(); | 1166 | compact_nodes(); |
| 1235 | 1167 | ||
| 1236 | return 0; | 1168 | return 0; |
| 1237 | } | 1169 | } |
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 9e894edc7811..6001ee6347a9 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
| @@ -1819,9 +1819,19 @@ int split_huge_page(struct page *page) | |||
| 1819 | 1819 | ||
| 1820 | BUG_ON(is_huge_zero_pfn(page_to_pfn(page))); | 1820 | BUG_ON(is_huge_zero_pfn(page_to_pfn(page))); |
| 1821 | BUG_ON(!PageAnon(page)); | 1821 | BUG_ON(!PageAnon(page)); |
| 1822 | anon_vma = page_lock_anon_vma_read(page); | 1822 | |
| 1823 | /* | ||
| 1824 | * The caller does not necessarily hold an mmap_sem that would prevent | ||
| 1825 | * the anon_vma disappearing so we first we take a reference to it | ||
| 1826 | * and then lock the anon_vma for write. This is similar to | ||
| 1827 | * page_lock_anon_vma_read except the write lock is taken to serialise | ||
| 1828 | * against parallel split or collapse operations. | ||
| 1829 | */ | ||
| 1830 | anon_vma = page_get_anon_vma(page); | ||
| 1823 | if (!anon_vma) | 1831 | if (!anon_vma) |
| 1824 | goto out; | 1832 | goto out; |
| 1833 | anon_vma_lock_write(anon_vma); | ||
| 1834 | |||
| 1825 | ret = 0; | 1835 | ret = 0; |
| 1826 | if (!PageCompound(page)) | 1836 | if (!PageCompound(page)) |
| 1827 | goto out_unlock; | 1837 | goto out_unlock; |
| @@ -1832,7 +1842,8 @@ int split_huge_page(struct page *page) | |||
| 1832 | 1842 | ||
| 1833 | BUG_ON(PageCompound(page)); | 1843 | BUG_ON(PageCompound(page)); |
| 1834 | out_unlock: | 1844 | out_unlock: |
| 1835 | page_unlock_anon_vma_read(anon_vma); | 1845 | anon_vma_unlock(anon_vma); |
| 1846 | put_anon_vma(anon_vma); | ||
| 1836 | out: | 1847 | out: |
| 1837 | return ret; | 1848 | return ret; |
| 1838 | } | 1849 | } |
diff --git a/mm/internal.h b/mm/internal.h index d597f94cc205..9ba21100ebf3 100644 --- a/mm/internal.h +++ b/mm/internal.h | |||
| @@ -135,7 +135,6 @@ struct compact_control { | |||
| 135 | int migratetype; /* MOVABLE, RECLAIMABLE etc */ | 135 | int migratetype; /* MOVABLE, RECLAIMABLE etc */ |
| 136 | struct zone *zone; | 136 | struct zone *zone; |
| 137 | bool contended; /* True if a lock was contended */ | 137 | bool contended; /* True if a lock was contended */ |
| 138 | struct page **page; /* Page captured of requested size */ | ||
| 139 | }; | 138 | }; |
| 140 | 139 | ||
| 141 | unsigned long | 140 | unsigned long |
diff --git a/mm/memblock.c b/mm/memblock.c index 625905523c2a..88adc8afb610 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
| @@ -314,7 +314,8 @@ static void __init_memblock memblock_merge_regions(struct memblock_type *type) | |||
| 314 | } | 314 | } |
| 315 | 315 | ||
| 316 | this->size += next->size; | 316 | this->size += next->size; |
| 317 | memmove(next, next + 1, (type->cnt - (i + 1)) * sizeof(*next)); | 317 | /* move forward from next + 1, index of which is i + 2 */ |
| 318 | memmove(next, next + 1, (type->cnt - (i + 2)) * sizeof(*next)); | ||
| 318 | type->cnt--; | 319 | type->cnt--; |
| 319 | } | 320 | } |
| 320 | } | 321 | } |
diff --git a/mm/memory.c b/mm/memory.c index e0a9b0ce4f10..bb1369f7b9b4 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
| @@ -184,10 +184,14 @@ static int tlb_next_batch(struct mmu_gather *tlb) | |||
| 184 | return 1; | 184 | return 1; |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | if (tlb->batch_count == MAX_GATHER_BATCH_COUNT) | ||
| 188 | return 0; | ||
| 189 | |||
| 187 | batch = (void *)__get_free_pages(GFP_NOWAIT | __GFP_NOWARN, 0); | 190 | batch = (void *)__get_free_pages(GFP_NOWAIT | __GFP_NOWARN, 0); |
| 188 | if (!batch) | 191 | if (!batch) |
| 189 | return 0; | 192 | return 0; |
| 190 | 193 | ||
| 194 | tlb->batch_count++; | ||
| 191 | batch->next = NULL; | 195 | batch->next = NULL; |
| 192 | batch->nr = 0; | 196 | batch->nr = 0; |
| 193 | batch->max = MAX_GATHER_BATCH; | 197 | batch->max = MAX_GATHER_BATCH; |
| @@ -216,6 +220,7 @@ void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, bool fullmm) | |||
| 216 | tlb->local.nr = 0; | 220 | tlb->local.nr = 0; |
| 217 | tlb->local.max = ARRAY_SIZE(tlb->__pages); | 221 | tlb->local.max = ARRAY_SIZE(tlb->__pages); |
| 218 | tlb->active = &tlb->local; | 222 | tlb->active = &tlb->local; |
| 223 | tlb->batch_count = 0; | ||
| 219 | 224 | ||
| 220 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE | 225 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE |
| 221 | tlb->batch = NULL; | 226 | tlb->batch = NULL; |
| @@ -3706,6 +3711,14 @@ retry: | |||
| 3706 | if (pmd_trans_huge(orig_pmd)) { | 3711 | if (pmd_trans_huge(orig_pmd)) { |
| 3707 | unsigned int dirty = flags & FAULT_FLAG_WRITE; | 3712 | unsigned int dirty = flags & FAULT_FLAG_WRITE; |
| 3708 | 3713 | ||
| 3714 | /* | ||
| 3715 | * If the pmd is splitting, return and retry the | ||
| 3716 | * the fault. Alternative: wait until the split | ||
| 3717 | * is done, and goto retry. | ||
| 3718 | */ | ||
| 3719 | if (pmd_trans_splitting(orig_pmd)) | ||
| 3720 | return 0; | ||
| 3721 | |||
| 3709 | if (pmd_numa(orig_pmd)) | 3722 | if (pmd_numa(orig_pmd)) |
| 3710 | return do_huge_pmd_numa_page(mm, vma, address, | 3723 | return do_huge_pmd_numa_page(mm, vma, address, |
| 3711 | orig_pmd, pmd); | 3724 | orig_pmd, pmd); |
diff --git a/mm/migrate.c b/mm/migrate.c index 3b676b0c5c3e..c38778610aa8 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
| @@ -1679,9 +1679,21 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm, | |||
| 1679 | page_xchg_last_nid(new_page, page_last_nid(page)); | 1679 | page_xchg_last_nid(new_page, page_last_nid(page)); |
| 1680 | 1680 | ||
| 1681 | isolated = numamigrate_isolate_page(pgdat, page); | 1681 | isolated = numamigrate_isolate_page(pgdat, page); |
| 1682 | if (!isolated) { | 1682 | |
| 1683 | /* | ||
| 1684 | * Failing to isolate or a GUP pin prevents migration. The expected | ||
| 1685 | * page count is 2. 1 for anonymous pages without a mapping and 1 | ||
| 1686 | * for the callers pin. If the page was isolated, the page will | ||
| 1687 | * need to be put back on the LRU. | ||
| 1688 | */ | ||
| 1689 | if (!isolated || page_count(page) != 2) { | ||
| 1683 | count_vm_events(PGMIGRATE_FAIL, HPAGE_PMD_NR); | 1690 | count_vm_events(PGMIGRATE_FAIL, HPAGE_PMD_NR); |
| 1684 | put_page(new_page); | 1691 | put_page(new_page); |
| 1692 | if (isolated) { | ||
| 1693 | putback_lru_page(page); | ||
| 1694 | isolated = 0; | ||
| 1695 | goto out; | ||
| 1696 | } | ||
| 1685 | goto out_keep_locked; | 1697 | goto out_keep_locked; |
| 1686 | } | 1698 | } |
| 1687 | 1699 | ||
| @@ -2886,7 +2886,7 @@ static void vm_lock_anon_vma(struct mm_struct *mm, struct anon_vma *anon_vma) | |||
| 2886 | * The LSB of head.next can't change from under us | 2886 | * The LSB of head.next can't change from under us |
| 2887 | * because we hold the mm_all_locks_mutex. | 2887 | * because we hold the mm_all_locks_mutex. |
| 2888 | */ | 2888 | */ |
| 2889 | down_write(&anon_vma->root->rwsem); | 2889 | down_write_nest_lock(&anon_vma->root->rwsem, &mm->mmap_sem); |
| 2890 | /* | 2890 | /* |
| 2891 | * We can safely modify head.next after taking the | 2891 | * We can safely modify head.next after taking the |
| 2892 | * anon_vma->root->rwsem. If some other vma in this mm shares | 2892 | * anon_vma->root->rwsem. If some other vma in this mm shares |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 4ba5e37127fc..df2022ff0c8a 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
| @@ -221,11 +221,6 @@ EXPORT_SYMBOL(nr_online_nodes); | |||
| 221 | 221 | ||
| 222 | int page_group_by_mobility_disabled __read_mostly; | 222 | int page_group_by_mobility_disabled __read_mostly; |
| 223 | 223 | ||
| 224 | /* | ||
| 225 | * NOTE: | ||
| 226 | * Don't use set_pageblock_migratetype(page, MIGRATE_ISOLATE) directly. | ||
| 227 | * Instead, use {un}set_pageblock_isolate. | ||
| 228 | */ | ||
| 229 | void set_pageblock_migratetype(struct page *page, int migratetype) | 224 | void set_pageblock_migratetype(struct page *page, int migratetype) |
| 230 | { | 225 | { |
| 231 | 226 | ||
| @@ -1389,14 +1384,8 @@ void split_page(struct page *page, unsigned int order) | |||
| 1389 | set_page_refcounted(page + i); | 1384 | set_page_refcounted(page + i); |
| 1390 | } | 1385 | } |
| 1391 | 1386 | ||
| 1392 | /* | 1387 | static int __isolate_free_page(struct page *page, unsigned int order) |
| 1393 | * Similar to the split_page family of functions except that the page | ||
| 1394 | * required at the given order and being isolated now to prevent races | ||
| 1395 | * with parallel allocators | ||
| 1396 | */ | ||
| 1397 | int capture_free_page(struct page *page, int alloc_order, int migratetype) | ||
| 1398 | { | 1388 | { |
| 1399 | unsigned int order; | ||
| 1400 | unsigned long watermark; | 1389 | unsigned long watermark; |
| 1401 | struct zone *zone; | 1390 | struct zone *zone; |
| 1402 | int mt; | 1391 | int mt; |
| @@ -1404,7 +1393,6 @@ int capture_free_page(struct page *page, int alloc_order, int migratetype) | |||
| 1404 | BUG_ON(!PageBuddy(page)); | 1393 | BUG_ON(!PageBuddy(page)); |
| 1405 | 1394 | ||
| 1406 | zone = page_zone(page); | 1395 | zone = page_zone(page); |
| 1407 | order = page_order(page); | ||
| 1408 | mt = get_pageblock_migratetype(page); | 1396 | mt = get_pageblock_migratetype(page); |
| 1409 | 1397 | ||
| 1410 | if (mt != MIGRATE_ISOLATE) { | 1398 | if (mt != MIGRATE_ISOLATE) { |
| @@ -1413,7 +1401,7 @@ int capture_free_page(struct page *page, int alloc_order, int migratetype) | |||
| 1413 | if (!zone_watermark_ok(zone, 0, watermark, 0, 0)) | 1401 | if (!zone_watermark_ok(zone, 0, watermark, 0, 0)) |
| 1414 | return 0; | 1402 | return 0; |
| 1415 | 1403 | ||
| 1416 | __mod_zone_freepage_state(zone, -(1UL << alloc_order), mt); | 1404 | __mod_zone_freepage_state(zone, -(1UL << order), mt); |
| 1417 | } | 1405 | } |
| 1418 | 1406 | ||
| 1419 | /* Remove page from free list */ | 1407 | /* Remove page from free list */ |
| @@ -1421,11 +1409,7 @@ int capture_free_page(struct page *page, int alloc_order, int migratetype) | |||
| 1421 | zone->free_area[order].nr_free--; | 1409 | zone->free_area[order].nr_free--; |
| 1422 | rmv_page_order(page); | 1410 | rmv_page_order(page); |
| 1423 | 1411 | ||
| 1424 | if (alloc_order != order) | 1412 | /* Set the pageblock if the isolated page is at least a pageblock */ |
| 1425 | expand(zone, page, alloc_order, order, | ||
| 1426 | &zone->free_area[order], migratetype); | ||
| 1427 | |||
| 1428 | /* Set the pageblock if the captured page is at least a pageblock */ | ||
| 1429 | if (order >= pageblock_order - 1) { | 1413 | if (order >= pageblock_order - 1) { |
| 1430 | struct page *endpage = page + (1 << order) - 1; | 1414 | struct page *endpage = page + (1 << order) - 1; |
| 1431 | for (; page < endpage; page += pageblock_nr_pages) { | 1415 | for (; page < endpage; page += pageblock_nr_pages) { |
| @@ -1436,7 +1420,7 @@ int capture_free_page(struct page *page, int alloc_order, int migratetype) | |||
| 1436 | } | 1420 | } |
| 1437 | } | 1421 | } |
| 1438 | 1422 | ||
| 1439 | return 1UL << alloc_order; | 1423 | return 1UL << order; |
| 1440 | } | 1424 | } |
| 1441 | 1425 | ||
| 1442 | /* | 1426 | /* |
| @@ -1454,10 +1438,9 @@ int split_free_page(struct page *page) | |||
| 1454 | unsigned int order; | 1438 | unsigned int order; |
| 1455 | int nr_pages; | 1439 | int nr_pages; |
| 1456 | 1440 | ||
| 1457 | BUG_ON(!PageBuddy(page)); | ||
| 1458 | order = page_order(page); | 1441 | order = page_order(page); |
| 1459 | 1442 | ||
| 1460 | nr_pages = capture_free_page(page, order, 0); | 1443 | nr_pages = __isolate_free_page(page, order); |
| 1461 | if (!nr_pages) | 1444 | if (!nr_pages) |
| 1462 | return 0; | 1445 | return 0; |
| 1463 | 1446 | ||
| @@ -1655,20 +1638,6 @@ static bool __zone_watermark_ok(struct zone *z, int order, unsigned long mark, | |||
| 1655 | return true; | 1638 | return true; |
| 1656 | } | 1639 | } |
| 1657 | 1640 | ||
| 1658 | #ifdef CONFIG_MEMORY_ISOLATION | ||
| 1659 | static inline unsigned long nr_zone_isolate_freepages(struct zone *zone) | ||
| 1660 | { | ||
| 1661 | if (unlikely(zone->nr_pageblock_isolate)) | ||
| 1662 | return zone->nr_pageblock_isolate * pageblock_nr_pages; | ||
| 1663 | return 0; | ||
| 1664 | } | ||
| 1665 | #else | ||
| 1666 | static inline unsigned long nr_zone_isolate_freepages(struct zone *zone) | ||
| 1667 | { | ||
| 1668 | return 0; | ||
| 1669 | } | ||
| 1670 | #endif | ||
| 1671 | |||
| 1672 | bool zone_watermark_ok(struct zone *z, int order, unsigned long mark, | 1641 | bool zone_watermark_ok(struct zone *z, int order, unsigned long mark, |
| 1673 | int classzone_idx, int alloc_flags) | 1642 | int classzone_idx, int alloc_flags) |
| 1674 | { | 1643 | { |
| @@ -1684,14 +1653,6 @@ bool zone_watermark_ok_safe(struct zone *z, int order, unsigned long mark, | |||
| 1684 | if (z->percpu_drift_mark && free_pages < z->percpu_drift_mark) | 1653 | if (z->percpu_drift_mark && free_pages < z->percpu_drift_mark) |
| 1685 | free_pages = zone_page_state_snapshot(z, NR_FREE_PAGES); | 1654 | free_pages = zone_page_state_snapshot(z, NR_FREE_PAGES); |
| 1686 | 1655 | ||
| 1687 | /* | ||
| 1688 | * If the zone has MIGRATE_ISOLATE type free pages, we should consider | ||
| 1689 | * it. nr_zone_isolate_freepages is never accurate so kswapd might not | ||
| 1690 | * sleep although it could do so. But this is more desirable for memory | ||
| 1691 | * hotplug than sleeping which can cause a livelock in the direct | ||
| 1692 | * reclaim path. | ||
| 1693 | */ | ||
| 1694 | free_pages -= nr_zone_isolate_freepages(z); | ||
| 1695 | return __zone_watermark_ok(z, order, mark, classzone_idx, alloc_flags, | 1656 | return __zone_watermark_ok(z, order, mark, classzone_idx, alloc_flags, |
| 1696 | free_pages); | 1657 | free_pages); |
| 1697 | } | 1658 | } |
| @@ -2163,8 +2124,6 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order, | |||
| 2163 | bool *contended_compaction, bool *deferred_compaction, | 2124 | bool *contended_compaction, bool *deferred_compaction, |
| 2164 | unsigned long *did_some_progress) | 2125 | unsigned long *did_some_progress) |
| 2165 | { | 2126 | { |
| 2166 | struct page *page = NULL; | ||
| 2167 | |||
| 2168 | if (!order) | 2127 | if (!order) |
| 2169 | return NULL; | 2128 | return NULL; |
| 2170 | 2129 | ||
| @@ -2176,16 +2135,12 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order, | |||
| 2176 | current->flags |= PF_MEMALLOC; | 2135 | current->flags |= PF_MEMALLOC; |
| 2177 | *did_some_progress = try_to_compact_pages(zonelist, order, gfp_mask, | 2136 | *did_some_progress = try_to_compact_pages(zonelist, order, gfp_mask, |
| 2178 | nodemask, sync_migration, | 2137 | nodemask, sync_migration, |
| 2179 | contended_compaction, &page); | 2138 | contended_compaction); |
| 2180 | current->flags &= ~PF_MEMALLOC; | 2139 | current->flags &= ~PF_MEMALLOC; |
| 2181 | 2140 | ||
| 2182 | /* If compaction captured a page, prep and use it */ | ||
| 2183 | if (page) { | ||
| 2184 | prep_new_page(page, order, gfp_mask); | ||
| 2185 | goto got_page; | ||
| 2186 | } | ||
| 2187 | |||
| 2188 | if (*did_some_progress != COMPACT_SKIPPED) { | 2141 | if (*did_some_progress != COMPACT_SKIPPED) { |
| 2142 | struct page *page; | ||
| 2143 | |||
| 2189 | /* Page migration frees to the PCP lists but we want merging */ | 2144 | /* Page migration frees to the PCP lists but we want merging */ |
| 2190 | drain_pages(get_cpu()); | 2145 | drain_pages(get_cpu()); |
| 2191 | put_cpu(); | 2146 | put_cpu(); |
| @@ -2195,7 +2150,6 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order, | |||
| 2195 | alloc_flags & ~ALLOC_NO_WATERMARKS, | 2150 | alloc_flags & ~ALLOC_NO_WATERMARKS, |
| 2196 | preferred_zone, migratetype); | 2151 | preferred_zone, migratetype); |
| 2197 | if (page) { | 2152 | if (page) { |
| 2198 | got_page: | ||
| 2199 | preferred_zone->compact_blockskip_flush = false; | 2153 | preferred_zone->compact_blockskip_flush = false; |
| 2200 | preferred_zone->compact_considered = 0; | 2154 | preferred_zone->compact_considered = 0; |
| 2201 | preferred_zone->compact_defer_shift = 0; | 2155 | preferred_zone->compact_defer_shift = 0; |
| @@ -5631,7 +5585,7 @@ static inline int pfn_to_bitidx(struct zone *zone, unsigned long pfn) | |||
| 5631 | pfn &= (PAGES_PER_SECTION-1); | 5585 | pfn &= (PAGES_PER_SECTION-1); |
| 5632 | return (pfn >> pageblock_order) * NR_PAGEBLOCK_BITS; | 5586 | return (pfn >> pageblock_order) * NR_PAGEBLOCK_BITS; |
| 5633 | #else | 5587 | #else |
| 5634 | pfn = pfn - zone->zone_start_pfn; | 5588 | pfn = pfn - round_down(zone->zone_start_pfn, pageblock_nr_pages); |
| 5635 | return (pfn >> pageblock_order) * NR_PAGEBLOCK_BITS; | 5589 | return (pfn >> pageblock_order) * NR_PAGEBLOCK_BITS; |
| 5636 | #endif /* CONFIG_SPARSEMEM */ | 5590 | #endif /* CONFIG_SPARSEMEM */ |
| 5637 | } | 5591 | } |
diff --git a/mm/page_isolation.c b/mm/page_isolation.c index 9d2264ea4606..383bdbb98b04 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c | |||
| @@ -8,28 +8,6 @@ | |||
| 8 | #include <linux/memory.h> | 8 | #include <linux/memory.h> |
| 9 | #include "internal.h" | 9 | #include "internal.h" |
| 10 | 10 | ||
| 11 | /* called while holding zone->lock */ | ||
| 12 | static void set_pageblock_isolate(struct page *page) | ||
| 13 | { | ||
| 14 | if (get_pageblock_migratetype(page) == MIGRATE_ISOLATE) | ||
| 15 | return; | ||
| 16 | |||
| 17 | set_pageblock_migratetype(page, MIGRATE_ISOLATE); | ||
| 18 | page_zone(page)->nr_pageblock_isolate++; | ||
| 19 | } | ||
| 20 | |||
| 21 | /* called while holding zone->lock */ | ||
| 22 | static void restore_pageblock_isolate(struct page *page, int migratetype) | ||
| 23 | { | ||
| 24 | struct zone *zone = page_zone(page); | ||
| 25 | if (WARN_ON(get_pageblock_migratetype(page) != MIGRATE_ISOLATE)) | ||
| 26 | return; | ||
| 27 | |||
| 28 | BUG_ON(zone->nr_pageblock_isolate <= 0); | ||
| 29 | set_pageblock_migratetype(page, migratetype); | ||
| 30 | zone->nr_pageblock_isolate--; | ||
| 31 | } | ||
| 32 | |||
| 33 | int set_migratetype_isolate(struct page *page, bool skip_hwpoisoned_pages) | 11 | int set_migratetype_isolate(struct page *page, bool skip_hwpoisoned_pages) |
| 34 | { | 12 | { |
| 35 | struct zone *zone; | 13 | struct zone *zone; |
| @@ -80,7 +58,7 @@ out: | |||
| 80 | unsigned long nr_pages; | 58 | unsigned long nr_pages; |
| 81 | int migratetype = get_pageblock_migratetype(page); | 59 | int migratetype = get_pageblock_migratetype(page); |
| 82 | 60 | ||
| 83 | set_pageblock_isolate(page); | 61 | set_pageblock_migratetype(page, MIGRATE_ISOLATE); |
| 84 | nr_pages = move_freepages_block(zone, page, MIGRATE_ISOLATE); | 62 | nr_pages = move_freepages_block(zone, page, MIGRATE_ISOLATE); |
| 85 | 63 | ||
| 86 | __mod_zone_freepage_state(zone, -nr_pages, migratetype); | 64 | __mod_zone_freepage_state(zone, -nr_pages, migratetype); |
| @@ -103,7 +81,7 @@ void unset_migratetype_isolate(struct page *page, unsigned migratetype) | |||
| 103 | goto out; | 81 | goto out; |
| 104 | nr_pages = move_freepages_block(zone, page, migratetype); | 82 | nr_pages = move_freepages_block(zone, page, migratetype); |
| 105 | __mod_zone_freepage_state(zone, nr_pages, migratetype); | 83 | __mod_zone_freepage_state(zone, nr_pages, migratetype); |
| 106 | restore_pageblock_isolate(page, migratetype); | 84 | set_pageblock_migratetype(page, migratetype); |
| 107 | out: | 85 | out: |
| 108 | spin_unlock_irqrestore(&zone->lock, flags); | 86 | spin_unlock_irqrestore(&zone->lock, flags); |
| 109 | } | 87 | } |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 16b42af393ac..196709f5ee58 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
| @@ -3122,8 +3122,8 @@ unsigned long shrink_all_memory(unsigned long nr_to_reclaim) | |||
| 3122 | not required for correctness. So if the last cpu in a node goes | 3122 | not required for correctness. So if the last cpu in a node goes |
| 3123 | away, we get changed to run anywhere: as the first one comes back, | 3123 | away, we get changed to run anywhere: as the first one comes back, |
| 3124 | restore their cpu bindings. */ | 3124 | restore their cpu bindings. */ |
| 3125 | static int __devinit cpu_callback(struct notifier_block *nfb, | 3125 | static int cpu_callback(struct notifier_block *nfb, unsigned long action, |
| 3126 | unsigned long action, void *hcpu) | 3126 | void *hcpu) |
| 3127 | { | 3127 | { |
| 3128 | int nid; | 3128 | int nid; |
| 3129 | 3129 | ||
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 5391ca43336a..6d6f26531de2 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
| @@ -1608,7 +1608,6 @@ void br_multicast_init(struct net_bridge *br) | |||
| 1608 | br_multicast_querier_expired, (unsigned long)br); | 1608 | br_multicast_querier_expired, (unsigned long)br); |
| 1609 | setup_timer(&br->multicast_query_timer, br_multicast_query_expired, | 1609 | setup_timer(&br->multicast_query_timer, br_multicast_query_expired, |
| 1610 | (unsigned long)br); | 1610 | (unsigned long)br); |
| 1611 | br_mdb_init(); | ||
| 1612 | } | 1611 | } |
| 1613 | 1612 | ||
| 1614 | void br_multicast_open(struct net_bridge *br) | 1613 | void br_multicast_open(struct net_bridge *br) |
| @@ -1633,7 +1632,6 @@ void br_multicast_stop(struct net_bridge *br) | |||
| 1633 | del_timer_sync(&br->multicast_querier_timer); | 1632 | del_timer_sync(&br->multicast_querier_timer); |
| 1634 | del_timer_sync(&br->multicast_query_timer); | 1633 | del_timer_sync(&br->multicast_query_timer); |
| 1635 | 1634 | ||
| 1636 | br_mdb_uninit(); | ||
| 1637 | spin_lock_bh(&br->multicast_lock); | 1635 | spin_lock_bh(&br->multicast_lock); |
| 1638 | mdb = mlock_dereference(br->mdb, br); | 1636 | mdb = mlock_dereference(br->mdb, br); |
| 1639 | if (!mdb) | 1637 | if (!mdb) |
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index 97ba0189c6f7..5dc66abcc9e2 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c | |||
| @@ -299,10 +299,21 @@ struct rtnl_link_ops br_link_ops __read_mostly = { | |||
| 299 | 299 | ||
| 300 | int __init br_netlink_init(void) | 300 | int __init br_netlink_init(void) |
| 301 | { | 301 | { |
| 302 | return rtnl_link_register(&br_link_ops); | 302 | int err; |
| 303 | |||
| 304 | br_mdb_init(); | ||
| 305 | err = rtnl_link_register(&br_link_ops); | ||
| 306 | if (err) | ||
| 307 | goto out; | ||
| 308 | |||
| 309 | return 0; | ||
| 310 | out: | ||
| 311 | br_mdb_uninit(); | ||
| 312 | return err; | ||
| 303 | } | 313 | } |
| 304 | 314 | ||
| 305 | void __exit br_netlink_fini(void) | 315 | void __exit br_netlink_fini(void) |
| 306 | { | 316 | { |
| 317 | br_mdb_uninit(); | ||
| 307 | rtnl_link_unregister(&br_link_ops); | 318 | rtnl_link_unregister(&br_link_ops); |
| 308 | } | 319 | } |
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 8d83be5ffedc..711094aed41a 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h | |||
| @@ -526,6 +526,12 @@ static inline bool br_multicast_is_router(struct net_bridge *br) | |||
| 526 | { | 526 | { |
| 527 | return 0; | 527 | return 0; |
| 528 | } | 528 | } |
| 529 | static inline void br_mdb_init(void) | ||
| 530 | { | ||
| 531 | } | ||
| 532 | static inline void br_mdb_uninit(void) | ||
| 533 | { | ||
| 534 | } | ||
| 529 | #endif | 535 | #endif |
| 530 | 536 | ||
| 531 | /* br_netfilter.c */ | 537 | /* br_netfilter.c */ |
diff --git a/net/core/dev.c b/net/core/dev.c index 515473ee52cb..f64e439b4a00 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
| @@ -6121,6 +6121,14 @@ struct netdev_queue *dev_ingress_queue_create(struct net_device *dev) | |||
| 6121 | 6121 | ||
| 6122 | static const struct ethtool_ops default_ethtool_ops; | 6122 | static const struct ethtool_ops default_ethtool_ops; |
| 6123 | 6123 | ||
| 6124 | void netdev_set_default_ethtool_ops(struct net_device *dev, | ||
| 6125 | const struct ethtool_ops *ops) | ||
| 6126 | { | ||
| 6127 | if (dev->ethtool_ops == &default_ethtool_ops) | ||
| 6128 | dev->ethtool_ops = ops; | ||
| 6129 | } | ||
| 6130 | EXPORT_SYMBOL_GPL(netdev_set_default_ethtool_ops); | ||
| 6131 | |||
| 6124 | /** | 6132 | /** |
| 6125 | * alloc_netdev_mqs - allocate network device | 6133 | * alloc_netdev_mqs - allocate network device |
| 6126 | * @sizeof_priv: size of private data to allocate space for | 6134 | * @sizeof_priv: size of private data to allocate space for |
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index cc06a47f1216..a8e4f2665d5e 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
| @@ -823,9 +823,9 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg) | |||
| 823 | if (!ifa) { | 823 | if (!ifa) { |
| 824 | ret = -ENOBUFS; | 824 | ret = -ENOBUFS; |
| 825 | ifa = inet_alloc_ifa(); | 825 | ifa = inet_alloc_ifa(); |
| 826 | INIT_HLIST_NODE(&ifa->hash); | ||
| 827 | if (!ifa) | 826 | if (!ifa) |
| 828 | break; | 827 | break; |
| 828 | INIT_HLIST_NODE(&ifa->hash); | ||
| 829 | if (colon) | 829 | if (colon) |
| 830 | memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ); | 830 | memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ); |
| 831 | else | 831 | else |
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 3c9d20880283..d9c4f113d709 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
| @@ -590,7 +590,7 @@ static int do_ip_setsockopt(struct sock *sk, int level, | |||
| 590 | case IP_TTL: | 590 | case IP_TTL: |
| 591 | if (optlen < 1) | 591 | if (optlen < 1) |
| 592 | goto e_inval; | 592 | goto e_inval; |
| 593 | if (val != -1 && (val < 0 || val > 255)) | 593 | if (val != -1 && (val < 1 || val > 255)) |
| 594 | goto e_inval; | 594 | goto e_inval; |
| 595 | inet->uc_ttl = val; | 595 | inet->uc_ttl = val; |
| 596 | break; | 596 | break; |
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index d763701cff1b..a2e50ae80b53 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
| @@ -136,6 +136,8 @@ __be32 ic_myaddr = NONE; /* My IP address */ | |||
| 136 | static __be32 ic_netmask = NONE; /* Netmask for local subnet */ | 136 | static __be32 ic_netmask = NONE; /* Netmask for local subnet */ |
| 137 | __be32 ic_gateway = NONE; /* Gateway IP address */ | 137 | __be32 ic_gateway = NONE; /* Gateway IP address */ |
| 138 | 138 | ||
| 139 | __be32 ic_addrservaddr = NONE; /* IP Address of the IP addresses'server */ | ||
| 140 | |||
| 139 | __be32 ic_servaddr = NONE; /* Boot server IP address */ | 141 | __be32 ic_servaddr = NONE; /* Boot server IP address */ |
| 140 | 142 | ||
| 141 | __be32 root_server_addr = NONE; /* Address of NFS server */ | 143 | __be32 root_server_addr = NONE; /* Address of NFS server */ |
| @@ -558,6 +560,7 @@ ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt | |||
| 558 | if (ic_myaddr == NONE) | 560 | if (ic_myaddr == NONE) |
| 559 | ic_myaddr = tip; | 561 | ic_myaddr = tip; |
| 560 | ic_servaddr = sip; | 562 | ic_servaddr = sip; |
| 563 | ic_addrservaddr = sip; | ||
| 561 | ic_got_reply = IC_RARP; | 564 | ic_got_reply = IC_RARP; |
| 562 | 565 | ||
| 563 | drop_unlock: | 566 | drop_unlock: |
| @@ -1068,7 +1071,7 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str | |||
| 1068 | ic_servaddr = server_id; | 1071 | ic_servaddr = server_id; |
| 1069 | #ifdef IPCONFIG_DEBUG | 1072 | #ifdef IPCONFIG_DEBUG |
| 1070 | printk("DHCP: Offered address %pI4 by server %pI4\n", | 1073 | printk("DHCP: Offered address %pI4 by server %pI4\n", |
| 1071 | &ic_myaddr, &ic_servaddr); | 1074 | &ic_myaddr, &b->iph.saddr); |
| 1072 | #endif | 1075 | #endif |
| 1073 | /* The DHCP indicated server address takes | 1076 | /* The DHCP indicated server address takes |
| 1074 | * precedence over the bootp header one if | 1077 | * precedence over the bootp header one if |
| @@ -1113,6 +1116,7 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str | |||
| 1113 | ic_dev = dev; | 1116 | ic_dev = dev; |
| 1114 | ic_myaddr = b->your_ip; | 1117 | ic_myaddr = b->your_ip; |
| 1115 | ic_servaddr = b->server_ip; | 1118 | ic_servaddr = b->server_ip; |
| 1119 | ic_addrservaddr = b->iph.saddr; | ||
| 1116 | if (ic_gateway == NONE && b->relay_ip) | 1120 | if (ic_gateway == NONE && b->relay_ip) |
| 1117 | ic_gateway = b->relay_ip; | 1121 | ic_gateway = b->relay_ip; |
| 1118 | if (ic_nameservers[0] == NONE) | 1122 | if (ic_nameservers[0] == NONE) |
| @@ -1268,7 +1272,7 @@ static int __init ic_dynamic(void) | |||
| 1268 | printk("IP-Config: Got %s answer from %pI4, ", | 1272 | printk("IP-Config: Got %s answer from %pI4, ", |
| 1269 | ((ic_got_reply & IC_RARP) ? "RARP" | 1273 | ((ic_got_reply & IC_RARP) ? "RARP" |
| 1270 | : (ic_proto_enabled & IC_USE_DHCP) ? "DHCP" : "BOOTP"), | 1274 | : (ic_proto_enabled & IC_USE_DHCP) ? "DHCP" : "BOOTP"), |
| 1271 | &ic_servaddr); | 1275 | &ic_addrservaddr); |
| 1272 | pr_cont("my address is %pI4\n", &ic_myaddr); | 1276 | pr_cont("my address is %pI4\n", &ic_myaddr); |
| 1273 | 1277 | ||
| 1274 | return 0; | 1278 | return 0; |
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c index 51f13f8ec724..04b18c1ac345 100644 --- a/net/ipv4/netfilter/ipt_REJECT.c +++ b/net/ipv4/netfilter/ipt_REJECT.c | |||
| @@ -81,6 +81,7 @@ static void send_reset(struct sk_buff *oldskb, int hook) | |||
| 81 | niph->saddr = oiph->daddr; | 81 | niph->saddr = oiph->daddr; |
| 82 | niph->daddr = oiph->saddr; | 82 | niph->daddr = oiph->saddr; |
| 83 | 83 | ||
| 84 | skb_reset_transport_header(nskb); | ||
| 84 | tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); | 85 | tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); |
| 85 | memset(tcph, 0, sizeof(*tcph)); | 86 | memset(tcph, 0, sizeof(*tcph)); |
| 86 | tcph->source = oth->dest; | 87 | tcph->source = oth->dest; |
diff --git a/net/ipv4/netfilter/iptable_nat.c b/net/ipv4/netfilter/iptable_nat.c index da2c8a368f68..eeaff7e4acb5 100644 --- a/net/ipv4/netfilter/iptable_nat.c +++ b/net/ipv4/netfilter/iptable_nat.c | |||
| @@ -124,23 +124,28 @@ nf_nat_ipv4_fn(unsigned int hooknum, | |||
| 124 | ret = nf_nat_rule_find(skb, hooknum, in, out, ct); | 124 | ret = nf_nat_rule_find(skb, hooknum, in, out, ct); |
| 125 | if (ret != NF_ACCEPT) | 125 | if (ret != NF_ACCEPT) |
| 126 | return ret; | 126 | return ret; |
| 127 | } else | 127 | } else { |
| 128 | pr_debug("Already setup manip %s for ct %p\n", | 128 | pr_debug("Already setup manip %s for ct %p\n", |
| 129 | maniptype == NF_NAT_MANIP_SRC ? "SRC" : "DST", | 129 | maniptype == NF_NAT_MANIP_SRC ? "SRC" : "DST", |
| 130 | ct); | 130 | ct); |
| 131 | if (nf_nat_oif_changed(hooknum, ctinfo, nat, out)) | ||
| 132 | goto oif_changed; | ||
| 133 | } | ||
| 131 | break; | 134 | break; |
| 132 | 135 | ||
| 133 | default: | 136 | default: |
| 134 | /* ESTABLISHED */ | 137 | /* ESTABLISHED */ |
| 135 | NF_CT_ASSERT(ctinfo == IP_CT_ESTABLISHED || | 138 | NF_CT_ASSERT(ctinfo == IP_CT_ESTABLISHED || |
| 136 | ctinfo == IP_CT_ESTABLISHED_REPLY); | 139 | ctinfo == IP_CT_ESTABLISHED_REPLY); |
| 137 | if (nf_nat_oif_changed(hooknum, ctinfo, nat, out)) { | 140 | if (nf_nat_oif_changed(hooknum, ctinfo, nat, out)) |
| 138 | nf_ct_kill_acct(ct, ctinfo, skb); | 141 | goto oif_changed; |
| 139 | return NF_DROP; | ||
| 140 | } | ||
| 141 | } | 142 | } |
| 142 | 143 | ||
| 143 | return nf_nat_packet(ct, ctinfo, hooknum, skb); | 144 | return nf_nat_packet(ct, ctinfo, hooknum, skb); |
| 145 | |||
| 146 | oif_changed: | ||
| 147 | nf_ct_kill_acct(ct, ctinfo, skb); | ||
| 148 | return NF_DROP; | ||
| 144 | } | 149 | } |
| 145 | 150 | ||
| 146 | static unsigned int | 151 | static unsigned int |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 1ca253635f7a..2aa69c8ae60c 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
| @@ -1428,12 +1428,12 @@ static void tcp_service_net_dma(struct sock *sk, bool wait) | |||
| 1428 | } | 1428 | } |
| 1429 | #endif | 1429 | #endif |
| 1430 | 1430 | ||
| 1431 | static inline struct sk_buff *tcp_recv_skb(struct sock *sk, u32 seq, u32 *off) | 1431 | static struct sk_buff *tcp_recv_skb(struct sock *sk, u32 seq, u32 *off) |
| 1432 | { | 1432 | { |
| 1433 | struct sk_buff *skb; | 1433 | struct sk_buff *skb; |
| 1434 | u32 offset; | 1434 | u32 offset; |
| 1435 | 1435 | ||
| 1436 | skb_queue_walk(&sk->sk_receive_queue, skb) { | 1436 | while ((skb = skb_peek(&sk->sk_receive_queue)) != NULL) { |
| 1437 | offset = seq - TCP_SKB_CB(skb)->seq; | 1437 | offset = seq - TCP_SKB_CB(skb)->seq; |
| 1438 | if (tcp_hdr(skb)->syn) | 1438 | if (tcp_hdr(skb)->syn) |
| 1439 | offset--; | 1439 | offset--; |
| @@ -1441,6 +1441,11 @@ static inline struct sk_buff *tcp_recv_skb(struct sock *sk, u32 seq, u32 *off) | |||
| 1441 | *off = offset; | 1441 | *off = offset; |
| 1442 | return skb; | 1442 | return skb; |
| 1443 | } | 1443 | } |
| 1444 | /* This looks weird, but this can happen if TCP collapsing | ||
| 1445 | * splitted a fat GRO packet, while we released socket lock | ||
| 1446 | * in skb_splice_bits() | ||
| 1447 | */ | ||
| 1448 | sk_eat_skb(sk, skb, false); | ||
| 1444 | } | 1449 | } |
| 1445 | return NULL; | 1450 | return NULL; |
| 1446 | } | 1451 | } |
| @@ -1482,7 +1487,7 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc, | |||
| 1482 | break; | 1487 | break; |
| 1483 | } | 1488 | } |
| 1484 | used = recv_actor(desc, skb, offset, len); | 1489 | used = recv_actor(desc, skb, offset, len); |
| 1485 | if (used < 0) { | 1490 | if (used <= 0) { |
| 1486 | if (!copied) | 1491 | if (!copied) |
| 1487 | copied = used; | 1492 | copied = used; |
| 1488 | break; | 1493 | break; |
| @@ -1520,8 +1525,10 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc, | |||
| 1520 | tcp_rcv_space_adjust(sk); | 1525 | tcp_rcv_space_adjust(sk); |
| 1521 | 1526 | ||
| 1522 | /* Clean up data we have read: This will do ACK frames. */ | 1527 | /* Clean up data we have read: This will do ACK frames. */ |
| 1523 | if (copied > 0) | 1528 | if (copied > 0) { |
| 1529 | tcp_recv_skb(sk, seq, &offset); | ||
| 1524 | tcp_cleanup_rbuf(sk, copied); | 1530 | tcp_cleanup_rbuf(sk, copied); |
| 1531 | } | ||
| 1525 | return copied; | 1532 | return copied; |
| 1526 | } | 1533 | } |
| 1527 | EXPORT_SYMBOL(tcp_read_sock); | 1534 | EXPORT_SYMBOL(tcp_read_sock); |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index a28e4db8a952..18f97ca76b00 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
| @@ -5543,7 +5543,7 @@ slow_path: | |||
| 5543 | if (len < (th->doff << 2) || tcp_checksum_complete_user(sk, skb)) | 5543 | if (len < (th->doff << 2) || tcp_checksum_complete_user(sk, skb)) |
| 5544 | goto csum_error; | 5544 | goto csum_error; |
| 5545 | 5545 | ||
| 5546 | if (!th->ack) | 5546 | if (!th->ack && !th->rst) |
| 5547 | goto discard; | 5547 | goto discard; |
| 5548 | 5548 | ||
| 5549 | /* | 5549 | /* |
| @@ -5988,7 +5988,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
| 5988 | goto discard; | 5988 | goto discard; |
| 5989 | } | 5989 | } |
| 5990 | 5990 | ||
| 5991 | if (!th->ack) | 5991 | if (!th->ack && !th->rst) |
| 5992 | goto discard; | 5992 | goto discard; |
| 5993 | 5993 | ||
| 5994 | if (!tcp_validate_incoming(sk, skb, th, 0)) | 5994 | if (!tcp_validate_incoming(sk, skb, th, 0)) |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 408cac4ae00a..420e56326384 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
| @@ -154,6 +154,11 @@ static void addrconf_type_change(struct net_device *dev, | |||
| 154 | unsigned long event); | 154 | unsigned long event); |
| 155 | static int addrconf_ifdown(struct net_device *dev, int how); | 155 | static int addrconf_ifdown(struct net_device *dev, int how); |
| 156 | 156 | ||
| 157 | static struct rt6_info *addrconf_get_prefix_route(const struct in6_addr *pfx, | ||
| 158 | int plen, | ||
| 159 | const struct net_device *dev, | ||
| 160 | u32 flags, u32 noflags); | ||
| 161 | |||
| 157 | static void addrconf_dad_start(struct inet6_ifaddr *ifp); | 162 | static void addrconf_dad_start(struct inet6_ifaddr *ifp); |
| 158 | static void addrconf_dad_timer(unsigned long data); | 163 | static void addrconf_dad_timer(unsigned long data); |
| 159 | static void addrconf_dad_completed(struct inet6_ifaddr *ifp); | 164 | static void addrconf_dad_completed(struct inet6_ifaddr *ifp); |
| @@ -250,12 +255,6 @@ static inline bool addrconf_qdisc_ok(const struct net_device *dev) | |||
| 250 | return !qdisc_tx_is_noop(dev); | 255 | return !qdisc_tx_is_noop(dev); |
| 251 | } | 256 | } |
| 252 | 257 | ||
| 253 | /* Check if a route is valid prefix route */ | ||
| 254 | static inline int addrconf_is_prefix_route(const struct rt6_info *rt) | ||
| 255 | { | ||
| 256 | return (rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0; | ||
| 257 | } | ||
| 258 | |||
| 259 | static void addrconf_del_timer(struct inet6_ifaddr *ifp) | 258 | static void addrconf_del_timer(struct inet6_ifaddr *ifp) |
| 260 | { | 259 | { |
| 261 | if (del_timer(&ifp->timer)) | 260 | if (del_timer(&ifp->timer)) |
| @@ -941,17 +940,15 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) | |||
| 941 | if ((ifp->flags & IFA_F_PERMANENT) && onlink < 1) { | 940 | if ((ifp->flags & IFA_F_PERMANENT) && onlink < 1) { |
| 942 | struct in6_addr prefix; | 941 | struct in6_addr prefix; |
| 943 | struct rt6_info *rt; | 942 | struct rt6_info *rt; |
| 944 | struct net *net = dev_net(ifp->idev->dev); | ||
| 945 | struct flowi6 fl6 = {}; | ||
| 946 | 943 | ||
| 947 | ipv6_addr_prefix(&prefix, &ifp->addr, ifp->prefix_len); | 944 | ipv6_addr_prefix(&prefix, &ifp->addr, ifp->prefix_len); |
| 948 | fl6.flowi6_oif = ifp->idev->dev->ifindex; | ||
| 949 | fl6.daddr = prefix; | ||
| 950 | rt = (struct rt6_info *)ip6_route_lookup(net, &fl6, | ||
| 951 | RT6_LOOKUP_F_IFACE); | ||
| 952 | 945 | ||
| 953 | if (rt != net->ipv6.ip6_null_entry && | 946 | rt = addrconf_get_prefix_route(&prefix, |
| 954 | addrconf_is_prefix_route(rt)) { | 947 | ifp->prefix_len, |
| 948 | ifp->idev->dev, | ||
| 949 | 0, RTF_GATEWAY | RTF_DEFAULT); | ||
| 950 | |||
| 951 | if (rt) { | ||
| 955 | if (onlink == 0) { | 952 | if (onlink == 0) { |
| 956 | ip6_del_rt(rt); | 953 | ip6_del_rt(rt); |
| 957 | rt = NULL; | 954 | rt = NULL; |
| @@ -1877,7 +1874,7 @@ static struct rt6_info *addrconf_get_prefix_route(const struct in6_addr *pfx, | |||
| 1877 | continue; | 1874 | continue; |
| 1878 | if ((rt->rt6i_flags & flags) != flags) | 1875 | if ((rt->rt6i_flags & flags) != flags) |
| 1879 | continue; | 1876 | continue; |
| 1880 | if ((noflags != 0) && ((rt->rt6i_flags & flags) != 0)) | 1877 | if ((rt->rt6i_flags & noflags) != 0) |
| 1881 | continue; | 1878 | continue; |
| 1882 | dst_hold(&rt->dst); | 1879 | dst_hold(&rt->dst); |
| 1883 | break; | 1880 | break; |
diff --git a/net/ipv6/netfilter/ip6t_NPT.c b/net/ipv6/netfilter/ip6t_NPT.c index e9486915eff6..7302b0b7b642 100644 --- a/net/ipv6/netfilter/ip6t_NPT.c +++ b/net/ipv6/netfilter/ip6t_NPT.c | |||
| @@ -14,42 +14,23 @@ | |||
| 14 | #include <linux/netfilter_ipv6/ip6t_NPT.h> | 14 | #include <linux/netfilter_ipv6/ip6t_NPT.h> |
| 15 | #include <linux/netfilter/x_tables.h> | 15 | #include <linux/netfilter/x_tables.h> |
| 16 | 16 | ||
| 17 | static __sum16 csum16_complement(__sum16 a) | ||
| 18 | { | ||
| 19 | return (__force __sum16)(0xffff - (__force u16)a); | ||
| 20 | } | ||
| 21 | |||
| 22 | static __sum16 csum16_add(__sum16 a, __sum16 b) | ||
| 23 | { | ||
| 24 | u16 sum; | ||
| 25 | |||
| 26 | sum = (__force u16)a + (__force u16)b; | ||
| 27 | sum += (__force u16)a < (__force u16)b; | ||
| 28 | return (__force __sum16)sum; | ||
| 29 | } | ||
| 30 | |||
| 31 | static __sum16 csum16_sub(__sum16 a, __sum16 b) | ||
| 32 | { | ||
| 33 | return csum16_add(a, csum16_complement(b)); | ||
| 34 | } | ||
| 35 | |||
| 36 | static int ip6t_npt_checkentry(const struct xt_tgchk_param *par) | 17 | static int ip6t_npt_checkentry(const struct xt_tgchk_param *par) |
| 37 | { | 18 | { |
| 38 | struct ip6t_npt_tginfo *npt = par->targinfo; | 19 | struct ip6t_npt_tginfo *npt = par->targinfo; |
| 39 | __sum16 src_sum = 0, dst_sum = 0; | 20 | __wsum src_sum = 0, dst_sum = 0; |
| 40 | unsigned int i; | 21 | unsigned int i; |
| 41 | 22 | ||
| 42 | if (npt->src_pfx_len > 64 || npt->dst_pfx_len > 64) | 23 | if (npt->src_pfx_len > 64 || npt->dst_pfx_len > 64) |
| 43 | return -EINVAL; | 24 | return -EINVAL; |
| 44 | 25 | ||
| 45 | for (i = 0; i < ARRAY_SIZE(npt->src_pfx.in6.s6_addr16); i++) { | 26 | for (i = 0; i < ARRAY_SIZE(npt->src_pfx.in6.s6_addr16); i++) { |
| 46 | src_sum = csum16_add(src_sum, | 27 | src_sum = csum_add(src_sum, |
| 47 | (__force __sum16)npt->src_pfx.in6.s6_addr16[i]); | 28 | (__force __wsum)npt->src_pfx.in6.s6_addr16[i]); |
| 48 | dst_sum = csum16_add(dst_sum, | 29 | dst_sum = csum_add(dst_sum, |
| 49 | (__force __sum16)npt->dst_pfx.in6.s6_addr16[i]); | 30 | (__force __wsum)npt->dst_pfx.in6.s6_addr16[i]); |
| 50 | } | 31 | } |
| 51 | 32 | ||
| 52 | npt->adjustment = csum16_sub(src_sum, dst_sum); | 33 | npt->adjustment = (__force __sum16) csum_sub(src_sum, dst_sum); |
| 53 | return 0; | 34 | return 0; |
| 54 | } | 35 | } |
| 55 | 36 | ||
| @@ -85,7 +66,7 @@ static bool ip6t_npt_map_pfx(const struct ip6t_npt_tginfo *npt, | |||
| 85 | return false; | 66 | return false; |
| 86 | } | 67 | } |
| 87 | 68 | ||
| 88 | sum = csum16_add((__force __sum16)addr->s6_addr16[idx], | 69 | sum = (__force __sum16) csum_add((__force __wsum)addr->s6_addr16[idx], |
| 89 | npt->adjustment); | 70 | npt->adjustment); |
| 90 | if (sum == CSUM_MANGLED_0) | 71 | if (sum == CSUM_MANGLED_0) |
| 91 | sum = 0; | 72 | sum = 0; |
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c index fd4fb34c51c7..029623dbd411 100644 --- a/net/ipv6/netfilter/ip6t_REJECT.c +++ b/net/ipv6/netfilter/ip6t_REJECT.c | |||
| @@ -132,6 +132,7 @@ static void send_reset(struct net *net, struct sk_buff *oldskb) | |||
| 132 | ip6h->saddr = oip6h->daddr; | 132 | ip6h->saddr = oip6h->daddr; |
| 133 | ip6h->daddr = oip6h->saddr; | 133 | ip6h->daddr = oip6h->saddr; |
| 134 | 134 | ||
| 135 | skb_reset_transport_header(nskb); | ||
| 135 | tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); | 136 | tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); |
| 136 | /* Truncate to length (no data) */ | 137 | /* Truncate to length (no data) */ |
| 137 | tcph->doff = sizeof(struct tcphdr)/4; | 138 | tcph->doff = sizeof(struct tcphdr)/4; |
diff --git a/net/ipv6/netfilter/ip6table_nat.c b/net/ipv6/netfilter/ip6table_nat.c index 6c8ae24b85eb..e0e788d25b14 100644 --- a/net/ipv6/netfilter/ip6table_nat.c +++ b/net/ipv6/netfilter/ip6table_nat.c | |||
| @@ -127,23 +127,28 @@ nf_nat_ipv6_fn(unsigned int hooknum, | |||
| 127 | ret = nf_nat_rule_find(skb, hooknum, in, out, ct); | 127 | ret = nf_nat_rule_find(skb, hooknum, in, out, ct); |
| 128 | if (ret != NF_ACCEPT) | 128 | if (ret != NF_ACCEPT) |
| 129 | return ret; | 129 | return ret; |
| 130 | } else | 130 | } else { |
| 131 | pr_debug("Already setup manip %s for ct %p\n", | 131 | pr_debug("Already setup manip %s for ct %p\n", |
| 132 | maniptype == NF_NAT_MANIP_SRC ? "SRC" : "DST", | 132 | maniptype == NF_NAT_MANIP_SRC ? "SRC" : "DST", |
| 133 | ct); | 133 | ct); |
| 134 | if (nf_nat_oif_changed(hooknum, ctinfo, nat, out)) | ||
| 135 | goto oif_changed; | ||
| 136 | } | ||
| 134 | break; | 137 | break; |
| 135 | 138 | ||
| 136 | default: | 139 | default: |
| 137 | /* ESTABLISHED */ | 140 | /* ESTABLISHED */ |
| 138 | NF_CT_ASSERT(ctinfo == IP_CT_ESTABLISHED || | 141 | NF_CT_ASSERT(ctinfo == IP_CT_ESTABLISHED || |
| 139 | ctinfo == IP_CT_ESTABLISHED_REPLY); | 142 | ctinfo == IP_CT_ESTABLISHED_REPLY); |
| 140 | if (nf_nat_oif_changed(hooknum, ctinfo, nat, out)) { | 143 | if (nf_nat_oif_changed(hooknum, ctinfo, nat, out)) |
| 141 | nf_ct_kill_acct(ct, ctinfo, skb); | 144 | goto oif_changed; |
| 142 | return NF_DROP; | ||
| 143 | } | ||
| 144 | } | 145 | } |
| 145 | 146 | ||
| 146 | return nf_nat_packet(ct, ctinfo, hooknum, skb); | 147 | return nf_nat_packet(ct, ctinfo, hooknum, skb); |
| 148 | |||
| 149 | oif_changed: | ||
| 150 | nf_ct_kill_acct(ct, ctinfo, skb); | ||
| 151 | return NF_DROP; | ||
| 147 | } | 152 | } |
| 148 | 153 | ||
| 149 | static unsigned int | 154 | static unsigned int |
diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c index 00ee17c3e893..137e245860ab 100644 --- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c +++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | |||
| @@ -81,8 +81,8 @@ static int ipv6_get_l4proto(const struct sk_buff *skb, unsigned int nhoff, | |||
| 81 | } | 81 | } |
| 82 | protoff = ipv6_skip_exthdr(skb, extoff, &nexthdr, &frag_off); | 82 | protoff = ipv6_skip_exthdr(skb, extoff, &nexthdr, &frag_off); |
| 83 | /* | 83 | /* |
| 84 | * (protoff == skb->len) mean that the packet doesn't have no data | 84 | * (protoff == skb->len) means the packet has not data, just |
| 85 | * except of IPv6 & ext headers. but it's tracked anyway. - YK | 85 | * IPv6 and possibly extensions headers, but it is tracked anyway |
| 86 | */ | 86 | */ |
| 87 | if (protoff < 0 || (frag_off & htons(~0x7)) != 0) { | 87 | if (protoff < 0 || (frag_off & htons(~0x7)) != 0) { |
| 88 | pr_debug("ip6_conntrack_core: can't find proto in pkt\n"); | 88 | pr_debug("ip6_conntrack_core: can't find proto in pkt\n"); |
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 22c8ea951185..3dacecc99065 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
| @@ -311,7 +311,10 @@ found: | |||
| 311 | else | 311 | else |
| 312 | fq->q.fragments = skb; | 312 | fq->q.fragments = skb; |
| 313 | 313 | ||
| 314 | skb->dev = NULL; | 314 | if (skb->dev) { |
| 315 | fq->iif = skb->dev->ifindex; | ||
| 316 | skb->dev = NULL; | ||
| 317 | } | ||
| 315 | fq->q.stamp = skb->tstamp; | 318 | fq->q.stamp = skb->tstamp; |
| 316 | fq->q.meat += skb->len; | 319 | fq->q.meat += skb->len; |
| 317 | if (payload_len > fq->q.max_size) | 320 | if (payload_len > fq->q.max_size) |
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index 3ad1f9db5f8b..df082508362d 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c | |||
| @@ -1806,7 +1806,7 @@ static void iucv_external_interrupt(struct ext_code ext_code, | |||
| 1806 | struct iucv_irq_data *p; | 1806 | struct iucv_irq_data *p; |
| 1807 | struct iucv_irq_list *work; | 1807 | struct iucv_irq_list *work; |
| 1808 | 1808 | ||
| 1809 | kstat_cpu(smp_processor_id()).irqs[EXTINT_IUC]++; | 1809 | inc_irq_stat(IRQEXT_IUC); |
| 1810 | p = iucv_irq_data[smp_processor_id()]; | 1810 | p = iucv_irq_data[smp_processor_id()]; |
| 1811 | if (p->ippathid >= iucv_max_pathid) { | 1811 | if (p->ippathid >= iucv_max_pathid) { |
| 1812 | WARN_ON(p->ippathid >= iucv_max_pathid); | 1812 | WARN_ON(p->ippathid >= iucv_max_pathid); |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 5c61677487cf..47e0aca614b7 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
| @@ -1009,6 +1009,8 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev) | |||
| 1009 | if (old_probe_resp) | 1009 | if (old_probe_resp) |
| 1010 | kfree_rcu(old_probe_resp, rcu_head); | 1010 | kfree_rcu(old_probe_resp, rcu_head); |
| 1011 | 1011 | ||
| 1012 | list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) | ||
| 1013 | sta_info_flush(local, vlan); | ||
| 1012 | sta_info_flush(local, sdata); | 1014 | sta_info_flush(local, sdata); |
| 1013 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED); | 1015 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED); |
| 1014 | 1016 | ||
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index 53f03120db55..80e55527504b 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #include <linux/nl80211.h> | 5 | #include <linux/nl80211.h> |
| 6 | #include <linux/export.h> | 6 | #include <linux/export.h> |
| 7 | #include <linux/rtnetlink.h> | ||
| 7 | #include <net/cfg80211.h> | 8 | #include <net/cfg80211.h> |
| 8 | #include "ieee80211_i.h" | 9 | #include "ieee80211_i.h" |
| 9 | #include "driver-ops.h" | 10 | #include "driver-ops.h" |
| @@ -197,6 +198,15 @@ static void __ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata) | |||
| 197 | 198 | ||
| 198 | ctx = container_of(conf, struct ieee80211_chanctx, conf); | 199 | ctx = container_of(conf, struct ieee80211_chanctx, conf); |
| 199 | 200 | ||
| 201 | if (sdata->vif.type == NL80211_IFTYPE_AP) { | ||
| 202 | struct ieee80211_sub_if_data *vlan; | ||
| 203 | |||
| 204 | /* for the VLAN list */ | ||
| 205 | ASSERT_RTNL(); | ||
| 206 | list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) | ||
| 207 | rcu_assign_pointer(vlan->vif.chanctx_conf, NULL); | ||
| 208 | } | ||
| 209 | |||
| 200 | ieee80211_unassign_vif_chanctx(sdata, ctx); | 210 | ieee80211_unassign_vif_chanctx(sdata, ctx); |
| 201 | if (ctx->refcount == 0) | 211 | if (ctx->refcount == 0) |
| 202 | ieee80211_free_chanctx(local, ctx); | 212 | ieee80211_free_chanctx(local, ctx); |
| @@ -316,6 +326,15 @@ int ieee80211_vif_use_channel(struct ieee80211_sub_if_data *sdata, | |||
| 316 | goto out; | 326 | goto out; |
| 317 | } | 327 | } |
| 318 | 328 | ||
| 329 | if (sdata->vif.type == NL80211_IFTYPE_AP) { | ||
| 330 | struct ieee80211_sub_if_data *vlan; | ||
| 331 | |||
| 332 | /* for the VLAN list */ | ||
| 333 | ASSERT_RTNL(); | ||
| 334 | list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) | ||
| 335 | rcu_assign_pointer(vlan->vif.chanctx_conf, &ctx->conf); | ||
| 336 | } | ||
| 337 | |||
| 319 | ieee80211_recalc_smps_chanctx(local, ctx); | 338 | ieee80211_recalc_smps_chanctx(local, ctx); |
| 320 | out: | 339 | out: |
| 321 | mutex_unlock(&local->chanctx_mtx); | 340 | mutex_unlock(&local->chanctx_mtx); |
| @@ -331,6 +350,25 @@ void ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata) | |||
| 331 | mutex_unlock(&sdata->local->chanctx_mtx); | 350 | mutex_unlock(&sdata->local->chanctx_mtx); |
| 332 | } | 351 | } |
| 333 | 352 | ||
| 353 | void ieee80211_vif_vlan_copy_chanctx(struct ieee80211_sub_if_data *sdata) | ||
| 354 | { | ||
| 355 | struct ieee80211_local *local = sdata->local; | ||
| 356 | struct ieee80211_sub_if_data *ap; | ||
| 357 | struct ieee80211_chanctx_conf *conf; | ||
| 358 | |||
| 359 | if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_AP_VLAN || !sdata->bss)) | ||
| 360 | return; | ||
| 361 | |||
| 362 | ap = container_of(sdata->bss, struct ieee80211_sub_if_data, u.ap); | ||
| 363 | |||
| 364 | mutex_lock(&local->chanctx_mtx); | ||
| 365 | |||
| 366 | conf = rcu_dereference_protected(ap->vif.chanctx_conf, | ||
| 367 | lockdep_is_held(&local->chanctx_mtx)); | ||
| 368 | rcu_assign_pointer(sdata->vif.chanctx_conf, conf); | ||
| 369 | mutex_unlock(&local->chanctx_mtx); | ||
| 370 | } | ||
| 371 | |||
| 334 | void ieee80211_iter_chan_contexts_atomic( | 372 | void ieee80211_iter_chan_contexts_atomic( |
| 335 | struct ieee80211_hw *hw, | 373 | struct ieee80211_hw *hw, |
| 336 | void (*iter)(struct ieee80211_hw *hw, | 374 | void (*iter)(struct ieee80211_hw *hw, |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 8881fc77fb13..6b7644e818d8 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
| @@ -703,8 +703,8 @@ static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata) | |||
| 703 | sdata_info(sdata, | 703 | sdata_info(sdata, |
| 704 | "No active IBSS STAs - trying to scan for other IBSS networks with same SSID (merge)\n"); | 704 | "No active IBSS STAs - trying to scan for other IBSS networks with same SSID (merge)\n"); |
| 705 | 705 | ||
| 706 | ieee80211_request_internal_scan(sdata, | 706 | ieee80211_request_ibss_scan(sdata, ifibss->ssid, ifibss->ssid_len, |
| 707 | ifibss->ssid, ifibss->ssid_len, NULL); | 707 | NULL); |
| 708 | } | 708 | } |
| 709 | 709 | ||
| 710 | static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata) | 710 | static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata) |
| @@ -802,9 +802,8 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | |||
| 802 | IEEE80211_SCAN_INTERVAL)) { | 802 | IEEE80211_SCAN_INTERVAL)) { |
| 803 | sdata_info(sdata, "Trigger new scan to find an IBSS to join\n"); | 803 | sdata_info(sdata, "Trigger new scan to find an IBSS to join\n"); |
| 804 | 804 | ||
| 805 | ieee80211_request_internal_scan(sdata, | 805 | ieee80211_request_ibss_scan(sdata, ifibss->ssid, |
| 806 | ifibss->ssid, ifibss->ssid_len, | 806 | ifibss->ssid_len, chan); |
| 807 | ifibss->fixed_channel ? ifibss->channel : NULL); | ||
| 808 | } else { | 807 | } else { |
| 809 | int interval = IEEE80211_SCAN_INTERVAL; | 808 | int interval = IEEE80211_SCAN_INTERVAL; |
| 810 | 809 | ||
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 42d0d0267730..8563b9a5cac3 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
| @@ -92,8 +92,6 @@ struct ieee80211_bss { | |||
| 92 | 92 | ||
| 93 | u32 device_ts; | 93 | u32 device_ts; |
| 94 | 94 | ||
| 95 | u8 dtim_period; | ||
| 96 | |||
| 97 | bool wmm_used; | 95 | bool wmm_used; |
| 98 | bool uapsd_supported; | 96 | bool uapsd_supported; |
| 99 | 97 | ||
| @@ -140,7 +138,6 @@ enum ieee80211_bss_corrupt_data_flags { | |||
| 140 | 138 | ||
| 141 | /** | 139 | /** |
| 142 | * enum ieee80211_valid_data_flags - BSS valid data flags | 140 | * enum ieee80211_valid_data_flags - BSS valid data flags |
| 143 | * @IEEE80211_BSS_VALID_DTIM: DTIM data was gathered from non-corrupt IE | ||
| 144 | * @IEEE80211_BSS_VALID_WMM: WMM/UAPSD data was gathered from non-corrupt IE | 141 | * @IEEE80211_BSS_VALID_WMM: WMM/UAPSD data was gathered from non-corrupt IE |
| 145 | * @IEEE80211_BSS_VALID_RATES: Supported rates were gathered from non-corrupt IE | 142 | * @IEEE80211_BSS_VALID_RATES: Supported rates were gathered from non-corrupt IE |
| 146 | * @IEEE80211_BSS_VALID_ERP: ERP flag was gathered from non-corrupt IE | 143 | * @IEEE80211_BSS_VALID_ERP: ERP flag was gathered from non-corrupt IE |
| @@ -151,7 +148,6 @@ enum ieee80211_bss_corrupt_data_flags { | |||
| 151 | * beacon/probe response. | 148 | * beacon/probe response. |
| 152 | */ | 149 | */ |
| 153 | enum ieee80211_bss_valid_data_flags { | 150 | enum ieee80211_bss_valid_data_flags { |
| 154 | IEEE80211_BSS_VALID_DTIM = BIT(0), | ||
| 155 | IEEE80211_BSS_VALID_WMM = BIT(1), | 151 | IEEE80211_BSS_VALID_WMM = BIT(1), |
| 156 | IEEE80211_BSS_VALID_RATES = BIT(2), | 152 | IEEE80211_BSS_VALID_RATES = BIT(2), |
| 157 | IEEE80211_BSS_VALID_ERP = BIT(3) | 153 | IEEE80211_BSS_VALID_ERP = BIT(3) |
| @@ -440,6 +436,7 @@ struct ieee80211_if_managed { | |||
| 440 | unsigned long timers_running; /* used for quiesce/restart */ | 436 | unsigned long timers_running; /* used for quiesce/restart */ |
| 441 | bool powersave; /* powersave requested for this iface */ | 437 | bool powersave; /* powersave requested for this iface */ |
| 442 | bool broken_ap; /* AP is broken -- turn off powersave */ | 438 | bool broken_ap; /* AP is broken -- turn off powersave */ |
| 439 | u8 dtim_period; | ||
| 443 | enum ieee80211_smps_mode req_smps, /* requested smps mode */ | 440 | enum ieee80211_smps_mode req_smps, /* requested smps mode */ |
| 444 | driver_smps_mode; /* smps mode request */ | 441 | driver_smps_mode; /* smps mode request */ |
| 445 | 442 | ||
| @@ -773,6 +770,10 @@ struct ieee80211_sub_if_data { | |||
| 773 | u32 mntr_flags; | 770 | u32 mntr_flags; |
| 774 | } u; | 771 | } u; |
| 775 | 772 | ||
| 773 | spinlock_t cleanup_stations_lock; | ||
| 774 | struct list_head cleanup_stations; | ||
| 775 | struct work_struct cleanup_stations_wk; | ||
| 776 | |||
| 776 | #ifdef CONFIG_MAC80211_DEBUGFS | 777 | #ifdef CONFIG_MAC80211_DEBUGFS |
| 777 | struct { | 778 | struct { |
| 778 | struct dentry *dir; | 779 | struct dentry *dir; |
| @@ -1329,9 +1330,9 @@ void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
| 1329 | 1330 | ||
| 1330 | /* scan/BSS handling */ | 1331 | /* scan/BSS handling */ |
| 1331 | void ieee80211_scan_work(struct work_struct *work); | 1332 | void ieee80211_scan_work(struct work_struct *work); |
| 1332 | int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata, | 1333 | int ieee80211_request_ibss_scan(struct ieee80211_sub_if_data *sdata, |
| 1333 | const u8 *ssid, u8 ssid_len, | 1334 | const u8 *ssid, u8 ssid_len, |
| 1334 | struct ieee80211_channel *chan); | 1335 | struct ieee80211_channel *chan); |
| 1335 | int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata, | 1336 | int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata, |
| 1336 | struct cfg80211_scan_request *req); | 1337 | struct cfg80211_scan_request *req); |
| 1337 | void ieee80211_scan_cancel(struct ieee80211_local *local); | 1338 | void ieee80211_scan_cancel(struct ieee80211_local *local); |
| @@ -1628,6 +1629,7 @@ ieee80211_vif_use_channel(struct ieee80211_sub_if_data *sdata, | |||
| 1628 | const struct cfg80211_chan_def *chandef, | 1629 | const struct cfg80211_chan_def *chandef, |
| 1629 | enum ieee80211_chanctx_mode mode); | 1630 | enum ieee80211_chanctx_mode mode); |
| 1630 | void ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata); | 1631 | void ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata); |
| 1632 | void ieee80211_vif_vlan_copy_chanctx(struct ieee80211_sub_if_data *sdata); | ||
| 1631 | 1633 | ||
| 1632 | void ieee80211_recalc_smps_chanctx(struct ieee80211_local *local, | 1634 | void ieee80211_recalc_smps_chanctx(struct ieee80211_local *local, |
| 1633 | struct ieee80211_chanctx *chanctx); | 1635 | struct ieee80211_chanctx *chanctx); |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 09a80b55cf5a..8be854e86cd9 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
| @@ -207,17 +207,8 @@ void ieee80211_recalc_idle(struct ieee80211_local *local) | |||
| 207 | 207 | ||
| 208 | static int ieee80211_change_mtu(struct net_device *dev, int new_mtu) | 208 | static int ieee80211_change_mtu(struct net_device *dev, int new_mtu) |
| 209 | { | 209 | { |
| 210 | int meshhdrlen; | 210 | if (new_mtu < 256 || new_mtu > IEEE80211_MAX_DATA_LEN) |
| 211 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | ||
| 212 | |||
| 213 | meshhdrlen = (sdata->vif.type == NL80211_IFTYPE_MESH_POINT) ? 5 : 0; | ||
| 214 | |||
| 215 | /* FIX: what would be proper limits for MTU? | ||
| 216 | * This interface uses 802.3 frames. */ | ||
| 217 | if (new_mtu < 256 || | ||
| 218 | new_mtu > IEEE80211_MAX_DATA_LEN - 24 - 6 - meshhdrlen) { | ||
| 219 | return -EINVAL; | 211 | return -EINVAL; |
| 220 | } | ||
| 221 | 212 | ||
| 222 | dev->mtu = new_mtu; | 213 | dev->mtu = new_mtu; |
| 223 | return 0; | 214 | return 0; |
| @@ -586,11 +577,13 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up) | |||
| 586 | 577 | ||
| 587 | switch (sdata->vif.type) { | 578 | switch (sdata->vif.type) { |
| 588 | case NL80211_IFTYPE_AP_VLAN: | 579 | case NL80211_IFTYPE_AP_VLAN: |
| 589 | /* no need to tell driver, but set carrier */ | 580 | /* no need to tell driver, but set carrier and chanctx */ |
| 590 | if (rtnl_dereference(sdata->bss->beacon)) | 581 | if (rtnl_dereference(sdata->bss->beacon)) { |
| 582 | ieee80211_vif_vlan_copy_chanctx(sdata); | ||
| 591 | netif_carrier_on(dev); | 583 | netif_carrier_on(dev); |
| 592 | else | 584 | } else { |
| 593 | netif_carrier_off(dev); | 585 | netif_carrier_off(dev); |
| 586 | } | ||
| 594 | break; | 587 | break; |
| 595 | case NL80211_IFTYPE_MONITOR: | 588 | case NL80211_IFTYPE_MONITOR: |
| 596 | if (sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES) { | 589 | if (sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES) { |
| @@ -839,6 +832,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, | |||
| 839 | switch (sdata->vif.type) { | 832 | switch (sdata->vif.type) { |
| 840 | case NL80211_IFTYPE_AP_VLAN: | 833 | case NL80211_IFTYPE_AP_VLAN: |
| 841 | list_del(&sdata->u.vlan.list); | 834 | list_del(&sdata->u.vlan.list); |
| 835 | rcu_assign_pointer(sdata->vif.chanctx_conf, NULL); | ||
| 842 | /* no need to tell driver */ | 836 | /* no need to tell driver */ |
| 843 | break; | 837 | break; |
| 844 | case NL80211_IFTYPE_MONITOR: | 838 | case NL80211_IFTYPE_MONITOR: |
| @@ -865,20 +859,11 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, | |||
| 865 | cancel_work_sync(&sdata->work); | 859 | cancel_work_sync(&sdata->work); |
| 866 | /* | 860 | /* |
| 867 | * When we get here, the interface is marked down. | 861 | * When we get here, the interface is marked down. |
| 868 | * Call rcu_barrier() to wait both for the RX path | 862 | * Call synchronize_rcu() to wait for the RX path |
| 869 | * should it be using the interface and enqueuing | 863 | * should it be using the interface and enqueuing |
| 870 | * frames at this very time on another CPU, and | 864 | * frames at this very time on another CPU. |
| 871 | * for the sta free call_rcu callbacks. | ||
| 872 | */ | ||
| 873 | rcu_barrier(); | ||
| 874 | |||
| 875 | /* | ||
| 876 | * free_sta_rcu() enqueues a work for the actual | ||
| 877 | * sta cleanup, so we need to flush it while | ||
| 878 | * sdata is still valid. | ||
| 879 | */ | 865 | */ |
| 880 | flush_workqueue(local->workqueue); | 866 | synchronize_rcu(); |
| 881 | |||
| 882 | skb_queue_purge(&sdata->skb_queue); | 867 | skb_queue_purge(&sdata->skb_queue); |
| 883 | 868 | ||
| 884 | /* | 869 | /* |
| @@ -1498,6 +1483,15 @@ static void ieee80211_assign_perm_addr(struct ieee80211_local *local, | |||
| 1498 | mutex_unlock(&local->iflist_mtx); | 1483 | mutex_unlock(&local->iflist_mtx); |
| 1499 | } | 1484 | } |
| 1500 | 1485 | ||
| 1486 | static void ieee80211_cleanup_sdata_stas_wk(struct work_struct *wk) | ||
| 1487 | { | ||
| 1488 | struct ieee80211_sub_if_data *sdata; | ||
| 1489 | |||
| 1490 | sdata = container_of(wk, struct ieee80211_sub_if_data, cleanup_stations_wk); | ||
| 1491 | |||
| 1492 | ieee80211_cleanup_sdata_stas(sdata); | ||
| 1493 | } | ||
| 1494 | |||
| 1501 | int ieee80211_if_add(struct ieee80211_local *local, const char *name, | 1495 | int ieee80211_if_add(struct ieee80211_local *local, const char *name, |
| 1502 | struct wireless_dev **new_wdev, enum nl80211_iftype type, | 1496 | struct wireless_dev **new_wdev, enum nl80211_iftype type, |
| 1503 | struct vif_params *params) | 1497 | struct vif_params *params) |
| @@ -1573,6 +1567,10 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name, | |||
| 1573 | 1567 | ||
| 1574 | INIT_LIST_HEAD(&sdata->key_list); | 1568 | INIT_LIST_HEAD(&sdata->key_list); |
| 1575 | 1569 | ||
| 1570 | spin_lock_init(&sdata->cleanup_stations_lock); | ||
| 1571 | INIT_LIST_HEAD(&sdata->cleanup_stations); | ||
| 1572 | INIT_WORK(&sdata->cleanup_stations_wk, ieee80211_cleanup_sdata_stas_wk); | ||
| 1573 | |||
| 1576 | for (i = 0; i < IEEE80211_NUM_BANDS; i++) { | 1574 | for (i = 0; i < IEEE80211_NUM_BANDS; i++) { |
| 1577 | struct ieee80211_supported_band *sband; | 1575 | struct ieee80211_supported_band *sband; |
| 1578 | sband = local->hw.wiphy->bands[i]; | 1576 | sband = local->hw.wiphy->bands[i]; |
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 1bf03f9ff3ba..649ad513547f 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
| @@ -163,7 +163,7 @@ int mesh_rmc_init(struct ieee80211_sub_if_data *sdata) | |||
| 163 | return -ENOMEM; | 163 | return -ENOMEM; |
| 164 | sdata->u.mesh.rmc->idx_mask = RMC_BUCKETS - 1; | 164 | sdata->u.mesh.rmc->idx_mask = RMC_BUCKETS - 1; |
| 165 | for (i = 0; i < RMC_BUCKETS; i++) | 165 | for (i = 0; i < RMC_BUCKETS; i++) |
| 166 | INIT_LIST_HEAD(&sdata->u.mesh.rmc->bucket[i].list); | 166 | INIT_LIST_HEAD(&sdata->u.mesh.rmc->bucket[i]); |
| 167 | return 0; | 167 | return 0; |
| 168 | } | 168 | } |
| 169 | 169 | ||
| @@ -177,7 +177,7 @@ void mesh_rmc_free(struct ieee80211_sub_if_data *sdata) | |||
| 177 | return; | 177 | return; |
| 178 | 178 | ||
| 179 | for (i = 0; i < RMC_BUCKETS; i++) | 179 | for (i = 0; i < RMC_BUCKETS; i++) |
| 180 | list_for_each_entry_safe(p, n, &rmc->bucket[i].list, list) { | 180 | list_for_each_entry_safe(p, n, &rmc->bucket[i], list) { |
| 181 | list_del(&p->list); | 181 | list_del(&p->list); |
| 182 | kmem_cache_free(rm_cache, p); | 182 | kmem_cache_free(rm_cache, p); |
| 183 | } | 183 | } |
| @@ -210,7 +210,7 @@ int mesh_rmc_check(u8 *sa, struct ieee80211s_hdr *mesh_hdr, | |||
| 210 | /* Don't care about endianness since only match matters */ | 210 | /* Don't care about endianness since only match matters */ |
| 211 | memcpy(&seqnum, &mesh_hdr->seqnum, sizeof(mesh_hdr->seqnum)); | 211 | memcpy(&seqnum, &mesh_hdr->seqnum, sizeof(mesh_hdr->seqnum)); |
| 212 | idx = le32_to_cpu(mesh_hdr->seqnum) & rmc->idx_mask; | 212 | idx = le32_to_cpu(mesh_hdr->seqnum) & rmc->idx_mask; |
| 213 | list_for_each_entry_safe(p, n, &rmc->bucket[idx].list, list) { | 213 | list_for_each_entry_safe(p, n, &rmc->bucket[idx], list) { |
| 214 | ++entries; | 214 | ++entries; |
| 215 | if (time_after(jiffies, p->exp_time) || | 215 | if (time_after(jiffies, p->exp_time) || |
| 216 | (entries == RMC_QUEUE_MAX_LEN)) { | 216 | (entries == RMC_QUEUE_MAX_LEN)) { |
| @@ -229,7 +229,7 @@ int mesh_rmc_check(u8 *sa, struct ieee80211s_hdr *mesh_hdr, | |||
| 229 | p->seqnum = seqnum; | 229 | p->seqnum = seqnum; |
| 230 | p->exp_time = jiffies + RMC_TIMEOUT; | 230 | p->exp_time = jiffies + RMC_TIMEOUT; |
| 231 | memcpy(p->sa, sa, ETH_ALEN); | 231 | memcpy(p->sa, sa, ETH_ALEN); |
| 232 | list_add(&p->list, &rmc->bucket[idx].list); | 232 | list_add(&p->list, &rmc->bucket[idx]); |
| 233 | return 0; | 233 | return 0; |
| 234 | } | 234 | } |
| 235 | 235 | ||
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h index 7c9215fb2ac8..84c28c6101cd 100644 --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h | |||
| @@ -184,7 +184,7 @@ struct rmc_entry { | |||
| 184 | }; | 184 | }; |
| 185 | 185 | ||
| 186 | struct mesh_rmc { | 186 | struct mesh_rmc { |
| 187 | struct rmc_entry bucket[RMC_BUCKETS]; | 187 | struct list_head bucket[RMC_BUCKETS]; |
| 188 | u32 idx_mask; | 188 | u32 idx_mask; |
| 189 | }; | 189 | }; |
| 190 | 190 | ||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 7753a9ca98a6..a3552929a21d 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
| @@ -1074,12 +1074,8 @@ void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency) | |||
| 1074 | if (beaconint_us > latency) { | 1074 | if (beaconint_us > latency) { |
| 1075 | local->ps_sdata = NULL; | 1075 | local->ps_sdata = NULL; |
| 1076 | } else { | 1076 | } else { |
| 1077 | struct ieee80211_bss *bss; | ||
| 1078 | int maxslp = 1; | 1077 | int maxslp = 1; |
| 1079 | u8 dtimper; | 1078 | u8 dtimper = found->u.mgd.dtim_period; |
| 1080 | |||
| 1081 | bss = (void *)found->u.mgd.associated->priv; | ||
| 1082 | dtimper = bss->dtim_period; | ||
| 1083 | 1079 | ||
| 1084 | /* If the TIM IE is invalid, pretend the value is 1 */ | 1080 | /* If the TIM IE is invalid, pretend the value is 1 */ |
| 1085 | if (!dtimper) | 1081 | if (!dtimper) |
| @@ -1410,10 +1406,17 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata, | |||
| 1410 | 1406 | ||
| 1411 | ieee80211_led_assoc(local, 1); | 1407 | ieee80211_led_assoc(local, 1); |
| 1412 | 1408 | ||
| 1413 | if (local->hw.flags & IEEE80211_HW_NEED_DTIM_PERIOD) | 1409 | if (local->hw.flags & IEEE80211_HW_NEED_DTIM_PERIOD) { |
| 1414 | bss_conf->dtim_period = bss->dtim_period; | 1410 | /* |
| 1415 | else | 1411 | * If the AP is buggy we may get here with no DTIM period |
| 1412 | * known, so assume it's 1 which is the only safe assumption | ||
| 1413 | * in that case, although if the TIM IE is broken powersave | ||
| 1414 | * probably just won't work at all. | ||
| 1415 | */ | ||
| 1416 | bss_conf->dtim_period = sdata->u.mgd.dtim_period ?: 1; | ||
| 1417 | } else { | ||
| 1416 | bss_conf->dtim_period = 0; | 1418 | bss_conf->dtim_period = 0; |
| 1419 | } | ||
| 1417 | 1420 | ||
| 1418 | bss_conf->assoc = 1; | 1421 | bss_conf->assoc = 1; |
| 1419 | 1422 | ||
| @@ -1562,6 +1565,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, | |||
| 1562 | 1565 | ||
| 1563 | sdata->u.mgd.timers_running = 0; | 1566 | sdata->u.mgd.timers_running = 0; |
| 1564 | 1567 | ||
| 1568 | sdata->vif.bss_conf.dtim_period = 0; | ||
| 1569 | |||
| 1565 | ifmgd->flags = 0; | 1570 | ifmgd->flags = 0; |
| 1566 | ieee80211_vif_release_channel(sdata); | 1571 | ieee80211_vif_release_channel(sdata); |
| 1567 | } | 1572 | } |
| @@ -2373,11 +2378,18 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
| 2373 | struct ieee80211_channel *channel; | 2378 | struct ieee80211_channel *channel; |
| 2374 | bool need_ps = false; | 2379 | bool need_ps = false; |
| 2375 | 2380 | ||
| 2376 | if (sdata->u.mgd.associated && | 2381 | if ((sdata->u.mgd.associated && |
| 2377 | ether_addr_equal(mgmt->bssid, sdata->u.mgd.associated->bssid)) { | 2382 | ether_addr_equal(mgmt->bssid, sdata->u.mgd.associated->bssid)) || |
| 2378 | bss = (void *)sdata->u.mgd.associated->priv; | 2383 | (sdata->u.mgd.assoc_data && |
| 2384 | ether_addr_equal(mgmt->bssid, | ||
| 2385 | sdata->u.mgd.assoc_data->bss->bssid))) { | ||
| 2379 | /* not previously set so we may need to recalc */ | 2386 | /* not previously set so we may need to recalc */ |
| 2380 | need_ps = !bss->dtim_period; | 2387 | need_ps = sdata->u.mgd.associated && !sdata->u.mgd.dtim_period; |
| 2388 | |||
| 2389 | if (elems->tim && !elems->parse_error) { | ||
| 2390 | struct ieee80211_tim_ie *tim_ie = elems->tim; | ||
| 2391 | sdata->u.mgd.dtim_period = tim_ie->dtim_period; | ||
| 2392 | } | ||
| 2381 | } | 2393 | } |
| 2382 | 2394 | ||
| 2383 | if (elems->ds_params && elems->ds_params_len == 1) | 2395 | if (elems->ds_params && elems->ds_params_len == 1) |
| @@ -3896,20 +3908,41 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
| 3896 | /* kick off associate process */ | 3908 | /* kick off associate process */ |
| 3897 | 3909 | ||
| 3898 | ifmgd->assoc_data = assoc_data; | 3910 | ifmgd->assoc_data = assoc_data; |
| 3911 | ifmgd->dtim_period = 0; | ||
| 3899 | 3912 | ||
| 3900 | err = ieee80211_prep_connection(sdata, req->bss, true); | 3913 | err = ieee80211_prep_connection(sdata, req->bss, true); |
| 3901 | if (err) | 3914 | if (err) |
| 3902 | goto err_clear; | 3915 | goto err_clear; |
| 3903 | 3916 | ||
| 3904 | if (!bss->dtim_period && | 3917 | if (sdata->local->hw.flags & IEEE80211_HW_NEED_DTIM_PERIOD) { |
| 3905 | sdata->local->hw.flags & IEEE80211_HW_NEED_DTIM_PERIOD) { | 3918 | const struct cfg80211_bss_ies *beacon_ies; |
| 3906 | /* | 3919 | |
| 3907 | * Wait up to one beacon interval ... | 3920 | rcu_read_lock(); |
| 3908 | * should this be more if we miss one? | 3921 | beacon_ies = rcu_dereference(req->bss->beacon_ies); |
| 3909 | */ | 3922 | if (!beacon_ies) { |
| 3910 | sdata_info(sdata, "waiting for beacon from %pM\n", | 3923 | /* |
| 3911 | ifmgd->bssid); | 3924 | * Wait up to one beacon interval ... |
| 3912 | assoc_data->timeout = TU_TO_EXP_TIME(req->bss->beacon_interval); | 3925 | * should this be more if we miss one? |
| 3926 | */ | ||
| 3927 | sdata_info(sdata, "waiting for beacon from %pM\n", | ||
| 3928 | ifmgd->bssid); | ||
| 3929 | assoc_data->timeout = | ||
| 3930 | TU_TO_EXP_TIME(req->bss->beacon_interval); | ||
| 3931 | } else { | ||
| 3932 | const u8 *tim_ie = cfg80211_find_ie(WLAN_EID_TIM, | ||
| 3933 | beacon_ies->data, | ||
| 3934 | beacon_ies->len); | ||
| 3935 | if (tim_ie && tim_ie[1] >= | ||
| 3936 | sizeof(struct ieee80211_tim_ie)) { | ||
| 3937 | const struct ieee80211_tim_ie *tim; | ||
| 3938 | tim = (void *)(tim_ie + 2); | ||
| 3939 | ifmgd->dtim_period = tim->dtim_period; | ||
| 3940 | } | ||
| 3941 | assoc_data->have_beacon = true; | ||
| 3942 | assoc_data->sent_assoc = false; | ||
| 3943 | assoc_data->timeout = jiffies; | ||
| 3944 | } | ||
| 3945 | rcu_read_unlock(); | ||
| 3913 | } else { | 3946 | } else { |
| 3914 | assoc_data->have_beacon = true; | 3947 | assoc_data->have_beacon = true; |
| 3915 | assoc_data->sent_assoc = false; | 3948 | assoc_data->sent_assoc = false; |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 8ed83dcc149f..d59fc6818b1c 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
| @@ -113,18 +113,6 @@ ieee80211_bss_info_update(struct ieee80211_local *local, | |||
| 113 | bss->valid_data |= IEEE80211_BSS_VALID_ERP; | 113 | bss->valid_data |= IEEE80211_BSS_VALID_ERP; |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | if (elems->tim && (!elems->parse_error || | ||
| 117 | !(bss->valid_data & IEEE80211_BSS_VALID_DTIM))) { | ||
| 118 | struct ieee80211_tim_ie *tim_ie = elems->tim; | ||
| 119 | bss->dtim_period = tim_ie->dtim_period; | ||
| 120 | if (!elems->parse_error) | ||
| 121 | bss->valid_data |= IEEE80211_BSS_VALID_DTIM; | ||
| 122 | } | ||
| 123 | |||
| 124 | /* If the beacon had no TIM IE, or it was invalid, use 1 */ | ||
| 125 | if (beacon && !bss->dtim_period) | ||
| 126 | bss->dtim_period = 1; | ||
| 127 | |||
| 128 | /* replace old supported rates if we get new values */ | 116 | /* replace old supported rates if we get new values */ |
| 129 | if (!elems->parse_error || | 117 | if (!elems->parse_error || |
| 130 | !(bss->valid_data & IEEE80211_BSS_VALID_RATES)) { | 118 | !(bss->valid_data & IEEE80211_BSS_VALID_RATES)) { |
| @@ -832,9 +820,9 @@ int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata, | |||
| 832 | return res; | 820 | return res; |
| 833 | } | 821 | } |
| 834 | 822 | ||
| 835 | int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata, | 823 | int ieee80211_request_ibss_scan(struct ieee80211_sub_if_data *sdata, |
| 836 | const u8 *ssid, u8 ssid_len, | 824 | const u8 *ssid, u8 ssid_len, |
| 837 | struct ieee80211_channel *chan) | 825 | struct ieee80211_channel *chan) |
| 838 | { | 826 | { |
| 839 | struct ieee80211_local *local = sdata->local; | 827 | struct ieee80211_local *local = sdata->local; |
| 840 | int ret = -EBUSY; | 828 | int ret = -EBUSY; |
| @@ -848,22 +836,36 @@ int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata, | |||
| 848 | 836 | ||
| 849 | /* fill internal scan request */ | 837 | /* fill internal scan request */ |
| 850 | if (!chan) { | 838 | if (!chan) { |
| 851 | int i, nchan = 0; | 839 | int i, max_n; |
| 840 | int n_ch = 0; | ||
| 852 | 841 | ||
| 853 | for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | 842 | for (band = 0; band < IEEE80211_NUM_BANDS; band++) { |
| 854 | if (!local->hw.wiphy->bands[band]) | 843 | if (!local->hw.wiphy->bands[band]) |
| 855 | continue; | 844 | continue; |
| 856 | for (i = 0; | 845 | |
| 857 | i < local->hw.wiphy->bands[band]->n_channels; | 846 | max_n = local->hw.wiphy->bands[band]->n_channels; |
| 858 | i++) { | 847 | for (i = 0; i < max_n; i++) { |
| 859 | local->int_scan_req->channels[nchan] = | 848 | struct ieee80211_channel *tmp_ch = |
| 860 | &local->hw.wiphy->bands[band]->channels[i]; | 849 | &local->hw.wiphy->bands[band]->channels[i]; |
| 861 | nchan++; | 850 | |
| 851 | if (tmp_ch->flags & (IEEE80211_CHAN_NO_IBSS | | ||
| 852 | IEEE80211_CHAN_DISABLED)) | ||
| 853 | continue; | ||
| 854 | |||
| 855 | local->int_scan_req->channels[n_ch] = tmp_ch; | ||
| 856 | n_ch++; | ||
| 862 | } | 857 | } |
| 863 | } | 858 | } |
| 864 | 859 | ||
| 865 | local->int_scan_req->n_channels = nchan; | 860 | if (WARN_ON_ONCE(n_ch == 0)) |
| 861 | goto unlock; | ||
| 862 | |||
| 863 | local->int_scan_req->n_channels = n_ch; | ||
| 866 | } else { | 864 | } else { |
| 865 | if (WARN_ON_ONCE(chan->flags & (IEEE80211_CHAN_NO_IBSS | | ||
| 866 | IEEE80211_CHAN_DISABLED))) | ||
| 867 | goto unlock; | ||
| 868 | |||
| 867 | local->int_scan_req->channels[0] = chan; | 869 | local->int_scan_req->channels[0] = chan; |
| 868 | local->int_scan_req->n_channels = 1; | 870 | local->int_scan_req->n_channels = 1; |
| 869 | } | 871 | } |
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index f3e502502fee..ca9fde198188 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
| @@ -91,9 +91,8 @@ static int sta_info_hash_del(struct ieee80211_local *local, | |||
| 91 | return -ENOENT; | 91 | return -ENOENT; |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | static void free_sta_work(struct work_struct *wk) | 94 | static void cleanup_single_sta(struct sta_info *sta) |
| 95 | { | 95 | { |
| 96 | struct sta_info *sta = container_of(wk, struct sta_info, free_sta_wk); | ||
| 97 | int ac, i; | 96 | int ac, i; |
| 98 | struct tid_ampdu_tx *tid_tx; | 97 | struct tid_ampdu_tx *tid_tx; |
| 99 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 98 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
| @@ -153,11 +152,35 @@ static void free_sta_work(struct work_struct *wk) | |||
| 153 | sta_info_free(local, sta); | 152 | sta_info_free(local, sta); |
| 154 | } | 153 | } |
| 155 | 154 | ||
| 155 | void ieee80211_cleanup_sdata_stas(struct ieee80211_sub_if_data *sdata) | ||
| 156 | { | ||
| 157 | struct sta_info *sta; | ||
| 158 | |||
| 159 | spin_lock_bh(&sdata->cleanup_stations_lock); | ||
| 160 | while (!list_empty(&sdata->cleanup_stations)) { | ||
| 161 | sta = list_first_entry(&sdata->cleanup_stations, | ||
| 162 | struct sta_info, list); | ||
| 163 | list_del(&sta->list); | ||
| 164 | spin_unlock_bh(&sdata->cleanup_stations_lock); | ||
| 165 | |||
| 166 | cleanup_single_sta(sta); | ||
| 167 | |||
| 168 | spin_lock_bh(&sdata->cleanup_stations_lock); | ||
| 169 | } | ||
| 170 | |||
| 171 | spin_unlock_bh(&sdata->cleanup_stations_lock); | ||
| 172 | } | ||
| 173 | |||
| 156 | static void free_sta_rcu(struct rcu_head *h) | 174 | static void free_sta_rcu(struct rcu_head *h) |
| 157 | { | 175 | { |
| 158 | struct sta_info *sta = container_of(h, struct sta_info, rcu_head); | 176 | struct sta_info *sta = container_of(h, struct sta_info, rcu_head); |
| 177 | struct ieee80211_sub_if_data *sdata = sta->sdata; | ||
| 159 | 178 | ||
| 160 | ieee80211_queue_work(&sta->local->hw, &sta->free_sta_wk); | 179 | spin_lock(&sdata->cleanup_stations_lock); |
| 180 | list_add_tail(&sta->list, &sdata->cleanup_stations); | ||
| 181 | spin_unlock(&sdata->cleanup_stations_lock); | ||
| 182 | |||
| 183 | ieee80211_queue_work(&sdata->local->hw, &sdata->cleanup_stations_wk); | ||
| 161 | } | 184 | } |
| 162 | 185 | ||
| 163 | /* protected by RCU */ | 186 | /* protected by RCU */ |
| @@ -310,7 +333,6 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, | |||
| 310 | 333 | ||
| 311 | spin_lock_init(&sta->lock); | 334 | spin_lock_init(&sta->lock); |
| 312 | INIT_WORK(&sta->drv_unblock_wk, sta_unblock); | 335 | INIT_WORK(&sta->drv_unblock_wk, sta_unblock); |
| 313 | INIT_WORK(&sta->free_sta_wk, free_sta_work); | ||
| 314 | INIT_WORK(&sta->ampdu_mlme.work, ieee80211_ba_session_work); | 336 | INIT_WORK(&sta->ampdu_mlme.work, ieee80211_ba_session_work); |
| 315 | mutex_init(&sta->ampdu_mlme.mtx); | 337 | mutex_init(&sta->ampdu_mlme.mtx); |
| 316 | 338 | ||
| @@ -862,7 +884,7 @@ void sta_info_init(struct ieee80211_local *local) | |||
| 862 | 884 | ||
| 863 | void sta_info_stop(struct ieee80211_local *local) | 885 | void sta_info_stop(struct ieee80211_local *local) |
| 864 | { | 886 | { |
| 865 | del_timer(&local->sta_cleanup); | 887 | del_timer_sync(&local->sta_cleanup); |
| 866 | sta_info_flush(local, NULL); | 888 | sta_info_flush(local, NULL); |
| 867 | } | 889 | } |
| 868 | 890 | ||
| @@ -891,6 +913,20 @@ int sta_info_flush(struct ieee80211_local *local, | |||
| 891 | } | 913 | } |
| 892 | mutex_unlock(&local->sta_mtx); | 914 | mutex_unlock(&local->sta_mtx); |
| 893 | 915 | ||
| 916 | rcu_barrier(); | ||
| 917 | |||
| 918 | if (sdata) { | ||
| 919 | ieee80211_cleanup_sdata_stas(sdata); | ||
| 920 | cancel_work_sync(&sdata->cleanup_stations_wk); | ||
| 921 | } else { | ||
| 922 | mutex_lock(&local->iflist_mtx); | ||
| 923 | list_for_each_entry(sdata, &local->interfaces, list) { | ||
| 924 | ieee80211_cleanup_sdata_stas(sdata); | ||
| 925 | cancel_work_sync(&sdata->cleanup_stations_wk); | ||
| 926 | } | ||
| 927 | mutex_unlock(&local->iflist_mtx); | ||
| 928 | } | ||
| 929 | |||
| 894 | return ret; | 930 | return ret; |
| 895 | } | 931 | } |
| 896 | 932 | ||
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 1489bca9ea97..37c1889afd3a 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h | |||
| @@ -299,7 +299,6 @@ struct sta_info { | |||
| 299 | spinlock_t lock; | 299 | spinlock_t lock; |
| 300 | 300 | ||
| 301 | struct work_struct drv_unblock_wk; | 301 | struct work_struct drv_unblock_wk; |
| 302 | struct work_struct free_sta_wk; | ||
| 303 | 302 | ||
| 304 | u16 listen_interval; | 303 | u16 listen_interval; |
| 305 | 304 | ||
| @@ -563,4 +562,6 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta); | |||
| 563 | void ieee80211_sta_ps_deliver_poll_response(struct sta_info *sta); | 562 | void ieee80211_sta_ps_deliver_poll_response(struct sta_info *sta); |
| 564 | void ieee80211_sta_ps_deliver_uapsd(struct sta_info *sta); | 563 | void ieee80211_sta_ps_deliver_uapsd(struct sta_info *sta); |
| 565 | 564 | ||
| 565 | void ieee80211_cleanup_sdata_stas(struct ieee80211_sub_if_data *sdata); | ||
| 566 | |||
| 566 | #endif /* STA_INFO_H */ | 567 | #endif /* STA_INFO_H */ |
diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c index 1191039c2b1b..199b92261e94 100644 --- a/net/mac802154/wpan.c +++ b/net/mac802154/wpan.c | |||
| @@ -389,7 +389,7 @@ void mac802154_wpan_setup(struct net_device *dev) | |||
| 389 | 389 | ||
| 390 | static int mac802154_process_data(struct net_device *dev, struct sk_buff *skb) | 390 | static int mac802154_process_data(struct net_device *dev, struct sk_buff *skb) |
| 391 | { | 391 | { |
| 392 | return netif_rx(skb); | 392 | return netif_rx_ni(skb); |
| 393 | } | 393 | } |
| 394 | 394 | ||
| 395 | static int | 395 | static int |
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig index fefa514b9917..49e96df5fbc4 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig | |||
| @@ -680,6 +680,13 @@ config NETFILTER_XT_TARGET_NFQUEUE | |||
| 680 | 680 | ||
| 681 | To compile it as a module, choose M here. If unsure, say N. | 681 | To compile it as a module, choose M here. If unsure, say N. |
| 682 | 682 | ||
| 683 | config NETFILTER_XT_TARGET_NOTRACK | ||
| 684 | tristate '"NOTRACK" target support (DEPRECATED)' | ||
| 685 | depends on NF_CONNTRACK | ||
| 686 | depends on IP_NF_RAW || IP6_NF_RAW | ||
| 687 | depends on NETFILTER_ADVANCED | ||
| 688 | select NETFILTER_XT_TARGET_CT | ||
| 689 | |||
| 683 | config NETFILTER_XT_TARGET_RATEEST | 690 | config NETFILTER_XT_TARGET_RATEEST |
| 684 | tristate '"RATEEST" target support' | 691 | tristate '"RATEEST" target support' |
| 685 | depends on NETFILTER_ADVANCED | 692 | depends on NETFILTER_ADVANCED |
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 08cdc71d8e87..016d95ead930 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
| @@ -1526,6 +1526,7 @@ err_extend: | |||
| 1526 | */ | 1526 | */ |
| 1527 | #define UNCONFIRMED_NULLS_VAL ((1<<30)+0) | 1527 | #define UNCONFIRMED_NULLS_VAL ((1<<30)+0) |
| 1528 | #define DYING_NULLS_VAL ((1<<30)+1) | 1528 | #define DYING_NULLS_VAL ((1<<30)+1) |
| 1529 | #define TEMPLATE_NULLS_VAL ((1<<30)+2) | ||
| 1529 | 1530 | ||
| 1530 | static int nf_conntrack_init_net(struct net *net) | 1531 | static int nf_conntrack_init_net(struct net *net) |
| 1531 | { | 1532 | { |
| @@ -1534,6 +1535,7 @@ static int nf_conntrack_init_net(struct net *net) | |||
| 1534 | atomic_set(&net->ct.count, 0); | 1535 | atomic_set(&net->ct.count, 0); |
| 1535 | INIT_HLIST_NULLS_HEAD(&net->ct.unconfirmed, UNCONFIRMED_NULLS_VAL); | 1536 | INIT_HLIST_NULLS_HEAD(&net->ct.unconfirmed, UNCONFIRMED_NULLS_VAL); |
| 1536 | INIT_HLIST_NULLS_HEAD(&net->ct.dying, DYING_NULLS_VAL); | 1537 | INIT_HLIST_NULLS_HEAD(&net->ct.dying, DYING_NULLS_VAL); |
| 1538 | INIT_HLIST_NULLS_HEAD(&net->ct.tmpl, TEMPLATE_NULLS_VAL); | ||
| 1537 | net->ct.stat = alloc_percpu(struct ip_conntrack_stat); | 1539 | net->ct.stat = alloc_percpu(struct ip_conntrack_stat); |
| 1538 | if (!net->ct.stat) { | 1540 | if (!net->ct.stat) { |
| 1539 | ret = -ENOMEM; | 1541 | ret = -ENOMEM; |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 4e078cd84d83..627b0e50b238 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
| @@ -2624,7 +2624,7 @@ ctnetlink_create_expect(struct net *net, u16 zone, | |||
| 2624 | if (!help) { | 2624 | if (!help) { |
| 2625 | if (!cda[CTA_EXPECT_TIMEOUT]) { | 2625 | if (!cda[CTA_EXPECT_TIMEOUT]) { |
| 2626 | err = -EINVAL; | 2626 | err = -EINVAL; |
| 2627 | goto out; | 2627 | goto err_out; |
| 2628 | } | 2628 | } |
| 2629 | exp->timeout.expires = | 2629 | exp->timeout.expires = |
| 2630 | jiffies + ntohl(nla_get_be32(cda[CTA_EXPECT_TIMEOUT])) * HZ; | 2630 | jiffies + ntohl(nla_get_be32(cda[CTA_EXPECT_TIMEOUT])) * HZ; |
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 9f199f2e31fa..92fd8eca0d31 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | */ | 13 | */ |
| 14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 15 | #include <linux/skbuff.h> | 15 | #include <linux/skbuff.h> |
| 16 | #include <linux/if_arp.h> | ||
| 16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
| 17 | #include <linux/ip.h> | 18 | #include <linux/ip.h> |
| 18 | #include <linux/ipv6.h> | 19 | #include <linux/ipv6.h> |
| @@ -384,6 +385,7 @@ __build_packet_message(struct nfulnl_instance *inst, | |||
| 384 | struct nfgenmsg *nfmsg; | 385 | struct nfgenmsg *nfmsg; |
| 385 | sk_buff_data_t old_tail = inst->skb->tail; | 386 | sk_buff_data_t old_tail = inst->skb->tail; |
| 386 | struct sock *sk; | 387 | struct sock *sk; |
| 388 | const unsigned char *hwhdrp; | ||
| 387 | 389 | ||
| 388 | nlh = nlmsg_put(inst->skb, 0, 0, | 390 | nlh = nlmsg_put(inst->skb, 0, 0, |
| 389 | NFNL_SUBSYS_ULOG << 8 | NFULNL_MSG_PACKET, | 391 | NFNL_SUBSYS_ULOG << 8 | NFULNL_MSG_PACKET, |
| @@ -485,9 +487,17 @@ __build_packet_message(struct nfulnl_instance *inst, | |||
| 485 | if (indev && skb_mac_header_was_set(skb)) { | 487 | if (indev && skb_mac_header_was_set(skb)) { |
| 486 | if (nla_put_be16(inst->skb, NFULA_HWTYPE, htons(skb->dev->type)) || | 488 | if (nla_put_be16(inst->skb, NFULA_HWTYPE, htons(skb->dev->type)) || |
| 487 | nla_put_be16(inst->skb, NFULA_HWLEN, | 489 | nla_put_be16(inst->skb, NFULA_HWLEN, |
| 488 | htons(skb->dev->hard_header_len)) || | 490 | htons(skb->dev->hard_header_len))) |
| 489 | nla_put(inst->skb, NFULA_HWHEADER, skb->dev->hard_header_len, | 491 | goto nla_put_failure; |
| 490 | skb_mac_header(skb))) | 492 | |
| 493 | hwhdrp = skb_mac_header(skb); | ||
| 494 | |||
| 495 | if (skb->dev->type == ARPHRD_SIT) | ||
| 496 | hwhdrp -= ETH_HLEN; | ||
| 497 | |||
| 498 | if (hwhdrp >= skb->head && | ||
| 499 | nla_put(inst->skb, NFULA_HWHEADER, | ||
| 500 | skb->dev->hard_header_len, hwhdrp)) | ||
| 491 | goto nla_put_failure; | 501 | goto nla_put_failure; |
| 492 | } | 502 | } |
| 493 | 503 | ||
diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c index ae7f5daeee43..2a0843081840 100644 --- a/net/netfilter/xt_CT.c +++ b/net/netfilter/xt_CT.c | |||
| @@ -149,6 +149,10 @@ static int xt_ct_tg_check_v0(const struct xt_tgchk_param *par) | |||
| 149 | 149 | ||
| 150 | __set_bit(IPS_TEMPLATE_BIT, &ct->status); | 150 | __set_bit(IPS_TEMPLATE_BIT, &ct->status); |
| 151 | __set_bit(IPS_CONFIRMED_BIT, &ct->status); | 151 | __set_bit(IPS_CONFIRMED_BIT, &ct->status); |
| 152 | |||
| 153 | /* Overload tuple linked list to put us in template list. */ | ||
| 154 | hlist_nulls_add_head_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode, | ||
| 155 | &par->net->ct.tmpl); | ||
| 152 | out: | 156 | out: |
| 153 | info->ct = ct; | 157 | info->ct = ct; |
| 154 | return 0; | 158 | return 0; |
| @@ -289,6 +293,10 @@ static int xt_ct_tg_check_v1(const struct xt_tgchk_param *par) | |||
| 289 | 293 | ||
| 290 | __set_bit(IPS_TEMPLATE_BIT, &ct->status); | 294 | __set_bit(IPS_TEMPLATE_BIT, &ct->status); |
| 291 | __set_bit(IPS_CONFIRMED_BIT, &ct->status); | 295 | __set_bit(IPS_CONFIRMED_BIT, &ct->status); |
| 296 | |||
| 297 | /* Overload tuple linked list to put us in template list. */ | ||
| 298 | hlist_nulls_add_head_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode, | ||
| 299 | &par->net->ct.tmpl); | ||
| 292 | out: | 300 | out: |
| 293 | info->ct = ct; | 301 | info->ct = ct; |
| 294 | return 0; | 302 | return 0; |
| @@ -377,14 +385,60 @@ static struct xt_target xt_ct_tg_reg[] __read_mostly = { | |||
| 377 | }, | 385 | }, |
| 378 | }; | 386 | }; |
| 379 | 387 | ||
| 388 | static unsigned int | ||
| 389 | notrack_tg(struct sk_buff *skb, const struct xt_action_param *par) | ||
| 390 | { | ||
| 391 | /* Previously seen (loopback)? Ignore. */ | ||
| 392 | if (skb->nfct != NULL) | ||
| 393 | return XT_CONTINUE; | ||
| 394 | |||
| 395 | skb->nfct = &nf_ct_untracked_get()->ct_general; | ||
| 396 | skb->nfctinfo = IP_CT_NEW; | ||
| 397 | nf_conntrack_get(skb->nfct); | ||
| 398 | |||
| 399 | return XT_CONTINUE; | ||
| 400 | } | ||
| 401 | |||
| 402 | static int notrack_chk(const struct xt_tgchk_param *par) | ||
| 403 | { | ||
| 404 | if (!par->net->xt.notrack_deprecated_warning) { | ||
| 405 | pr_info("netfilter: NOTRACK target is deprecated, " | ||
| 406 | "use CT instead or upgrade iptables\n"); | ||
| 407 | par->net->xt.notrack_deprecated_warning = true; | ||
| 408 | } | ||
| 409 | return 0; | ||
| 410 | } | ||
| 411 | |||
| 412 | static struct xt_target notrack_tg_reg __read_mostly = { | ||
| 413 | .name = "NOTRACK", | ||
| 414 | .revision = 0, | ||
| 415 | .family = NFPROTO_UNSPEC, | ||
| 416 | .checkentry = notrack_chk, | ||
| 417 | .target = notrack_tg, | ||
| 418 | .table = "raw", | ||
| 419 | .me = THIS_MODULE, | ||
| 420 | }; | ||
| 421 | |||
| 380 | static int __init xt_ct_tg_init(void) | 422 | static int __init xt_ct_tg_init(void) |
| 381 | { | 423 | { |
| 382 | return xt_register_targets(xt_ct_tg_reg, ARRAY_SIZE(xt_ct_tg_reg)); | 424 | int ret; |
| 425 | |||
| 426 | ret = xt_register_target(¬rack_tg_reg); | ||
| 427 | if (ret < 0) | ||
| 428 | return ret; | ||
| 429 | |||
| 430 | ret = xt_register_targets(xt_ct_tg_reg, ARRAY_SIZE(xt_ct_tg_reg)); | ||
| 431 | if (ret < 0) { | ||
| 432 | xt_unregister_target(¬rack_tg_reg); | ||
| 433 | return ret; | ||
| 434 | } | ||
| 435 | return 0; | ||
| 383 | } | 436 | } |
| 384 | 437 | ||
| 385 | static void __exit xt_ct_tg_exit(void) | 438 | static void __exit xt_ct_tg_exit(void) |
| 386 | { | 439 | { |
| 387 | xt_unregister_targets(xt_ct_tg_reg, ARRAY_SIZE(xt_ct_tg_reg)); | 440 | xt_unregister_targets(xt_ct_tg_reg, ARRAY_SIZE(xt_ct_tg_reg)); |
| 441 | xt_unregister_target(¬rack_tg_reg); | ||
| 388 | } | 442 | } |
| 389 | 443 | ||
| 390 | module_init(xt_ct_tg_init); | 444 | module_init(xt_ct_tg_init); |
| @@ -394,3 +448,5 @@ MODULE_LICENSE("GPL"); | |||
| 394 | MODULE_DESCRIPTION("Xtables: connection tracking target"); | 448 | MODULE_DESCRIPTION("Xtables: connection tracking target"); |
| 395 | MODULE_ALIAS("ipt_CT"); | 449 | MODULE_ALIAS("ipt_CT"); |
| 396 | MODULE_ALIAS("ip6t_CT"); | 450 | MODULE_ALIAS("ip6t_CT"); |
| 451 | MODULE_ALIAS("ipt_NOTRACK"); | ||
| 452 | MODULE_ALIAS("ip6t_NOTRACK"); | ||
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index 26a668a84aa2..a9d7af953ceb 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c | |||
| @@ -157,11 +157,22 @@ dsthash_find(const struct xt_hashlimit_htable *ht, | |||
| 157 | /* allocate dsthash_ent, initialize dst, put in htable and lock it */ | 157 | /* allocate dsthash_ent, initialize dst, put in htable and lock it */ |
| 158 | static struct dsthash_ent * | 158 | static struct dsthash_ent * |
| 159 | dsthash_alloc_init(struct xt_hashlimit_htable *ht, | 159 | dsthash_alloc_init(struct xt_hashlimit_htable *ht, |
| 160 | const struct dsthash_dst *dst) | 160 | const struct dsthash_dst *dst, bool *race) |
| 161 | { | 161 | { |
| 162 | struct dsthash_ent *ent; | 162 | struct dsthash_ent *ent; |
| 163 | 163 | ||
| 164 | spin_lock(&ht->lock); | 164 | spin_lock(&ht->lock); |
| 165 | |||
| 166 | /* Two or more packets may race to create the same entry in the | ||
| 167 | * hashtable, double check if this packet lost race. | ||
| 168 | */ | ||
| 169 | ent = dsthash_find(ht, dst); | ||
| 170 | if (ent != NULL) { | ||
| 171 | spin_unlock(&ht->lock); | ||
| 172 | *race = true; | ||
| 173 | return ent; | ||
| 174 | } | ||
| 175 | |||
| 165 | /* initialize hash with random val at the time we allocate | 176 | /* initialize hash with random val at the time we allocate |
| 166 | * the first hashtable entry */ | 177 | * the first hashtable entry */ |
| 167 | if (unlikely(!ht->rnd_initialized)) { | 178 | if (unlikely(!ht->rnd_initialized)) { |
| @@ -318,7 +329,10 @@ static void htable_destroy(struct xt_hashlimit_htable *hinfo) | |||
| 318 | parent = hashlimit_net->ipt_hashlimit; | 329 | parent = hashlimit_net->ipt_hashlimit; |
| 319 | else | 330 | else |
| 320 | parent = hashlimit_net->ip6t_hashlimit; | 331 | parent = hashlimit_net->ip6t_hashlimit; |
| 321 | remove_proc_entry(hinfo->pde->name, parent); | 332 | |
| 333 | if(parent != NULL) | ||
| 334 | remove_proc_entry(hinfo->pde->name, parent); | ||
| 335 | |||
| 322 | htable_selective_cleanup(hinfo, select_all); | 336 | htable_selective_cleanup(hinfo, select_all); |
| 323 | vfree(hinfo); | 337 | vfree(hinfo); |
| 324 | } | 338 | } |
| @@ -585,6 +599,7 @@ hashlimit_mt(const struct sk_buff *skb, struct xt_action_param *par) | |||
| 585 | unsigned long now = jiffies; | 599 | unsigned long now = jiffies; |
| 586 | struct dsthash_ent *dh; | 600 | struct dsthash_ent *dh; |
| 587 | struct dsthash_dst dst; | 601 | struct dsthash_dst dst; |
| 602 | bool race = false; | ||
| 588 | u32 cost; | 603 | u32 cost; |
| 589 | 604 | ||
| 590 | if (hashlimit_init_dst(hinfo, &dst, skb, par->thoff) < 0) | 605 | if (hashlimit_init_dst(hinfo, &dst, skb, par->thoff) < 0) |
| @@ -593,13 +608,18 @@ hashlimit_mt(const struct sk_buff *skb, struct xt_action_param *par) | |||
| 593 | rcu_read_lock_bh(); | 608 | rcu_read_lock_bh(); |
| 594 | dh = dsthash_find(hinfo, &dst); | 609 | dh = dsthash_find(hinfo, &dst); |
| 595 | if (dh == NULL) { | 610 | if (dh == NULL) { |
| 596 | dh = dsthash_alloc_init(hinfo, &dst); | 611 | dh = dsthash_alloc_init(hinfo, &dst, &race); |
| 597 | if (dh == NULL) { | 612 | if (dh == NULL) { |
| 598 | rcu_read_unlock_bh(); | 613 | rcu_read_unlock_bh(); |
| 599 | goto hotdrop; | 614 | goto hotdrop; |
| 615 | } else if (race) { | ||
| 616 | /* Already got an entry, update expiration timeout */ | ||
| 617 | dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire); | ||
| 618 | rateinfo_recalc(dh, now, hinfo->cfg.mode); | ||
| 619 | } else { | ||
| 620 | dh->expires = jiffies + msecs_to_jiffies(hinfo->cfg.expire); | ||
| 621 | rateinfo_init(dh, hinfo); | ||
| 600 | } | 622 | } |
| 601 | dh->expires = jiffies + msecs_to_jiffies(hinfo->cfg.expire); | ||
| 602 | rateinfo_init(dh, hinfo); | ||
| 603 | } else { | 623 | } else { |
| 604 | /* update expiration timeout */ | 624 | /* update expiration timeout */ |
| 605 | dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire); | 625 | dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire); |
| @@ -856,6 +876,27 @@ static int __net_init hashlimit_proc_net_init(struct net *net) | |||
| 856 | 876 | ||
| 857 | static void __net_exit hashlimit_proc_net_exit(struct net *net) | 877 | static void __net_exit hashlimit_proc_net_exit(struct net *net) |
| 858 | { | 878 | { |
| 879 | struct xt_hashlimit_htable *hinfo; | ||
| 880 | struct hlist_node *pos; | ||
| 881 | struct proc_dir_entry *pde; | ||
| 882 | struct hashlimit_net *hashlimit_net = hashlimit_pernet(net); | ||
| 883 | |||
| 884 | /* recent_net_exit() is called before recent_mt_destroy(). Make sure | ||
| 885 | * that the parent xt_recent proc entry is is empty before trying to | ||
| 886 | * remove it. | ||
| 887 | */ | ||
| 888 | mutex_lock(&hashlimit_mutex); | ||
| 889 | pde = hashlimit_net->ipt_hashlimit; | ||
| 890 | if (pde == NULL) | ||
| 891 | pde = hashlimit_net->ip6t_hashlimit; | ||
| 892 | |||
| 893 | hlist_for_each_entry(hinfo, pos, &hashlimit_net->htables, node) | ||
| 894 | remove_proc_entry(hinfo->pde->name, pde); | ||
| 895 | |||
| 896 | hashlimit_net->ipt_hashlimit = NULL; | ||
| 897 | hashlimit_net->ip6t_hashlimit = NULL; | ||
| 898 | mutex_unlock(&hashlimit_mutex); | ||
| 899 | |||
| 859 | proc_net_remove(net, "ipt_hashlimit"); | 900 | proc_net_remove(net, "ipt_hashlimit"); |
| 860 | #if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) | 901 | #if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) |
| 861 | proc_net_remove(net, "ip6t_hashlimit"); | 902 | proc_net_remove(net, "ip6t_hashlimit"); |
| @@ -872,9 +913,6 @@ static int __net_init hashlimit_net_init(struct net *net) | |||
| 872 | 913 | ||
| 873 | static void __net_exit hashlimit_net_exit(struct net *net) | 914 | static void __net_exit hashlimit_net_exit(struct net *net) |
| 874 | { | 915 | { |
| 875 | struct hashlimit_net *hashlimit_net = hashlimit_pernet(net); | ||
| 876 | |||
| 877 | BUG_ON(!hlist_empty(&hashlimit_net->htables)); | ||
| 878 | hashlimit_proc_net_exit(net); | 916 | hashlimit_proc_net_exit(net); |
| 879 | } | 917 | } |
| 880 | 918 | ||
diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c index 4635c9b00459..978efc9b555a 100644 --- a/net/netfilter/xt_recent.c +++ b/net/netfilter/xt_recent.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/skbuff.h> | 29 | #include <linux/skbuff.h> |
| 30 | #include <linux/inet.h> | 30 | #include <linux/inet.h> |
| 31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
| 32 | #include <linux/vmalloc.h> | ||
| 32 | #include <net/net_namespace.h> | 33 | #include <net/net_namespace.h> |
| 33 | #include <net/netns/generic.h> | 34 | #include <net/netns/generic.h> |
| 34 | 35 | ||
| @@ -310,6 +311,14 @@ out: | |||
| 310 | return ret; | 311 | return ret; |
| 311 | } | 312 | } |
| 312 | 313 | ||
| 314 | static void recent_table_free(void *addr) | ||
| 315 | { | ||
| 316 | if (is_vmalloc_addr(addr)) | ||
| 317 | vfree(addr); | ||
| 318 | else | ||
| 319 | kfree(addr); | ||
| 320 | } | ||
| 321 | |||
| 313 | static int recent_mt_check(const struct xt_mtchk_param *par, | 322 | static int recent_mt_check(const struct xt_mtchk_param *par, |
| 314 | const struct xt_recent_mtinfo_v1 *info) | 323 | const struct xt_recent_mtinfo_v1 *info) |
| 315 | { | 324 | { |
| @@ -322,6 +331,7 @@ static int recent_mt_check(const struct xt_mtchk_param *par, | |||
| 322 | #endif | 331 | #endif |
| 323 | unsigned int i; | 332 | unsigned int i; |
| 324 | int ret = -EINVAL; | 333 | int ret = -EINVAL; |
| 334 | size_t sz; | ||
| 325 | 335 | ||
| 326 | if (unlikely(!hash_rnd_inited)) { | 336 | if (unlikely(!hash_rnd_inited)) { |
| 327 | get_random_bytes(&hash_rnd, sizeof(hash_rnd)); | 337 | get_random_bytes(&hash_rnd, sizeof(hash_rnd)); |
| @@ -360,8 +370,11 @@ static int recent_mt_check(const struct xt_mtchk_param *par, | |||
| 360 | goto out; | 370 | goto out; |
| 361 | } | 371 | } |
| 362 | 372 | ||
| 363 | t = kzalloc(sizeof(*t) + sizeof(t->iphash[0]) * ip_list_hash_size, | 373 | sz = sizeof(*t) + sizeof(t->iphash[0]) * ip_list_hash_size; |
| 364 | GFP_KERNEL); | 374 | if (sz <= PAGE_SIZE) |
| 375 | t = kzalloc(sz, GFP_KERNEL); | ||
| 376 | else | ||
| 377 | t = vzalloc(sz); | ||
| 365 | if (t == NULL) { | 378 | if (t == NULL) { |
| 366 | ret = -ENOMEM; | 379 | ret = -ENOMEM; |
| 367 | goto out; | 380 | goto out; |
| @@ -377,14 +390,14 @@ static int recent_mt_check(const struct xt_mtchk_param *par, | |||
| 377 | uid = make_kuid(&init_user_ns, ip_list_uid); | 390 | uid = make_kuid(&init_user_ns, ip_list_uid); |
| 378 | gid = make_kgid(&init_user_ns, ip_list_gid); | 391 | gid = make_kgid(&init_user_ns, ip_list_gid); |
| 379 | if (!uid_valid(uid) || !gid_valid(gid)) { | 392 | if (!uid_valid(uid) || !gid_valid(gid)) { |
| 380 | kfree(t); | 393 | recent_table_free(t); |
| 381 | ret = -EINVAL; | 394 | ret = -EINVAL; |
| 382 | goto out; | 395 | goto out; |
| 383 | } | 396 | } |
| 384 | pde = proc_create_data(t->name, ip_list_perms, recent_net->xt_recent, | 397 | pde = proc_create_data(t->name, ip_list_perms, recent_net->xt_recent, |
| 385 | &recent_mt_fops, t); | 398 | &recent_mt_fops, t); |
| 386 | if (pde == NULL) { | 399 | if (pde == NULL) { |
| 387 | kfree(t); | 400 | recent_table_free(t); |
| 388 | ret = -ENOMEM; | 401 | ret = -ENOMEM; |
| 389 | goto out; | 402 | goto out; |
| 390 | } | 403 | } |
| @@ -431,10 +444,11 @@ static void recent_mt_destroy(const struct xt_mtdtor_param *par) | |||
| 431 | list_del(&t->list); | 444 | list_del(&t->list); |
| 432 | spin_unlock_bh(&recent_lock); | 445 | spin_unlock_bh(&recent_lock); |
| 433 | #ifdef CONFIG_PROC_FS | 446 | #ifdef CONFIG_PROC_FS |
| 434 | remove_proc_entry(t->name, recent_net->xt_recent); | 447 | if (recent_net->xt_recent != NULL) |
| 448 | remove_proc_entry(t->name, recent_net->xt_recent); | ||
| 435 | #endif | 449 | #endif |
| 436 | recent_table_flush(t); | 450 | recent_table_flush(t); |
| 437 | kfree(t); | 451 | recent_table_free(t); |
| 438 | } | 452 | } |
| 439 | mutex_unlock(&recent_mutex); | 453 | mutex_unlock(&recent_mutex); |
| 440 | } | 454 | } |
| @@ -615,6 +629,20 @@ static int __net_init recent_proc_net_init(struct net *net) | |||
| 615 | 629 | ||
| 616 | static void __net_exit recent_proc_net_exit(struct net *net) | 630 | static void __net_exit recent_proc_net_exit(struct net *net) |
| 617 | { | 631 | { |
| 632 | struct recent_net *recent_net = recent_pernet(net); | ||
| 633 | struct recent_table *t; | ||
| 634 | |||
| 635 | /* recent_net_exit() is called before recent_mt_destroy(). Make sure | ||
| 636 | * that the parent xt_recent proc entry is is empty before trying to | ||
| 637 | * remove it. | ||
| 638 | */ | ||
| 639 | spin_lock_bh(&recent_lock); | ||
| 640 | list_for_each_entry(t, &recent_net->tables, list) | ||
| 641 | remove_proc_entry(t->name, recent_net->xt_recent); | ||
| 642 | |||
| 643 | recent_net->xt_recent = NULL; | ||
| 644 | spin_unlock_bh(&recent_lock); | ||
| 645 | |||
| 618 | proc_net_remove(net, "xt_recent"); | 646 | proc_net_remove(net, "xt_recent"); |
| 619 | } | 647 | } |
| 620 | #else | 648 | #else |
| @@ -638,9 +666,6 @@ static int __net_init recent_net_init(struct net *net) | |||
| 638 | 666 | ||
| 639 | static void __net_exit recent_net_exit(struct net *net) | 667 | static void __net_exit recent_net_exit(struct net *net) |
| 640 | { | 668 | { |
| 641 | struct recent_net *recent_net = recent_pernet(net); | ||
| 642 | |||
| 643 | BUG_ON(!list_empty(&recent_net->tables)); | ||
| 644 | recent_proc_net_exit(net); | 669 | recent_proc_net_exit(net); |
| 645 | } | 670 | } |
| 646 | 671 | ||
diff --git a/net/sctp/Kconfig b/net/sctp/Kconfig index c26210618e14..7521d944c0fb 100644 --- a/net/sctp/Kconfig +++ b/net/sctp/Kconfig | |||
| @@ -68,7 +68,7 @@ config SCTP_DBG_OBJCNT | |||
| 68 | If unsure, say N | 68 | If unsure, say N |
| 69 | choice | 69 | choice |
| 70 | prompt "Default SCTP cookie HMAC encoding" | 70 | prompt "Default SCTP cookie HMAC encoding" |
| 71 | default SCTP_COOKIE_HMAC_MD5 | 71 | default SCTP_DEFAULT_COOKIE_HMAC_MD5 |
| 72 | help | 72 | help |
| 73 | This option sets the default sctp cookie hmac algorithm | 73 | This option sets the default sctp cookie hmac algorithm |
| 74 | when in doubt select 'md5' | 74 | when in doubt select 'md5' |
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 822f020fa7f4..507b5e84fbdb 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
| @@ -555,7 +555,7 @@ EXPORT_SYMBOL_GPL(rpc_clone_client); | |||
| 555 | * rpc_clone_client_set_auth - Clone an RPC client structure and set its auth | 555 | * rpc_clone_client_set_auth - Clone an RPC client structure and set its auth |
| 556 | * | 556 | * |
| 557 | * @clnt: RPC client whose parameters are copied | 557 | * @clnt: RPC client whose parameters are copied |
| 558 | * @auth: security flavor for new client | 558 | * @flavor: security flavor for new client |
| 559 | * | 559 | * |
| 560 | * Returns a fresh RPC client or an ERR_PTR. | 560 | * Returns a fresh RPC client or an ERR_PTR. |
| 561 | */ | 561 | */ |
| @@ -610,11 +610,6 @@ EXPORT_SYMBOL_GPL(rpc_killall_tasks); | |||
| 610 | */ | 610 | */ |
| 611 | void rpc_shutdown_client(struct rpc_clnt *clnt) | 611 | void rpc_shutdown_client(struct rpc_clnt *clnt) |
| 612 | { | 612 | { |
| 613 | /* | ||
| 614 | * To avoid deadlock, never call rpc_shutdown_client from a | ||
| 615 | * workqueue context! | ||
| 616 | */ | ||
| 617 | WARN_ON_ONCE(current->flags & PF_WQ_WORKER); | ||
| 618 | might_sleep(); | 613 | might_sleep(); |
| 619 | 614 | ||
| 620 | dprintk_rcu("RPC: shutting down %s client for %s\n", | 615 | dprintk_rcu("RPC: shutting down %s client for %s\n", |
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index d17a704aaf5f..bfa31714581f 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
| @@ -934,16 +934,35 @@ struct rpc_task *rpc_new_task(const struct rpc_task_setup *setup_data) | |||
| 934 | return task; | 934 | return task; |
| 935 | } | 935 | } |
| 936 | 936 | ||
| 937 | /* | ||
| 938 | * rpc_free_task - release rpc task and perform cleanups | ||
| 939 | * | ||
| 940 | * Note that we free up the rpc_task _after_ rpc_release_calldata() | ||
| 941 | * in order to work around a workqueue dependency issue. | ||
| 942 | * | ||
| 943 | * Tejun Heo states: | ||
| 944 | * "Workqueue currently considers two work items to be the same if they're | ||
| 945 | * on the same address and won't execute them concurrently - ie. it | ||
| 946 | * makes a work item which is queued again while being executed wait | ||
| 947 | * for the previous execution to complete. | ||
| 948 | * | ||
| 949 | * If a work function frees the work item, and then waits for an event | ||
| 950 | * which should be performed by another work item and *that* work item | ||
| 951 | * recycles the freed work item, it can create a false dependency loop. | ||
| 952 | * There really is no reliable way to detect this short of verifying | ||
| 953 | * every memory free." | ||
| 954 | * | ||
| 955 | */ | ||
| 937 | static void rpc_free_task(struct rpc_task *task) | 956 | static void rpc_free_task(struct rpc_task *task) |
| 938 | { | 957 | { |
| 939 | const struct rpc_call_ops *tk_ops = task->tk_ops; | 958 | unsigned short tk_flags = task->tk_flags; |
| 940 | void *calldata = task->tk_calldata; | 959 | |
| 960 | rpc_release_calldata(task->tk_ops, task->tk_calldata); | ||
| 941 | 961 | ||
| 942 | if (task->tk_flags & RPC_TASK_DYNAMIC) { | 962 | if (tk_flags & RPC_TASK_DYNAMIC) { |
| 943 | dprintk("RPC: %5u freeing task\n", task->tk_pid); | 963 | dprintk("RPC: %5u freeing task\n", task->tk_pid); |
| 944 | mempool_free(task, rpc_task_mempool); | 964 | mempool_free(task, rpc_task_mempool); |
| 945 | } | 965 | } |
| 946 | rpc_release_calldata(tk_ops, calldata); | ||
| 947 | } | 966 | } |
| 948 | 967 | ||
| 949 | static void rpc_async_release(struct work_struct *work) | 968 | static void rpc_async_release(struct work_struct *work) |
| @@ -953,8 +972,7 @@ static void rpc_async_release(struct work_struct *work) | |||
| 953 | 972 | ||
| 954 | static void rpc_release_resources_task(struct rpc_task *task) | 973 | static void rpc_release_resources_task(struct rpc_task *task) |
| 955 | { | 974 | { |
| 956 | if (task->tk_rqstp) | 975 | xprt_release(task); |
| 957 | xprt_release(task); | ||
| 958 | if (task->tk_msg.rpc_cred) { | 976 | if (task->tk_msg.rpc_cred) { |
| 959 | put_rpccred(task->tk_msg.rpc_cred); | 977 | put_rpccred(task->tk_msg.rpc_cred); |
| 960 | task->tk_msg.rpc_cred = NULL; | 978 | task->tk_msg.rpc_cred = NULL; |
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index bd462a532acf..33811db8788a 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
| @@ -1136,10 +1136,18 @@ static void xprt_request_init(struct rpc_task *task, struct rpc_xprt *xprt) | |||
| 1136 | void xprt_release(struct rpc_task *task) | 1136 | void xprt_release(struct rpc_task *task) |
| 1137 | { | 1137 | { |
| 1138 | struct rpc_xprt *xprt; | 1138 | struct rpc_xprt *xprt; |
| 1139 | struct rpc_rqst *req; | 1139 | struct rpc_rqst *req = task->tk_rqstp; |
| 1140 | 1140 | ||
| 1141 | if (!(req = task->tk_rqstp)) | 1141 | if (req == NULL) { |
| 1142 | if (task->tk_client) { | ||
| 1143 | rcu_read_lock(); | ||
| 1144 | xprt = rcu_dereference(task->tk_client->cl_xprt); | ||
| 1145 | if (xprt->snd_task == task) | ||
| 1146 | xprt_release_write(xprt, task); | ||
| 1147 | rcu_read_unlock(); | ||
| 1148 | } | ||
| 1142 | return; | 1149 | return; |
| 1150 | } | ||
| 1143 | 1151 | ||
| 1144 | xprt = req->rq_xprt; | 1152 | xprt = req->rq_xprt; |
| 1145 | if (task->tk_ops->rpc_count_stats != NULL) | 1153 | if (task->tk_ops->rpc_count_stats != NULL) |
diff --git a/net/wireless/core.c b/net/wireless/core.c index 14d990400354..b677eab55b68 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
| @@ -866,8 +866,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb, | |||
| 866 | /* allow mac80211 to determine the timeout */ | 866 | /* allow mac80211 to determine the timeout */ |
| 867 | wdev->ps_timeout = -1; | 867 | wdev->ps_timeout = -1; |
| 868 | 868 | ||
| 869 | if (!dev->ethtool_ops) | 869 | netdev_set_default_ethtool_ops(dev, &cfg80211_ethtool_ops); |
| 870 | dev->ethtool_ops = &cfg80211_ethtool_ops; | ||
| 871 | 870 | ||
| 872 | if ((wdev->iftype == NL80211_IFTYPE_STATION || | 871 | if ((wdev->iftype == NL80211_IFTYPE_STATION || |
| 873 | wdev->iftype == NL80211_IFTYPE_P2P_CLIENT || | 872 | wdev->iftype == NL80211_IFTYPE_P2P_CLIENT || |
diff --git a/samples/rpmsg/rpmsg_client_sample.c b/samples/rpmsg/rpmsg_client_sample.c index 23ea9f2ae11d..59b13440813d 100644 --- a/samples/rpmsg/rpmsg_client_sample.c +++ b/samples/rpmsg/rpmsg_client_sample.c | |||
| @@ -64,7 +64,7 @@ static int rpmsg_sample_probe(struct rpmsg_channel *rpdev) | |||
| 64 | return 0; | 64 | return 0; |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | static void __devexit rpmsg_sample_remove(struct rpmsg_channel *rpdev) | 67 | static void rpmsg_sample_remove(struct rpmsg_channel *rpdev) |
| 68 | { | 68 | { |
| 69 | dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n"); | 69 | dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n"); |
| 70 | } | 70 | } |
| @@ -81,7 +81,7 @@ static struct rpmsg_driver rpmsg_sample_client = { | |||
| 81 | .id_table = rpmsg_driver_sample_id_table, | 81 | .id_table = rpmsg_driver_sample_id_table, |
| 82 | .probe = rpmsg_sample_probe, | 82 | .probe = rpmsg_sample_probe, |
| 83 | .callback = rpmsg_sample_cb, | 83 | .callback = rpmsg_sample_cb, |
| 84 | .remove = __devexit_p(rpmsg_sample_remove), | 84 | .remove = rpmsg_sample_remove, |
| 85 | }; | 85 | }; |
| 86 | 86 | ||
| 87 | static int __init rpmsg_client_sample_init(void) | 87 | static int __init rpmsg_client_sample_init(void) |
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 28b761567815..f565536a2bef 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
| @@ -2079,7 +2079,6 @@ sub dump_function($$) { | |||
| 2079 | $prototype =~ s/^__inline +//; | 2079 | $prototype =~ s/^__inline +//; |
| 2080 | $prototype =~ s/^__always_inline +//; | 2080 | $prototype =~ s/^__always_inline +//; |
| 2081 | $prototype =~ s/^noinline +//; | 2081 | $prototype =~ s/^noinline +//; |
| 2082 | $prototype =~ s/__devinit +//; | ||
| 2083 | $prototype =~ s/__init +//; | 2082 | $prototype =~ s/__init +//; |
| 2084 | $prototype =~ s/__init_or_module +//; | 2083 | $prototype =~ s/__init_or_module +//; |
| 2085 | $prototype =~ s/__must_check +//; | 2084 | $prototype =~ s/__must_check +//; |
diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h index 3b2adb794f15..079a85dc37b2 100644 --- a/security/integrity/ima/ima.h +++ b/security/integrity/ima/ima.h | |||
| @@ -139,6 +139,7 @@ void ima_delete_rules(void); | |||
| 139 | /* Appraise integrity measurements */ | 139 | /* Appraise integrity measurements */ |
| 140 | #define IMA_APPRAISE_ENFORCE 0x01 | 140 | #define IMA_APPRAISE_ENFORCE 0x01 |
| 141 | #define IMA_APPRAISE_FIX 0x02 | 141 | #define IMA_APPRAISE_FIX 0x02 |
| 142 | #define IMA_APPRAISE_MODULES 0x04 | ||
| 142 | 143 | ||
| 143 | #ifdef CONFIG_IMA_APPRAISE | 144 | #ifdef CONFIG_IMA_APPRAISE |
| 144 | int ima_appraise_measurement(struct integrity_iint_cache *iint, | 145 | int ima_appraise_measurement(struct integrity_iint_cache *iint, |
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 45de18e9a6f2..dba965de90d3 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c | |||
| @@ -291,11 +291,15 @@ EXPORT_SYMBOL_GPL(ima_file_check); | |||
| 291 | */ | 291 | */ |
| 292 | int ima_module_check(struct file *file) | 292 | int ima_module_check(struct file *file) |
| 293 | { | 293 | { |
| 294 | int rc; | 294 | int rc = 0; |
| 295 | 295 | ||
| 296 | if (!file) | 296 | if (!file) { |
| 297 | rc = INTEGRITY_UNKNOWN; | 297 | if (ima_appraise & IMA_APPRAISE_MODULES) { |
| 298 | else | 298 | #ifndef CONFIG_MODULE_SIG_FORCE |
| 299 | rc = -EACCES; /* INTEGRITY_UNKNOWN */ | ||
| 300 | #endif | ||
| 301 | } | ||
| 302 | } else | ||
| 299 | rc = process_measurement(file, file->f_dentry->d_name.name, | 303 | rc = process_measurement(file, file->f_dentry->d_name.name, |
| 300 | MAY_EXEC, MODULE_CHECK); | 304 | MAY_EXEC, MODULE_CHECK); |
| 301 | return (ima_appraise & IMA_APPRAISE_ENFORCE) ? rc : 0; | 305 | return (ima_appraise & IMA_APPRAISE_ENFORCE) ? rc : 0; |
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c index af7d182d5a46..479fca940bb5 100644 --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c | |||
| @@ -523,7 +523,8 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry) | |||
| 523 | } | 523 | } |
| 524 | if (!result && (entry->action == UNKNOWN)) | 524 | if (!result && (entry->action == UNKNOWN)) |
| 525 | result = -EINVAL; | 525 | result = -EINVAL; |
| 526 | 526 | else if (entry->func == MODULE_CHECK) | |
| 527 | ima_appraise |= IMA_APPRAISE_MODULES; | ||
| 527 | audit_log_format(ab, "res=%d", !result); | 528 | audit_log_format(ab, "res=%d", !result); |
| 528 | audit_log_end(ab); | 529 | audit_log_end(ab); |
| 529 | return result; | 530 | return result; |
diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c index 6fc0ae90e5b1..fff7753e35c1 100644 --- a/sound/arm/pxa2xx-ac97-lib.c +++ b/sound/arm/pxa2xx-ac97-lib.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
| 19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
| 20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
| 21 | #include <linux/gpio.h> | ||
| 21 | 22 | ||
| 22 | #include <sound/ac97_codec.h> | 23 | #include <sound/ac97_codec.h> |
| 23 | #include <sound/pxa2xx-lib.h> | 24 | #include <sound/pxa2xx-lib.h> |
| @@ -148,6 +149,8 @@ static inline void pxa_ac97_warm_pxa27x(void) | |||
| 148 | 149 | ||
| 149 | static inline void pxa_ac97_cold_pxa27x(void) | 150 | static inline void pxa_ac97_cold_pxa27x(void) |
| 150 | { | 151 | { |
| 152 | unsigned int timeout; | ||
| 153 | |||
| 151 | GCR &= GCR_COLD_RST; /* clear everything but nCRST */ | 154 | GCR &= GCR_COLD_RST; /* clear everything but nCRST */ |
| 152 | GCR &= ~GCR_COLD_RST; /* then assert nCRST */ | 155 | GCR &= ~GCR_COLD_RST; /* then assert nCRST */ |
| 153 | 156 | ||
| @@ -157,8 +160,10 @@ static inline void pxa_ac97_cold_pxa27x(void) | |||
| 157 | clk_enable(ac97conf_clk); | 160 | clk_enable(ac97conf_clk); |
| 158 | udelay(5); | 161 | udelay(5); |
| 159 | clk_disable(ac97conf_clk); | 162 | clk_disable(ac97conf_clk); |
| 160 | GCR = GCR_COLD_RST; | 163 | GCR = GCR_COLD_RST | GCR_WARM_RST; |
| 161 | udelay(50); | 164 | timeout = 100; /* wait for the codec-ready bit to be set */ |
| 165 | while (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR)) && timeout--) | ||
| 166 | mdelay(1); | ||
| 162 | } | 167 | } |
| 163 | #endif | 168 | #endif |
| 164 | 169 | ||
| @@ -340,8 +345,21 @@ int pxa2xx_ac97_hw_probe(struct platform_device *dev) | |||
| 340 | } | 345 | } |
| 341 | 346 | ||
| 342 | if (cpu_is_pxa27x()) { | 347 | if (cpu_is_pxa27x()) { |
| 343 | /* Use GPIO 113 as AC97 Reset on Bulverde */ | 348 | /* |
| 349 | * This gpio is needed for a work-around to a bug in the ac97 | ||
| 350 | * controller during warm reset. The direction and level is set | ||
| 351 | * here so that it is an output driven high when switching from | ||
| 352 | * AC97_nRESET alt function to generic gpio. | ||
| 353 | */ | ||
| 354 | ret = gpio_request_one(reset_gpio, GPIOF_OUT_INIT_HIGH, | ||
| 355 | "pxa27x ac97 reset"); | ||
| 356 | if (ret < 0) { | ||
| 357 | pr_err("%s: gpio_request_one() failed: %d\n", | ||
| 358 | __func__, ret); | ||
| 359 | goto err_conf; | ||
| 360 | } | ||
| 344 | pxa27x_assert_ac97reset(reset_gpio, 0); | 361 | pxa27x_assert_ac97reset(reset_gpio, 0); |
| 362 | |||
| 345 | ac97conf_clk = clk_get(&dev->dev, "AC97CONFCLK"); | 363 | ac97conf_clk = clk_get(&dev->dev, "AC97CONFCLK"); |
| 346 | if (IS_ERR(ac97conf_clk)) { | 364 | if (IS_ERR(ac97conf_clk)) { |
| 347 | ret = PTR_ERR(ac97conf_clk); | 365 | ret = PTR_ERR(ac97conf_clk); |
| @@ -384,6 +402,8 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_hw_probe); | |||
| 384 | 402 | ||
| 385 | void pxa2xx_ac97_hw_remove(struct platform_device *dev) | 403 | void pxa2xx_ac97_hw_remove(struct platform_device *dev) |
| 386 | { | 404 | { |
| 405 | if (cpu_is_pxa27x()) | ||
| 406 | gpio_free(reset_gpio); | ||
| 387 | GCR |= GCR_ACLINK_OFF; | 407 | GCR |= GCR_ACLINK_OFF; |
| 388 | free_irq(IRQ_AC97, NULL); | 408 | free_irq(IRQ_AC97, NULL); |
| 389 | if (ac97conf_clk) { | 409 | if (ac97conf_clk) { |
diff --git a/sound/oss/pas2_card.c b/sound/oss/pas2_card.c index dabf8a871dcc..7004e24d209f 100644 --- a/sound/oss/pas2_card.c +++ b/sound/oss/pas2_card.c | |||
| @@ -333,6 +333,11 @@ static void __init attach_pas_card(struct address_info *hw_config) | |||
| 333 | { | 333 | { |
| 334 | char temp[100]; | 334 | char temp[100]; |
| 335 | 335 | ||
| 336 | if (pas_model < 0 || | ||
| 337 | pas_model >= ARRAY_SIZE(pas_model_names)) { | ||
| 338 | printk(KERN_ERR "pas2 unrecognized model.\n"); | ||
| 339 | return; | ||
| 340 | } | ||
| 336 | sprintf(temp, | 341 | sprintf(temp, |
| 337 | "%s rev %d", pas_model_names[(int) pas_model], | 342 | "%s rev %d", pas_model_names[(int) pas_model], |
| 338 | pas_read(0x2789)); | 343 | pas_read(0x2789)); |
diff --git a/sound/pci/au88x0/au88x0_synth.c b/sound/pci/au88x0/au88x0_synth.c index 2805e34bd41d..8bef47311e45 100644 --- a/sound/pci/au88x0/au88x0_synth.c +++ b/sound/pci/au88x0/au88x0_synth.c | |||
| @@ -58,7 +58,7 @@ static void vortex_wt_setdsout(vortex_t * vortex, u32 wt, int en) | |||
| 58 | if (en) | 58 | if (en) |
| 59 | temp |= (1 << (wt & 0x1f)); | 59 | temp |= (1 << (wt & 0x1f)); |
| 60 | else | 60 | else |
| 61 | temp &= (1 << ~(wt & 0x1f)); | 61 | temp &= ~(1 << (wt & 0x1f)); |
| 62 | hwwrite(vortex->mmio, WT_DSREG((wt >= 0x20) ? 1 : 0), temp); | 62 | hwwrite(vortex->mmio, WT_DSREG((wt >= 0x20) ? 1 : 0), temp); |
| 63 | } | 63 | } |
| 64 | 64 | ||
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 8353c77536ac..b8fb0a5adb9b 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
| @@ -2531,7 +2531,7 @@ static int vmaster_mute_mode_info(struct snd_kcontrol *kcontrol, | |||
| 2531 | struct snd_ctl_elem_info *uinfo) | 2531 | struct snd_ctl_elem_info *uinfo) |
| 2532 | { | 2532 | { |
| 2533 | static const char * const texts[] = { | 2533 | static const char * const texts[] = { |
| 2534 | "Off", "On", "Follow Master" | 2534 | "On", "Off", "Follow Master" |
| 2535 | }; | 2535 | }; |
| 2536 | unsigned int index; | 2536 | unsigned int index; |
| 2537 | 2537 | ||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index cca87277baf0..0b6aebacc56b 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
| @@ -573,9 +573,12 @@ enum { | |||
| 573 | #define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */ | 573 | #define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */ |
| 574 | 574 | ||
| 575 | /* quirks for Intel PCH */ | 575 | /* quirks for Intel PCH */ |
| 576 | #define AZX_DCAPS_INTEL_PCH \ | 576 | #define AZX_DCAPS_INTEL_PCH_NOPM \ |
| 577 | (AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_BUFSIZE | \ | 577 | (AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_BUFSIZE | \ |
| 578 | AZX_DCAPS_COUNT_LPIB_DELAY | AZX_DCAPS_PM_RUNTIME) | 578 | AZX_DCAPS_COUNT_LPIB_DELAY) |
| 579 | |||
| 580 | #define AZX_DCAPS_INTEL_PCH \ | ||
| 581 | (AZX_DCAPS_INTEL_PCH_NOPM | AZX_DCAPS_PM_RUNTIME) | ||
| 579 | 582 | ||
| 580 | /* quirks for ATI SB / AMD Hudson */ | 583 | /* quirks for ATI SB / AMD Hudson */ |
| 581 | #define AZX_DCAPS_PRESET_ATI_SB \ | 584 | #define AZX_DCAPS_PRESET_ATI_SB \ |
| @@ -3586,13 +3589,13 @@ static void azx_remove(struct pci_dev *pci) | |||
| 3586 | static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { | 3589 | static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { |
| 3587 | /* CPT */ | 3590 | /* CPT */ |
| 3588 | { PCI_DEVICE(0x8086, 0x1c20), | 3591 | { PCI_DEVICE(0x8086, 0x1c20), |
| 3589 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, | 3592 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM }, |
| 3590 | /* PBG */ | 3593 | /* PBG */ |
| 3591 | { PCI_DEVICE(0x8086, 0x1d20), | 3594 | { PCI_DEVICE(0x8086, 0x1d20), |
| 3592 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, | 3595 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM }, |
| 3593 | /* Panther Point */ | 3596 | /* Panther Point */ |
| 3594 | { PCI_DEVICE(0x8086, 0x1e20), | 3597 | { PCI_DEVICE(0x8086, 0x1e20), |
| 3595 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, | 3598 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM }, |
| 3596 | /* Lynx Point */ | 3599 | /* Lynx Point */ |
| 3597 | { PCI_DEVICE(0x8086, 0x8c20), | 3600 | { PCI_DEVICE(0x8086, 0x8c20), |
| 3598 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, | 3601 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 60890bfecc19..dd798c3196ff 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
| @@ -558,24 +558,12 @@ static int conexant_build_controls(struct hda_codec *codec) | |||
| 558 | return 0; | 558 | return 0; |
| 559 | } | 559 | } |
| 560 | 560 | ||
| 561 | #ifdef CONFIG_PM | ||
| 562 | static int conexant_suspend(struct hda_codec *codec) | ||
| 563 | { | ||
| 564 | snd_hda_shutup_pins(codec); | ||
| 565 | return 0; | ||
| 566 | } | ||
| 567 | #endif | ||
| 568 | |||
| 569 | static const struct hda_codec_ops conexant_patch_ops = { | 561 | static const struct hda_codec_ops conexant_patch_ops = { |
| 570 | .build_controls = conexant_build_controls, | 562 | .build_controls = conexant_build_controls, |
| 571 | .build_pcms = conexant_build_pcms, | 563 | .build_pcms = conexant_build_pcms, |
| 572 | .init = conexant_init, | 564 | .init = conexant_init, |
| 573 | .free = conexant_free, | 565 | .free = conexant_free, |
| 574 | .set_power_state = conexant_set_power, | 566 | .set_power_state = conexant_set_power, |
| 575 | #ifdef CONFIG_PM | ||
| 576 | .suspend = conexant_suspend, | ||
| 577 | #endif | ||
| 578 | .reboot_notify = snd_hda_shutup_pins, | ||
| 579 | }; | 567 | }; |
| 580 | 568 | ||
| 581 | #ifdef CONFIG_SND_HDA_INPUT_BEEP | 569 | #ifdef CONFIG_SND_HDA_INPUT_BEEP |
| @@ -4405,10 +4393,6 @@ static const struct hda_codec_ops cx_auto_patch_ops = { | |||
| 4405 | .init = cx_auto_init, | 4393 | .init = cx_auto_init, |
| 4406 | .free = conexant_free, | 4394 | .free = conexant_free, |
| 4407 | .unsol_event = snd_hda_jack_unsol_event, | 4395 | .unsol_event = snd_hda_jack_unsol_event, |
| 4408 | #ifdef CONFIG_PM | ||
| 4409 | .suspend = conexant_suspend, | ||
| 4410 | #endif | ||
| 4411 | .reboot_notify = snd_hda_shutup_pins, | ||
| 4412 | }; | 4396 | }; |
| 4413 | 4397 | ||
| 4414 | /* | 4398 | /* |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index b6c21ea187ca..807a2aa1ff38 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
| @@ -1502,7 +1502,7 @@ static int hdmi_chmap_ctl_put(struct snd_kcontrol *kcontrol, | |||
| 1502 | ctl_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); | 1502 | ctl_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); |
| 1503 | substream = snd_pcm_chmap_substream(info, ctl_idx); | 1503 | substream = snd_pcm_chmap_substream(info, ctl_idx); |
| 1504 | if (!substream || !substream->runtime) | 1504 | if (!substream || !substream->runtime) |
| 1505 | return -EBADFD; | 1505 | return 0; /* just for avoiding error from alsactl restore */ |
| 1506 | switch (substream->runtime->status->state) { | 1506 | switch (substream->runtime->status->state) { |
| 1507 | case SNDRV_PCM_STATE_OPEN: | 1507 | case SNDRV_PCM_STATE_OPEN: |
| 1508 | case SNDRV_PCM_STATE_SETUP: | 1508 | case SNDRV_PCM_STATE_SETUP: |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6ee34593774a..f5196277b6e9 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -5817,6 +5817,9 @@ enum { | |||
| 5817 | ALC269_TYPE_ALC269VB, | 5817 | ALC269_TYPE_ALC269VB, |
| 5818 | ALC269_TYPE_ALC269VC, | 5818 | ALC269_TYPE_ALC269VC, |
| 5819 | ALC269_TYPE_ALC269VD, | 5819 | ALC269_TYPE_ALC269VD, |
| 5820 | ALC269_TYPE_ALC280, | ||
| 5821 | ALC269_TYPE_ALC282, | ||
| 5822 | ALC269_TYPE_ALC284, | ||
| 5820 | }; | 5823 | }; |
| 5821 | 5824 | ||
| 5822 | /* | 5825 | /* |
| @@ -5833,10 +5836,13 @@ static int alc269_parse_auto_config(struct hda_codec *codec) | |||
| 5833 | switch (spec->codec_variant) { | 5836 | switch (spec->codec_variant) { |
| 5834 | case ALC269_TYPE_ALC269VA: | 5837 | case ALC269_TYPE_ALC269VA: |
| 5835 | case ALC269_TYPE_ALC269VC: | 5838 | case ALC269_TYPE_ALC269VC: |
| 5839 | case ALC269_TYPE_ALC280: | ||
| 5840 | case ALC269_TYPE_ALC284: | ||
| 5836 | ssids = alc269va_ssids; | 5841 | ssids = alc269va_ssids; |
| 5837 | break; | 5842 | break; |
| 5838 | case ALC269_TYPE_ALC269VB: | 5843 | case ALC269_TYPE_ALC269VB: |
| 5839 | case ALC269_TYPE_ALC269VD: | 5844 | case ALC269_TYPE_ALC269VD: |
| 5845 | case ALC269_TYPE_ALC282: | ||
| 5840 | ssids = alc269_ssids; | 5846 | ssids = alc269_ssids; |
| 5841 | break; | 5847 | break; |
| 5842 | default: | 5848 | default: |
| @@ -5992,6 +5998,30 @@ static void alc269_fixup_quanta_mute(struct hda_codec *codec, | |||
| 5992 | spec->automute_hook = alc269_quanta_automute; | 5998 | spec->automute_hook = alc269_quanta_automute; |
| 5993 | } | 5999 | } |
| 5994 | 6000 | ||
| 6001 | /* update mute-LED according to the speaker mute state via mic1 VREF pin */ | ||
| 6002 | static void alc269_fixup_mic1_mute_hook(void *private_data, int enabled) | ||
| 6003 | { | ||
| 6004 | struct hda_codec *codec = private_data; | ||
| 6005 | unsigned int pinval = AC_PINCTL_IN_EN + (enabled ? | ||
| 6006 | AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80); | ||
| 6007 | snd_hda_set_pin_ctl_cache(codec, 0x18, pinval); | ||
| 6008 | } | ||
| 6009 | |||
| 6010 | static void alc269_fixup_mic1_mute(struct hda_codec *codec, | ||
| 6011 | const struct alc_fixup *fix, int action) | ||
| 6012 | { | ||
| 6013 | struct alc_spec *spec = codec->spec; | ||
| 6014 | switch (action) { | ||
| 6015 | case ALC_FIXUP_ACT_BUILD: | ||
| 6016 | spec->vmaster_mute.hook = alc269_fixup_mic1_mute_hook; | ||
| 6017 | snd_hda_add_vmaster_hook(codec, &spec->vmaster_mute, true); | ||
| 6018 | /* fallthru */ | ||
| 6019 | case ALC_FIXUP_ACT_INIT: | ||
| 6020 | snd_hda_sync_vmaster_hook(&spec->vmaster_mute); | ||
| 6021 | break; | ||
| 6022 | } | ||
| 6023 | } | ||
| 6024 | |||
| 5995 | /* update mute-LED according to the speaker mute state via mic2 VREF pin */ | 6025 | /* update mute-LED according to the speaker mute state via mic2 VREF pin */ |
| 5996 | static void alc269_fixup_mic2_mute_hook(void *private_data, int enabled) | 6026 | static void alc269_fixup_mic2_mute_hook(void *private_data, int enabled) |
| 5997 | { | 6027 | { |
| @@ -6043,6 +6073,7 @@ enum { | |||
| 6043 | ALC269_FIXUP_DMIC, | 6073 | ALC269_FIXUP_DMIC, |
| 6044 | ALC269VB_FIXUP_AMIC, | 6074 | ALC269VB_FIXUP_AMIC, |
| 6045 | ALC269VB_FIXUP_DMIC, | 6075 | ALC269VB_FIXUP_DMIC, |
| 6076 | ALC269_FIXUP_MIC1_MUTE_LED, | ||
| 6046 | ALC269_FIXUP_MIC2_MUTE_LED, | 6077 | ALC269_FIXUP_MIC2_MUTE_LED, |
| 6047 | ALC269_FIXUP_INV_DMIC, | 6078 | ALC269_FIXUP_INV_DMIC, |
| 6048 | ALC269_FIXUP_LENOVO_DOCK, | 6079 | ALC269_FIXUP_LENOVO_DOCK, |
| @@ -6171,6 +6202,10 @@ static const struct alc_fixup alc269_fixups[] = { | |||
| 6171 | { } | 6202 | { } |
| 6172 | }, | 6203 | }, |
| 6173 | }, | 6204 | }, |
| 6205 | [ALC269_FIXUP_MIC1_MUTE_LED] = { | ||
| 6206 | .type = ALC_FIXUP_FUNC, | ||
| 6207 | .v.func = alc269_fixup_mic1_mute, | ||
| 6208 | }, | ||
| 6174 | [ALC269_FIXUP_MIC2_MUTE_LED] = { | 6209 | [ALC269_FIXUP_MIC2_MUTE_LED] = { |
| 6175 | .type = ALC_FIXUP_FUNC, | 6210 | .type = ALC_FIXUP_FUNC, |
| 6176 | .v.func = alc269_fixup_mic2_mute, | 6211 | .v.func = alc269_fixup_mic2_mute, |
| @@ -6215,6 +6250,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
| 6215 | SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC), | 6250 | SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC), |
| 6216 | SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC), | 6251 | SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC), |
| 6217 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_MIC2_MUTE_LED), | 6252 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_MIC2_MUTE_LED), |
| 6253 | SND_PCI_QUIRK(0x103c, 0x1972, "HP Pavilion 17", ALC269_FIXUP_MIC1_MUTE_LED), | ||
| 6218 | SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_DMIC), | 6254 | SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_DMIC), |
| 6219 | SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_DMIC), | 6255 | SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_DMIC), |
| 6220 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), | 6256 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), |
| @@ -6370,7 +6406,8 @@ static int patch_alc269(struct hda_codec *codec) | |||
| 6370 | 6406 | ||
| 6371 | alc_auto_parse_customize_define(codec); | 6407 | alc_auto_parse_customize_define(codec); |
| 6372 | 6408 | ||
| 6373 | if (codec->vendor_id == 0x10ec0269) { | 6409 | switch (codec->vendor_id) { |
| 6410 | case 0x10ec0269: | ||
| 6374 | spec->codec_variant = ALC269_TYPE_ALC269VA; | 6411 | spec->codec_variant = ALC269_TYPE_ALC269VA; |
| 6375 | switch (alc_get_coef0(codec) & 0x00f0) { | 6412 | switch (alc_get_coef0(codec) & 0x00f0) { |
| 6376 | case 0x0010: | 6413 | case 0x0010: |
| @@ -6395,6 +6432,20 @@ static int patch_alc269(struct hda_codec *codec) | |||
| 6395 | goto error; | 6432 | goto error; |
| 6396 | spec->init_hook = alc269_fill_coef; | 6433 | spec->init_hook = alc269_fill_coef; |
| 6397 | alc269_fill_coef(codec); | 6434 | alc269_fill_coef(codec); |
| 6435 | break; | ||
| 6436 | |||
| 6437 | case 0x10ec0280: | ||
| 6438 | case 0x10ec0290: | ||
| 6439 | spec->codec_variant = ALC269_TYPE_ALC280; | ||
| 6440 | break; | ||
| 6441 | case 0x10ec0282: | ||
| 6442 | case 0x10ec0283: | ||
| 6443 | spec->codec_variant = ALC269_TYPE_ALC282; | ||
| 6444 | break; | ||
| 6445 | case 0x10ec0284: | ||
| 6446 | case 0x10ec0292: | ||
| 6447 | spec->codec_variant = ALC269_TYPE_ALC284; | ||
| 6448 | break; | ||
| 6398 | } | 6449 | } |
| 6399 | 6450 | ||
| 6400 | /* automatic parse from the BIOS config */ | 6451 | /* automatic parse from the BIOS config */ |
| @@ -7099,6 +7150,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
| 7099 | { .id = 0x10ec0280, .name = "ALC280", .patch = patch_alc269 }, | 7150 | { .id = 0x10ec0280, .name = "ALC280", .patch = patch_alc269 }, |
| 7100 | { .id = 0x10ec0282, .name = "ALC282", .patch = patch_alc269 }, | 7151 | { .id = 0x10ec0282, .name = "ALC282", .patch = patch_alc269 }, |
| 7101 | { .id = 0x10ec0283, .name = "ALC283", .patch = patch_alc269 }, | 7152 | { .id = 0x10ec0283, .name = "ALC283", .patch = patch_alc269 }, |
| 7153 | { .id = 0x10ec0284, .name = "ALC284", .patch = patch_alc269 }, | ||
| 7102 | { .id = 0x10ec0290, .name = "ALC290", .patch = patch_alc269 }, | 7154 | { .id = 0x10ec0290, .name = "ALC290", .patch = patch_alc269 }, |
| 7103 | { .id = 0x10ec0292, .name = "ALC292", .patch = patch_alc269 }, | 7155 | { .id = 0x10ec0292, .name = "ALC292", .patch = patch_alc269 }, |
| 7104 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", | 7156 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", |
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 6e02e064d7b4..223c3d9cc69e 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
| @@ -441,6 +441,7 @@ MODULE_SUPPORTED_DEVICE("{{RME HDSPM-MADI}}"); | |||
| 441 | */ | 441 | */ |
| 442 | /* status */ | 442 | /* status */ |
| 443 | #define HDSPM_AES32_wcLock 0x0200000 | 443 | #define HDSPM_AES32_wcLock 0x0200000 |
| 444 | #define HDSPM_AES32_wcSync 0x0100000 | ||
| 444 | #define HDSPM_AES32_wcFreq_bit 22 | 445 | #define HDSPM_AES32_wcFreq_bit 22 |
| 445 | /* (status >> HDSPM_AES32_wcFreq_bit) & 0xF gives WC frequency (cf function | 446 | /* (status >> HDSPM_AES32_wcFreq_bit) & 0xF gives WC frequency (cf function |
| 446 | HDSPM_bit2freq */ | 447 | HDSPM_bit2freq */ |
| @@ -3467,10 +3468,12 @@ static int hdspm_wc_sync_check(struct hdspm *hdspm) | |||
| 3467 | switch (hdspm->io_type) { | 3468 | switch (hdspm->io_type) { |
| 3468 | case AES32: | 3469 | case AES32: |
| 3469 | status = hdspm_read(hdspm, HDSPM_statusRegister); | 3470 | status = hdspm_read(hdspm, HDSPM_statusRegister); |
| 3470 | if (status & HDSPM_wcSync) | 3471 | if (status & HDSPM_AES32_wcLock) { |
| 3471 | return 2; | 3472 | if (status & HDSPM_AES32_wcSync) |
| 3472 | else if (status & HDSPM_wcLock) | 3473 | return 2; |
| 3473 | return 1; | 3474 | else |
| 3475 | return 1; | ||
| 3476 | } | ||
| 3474 | return 0; | 3477 | return 0; |
| 3475 | break; | 3478 | break; |
| 3476 | 3479 | ||
| @@ -4658,6 +4661,7 @@ snd_hdspm_proc_read_aes32(struct snd_info_entry * entry, | |||
| 4658 | unsigned int status; | 4661 | unsigned int status; |
| 4659 | unsigned int status2; | 4662 | unsigned int status2; |
| 4660 | unsigned int timecode; | 4663 | unsigned int timecode; |
| 4664 | unsigned int wcLock, wcSync; | ||
| 4661 | int pref_syncref; | 4665 | int pref_syncref; |
| 4662 | char *autosync_ref; | 4666 | char *autosync_ref; |
| 4663 | int x; | 4667 | int x; |
| @@ -4751,8 +4755,11 @@ snd_hdspm_proc_read_aes32(struct snd_info_entry * entry, | |||
| 4751 | 4755 | ||
| 4752 | snd_iprintf(buffer, "--- Status:\n"); | 4756 | snd_iprintf(buffer, "--- Status:\n"); |
| 4753 | 4757 | ||
| 4758 | wcLock = status & HDSPM_AES32_wcLock; | ||
| 4759 | wcSync = wcLock && (status & HDSPM_AES32_wcSync); | ||
| 4760 | |||
| 4754 | snd_iprintf(buffer, "Word: %s Frequency: %d\n", | 4761 | snd_iprintf(buffer, "Word: %s Frequency: %d\n", |
| 4755 | (status & HDSPM_AES32_wcLock) ? "Sync " : "No Lock", | 4762 | (wcLock) ? (wcSync ? "Sync " : "Lock ") : "No Lock", |
| 4756 | HDSPM_bit2freq((status >> HDSPM_AES32_wcFreq_bit) & 0xF)); | 4763 | HDSPM_bit2freq((status >> HDSPM_AES32_wcFreq_bit) & 0xF)); |
| 4757 | 4764 | ||
| 4758 | for (x = 0; x < 8; x++) { | 4765 | for (x = 0; x < 8; x++) { |
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index adf397b9d0e6..1d8bb5917594 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c | |||
| @@ -446,15 +446,9 @@ static int arizona_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) | |||
| 446 | case SND_SOC_DAIFMT_DSP_A: | 446 | case SND_SOC_DAIFMT_DSP_A: |
| 447 | mode = 0; | 447 | mode = 0; |
| 448 | break; | 448 | break; |
| 449 | case SND_SOC_DAIFMT_DSP_B: | ||
| 450 | mode = 1; | ||
| 451 | break; | ||
| 452 | case SND_SOC_DAIFMT_I2S: | 449 | case SND_SOC_DAIFMT_I2S: |
| 453 | mode = 2; | 450 | mode = 2; |
| 454 | break; | 451 | break; |
| 455 | case SND_SOC_DAIFMT_LEFT_J: | ||
| 456 | mode = 3; | ||
| 457 | break; | ||
| 458 | default: | 452 | default: |
| 459 | arizona_aif_err(dai, "Unsupported DAI format %d\n", | 453 | arizona_aif_err(dai, "Unsupported DAI format %d\n", |
| 460 | fmt & SND_SOC_DAIFMT_FORMAT_MASK); | 454 | fmt & SND_SOC_DAIFMT_FORMAT_MASK); |
| @@ -714,7 +708,8 @@ static int arizona_hw_params(struct snd_pcm_substream *substream, | |||
| 714 | snd_soc_update_bits(codec, ARIZONA_ASYNC_SAMPLE_RATE_1, | 708 | snd_soc_update_bits(codec, ARIZONA_ASYNC_SAMPLE_RATE_1, |
| 715 | ARIZONA_ASYNC_SAMPLE_RATE_MASK, sr_val); | 709 | ARIZONA_ASYNC_SAMPLE_RATE_MASK, sr_val); |
| 716 | snd_soc_update_bits(codec, base + ARIZONA_AIF_RATE_CTRL, | 710 | snd_soc_update_bits(codec, base + ARIZONA_AIF_RATE_CTRL, |
| 717 | ARIZONA_AIF1_RATE_MASK, 8); | 711 | ARIZONA_AIF1_RATE_MASK, |
| 712 | 8 << ARIZONA_AIF1_RATE_SHIFT); | ||
| 718 | break; | 713 | break; |
| 719 | default: | 714 | default: |
| 720 | arizona_aif_err(dai, "Invalid clock %d\n", dai_priv->clk); | 715 | arizona_aif_err(dai, "Invalid clock %d\n", dai_priv->clk); |
diff --git a/sound/soc/codecs/arizona.h b/sound/soc/codecs/arizona.h index 41dae1ed3b71..4deebeb07177 100644 --- a/sound/soc/codecs/arizona.h +++ b/sound/soc/codecs/arizona.h | |||
| @@ -34,15 +34,15 @@ | |||
| 34 | 34 | ||
| 35 | #define ARIZONA_FLL_SRC_MCLK1 0 | 35 | #define ARIZONA_FLL_SRC_MCLK1 0 |
| 36 | #define ARIZONA_FLL_SRC_MCLK2 1 | 36 | #define ARIZONA_FLL_SRC_MCLK2 1 |
| 37 | #define ARIZONA_FLL_SRC_SLIMCLK 2 | 37 | #define ARIZONA_FLL_SRC_SLIMCLK 3 |
| 38 | #define ARIZONA_FLL_SRC_FLL1 3 | 38 | #define ARIZONA_FLL_SRC_FLL1 4 |
| 39 | #define ARIZONA_FLL_SRC_FLL2 4 | 39 | #define ARIZONA_FLL_SRC_FLL2 5 |
| 40 | #define ARIZONA_FLL_SRC_AIF1BCLK 5 | 40 | #define ARIZONA_FLL_SRC_AIF1BCLK 8 |
| 41 | #define ARIZONA_FLL_SRC_AIF2BCLK 6 | 41 | #define ARIZONA_FLL_SRC_AIF2BCLK 9 |
| 42 | #define ARIZONA_FLL_SRC_AIF3BCLK 7 | 42 | #define ARIZONA_FLL_SRC_AIF3BCLK 10 |
| 43 | #define ARIZONA_FLL_SRC_AIF1LRCLK 8 | 43 | #define ARIZONA_FLL_SRC_AIF1LRCLK 12 |
| 44 | #define ARIZONA_FLL_SRC_AIF2LRCLK 9 | 44 | #define ARIZONA_FLL_SRC_AIF2LRCLK 13 |
| 45 | #define ARIZONA_FLL_SRC_AIF3LRCLK 10 | 45 | #define ARIZONA_FLL_SRC_AIF3LRCLK 14 |
| 46 | 46 | ||
| 47 | #define ARIZONA_MIXER_VOL_MASK 0x00FE | 47 | #define ARIZONA_MIXER_VOL_MASK 0x00FE |
| 48 | #define ARIZONA_MIXER_VOL_SHIFT 1 | 48 | #define ARIZONA_MIXER_VOL_SHIFT 1 |
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c index 4f1127935fdf..ac8742a1f25a 100644 --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c | |||
| @@ -474,16 +474,16 @@ static int cs4271_probe(struct snd_soc_codec *codec) | |||
| 474 | struct cs4271_platform_data *cs4271plat = codec->dev->platform_data; | 474 | struct cs4271_platform_data *cs4271plat = codec->dev->platform_data; |
| 475 | int ret; | 475 | int ret; |
| 476 | int gpio_nreset = -EINVAL; | 476 | int gpio_nreset = -EINVAL; |
| 477 | int amutec_eq_bmutec = 0; | 477 | bool amutec_eq_bmutec = false; |
| 478 | 478 | ||
| 479 | #ifdef CONFIG_OF | 479 | #ifdef CONFIG_OF |
| 480 | if (of_match_device(cs4271_dt_ids, codec->dev)) { | 480 | if (of_match_device(cs4271_dt_ids, codec->dev)) { |
| 481 | gpio_nreset = of_get_named_gpio(codec->dev->of_node, | 481 | gpio_nreset = of_get_named_gpio(codec->dev->of_node, |
| 482 | "reset-gpio", 0); | 482 | "reset-gpio", 0); |
| 483 | 483 | ||
| 484 | if (!of_get_property(codec->dev->of_node, | 484 | if (of_get_property(codec->dev->of_node, |
| 485 | "cirrus,amutec-eq-bmutec", NULL)) | 485 | "cirrus,amutec-eq-bmutec", NULL)) |
| 486 | amutec_eq_bmutec = 1; | 486 | amutec_eq_bmutec = true; |
| 487 | } | 487 | } |
| 488 | #endif | 488 | #endif |
| 489 | 489 | ||
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 99bb1c69499e..9811a5478c87 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c | |||
| @@ -737,7 +737,7 @@ static const struct cs42l52_clk_para clk_map_table[] = { | |||
| 737 | 737 | ||
| 738 | static int cs42l52_get_clk(int mclk, int rate) | 738 | static int cs42l52_get_clk(int mclk, int rate) |
| 739 | { | 739 | { |
| 740 | int i, ret = 0; | 740 | int i, ret = -EINVAL; |
| 741 | u_int mclk1, mclk2 = 0; | 741 | u_int mclk1, mclk2 = 0; |
| 742 | 742 | ||
| 743 | for (i = 0; i < ARRAY_SIZE(clk_map_table); i++) { | 743 | for (i = 0; i < ARRAY_SIZE(clk_map_table); i++) { |
| @@ -749,8 +749,6 @@ static int cs42l52_get_clk(int mclk, int rate) | |||
| 749 | } | 749 | } |
| 750 | } | 750 | } |
| 751 | } | 751 | } |
| 752 | if (ret > ARRAY_SIZE(clk_map_table)) | ||
| 753 | return -EINVAL; | ||
| 754 | return ret; | 752 | return ret; |
| 755 | } | 753 | } |
| 756 | 754 | ||
diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c index d75257d40a49..e19490cfb3a8 100644 --- a/sound/soc/codecs/lm49453.c +++ b/sound/soc/codecs/lm49453.c | |||
| @@ -111,9 +111,9 @@ static struct reg_default lm49453_reg_defs[] = { | |||
| 111 | { 101, 0x00 }, | 111 | { 101, 0x00 }, |
| 112 | { 102, 0x00 }, | 112 | { 102, 0x00 }, |
| 113 | { 103, 0x01 }, | 113 | { 103, 0x01 }, |
| 114 | { 105, 0x01 }, | 114 | { 104, 0x01 }, |
| 115 | { 106, 0x00 }, | 115 | { 105, 0x00 }, |
| 116 | { 107, 0x01 }, | 116 | { 106, 0x01 }, |
| 117 | { 107, 0x00 }, | 117 | { 107, 0x00 }, |
| 118 | { 108, 0x00 }, | 118 | { 108, 0x00 }, |
| 119 | { 109, 0x00 }, | 119 | { 109, 0x00 }, |
| @@ -163,56 +163,25 @@ static struct reg_default lm49453_reg_defs[] = { | |||
| 163 | { 184, 0x00 }, | 163 | { 184, 0x00 }, |
| 164 | { 185, 0x00 }, | 164 | { 185, 0x00 }, |
| 165 | { 186, 0x00 }, | 165 | { 186, 0x00 }, |
| 166 | { 189, 0x00 }, | 166 | { 187, 0x00 }, |
| 167 | { 188, 0x00 }, | 167 | { 188, 0x00 }, |
| 168 | { 194, 0x00 }, | 168 | { 189, 0x00 }, |
| 169 | { 195, 0x00 }, | 169 | { 208, 0x06 }, |
| 170 | { 196, 0x00 }, | ||
| 171 | { 197, 0x00 }, | ||
| 172 | { 200, 0x00 }, | ||
| 173 | { 201, 0x00 }, | ||
| 174 | { 202, 0x00 }, | ||
| 175 | { 203, 0x00 }, | ||
| 176 | { 204, 0x00 }, | ||
| 177 | { 205, 0x00 }, | ||
| 178 | { 208, 0x00 }, | ||
| 179 | { 209, 0x00 }, | 170 | { 209, 0x00 }, |
| 180 | { 210, 0x00 }, | 171 | { 210, 0x08 }, |
| 181 | { 211, 0x00 }, | 172 | { 211, 0x54 }, |
| 182 | { 213, 0x00 }, | 173 | { 212, 0x14 }, |
| 183 | { 214, 0x00 }, | 174 | { 213, 0x0d }, |
| 184 | { 215, 0x00 }, | 175 | { 214, 0x0d }, |
| 185 | { 216, 0x00 }, | 176 | { 215, 0x14 }, |
| 186 | { 217, 0x00 }, | 177 | { 216, 0x60 }, |
| 187 | { 218, 0x00 }, | ||
| 188 | { 219, 0x00 }, | ||
| 189 | { 221, 0x00 }, | 178 | { 221, 0x00 }, |
| 190 | { 222, 0x00 }, | 179 | { 222, 0x00 }, |
| 180 | { 223, 0x00 }, | ||
| 191 | { 224, 0x00 }, | 181 | { 224, 0x00 }, |
| 192 | { 225, 0x00 }, | ||
| 193 | { 226, 0x00 }, | ||
| 194 | { 227, 0x00 }, | ||
| 195 | { 228, 0x00 }, | ||
| 196 | { 229, 0x00 }, | ||
| 197 | { 230, 0x13 }, | ||
| 198 | { 231, 0x00 }, | ||
| 199 | { 232, 0x80 }, | ||
| 200 | { 233, 0x0C }, | ||
| 201 | { 234, 0xDD }, | ||
| 202 | { 235, 0x00 }, | ||
| 203 | { 236, 0x04 }, | ||
| 204 | { 237, 0x00 }, | ||
| 205 | { 238, 0x00 }, | ||
| 206 | { 239, 0x00 }, | ||
| 207 | { 240, 0x00 }, | ||
| 208 | { 241, 0x00 }, | ||
| 209 | { 242, 0x00 }, | ||
| 210 | { 243, 0x00 }, | ||
| 211 | { 244, 0x00 }, | ||
| 212 | { 245, 0x00 }, | ||
| 213 | { 248, 0x00 }, | 182 | { 248, 0x00 }, |
| 214 | { 249, 0x00 }, | 183 | { 249, 0x00 }, |
| 215 | { 254, 0x00 }, | 184 | { 250, 0x00 }, |
| 216 | { 255, 0x00 }, | 185 | { 255, 0x00 }, |
| 217 | }; | 186 | }; |
| 218 | 187 | ||
| @@ -525,36 +494,41 @@ SOC_DAPM_SINGLE("Port2_2 Switch", LM49453_P0_PORT2_TX2_REG, 7, 1, 0), | |||
| 525 | }; | 494 | }; |
| 526 | 495 | ||
| 527 | /* TLV Declarations */ | 496 | /* TLV Declarations */ |
| 528 | static const DECLARE_TLV_DB_SCALE(digital_tlv, -7650, 150, 1); | 497 | static const DECLARE_TLV_DB_SCALE(adc_dac_tlv, -7650, 150, 1); |
| 529 | static const DECLARE_TLV_DB_SCALE(port_tlv, 0, 600, 0); | 498 | static const DECLARE_TLV_DB_SCALE(mic_tlv, 0, 200, 1); |
| 499 | static const DECLARE_TLV_DB_SCALE(port_tlv, -1800, 600, 0); | ||
| 500 | static const DECLARE_TLV_DB_SCALE(stn_tlv, -7200, 150, 0); | ||
| 530 | 501 | ||
| 531 | static const struct snd_kcontrol_new lm49453_sidetone_mixer_controls[] = { | 502 | static const struct snd_kcontrol_new lm49453_sidetone_mixer_controls[] = { |
| 532 | /* Sidetone supports mono only */ | 503 | /* Sidetone supports mono only */ |
| 533 | SOC_DAPM_SINGLE_TLV("Sidetone ADCL Volume", LM49453_P0_STN_VOL_ADCL_REG, | 504 | SOC_DAPM_SINGLE_TLV("Sidetone ADCL Volume", LM49453_P0_STN_VOL_ADCL_REG, |
| 534 | 0, 0x3F, 0, digital_tlv), | 505 | 0, 0x3F, 0, stn_tlv), |
| 535 | SOC_DAPM_SINGLE_TLV("Sidetone ADCR Volume", LM49453_P0_STN_VOL_ADCR_REG, | 506 | SOC_DAPM_SINGLE_TLV("Sidetone ADCR Volume", LM49453_P0_STN_VOL_ADCR_REG, |
| 536 | 0, 0x3F, 0, digital_tlv), | 507 | 0, 0x3F, 0, stn_tlv), |
| 537 | SOC_DAPM_SINGLE_TLV("Sidetone DMIC1L Volume", LM49453_P0_STN_VOL_DMIC1L_REG, | 508 | SOC_DAPM_SINGLE_TLV("Sidetone DMIC1L Volume", LM49453_P0_STN_VOL_DMIC1L_REG, |
| 538 | 0, 0x3F, 0, digital_tlv), | 509 | 0, 0x3F, 0, stn_tlv), |
| 539 | SOC_DAPM_SINGLE_TLV("Sidetone DMIC1R Volume", LM49453_P0_STN_VOL_DMIC1R_REG, | 510 | SOC_DAPM_SINGLE_TLV("Sidetone DMIC1R Volume", LM49453_P0_STN_VOL_DMIC1R_REG, |
| 540 | 0, 0x3F, 0, digital_tlv), | 511 | 0, 0x3F, 0, stn_tlv), |
| 541 | SOC_DAPM_SINGLE_TLV("Sidetone DMIC2L Volume", LM49453_P0_STN_VOL_DMIC2L_REG, | 512 | SOC_DAPM_SINGLE_TLV("Sidetone DMIC2L Volume", LM49453_P0_STN_VOL_DMIC2L_REG, |
| 542 | 0, 0x3F, 0, digital_tlv), | 513 | 0, 0x3F, 0, stn_tlv), |
| 543 | SOC_DAPM_SINGLE_TLV("Sidetone DMIC2R Volume", LM49453_P0_STN_VOL_DMIC2R_REG, | 514 | SOC_DAPM_SINGLE_TLV("Sidetone DMIC2R Volume", LM49453_P0_STN_VOL_DMIC2R_REG, |
| 544 | 0, 0x3F, 0, digital_tlv), | 515 | 0, 0x3F, 0, stn_tlv), |
| 545 | }; | 516 | }; |
| 546 | 517 | ||
| 547 | static const struct snd_kcontrol_new lm49453_snd_controls[] = { | 518 | static const struct snd_kcontrol_new lm49453_snd_controls[] = { |
| 548 | /* mic1 and mic2 supports mono only */ | 519 | /* mic1 and mic2 supports mono only */ |
| 549 | SOC_SINGLE_TLV("Mic1 Volume", LM49453_P0_ADC_LEVELL_REG, 0, 6, | 520 | SOC_SINGLE_TLV("Mic1 Volume", LM49453_P0_MICL_REG, 0, 15, 0, mic_tlv), |
| 550 | 0, digital_tlv), | 521 | SOC_SINGLE_TLV("Mic2 Volume", LM49453_P0_MICR_REG, 0, 15, 0, mic_tlv), |
| 551 | SOC_SINGLE_TLV("Mic2 Volume", LM49453_P0_ADC_LEVELR_REG, 0, 6, | 522 | |
| 552 | 0, digital_tlv), | 523 | SOC_SINGLE_TLV("ADCL Volume", LM49453_P0_ADC_LEVELL_REG, 0, 63, |
| 524 | 0, adc_dac_tlv), | ||
| 525 | SOC_SINGLE_TLV("ADCR Volume", LM49453_P0_ADC_LEVELR_REG, 0, 63, | ||
| 526 | 0, adc_dac_tlv), | ||
| 553 | 527 | ||
| 554 | SOC_DOUBLE_R_TLV("DMIC1 Volume", LM49453_P0_DMIC1_LEVELL_REG, | 528 | SOC_DOUBLE_R_TLV("DMIC1 Volume", LM49453_P0_DMIC1_LEVELL_REG, |
| 555 | LM49453_P0_DMIC1_LEVELR_REG, 0, 6, 0, digital_tlv), | 529 | LM49453_P0_DMIC1_LEVELR_REG, 0, 63, 0, adc_dac_tlv), |
| 556 | SOC_DOUBLE_R_TLV("DMIC2 Volume", LM49453_P0_DMIC2_LEVELL_REG, | 530 | SOC_DOUBLE_R_TLV("DMIC2 Volume", LM49453_P0_DMIC2_LEVELL_REG, |
| 557 | LM49453_P0_DMIC2_LEVELR_REG, 0, 6, 0, digital_tlv), | 531 | LM49453_P0_DMIC2_LEVELR_REG, 0, 63, 0, adc_dac_tlv), |
| 558 | 532 | ||
| 559 | SOC_DAPM_ENUM("Mic2Mode", lm49453_mic2mode_enum), | 533 | SOC_DAPM_ENUM("Mic2Mode", lm49453_mic2mode_enum), |
| 560 | SOC_DAPM_ENUM("DMIC12 SRC", lm49453_dmic12_cfg_enum), | 534 | SOC_DAPM_ENUM("DMIC12 SRC", lm49453_dmic12_cfg_enum), |
| @@ -569,16 +543,16 @@ static const struct snd_kcontrol_new lm49453_snd_controls[] = { | |||
| 569 | 2, 1, 0), | 543 | 2, 1, 0), |
| 570 | 544 | ||
| 571 | SOC_DOUBLE_R_TLV("DAC HP Volume", LM49453_P0_DAC_HP_LEVELL_REG, | 545 | SOC_DOUBLE_R_TLV("DAC HP Volume", LM49453_P0_DAC_HP_LEVELL_REG, |
| 572 | LM49453_P0_DAC_HP_LEVELR_REG, 0, 6, 0, digital_tlv), | 546 | LM49453_P0_DAC_HP_LEVELR_REG, 0, 63, 0, adc_dac_tlv), |
| 573 | SOC_DOUBLE_R_TLV("DAC LO Volume", LM49453_P0_DAC_LO_LEVELL_REG, | 547 | SOC_DOUBLE_R_TLV("DAC LO Volume", LM49453_P0_DAC_LO_LEVELL_REG, |
| 574 | LM49453_P0_DAC_LO_LEVELR_REG, 0, 6, 0, digital_tlv), | 548 | LM49453_P0_DAC_LO_LEVELR_REG, 0, 63, 0, adc_dac_tlv), |
| 575 | SOC_DOUBLE_R_TLV("DAC LS Volume", LM49453_P0_DAC_LS_LEVELL_REG, | 549 | SOC_DOUBLE_R_TLV("DAC LS Volume", LM49453_P0_DAC_LS_LEVELL_REG, |
| 576 | LM49453_P0_DAC_LS_LEVELR_REG, 0, 6, 0, digital_tlv), | 550 | LM49453_P0_DAC_LS_LEVELR_REG, 0, 63, 0, adc_dac_tlv), |
| 577 | SOC_DOUBLE_R_TLV("DAC HA Volume", LM49453_P0_DAC_HA_LEVELL_REG, | 551 | SOC_DOUBLE_R_TLV("DAC HA Volume", LM49453_P0_DAC_HA_LEVELL_REG, |
| 578 | LM49453_P0_DAC_HA_LEVELR_REG, 0, 6, 0, digital_tlv), | 552 | LM49453_P0_DAC_HA_LEVELR_REG, 0, 63, 0, adc_dac_tlv), |
| 579 | 553 | ||
| 580 | SOC_SINGLE_TLV("EP Volume", LM49453_P0_DAC_LS_LEVELL_REG, | 554 | SOC_SINGLE_TLV("EP Volume", LM49453_P0_DAC_LS_LEVELL_REG, |
| 581 | 0, 6, 0, digital_tlv), | 555 | 0, 63, 0, adc_dac_tlv), |
| 582 | 556 | ||
| 583 | SOC_SINGLE_TLV("PORT1_1_RX_LVL Volume", LM49453_P0_PORT1_RX_LVL1_REG, | 557 | SOC_SINGLE_TLV("PORT1_1_RX_LVL Volume", LM49453_P0_PORT1_RX_LVL1_REG, |
| 584 | 0, 3, 0, port_tlv), | 558 | 0, 3, 0, port_tlv), |
| @@ -1218,7 +1192,7 @@ static int lm49453_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) | |||
| 1218 | } | 1192 | } |
| 1219 | 1193 | ||
| 1220 | snd_soc_update_bits(codec, LM49453_P0_AUDIO_PORT1_BASIC_REG, | 1194 | snd_soc_update_bits(codec, LM49453_P0_AUDIO_PORT1_BASIC_REG, |
| 1221 | LM49453_AUDIO_PORT1_BASIC_FMT_MASK|BIT(1)|BIT(5), | 1195 | LM49453_AUDIO_PORT1_BASIC_FMT_MASK|BIT(0)|BIT(5), |
| 1222 | (aif_val | mode | clk_phase)); | 1196 | (aif_val | mode | clk_phase)); |
| 1223 | 1197 | ||
| 1224 | snd_soc_write(codec, LM49453_P0_AUDIO_PORT1_RX_MSB_REG, clk_shift); | 1198 | snd_soc_write(codec, LM49453_P0_AUDIO_PORT1_RX_MSB_REG, clk_shift); |
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index cb1675cd8e1c..92bbfec9b107 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c | |||
| @@ -401,7 +401,7 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = { | |||
| 401 | 5, 1, 0), | 401 | 5, 1, 0), |
| 402 | 402 | ||
| 403 | SOC_SINGLE_TLV("Mic Volume", SGTL5000_CHIP_MIC_CTRL, | 403 | SOC_SINGLE_TLV("Mic Volume", SGTL5000_CHIP_MIC_CTRL, |
| 404 | 0, 4, 0, mic_gain_tlv), | 404 | 0, 3, 0, mic_gain_tlv), |
| 405 | }; | 405 | }; |
| 406 | 406 | ||
| 407 | /* mute the codec used by alsa core */ | 407 | /* mute the codec used by alsa core */ |
| @@ -1344,7 +1344,7 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) | |||
| 1344 | SGTL5000_HP_ZCD_EN | | 1344 | SGTL5000_HP_ZCD_EN | |
| 1345 | SGTL5000_ADC_ZCD_EN); | 1345 | SGTL5000_ADC_ZCD_EN); |
| 1346 | 1346 | ||
| 1347 | snd_soc_write(codec, SGTL5000_CHIP_MIC_CTRL, 0); | 1347 | snd_soc_write(codec, SGTL5000_CHIP_MIC_CTRL, 2); |
| 1348 | 1348 | ||
| 1349 | /* | 1349 | /* |
| 1350 | * disable DAP | 1350 | * disable DAP |
diff --git a/sound/soc/codecs/sta529.c b/sound/soc/codecs/sta529.c index ab355c4f0b2d..40c07be9b581 100644 --- a/sound/soc/codecs/sta529.c +++ b/sound/soc/codecs/sta529.c | |||
| @@ -74,9 +74,10 @@ | |||
| 74 | SNDRV_PCM_FMTBIT_S32_LE) | 74 | SNDRV_PCM_FMTBIT_S32_LE) |
| 75 | #define S2PC_VALUE 0x98 | 75 | #define S2PC_VALUE 0x98 |
| 76 | #define CLOCK_OUT 0x60 | 76 | #define CLOCK_OUT 0x60 |
| 77 | #define LEFT_J_DATA_FORMAT 0x10 | 77 | #define DATA_FORMAT_MSK 0x0E |
| 78 | #define I2S_DATA_FORMAT 0x12 | 78 | #define LEFT_J_DATA_FORMAT 0x00 |
| 79 | #define RIGHT_J_DATA_FORMAT 0x14 | 79 | #define I2S_DATA_FORMAT 0x02 |
| 80 | #define RIGHT_J_DATA_FORMAT 0x04 | ||
| 80 | #define CODEC_MUTE_VAL 0x80 | 81 | #define CODEC_MUTE_VAL 0x80 |
| 81 | 82 | ||
| 82 | #define POWER_CNTLMSAK 0x40 | 83 | #define POWER_CNTLMSAK 0x40 |
| @@ -289,7 +290,7 @@ static int sta529_set_dai_fmt(struct snd_soc_dai *codec_dai, u32 fmt) | |||
| 289 | return -EINVAL; | 290 | return -EINVAL; |
| 290 | } | 291 | } |
| 291 | 292 | ||
| 292 | snd_soc_update_bits(codec, STA529_S2PCFG0, 0x0D, mode); | 293 | snd_soc_update_bits(codec, STA529_S2PCFG0, DATA_FORMAT_MSK, mode); |
| 293 | 294 | ||
| 294 | return 0; | 295 | return 0; |
| 295 | } | 296 | } |
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c index 1cbe88f01d63..12bcae63a7f0 100644 --- a/sound/soc/codecs/wm2000.c +++ b/sound/soc/codecs/wm2000.c | |||
| @@ -209,9 +209,9 @@ static int wm2000_power_up(struct i2c_client *i2c, int analogue) | |||
| 209 | 209 | ||
| 210 | ret = wm2000_read(i2c, WM2000_REG_SPEECH_CLARITY); | 210 | ret = wm2000_read(i2c, WM2000_REG_SPEECH_CLARITY); |
| 211 | if (wm2000->speech_clarity) | 211 | if (wm2000->speech_clarity) |
| 212 | ret &= ~WM2000_SPEECH_CLARITY; | ||
| 213 | else | ||
| 214 | ret |= WM2000_SPEECH_CLARITY; | 212 | ret |= WM2000_SPEECH_CLARITY; |
| 213 | else | ||
| 214 | ret &= ~WM2000_SPEECH_CLARITY; | ||
| 215 | wm2000_write(i2c, WM2000_REG_SPEECH_CLARITY, ret); | 215 | wm2000_write(i2c, WM2000_REG_SPEECH_CLARITY, ret); |
| 216 | 216 | ||
| 217 | wm2000_write(i2c, WM2000_REG_SYS_START0, 0x33); | 217 | wm2000_write(i2c, WM2000_REG_SYS_START0, 0x33); |
diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c index afcf31df77e0..e6cefe1ac677 100644 --- a/sound/soc/codecs/wm2200.c +++ b/sound/soc/codecs/wm2200.c | |||
| @@ -1566,15 +1566,9 @@ static int wm2200_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) | |||
| 1566 | case SND_SOC_DAIFMT_DSP_A: | 1566 | case SND_SOC_DAIFMT_DSP_A: |
| 1567 | fmt_val = 0; | 1567 | fmt_val = 0; |
| 1568 | break; | 1568 | break; |
| 1569 | case SND_SOC_DAIFMT_DSP_B: | ||
| 1570 | fmt_val = 1; | ||
| 1571 | break; | ||
| 1572 | case SND_SOC_DAIFMT_I2S: | 1569 | case SND_SOC_DAIFMT_I2S: |
| 1573 | fmt_val = 2; | 1570 | fmt_val = 2; |
| 1574 | break; | 1571 | break; |
| 1575 | case SND_SOC_DAIFMT_LEFT_J: | ||
| 1576 | fmt_val = 3; | ||
| 1577 | break; | ||
| 1578 | default: | 1572 | default: |
| 1579 | dev_err(codec->dev, "Unsupported DAI format %d\n", | 1573 | dev_err(codec->dev, "Unsupported DAI format %d\n", |
| 1580 | fmt & SND_SOC_DAIFMT_FORMAT_MASK); | 1574 | fmt & SND_SOC_DAIFMT_FORMAT_MASK); |
| @@ -1626,7 +1620,7 @@ static int wm2200_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) | |||
| 1626 | WM2200_AIF1TX_LRCLK_MSTR | WM2200_AIF1TX_LRCLK_INV, | 1620 | WM2200_AIF1TX_LRCLK_MSTR | WM2200_AIF1TX_LRCLK_INV, |
| 1627 | lrclk); | 1621 | lrclk); |
| 1628 | snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_5, | 1622 | snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_5, |
| 1629 | WM2200_AIF1_FMT_MASK << 1, fmt_val << 1); | 1623 | WM2200_AIF1_FMT_MASK, fmt_val); |
| 1630 | 1624 | ||
| 1631 | return 0; | 1625 | return 0; |
| 1632 | } | 1626 | } |
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c index 5a5f36936235..54397a508073 100644 --- a/sound/soc/codecs/wm5100.c +++ b/sound/soc/codecs/wm5100.c | |||
| @@ -1279,15 +1279,9 @@ static int wm5100_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) | |||
| 1279 | case SND_SOC_DAIFMT_DSP_A: | 1279 | case SND_SOC_DAIFMT_DSP_A: |
| 1280 | mask = 0; | 1280 | mask = 0; |
| 1281 | break; | 1281 | break; |
| 1282 | case SND_SOC_DAIFMT_DSP_B: | ||
| 1283 | mask = 1; | ||
| 1284 | break; | ||
| 1285 | case SND_SOC_DAIFMT_I2S: | 1282 | case SND_SOC_DAIFMT_I2S: |
| 1286 | mask = 2; | 1283 | mask = 2; |
| 1287 | break; | 1284 | break; |
| 1288 | case SND_SOC_DAIFMT_LEFT_J: | ||
| 1289 | mask = 3; | ||
| 1290 | break; | ||
| 1291 | default: | 1285 | default: |
| 1292 | dev_err(codec->dev, "Unsupported DAI format %d\n", | 1286 | dev_err(codec->dev, "Unsupported DAI format %d\n", |
| 1293 | fmt & SND_SOC_DAIFMT_FORMAT_MASK); | 1287 | fmt & SND_SOC_DAIFMT_FORMAT_MASK); |
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index 688ade080589..7a9048dad1cd 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c | |||
| @@ -36,6 +36,9 @@ | |||
| 36 | struct wm5102_priv { | 36 | struct wm5102_priv { |
| 37 | struct arizona_priv core; | 37 | struct arizona_priv core; |
| 38 | struct arizona_fll fll[2]; | 38 | struct arizona_fll fll[2]; |
| 39 | |||
| 40 | unsigned int spk_ena:2; | ||
| 41 | unsigned int spk_ena_pending:1; | ||
| 39 | }; | 42 | }; |
| 40 | 43 | ||
| 41 | static DECLARE_TLV_DB_SCALE(ana_tlv, 0, 100, 0); | 44 | static DECLARE_TLV_DB_SCALE(ana_tlv, 0, 100, 0); |
| @@ -787,6 +790,47 @@ ARIZONA_MIXER_CONTROLS("AIF3TX1", ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE), | |||
| 787 | ARIZONA_MIXER_CONTROLS("AIF3TX2", ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE), | 790 | ARIZONA_MIXER_CONTROLS("AIF3TX2", ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE), |
| 788 | }; | 791 | }; |
| 789 | 792 | ||
| 793 | static int wm5102_spk_ev(struct snd_soc_dapm_widget *w, | ||
| 794 | struct snd_kcontrol *kcontrol, | ||
| 795 | int event) | ||
| 796 | { | ||
| 797 | struct snd_soc_codec *codec = w->codec; | ||
| 798 | struct arizona *arizona = dev_get_drvdata(codec->dev->parent); | ||
| 799 | struct wm5102_priv *wm5102 = snd_soc_codec_get_drvdata(codec); | ||
| 800 | |||
| 801 | if (arizona->rev < 1) | ||
| 802 | return 0; | ||
| 803 | |||
| 804 | switch (event) { | ||
| 805 | case SND_SOC_DAPM_PRE_PMU: | ||
| 806 | if (!wm5102->spk_ena) { | ||
| 807 | snd_soc_write(codec, 0x4f5, 0x25a); | ||
| 808 | wm5102->spk_ena_pending = true; | ||
| 809 | } | ||
| 810 | break; | ||
| 811 | case SND_SOC_DAPM_POST_PMU: | ||
| 812 | if (wm5102->spk_ena_pending) { | ||
| 813 | msleep(75); | ||
| 814 | snd_soc_write(codec, 0x4f5, 0xda); | ||
| 815 | wm5102->spk_ena_pending = false; | ||
| 816 | wm5102->spk_ena++; | ||
| 817 | } | ||
| 818 | break; | ||
| 819 | case SND_SOC_DAPM_PRE_PMD: | ||
| 820 | wm5102->spk_ena--; | ||
| 821 | if (!wm5102->spk_ena) | ||
| 822 | snd_soc_write(codec, 0x4f5, 0x25a); | ||
| 823 | break; | ||
| 824 | case SND_SOC_DAPM_POST_PMD: | ||
| 825 | if (!wm5102->spk_ena) | ||
| 826 | snd_soc_write(codec, 0x4f5, 0x0da); | ||
| 827 | break; | ||
| 828 | } | ||
| 829 | |||
| 830 | return 0; | ||
| 831 | } | ||
| 832 | |||
| 833 | |||
| 790 | ARIZONA_MIXER_ENUMS(EQ1, ARIZONA_EQ1MIX_INPUT_1_SOURCE); | 834 | ARIZONA_MIXER_ENUMS(EQ1, ARIZONA_EQ1MIX_INPUT_1_SOURCE); |
| 791 | ARIZONA_MIXER_ENUMS(EQ2, ARIZONA_EQ2MIX_INPUT_1_SOURCE); | 835 | ARIZONA_MIXER_ENUMS(EQ2, ARIZONA_EQ2MIX_INPUT_1_SOURCE); |
| 792 | ARIZONA_MIXER_ENUMS(EQ3, ARIZONA_EQ3MIX_INPUT_1_SOURCE); | 836 | ARIZONA_MIXER_ENUMS(EQ3, ARIZONA_EQ3MIX_INPUT_1_SOURCE); |
| @@ -1034,10 +1078,10 @@ SND_SOC_DAPM_PGA_E("OUT3L", ARIZONA_OUTPUT_ENABLES_1, | |||
| 1034 | ARIZONA_OUT3L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, | 1078 | ARIZONA_OUT3L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, |
| 1035 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), | 1079 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
| 1036 | SND_SOC_DAPM_PGA_E("OUT4L", ARIZONA_OUTPUT_ENABLES_1, | 1080 | SND_SOC_DAPM_PGA_E("OUT4L", ARIZONA_OUTPUT_ENABLES_1, |
| 1037 | ARIZONA_OUT4L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, | 1081 | ARIZONA_OUT4L_ENA_SHIFT, 0, NULL, 0, wm5102_spk_ev, |
| 1038 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), | 1082 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
| 1039 | SND_SOC_DAPM_PGA_E("OUT4R", ARIZONA_OUTPUT_ENABLES_1, | 1083 | SND_SOC_DAPM_PGA_E("OUT4R", ARIZONA_OUTPUT_ENABLES_1, |
| 1040 | ARIZONA_OUT4R_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, | 1084 | ARIZONA_OUT4R_ENA_SHIFT, 0, NULL, 0, wm5102_spk_ev, |
| 1041 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), | 1085 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
| 1042 | SND_SOC_DAPM_PGA_E("OUT5L", ARIZONA_OUTPUT_ENABLES_1, | 1086 | SND_SOC_DAPM_PGA_E("OUT5L", ARIZONA_OUTPUT_ENABLES_1, |
| 1043 | ARIZONA_OUT5L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, | 1087 | ARIZONA_OUT5L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, |
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index ffc89fab96fb..7b198c38f3ef 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c | |||
| @@ -169,6 +169,7 @@ static int wm_adsp_load(struct wm_adsp *dsp) | |||
| 169 | const struct wm_adsp_region *mem; | 169 | const struct wm_adsp_region *mem; |
| 170 | const char *region_name; | 170 | const char *region_name; |
| 171 | char *file, *text; | 171 | char *file, *text; |
| 172 | void *buf; | ||
| 172 | unsigned int reg; | 173 | unsigned int reg; |
| 173 | int regions = 0; | 174 | int regions = 0; |
| 174 | int ret, offset, type, sizes; | 175 | int ret, offset, type, sizes; |
| @@ -322,8 +323,18 @@ static int wm_adsp_load(struct wm_adsp *dsp) | |||
| 322 | } | 323 | } |
| 323 | 324 | ||
| 324 | if (reg) { | 325 | if (reg) { |
| 325 | ret = regmap_raw_write(regmap, reg, region->data, | 326 | buf = kmemdup(region->data, le32_to_cpu(region->len), |
| 327 | GFP_KERNEL); | ||
| 328 | if (!buf) { | ||
| 329 | adsp_err(dsp, "Out of memory\n"); | ||
| 330 | return -ENOMEM; | ||
| 331 | } | ||
| 332 | |||
| 333 | ret = regmap_raw_write(regmap, reg, buf, | ||
| 326 | le32_to_cpu(region->len)); | 334 | le32_to_cpu(region->len)); |
| 335 | |||
| 336 | kfree(buf); | ||
| 337 | |||
| 327 | if (ret != 0) { | 338 | if (ret != 0) { |
| 328 | adsp_err(dsp, | 339 | adsp_err(dsp, |
| 329 | "%s.%d: Failed to write %d bytes at %d in %s: %d\n", | 340 | "%s.%d: Failed to write %d bytes at %d in %s: %d\n", |
| @@ -359,6 +370,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp) | |||
| 359 | const char *region_name; | 370 | const char *region_name; |
| 360 | int ret, pos, blocks, type, offset, reg; | 371 | int ret, pos, blocks, type, offset, reg; |
| 361 | char *file; | 372 | char *file; |
| 373 | void *buf; | ||
| 362 | 374 | ||
| 363 | file = kzalloc(PAGE_SIZE, GFP_KERNEL); | 375 | file = kzalloc(PAGE_SIZE, GFP_KERNEL); |
| 364 | if (file == NULL) | 376 | if (file == NULL) |
| @@ -426,6 +438,13 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp) | |||
| 426 | } | 438 | } |
| 427 | 439 | ||
| 428 | if (reg) { | 440 | if (reg) { |
| 441 | buf = kmemdup(blk->data, le32_to_cpu(blk->len), | ||
| 442 | GFP_KERNEL); | ||
| 443 | if (!buf) { | ||
| 444 | adsp_err(dsp, "Out of memory\n"); | ||
| 445 | return -ENOMEM; | ||
| 446 | } | ||
| 447 | |||
| 429 | ret = regmap_raw_write(regmap, reg, blk->data, | 448 | ret = regmap_raw_write(regmap, reg, blk->data, |
| 430 | le32_to_cpu(blk->len)); | 449 | le32_to_cpu(blk->len)); |
| 431 | if (ret != 0) { | 450 | if (ret != 0) { |
| @@ -433,6 +452,8 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp) | |||
| 433 | "%s.%d: Failed to write to %x in %s\n", | 452 | "%s.%d: Failed to write to %x in %s\n", |
| 434 | file, blocks, reg, region_name); | 453 | file, blocks, reg, region_name); |
| 435 | } | 454 | } |
| 455 | |||
| 456 | kfree(buf); | ||
| 436 | } | 457 | } |
| 437 | 458 | ||
| 438 | pos += le32_to_cpu(blk->len) + sizeof(*blk); | 459 | pos += le32_to_cpu(blk->len) + sizeof(*blk); |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 91d592ff67b7..2370063b5824 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
| @@ -1255,6 +1255,8 @@ static int soc_post_component_init(struct snd_soc_card *card, | |||
| 1255 | INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_CAPTURE].fe_clients); | 1255 | INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_CAPTURE].fe_clients); |
| 1256 | ret = device_add(rtd->dev); | 1256 | ret = device_add(rtd->dev); |
| 1257 | if (ret < 0) { | 1257 | if (ret < 0) { |
| 1258 | /* calling put_device() here to free the rtd->dev */ | ||
| 1259 | put_device(rtd->dev); | ||
| 1258 | dev_err(card->dev, | 1260 | dev_err(card->dev, |
| 1259 | "ASoC: failed to register runtime device: %d\n", ret); | 1261 | "ASoC: failed to register runtime device: %d\n", ret); |
| 1260 | return ret; | 1262 | return ret; |
| @@ -1554,7 +1556,7 @@ static void soc_remove_aux_dev(struct snd_soc_card *card, int num) | |||
| 1554 | /* unregister the rtd device */ | 1556 | /* unregister the rtd device */ |
| 1555 | if (rtd->dev_registered) { | 1557 | if (rtd->dev_registered) { |
| 1556 | device_remove_file(rtd->dev, &dev_attr_codec_reg); | 1558 | device_remove_file(rtd->dev, &dev_attr_codec_reg); |
| 1557 | device_del(rtd->dev); | 1559 | device_unregister(rtd->dev); |
| 1558 | rtd->dev_registered = 0; | 1560 | rtd->dev_registered = 0; |
| 1559 | } | 1561 | } |
| 1560 | 1562 | ||
| @@ -2917,7 +2919,7 @@ int snd_soc_info_volsw_range(struct snd_kcontrol *kcontrol, | |||
| 2917 | platform_max = mc->platform_max; | 2919 | platform_max = mc->platform_max; |
| 2918 | 2920 | ||
| 2919 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 2921 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
| 2920 | uinfo->count = 1; | 2922 | uinfo->count = snd_soc_volsw_is_stereo(mc) ? 2 : 1; |
| 2921 | uinfo->value.integer.min = 0; | 2923 | uinfo->value.integer.min = 0; |
| 2922 | uinfo->value.integer.max = platform_max - min; | 2924 | uinfo->value.integer.max = platform_max - min; |
| 2923 | 2925 | ||
| @@ -2941,12 +2943,14 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, | |||
| 2941 | (struct soc_mixer_control *)kcontrol->private_value; | 2943 | (struct soc_mixer_control *)kcontrol->private_value; |
| 2942 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 2944 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
| 2943 | unsigned int reg = mc->reg; | 2945 | unsigned int reg = mc->reg; |
| 2946 | unsigned int rreg = mc->rreg; | ||
| 2944 | unsigned int shift = mc->shift; | 2947 | unsigned int shift = mc->shift; |
| 2945 | int min = mc->min; | 2948 | int min = mc->min; |
| 2946 | int max = mc->max; | 2949 | int max = mc->max; |
| 2947 | unsigned int mask = (1 << fls(max)) - 1; | 2950 | unsigned int mask = (1 << fls(max)) - 1; |
| 2948 | unsigned int invert = mc->invert; | 2951 | unsigned int invert = mc->invert; |
| 2949 | unsigned int val, val_mask; | 2952 | unsigned int val, val_mask; |
| 2953 | int ret; | ||
| 2950 | 2954 | ||
| 2951 | val = ((ucontrol->value.integer.value[0] + min) & mask); | 2955 | val = ((ucontrol->value.integer.value[0] + min) & mask); |
| 2952 | if (invert) | 2956 | if (invert) |
| @@ -2954,7 +2958,21 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, | |||
| 2954 | val_mask = mask << shift; | 2958 | val_mask = mask << shift; |
| 2955 | val = val << shift; | 2959 | val = val << shift; |
| 2956 | 2960 | ||
| 2957 | return snd_soc_update_bits_locked(codec, reg, val_mask, val); | 2961 | ret = snd_soc_update_bits_locked(codec, reg, val_mask, val); |
| 2962 | if (ret != 0) | ||
| 2963 | return ret; | ||
| 2964 | |||
| 2965 | if (snd_soc_volsw_is_stereo(mc)) { | ||
| 2966 | val = ((ucontrol->value.integer.value[1] + min) & mask); | ||
| 2967 | if (invert) | ||
| 2968 | val = max - val; | ||
| 2969 | val_mask = mask << shift; | ||
| 2970 | val = val << shift; | ||
| 2971 | |||
| 2972 | ret = snd_soc_update_bits_locked(codec, rreg, val_mask, val); | ||
| 2973 | } | ||
| 2974 | |||
| 2975 | return ret; | ||
| 2958 | } | 2976 | } |
| 2959 | EXPORT_SYMBOL_GPL(snd_soc_put_volsw_range); | 2977 | EXPORT_SYMBOL_GPL(snd_soc_put_volsw_range); |
| 2960 | 2978 | ||
| @@ -2974,6 +2992,7 @@ int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol, | |||
| 2974 | (struct soc_mixer_control *)kcontrol->private_value; | 2992 | (struct soc_mixer_control *)kcontrol->private_value; |
| 2975 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 2993 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
| 2976 | unsigned int reg = mc->reg; | 2994 | unsigned int reg = mc->reg; |
| 2995 | unsigned int rreg = mc->rreg; | ||
| 2977 | unsigned int shift = mc->shift; | 2996 | unsigned int shift = mc->shift; |
| 2978 | int min = mc->min; | 2997 | int min = mc->min; |
| 2979 | int max = mc->max; | 2998 | int max = mc->max; |
| @@ -2988,6 +3007,16 @@ int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol, | |||
| 2988 | ucontrol->value.integer.value[0] = | 3007 | ucontrol->value.integer.value[0] = |
| 2989 | ucontrol->value.integer.value[0] - min; | 3008 | ucontrol->value.integer.value[0] - min; |
| 2990 | 3009 | ||
| 3010 | if (snd_soc_volsw_is_stereo(mc)) { | ||
| 3011 | ucontrol->value.integer.value[1] = | ||
| 3012 | (snd_soc_read(codec, rreg) >> shift) & mask; | ||
| 3013 | if (invert) | ||
| 3014 | ucontrol->value.integer.value[1] = | ||
| 3015 | max - ucontrol->value.integer.value[1]; | ||
| 3016 | ucontrol->value.integer.value[1] = | ||
| 3017 | ucontrol->value.integer.value[1] - min; | ||
| 3018 | } | ||
| 3019 | |||
| 2991 | return 0; | 3020 | return 0; |
| 2992 | } | 3021 | } |
| 2993 | EXPORT_SYMBOL_GPL(snd_soc_get_volsw_range); | 3022 | EXPORT_SYMBOL_GPL(snd_soc_get_volsw_range); |
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index d7711fce119b..cf191e6aebbe 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c | |||
| @@ -1243,6 +1243,7 @@ static int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream) | |||
| 1243 | if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && | 1243 | if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && |
| 1244 | (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && | 1244 | (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && |
| 1245 | (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && | 1245 | (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && |
| 1246 | (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) && | ||
| 1246 | (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP)) | 1247 | (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP)) |
| 1247 | continue; | 1248 | continue; |
| 1248 | 1249 | ||
diff --git a/sound/usb/midi.c b/sound/usb/midi.c index c183d34842ac..34b9bb7fe87c 100644 --- a/sound/usb/midi.c +++ b/sound/usb/midi.c | |||
| @@ -2181,10 +2181,6 @@ int snd_usbmidi_create(struct snd_card *card, | |||
| 2181 | umidi->usb_protocol_ops = &snd_usbmidi_novation_ops; | 2181 | umidi->usb_protocol_ops = &snd_usbmidi_novation_ops; |
| 2182 | err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); | 2182 | err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); |
| 2183 | break; | 2183 | break; |
| 2184 | case QUIRK_MIDI_MBOX2: | ||
| 2185 | umidi->usb_protocol_ops = &snd_usbmidi_midiman_ops; | ||
| 2186 | err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); | ||
| 2187 | break; | ||
| 2188 | case QUIRK_MIDI_RAW_BYTES: | 2184 | case QUIRK_MIDI_RAW_BYTES: |
| 2189 | umidi->usb_protocol_ops = &snd_usbmidi_raw_ops; | 2185 | umidi->usb_protocol_ops = &snd_usbmidi_raw_ops; |
| 2190 | /* | 2186 | /* |
diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c index e71fe55cebef..0e2ed3d05c45 100644 --- a/sound/usb/mixer_maps.c +++ b/sound/usb/mixer_maps.c | |||
| @@ -179,6 +179,15 @@ static struct usbmix_name_map audigy2nx_map[] = { | |||
| 179 | { 0 } /* terminator */ | 179 | { 0 } /* terminator */ |
| 180 | }; | 180 | }; |
| 181 | 181 | ||
| 182 | static struct usbmix_selector_map c400_selectors[] = { | ||
| 183 | { | ||
| 184 | .id = 0x80, | ||
| 185 | .count = 2, | ||
| 186 | .names = (const char*[]) {"Internal", "SPDIF"} | ||
| 187 | }, | ||
| 188 | { 0 } /* terminator */ | ||
| 189 | }; | ||
| 190 | |||
| 182 | static struct usbmix_selector_map audigy2nx_selectors[] = { | 191 | static struct usbmix_selector_map audigy2nx_selectors[] = { |
| 183 | { | 192 | { |
| 184 | .id = 14, /* Capture Source */ | 193 | .id = 14, /* Capture Source */ |
| @@ -367,6 +376,10 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = { | |||
| 367 | .map = hercules_usb51_map, | 376 | .map = hercules_usb51_map, |
| 368 | }, | 377 | }, |
| 369 | { | 378 | { |
| 379 | .id = USB_ID(0x0763, 0x2030), | ||
| 380 | .selector_map = c400_selectors, | ||
| 381 | }, | ||
| 382 | { | ||
| 370 | .id = USB_ID(0x08bb, 0x2702), | 383 | .id = USB_ID(0x08bb, 0x2702), |
| 371 | .map = linex_map, | 384 | .map = linex_map, |
| 372 | .ignore_ctl_error = 1, | 385 | .ignore_ctl_error = 1, |
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index 0422b1360af3..15520de1df56 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c | |||
| @@ -1206,7 +1206,7 @@ static int snd_c400_create_mixer(struct usb_mixer_interface *mixer) | |||
| 1206 | * are valid they presents mono controls as L and R channels of | 1206 | * are valid they presents mono controls as L and R channels of |
| 1207 | * stereo. So we provide a good mixer here. | 1207 | * stereo. So we provide a good mixer here. |
| 1208 | */ | 1208 | */ |
| 1209 | struct std_mono_table ebox44_table[] = { | 1209 | static struct std_mono_table ebox44_table[] = { |
| 1210 | { | 1210 | { |
| 1211 | .unitid = 4, | 1211 | .unitid = 4, |
| 1212 | .control = 1, | 1212 | .control = 1, |
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index c6593101c049..d82e378d37cb 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c | |||
| @@ -511,6 +511,16 @@ static int configure_sync_endpoint(struct snd_usb_substream *subs) | |||
| 511 | struct snd_usb_substream *sync_subs = | 511 | struct snd_usb_substream *sync_subs = |
| 512 | &subs->stream->substream[subs->direction ^ 1]; | 512 | &subs->stream->substream[subs->direction ^ 1]; |
| 513 | 513 | ||
| 514 | if (subs->sync_endpoint->type != SND_USB_ENDPOINT_TYPE_DATA || | ||
| 515 | !subs->stream) | ||
| 516 | return snd_usb_endpoint_set_params(subs->sync_endpoint, | ||
| 517 | subs->pcm_format, | ||
| 518 | subs->channels, | ||
| 519 | subs->period_bytes, | ||
| 520 | subs->cur_rate, | ||
| 521 | subs->cur_audiofmt, | ||
| 522 | NULL); | ||
| 523 | |||
| 514 | /* Try to find the best matching audioformat. */ | 524 | /* Try to find the best matching audioformat. */ |
| 515 | list_for_each_entry(fp, &sync_subs->fmt_list, list) { | 525 | list_for_each_entry(fp, &sync_subs->fmt_list, list) { |
| 516 | int score = match_endpoint_audioformats(fp, subs->cur_audiofmt, | 526 | int score = match_endpoint_audioformats(fp, subs->cur_audiofmt, |
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h index cdcf6b45e8a8..64d25a7a4d59 100644 --- a/sound/usb/quirks-table.h +++ b/sound/usb/quirks-table.h | |||
| @@ -50,6 +50,28 @@ | |||
| 50 | } | 50 | } |
| 51 | }, | 51 | }, |
| 52 | 52 | ||
| 53 | { | ||
| 54 | /* Creative BT-D1 */ | ||
| 55 | USB_DEVICE(0x041e, 0x0005), | ||
| 56 | .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { | ||
| 57 | .ifnum = 1, | ||
| 58 | .type = QUIRK_AUDIO_FIXED_ENDPOINT, | ||
| 59 | .data = &(const struct audioformat) { | ||
| 60 | .formats = SNDRV_PCM_FMTBIT_S16_LE, | ||
| 61 | .channels = 2, | ||
| 62 | .iface = 1, | ||
| 63 | .altsetting = 1, | ||
| 64 | .altset_idx = 1, | ||
| 65 | .endpoint = 0x03, | ||
| 66 | .ep_attr = USB_ENDPOINT_XFER_ISOC, | ||
| 67 | .attributes = 0, | ||
| 68 | .rates = SNDRV_PCM_RATE_CONTINUOUS, | ||
| 69 | .rate_min = 48000, | ||
| 70 | .rate_max = 48000, | ||
| 71 | } | ||
| 72 | } | ||
| 73 | }, | ||
| 74 | |||
| 53 | /* Creative/Toshiba Multimedia Center SB-0500 */ | 75 | /* Creative/Toshiba Multimedia Center SB-0500 */ |
| 54 | { | 76 | { |
| 55 | USB_DEVICE(0x041e, 0x3048), | 77 | USB_DEVICE(0x041e, 0x3048), |
| @@ -2267,7 +2289,7 @@ YAMAHA_DEVICE(0x7010, "UB99"), | |||
| 2267 | .rate_table = (unsigned int[]) { | 2289 | .rate_table = (unsigned int[]) { |
| 2268 | 44100, 48000, 88200, 96000 | 2290 | 44100, 48000, 88200, 96000 |
| 2269 | }, | 2291 | }, |
| 2270 | .clock = 0x81, | 2292 | .clock = 0x80, |
| 2271 | } | 2293 | } |
| 2272 | }, | 2294 | }, |
| 2273 | /* Capture */ | 2295 | /* Capture */ |
| @@ -2293,7 +2315,7 @@ YAMAHA_DEVICE(0x7010, "UB99"), | |||
| 2293 | .rate_table = (unsigned int[]) { | 2315 | .rate_table = (unsigned int[]) { |
| 2294 | 44100, 48000, 88200, 96000 | 2316 | 44100, 48000, 88200, 96000 |
| 2295 | }, | 2317 | }, |
| 2296 | .clock = 0x81, | 2318 | .clock = 0x80, |
| 2297 | } | 2319 | } |
| 2298 | }, | 2320 | }, |
| 2299 | /* MIDI */ | 2321 | /* MIDI */ |
| @@ -2993,7 +3015,7 @@ YAMAHA_DEVICE(0x7010, "UB99"), | |||
| 2993 | }, | 3015 | }, |
| 2994 | { | 3016 | { |
| 2995 | .ifnum = 6, | 3017 | .ifnum = 6, |
| 2996 | .type = QUIRK_MIDI_MBOX2, | 3018 | .type = QUIRK_MIDI_MIDIMAN, |
| 2997 | .data = &(const struct snd_usb_midi_endpoint_info) { | 3019 | .data = &(const struct snd_usb_midi_endpoint_info) { |
| 2998 | .out_ep = 0x02, | 3020 | .out_ep = 0x02, |
| 2999 | .out_cables = 0x0001, | 3021 | .out_cables = 0x0001, |
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index f104c68fe1e0..2c971858d6b7 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c | |||
| @@ -306,7 +306,6 @@ int snd_usb_create_quirk(struct snd_usb_audio *chip, | |||
| 306 | [QUIRK_MIDI_YAMAHA] = create_any_midi_quirk, | 306 | [QUIRK_MIDI_YAMAHA] = create_any_midi_quirk, |
| 307 | [QUIRK_MIDI_MIDIMAN] = create_any_midi_quirk, | 307 | [QUIRK_MIDI_MIDIMAN] = create_any_midi_quirk, |
| 308 | [QUIRK_MIDI_NOVATION] = create_any_midi_quirk, | 308 | [QUIRK_MIDI_NOVATION] = create_any_midi_quirk, |
| 309 | [QUIRK_MIDI_MBOX2] = create_any_midi_quirk, | ||
| 310 | [QUIRK_MIDI_RAW_BYTES] = create_any_midi_quirk, | 309 | [QUIRK_MIDI_RAW_BYTES] = create_any_midi_quirk, |
| 311 | [QUIRK_MIDI_EMAGIC] = create_any_midi_quirk, | 310 | [QUIRK_MIDI_EMAGIC] = create_any_midi_quirk, |
| 312 | [QUIRK_MIDI_CME] = create_any_midi_quirk, | 311 | [QUIRK_MIDI_CME] = create_any_midi_quirk, |
| @@ -388,11 +387,13 @@ static int snd_usb_fasttrackpro_boot_quirk(struct usb_device *dev) | |||
| 388 | * rules | 387 | * rules |
| 389 | */ | 388 | */ |
| 390 | err = usb_driver_set_configuration(dev, 2); | 389 | err = usb_driver_set_configuration(dev, 2); |
| 391 | if (err < 0) { | 390 | if (err < 0) |
| 392 | snd_printdd("error usb_driver_set_configuration: %d\n", | 391 | snd_printdd("error usb_driver_set_configuration: %d\n", |
| 393 | err); | 392 | err); |
| 394 | return -ENODEV; | 393 | /* Always return an error, so that we stop creating a device |
| 395 | } | 394 | that will just be destroyed and recreated with a new |
| 395 | configuration */ | ||
| 396 | return -ENODEV; | ||
| 396 | } else | 397 | } else |
| 397 | snd_printk(KERN_INFO "usb-audio: Fast Track Pro config OK\n"); | 398 | snd_printk(KERN_INFO "usb-audio: Fast Track Pro config OK\n"); |
| 398 | 399 | ||
| @@ -528,11 +529,11 @@ static void mbox2_setup_48_24_magic(struct usb_device *dev) | |||
| 528 | #define MBOX2_BOOT_LOADING 0x01 /* Hard coded into the device */ | 529 | #define MBOX2_BOOT_LOADING 0x01 /* Hard coded into the device */ |
| 529 | #define MBOX2_BOOT_READY 0x02 /* Hard coded into the device */ | 530 | #define MBOX2_BOOT_READY 0x02 /* Hard coded into the device */ |
| 530 | 531 | ||
| 531 | int snd_usb_mbox2_boot_quirk(struct usb_device *dev) | 532 | static int snd_usb_mbox2_boot_quirk(struct usb_device *dev) |
| 532 | { | 533 | { |
| 533 | struct usb_host_config *config = dev->actconfig; | 534 | struct usb_host_config *config = dev->actconfig; |
| 534 | int err; | 535 | int err; |
| 535 | u8 bootresponse; | 536 | u8 bootresponse[12]; |
| 536 | int fwsize; | 537 | int fwsize; |
| 537 | int count; | 538 | int count; |
| 538 | 539 | ||
| @@ -546,20 +547,20 @@ int snd_usb_mbox2_boot_quirk(struct usb_device *dev) | |||
| 546 | snd_printd("usb-audio: Sending Digidesign Mbox 2 boot sequence...\n"); | 547 | snd_printd("usb-audio: Sending Digidesign Mbox 2 boot sequence...\n"); |
| 547 | 548 | ||
| 548 | count = 0; | 549 | count = 0; |
| 549 | bootresponse = MBOX2_BOOT_LOADING; | 550 | bootresponse[0] = MBOX2_BOOT_LOADING; |
| 550 | while ((bootresponse == MBOX2_BOOT_LOADING) && (count < 10)) { | 551 | while ((bootresponse[0] == MBOX2_BOOT_LOADING) && (count < 10)) { |
| 551 | msleep(500); /* 0.5 second delay */ | 552 | msleep(500); /* 0.5 second delay */ |
| 552 | snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), | 553 | snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), |
| 553 | /* Control magic - load onboard firmware */ | 554 | /* Control magic - load onboard firmware */ |
| 554 | 0x85, 0xc0, 0x0001, 0x0000, &bootresponse, 0x0012); | 555 | 0x85, 0xc0, 0x0001, 0x0000, &bootresponse, 0x0012); |
| 555 | if (bootresponse == MBOX2_BOOT_READY) | 556 | if (bootresponse[0] == MBOX2_BOOT_READY) |
| 556 | break; | 557 | break; |
| 557 | snd_printd("usb-audio: device not ready, resending boot sequence...\n"); | 558 | snd_printd("usb-audio: device not ready, resending boot sequence...\n"); |
| 558 | count++; | 559 | count++; |
| 559 | } | 560 | } |
| 560 | 561 | ||
| 561 | if (bootresponse != MBOX2_BOOT_READY) { | 562 | if (bootresponse[0] != MBOX2_BOOT_READY) { |
| 562 | snd_printk(KERN_ERR "usb-audio: Unknown bootresponse=%d, or timed out, ignoring device.\n", bootresponse); | 563 | snd_printk(KERN_ERR "usb-audio: Unknown bootresponse=%d, or timed out, ignoring device.\n", bootresponse[0]); |
| 563 | return -ENODEV; | 564 | return -ENODEV; |
| 564 | } | 565 | } |
| 565 | 566 | ||
| @@ -660,7 +661,6 @@ static int audiophile_skip_setting_quirk(struct snd_usb_audio *chip, | |||
| 660 | return 0; /* keep this altsetting */ | 661 | return 0; /* keep this altsetting */ |
| 661 | } | 662 | } |
| 662 | 663 | ||
| 663 | |||
| 664 | static int fasttrackpro_skip_setting_quirk(struct snd_usb_audio *chip, | 664 | static int fasttrackpro_skip_setting_quirk(struct snd_usb_audio *chip, |
| 665 | int iface, int altno) | 665 | int iface, int altno) |
| 666 | { | 666 | { |
| @@ -861,6 +861,17 @@ void snd_usb_endpoint_start_quirk(struct snd_usb_endpoint *ep) | |||
| 861 | if ((le16_to_cpu(ep->chip->dev->descriptor.idVendor) == 0x23ba) && | 861 | if ((le16_to_cpu(ep->chip->dev->descriptor.idVendor) == 0x23ba) && |
| 862 | ep->type == SND_USB_ENDPOINT_TYPE_SYNC) | 862 | ep->type == SND_USB_ENDPOINT_TYPE_SYNC) |
| 863 | ep->skip_packets = 4; | 863 | ep->skip_packets = 4; |
| 864 | |||
| 865 | /* | ||
| 866 | * M-Audio Fast Track C400 - when packets are not skipped, real world | ||
| 867 | * latency varies by approx. +/- 50 frames (at 96KHz) each time the | ||
| 868 | * stream is (re)started. When skipping packets 16 at endpoint start | ||
| 869 | * up, the real world latency is stable within +/- 1 frame (also | ||
| 870 | * across power cycles). | ||
| 871 | */ | ||
| 872 | if (ep->chip->usb_id == USB_ID(0x0763, 0x2030) && | ||
| 873 | ep->type == SND_USB_ENDPOINT_TYPE_DATA) | ||
| 874 | ep->skip_packets = 16; | ||
| 864 | } | 875 | } |
| 865 | 876 | ||
| 866 | void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe, | 877 | void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe, |
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index a8172c119796..1ac3fd9cc5a6 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h | |||
| @@ -76,7 +76,6 @@ enum quirk_type { | |||
| 76 | QUIRK_MIDI_YAMAHA, | 76 | QUIRK_MIDI_YAMAHA, |
| 77 | QUIRK_MIDI_MIDIMAN, | 77 | QUIRK_MIDI_MIDIMAN, |
| 78 | QUIRK_MIDI_NOVATION, | 78 | QUIRK_MIDI_NOVATION, |
| 79 | QUIRK_MIDI_MBOX2, | ||
| 80 | QUIRK_MIDI_RAW_BYTES, | 79 | QUIRK_MIDI_RAW_BYTES, |
| 81 | QUIRK_MIDI_EMAGIC, | 80 | QUIRK_MIDI_EMAGIC, |
| 82 | QUIRK_MIDI_CME, | 81 | QUIRK_MIDI_CME, |
diff --git a/tools/testing/selftests/ipc/Makefile b/tools/testing/selftests/ipc/Makefile new file mode 100644 index 000000000000..5386fd7c43ae --- /dev/null +++ b/tools/testing/selftests/ipc/Makefile | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | uname_M := $(shell uname -m 2>/dev/null || echo not) | ||
| 2 | ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/) | ||
| 3 | ifeq ($(ARCH),i386) | ||
| 4 | ARCH := X86 | ||
| 5 | CFLAGS := -DCONFIG_X86_32 -D__i386__ | ||
| 6 | endif | ||
| 7 | ifeq ($(ARCH),x86_64) | ||
| 8 | ARCH := X86 | ||
| 9 | CFLAGS := -DCONFIG_X86_64 -D__x86_64__ | ||
| 10 | endif | ||
| 11 | |||
| 12 | CFLAGS += -I../../../../usr/include/ | ||
| 13 | |||
| 14 | all: | ||
| 15 | ifeq ($(ARCH),X86) | ||
| 16 | gcc $(CFLAGS) msgque.c -o msgque_test | ||
| 17 | else | ||
| 18 | echo "Not an x86 target, can't build msgque selftest" | ||
| 19 | endif | ||
| 20 | |||
| 21 | run_tests: all | ||
| 22 | ./msgque_test | ||
| 23 | |||
| 24 | clean: | ||
| 25 | rm -fr ./msgque_test | ||
diff --git a/tools/testing/selftests/ipc/msgque.c b/tools/testing/selftests/ipc/msgque.c new file mode 100644 index 000000000000..d66418237d21 --- /dev/null +++ b/tools/testing/selftests/ipc/msgque.c | |||
| @@ -0,0 +1,246 @@ | |||
| 1 | #include <stdlib.h> | ||
| 2 | #include <stdio.h> | ||
| 3 | #include <string.h> | ||
| 4 | #include <errno.h> | ||
| 5 | #include <linux/msg.h> | ||
| 6 | #include <fcntl.h> | ||
| 7 | |||
| 8 | #define MAX_MSG_SIZE 32 | ||
| 9 | |||
| 10 | struct msg1 { | ||
| 11 | int msize; | ||
| 12 | long mtype; | ||
| 13 | char mtext[MAX_MSG_SIZE]; | ||
| 14 | }; | ||
| 15 | |||
| 16 | #define TEST_STRING "Test sysv5 msg" | ||
| 17 | #define MSG_TYPE 1 | ||
| 18 | |||
| 19 | #define ANOTHER_TEST_STRING "Yet another test sysv5 msg" | ||
| 20 | #define ANOTHER_MSG_TYPE 26538 | ||
| 21 | |||
| 22 | struct msgque_data { | ||
| 23 | key_t key; | ||
| 24 | int msq_id; | ||
| 25 | int qbytes; | ||
| 26 | int qnum; | ||
| 27 | int mode; | ||
| 28 | struct msg1 *messages; | ||
| 29 | }; | ||
| 30 | |||
| 31 | int restore_queue(struct msgque_data *msgque) | ||
| 32 | { | ||
| 33 | int fd, ret, id, i; | ||
| 34 | char buf[32]; | ||
| 35 | |||
| 36 | fd = open("/proc/sys/kernel/msg_next_id", O_WRONLY); | ||
| 37 | if (fd == -1) { | ||
| 38 | printf("Failed to open /proc/sys/kernel/msg_next_id\n"); | ||
| 39 | return -errno; | ||
| 40 | } | ||
| 41 | sprintf(buf, "%d", msgque->msq_id); | ||
| 42 | |||
| 43 | ret = write(fd, buf, strlen(buf)); | ||
| 44 | if (ret != strlen(buf)) { | ||
| 45 | printf("Failed to write to /proc/sys/kernel/msg_next_id\n"); | ||
| 46 | return -errno; | ||
| 47 | } | ||
| 48 | |||
| 49 | id = msgget(msgque->key, msgque->mode | IPC_CREAT | IPC_EXCL); | ||
| 50 | if (id == -1) { | ||
| 51 | printf("Failed to create queue\n"); | ||
| 52 | return -errno; | ||
| 53 | } | ||
| 54 | |||
| 55 | if (id != msgque->msq_id) { | ||
| 56 | printf("Restored queue has wrong id (%d instead of %d)\n", | ||
| 57 | id, msgque->msq_id); | ||
| 58 | ret = -EFAULT; | ||
| 59 | goto destroy; | ||
| 60 | } | ||
| 61 | |||
| 62 | for (i = 0; i < msgque->qnum; i++) { | ||
| 63 | if (msgsnd(msgque->msq_id, &msgque->messages[i].mtype, | ||
| 64 | msgque->messages[i].msize, IPC_NOWAIT) != 0) { | ||
| 65 | printf("msgsnd failed (%m)\n"); | ||
| 66 | ret = -errno; | ||
| 67 | goto destroy; | ||
| 68 | }; | ||
| 69 | } | ||
| 70 | return 0; | ||
| 71 | |||
| 72 | destroy: | ||
| 73 | if (msgctl(id, IPC_RMID, 0)) | ||
| 74 | printf("Failed to destroy queue: %d\n", -errno); | ||
| 75 | return ret; | ||
| 76 | } | ||
| 77 | |||
| 78 | int check_and_destroy_queue(struct msgque_data *msgque) | ||
| 79 | { | ||
| 80 | struct msg1 message; | ||
| 81 | int cnt = 0, ret; | ||
| 82 | |||
| 83 | while (1) { | ||
| 84 | ret = msgrcv(msgque->msq_id, &message.mtype, MAX_MSG_SIZE, | ||
| 85 | 0, IPC_NOWAIT); | ||
| 86 | if (ret < 0) { | ||
| 87 | if (errno == ENOMSG) | ||
| 88 | break; | ||
| 89 | printf("Failed to read IPC message: %m\n"); | ||
| 90 | ret = -errno; | ||
| 91 | goto err; | ||
| 92 | } | ||
| 93 | if (ret != msgque->messages[cnt].msize) { | ||
| 94 | printf("Wrong message size: %d (expected %d)\n", ret, | ||
| 95 | msgque->messages[cnt].msize); | ||
| 96 | ret = -EINVAL; | ||
| 97 | goto err; | ||
| 98 | } | ||
| 99 | if (message.mtype != msgque->messages[cnt].mtype) { | ||
| 100 | printf("Wrong message type\n"); | ||
| 101 | ret = -EINVAL; | ||
| 102 | goto err; | ||
| 103 | } | ||
| 104 | if (memcmp(message.mtext, msgque->messages[cnt].mtext, ret)) { | ||
| 105 | printf("Wrong message content\n"); | ||
| 106 | ret = -EINVAL; | ||
| 107 | goto err; | ||
| 108 | } | ||
| 109 | cnt++; | ||
| 110 | } | ||
| 111 | |||
| 112 | if (cnt != msgque->qnum) { | ||
| 113 | printf("Wrong message number\n"); | ||
| 114 | ret = -EINVAL; | ||
| 115 | goto err; | ||
| 116 | } | ||
| 117 | |||
| 118 | ret = 0; | ||
| 119 | err: | ||
| 120 | if (msgctl(msgque->msq_id, IPC_RMID, 0)) { | ||
| 121 | printf("Failed to destroy queue: %d\n", -errno); | ||
| 122 | return -errno; | ||
| 123 | } | ||
| 124 | return ret; | ||
| 125 | } | ||
| 126 | |||
| 127 | int dump_queue(struct msgque_data *msgque) | ||
| 128 | { | ||
| 129 | struct msqid64_ds ds; | ||
| 130 | int kern_id; | ||
| 131 | int i, ret; | ||
| 132 | |||
| 133 | for (kern_id = 0; kern_id < 256; kern_id++) { | ||
| 134 | ret = msgctl(kern_id, MSG_STAT, &ds); | ||
| 135 | if (ret < 0) { | ||
| 136 | if (errno == -EINVAL) | ||
| 137 | continue; | ||
| 138 | printf("Failed to get stats for IPC queue with id %d\n", | ||
| 139 | kern_id); | ||
| 140 | return -errno; | ||
| 141 | } | ||
| 142 | |||
| 143 | if (ret == msgque->msq_id) | ||
| 144 | break; | ||
| 145 | } | ||
| 146 | |||
| 147 | msgque->messages = malloc(sizeof(struct msg1) * ds.msg_qnum); | ||
| 148 | if (msgque->messages == NULL) { | ||
| 149 | printf("Failed to get stats for IPC queue\n"); | ||
| 150 | return -ENOMEM; | ||
| 151 | } | ||
| 152 | |||
| 153 | msgque->qnum = ds.msg_qnum; | ||
| 154 | msgque->mode = ds.msg_perm.mode; | ||
| 155 | msgque->qbytes = ds.msg_qbytes; | ||
| 156 | |||
| 157 | for (i = 0; i < msgque->qnum; i++) { | ||
| 158 | ret = msgrcv(msgque->msq_id, &msgque->messages[i].mtype, | ||
| 159 | MAX_MSG_SIZE, i, IPC_NOWAIT | MSG_COPY); | ||
| 160 | if (ret < 0) { | ||
| 161 | printf("Failed to copy IPC message: %m (%d)\n", errno); | ||
| 162 | return -errno; | ||
| 163 | } | ||
| 164 | msgque->messages[i].msize = ret; | ||
| 165 | } | ||
| 166 | return 0; | ||
| 167 | } | ||
| 168 | |||
| 169 | int fill_msgque(struct msgque_data *msgque) | ||
| 170 | { | ||
| 171 | struct msg1 msgbuf; | ||
| 172 | |||
| 173 | msgbuf.mtype = MSG_TYPE; | ||
| 174 | memcpy(msgbuf.mtext, TEST_STRING, sizeof(TEST_STRING)); | ||
| 175 | if (msgsnd(msgque->msq_id, &msgbuf.mtype, sizeof(TEST_STRING), | ||
| 176 | IPC_NOWAIT) != 0) { | ||
| 177 | printf("First message send failed (%m)\n"); | ||
| 178 | return -errno; | ||
| 179 | }; | ||
| 180 | |||
| 181 | msgbuf.mtype = ANOTHER_MSG_TYPE; | ||
| 182 | memcpy(msgbuf.mtext, ANOTHER_TEST_STRING, sizeof(ANOTHER_TEST_STRING)); | ||
| 183 | if (msgsnd(msgque->msq_id, &msgbuf.mtype, sizeof(ANOTHER_TEST_STRING), | ||
| 184 | IPC_NOWAIT) != 0) { | ||
| 185 | printf("Second message send failed (%m)\n"); | ||
| 186 | return -errno; | ||
| 187 | }; | ||
| 188 | return 0; | ||
| 189 | } | ||
| 190 | |||
| 191 | int main(int argc, char **argv) | ||
| 192 | { | ||
| 193 | int msg, pid, err; | ||
| 194 | struct msgque_data msgque; | ||
| 195 | |||
| 196 | msgque.key = ftok(argv[0], 822155650); | ||
| 197 | if (msgque.key == -1) { | ||
| 198 | printf("Can't make key\n"); | ||
| 199 | return -errno; | ||
| 200 | } | ||
| 201 | |||
| 202 | msgque.msq_id = msgget(msgque.key, IPC_CREAT | IPC_EXCL | 0666); | ||
| 203 | if (msgque.msq_id == -1) { | ||
| 204 | printf("Can't create queue\n"); | ||
| 205 | goto err_out; | ||
| 206 | } | ||
| 207 | |||
| 208 | err = fill_msgque(&msgque); | ||
| 209 | if (err) { | ||
| 210 | printf("Failed to fill queue\n"); | ||
| 211 | goto err_destroy; | ||
| 212 | } | ||
| 213 | |||
| 214 | err = dump_queue(&msgque); | ||
| 215 | if (err) { | ||
| 216 | printf("Failed to dump queue\n"); | ||
| 217 | goto err_destroy; | ||
| 218 | } | ||
| 219 | |||
| 220 | err = check_and_destroy_queue(&msgque); | ||
| 221 | if (err) { | ||
| 222 | printf("Failed to check and destroy queue\n"); | ||
| 223 | goto err_out; | ||
| 224 | } | ||
| 225 | |||
| 226 | err = restore_queue(&msgque); | ||
| 227 | if (err) { | ||
| 228 | printf("Failed to restore queue\n"); | ||
| 229 | goto err_destroy; | ||
| 230 | } | ||
| 231 | |||
| 232 | err = check_and_destroy_queue(&msgque); | ||
| 233 | if (err) { | ||
| 234 | printf("Failed to test queue\n"); | ||
| 235 | goto err_out; | ||
| 236 | } | ||
| 237 | return 0; | ||
| 238 | |||
| 239 | err_destroy: | ||
| 240 | if (msgctl(msgque.msq_id, IPC_RMID, 0)) { | ||
| 241 | printf("Failed to destroy queue: %d\n", -errno); | ||
| 242 | return -errno; | ||
| 243 | } | ||
| 244 | err_out: | ||
| 245 | return err; | ||
| 246 | } | ||
