[ar71xx] create firmware image for the Ubiquiti LS-SR71 board
[openwrt.git] / target / linux / s3c24xx / patches-2.6.26 / 1135-tracking-2.6.26-rc1-sdio-pnp-changes.patch.patch
1 From 5986281af77185adca248453ca06ce4bcca6bfb9 Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Fri, 25 Jul 2008 23:06:07 +0100
4 Subject: [PATCH] tracking-2.6.26-rc1-sdio-pnp-changes.patch
5 Signed-off-by: Andy Green <andy@openmoko.com>
6
7 ---
8 drivers/sdio/stack/busdriver/sdio_bus_os.c | 33 +++++++++++-----------------
9 1 files changed, 13 insertions(+), 20 deletions(-)
10
11 diff --git a/drivers/sdio/stack/busdriver/sdio_bus_os.c b/drivers/sdio/stack/busdriver/sdio_bus_os.c
12 index dbdb955..2650d93 100644
13 --- a/drivers/sdio/stack/busdriver/sdio_bus_os.c
14 +++ b/drivers/sdio/stack/busdriver/sdio_bus_os.c
15 @@ -60,6 +60,8 @@ void pnp_remove_card_device(struct pnp_dev *dev);
16 #include <linux/sdio/sdio_busdriver.h>
17 #include <linux/sdio/sdio_lib.h>
18 #include "_busdriver.h"
19 +/* new for 2.6.26-rc1 --- not sure this is a great way... */
20 +#include "../../../pnp/base.h"
21
22 #define DESCRIPTION "SDIO Bus Driver"
23 #define AUTHOR "Atheros Communications, Inc."
24 @@ -369,14 +371,14 @@ static spinlock_t InUseDevicesLock = SPIN_LOCK_UNLOCKED;
25 static const struct pnp_device_id pnp_idtable[] = {
26 {"SD_XXXX", 0}
27 };
28 -static int sdio_get_resources(struct pnp_dev * pDev, struct pnp_resource_table * res)
29 +static int sdio_get_resources(struct pnp_dev * pDev)
30 {
31 DBG_PRINT(SDDBG_TRACE,
32 ("SDIO BusDriver - sdio_get_resources: %s\n",
33 pDev->dev.bus_id));
34 return 0;
35 }
36 -static int sdio_set_resources(struct pnp_dev * pDev, struct pnp_resource_table * res)
37 +static int sdio_set_resources(struct pnp_dev * pDev)
38 {
39 DBG_PRINT(SDDBG_TRACE,
40 ("SDIO BusDriver - sdio_set_resources: %s\n",
41 @@ -494,7 +496,8 @@ static int UnregisterDriver(PSDFUNCTION pFunction)
42 */
43 SDIO_STATUS OS_InitializeDevice(PSDDEVICE pDevice, PSDFUNCTION pFunction)
44 {
45 - struct pnp_id *pFdname;
46 + char id_name[20];
47 +
48 memset(&pDevice->Device, 0, sizeof(pDevice->Device));
49 pDevice->Device.dev.driver_data = (PVOID)pFunction;
50 //?? pDevice->Device.data = (PVOID)pFunction;
51 @@ -510,20 +513,12 @@ SDIO_STATUS OS_InitializeDevice(PSDDEVICE pDevice, PSDFUNCTION pFunction)
52 pDevice->Device.protocol = &sdio_protocol;
53 pDevice->Device.active = 1;
54
55 - pnp_init_resource_table(&pDevice->Device.res);
56 -
57 - pFdname = KernelAlloc(sizeof(struct pnp_id));
58 -
59 - if (NULL == pFdname) {
60 - return SDIO_STATUS_NO_RESOURCES;
61 - }
62 /* set the id as slot number/function number */
63 - snprintf(pFdname->id, sizeof(pFdname->id), "SD_%02X%02X",
64 + snprintf(id_name, sizeof(id_name) - 1, "SD_%02X%02X",
65 pDevice->pHcd->SlotNumber, (UINT)SDDEVICE_GET_SDIO_FUNCNO(pDevice));
66 - pFdname->next = NULL;
67 DBG_PRINT(SDDBG_TRACE, ("SDIO BusDriver - OS_InitializeDevice adding id: %s\n",
68 - pFdname->id));
69 - pnp_add_id(pFdname, &pDevice->Device);
70 + id_name));
71 + pnp_add_id(&pDevice->Device, id_name);
72
73 /* deal with DMA settings */
74 if (pDevice->pHcd->pDmaDescription != NULL) {
75 @@ -620,9 +615,9 @@ void OS_RemoveDevice(PSDDEVICE pDevice)
76 SDIO_STATUS SDIO_BusAddOSDevice(PSDDMA_DESCRIPTION pDma, POS_PNPDRIVER pDriver, POS_PNPDEVICE pDevice)
77 {
78 int err;
79 - struct pnp_id *pFdname;
80 struct pnp_device_id *pFdid;
81 static int slotNumber = 0; /* we just use an increasing count for the slots number */
82 + char id_name[20];
83
84 if (pDma != NULL) {
85 pDevice->dev.dma_mask = &pDma->Mask;
86 @@ -653,19 +648,17 @@ SDIO_STATUS SDIO_BusAddOSDevice(PSDDMA_DESCRIPTION pDma, POS_PNPDRIVER pDriver,
87 pDevice->capabilities = PNP_REMOVABLE | PNP_DISABLE;
88 pDevice->active = 1;
89
90 - pFdname = KernelAlloc(sizeof(struct pnp_id));
91 /* set the id as slot number/function number */
92 - snprintf(pFdname->id, sizeof(pFdname->id), "SD_%02X08",
93 + snprintf(id_name, sizeof(id_name) - 1, "SD_%02X08",
94 0); //??pDevice->pHcd->SlotNumber);//?????fix this, slotnumber isn't vaialble yet
95 - pFdname->next = NULL;
96 - pnp_add_id(pFdname, pDevice);
97 + pnp_add_id(pDevice, id_name);
98
99 /* get a unique device number */
100 spin_lock(&InUseDevicesLock);
101 pDevice->number = FirstClearBit(&InUseDevices);
102 SetBit(&InUseDevices, pDevice->number);
103 spin_unlock(&InUseDevicesLock);
104 - pnp_init_resource_table(&pDevice->res);
105 +
106 err = pnp_add_device(pDevice);
107 if (err < 0) {
108 DBG_PRINT(SDDBG_ERROR, ("SDIO BusDriver - SDIO_GetBusOSDevice failed pnp_device_add: %d\n",
109 --
110 1.5.6.3
111
This page took 0.050441 seconds and 5 git commands to generate.