From patchwork Thu Jan 19 08:43:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manuel Lauss X-Patchwork-Id: 9525297 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A762F60113 for ; Thu, 19 Jan 2017 08:44:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 923752818B for ; Thu, 19 Jan 2017 08:44:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 868432842F; Thu, 19 Jan 2017 08:44:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C2312818B for ; Thu, 19 Jan 2017 08:44:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751258AbdASIn7 (ORCPT ); Thu, 19 Jan 2017 03:43:59 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35919 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751256AbdASIn6 (ORCPT ); Thu, 19 Jan 2017 03:43:58 -0500 Received: by mail-wm0-f67.google.com with SMTP id r126so10290765wmr.3 for ; Thu, 19 Jan 2017 00:43:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=6XSmJ+ib/sm8appJi7jh14murWTVOmIzDix4CM2Ty4A=; b=M++7mY0BZdZSdWDv5BlKQAr2tqsLFIMdSYMiIqPdHIYIeieveQrwWgWg87HRkeSwQy fEhGjzltbVm5DMK8Z/YF212V8MtCL0ALj9mF85wsphd4uVO6K2Sz6BJG68ikiD5trbA0 qWNP6pjR6e/Bntkv+Pcy53bqkT2PHopjjSUK2gcoPqaGjPfh8RuyB8sf4Hac5xwLkQhK VkRjFIKbLGUBzhUCQ2nEUhkzwb+UuJbbrP2cFXTOaHaTdHeF4nirK4h2Y2t+tS6+apKo wt1aLUgNzcbAFBCAhMpulU6umZKAJtHzT7a6fB5SL5I176X26U5xAGNoEViQ/H6nU3HC Ayfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=6XSmJ+ib/sm8appJi7jh14murWTVOmIzDix4CM2Ty4A=; b=nCe9eMlBISK0ATmSyf1yyExwm1F5/h8f4li32L/a1W2HJ6Zqf53cgf1SMjHb1gYPsY hDXkfVS+7XOa5XRb8SFedjHV4VsoygSN3rq0X/1a2bF0lvraQottn0TNxwoVJ6hTtfj9 d9jr0dKCrIdLiMcFhzDlxh1N4Fs+8sOTSdliFRdfnUb8f76w3g0W0ywvmTYToNsMozcu F9iaTDHLZJU/5C9zAFA+UldYFsHMLWMzs9U87f7t/8vtQXDD4rg33SP56mxko1APAYt5 SVFKVL6VoNqmwqzZNdt9VZNjj70vf73LI2DVr/3hInKKux/CmGROcSjNmWEFRidcn6Z3 vT3A== X-Gm-Message-State: AIkVDXIqs5C2OfRML8qRE+QJJMxHbq0bV4aRLTZ8c0mZsRNygiz7UOraN9x+UPcWNjgwhg== X-Received: by 10.223.135.146 with SMTP id b18mr6198752wrb.189.1484815437123; Thu, 19 Jan 2017 00:43:57 -0800 (PST) Received: from dargo.Speedport_W_724V_Typ_A_05011603_00_009 (p200300C023CEAA41373947A54B1C3FBC.dip0.t-ipconnect.de. [2003:c0:23ce:aa41:3739:47a5:4b1c:3fbc]) by smtp.gmail.com with ESMTPSA id r5sm51711380wme.23.2017.01.19.00.43.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jan 2017 00:43:56 -0800 (PST) From: Manuel Lauss To: linux-input@vger.kernel.org Cc: Manuel Lauss , patches@opensource.wolfsonmicro.com, Robert Jarzmik Subject: [PATCH RESEND] input/wm97xx: make missing platform data non-fatal Date: Thu, 19 Jan 2017 09:43:53 +0100 Message-Id: <20170119084353.4250-1-manuel.lauss@gmail.com> X-Mailer: git-send-email 2.11.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 6480af4915d6 ("power_supply: wm97xx_battery: use power_supply_get_drvdata") made wm97xx platform data mandatory, although it's still optional. This patch fixes an oops during driver probe on one of my MIPS boards with a wm9712. Touchscreen continues to work fine, and I don't have any battery hooked up to it either, so I'm not missing any functionality. Signed-off-by: Manuel Lauss Cc: linux-input@vger.kernel.org Cc: patches@opensource.wolfsonmicro.com Cc: Robert Jarzmik Acked-by: Charles Keepax --- Resend, added Maintainers to Cc. drivers/input/touchscreen/wm97xx-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index 83cf11312fd9..c9d1c91e1887 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c @@ -682,7 +682,7 @@ static int wm97xx_probe(struct device *dev) } platform_set_drvdata(wm->battery_dev, wm); wm->battery_dev->dev.parent = dev; - wm->battery_dev->dev.platform_data = pdata->batt_pdata; + wm->battery_dev->dev.platform_data = pdata ? pdata->batt_pdata : NULL; ret = platform_device_add(wm->battery_dev); if (ret < 0) goto batt_reg_err;