Commit 35f7f006 authored by Dominik Brodowski's avatar Dominik Brodowski Committed by Russell King

[PCMCIA] Replace more socket numbers with pcmcia_socket

Replace the socket number with struct pcmcia_socket from mtd_bind_t
and bind_req_t.

 drivers/pcmcia/cs.c |    4 ++--
 drivers/pcmcia/ds.c |    6 +++---
 include/pcmcia/cs.h |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
parent cd0966e4
...@@ -1043,7 +1043,7 @@ int pcmcia_bind_device(bind_req_t *req) ...@@ -1043,7 +1043,7 @@ int pcmcia_bind_device(bind_req_t *req)
client_t *client; client_t *client;
struct pcmcia_socket *s; struct pcmcia_socket *s;
s = pcmcia_get_socket_by_nr(req->Socket); s = req->Socket;
if (!s) if (!s)
return CS_BAD_SOCKET; return CS_BAD_SOCKET;
...@@ -1079,7 +1079,7 @@ int pcmcia_bind_mtd(mtd_bind_t *req) ...@@ -1079,7 +1079,7 @@ int pcmcia_bind_mtd(mtd_bind_t *req)
socket_info_t *s; socket_info_t *s;
memory_handle_t region; memory_handle_t region;
s = pcmcia_get_socket_by_nr(req->Socket); s = req->Socket;
if (!s) if (!s)
return CS_BAD_SOCKET; return CS_BAD_SOCKET;
......
...@@ -301,7 +301,7 @@ static int bind_mtd(struct pcmcia_bus_socket *bus_sock, mtd_info_t *mtd_info) ...@@ -301,7 +301,7 @@ static int bind_mtd(struct pcmcia_bus_socket *bus_sock, mtd_info_t *mtd_info)
bind_req.dev_info = &mtd_info->dev_info; bind_req.dev_info = &mtd_info->dev_info;
bind_req.Attributes = mtd_info->Attributes; bind_req.Attributes = mtd_info->Attributes;
bind_req.Socket = bus_sock->socket_no; bind_req.Socket = bus_sock->parent;
bind_req.CardOffset = mtd_info->CardOffset; bind_req.CardOffset = mtd_info->CardOffset;
ret = pcmcia_bind_mtd(&bind_req); ret = pcmcia_bind_mtd(&bind_req);
if (ret != CS_SUCCESS) { if (ret != CS_SUCCESS) {
...@@ -351,7 +351,7 @@ static int bind_request(struct pcmcia_bus_socket *s, bind_info_t *bind_info) ...@@ -351,7 +351,7 @@ static int bind_request(struct pcmcia_bus_socket *s, bind_info_t *bind_info)
if (!try_module_get(driver->owner)) if (!try_module_get(driver->owner))
return -EINVAL; return -EINVAL;
bind_req.Socket = s->socket_no; bind_req.Socket = s->parent;
bind_req.Function = bind_info->function; bind_req.Function = bind_info->function;
bind_req.dev_info = (dev_info_t *) driver->drv.name; bind_req.dev_info = (dev_info_t *) driver->drv.name;
ret = pcmcia_bind_device(&bind_req); ret = pcmcia_bind_device(&bind_req);
...@@ -852,7 +852,7 @@ static int __devinit pcmcia_bus_add_socket(struct class_device *class_dev) ...@@ -852,7 +852,7 @@ static int __devinit pcmcia_bus_add_socket(struct class_device *class_dev)
/* Set up hotline to Card Services */ /* Set up hotline to Card Services */
client_reg.dev_info = bind.dev_info = &dev_info; client_reg.dev_info = bind.dev_info = &dev_info;
bind.Socket = s->socket_no; bind.Socket = socket;
bind.Function = BIND_FN_ALL; bind.Function = BIND_FN_ALL;
ret = pcmcia_bind_device(&bind); ret = pcmcia_bind_device(&bind);
if (ret != CS_SUCCESS) { if (ret != CS_SUCCESS) {
......
...@@ -316,7 +316,7 @@ typedef struct error_info_t { ...@@ -316,7 +316,7 @@ typedef struct error_info_t {
/* Special stuff for binding drivers to sockets */ /* Special stuff for binding drivers to sockets */
typedef struct bind_req_t { typedef struct bind_req_t {
socket_t Socket; struct pcmcia_socket *Socket;
u_char Function; u_char Function;
dev_info_t *dev_info; dev_info_t *dev_info;
} bind_req_t; } bind_req_t;
...@@ -325,7 +325,7 @@ typedef struct bind_req_t { ...@@ -325,7 +325,7 @@ typedef struct bind_req_t {
#define BIND_FN_ALL 0xff #define BIND_FN_ALL 0xff
typedef struct mtd_bind_t { typedef struct mtd_bind_t {
socket_t Socket; struct pcmcia_socket *Socket;
u_int Attributes; u_int Attributes;
u_int CardOffset; u_int CardOffset;
dev_info_t *dev_info; dev_info_t *dev_info;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment