From patchwork Thu Jan 5 15:43:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manuel Lauss X-Patchwork-Id: 9499231 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 42800606B5 for ; Thu, 5 Jan 2017 15:43:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37D67283F2 for ; Thu, 5 Jan 2017 15:43:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C7EB2840A; Thu, 5 Jan 2017 15:43:29 +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 C4F91283F2 for ; Thu, 5 Jan 2017 15:43:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968114AbdAEPn2 (ORCPT ); Thu, 5 Jan 2017 10:43:28 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36635 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968105AbdAEPn1 (ORCPT ); Thu, 5 Jan 2017 10:43:27 -0500 Received: by mail-wm0-f65.google.com with SMTP id m203so97130980wma.3 for ; Thu, 05 Jan 2017 07:43:26 -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=wqfd9rDXynyLSqszF1dCvNSU5xSepq/FAHPRXEAbQFo=; b=SAAcSKE4D94p+t1XpKhsCV/6yg70MlExNP8CBlcnN6uFvhYkFbcJL5Tj76BDcwhJZ8 c2XiIFZS2WhBTJqW3nGmcKWqxedU4NRqCkEqf0PmLWPFr1eh6TWVCqDH8+4zd3U4yXvI 7NUW6lM7jeF2fM0OZazZsizlYOR+0DBGK7wsMCSTf63uIdm3FK1AYyJVK0ZPOHaCwt2a r5OPABN3eg5z8RCR+wg9kPdCgK5BT21cNTh1UYFeNeiRqnBs+pJi2fWkaIPIUhTEKrZQ pSHANh6hdQG1KKLrsdtk1Dqp5AvKF6iBVk3vrg+VlQkz1u9PFQqszEhBO/hVXUsozczy 14Kw== 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=wqfd9rDXynyLSqszF1dCvNSU5xSepq/FAHPRXEAbQFo=; b=YOse1RVKSCYvoHXC7tUV4hqAibAvarFKcN4nqKKzYtr3B9a1O/nnoOMqbzO4AOxVDw NqpMNtsNr+Od1ZuMldlWwZKxB4S4LxUKf903NGjAD4gOXyS77R80/BJIp8ClwJ7aTd++ H2di08NeCahUPMyv9y59RSGNnv/Q+YRKdXUtjVbIASth1Sj4x9ceKd7DwR6mf5Hkz2GK 7+rgwFJD9AOJB1wjWW8P13D2Glv7y01iBnHBesV099RPzCDmiaL7bTpGMHaBDx40Qqkd rmqReRPqlHqoOsO781WhkrxvO/mu5NNIsNINviAkD+EBBw/k88ktQkJg/DNjd5YltBxC jm4A== X-Gm-Message-State: AIkVDXKATful01IgWO8Wfu9ft32/7IEBgD+IT1qLYpep8qM3sllxX5CD2rVTa7JlaYFvhA== X-Received: by 10.28.158.196 with SMTP id h187mr60051220wme.59.1483631005548; Thu, 05 Jan 2017 07:43:25 -0800 (PST) Received: from dargo.Speedport_W_724V_Typ_A_05011603_00_009 (p200300C023DDCA5446C567FECC7E872F.dip0.t-ipconnect.de. [2003:c0:23dd:ca54:46c5:67fe:cc7e:872f]) by smtp.gmail.com with ESMTPSA id l67sm99931344wmf.0.2017.01.05.07.43.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 07:43:24 -0800 (PST) From: Manuel Lauss To: linux-input@vger.kernel.org Cc: Robert Jarzmik , Manuel Lauss Subject: [PATCH] input/wm97xx: make missing platform data non-fatal Date: Thu, 5 Jan 2017 16:43:22 +0100 Message-Id: <20170105154322.28943-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. Signed-off-by: Manuel Lauss Reviewed-by: Robert Jarzmik --- 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;