From patchwork Tue Jul 23 11:10:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuhong Yuan X-Patchwork-Id: 11054323 X-Patchwork-Delegate: jikos@jikos.cz 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 41C23138D for ; Tue, 23 Jul 2019 11:10:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23EC226E3A for ; Tue, 23 Jul 2019 11:10:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 114B327D16; Tue, 23 Jul 2019 11:10:57 +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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,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 7921326E3A for ; Tue, 23 Jul 2019 11:10:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387458AbfGWLKz (ORCPT ); Tue, 23 Jul 2019 07:10:55 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:41984 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731838AbfGWLKz (ORCPT ); Tue, 23 Jul 2019 07:10:55 -0400 Received: by mail-pg1-f196.google.com with SMTP id t132so19256688pgb.9; Tue, 23 Jul 2019 04:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=C7BHhulFR1p2fpuSJS5AyFuCRwwQBw3M6w71QuYYn7o=; b=hOKunxsAnGgZZc00D/DgYI5m/ZVwEOaQgfvXavvbKxPZt4U68doqSgstSlMYIl+XfI dJOJY0G/IyT8hM8U7clxbH65gY8cqVh3C4c3E6ymRfpLF+GcuJbTpBkwuzy4CPGuAqK/ CetIec+lh33EILsznyJvZGc8l93XTM1N/sajXDZebOgJCH4RiwV7hWvnxQH/DEk4rkJY GCA4AOBFnqeDnWSIOQa6AtW+Ck26tBSUxMaGKzpFastIkBG165E7hmy361YUViNR9Tl0 pMDYaN/XYhvDAbYKX53LP4poE8F0O7FjWi2qBnceiNzTtm5sBs6ou4ga2mHYTTcCQ+rn Rs3g== 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:mime-version :content-transfer-encoding; bh=C7BHhulFR1p2fpuSJS5AyFuCRwwQBw3M6w71QuYYn7o=; b=k1yKTaBzp65NJoCajedB4FVimmGDUJGl70uq/HllmyLK9ycb425xpk8LPIouTqlqtK orXFHYVohrPkzt9z1Ki1XwcukCLId89e825WV2o0g/32Nuq/ndAoR/iw6t2XZ5ej0bKd YvDKmbbLISO6DOt+QlJbXUQO4hChGrzMGVdoa0OnEUUV0xAqYiWxw6QSi+vGk87MhEWE g1WQd++PQ6K4LjIny7z/8nzL2r79MeHJMXPJvEz1RuzZNfxjL3MgxdBkLVJ8C1hOjE+w b1O06CEacLEpsDRNAWJDqSkniBuM7mfRjCq/rCyVvbidAp3sIKcwFHDpYS+GpuO/DuaA 3AKQ== X-Gm-Message-State: APjAAAU8NidzISg7vSYSvSxAWCVygTxmpUun2oaALCnrPXVK6o+oN2XL k+NtErpr8n6ydV+NCkuRegs= X-Google-Smtp-Source: APXvYqx+1gTSH7WvKWtA4QtKsOjbm/zVH3YNrMgh0tTmFkg18NX61FQPz7fxfKD4bSt10xrNyI8wfA== X-Received: by 2002:a62:e710:: with SMTP id s16mr5403082pfh.183.1563880254560; Tue, 23 Jul 2019 04:10:54 -0700 (PDT) Received: from suzukaze.ipads-lab.se.sjtu.edu.cn ([89.31.126.54]) by smtp.gmail.com with ESMTPSA id y11sm46675248pfb.119.2019.07.23.04.10.52 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 04:10:54 -0700 (PDT) From: Chuhong Yuan Cc: Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Chuhong Yuan Subject: [PATCH] HID: intel-ish-hid: Use dev_get_drvdata where possible Date: Tue, 23 Jul 2019 19:10:49 +0800 Message-Id: <20190723111049.11067-1-hslester96@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) 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 Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: Chuhong Yuan --- drivers/hid/intel-ish-hid/ipc/pci-ish.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c b/drivers/hid/intel-ish-hid/ipc/pci-ish.c index aa80b4d3b740..7047c14516c9 100644 --- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c +++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c @@ -204,8 +204,7 @@ static struct device __maybe_unused *ish_resume_device; */ static void __maybe_unused ish_resume_handler(struct work_struct *work) { - struct pci_dev *pdev = to_pci_dev(ish_resume_device); - struct ishtp_device *dev = pci_get_drvdata(pdev); + struct ishtp_device *dev = dev_get_drvdata(ish_resume_device); uint32_t fwsts; int ret;