diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/agp/intel-agp.c | 14 | ||||
-rw-r--r-- | drivers/hid/hid-core.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-cd.c | 9 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 6 | ||||
-rw-r--r-- | drivers/ide/ide-iops.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide.c | 2 | ||||
-rw-r--r-- | drivers/net/sc92031.c | 20 | ||||
-rw-r--r-- | drivers/net/tg3.c | 6 | ||||
-rw-r--r-- | drivers/pcmcia/omap_cf.c | 41 |
9 files changed, 70 insertions, 32 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index e542a628f1c7..a9fdbf9126ca 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -18,11 +18,14 @@ | |||
18 | #define PCI_DEVICE_ID_INTEL_82965Q_IG 0x2992 | 18 | #define PCI_DEVICE_ID_INTEL_82965Q_IG 0x2992 |
19 | #define PCI_DEVICE_ID_INTEL_82965G_HB 0x29A0 | 19 | #define PCI_DEVICE_ID_INTEL_82965G_HB 0x29A0 |
20 | #define PCI_DEVICE_ID_INTEL_82965G_IG 0x29A2 | 20 | #define PCI_DEVICE_ID_INTEL_82965G_IG 0x29A2 |
21 | #define PCI_DEVICE_ID_INTEL_82965GM_HB 0x2A00 | ||
22 | #define PCI_DEVICE_ID_INTEL_82965GM_IG 0x2A02 | ||
21 | 23 | ||
22 | #define IS_I965 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82946GZ_HB || \ | 24 | #define IS_I965 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82946GZ_HB || \ |
23 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_1_HB || \ | 25 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_1_HB || \ |
24 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \ | 26 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \ |
25 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB) | 27 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \ |
28 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB) | ||
26 | 29 | ||
27 | 30 | ||
28 | extern int agp_memory_reserved; | 31 | extern int agp_memory_reserved; |
@@ -1921,7 +1924,13 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev, | |||
1921 | bridge->driver = &intel_845_driver; | 1924 | bridge->driver = &intel_845_driver; |
1922 | name = "965G"; | 1925 | name = "965G"; |
1923 | break; | 1926 | break; |
1924 | 1927 | case PCI_DEVICE_ID_INTEL_82965GM_HB: | |
1928 | if (find_i830(PCI_DEVICE_ID_INTEL_82965GM_IG)) | ||
1929 | bridge->driver = &intel_i965_driver; | ||
1930 | else | ||
1931 | bridge->driver = &intel_845_driver; | ||
1932 | name = "965GM"; | ||
1933 | break; | ||
1925 | case PCI_DEVICE_ID_INTEL_7505_0: | 1934 | case PCI_DEVICE_ID_INTEL_7505_0: |
1926 | bridge->driver = &intel_7505_driver; | 1935 | bridge->driver = &intel_7505_driver; |
1927 | name = "E7505"; | 1936 | name = "E7505"; |
@@ -2080,6 +2089,7 @@ static struct pci_device_id agp_intel_pci_table[] = { | |||
2080 | ID(PCI_DEVICE_ID_INTEL_82965G_1_HB), | 2089 | ID(PCI_DEVICE_ID_INTEL_82965G_1_HB), |
2081 | ID(PCI_DEVICE_ID_INTEL_82965Q_HB), | 2090 | ID(PCI_DEVICE_ID_INTEL_82965Q_HB), |
2082 | ID(PCI_DEVICE_ID_INTEL_82965G_HB), | 2091 | ID(PCI_DEVICE_ID_INTEL_82965G_HB), |
2092 | ID(PCI_DEVICE_ID_INTEL_82965GM_HB), | ||
2083 | { } | 2093 | { } |
2084 | }; | 2094 | }; |
2085 | 2095 | ||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 67f3347afcf3..1cca32f46947 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -969,7 +969,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i | |||
969 | 969 | ||
970 | if (size < rsize) { | 970 | if (size < rsize) { |
971 | dbg("report %d is too short, (%d < %d)", report->id, size, rsize); | 971 | dbg("report %d is too short, (%d < %d)", report->id, size, rsize); |
972 | return -1; | 972 | memset(data + size, 0, rsize - size); |
973 | } | 973 | } |
974 | 974 | ||
975 | if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event) | 975 | if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event) |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 45a928c058cf..638becda81c6 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -735,6 +735,15 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) | |||
735 | cdrom_saw_media_change (drive); | 735 | cdrom_saw_media_change (drive); |
736 | /*printk("%s: media changed\n",drive->name);*/ | 736 | /*printk("%s: media changed\n",drive->name);*/ |
737 | return 0; | 737 | return 0; |
738 | } else if ((sense_key == ILLEGAL_REQUEST) && | ||
739 | (rq->cmd[0] == GPCMD_START_STOP_UNIT)) { | ||
740 | /* | ||
741 | * Don't print error message for this condition-- | ||
742 | * SFF8090i indicates that 5/24/00 is the correct | ||
743 | * response to a request to close the tray if the | ||
744 | * drive doesn't have that capability. | ||
745 | * cdrom_log_sense() knows this! | ||
746 | */ | ||
738 | } else if (!(rq->cmd_flags & REQ_QUIET)) { | 747 | } else if (!(rq->cmd_flags & REQ_QUIET)) { |
739 | /* Otherwise, print an error. */ | 748 | /* Otherwise, print an error. */ |
740 | ide_dump_status(drive, "packet command error", stat); | 749 | ide_dump_status(drive, "packet command error", stat); |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 0e0280076fcd..8670112f1d39 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -1226,6 +1226,7 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq) | |||
1226 | #endif | 1226 | #endif |
1227 | /* so that ide_timer_expiry knows what to do */ | 1227 | /* so that ide_timer_expiry knows what to do */ |
1228 | hwgroup->sleeping = 1; | 1228 | hwgroup->sleeping = 1; |
1229 | hwgroup->req_gen_timer = hwgroup->req_gen; | ||
1229 | mod_timer(&hwgroup->timer, sleep); | 1230 | mod_timer(&hwgroup->timer, sleep); |
1230 | /* we purposely leave hwgroup->busy==1 | 1231 | /* we purposely leave hwgroup->busy==1 |
1231 | * while sleeping */ | 1232 | * while sleeping */ |
@@ -1411,7 +1412,8 @@ void ide_timer_expiry (unsigned long data) | |||
1411 | 1412 | ||
1412 | spin_lock_irqsave(&ide_lock, flags); | 1413 | spin_lock_irqsave(&ide_lock, flags); |
1413 | 1414 | ||
1414 | if ((handler = hwgroup->handler) == NULL) { | 1415 | if (((handler = hwgroup->handler) == NULL) || |
1416 | (hwgroup->req_gen != hwgroup->req_gen_timer)) { | ||
1415 | /* | 1417 | /* |
1416 | * Either a marginal timeout occurred | 1418 | * Either a marginal timeout occurred |
1417 | * (got the interrupt just as timer expired), | 1419 | * (got the interrupt just as timer expired), |
@@ -1439,6 +1441,7 @@ void ide_timer_expiry (unsigned long data) | |||
1439 | if ((wait = expiry(drive)) > 0) { | 1441 | if ((wait = expiry(drive)) > 0) { |
1440 | /* reset timer */ | 1442 | /* reset timer */ |
1441 | hwgroup->timer.expires = jiffies + wait; | 1443 | hwgroup->timer.expires = jiffies + wait; |
1444 | hwgroup->req_gen_timer = hwgroup->req_gen; | ||
1442 | add_timer(&hwgroup->timer); | 1445 | add_timer(&hwgroup->timer); |
1443 | spin_unlock_irqrestore(&ide_lock, flags); | 1446 | spin_unlock_irqrestore(&ide_lock, flags); |
1444 | return; | 1447 | return; |
@@ -1653,6 +1656,7 @@ irqreturn_t ide_intr (int irq, void *dev_id) | |||
1653 | printk(KERN_ERR "%s: ide_intr: hwgroup->busy was 0 ??\n", drive->name); | 1656 | printk(KERN_ERR "%s: ide_intr: hwgroup->busy was 0 ??\n", drive->name); |
1654 | } | 1657 | } |
1655 | hwgroup->handler = NULL; | 1658 | hwgroup->handler = NULL; |
1659 | hwgroup->req_gen++; | ||
1656 | del_timer(&hwgroup->timer); | 1660 | del_timer(&hwgroup->timer); |
1657 | spin_unlock(&ide_lock); | 1661 | spin_unlock(&ide_lock); |
1658 | 1662 | ||
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 1ee53a551c3a..3caa176b3155 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -889,6 +889,7 @@ static void __ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, | |||
889 | hwgroup->handler = handler; | 889 | hwgroup->handler = handler; |
890 | hwgroup->expiry = expiry; | 890 | hwgroup->expiry = expiry; |
891 | hwgroup->timer.expires = jiffies + timeout; | 891 | hwgroup->timer.expires = jiffies + timeout; |
892 | hwgroup->req_gen_timer = hwgroup->req_gen; | ||
892 | add_timer(&hwgroup->timer); | 893 | add_timer(&hwgroup->timer); |
893 | } | 894 | } |
894 | 895 | ||
@@ -929,6 +930,7 @@ void ide_execute_command(ide_drive_t *drive, task_ioreg_t cmd, ide_handler_t *ha | |||
929 | hwgroup->handler = handler; | 930 | hwgroup->handler = handler; |
930 | hwgroup->expiry = expiry; | 931 | hwgroup->expiry = expiry; |
931 | hwgroup->timer.expires = jiffies + timeout; | 932 | hwgroup->timer.expires = jiffies + timeout; |
933 | hwgroup->req_gen_timer = hwgroup->req_gen; | ||
932 | add_timer(&hwgroup->timer); | 934 | add_timer(&hwgroup->timer); |
933 | hwif->OUTBSYNC(drive, cmd, IDE_COMMAND_REG); | 935 | hwif->OUTBSYNC(drive, cmd, IDE_COMMAND_REG); |
934 | /* Drive takes 400nS to respond, we must avoid the IRQ being | 936 | /* Drive takes 400nS to respond, we must avoid the IRQ being |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index a6f098fda884..ae5bf2be6f52 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -1962,6 +1962,8 @@ static char *media_string(ide_drive_t *drive) | |||
1962 | return "tape"; | 1962 | return "tape"; |
1963 | case ide_floppy: | 1963 | case ide_floppy: |
1964 | return "floppy"; | 1964 | return "floppy"; |
1965 | case ide_optical: | ||
1966 | return "optical"; | ||
1965 | default: | 1967 | default: |
1966 | return "UNKNOWN"; | 1968 | return "UNKNOWN"; |
1967 | } | 1969 | } |
diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c index 4a926f20b6ea..c32c21af3fdd 100644 --- a/drivers/net/sc92031.c +++ b/drivers/net/sc92031.c | |||
@@ -964,7 +964,7 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
964 | goto out; | 964 | goto out; |
965 | } | 965 | } |
966 | 966 | ||
967 | spin_lock_bh(&priv->lock); | 967 | spin_lock(&priv->lock); |
968 | 968 | ||
969 | if (unlikely(!netif_carrier_ok(dev))) { | 969 | if (unlikely(!netif_carrier_ok(dev))) { |
970 | err = -ENOLINK; | 970 | err = -ENOLINK; |
@@ -1005,7 +1005,7 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1005 | netif_stop_queue(dev); | 1005 | netif_stop_queue(dev); |
1006 | 1006 | ||
1007 | out_unlock: | 1007 | out_unlock: |
1008 | spin_unlock_bh(&priv->lock); | 1008 | spin_unlock(&priv->lock); |
1009 | 1009 | ||
1010 | out: | 1010 | out: |
1011 | dev_kfree_skb(skb); | 1011 | dev_kfree_skb(skb); |
@@ -1042,12 +1042,12 @@ static int sc92031_open(struct net_device *dev) | |||
1042 | priv->pm_config = 0; | 1042 | priv->pm_config = 0; |
1043 | 1043 | ||
1044 | /* Interrupts already disabled by sc92031_stop or sc92031_probe */ | 1044 | /* Interrupts already disabled by sc92031_stop or sc92031_probe */ |
1045 | spin_lock(&priv->lock); | 1045 | spin_lock_bh(&priv->lock); |
1046 | 1046 | ||
1047 | _sc92031_reset(dev); | 1047 | _sc92031_reset(dev); |
1048 | mmiowb(); | 1048 | mmiowb(); |
1049 | 1049 | ||
1050 | spin_unlock(&priv->lock); | 1050 | spin_unlock_bh(&priv->lock); |
1051 | sc92031_enable_interrupts(dev); | 1051 | sc92031_enable_interrupts(dev); |
1052 | 1052 | ||
1053 | if (netif_carrier_ok(dev)) | 1053 | if (netif_carrier_ok(dev)) |
@@ -1077,13 +1077,13 @@ static int sc92031_stop(struct net_device *dev) | |||
1077 | /* Disable interrupts, stop Tx and Rx. */ | 1077 | /* Disable interrupts, stop Tx and Rx. */ |
1078 | sc92031_disable_interrupts(dev); | 1078 | sc92031_disable_interrupts(dev); |
1079 | 1079 | ||
1080 | spin_lock(&priv->lock); | 1080 | spin_lock_bh(&priv->lock); |
1081 | 1081 | ||
1082 | _sc92031_disable_tx_rx(dev); | 1082 | _sc92031_disable_tx_rx(dev); |
1083 | _sc92031_tx_clear(dev); | 1083 | _sc92031_tx_clear(dev); |
1084 | mmiowb(); | 1084 | mmiowb(); |
1085 | 1085 | ||
1086 | spin_unlock(&priv->lock); | 1086 | spin_unlock_bh(&priv->lock); |
1087 | 1087 | ||
1088 | free_irq(pdev->irq, dev); | 1088 | free_irq(pdev->irq, dev); |
1089 | pci_free_consistent(pdev, TX_BUF_TOT_LEN, priv->tx_bufs, | 1089 | pci_free_consistent(pdev, TX_BUF_TOT_LEN, priv->tx_bufs, |
@@ -1539,13 +1539,13 @@ static int sc92031_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1539 | /* Disable interrupts, stop Tx and Rx. */ | 1539 | /* Disable interrupts, stop Tx and Rx. */ |
1540 | sc92031_disable_interrupts(dev); | 1540 | sc92031_disable_interrupts(dev); |
1541 | 1541 | ||
1542 | spin_lock(&priv->lock); | 1542 | spin_lock_bh(&priv->lock); |
1543 | 1543 | ||
1544 | _sc92031_disable_tx_rx(dev); | 1544 | _sc92031_disable_tx_rx(dev); |
1545 | _sc92031_tx_clear(dev); | 1545 | _sc92031_tx_clear(dev); |
1546 | mmiowb(); | 1546 | mmiowb(); |
1547 | 1547 | ||
1548 | spin_unlock(&priv->lock); | 1548 | spin_unlock_bh(&priv->lock); |
1549 | 1549 | ||
1550 | out: | 1550 | out: |
1551 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | 1551 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); |
@@ -1565,12 +1565,12 @@ static int sc92031_resume(struct pci_dev *pdev) | |||
1565 | goto out; | 1565 | goto out; |
1566 | 1566 | ||
1567 | /* Interrupts already disabled by sc92031_suspend */ | 1567 | /* Interrupts already disabled by sc92031_suspend */ |
1568 | spin_lock(&priv->lock); | 1568 | spin_lock_bh(&priv->lock); |
1569 | 1569 | ||
1570 | _sc92031_reset(dev); | 1570 | _sc92031_reset(dev); |
1571 | mmiowb(); | 1571 | mmiowb(); |
1572 | 1572 | ||
1573 | spin_unlock(&priv->lock); | 1573 | spin_unlock_bh(&priv->lock); |
1574 | sc92031_enable_interrupts(dev); | 1574 | sc92031_enable_interrupts(dev); |
1575 | 1575 | ||
1576 | netif_device_attach(dev); | 1576 | netif_device_attach(dev); |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 0acee9f324e9..256969e1300c 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -4834,8 +4834,10 @@ static int tg3_chip_reset(struct tg3 *tp) | |||
4834 | * sharing or irqpoll. | 4834 | * sharing or irqpoll. |
4835 | */ | 4835 | */ |
4836 | tp->tg3_flags |= TG3_FLAG_CHIP_RESETTING; | 4836 | tp->tg3_flags |= TG3_FLAG_CHIP_RESETTING; |
4837 | tp->hw_status->status = 0; | 4837 | if (tp->hw_status) { |
4838 | tp->hw_status->status_tag = 0; | 4838 | tp->hw_status->status = 0; |
4839 | tp->hw_status->status_tag = 0; | ||
4840 | } | ||
4839 | tp->last_tag = 0; | 4841 | tp->last_tag = 0; |
4840 | smp_mb(); | 4842 | smp_mb(); |
4841 | synchronize_irq(tp->pdev->irq); | 4843 | synchronize_irq(tp->pdev->irq); |
diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c index d77f75129f8a..2df216b00817 100644 --- a/drivers/pcmcia/omap_cf.c +++ b/drivers/pcmcia/omap_cf.c | |||
@@ -202,15 +202,14 @@ static struct pccard_operations omap_cf_ops = { | |||
202 | * "what chipselect is used". Boards could want more. | 202 | * "what chipselect is used". Boards could want more. |
203 | */ | 203 | */ |
204 | 204 | ||
205 | static int __devinit omap_cf_probe(struct device *dev) | 205 | static int __init omap_cf_probe(struct platform_device *pdev) |
206 | { | 206 | { |
207 | unsigned seg; | 207 | unsigned seg; |
208 | struct omap_cf_socket *cf; | 208 | struct omap_cf_socket *cf; |
209 | struct platform_device *pdev = to_platform_device(dev); | ||
210 | int irq; | 209 | int irq; |
211 | int status; | 210 | int status; |
212 | 211 | ||
213 | seg = (int) dev->platform_data; | 212 | seg = (int) pdev->dev.platform_data; |
214 | if (seg == 0 || seg > 3) | 213 | if (seg == 0 || seg > 3) |
215 | return -ENODEV; | 214 | return -ENODEV; |
216 | 215 | ||
@@ -227,7 +226,7 @@ static int __devinit omap_cf_probe(struct device *dev) | |||
227 | cf->timer.data = (unsigned long) cf; | 226 | cf->timer.data = (unsigned long) cf; |
228 | 227 | ||
229 | cf->pdev = pdev; | 228 | cf->pdev = pdev; |
230 | dev_set_drvdata(dev, cf); | 229 | platform_set_drvdata(pdev, cf); |
231 | 230 | ||
232 | /* this primarily just shuts up irq handling noise */ | 231 | /* this primarily just shuts up irq handling noise */ |
233 | status = request_irq(irq, omap_cf_irq, IRQF_SHARED, | 232 | status = request_irq(irq, omap_cf_irq, IRQF_SHARED, |
@@ -291,7 +290,7 @@ static int __devinit omap_cf_probe(struct device *dev) | |||
291 | omap_cf_present() ? "present" : "(not present)"); | 290 | omap_cf_present() ? "present" : "(not present)"); |
292 | 291 | ||
293 | cf->socket.owner = THIS_MODULE; | 292 | cf->socket.owner = THIS_MODULE; |
294 | cf->socket.dev.parent = dev; | 293 | cf->socket.dev.parent = &pdev->dev; |
295 | cf->socket.ops = &omap_cf_ops; | 294 | cf->socket.ops = &omap_cf_ops; |
296 | cf->socket.resource_ops = &pccard_static_ops; | 295 | cf->socket.resource_ops = &pccard_static_ops; |
297 | cf->socket.features = SS_CAP_PCCARD | SS_CAP_STATIC_MAP | 296 | cf->socket.features = SS_CAP_PCCARD | SS_CAP_STATIC_MAP |
@@ -318,9 +317,9 @@ fail0: | |||
318 | return status; | 317 | return status; |
319 | } | 318 | } |
320 | 319 | ||
321 | static int __devexit omap_cf_remove(struct device *dev) | 320 | static int __exit omap_cf_remove(struct platform_device *pdev) |
322 | { | 321 | { |
323 | struct omap_cf_socket *cf = dev_get_drvdata(dev); | 322 | struct omap_cf_socket *cf = platform_get_drvdata(pdev); |
324 | 323 | ||
325 | cf->active = 0; | 324 | cf->active = 0; |
326 | pcmcia_unregister_socket(&cf->socket); | 325 | pcmcia_unregister_socket(&cf->socket); |
@@ -332,26 +331,36 @@ static int __devexit omap_cf_remove(struct device *dev) | |||
332 | return 0; | 331 | return 0; |
333 | } | 332 | } |
334 | 333 | ||
335 | static struct device_driver omap_cf_driver = { | 334 | static int omap_cf_suspend(struct platform_device *pdev, pm_message_t mesg) |
336 | .name = (char *) driver_name, | 335 | { |
337 | .bus = &platform_bus_type, | 336 | return pcmcia_socket_dev_suspend(&pdev->dev, mesg); |
338 | .probe = omap_cf_probe, | 337 | } |
339 | .remove = __devexit_p(omap_cf_remove), | 338 | |
340 | .suspend = pcmcia_socket_dev_suspend, | 339 | static int omap_cf_resume(struct platform_device *pdev) |
341 | .resume = pcmcia_socket_dev_resume, | 340 | { |
341 | return pcmcia_socket_dev_resume(&pdev->dev); | ||
342 | } | ||
343 | |||
344 | static struct platform_driver omap_cf_driver = { | ||
345 | .driver = { | ||
346 | .name = (char *) driver_name, | ||
347 | }, | ||
348 | .remove = __exit_p(omap_cf_remove), | ||
349 | .suspend = omap_cf_suspend, | ||
350 | .resume = omap_cf_resume, | ||
342 | }; | 351 | }; |
343 | 352 | ||
344 | static int __init omap_cf_init(void) | 353 | static int __init omap_cf_init(void) |
345 | { | 354 | { |
346 | if (cpu_is_omap16xx()) | 355 | if (cpu_is_omap16xx()) |
347 | return driver_register(&omap_cf_driver); | 356 | return platform_driver_probe(&omap_cf_driver, omap_cf_probe); |
348 | return -ENODEV; | 357 | return -ENODEV; |
349 | } | 358 | } |
350 | 359 | ||
351 | static void __exit omap_cf_exit(void) | 360 | static void __exit omap_cf_exit(void) |
352 | { | 361 | { |
353 | if (cpu_is_omap16xx()) | 362 | if (cpu_is_omap16xx()) |
354 | driver_unregister(&omap_cf_driver); | 363 | platform_driver_unregister(&omap_cf_driver); |
355 | } | 364 | } |
356 | 365 | ||
357 | module_init(omap_cf_init); | 366 | module_init(omap_cf_init); |