diff options
Diffstat (limited to 'drivers/char')
37 files changed, 134 insertions, 140 deletions
diff --git a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c index ba54b5872578..b02fc2267159 100644 --- a/drivers/char/agp/ali-agp.c +++ b/drivers/char/agp/ali-agp.c | |||
@@ -389,7 +389,6 @@ static struct pci_device_id agp_ali_pci_table[] = { | |||
389 | MODULE_DEVICE_TABLE(pci, agp_ali_pci_table); | 389 | MODULE_DEVICE_TABLE(pci, agp_ali_pci_table); |
390 | 390 | ||
391 | static struct pci_driver agp_ali_pci_driver = { | 391 | static struct pci_driver agp_ali_pci_driver = { |
392 | .owner = THIS_MODULE, | ||
393 | .name = "agpgart-ali", | 392 | .name = "agpgart-ali", |
394 | .id_table = agp_ali_pci_table, | 393 | .id_table = agp_ali_pci_table, |
395 | .probe = agp_ali_probe, | 394 | .probe = agp_ali_probe, |
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c index 40fcd88b2cea..1f776651ac64 100644 --- a/drivers/char/agp/amd-k7-agp.c +++ b/drivers/char/agp/amd-k7-agp.c | |||
@@ -515,7 +515,6 @@ static struct pci_device_id agp_amdk7_pci_table[] = { | |||
515 | MODULE_DEVICE_TABLE(pci, agp_amdk7_pci_table); | 515 | MODULE_DEVICE_TABLE(pci, agp_amdk7_pci_table); |
516 | 516 | ||
517 | static struct pci_driver agp_amdk7_pci_driver = { | 517 | static struct pci_driver agp_amdk7_pci_driver = { |
518 | .owner = THIS_MODULE, | ||
519 | .name = "agpgart-amdk7", | 518 | .name = "agpgart-amdk7", |
520 | .id_table = agp_amdk7_pci_table, | 519 | .id_table = agp_amdk7_pci_table, |
521 | .probe = agp_amdk7_probe, | 520 | .probe = agp_amdk7_probe, |
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 8f748fddca94..78ce98a69f37 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
@@ -703,7 +703,6 @@ static struct pci_device_id agp_amd64_pci_table[] = { | |||
703 | MODULE_DEVICE_TABLE(pci, agp_amd64_pci_table); | 703 | MODULE_DEVICE_TABLE(pci, agp_amd64_pci_table); |
704 | 704 | ||
705 | static struct pci_driver agp_amd64_pci_driver = { | 705 | static struct pci_driver agp_amd64_pci_driver = { |
706 | .owner = THIS_MODULE, | ||
707 | .name = "agpgart-amd64", | 706 | .name = "agpgart-amd64", |
708 | .id_table = agp_amd64_pci_table, | 707 | .id_table = agp_amd64_pci_table, |
709 | .probe = agp_amd64_probe, | 708 | .probe = agp_amd64_probe, |
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c index fbd415565463..53372a83b675 100644 --- a/drivers/char/agp/ati-agp.c +++ b/drivers/char/agp/ati-agp.c | |||
@@ -521,7 +521,6 @@ static struct pci_device_id agp_ati_pci_table[] = { | |||
521 | MODULE_DEVICE_TABLE(pci, agp_ati_pci_table); | 521 | MODULE_DEVICE_TABLE(pci, agp_ati_pci_table); |
522 | 522 | ||
523 | static struct pci_driver agp_ati_pci_driver = { | 523 | static struct pci_driver agp_ati_pci_driver = { |
524 | .owner = THIS_MODULE, | ||
525 | .name = "agpgart-ati", | 524 | .name = "agpgart-ati", |
526 | .id_table = agp_ati_pci_table, | 525 | .id_table = agp_ati_pci_table, |
527 | .probe = agp_ati_probe, | 526 | .probe = agp_ati_probe, |
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c index 73f333f491bd..27bca34b4a65 100644 --- a/drivers/char/agp/backend.c +++ b/drivers/char/agp/backend.c | |||
@@ -147,6 +147,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge) | |||
147 | printk(KERN_ERR PFX "unable to get memory for scratch page.\n"); | 147 | printk(KERN_ERR PFX "unable to get memory for scratch page.\n"); |
148 | return -ENOMEM; | 148 | return -ENOMEM; |
149 | } | 149 | } |
150 | flush_agp_mappings(); | ||
150 | 151 | ||
151 | bridge->scratch_page_real = virt_to_gart(addr); | 152 | bridge->scratch_page_real = virt_to_gart(addr); |
152 | bridge->scratch_page = | 153 | bridge->scratch_page = |
@@ -187,9 +188,11 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge) | |||
187 | return 0; | 188 | return 0; |
188 | 189 | ||
189 | err_out: | 190 | err_out: |
190 | if (bridge->driver->needs_scratch_page) | 191 | if (bridge->driver->needs_scratch_page) { |
191 | bridge->driver->agp_destroy_page( | 192 | bridge->driver->agp_destroy_page( |
192 | gart_to_virt(bridge->scratch_page_real)); | 193 | gart_to_virt(bridge->scratch_page_real)); |
194 | flush_agp_mappings(); | ||
195 | } | ||
193 | if (got_gatt) | 196 | if (got_gatt) |
194 | bridge->driver->free_gatt_table(bridge); | 197 | bridge->driver->free_gatt_table(bridge); |
195 | if (got_keylist) { | 198 | if (got_keylist) { |
@@ -211,9 +214,11 @@ static void agp_backend_cleanup(struct agp_bridge_data *bridge) | |||
211 | bridge->key_list = NULL; | 214 | bridge->key_list = NULL; |
212 | 215 | ||
213 | if (bridge->driver->agp_destroy_page && | 216 | if (bridge->driver->agp_destroy_page && |
214 | bridge->driver->needs_scratch_page) | 217 | bridge->driver->needs_scratch_page) { |
215 | bridge->driver->agp_destroy_page( | 218 | bridge->driver->agp_destroy_page( |
216 | gart_to_virt(bridge->scratch_page_real)); | 219 | gart_to_virt(bridge->scratch_page_real)); |
220 | flush_agp_mappings(); | ||
221 | } | ||
217 | } | 222 | } |
218 | 223 | ||
219 | /* When we remove the global variable agp_bridge from all drivers | 224 | /* When we remove the global variable agp_bridge from all drivers |
diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c index d41e0a62e32e..e7aea77a60f9 100644 --- a/drivers/char/agp/efficeon-agp.c +++ b/drivers/char/agp/efficeon-agp.c | |||
@@ -429,7 +429,6 @@ static struct pci_device_id agp_efficeon_pci_table[] = { | |||
429 | MODULE_DEVICE_TABLE(pci, agp_efficeon_pci_table); | 429 | MODULE_DEVICE_TABLE(pci, agp_efficeon_pci_table); |
430 | 430 | ||
431 | static struct pci_driver agp_efficeon_pci_driver = { | 431 | static struct pci_driver agp_efficeon_pci_driver = { |
432 | .owner = THIS_MODULE, | ||
433 | .name = "agpgart-efficeon", | 432 | .name = "agpgart-efficeon", |
434 | .id_table = agp_efficeon_pci_table, | 433 | .id_table = agp_efficeon_pci_table, |
435 | .probe = agp_efficeon_probe, | 434 | .probe = agp_efficeon_probe, |
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c index c4a38715c6f9..5567ce8d72b0 100644 --- a/drivers/char/agp/generic.c +++ b/drivers/char/agp/generic.c | |||
@@ -57,7 +57,8 @@ int map_page_into_agp(struct page *page) | |||
57 | { | 57 | { |
58 | int i; | 58 | int i; |
59 | i = change_page_attr(page, 1, PAGE_KERNEL_NOCACHE); | 59 | i = change_page_attr(page, 1, PAGE_KERNEL_NOCACHE); |
60 | global_flush_tlb(); | 60 | /* Caller's responsibility to call global_flush_tlb() for |
61 | * performance reasons */ | ||
61 | return i; | 62 | return i; |
62 | } | 63 | } |
63 | EXPORT_SYMBOL_GPL(map_page_into_agp); | 64 | EXPORT_SYMBOL_GPL(map_page_into_agp); |
@@ -66,7 +67,8 @@ int unmap_page_from_agp(struct page *page) | |||
66 | { | 67 | { |
67 | int i; | 68 | int i; |
68 | i = change_page_attr(page, 1, PAGE_KERNEL); | 69 | i = change_page_attr(page, 1, PAGE_KERNEL); |
69 | global_flush_tlb(); | 70 | /* Caller's responsibility to call global_flush_tlb() for |
71 | * performance reasons */ | ||
70 | return i; | 72 | return i; |
71 | } | 73 | } |
72 | EXPORT_SYMBOL_GPL(unmap_page_from_agp); | 74 | EXPORT_SYMBOL_GPL(unmap_page_from_agp); |
@@ -153,6 +155,7 @@ void agp_free_memory(struct agp_memory *curr) | |||
153 | for (i = 0; i < curr->page_count; i++) { | 155 | for (i = 0; i < curr->page_count; i++) { |
154 | curr->bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[i])); | 156 | curr->bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[i])); |
155 | } | 157 | } |
158 | flush_agp_mappings(); | ||
156 | } | 159 | } |
157 | agp_free_key(curr->key); | 160 | agp_free_key(curr->key); |
158 | vfree(curr->memory); | 161 | vfree(curr->memory); |
@@ -210,7 +213,7 @@ struct agp_memory *agp_allocate_memory(struct agp_bridge_data *bridge, | |||
210 | new->memory[i] = virt_to_gart(addr); | 213 | new->memory[i] = virt_to_gart(addr); |
211 | new->page_count++; | 214 | new->page_count++; |
212 | } | 215 | } |
213 | new->bridge = bridge; | 216 | new->bridge = bridge; |
214 | 217 | ||
215 | flush_agp_mappings(); | 218 | flush_agp_mappings(); |
216 | 219 | ||
diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c index 58944cd271ea..8ee19a4a6bce 100644 --- a/drivers/char/agp/i460-agp.c +++ b/drivers/char/agp/i460-agp.c | |||
@@ -111,8 +111,10 @@ static int i460_fetch_size (void) | |||
111 | 111 | ||
112 | if (i460.io_page_shift != I460_IO_PAGE_SHIFT) { | 112 | if (i460.io_page_shift != I460_IO_PAGE_SHIFT) { |
113 | printk(KERN_ERR PFX | 113 | printk(KERN_ERR PFX |
114 | "I/O (GART) page-size %ZuKB doesn't match expected size %ZuKB\n", | 114 | "I/O (GART) page-size %luKB doesn't match expected " |
115 | 1UL << (i460.io_page_shift - 10), 1UL << (I460_IO_PAGE_SHIFT)); | 115 | "size %luKB\n", |
116 | 1UL << (i460.io_page_shift - 10), | ||
117 | 1UL << (I460_IO_PAGE_SHIFT)); | ||
116 | return 0; | 118 | return 0; |
117 | } | 119 | } |
118 | 120 | ||
@@ -514,9 +516,10 @@ static void *i460_alloc_page (struct agp_bridge_data *bridge) | |||
514 | { | 516 | { |
515 | void *page; | 517 | void *page; |
516 | 518 | ||
517 | if (I460_IO_PAGE_SHIFT <= PAGE_SHIFT) | 519 | if (I460_IO_PAGE_SHIFT <= PAGE_SHIFT) { |
518 | page = agp_generic_alloc_page(agp_bridge); | 520 | page = agp_generic_alloc_page(agp_bridge); |
519 | else | 521 | global_flush_tlb(); |
522 | } else | ||
520 | /* Returning NULL would cause problems */ | 523 | /* Returning NULL would cause problems */ |
521 | /* AK: really dubious code. */ | 524 | /* AK: really dubious code. */ |
522 | page = (void *)~0UL; | 525 | page = (void *)~0UL; |
@@ -525,8 +528,10 @@ static void *i460_alloc_page (struct agp_bridge_data *bridge) | |||
525 | 528 | ||
526 | static void i460_destroy_page (void *page) | 529 | static void i460_destroy_page (void *page) |
527 | { | 530 | { |
528 | if (I460_IO_PAGE_SHIFT <= PAGE_SHIFT) | 531 | if (I460_IO_PAGE_SHIFT <= PAGE_SHIFT) { |
529 | agp_generic_destroy_page(page); | 532 | agp_generic_destroy_page(page); |
533 | global_flush_tlb(); | ||
534 | } | ||
530 | } | 535 | } |
531 | 536 | ||
532 | #endif /* I460_LARGE_IO_PAGES */ | 537 | #endif /* I460_LARGE_IO_PAGES */ |
@@ -536,7 +541,7 @@ static unsigned long i460_mask_memory (struct agp_bridge_data *bridge, | |||
536 | { | 541 | { |
537 | /* Make sure the returned address is a valid GATT entry */ | 542 | /* Make sure the returned address is a valid GATT entry */ |
538 | return bridge->driver->masks[0].mask | 543 | return bridge->driver->masks[0].mask |
539 | | (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xffffff000) >> 12); | 544 | | (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xfffff000) >> 12); |
540 | } | 545 | } |
541 | 546 | ||
542 | struct agp_bridge_driver intel_i460_driver = { | 547 | struct agp_bridge_driver intel_i460_driver = { |
@@ -617,7 +622,6 @@ static struct pci_device_id agp_intel_i460_pci_table[] = { | |||
617 | MODULE_DEVICE_TABLE(pci, agp_intel_i460_pci_table); | 622 | MODULE_DEVICE_TABLE(pci, agp_intel_i460_pci_table); |
618 | 623 | ||
619 | static struct pci_driver agp_intel_i460_pci_driver = { | 624 | static struct pci_driver agp_intel_i460_pci_driver = { |
620 | .owner = THIS_MODULE, | ||
621 | .name = "agpgart-intel-i460", | 625 | .name = "agpgart-intel-i460", |
622 | .id_table = agp_intel_i460_pci_table, | 626 | .id_table = agp_intel_i460_pci_table, |
623 | .probe = agp_intel_i460_probe, | 627 | .probe = agp_intel_i460_probe, |
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index bf4cc9ffd5b1..e7bed5047dcc 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -270,6 +270,7 @@ static struct agp_memory *alloc_agpphysmem_i8xx(size_t pg_count, int type) | |||
270 | 270 | ||
271 | switch (pg_count) { | 271 | switch (pg_count) { |
272 | case 1: addr = agp_bridge->driver->agp_alloc_page(agp_bridge); | 272 | case 1: addr = agp_bridge->driver->agp_alloc_page(agp_bridge); |
273 | global_flush_tlb(); | ||
273 | break; | 274 | break; |
274 | case 4: | 275 | case 4: |
275 | /* kludge to get 4 physical pages for ARGB cursor */ | 276 | /* kludge to get 4 physical pages for ARGB cursor */ |
@@ -330,9 +331,11 @@ static void intel_i810_free_by_type(struct agp_memory *curr) | |||
330 | if(curr->type == AGP_PHYS_MEMORY) { | 331 | if(curr->type == AGP_PHYS_MEMORY) { |
331 | if (curr->page_count == 4) | 332 | if (curr->page_count == 4) |
332 | i8xx_destroy_pages(gart_to_virt(curr->memory[0])); | 333 | i8xx_destroy_pages(gart_to_virt(curr->memory[0])); |
333 | else | 334 | else { |
334 | agp_bridge->driver->agp_destroy_page( | 335 | agp_bridge->driver->agp_destroy_page( |
335 | gart_to_virt(curr->memory[0])); | 336 | gart_to_virt(curr->memory[0])); |
337 | global_flush_tlb(); | ||
338 | } | ||
336 | vfree(curr->memory); | 339 | vfree(curr->memory); |
337 | } | 340 | } |
338 | kfree(curr); | 341 | kfree(curr); |
@@ -1824,7 +1827,6 @@ static struct pci_device_id agp_intel_pci_table[] = { | |||
1824 | MODULE_DEVICE_TABLE(pci, agp_intel_pci_table); | 1827 | MODULE_DEVICE_TABLE(pci, agp_intel_pci_table); |
1825 | 1828 | ||
1826 | static struct pci_driver agp_intel_pci_driver = { | 1829 | static struct pci_driver agp_intel_pci_driver = { |
1827 | .owner = THIS_MODULE, | ||
1828 | .name = "agpgart-intel", | 1830 | .name = "agpgart-intel", |
1829 | .id_table = agp_intel_pci_table, | 1831 | .id_table = agp_intel_pci_table, |
1830 | .probe = agp_intel_probe, | 1832 | .probe = agp_intel_probe, |
diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c index 3aed0c5e2f92..80dafa3030bd 100644 --- a/drivers/char/agp/nvidia-agp.c +++ b/drivers/char/agp/nvidia-agp.c | |||
@@ -398,7 +398,6 @@ static struct pci_device_id agp_nvidia_pci_table[] = { | |||
398 | MODULE_DEVICE_TABLE(pci, agp_nvidia_pci_table); | 398 | MODULE_DEVICE_TABLE(pci, agp_nvidia_pci_table); |
399 | 399 | ||
400 | static struct pci_driver agp_nvidia_pci_driver = { | 400 | static struct pci_driver agp_nvidia_pci_driver = { |
401 | .owner = THIS_MODULE, | ||
402 | .name = "agpgart-nvidia", | 401 | .name = "agpgart-nvidia", |
403 | .id_table = agp_nvidia_pci_table, | 402 | .id_table = agp_nvidia_pci_table, |
404 | .probe = agp_nvidia_probe, | 403 | .probe = agp_nvidia_probe, |
diff --git a/drivers/char/agp/sis-agp.c b/drivers/char/agp/sis-agp.c index a701361a8890..ebc05554045c 100644 --- a/drivers/char/agp/sis-agp.c +++ b/drivers/char/agp/sis-agp.c | |||
@@ -332,7 +332,6 @@ static struct pci_device_id agp_sis_pci_table[] = { | |||
332 | MODULE_DEVICE_TABLE(pci, agp_sis_pci_table); | 332 | MODULE_DEVICE_TABLE(pci, agp_sis_pci_table); |
333 | 333 | ||
334 | static struct pci_driver agp_sis_pci_driver = { | 334 | static struct pci_driver agp_sis_pci_driver = { |
335 | .owner = THIS_MODULE, | ||
336 | .name = "agpgart-sis", | 335 | .name = "agpgart-sis", |
337 | .id_table = agp_sis_pci_table, | 336 | .id_table = agp_sis_pci_table, |
338 | .probe = agp_sis_probe, | 337 | .probe = agp_sis_probe, |
diff --git a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c index 5a5392dd1254..3f8f7fa6b0ff 100644 --- a/drivers/char/agp/sworks-agp.c +++ b/drivers/char/agp/sworks-agp.c | |||
@@ -545,7 +545,6 @@ static struct pci_device_id agp_serverworks_pci_table[] = { | |||
545 | MODULE_DEVICE_TABLE(pci, agp_serverworks_pci_table); | 545 | MODULE_DEVICE_TABLE(pci, agp_serverworks_pci_table); |
546 | 546 | ||
547 | static struct pci_driver agp_serverworks_pci_driver = { | 547 | static struct pci_driver agp_serverworks_pci_driver = { |
548 | .owner = THIS_MODULE, | ||
549 | .name = "agpgart-serverworks", | 548 | .name = "agpgart-serverworks", |
550 | .id_table = agp_serverworks_pci_table, | 549 | .id_table = agp_serverworks_pci_table, |
551 | .probe = agp_serverworks_probe, | 550 | .probe = agp_serverworks_probe, |
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c index 183c50acab27..c8255312b8c1 100644 --- a/drivers/char/agp/uninorth-agp.c +++ b/drivers/char/agp/uninorth-agp.c | |||
@@ -658,7 +658,6 @@ static struct pci_device_id agp_uninorth_pci_table[] = { | |||
658 | MODULE_DEVICE_TABLE(pci, agp_uninorth_pci_table); | 658 | MODULE_DEVICE_TABLE(pci, agp_uninorth_pci_table); |
659 | 659 | ||
660 | static struct pci_driver agp_uninorth_pci_driver = { | 660 | static struct pci_driver agp_uninorth_pci_driver = { |
661 | .owner = THIS_MODULE, | ||
662 | .name = "agpgart-uninorth", | 661 | .name = "agpgart-uninorth", |
663 | .id_table = agp_uninorth_pci_table, | 662 | .id_table = agp_uninorth_pci_table, |
664 | .probe = agp_uninorth_probe, | 663 | .probe = agp_uninorth_probe, |
diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c index 5d9a13700074..c847df575cf5 100644 --- a/drivers/char/agp/via-agp.c +++ b/drivers/char/agp/via-agp.c | |||
@@ -518,7 +518,6 @@ MODULE_DEVICE_TABLE(pci, agp_via_pci_table); | |||
518 | 518 | ||
519 | 519 | ||
520 | static struct pci_driver agp_via_pci_driver = { | 520 | static struct pci_driver agp_via_pci_driver = { |
521 | .owner = THIS_MODULE, | ||
522 | .name = "agpgart-via", | 521 | .name = "agpgart-via", |
523 | .id_table = agp_via_pci_table, | 522 | .id_table = agp_via_pci_table, |
524 | .probe = agp_via_probe, | 523 | .probe = agp_via_probe, |
diff --git a/drivers/char/drm/ati_pcigart.c b/drivers/char/drm/ati_pcigart.c index 6d3fec160bff..efff0eec618c 100644 --- a/drivers/char/drm/ati_pcigart.c +++ b/drivers/char/drm/ati_pcigart.c | |||
@@ -203,10 +203,10 @@ int drm_ati_pcigart_init(drm_device_t * dev, drm_ati_pcigart_info * gart_info) | |||
203 | 203 | ||
204 | for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) { | 204 | for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) { |
205 | if (gart_info->is_pcie) | 205 | if (gart_info->is_pcie) |
206 | *pci_gart = (cpu_to_le32(page_base) >> 8) | 0xc; | 206 | *pci_gart = cpu_to_le32((page_base >> 8) | 0xc); |
207 | else | 207 | else |
208 | *pci_gart = cpu_to_le32(page_base); | 208 | *pci_gart = cpu_to_le32(page_base); |
209 | *pci_gart++; | 209 | pci_gart++; |
210 | page_base += ATI_PCIGART_PAGE_SIZE; | 210 | page_base += ATI_PCIGART_PAGE_SIZE; |
211 | } | 211 | } |
212 | } | 212 | } |
diff --git a/drivers/char/epca.c b/drivers/char/epca.c index b7a0e4d6b934..407708a001e4 100644 --- a/drivers/char/epca.c +++ b/drivers/char/epca.c | |||
@@ -3113,7 +3113,6 @@ MODULE_DEVICE_TABLE(pci, epca_pci_tbl); | |||
3113 | int __init init_PCI (void) | 3113 | int __init init_PCI (void) |
3114 | { /* Begin init_PCI */ | 3114 | { /* Begin init_PCI */ |
3115 | memset (&epca_driver, 0, sizeof (epca_driver)); | 3115 | memset (&epca_driver, 0, sizeof (epca_driver)); |
3116 | epca_driver.owner = THIS_MODULE; | ||
3117 | epca_driver.name = "epca"; | 3116 | epca_driver.name = "epca"; |
3118 | epca_driver.id_table = epca_pci_tbl; | 3117 | epca_driver.id_table = epca_pci_tbl; |
3119 | epca_driver.probe = epca_init_one; | 3118 | epca_driver.probe = epca_init_one; |
diff --git a/drivers/char/ip2.c b/drivers/char/ip2.c index 6cd12f23aa58..7cadfc6ef352 100644 --- a/drivers/char/ip2.c +++ b/drivers/char/ip2.c | |||
@@ -7,7 +7,6 @@ | |||
7 | // | 7 | // |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/version.h> | ||
11 | #include <linux/init.h> | 10 | #include <linux/init.h> |
12 | #include <linux/wait.h> | 11 | #include <linux/wait.h> |
13 | 12 | ||
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index c1d06ba449b6..d16bd4b5c117 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -2648,7 +2648,7 @@ void ipmi_smi_msg_received(ipmi_smi_t intf, | |||
2648 | spin_lock_irqsave(&intf->waiting_msgs_lock, flags); | 2648 | spin_lock_irqsave(&intf->waiting_msgs_lock, flags); |
2649 | if (!list_empty(&intf->waiting_msgs)) { | 2649 | if (!list_empty(&intf->waiting_msgs)) { |
2650 | list_add_tail(&msg->link, &intf->waiting_msgs); | 2650 | list_add_tail(&msg->link, &intf->waiting_msgs); |
2651 | spin_unlock(&intf->waiting_msgs_lock); | 2651 | spin_unlock_irqrestore(&intf->waiting_msgs_lock, flags); |
2652 | goto out; | 2652 | goto out; |
2653 | } | 2653 | } |
2654 | spin_unlock_irqrestore(&intf->waiting_msgs_lock, flags); | 2654 | spin_unlock_irqrestore(&intf->waiting_msgs_lock, flags); |
@@ -2657,9 +2657,9 @@ void ipmi_smi_msg_received(ipmi_smi_t intf, | |||
2657 | if (rv > 0) { | 2657 | if (rv > 0) { |
2658 | /* Could not handle the message now, just add it to a | 2658 | /* Could not handle the message now, just add it to a |
2659 | list to handle later. */ | 2659 | list to handle later. */ |
2660 | spin_lock(&intf->waiting_msgs_lock); | 2660 | spin_lock_irqsave(&intf->waiting_msgs_lock, flags); |
2661 | list_add_tail(&msg->link, &intf->waiting_msgs); | 2661 | list_add_tail(&msg->link, &intf->waiting_msgs); |
2662 | spin_unlock(&intf->waiting_msgs_lock); | 2662 | spin_unlock_irqrestore(&intf->waiting_msgs_lock, flags); |
2663 | } else if (rv == 0) { | 2663 | } else if (rv == 0) { |
2664 | ipmi_free_smi_msg(msg); | 2664 | ipmi_free_smi_msg(msg); |
2665 | } | 2665 | } |
diff --git a/drivers/char/mwave/tp3780i.c b/drivers/char/mwave/tp3780i.c index d6c72e0934e2..cc3e54dd7234 100644 --- a/drivers/char/mwave/tp3780i.c +++ b/drivers/char/mwave/tp3780i.c | |||
@@ -46,7 +46,6 @@ | |||
46 | * First release to the public | 46 | * First release to the public |
47 | */ | 47 | */ |
48 | 48 | ||
49 | #include <linux/version.h> | ||
50 | #include <linux/interrupt.h> | 49 | #include <linux/interrupt.h> |
51 | #include <linux/kernel.h> | 50 | #include <linux/kernel.h> |
52 | #include <linux/ptrace.h> | 51 | #include <linux/ptrace.h> |
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 3b965a651da4..26448f176803 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c | |||
@@ -38,7 +38,6 @@ | |||
38 | 38 | ||
39 | #include <linux/config.h> | 39 | #include <linux/config.h> |
40 | #include <linux/module.h> | 40 | #include <linux/module.h> |
41 | #include <linux/version.h> | ||
42 | #include <linux/autoconf.h> | 41 | #include <linux/autoconf.h> |
43 | #include <linux/errno.h> | 42 | #include <linux/errno.h> |
44 | #include <linux/signal.h> | 43 | #include <linux/signal.h> |
diff --git a/drivers/char/s3c2410-rtc.c b/drivers/char/s3c2410-rtc.c index d724c0de4f28..3df7a574267b 100644 --- a/drivers/char/s3c2410-rtc.c +++ b/drivers/char/s3c2410-rtc.c | |||
@@ -382,7 +382,7 @@ static struct rtc_ops s3c2410_rtcops = { | |||
382 | .proc = s3c2410_rtc_proc, | 382 | .proc = s3c2410_rtc_proc, |
383 | }; | 383 | }; |
384 | 384 | ||
385 | static void s3c2410_rtc_enable(struct device *dev, int en) | 385 | static void s3c2410_rtc_enable(struct platform_device *pdev, int en) |
386 | { | 386 | { |
387 | unsigned int tmp; | 387 | unsigned int tmp; |
388 | 388 | ||
@@ -399,21 +399,21 @@ static void s3c2410_rtc_enable(struct device *dev, int en) | |||
399 | /* re-enable the device, and check it is ok */ | 399 | /* re-enable the device, and check it is ok */ |
400 | 400 | ||
401 | if ((readb(S3C2410_RTCCON) & S3C2410_RTCCON_RTCEN) == 0){ | 401 | if ((readb(S3C2410_RTCCON) & S3C2410_RTCCON_RTCEN) == 0){ |
402 | dev_info(dev, "rtc disabled, re-enabling\n"); | 402 | dev_info(&pdev->dev, "rtc disabled, re-enabling\n"); |
403 | 403 | ||
404 | tmp = readb(S3C2410_RTCCON); | 404 | tmp = readb(S3C2410_RTCCON); |
405 | writeb(tmp | S3C2410_RTCCON_RTCEN , S3C2410_RTCCON); | 405 | writeb(tmp | S3C2410_RTCCON_RTCEN , S3C2410_RTCCON); |
406 | } | 406 | } |
407 | 407 | ||
408 | if ((readb(S3C2410_RTCCON) & S3C2410_RTCCON_CNTSEL)){ | 408 | if ((readb(S3C2410_RTCCON) & S3C2410_RTCCON_CNTSEL)){ |
409 | dev_info(dev, "removing S3C2410_RTCCON_CNTSEL\n"); | 409 | dev_info(&pdev->dev, "removing S3C2410_RTCCON_CNTSEL\n"); |
410 | 410 | ||
411 | tmp = readb(S3C2410_RTCCON); | 411 | tmp = readb(S3C2410_RTCCON); |
412 | writeb(tmp& ~S3C2410_RTCCON_CNTSEL , S3C2410_RTCCON); | 412 | writeb(tmp& ~S3C2410_RTCCON_CNTSEL , S3C2410_RTCCON); |
413 | } | 413 | } |
414 | 414 | ||
415 | if ((readb(S3C2410_RTCCON) & S3C2410_RTCCON_CLKRST)){ | 415 | if ((readb(S3C2410_RTCCON) & S3C2410_RTCCON_CLKRST)){ |
416 | dev_info(dev, "removing S3C2410_RTCCON_CLKRST\n"); | 416 | dev_info(&pdev->dev, "removing S3C2410_RTCCON_CLKRST\n"); |
417 | 417 | ||
418 | tmp = readb(S3C2410_RTCCON); | 418 | tmp = readb(S3C2410_RTCCON); |
419 | writeb(tmp & ~S3C2410_RTCCON_CLKRST, S3C2410_RTCCON); | 419 | writeb(tmp & ~S3C2410_RTCCON_CLKRST, S3C2410_RTCCON); |
@@ -421,7 +421,7 @@ static void s3c2410_rtc_enable(struct device *dev, int en) | |||
421 | } | 421 | } |
422 | } | 422 | } |
423 | 423 | ||
424 | static int s3c2410_rtc_remove(struct device *dev) | 424 | static int s3c2410_rtc_remove(struct platform_device *dev) |
425 | { | 425 | { |
426 | unregister_rtc(&s3c2410_rtcops); | 426 | unregister_rtc(&s3c2410_rtcops); |
427 | 427 | ||
@@ -438,25 +438,24 @@ static int s3c2410_rtc_remove(struct device *dev) | |||
438 | return 0; | 438 | return 0; |
439 | } | 439 | } |
440 | 440 | ||
441 | static int s3c2410_rtc_probe(struct device *dev) | 441 | static int s3c2410_rtc_probe(struct platform_device *pdev) |
442 | { | 442 | { |
443 | struct platform_device *pdev = to_platform_device(dev); | ||
444 | struct resource *res; | 443 | struct resource *res; |
445 | int ret; | 444 | int ret; |
446 | 445 | ||
447 | pr_debug("%s: probe=%p, device=%p\n", __FUNCTION__, pdev, dev); | 446 | pr_debug("%s: probe=%p\n", __FUNCTION__, pdev); |
448 | 447 | ||
449 | /* find the IRQs */ | 448 | /* find the IRQs */ |
450 | 449 | ||
451 | s3c2410_rtc_tickno = platform_get_irq(pdev, 1); | 450 | s3c2410_rtc_tickno = platform_get_irq(pdev, 1); |
452 | if (s3c2410_rtc_tickno <= 0) { | 451 | if (s3c2410_rtc_tickno <= 0) { |
453 | dev_err(dev, "no irq for rtc tick\n"); | 452 | dev_err(&pdev->dev, "no irq for rtc tick\n"); |
454 | return -ENOENT; | 453 | return -ENOENT; |
455 | } | 454 | } |
456 | 455 | ||
457 | s3c2410_rtc_alarmno = platform_get_irq(pdev, 0); | 456 | s3c2410_rtc_alarmno = platform_get_irq(pdev, 0); |
458 | if (s3c2410_rtc_alarmno <= 0) { | 457 | if (s3c2410_rtc_alarmno <= 0) { |
459 | dev_err(dev, "no irq for alarm\n"); | 458 | dev_err(&pdev->dev, "no irq for alarm\n"); |
460 | return -ENOENT; | 459 | return -ENOENT; |
461 | } | 460 | } |
462 | 461 | ||
@@ -467,7 +466,7 @@ static int s3c2410_rtc_probe(struct device *dev) | |||
467 | 466 | ||
468 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 467 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
469 | if (res == NULL) { | 468 | if (res == NULL) { |
470 | dev_err(dev, "failed to get memory region resource\n"); | 469 | dev_err(&pdev->dev, "failed to get memory region resource\n"); |
471 | return -ENOENT; | 470 | return -ENOENT; |
472 | } | 471 | } |
473 | 472 | ||
@@ -475,14 +474,14 @@ static int s3c2410_rtc_probe(struct device *dev) | |||
475 | pdev->name); | 474 | pdev->name); |
476 | 475 | ||
477 | if (s3c2410_rtc_mem == NULL) { | 476 | if (s3c2410_rtc_mem == NULL) { |
478 | dev_err(dev, "failed to reserve memory region\n"); | 477 | dev_err(&pdev->dev, "failed to reserve memory region\n"); |
479 | ret = -ENOENT; | 478 | ret = -ENOENT; |
480 | goto exit_err; | 479 | goto exit_err; |
481 | } | 480 | } |
482 | 481 | ||
483 | s3c2410_rtc_base = ioremap(res->start, res->end - res->start + 1); | 482 | s3c2410_rtc_base = ioremap(res->start, res->end - res->start + 1); |
484 | if (s3c2410_rtc_base == NULL) { | 483 | if (s3c2410_rtc_base == NULL) { |
485 | dev_err(dev, "failed ioremap()\n"); | 484 | dev_err(&pdev->dev, "failed ioremap()\n"); |
486 | ret = -EINVAL; | 485 | ret = -EINVAL; |
487 | goto exit_err; | 486 | goto exit_err; |
488 | } | 487 | } |
@@ -494,7 +493,7 @@ static int s3c2410_rtc_probe(struct device *dev) | |||
494 | 493 | ||
495 | /* check to see if everything is setup correctly */ | 494 | /* check to see if everything is setup correctly */ |
496 | 495 | ||
497 | s3c2410_rtc_enable(dev, 1); | 496 | s3c2410_rtc_enable(pdev, 1); |
498 | 497 | ||
499 | pr_debug("s3c2410_rtc: RTCCON=%02x\n", readb(S3C2410_RTCCON)); | 498 | pr_debug("s3c2410_rtc: RTCCON=%02x\n", readb(S3C2410_RTCCON)); |
500 | 499 | ||
@@ -506,7 +505,7 @@ static int s3c2410_rtc_probe(struct device *dev) | |||
506 | return 0; | 505 | return 0; |
507 | 506 | ||
508 | exit_err: | 507 | exit_err: |
509 | dev_err(dev, "error %d during initialisation\n", ret); | 508 | dev_err(&pdev->dev, "error %d during initialisation\n", ret); |
510 | 509 | ||
511 | return ret; | 510 | return ret; |
512 | } | 511 | } |
@@ -519,7 +518,7 @@ static struct timespec s3c2410_rtc_delta; | |||
519 | 518 | ||
520 | static int ticnt_save; | 519 | static int ticnt_save; |
521 | 520 | ||
522 | static int s3c2410_rtc_suspend(struct device *dev, pm_message_t state) | 521 | static int s3c2410_rtc_suspend(struct platform_device *pdev, pm_message_t state) |
523 | { | 522 | { |
524 | struct rtc_time tm; | 523 | struct rtc_time tm; |
525 | struct timespec time; | 524 | struct timespec time; |
@@ -535,19 +534,19 @@ static int s3c2410_rtc_suspend(struct device *dev, pm_message_t state) | |||
535 | s3c2410_rtc_gettime(&tm); | 534 | s3c2410_rtc_gettime(&tm); |
536 | rtc_tm_to_time(&tm, &time.tv_sec); | 535 | rtc_tm_to_time(&tm, &time.tv_sec); |
537 | save_time_delta(&s3c2410_rtc_delta, &time); | 536 | save_time_delta(&s3c2410_rtc_delta, &time); |
538 | s3c2410_rtc_enable(dev, 0); | 537 | s3c2410_rtc_enable(pdev, 0); |
539 | 538 | ||
540 | return 0; | 539 | return 0; |
541 | } | 540 | } |
542 | 541 | ||
543 | static int s3c2410_rtc_resume(struct device *dev) | 542 | static int s3c2410_rtc_resume(struct platform_device *pdev) |
544 | { | 543 | { |
545 | struct rtc_time tm; | 544 | struct rtc_time tm; |
546 | struct timespec time; | 545 | struct timespec time; |
547 | 546 | ||
548 | time.tv_nsec = 0; | 547 | time.tv_nsec = 0; |
549 | 548 | ||
550 | s3c2410_rtc_enable(dev, 1); | 549 | s3c2410_rtc_enable(pdev, 1); |
551 | s3c2410_rtc_gettime(&tm); | 550 | s3c2410_rtc_gettime(&tm); |
552 | rtc_tm_to_time(&tm, &time.tv_sec); | 551 | rtc_tm_to_time(&tm, &time.tv_sec); |
553 | restore_time_delta(&s3c2410_rtc_delta, &time); | 552 | restore_time_delta(&s3c2410_rtc_delta, &time); |
@@ -560,14 +559,15 @@ static int s3c2410_rtc_resume(struct device *dev) | |||
560 | #define s3c2410_rtc_resume NULL | 559 | #define s3c2410_rtc_resume NULL |
561 | #endif | 560 | #endif |
562 | 561 | ||
563 | static struct device_driver s3c2410_rtcdrv = { | 562 | static struct platform_driver s3c2410_rtcdrv = { |
564 | .name = "s3c2410-rtc", | ||
565 | .owner = THIS_MODULE, | ||
566 | .bus = &platform_bus_type, | ||
567 | .probe = s3c2410_rtc_probe, | 563 | .probe = s3c2410_rtc_probe, |
568 | .remove = s3c2410_rtc_remove, | 564 | .remove = s3c2410_rtc_remove, |
569 | .suspend = s3c2410_rtc_suspend, | 565 | .suspend = s3c2410_rtc_suspend, |
570 | .resume = s3c2410_rtc_resume, | 566 | .resume = s3c2410_rtc_resume, |
567 | .driver = { | ||
568 | .name = "s3c2410-rtc", | ||
569 | .owner = THIS_MODULE, | ||
570 | }, | ||
571 | }; | 571 | }; |
572 | 572 | ||
573 | static char __initdata banner[] = "S3C2410 RTC, (c) 2004 Simtec Electronics\n"; | 573 | static char __initdata banner[] = "S3C2410 RTC, (c) 2004 Simtec Electronics\n"; |
@@ -575,12 +575,12 @@ static char __initdata banner[] = "S3C2410 RTC, (c) 2004 Simtec Electronics\n"; | |||
575 | static int __init s3c2410_rtc_init(void) | 575 | static int __init s3c2410_rtc_init(void) |
576 | { | 576 | { |
577 | printk(banner); | 577 | printk(banner); |
578 | return driver_register(&s3c2410_rtcdrv); | 578 | return platform_driver_register(&s3c2410_rtcdrv); |
579 | } | 579 | } |
580 | 580 | ||
581 | static void __exit s3c2410_rtc_exit(void) | 581 | static void __exit s3c2410_rtc_exit(void) |
582 | { | 582 | { |
583 | driver_unregister(&s3c2410_rtcdrv); | 583 | platform_driver_unregister(&s3c2410_rtcdrv); |
584 | } | 584 | } |
585 | 585 | ||
586 | module_init(s3c2410_rtc_init); | 586 | module_init(s3c2410_rtc_init); |
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index d05067dcea01..51a07370e636 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
@@ -1168,7 +1168,7 @@ static int sonypi_disable(void) | |||
1168 | #ifdef CONFIG_PM | 1168 | #ifdef CONFIG_PM |
1169 | static int old_camera_power; | 1169 | static int old_camera_power; |
1170 | 1170 | ||
1171 | static int sonypi_suspend(struct device *dev, pm_message_t state) | 1171 | static int sonypi_suspend(struct platform_device *dev, pm_message_t state) |
1172 | { | 1172 | { |
1173 | old_camera_power = sonypi_device.camera_power; | 1173 | old_camera_power = sonypi_device.camera_power; |
1174 | sonypi_disable(); | 1174 | sonypi_disable(); |
@@ -1176,26 +1176,27 @@ static int sonypi_suspend(struct device *dev, pm_message_t state) | |||
1176 | return 0; | 1176 | return 0; |
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | static int sonypi_resume(struct device *dev) | 1179 | static int sonypi_resume(struct platform_device *dev) |
1180 | { | 1180 | { |
1181 | sonypi_enable(old_camera_power); | 1181 | sonypi_enable(old_camera_power); |
1182 | return 0; | 1182 | return 0; |
1183 | } | 1183 | } |
1184 | #endif | 1184 | #endif |
1185 | 1185 | ||
1186 | static void sonypi_shutdown(struct device *dev) | 1186 | static void sonypi_shutdown(struct platform_device *dev) |
1187 | { | 1187 | { |
1188 | sonypi_disable(); | 1188 | sonypi_disable(); |
1189 | } | 1189 | } |
1190 | 1190 | ||
1191 | static struct device_driver sonypi_driver = { | 1191 | static struct platform_driver sonypi_driver = { |
1192 | .name = "sonypi", | ||
1193 | .bus = &platform_bus_type, | ||
1194 | #ifdef CONFIG_PM | 1192 | #ifdef CONFIG_PM |
1195 | .suspend = sonypi_suspend, | 1193 | .suspend = sonypi_suspend, |
1196 | .resume = sonypi_resume, | 1194 | .resume = sonypi_resume, |
1197 | #endif | 1195 | #endif |
1198 | .shutdown = sonypi_shutdown, | 1196 | .shutdown = sonypi_shutdown, |
1197 | .driver = { | ||
1198 | .name = "sonypi", | ||
1199 | }, | ||
1199 | }; | 1200 | }; |
1200 | 1201 | ||
1201 | static int __devinit sonypi_create_input_devices(void) | 1202 | static int __devinit sonypi_create_input_devices(void) |
@@ -1455,20 +1456,20 @@ static int __init sonypi_init(void) | |||
1455 | if (!dmi_check_system(sonypi_dmi_table)) | 1456 | if (!dmi_check_system(sonypi_dmi_table)) |
1456 | return -ENODEV; | 1457 | return -ENODEV; |
1457 | 1458 | ||
1458 | ret = driver_register(&sonypi_driver); | 1459 | ret = platform_driver_register(&sonypi_driver); |
1459 | if (ret) | 1460 | if (ret) |
1460 | return ret; | 1461 | return ret; |
1461 | 1462 | ||
1462 | ret = sonypi_probe(); | 1463 | ret = sonypi_probe(); |
1463 | if (ret) | 1464 | if (ret) |
1464 | driver_unregister(&sonypi_driver); | 1465 | platform_driver_unregister(&sonypi_driver); |
1465 | 1466 | ||
1466 | return ret; | 1467 | return ret; |
1467 | } | 1468 | } |
1468 | 1469 | ||
1469 | static void __exit sonypi_exit(void) | 1470 | static void __exit sonypi_exit(void) |
1470 | { | 1471 | { |
1471 | driver_unregister(&sonypi_driver); | 1472 | platform_driver_unregister(&sonypi_driver); |
1472 | sonypi_remove(); | 1473 | sonypi_remove(); |
1473 | } | 1474 | } |
1474 | 1475 | ||
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c index 352547eabf7b..0bbfce43031c 100644 --- a/drivers/char/specialix.c +++ b/drivers/char/specialix.c | |||
@@ -90,7 +90,6 @@ | |||
90 | #include <linux/fcntl.h> | 90 | #include <linux/fcntl.h> |
91 | #include <linux/major.h> | 91 | #include <linux/major.h> |
92 | #include <linux/delay.h> | 92 | #include <linux/delay.h> |
93 | #include <linux/version.h> | ||
94 | #include <linux/pci.h> | 93 | #include <linux/pci.h> |
95 | #include <linux/init.h> | 94 | #include <linux/init.h> |
96 | #include <asm/uaccess.h> | 95 | #include <asm/uaccess.h> |
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index 5d1ffa3bd4c3..82c6abde68df 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c | |||
@@ -912,7 +912,6 @@ MODULE_DEVICE_TABLE(pci, synclink_pci_tbl); | |||
912 | MODULE_LICENSE("GPL"); | 912 | MODULE_LICENSE("GPL"); |
913 | 913 | ||
914 | static struct pci_driver synclink_pci_driver = { | 914 | static struct pci_driver synclink_pci_driver = { |
915 | .owner = THIS_MODULE, | ||
916 | .name = "synclink", | 915 | .name = "synclink", |
917 | .id_table = synclink_pci_tbl, | 916 | .id_table = synclink_pci_tbl, |
918 | .probe = synclink_init_one, | 917 | .probe = synclink_init_one, |
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index 7c063c5abc55..ee5a40be9f99 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c | |||
@@ -500,7 +500,6 @@ MODULE_DEVICE_TABLE(pci, synclinkmp_pci_tbl); | |||
500 | MODULE_LICENSE("GPL"); | 500 | MODULE_LICENSE("GPL"); |
501 | 501 | ||
502 | static struct pci_driver synclinkmp_pci_driver = { | 502 | static struct pci_driver synclinkmp_pci_driver = { |
503 | .owner = THIS_MODULE, | ||
504 | .name = "synclinkmp", | 503 | .name = "synclinkmp", |
505 | .id_table = synclinkmp_pci_tbl, | 504 | .id_table = synclinkmp_pci_tbl, |
506 | .probe = synclinkmp_init_one, | 505 | .probe = synclinkmp_init_one, |
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index feb25158c8ee..145275ebdd7e 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -354,7 +354,7 @@ struct sysrq_key_op *__sysrq_get_key_op (int key) { | |||
354 | return op_p; | 354 | return op_p; |
355 | } | 355 | } |
356 | 356 | ||
357 | void __sysrq_put_key_op (int key, struct sysrq_key_op *op_p) { | 357 | static void __sysrq_put_key_op (int key, struct sysrq_key_op *op_p) { |
358 | int i; | 358 | int i; |
359 | 359 | ||
360 | i = sysrq_key_table_key2index(key); | 360 | i = sysrq_key_table_key2index(key); |
@@ -419,7 +419,7 @@ void handle_sysrq(int key, struct pt_regs *pt_regs, struct tty_struct *tty) | |||
419 | __handle_sysrq(key, pt_regs, tty, 1); | 419 | __handle_sysrq(key, pt_regs, tty, 1); |
420 | } | 420 | } |
421 | 421 | ||
422 | int __sysrq_swap_key_ops(int key, struct sysrq_key_op *insert_op_p, | 422 | static int __sysrq_swap_key_ops(int key, struct sysrq_key_op *insert_op_p, |
423 | struct sysrq_key_op *remove_op_p) { | 423 | struct sysrq_key_op *remove_op_p) { |
424 | 424 | ||
425 | int retval; | 425 | int retval; |
diff --git a/drivers/char/tb0219.c b/drivers/char/tb0219.c index 24355b23b2ca..b3d411a756fe 100644 --- a/drivers/char/tb0219.c +++ b/drivers/char/tb0219.c | |||
@@ -283,7 +283,7 @@ static void tb0219_pci_irq_init(void) | |||
283 | vr41xx_set_irq_level(TB0219_PCI_SLOT3_PIN, IRQ_LEVEL_LOW); | 283 | vr41xx_set_irq_level(TB0219_PCI_SLOT3_PIN, IRQ_LEVEL_LOW); |
284 | } | 284 | } |
285 | 285 | ||
286 | static int tb0219_probe(struct device *dev) | 286 | static int tb0219_probe(struct platform_device *dev) |
287 | { | 287 | { |
288 | int retval; | 288 | int retval; |
289 | 289 | ||
@@ -319,7 +319,7 @@ static int tb0219_probe(struct device *dev) | |||
319 | return 0; | 319 | return 0; |
320 | } | 320 | } |
321 | 321 | ||
322 | static int tb0219_remove(struct device *dev) | 322 | static int tb0219_remove(struct platform_device *dev) |
323 | { | 323 | { |
324 | _machine_restart = old_machine_restart; | 324 | _machine_restart = old_machine_restart; |
325 | 325 | ||
@@ -333,11 +333,12 @@ static int tb0219_remove(struct device *dev) | |||
333 | 333 | ||
334 | static struct platform_device *tb0219_platform_device; | 334 | static struct platform_device *tb0219_platform_device; |
335 | 335 | ||
336 | static struct device_driver tb0219_device_driver = { | 336 | static struct platform_driver tb0219_device_driver = { |
337 | .name = "TB0219", | ||
338 | .bus = &platform_bus_type, | ||
339 | .probe = tb0219_probe, | 337 | .probe = tb0219_probe, |
340 | .remove = tb0219_remove, | 338 | .remove = tb0219_remove, |
339 | .driver = { | ||
340 | .name = "TB0219", | ||
341 | }, | ||
341 | }; | 342 | }; |
342 | 343 | ||
343 | static int __devinit tanbac_tb0219_init(void) | 344 | static int __devinit tanbac_tb0219_init(void) |
@@ -348,7 +349,7 @@ static int __devinit tanbac_tb0219_init(void) | |||
348 | if (IS_ERR(tb0219_platform_device)) | 349 | if (IS_ERR(tb0219_platform_device)) |
349 | return PTR_ERR(tb0219_platform_device); | 350 | return PTR_ERR(tb0219_platform_device); |
350 | 351 | ||
351 | retval = driver_register(&tb0219_device_driver); | 352 | retval = platform_driver_register(&tb0219_device_driver); |
352 | if (retval < 0) | 353 | if (retval < 0) |
353 | platform_device_unregister(tb0219_platform_device); | 354 | platform_device_unregister(tb0219_platform_device); |
354 | 355 | ||
@@ -357,7 +358,7 @@ static int __devinit tanbac_tb0219_init(void) | |||
357 | 358 | ||
358 | static void __devexit tanbac_tb0219_exit(void) | 359 | static void __devexit tanbac_tb0219_exit(void) |
359 | { | 360 | { |
360 | driver_unregister(&tb0219_device_driver); | 361 | platform_driver_unregister(&tb0219_device_driver); |
361 | 362 | ||
362 | platform_device_unregister(tb0219_platform_device); | 363 | platform_device_unregister(tb0219_platform_device); |
363 | } | 364 | } |
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index 99a60496ecc6..9293bcc4dc62 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h | |||
@@ -19,7 +19,6 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/version.h> | ||
23 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
24 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
25 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c index 98601c7d04a9..4d75c261f98a 100644 --- a/drivers/char/viocons.c +++ b/drivers/char/viocons.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 26 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
27 | */ | 27 | */ |
28 | #include <linux/config.h> | 28 | #include <linux/config.h> |
29 | #include <linux/version.h> | ||
30 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
31 | #include <linux/proc_fs.h> | 30 | #include <linux/proc_fs.h> |
32 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 867cc4e418c7..60aabdb4a046 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c | |||
@@ -32,7 +32,6 @@ | |||
32 | * iseries/vio.h | 32 | * iseries/vio.h |
33 | */ | 33 | */ |
34 | #include <linux/config.h> | 34 | #include <linux/config.h> |
35 | #include <linux/version.h> | ||
36 | #include <linux/module.h> | 35 | #include <linux/module.h> |
37 | #include <linux/kernel.h> | 36 | #include <linux/kernel.h> |
38 | #include <linux/errno.h> | 37 | #include <linux/errno.h> |
diff --git a/drivers/char/vr41xx_giu.c b/drivers/char/vr41xx_giu.c index 94641085faf8..9ac6d43437b3 100644 --- a/drivers/char/vr41xx_giu.c +++ b/drivers/char/vr41xx_giu.c | |||
@@ -613,7 +613,7 @@ static struct file_operations gpio_fops = { | |||
613 | .release = gpio_release, | 613 | .release = gpio_release, |
614 | }; | 614 | }; |
615 | 615 | ||
616 | static int giu_probe(struct device *dev) | 616 | static int giu_probe(struct platform_device *dev) |
617 | { | 617 | { |
618 | unsigned long start, size, flags = 0; | 618 | unsigned long start, size, flags = 0; |
619 | unsigned int nr_pins = 0; | 619 | unsigned int nr_pins = 0; |
@@ -697,7 +697,7 @@ static int giu_probe(struct device *dev) | |||
697 | return cascade_irq(GIUINT_IRQ, giu_get_irq); | 697 | return cascade_irq(GIUINT_IRQ, giu_get_irq); |
698 | } | 698 | } |
699 | 699 | ||
700 | static int giu_remove(struct device *dev) | 700 | static int giu_remove(struct platform_device *dev) |
701 | { | 701 | { |
702 | iounmap(giu_base); | 702 | iounmap(giu_base); |
703 | 703 | ||
@@ -710,11 +710,12 @@ static int giu_remove(struct device *dev) | |||
710 | 710 | ||
711 | static struct platform_device *giu_platform_device; | 711 | static struct platform_device *giu_platform_device; |
712 | 712 | ||
713 | static struct device_driver giu_device_driver = { | 713 | static struct platform_driver giu_device_driver = { |
714 | .name = "GIU", | ||
715 | .bus = &platform_bus_type, | ||
716 | .probe = giu_probe, | 714 | .probe = giu_probe, |
717 | .remove = giu_remove, | 715 | .remove = giu_remove, |
716 | .driver = { | ||
717 | .name = "GIU", | ||
718 | }, | ||
718 | }; | 719 | }; |
719 | 720 | ||
720 | static int __devinit vr41xx_giu_init(void) | 721 | static int __devinit vr41xx_giu_init(void) |
@@ -725,7 +726,7 @@ static int __devinit vr41xx_giu_init(void) | |||
725 | if (IS_ERR(giu_platform_device)) | 726 | if (IS_ERR(giu_platform_device)) |
726 | return PTR_ERR(giu_platform_device); | 727 | return PTR_ERR(giu_platform_device); |
727 | 728 | ||
728 | retval = driver_register(&giu_device_driver); | 729 | retval = platform_driver_register(&giu_device_driver); |
729 | if (retval < 0) | 730 | if (retval < 0) |
730 | platform_device_unregister(giu_platform_device); | 731 | platform_device_unregister(giu_platform_device); |
731 | 732 | ||
@@ -734,7 +735,7 @@ static int __devinit vr41xx_giu_init(void) | |||
734 | 735 | ||
735 | static void __devexit vr41xx_giu_exit(void) | 736 | static void __devexit vr41xx_giu_exit(void) |
736 | { | 737 | { |
737 | driver_unregister(&giu_device_driver); | 738 | platform_driver_unregister(&giu_device_driver); |
738 | 739 | ||
739 | platform_device_unregister(giu_platform_device); | 740 | platform_device_unregister(giu_platform_device); |
740 | } | 741 | } |
diff --git a/drivers/char/vr41xx_rtc.c b/drivers/char/vr41xx_rtc.c index 5e3292df69d8..435b30748e23 100644 --- a/drivers/char/vr41xx_rtc.c +++ b/drivers/char/vr41xx_rtc.c | |||
@@ -560,13 +560,11 @@ static struct miscdevice rtc_miscdevice = { | |||
560 | .fops = &rtc_fops, | 560 | .fops = &rtc_fops, |
561 | }; | 561 | }; |
562 | 562 | ||
563 | static int rtc_probe(struct device *dev) | 563 | static int rtc_probe(struct platform_device *pdev) |
564 | { | 564 | { |
565 | struct platform_device *pdev; | ||
566 | unsigned int irq; | 565 | unsigned int irq; |
567 | int retval; | 566 | int retval; |
568 | 567 | ||
569 | pdev = to_platform_device(dev); | ||
570 | if (pdev->num_resources != 2) | 568 | if (pdev->num_resources != 2) |
571 | return -EBUSY; | 569 | return -EBUSY; |
572 | 570 | ||
@@ -635,7 +633,7 @@ static int rtc_probe(struct device *dev) | |||
635 | return 0; | 633 | return 0; |
636 | } | 634 | } |
637 | 635 | ||
638 | static int rtc_remove(struct device *dev) | 636 | static int rtc_remove(struct platform_device *dev) |
639 | { | 637 | { |
640 | int retval; | 638 | int retval; |
641 | 639 | ||
@@ -655,11 +653,12 @@ static int rtc_remove(struct device *dev) | |||
655 | 653 | ||
656 | static struct platform_device *rtc_platform_device; | 654 | static struct platform_device *rtc_platform_device; |
657 | 655 | ||
658 | static struct device_driver rtc_device_driver = { | 656 | static struct platform_driver rtc_device_driver = { |
659 | .name = rtc_name, | ||
660 | .bus = &platform_bus_type, | ||
661 | .probe = rtc_probe, | 657 | .probe = rtc_probe, |
662 | .remove = rtc_remove, | 658 | .remove = rtc_remove, |
659 | .driver = { | ||
660 | .name = rtc_name, | ||
661 | }, | ||
663 | }; | 662 | }; |
664 | 663 | ||
665 | static int __devinit vr41xx_rtc_init(void) | 664 | static int __devinit vr41xx_rtc_init(void) |
@@ -691,7 +690,7 @@ static int __devinit vr41xx_rtc_init(void) | |||
691 | if (IS_ERR(rtc_platform_device)) | 690 | if (IS_ERR(rtc_platform_device)) |
692 | return PTR_ERR(rtc_platform_device); | 691 | return PTR_ERR(rtc_platform_device); |
693 | 692 | ||
694 | retval = driver_register(&rtc_device_driver); | 693 | retval = platform_driver_register(&rtc_device_driver); |
695 | if (retval < 0) | 694 | if (retval < 0) |
696 | platform_device_unregister(rtc_platform_device); | 695 | platform_device_unregister(rtc_platform_device); |
697 | 696 | ||
@@ -700,7 +699,7 @@ static int __devinit vr41xx_rtc_init(void) | |||
700 | 699 | ||
701 | static void __devexit vr41xx_rtc_exit(void) | 700 | static void __devexit vr41xx_rtc_exit(void) |
702 | { | 701 | { |
703 | driver_unregister(&rtc_device_driver); | 702 | platform_driver_unregister(&rtc_device_driver); |
704 | 703 | ||
705 | platform_device_unregister(rtc_platform_device); | 704 | platform_device_unregister(rtc_platform_device); |
706 | } | 705 | } |
diff --git a/drivers/char/watchdog/mpcore_wdt.c b/drivers/char/watchdog/mpcore_wdt.c index da631c114fd1..9defcf861b67 100644 --- a/drivers/char/watchdog/mpcore_wdt.c +++ b/drivers/char/watchdog/mpcore_wdt.c | |||
@@ -139,7 +139,7 @@ static int mpcore_wdt_set_heartbeat(int t) | |||
139 | */ | 139 | */ |
140 | static int mpcore_wdt_open(struct inode *inode, struct file *file) | 140 | static int mpcore_wdt_open(struct inode *inode, struct file *file) |
141 | { | 141 | { |
142 | struct mpcore_wdt *wdt = dev_get_drvdata(&mpcore_wdt_dev->dev); | 142 | struct mpcore_wdt *wdt = platform_get_drvdata(mpcore_wdt_dev); |
143 | 143 | ||
144 | if (test_and_set_bit(0, &wdt->timer_alive)) | 144 | if (test_and_set_bit(0, &wdt->timer_alive)) |
145 | return -EBUSY; | 145 | return -EBUSY; |
@@ -291,9 +291,9 @@ static int mpcore_wdt_ioctl(struct inode *inode, struct file *file, | |||
291 | * System shutdown handler. Turn off the watchdog if we're | 291 | * System shutdown handler. Turn off the watchdog if we're |
292 | * restarting or halting the system. | 292 | * restarting or halting the system. |
293 | */ | 293 | */ |
294 | static void mpcore_wdt_shutdown(struct device *_dev) | 294 | static void mpcore_wdt_shutdown(struct platform_device *dev) |
295 | { | 295 | { |
296 | struct mpcore_wdt *wdt = dev_get_drvdata(_dev); | 296 | struct mpcore_wdt *wdt = platform_get_drvdata(dev); |
297 | 297 | ||
298 | if (system_state == SYSTEM_RESTART || system_state == SYSTEM_HALT) | 298 | if (system_state == SYSTEM_RESTART || system_state == SYSTEM_HALT) |
299 | mpcore_wdt_stop(wdt); | 299 | mpcore_wdt_stop(wdt); |
@@ -317,9 +317,8 @@ static struct miscdevice mpcore_wdt_miscdev = { | |||
317 | .fops = &mpcore_wdt_fops, | 317 | .fops = &mpcore_wdt_fops, |
318 | }; | 318 | }; |
319 | 319 | ||
320 | static int __devinit mpcore_wdt_probe(struct device *_dev) | 320 | static int __devinit mpcore_wdt_probe(struct platform_device *dev) |
321 | { | 321 | { |
322 | struct platform_device *dev = to_platform_device(_dev); | ||
323 | struct mpcore_wdt *wdt; | 322 | struct mpcore_wdt *wdt; |
324 | struct resource *res; | 323 | struct resource *res; |
325 | int ret; | 324 | int ret; |
@@ -364,7 +363,7 @@ static int __devinit mpcore_wdt_probe(struct device *_dev) | |||
364 | } | 363 | } |
365 | 364 | ||
366 | mpcore_wdt_stop(wdt); | 365 | mpcore_wdt_stop(wdt); |
367 | dev_set_drvdata(&dev->dev, wdt); | 366 | platform_set_drvdata(&dev->dev, wdt); |
368 | mpcore_wdt_dev = dev; | 367 | mpcore_wdt_dev = dev; |
369 | 368 | ||
370 | return 0; | 369 | return 0; |
@@ -379,11 +378,11 @@ static int __devinit mpcore_wdt_probe(struct device *_dev) | |||
379 | return ret; | 378 | return ret; |
380 | } | 379 | } |
381 | 380 | ||
382 | static int __devexit mpcore_wdt_remove(struct device *dev) | 381 | static int __devexit mpcore_wdt_remove(struct platform_device *dev) |
383 | { | 382 | { |
384 | struct mpcore_wdt *wdt = dev_get_drvdata(dev); | 383 | struct mpcore_wdt *wdt = platform_get_drvdata(dev); |
385 | 384 | ||
386 | dev_set_drvdata(dev, NULL); | 385 | platform_set_drvdata(dev, NULL); |
387 | 386 | ||
388 | misc_deregister(&mpcore_wdt_miscdev); | 387 | misc_deregister(&mpcore_wdt_miscdev); |
389 | 388 | ||
@@ -395,13 +394,14 @@ static int __devexit mpcore_wdt_remove(struct device *dev) | |||
395 | return 0; | 394 | return 0; |
396 | } | 395 | } |
397 | 396 | ||
398 | static struct device_driver mpcore_wdt_driver = { | 397 | static struct platform_driver mpcore_wdt_driver = { |
399 | .owner = THIS_MODULE, | ||
400 | .name = "mpcore_wdt", | ||
401 | .bus = &platform_bus_type, | ||
402 | .probe = mpcore_wdt_probe, | 398 | .probe = mpcore_wdt_probe, |
403 | .remove = __devexit_p(mpcore_wdt_remove), | 399 | .remove = __devexit_p(mpcore_wdt_remove), |
404 | .shutdown = mpcore_wdt_shutdown, | 400 | .shutdown = mpcore_wdt_shutdown, |
401 | .driver = { | ||
402 | .owner = THIS_MODULE, | ||
403 | .name = "mpcore_wdt", | ||
404 | }, | ||
405 | }; | 405 | }; |
406 | 406 | ||
407 | static char banner[] __initdata = KERN_INFO "MPcore Watchdog Timer: 0.1. mpcore_noboot=%d mpcore_margin=%d sec (nowayout= %d)\n"; | 407 | static char banner[] __initdata = KERN_INFO "MPcore Watchdog Timer: 0.1. mpcore_noboot=%d mpcore_margin=%d sec (nowayout= %d)\n"; |
@@ -420,12 +420,12 @@ static int __init mpcore_wdt_init(void) | |||
420 | 420 | ||
421 | printk(banner, mpcore_noboot, mpcore_margin, nowayout); | 421 | printk(banner, mpcore_noboot, mpcore_margin, nowayout); |
422 | 422 | ||
423 | return driver_register(&mpcore_wdt_driver); | 423 | return platform_driver_register(&mpcore_wdt_driver); |
424 | } | 424 | } |
425 | 425 | ||
426 | static void __exit mpcore_wdt_exit(void) | 426 | static void __exit mpcore_wdt_exit(void) |
427 | { | 427 | { |
428 | driver_unregister(&mpcore_wdt_driver); | 428 | platform_driver_unregister(&mpcore_wdt_driver); |
429 | } | 429 | } |
430 | 430 | ||
431 | module_init(mpcore_wdt_init); | 431 | module_init(mpcore_wdt_init); |
diff --git a/drivers/char/watchdog/mv64x60_wdt.c b/drivers/char/watchdog/mv64x60_wdt.c index 119b3c541d95..00d9ef04a369 100644 --- a/drivers/char/watchdog/mv64x60_wdt.c +++ b/drivers/char/watchdog/mv64x60_wdt.c | |||
@@ -182,10 +182,9 @@ static struct miscdevice mv64x60_wdt_miscdev = { | |||
182 | .fops = &mv64x60_wdt_fops, | 182 | .fops = &mv64x60_wdt_fops, |
183 | }; | 183 | }; |
184 | 184 | ||
185 | static int __devinit mv64x60_wdt_probe(struct device *dev) | 185 | static int __devinit mv64x60_wdt_probe(struct platform_device *dev) |
186 | { | 186 | { |
187 | struct platform_device *pd = to_platform_device(dev); | 187 | struct mv64x60_wdt_pdata *pdata = dev->dev.platform_data; |
188 | struct mv64x60_wdt_pdata *pdata = pd->dev.platform_data; | ||
189 | int bus_clk = 133; | 188 | int bus_clk = 133; |
190 | 189 | ||
191 | mv64x60_wdt_timeout = 10; | 190 | mv64x60_wdt_timeout = 10; |
@@ -202,7 +201,7 @@ static int __devinit mv64x60_wdt_probe(struct device *dev) | |||
202 | return misc_register(&mv64x60_wdt_miscdev); | 201 | return misc_register(&mv64x60_wdt_miscdev); |
203 | } | 202 | } |
204 | 203 | ||
205 | static int __devexit mv64x60_wdt_remove(struct device *dev) | 204 | static int __devexit mv64x60_wdt_remove(struct platform_device *dev) |
206 | { | 205 | { |
207 | misc_deregister(&mv64x60_wdt_miscdev); | 206 | misc_deregister(&mv64x60_wdt_miscdev); |
208 | 207 | ||
@@ -212,12 +211,13 @@ static int __devexit mv64x60_wdt_remove(struct device *dev) | |||
212 | return 0; | 211 | return 0; |
213 | } | 212 | } |
214 | 213 | ||
215 | static struct device_driver mv64x60_wdt_driver = { | 214 | static struct platform_driver mv64x60_wdt_driver = { |
216 | .owner = THIS_MODULE, | ||
217 | .name = MV64x60_WDT_NAME, | ||
218 | .bus = &platform_bus_type, | ||
219 | .probe = mv64x60_wdt_probe, | 215 | .probe = mv64x60_wdt_probe, |
220 | .remove = __devexit_p(mv64x60_wdt_remove), | 216 | .remove = __devexit_p(mv64x60_wdt_remove), |
217 | .driver = { | ||
218 | .owner = THIS_MODULE, | ||
219 | .name = MV64x60_WDT_NAME, | ||
220 | }, | ||
221 | }; | 221 | }; |
222 | 222 | ||
223 | static struct platform_device *mv64x60_wdt_dev; | 223 | static struct platform_device *mv64x60_wdt_dev; |
@@ -235,14 +235,14 @@ static int __init mv64x60_wdt_init(void) | |||
235 | goto out; | 235 | goto out; |
236 | } | 236 | } |
237 | 237 | ||
238 | ret = driver_register(&mv64x60_wdt_driver); | 238 | ret = platform_driver_register(&mv64x60_wdt_driver); |
239 | out: | 239 | out: |
240 | return ret; | 240 | return ret; |
241 | } | 241 | } |
242 | 242 | ||
243 | static void __exit mv64x60_wdt_exit(void) | 243 | static void __exit mv64x60_wdt_exit(void) |
244 | { | 244 | { |
245 | driver_unregister(&mv64x60_wdt_driver); | 245 | platform_driver_unregister(&mv64x60_wdt_driver); |
246 | platform_device_unregister(mv64x60_wdt_dev); | 246 | platform_device_unregister(mv64x60_wdt_dev); |
247 | } | 247 | } |
248 | 248 | ||
diff --git a/drivers/char/watchdog/pcwd_pci.c b/drivers/char/watchdog/pcwd_pci.c index d9ef55bdf88a..2451edbefece 100644 --- a/drivers/char/watchdog/pcwd_pci.c +++ b/drivers/char/watchdog/pcwd_pci.c | |||
@@ -755,7 +755,6 @@ static struct pci_device_id pcipcwd_pci_tbl[] = { | |||
755 | MODULE_DEVICE_TABLE(pci, pcipcwd_pci_tbl); | 755 | MODULE_DEVICE_TABLE(pci, pcipcwd_pci_tbl); |
756 | 756 | ||
757 | static struct pci_driver pcipcwd_driver = { | 757 | static struct pci_driver pcipcwd_driver = { |
758 | .owner = THIS_MODULE, | ||
759 | .name = WATCHDOG_NAME, | 758 | .name = WATCHDOG_NAME, |
760 | .id_table = pcipcwd_pci_tbl, | 759 | .id_table = pcipcwd_pci_tbl, |
761 | .probe = pcipcwd_card_init, | 760 | .probe = pcipcwd_card_init, |
diff --git a/drivers/char/watchdog/s3c2410_wdt.c b/drivers/char/watchdog/s3c2410_wdt.c index 751cb77b0715..eb667daee19b 100644 --- a/drivers/char/watchdog/s3c2410_wdt.c +++ b/drivers/char/watchdog/s3c2410_wdt.c | |||
@@ -347,15 +347,14 @@ static irqreturn_t s3c2410wdt_irq(int irqno, void *param, | |||
347 | } | 347 | } |
348 | /* device interface */ | 348 | /* device interface */ |
349 | 349 | ||
350 | static int s3c2410wdt_probe(struct device *dev) | 350 | static int s3c2410wdt_probe(struct platform_device *pdev) |
351 | { | 351 | { |
352 | struct platform_device *pdev = to_platform_device(dev); | ||
353 | struct resource *res; | 352 | struct resource *res; |
354 | int started = 0; | 353 | int started = 0; |
355 | int ret; | 354 | int ret; |
356 | int size; | 355 | int size; |
357 | 356 | ||
358 | DBG("%s: probe=%p, device=%p\n", __FUNCTION__, pdev, dev); | 357 | DBG("%s: probe=%p\n", __FUNCTION__, pdev); |
359 | 358 | ||
360 | /* get the memory region for the watchdog timer */ | 359 | /* get the memory region for the watchdog timer */ |
361 | 360 | ||
@@ -386,13 +385,13 @@ static int s3c2410wdt_probe(struct device *dev) | |||
386 | return -ENOENT; | 385 | return -ENOENT; |
387 | } | 386 | } |
388 | 387 | ||
389 | ret = request_irq(res->start, s3c2410wdt_irq, 0, pdev->name, dev); | 388 | ret = request_irq(res->start, s3c2410wdt_irq, 0, pdev->name, pdev); |
390 | if (ret != 0) { | 389 | if (ret != 0) { |
391 | printk(KERN_INFO PFX "failed to install irq (%d)\n", ret); | 390 | printk(KERN_INFO PFX "failed to install irq (%d)\n", ret); |
392 | return ret; | 391 | return ret; |
393 | } | 392 | } |
394 | 393 | ||
395 | wdt_clock = clk_get(dev, "watchdog"); | 394 | wdt_clock = clk_get(&pdev->dev, "watchdog"); |
396 | if (wdt_clock == NULL) { | 395 | if (wdt_clock == NULL) { |
397 | printk(KERN_INFO PFX "failed to find watchdog clock source\n"); | 396 | printk(KERN_INFO PFX "failed to find watchdog clock source\n"); |
398 | return -ENOENT; | 397 | return -ENOENT; |
@@ -430,7 +429,7 @@ static int s3c2410wdt_probe(struct device *dev) | |||
430 | return 0; | 429 | return 0; |
431 | } | 430 | } |
432 | 431 | ||
433 | static int s3c2410wdt_remove(struct device *dev) | 432 | static int s3c2410wdt_remove(struct platform_device *dev) |
434 | { | 433 | { |
435 | if (wdt_mem != NULL) { | 434 | if (wdt_mem != NULL) { |
436 | release_resource(wdt_mem); | 435 | release_resource(wdt_mem); |
@@ -454,7 +453,7 @@ static int s3c2410wdt_remove(struct device *dev) | |||
454 | return 0; | 453 | return 0; |
455 | } | 454 | } |
456 | 455 | ||
457 | static void s3c2410wdt_shutdown(struct device *dev) | 456 | static void s3c2410wdt_shutdown(struct platform_device *dev) |
458 | { | 457 | { |
459 | s3c2410wdt_stop(); | 458 | s3c2410wdt_stop(); |
460 | } | 459 | } |
@@ -464,7 +463,7 @@ static void s3c2410wdt_shutdown(struct device *dev) | |||
464 | static unsigned long wtcon_save; | 463 | static unsigned long wtcon_save; |
465 | static unsigned long wtdat_save; | 464 | static unsigned long wtdat_save; |
466 | 465 | ||
467 | static int s3c2410wdt_suspend(struct device *dev, pm_message_t state) | 466 | static int s3c2410wdt_suspend(struct platform_device *dev, pm_message_t state) |
468 | { | 467 | { |
469 | /* Save watchdog state, and turn it off. */ | 468 | /* Save watchdog state, and turn it off. */ |
470 | wtcon_save = readl(wdt_base + S3C2410_WTCON); | 469 | wtcon_save = readl(wdt_base + S3C2410_WTCON); |
@@ -476,7 +475,7 @@ static int s3c2410wdt_suspend(struct device *dev, pm_message_t state) | |||
476 | return 0; | 475 | return 0; |
477 | } | 476 | } |
478 | 477 | ||
479 | static int s3c2410wdt_resume(struct device *dev) | 478 | static int s3c2410wdt_resume(struct platform_device *dev) |
480 | { | 479 | { |
481 | /* Restore watchdog state. */ | 480 | /* Restore watchdog state. */ |
482 | 481 | ||
@@ -496,15 +495,16 @@ static int s3c2410wdt_resume(struct device *dev) | |||
496 | #endif /* CONFIG_PM */ | 495 | #endif /* CONFIG_PM */ |
497 | 496 | ||
498 | 497 | ||
499 | static struct device_driver s3c2410wdt_driver = { | 498 | static struct platform_driver s3c2410wdt_driver = { |
500 | .owner = THIS_MODULE, | ||
501 | .name = "s3c2410-wdt", | ||
502 | .bus = &platform_bus_type, | ||
503 | .probe = s3c2410wdt_probe, | 499 | .probe = s3c2410wdt_probe, |
504 | .remove = s3c2410wdt_remove, | 500 | .remove = s3c2410wdt_remove, |
505 | .shutdown = s3c2410wdt_shutdown, | 501 | .shutdown = s3c2410wdt_shutdown, |
506 | .suspend = s3c2410wdt_suspend, | 502 | .suspend = s3c2410wdt_suspend, |
507 | .resume = s3c2410wdt_resume, | 503 | .resume = s3c2410wdt_resume, |
504 | .driver = { | ||
505 | .owner = THIS_MODULE, | ||
506 | .name = "s3c2410-wdt", | ||
507 | }, | ||
508 | }; | 508 | }; |
509 | 509 | ||
510 | 510 | ||
@@ -513,12 +513,12 @@ static char banner[] __initdata = KERN_INFO "S3C2410 Watchdog Timer, (c) 2004 Si | |||
513 | static int __init watchdog_init(void) | 513 | static int __init watchdog_init(void) |
514 | { | 514 | { |
515 | printk(banner); | 515 | printk(banner); |
516 | return driver_register(&s3c2410wdt_driver); | 516 | return platform_driver_register(&s3c2410wdt_driver); |
517 | } | 517 | } |
518 | 518 | ||
519 | static void __exit watchdog_exit(void) | 519 | static void __exit watchdog_exit(void) |
520 | { | 520 | { |
521 | driver_unregister(&s3c2410wdt_driver); | 521 | platform_driver_unregister(&s3c2410wdt_driver); |
522 | } | 522 | } |
523 | 523 | ||
524 | module_init(watchdog_init); | 524 | module_init(watchdog_init); |
diff --git a/drivers/char/watchdog/wdt_pci.c b/drivers/char/watchdog/wdt_pci.c index dc9370f6c348..4b3311993d48 100644 --- a/drivers/char/watchdog/wdt_pci.c +++ b/drivers/char/watchdog/wdt_pci.c | |||
@@ -711,7 +711,6 @@ MODULE_DEVICE_TABLE(pci, wdtpci_pci_tbl); | |||
711 | 711 | ||
712 | 712 | ||
713 | static struct pci_driver wdtpci_driver = { | 713 | static struct pci_driver wdtpci_driver = { |
714 | .owner = THIS_MODULE, | ||
715 | .name = "wdt_pci", | 714 | .name = "wdt_pci", |
716 | .id_table = wdtpci_pci_tbl, | 715 | .id_table = wdtpci_pci_tbl, |
717 | .probe = wdtpci_init_one, | 716 | .probe = wdtpci_init_one, |