rename target/linux/generic-2.6 to generic
[openwrt/svn-archive/archive.git] / target / linux / generic / patches-2.6.34 / 976-ssb_add_dma_dev.patch
1 From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2
3 Add dma_dev, a pointer to struct device, to struct ssb_device. We pass it
4 to the generic DMA API with SSB_BUSTYPE_PCI and SSB_BUSTYPE_SSB.
5 ssb_devices_register() sets up it properly.
6
7 This is preparation for replacing the ssb bus specific DMA API (ssb_dma_*)
8 with the generic DMA API.
9
10 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
11 Acked-by: Michael Buesch <mb@bu3sch.de>
12 Cc: Gary Zambrano <zambrano@broadcom.com>
13 Cc: Stefano Brivio <stefano.brivio@polimi.it>
14 Cc: Larry Finger <Larry.Finger@lwfinger.net>
15 Cc: John W. Linville <linville@tuxdriver.com>
16 Acked-by: David S. Miller <davem@davemloft.net>
17 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
18 ---
19
20 drivers/ssb/main.c | 2 ++
21 include/linux/ssb/ssb.h | 2 +-
22 2 files changed, 3 insertions(+), 1 deletion(-)
23
24 diff -puN drivers/ssb/main.c~ssb-add-dma_dev-to-ssb_device-structure drivers/ssb/main.c
25 --- a/drivers/ssb/main.c~ssb-add-dma_dev-to-ssb_device-structure
26 +++ a/drivers/ssb/main.c
27 @@ -486,6 +486,7 @@ static int ssb_devices_register(struct s
28 #ifdef CONFIG_SSB_PCIHOST
29 sdev->irq = bus->host_pci->irq;
30 dev->parent = &bus->host_pci->dev;
31 + sdev->dma_dev = dev->parent;
32 #endif
33 break;
34 case SSB_BUSTYPE_PCMCIA:
35 @@ -501,6 +502,7 @@ static int ssb_devices_register(struct s
36 break;
37 case SSB_BUSTYPE_SSB:
38 dev->dma_mask = &dev->coherent_dma_mask;
39 + sdev->dma_dev = dev;
40 break;
41 }
42
43 diff -puN include/linux/ssb/ssb.h~ssb-add-dma_dev-to-ssb_device-structure include/linux/ssb/ssb.h
44 --- a/include/linux/ssb/ssb.h~ssb-add-dma_dev-to-ssb_device-structure
45 +++ a/include/linux/ssb/ssb.h
46 @@ -167,7 +167,7 @@ struct ssb_device {
47 * is an optimization. */
48 const struct ssb_bus_ops *ops;
49
50 - struct device *dev;
51 + struct device *dev, *dma_dev;
52
53 struct ssb_bus *bus;
54 struct ssb_device_id id;
55 _
56 --
57 To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
58 the body of a message to majordomo@vger.kernel.org
59 More majordomo info at http://vger.kernel.org/majordomo-info.html