From: Jonathan Cameron Date: Wed, 13 Jul 2011 14:54:56 +0000 (+0100) Subject: drivers:pcmcia:soc_common: make socket_init and socket_suspend optional X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a747ce835e69069f9bccfb7791008127012cbf32;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git drivers:pcmcia:soc_common: make socket_init and socket_suspend optional 10 boards define these empty, probably indicating not everyone has a use for them. Signed-off-by: Jonathan Cameron Signed-off-by: Dominik Brodowski --- diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index 768f9572a8c8..a0a9c2aa8d78 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c @@ -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; } @@ -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; }