From patchwork Tue Apr 9 17:23:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 10891875 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9651A1515 for ; Tue, 9 Apr 2019 17:26:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84D2A26E4F for ; Tue, 9 Apr 2019 17:26:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78E1E2893C; Tue, 9 Apr 2019 17:26:25 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 233A026E4F for ; Tue, 9 Apr 2019 17:26:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726712AbfDIR0C (ORCPT ); Tue, 9 Apr 2019 13:26:02 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:35539 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726716AbfDIRYZ (ORCPT ); Tue, 9 Apr 2019 13:24:25 -0400 Received: by mail-pg1-f195.google.com with SMTP id g8so9691795pgf.2; Tue, 09 Apr 2019 10:24:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=dA8ux7CA/LyMnGAXtd3Ndhtk0tgOsCy2XAsz0prAjfA=; b=rwigojSrciJTV/G4AhGIyZE/zGC0vTvm0oHtK80B+/AWfTxZq0vnfQLu40ZwuosqNw lSf0em1eNLLpR9HIBB0nJg4EbbhOd5m6TKudxM7SLZ+fc0+lfJ1MgGwACLv2PWHfI2/2 NfPyRgH0QdOdc62aAaymI1cWJ2nTyaKktEcdw9posh3HXO8M18Tnf0+ZmE5pbVAXgBel YfNFIXbPZBXbXX25glxLFuOeexdRUheAZG6bHGdLa/scUxripKNNg1pL5bei2+pPzD5p 5Dwdtga9JtKwN50zEvAwaRQ1VZ9TLH3Bwmb51Q2gZ+syTVD40qXpliUWXXGWFWhGMuiD fQ6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=dA8ux7CA/LyMnGAXtd3Ndhtk0tgOsCy2XAsz0prAjfA=; b=GidFsI8juWMgxYMLTb/nNRNRC34xXg6QpaJFcXeTDBQ2n4MJpBGek2+kOKnpSbCKtS G9P6LTG9W87MtFlhqUhpqVkXOA+Q/CkI3hC0GY1n8KRLQuOdKPGSwaF5BDdzAlhuFwZ+ 0SI1gk5ykk0pE3G1pzvaaAryeG/hQoKS9wbA8f06P7MwQ/37Ky5FdXRxvS9n8GM1ue3K ZLESUIVBEGk8w4LlTp+1nsrrd5FjbgP1E0efO4zPm6Qt+4n3JeSnwHHzjZJG52UylKqU 53HC6jFEKygkHPVK4i/SFlZTNsc4v6SgJcKWhnjQL6/XDMyY3eeb9HU3Ch6GRG8hYzyf 90bQ== X-Gm-Message-State: APjAAAW1eOHv/f6VdrM491pA/GI4ch0coUSY+anRFzT9+JY3BvloGftf sNwjP+MX/FYWHGpFx6sbdRU= X-Google-Smtp-Source: APXvYqyN/O2WIhyqI5qpK22XZuq8UyH5OjZJjQBdiUjHCdk0fUHfY7CEjsMxQkDMsZ7lArIBxu/QZQ== X-Received: by 2002:a62:1795:: with SMTP id 143mr38608394pfx.104.1554830664327; Tue, 09 Apr 2019 10:24:24 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id h16sm10564900pgj.85.2019.04.09.10.24.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Apr 2019 10:24:23 -0700 (PDT) From: Guenter Roeck To: Wim Van Sebroeck Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck , Avi Fishman , Tomer Maimon , Patrick Venture , Nancy Yuen , Brendan Higgins Subject: [PATCH 09/23] watchdog: npcm_wdt: Use local variable 'dev' consistently Date: Tue, 9 Apr 2019 10:23:47 -0700 Message-Id: <1554830641-9247-10-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554830641-9247-1-git-send-email-linux@roeck-us.net> References: <1554830641-9247-1-git-send-email-linux@roeck-us.net> Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use local variable 'struct device *dev' consistently. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches Cc: Avi Fishman Cc: Tomer Maimon Cc: Patrick Venture Cc: Nancy Yuen Cc: Brendan Higgins Signed-off-by: Guenter Roeck --- drivers/watchdog/npcm_wdt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/watchdog/npcm_wdt.c b/drivers/watchdog/npcm_wdt.c index 4fce10c145c2..9d6c1689b12c 100644 --- a/drivers/watchdog/npcm_wdt.c +++ b/drivers/watchdog/npcm_wdt.c @@ -184,7 +184,7 @@ static int npcm_wdt_probe(struct platform_device *pdev) int irq; int ret; - wdt = devm_kzalloc(&pdev->dev, sizeof(*wdt), GFP_KERNEL); + wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); if (!wdt) return -ENOMEM; @@ -214,8 +214,8 @@ static int npcm_wdt_probe(struct platform_device *pdev) set_bit(WDOG_HW_RUNNING, &wdt->wdd.status); } - ret = devm_request_irq(dev, irq, npcm_wdt_interrupt, 0, - "watchdog", wdt); + ret = devm_request_irq(dev, irq, npcm_wdt_interrupt, 0, "watchdog", + wdt); if (ret) return ret;