diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-08-06 11:25:50 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-08-06 11:25:50 -0400 |
commit | 2dc11581376829303b98eadb2de253bee065a56a (patch) | |
tree | dbce62559c822cd720d1819a50c488bfecdfa945 /drivers/atm/fore200e.c | |
parent | fc1caf6eafb30ea185720e29f7f5eccca61ecd60 (diff) |
of/device: Replace struct of_device with struct platform_device
of_device is just an alias for platform_device, so remove it entirely. Also
replace to_of_device() with to_platform_device() and update comment blocks.
This patch was initially generated from the following semantic patch, and then
edited by hand to pick up the bits that coccinelle didn't catch.
@@
@@
-struct of_device
+struct platform_device
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm/fore200e.c')
-rw-r--r-- | drivers/atm/fore200e.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index b7385e077717..c8fc69c85a06 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
@@ -674,7 +674,7 @@ static void fore200e_sba_write(u32 val, volatile u32 __iomem *addr) | |||
674 | 674 | ||
675 | static u32 fore200e_sba_dma_map(struct fore200e *fore200e, void* virt_addr, int size, int direction) | 675 | static u32 fore200e_sba_dma_map(struct fore200e *fore200e, void* virt_addr, int size, int direction) |
676 | { | 676 | { |
677 | struct of_device *op = fore200e->bus_dev; | 677 | struct platform_device *op = fore200e->bus_dev; |
678 | u32 dma_addr; | 678 | u32 dma_addr; |
679 | 679 | ||
680 | dma_addr = dma_map_single(&op->dev, virt_addr, size, direction); | 680 | dma_addr = dma_map_single(&op->dev, virt_addr, size, direction); |
@@ -687,7 +687,7 @@ static u32 fore200e_sba_dma_map(struct fore200e *fore200e, void* virt_addr, int | |||
687 | 687 | ||
688 | static void fore200e_sba_dma_unmap(struct fore200e *fore200e, u32 dma_addr, int size, int direction) | 688 | static void fore200e_sba_dma_unmap(struct fore200e *fore200e, u32 dma_addr, int size, int direction) |
689 | { | 689 | { |
690 | struct of_device *op = fore200e->bus_dev; | 690 | struct platform_device *op = fore200e->bus_dev; |
691 | 691 | ||
692 | DPRINTK(3, "SBUS DVMA unmapping: dma_addr = 0x%08x, size = %d, direction = %d,\n", | 692 | DPRINTK(3, "SBUS DVMA unmapping: dma_addr = 0x%08x, size = %d, direction = %d,\n", |
693 | dma_addr, size, direction); | 693 | dma_addr, size, direction); |
@@ -697,7 +697,7 @@ static void fore200e_sba_dma_unmap(struct fore200e *fore200e, u32 dma_addr, int | |||
697 | 697 | ||
698 | static void fore200e_sba_dma_sync_for_cpu(struct fore200e *fore200e, u32 dma_addr, int size, int direction) | 698 | static void fore200e_sba_dma_sync_for_cpu(struct fore200e *fore200e, u32 dma_addr, int size, int direction) |
699 | { | 699 | { |
700 | struct of_device *op = fore200e->bus_dev; | 700 | struct platform_device *op = fore200e->bus_dev; |
701 | 701 | ||
702 | DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction); | 702 | DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction); |
703 | 703 | ||
@@ -706,7 +706,7 @@ static void fore200e_sba_dma_sync_for_cpu(struct fore200e *fore200e, u32 dma_add | |||
706 | 706 | ||
707 | static void fore200e_sba_dma_sync_for_device(struct fore200e *fore200e, u32 dma_addr, int size, int direction) | 707 | static void fore200e_sba_dma_sync_for_device(struct fore200e *fore200e, u32 dma_addr, int size, int direction) |
708 | { | 708 | { |
709 | struct of_device *op = fore200e->bus_dev; | 709 | struct platform_device *op = fore200e->bus_dev; |
710 | 710 | ||
711 | DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction); | 711 | DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction); |
712 | 712 | ||
@@ -719,7 +719,7 @@ static void fore200e_sba_dma_sync_for_device(struct fore200e *fore200e, u32 dma_ | |||
719 | static int fore200e_sba_dma_chunk_alloc(struct fore200e *fore200e, struct chunk *chunk, | 719 | static int fore200e_sba_dma_chunk_alloc(struct fore200e *fore200e, struct chunk *chunk, |
720 | int size, int nbr, int alignment) | 720 | int size, int nbr, int alignment) |
721 | { | 721 | { |
722 | struct of_device *op = fore200e->bus_dev; | 722 | struct platform_device *op = fore200e->bus_dev; |
723 | 723 | ||
724 | chunk->alloc_size = chunk->align_size = size * nbr; | 724 | chunk->alloc_size = chunk->align_size = size * nbr; |
725 | 725 | ||
@@ -738,7 +738,7 @@ static int fore200e_sba_dma_chunk_alloc(struct fore200e *fore200e, struct chunk | |||
738 | /* free a DVMA consistent chunk of memory */ | 738 | /* free a DVMA consistent chunk of memory */ |
739 | static void fore200e_sba_dma_chunk_free(struct fore200e *fore200e, struct chunk *chunk) | 739 | static void fore200e_sba_dma_chunk_free(struct fore200e *fore200e, struct chunk *chunk) |
740 | { | 740 | { |
741 | struct of_device *op = fore200e->bus_dev; | 741 | struct platform_device *op = fore200e->bus_dev; |
742 | 742 | ||
743 | dma_free_coherent(&op->dev, chunk->alloc_size, | 743 | dma_free_coherent(&op->dev, chunk->alloc_size, |
744 | chunk->alloc_addr, chunk->dma_addr); | 744 | chunk->alloc_addr, chunk->dma_addr); |
@@ -770,7 +770,7 @@ static void fore200e_sba_reset(struct fore200e *fore200e) | |||
770 | 770 | ||
771 | static int __init fore200e_sba_map(struct fore200e *fore200e) | 771 | static int __init fore200e_sba_map(struct fore200e *fore200e) |
772 | { | 772 | { |
773 | struct of_device *op = fore200e->bus_dev; | 773 | struct platform_device *op = fore200e->bus_dev; |
774 | unsigned int bursts; | 774 | unsigned int bursts; |
775 | 775 | ||
776 | /* gain access to the SBA specific registers */ | 776 | /* gain access to the SBA specific registers */ |
@@ -800,7 +800,7 @@ static int __init fore200e_sba_map(struct fore200e *fore200e) | |||
800 | 800 | ||
801 | static void fore200e_sba_unmap(struct fore200e *fore200e) | 801 | static void fore200e_sba_unmap(struct fore200e *fore200e) |
802 | { | 802 | { |
803 | struct of_device *op = fore200e->bus_dev; | 803 | struct platform_device *op = fore200e->bus_dev; |
804 | 804 | ||
805 | of_iounmap(&op->resource[0], fore200e->regs.sba.hcr, SBA200E_HCR_LENGTH); | 805 | of_iounmap(&op->resource[0], fore200e->regs.sba.hcr, SBA200E_HCR_LENGTH); |
806 | of_iounmap(&op->resource[1], fore200e->regs.sba.bsr, SBA200E_BSR_LENGTH); | 806 | of_iounmap(&op->resource[1], fore200e->regs.sba.bsr, SBA200E_BSR_LENGTH); |
@@ -816,7 +816,7 @@ static int __init fore200e_sba_configure(struct fore200e *fore200e) | |||
816 | 816 | ||
817 | static int __init fore200e_sba_prom_read(struct fore200e *fore200e, struct prom_data *prom) | 817 | static int __init fore200e_sba_prom_read(struct fore200e *fore200e, struct prom_data *prom) |
818 | { | 818 | { |
819 | struct of_device *op = fore200e->bus_dev; | 819 | struct platform_device *op = fore200e->bus_dev; |
820 | const u8 *prop; | 820 | const u8 *prop; |
821 | int len; | 821 | int len; |
822 | 822 | ||
@@ -840,7 +840,7 @@ static int __init fore200e_sba_prom_read(struct fore200e *fore200e, struct prom_ | |||
840 | 840 | ||
841 | static int fore200e_sba_proc_read(struct fore200e *fore200e, char *page) | 841 | static int fore200e_sba_proc_read(struct fore200e *fore200e, char *page) |
842 | { | 842 | { |
843 | struct of_device *op = fore200e->bus_dev; | 843 | struct platform_device *op = fore200e->bus_dev; |
844 | const struct linux_prom_registers *regs; | 844 | const struct linux_prom_registers *regs; |
845 | 845 | ||
846 | regs = of_get_property(op->dev.of_node, "reg", NULL); | 846 | regs = of_get_property(op->dev.of_node, "reg", NULL); |
@@ -2513,7 +2513,7 @@ fore200e_load_and_start_fw(struct fore200e* fore200e) | |||
2513 | device = &((struct pci_dev *) fore200e->bus_dev)->dev; | 2513 | device = &((struct pci_dev *) fore200e->bus_dev)->dev; |
2514 | #ifdef CONFIG_SBUS | 2514 | #ifdef CONFIG_SBUS |
2515 | else if (strcmp(fore200e->bus->model_name, "SBA-200E") == 0) | 2515 | else if (strcmp(fore200e->bus->model_name, "SBA-200E") == 0) |
2516 | device = &((struct of_device *) fore200e->bus_dev)->dev; | 2516 | device = &((struct platform_device *) fore200e->bus_dev)->dev; |
2517 | #endif | 2517 | #endif |
2518 | else | 2518 | else |
2519 | return err; | 2519 | return err; |
@@ -2643,7 +2643,7 @@ fore200e_init(struct fore200e* fore200e) | |||
2643 | } | 2643 | } |
2644 | 2644 | ||
2645 | #ifdef CONFIG_SBUS | 2645 | #ifdef CONFIG_SBUS |
2646 | static int __devinit fore200e_sba_probe(struct of_device *op, | 2646 | static int __devinit fore200e_sba_probe(struct platform_device *op, |
2647 | const struct of_device_id *match) | 2647 | const struct of_device_id *match) |
2648 | { | 2648 | { |
2649 | const struct fore200e_bus *bus = match->data; | 2649 | const struct fore200e_bus *bus = match->data; |
@@ -2675,7 +2675,7 @@ static int __devinit fore200e_sba_probe(struct of_device *op, | |||
2675 | return 0; | 2675 | return 0; |
2676 | } | 2676 | } |
2677 | 2677 | ||
2678 | static int __devexit fore200e_sba_remove(struct of_device *op) | 2678 | static int __devexit fore200e_sba_remove(struct platform_device *op) |
2679 | { | 2679 | { |
2680 | struct fore200e *fore200e = dev_get_drvdata(&op->dev); | 2680 | struct fore200e *fore200e = dev_get_drvdata(&op->dev); |
2681 | 2681 | ||