From patchwork Fri May 13 21:26:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 784342 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4DLW60s022830 for ; Fri, 13 May 2011 21:32:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758054Ab1EMV1G (ORCPT ); Fri, 13 May 2011 17:27:06 -0400 Received: from na3sys009aog102.obsmtp.com ([74.125.149.69]:44400 "EHLO na3sys009aog102.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757986Ab1EMV1F (ORCPT ); Fri, 13 May 2011 17:27:05 -0400 Received: from mail-fx0-f51.google.com ([209.85.161.51]) (using TLSv1) by na3sys009aob102.postini.com ([74.125.148.12]) with SMTP ID DSNKTc2iJ6I35or77mgaHf5i+8JRvbRHx6NR@postini.com; Fri, 13 May 2011 14:27:04 PDT Received: by mail-fx0-f51.google.com with SMTP id 5so2262996fxm.38 for ; Fri, 13 May 2011 14:27:03 -0700 (PDT) Received: by 10.223.53.85 with SMTP id l21mr2274691fag.26.1305322022903; Fri, 13 May 2011 14:27:02 -0700 (PDT) Received: from localhost (cs181221225.pp.htv.fi [82.181.221.225]) by mx.google.com with ESMTPS id c22sm967159fat.14.2011.05.13.14.27.00 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 May 2011 14:27:02 -0700 (PDT) From: Felipe Balbi To: Luciano Coelho Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Felipe Balbi Subject: [RFC/PATCH 04/13] net: wl12xx: care for optional operations Date: Sat, 14 May 2011 00:26:21 +0300 Message-Id: <1305321990-22041-5-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.4.1.343.ga91df In-Reply-To: <1305321990-22041-1-git-send-email-balbi@ti.com> References: <1305321990-22041-1-git-send-email-balbi@ti.com> Organization: Texas Instruments\n Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 13 May 2011 21:32:06 +0000 (UTC) ->init and ->reset are optional - at least sdio.c doesn't implement them - so allow those pointers to be NULL. Signed-off-by: Felipe Balbi --- drivers/net/wireless/wl12xx/io.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/wl12xx/io.c b/drivers/net/wireless/wl12xx/io.c index d557f73..57bc646 100644 --- a/drivers/net/wireless/wl12xx/io.c +++ b/drivers/net/wireless/wl12xx/io.c @@ -117,12 +117,14 @@ EXPORT_SYMBOL_GPL(wl1271_set_partition); void wl1271_io_reset(struct wl1271 *wl) { - wl->if_ops->reset(wl); + if (wl->if_ops->reset) + wl->if_ops->reset(wl); } void wl1271_io_init(struct wl1271 *wl) { - wl->if_ops->init(wl); + if (wl->if_ops->init) + wl->if_ops->init(wl); } void wl1271_top_reg_write(struct wl1271 *wl, int addr, u16 val)