All of lore.kernel.org
 help / color / mirror / Atom feed
From: jic23@cam.ac.uk (Jonathan Cameron)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] drivers:pcmcia:soc_common: make socket_init and socket_suspend optional
Date: Wed, 13 Jul 2011 15:54:56 +0100	[thread overview]
Message-ID: <1310568898-9201-2-git-send-email-jic23@cam.ac.uk> (raw)
In-Reply-To: <1310568898-9201-1-git-send-email-jic23@cam.ac.uk>

10 boards define these empty, probably indicating not everyone has a use for them.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
---
 drivers/pcmcia/soc_common.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
index 768f957..a0a9c2a 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;
 }
-- 
1.7.3.4

  reply	other threads:[~2011-07-13 14:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-13 14:54 [PATCH 0/3] pxa2xx related pcmcia tidyups Jonathan Cameron
2011-07-13 14:54 ` Jonathan Cameron [this message]
2011-07-13 14:54 ` [PATCH 2/3] pcmcia: pxa2xx: remove empty socket_init / socket_resume functions Jonathan Cameron
2011-07-13 14:54 ` [PATCH 3/3] pxa2xx pcmcia - stargate 2 use gpio array Jonathan Cameron
2011-07-29 16:00 ` [PATCH 0/3] pxa2xx related pcmcia tidyups Dominik Brodowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1310568898-9201-2-git-send-email-jic23@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.