Commit 43677d77 authored by Dominik Brodowski's avatar Dominik Brodowski Committed by Russell King

[PCMCIA] 01-lookup_bus.diff

pcmcia_lookup_bus is only called from ds.c, and doesn't need to know
about a handle -- just about the struct pcmcia_socket.
parent 238690e7
...@@ -1128,14 +1128,9 @@ int pcmcia_get_next_window(window_handle_t *win, win_req_t *req) ...@@ -1128,14 +1128,9 @@ int pcmcia_get_next_window(window_handle_t *win, win_req_t *req)
#ifdef CONFIG_CARDBUS #ifdef CONFIG_CARDBUS
struct pci_bus *pcmcia_lookup_bus(client_handle_t handle) struct pci_bus *pcmcia_lookup_bus(struct pcmcia_socket *s)
{ {
struct pcmcia_socket *s; if (!s || !(s->state & SOCKET_CARDBUS))
if (CHECK_HANDLE(handle))
return NULL;
s = SOCKET(handle);
if (!(s->state & SOCKET_CARDBUS))
return NULL; return NULL;
return s->cb_dev->subordinate; return s->cb_dev->subordinate;
......
...@@ -627,6 +627,8 @@ static int bind_request(struct pcmcia_bus_socket *s, bind_info_t *bind_info) ...@@ -627,6 +627,8 @@ static int bind_request(struct pcmcia_bus_socket *s, bind_info_t *bind_info)
/*====================================================================*/ /*====================================================================*/
extern struct pci_bus *pcmcia_lookup_bus(struct pcmcia_socket *s);
static int get_device_info(struct pcmcia_bus_socket *s, bind_info_t *bind_info, int first) static int get_device_info(struct pcmcia_bus_socket *s, bind_info_t *bind_info, int first)
{ {
socket_bind_t *b; socket_bind_t *b;
...@@ -640,7 +642,7 @@ static int get_device_info(struct pcmcia_bus_socket *s, bind_info_t *bind_info, ...@@ -640,7 +642,7 @@ static int get_device_info(struct pcmcia_bus_socket *s, bind_info_t *bind_info,
{ {
struct pci_bus *bus; struct pci_bus *bus;
bus = pcmcia_lookup_bus(s->handle); bus = pcmcia_lookup_bus(s->parent);
if (bus) { if (bus) {
struct list_head *list; struct list_head *list;
struct pci_dev *dev = NULL; struct pci_dev *dev = NULL;
......
...@@ -446,7 +446,6 @@ int pcmcia_resume_card(struct pcmcia_socket *skt); ...@@ -446,7 +446,6 @@ int pcmcia_resume_card(struct pcmcia_socket *skt);
int pcmcia_eject_card(struct pcmcia_socket *skt); int pcmcia_eject_card(struct pcmcia_socket *skt);
int pcmcia_insert_card(struct pcmcia_socket *skt); int pcmcia_insert_card(struct pcmcia_socket *skt);
int pcmcia_report_error(client_handle_t handle, error_info_t *err); int pcmcia_report_error(client_handle_t handle, error_info_t *err);
struct pci_bus *pcmcia_lookup_bus(client_handle_t handle);
#ifdef CONFIG_PCMCIA_OBSOLETE #ifdef CONFIG_PCMCIA_OBSOLETE
int pcmcia_get_first_client(client_handle_t *handle, client_req_t *req); int pcmcia_get_first_client(client_handle_t *handle, client_req_t *req);
......
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