Skip to content

Commit

Permalink
drivers:pcmcia:soc_common: make socket_init and socket_suspend optional
Browse files Browse the repository at this point in the history
10 boards define these empty, probably indicating not everyone has a use for them.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
  • Loading branch information
Jonathan Cameron authored and Dominik Brodowski committed Jul 29, 2011
1 parent 02f8c6a commit a747ce8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/pcmcia/soc_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ static int soc_common_pcmcia_sock_init(struct pcmcia_socket *sock)
struct soc_pcmcia_socket *skt = to_soc_pcmcia_socket(sock);

debug(skt, 2, "initializing socket\n");

skt->ops->socket_init(skt);
if (skt->ops->socket_init)
skt->ops->socket_init(skt);
return 0;
}

Expand All @@ -207,7 +207,8 @@ static int soc_common_pcmcia_suspend(struct pcmcia_socket *sock)

debug(skt, 2, "suspending socket\n");

skt->ops->socket_suspend(skt);
if (skt->ops->socket_suspend)
skt->ops->socket_suspend(skt);

return 0;
}
Expand Down

0 comments on commit a747ce8

Please sign in to comment.