Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8737703ybi; Tue, 23 Jul 2019 14:11:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtlmddE1vyBKoPZvIVFIDRcY8AxqzKmq1ZbFqGAttThs0fxLK/Vz8vfDcngVIVvVZBhFlj X-Received: by 2002:a63:9a41:: with SMTP id e1mr79380241pgo.210.1563916302311; Tue, 23 Jul 2019 14:11:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563916302; cv=none; d=google.com; s=arc-20160816; b=EeCHbP3LyOkXZ3ixehtztOkIpaLALSr3J9xbUwHVOgWKCmvH9E0iZTYWV8NaC8d/H6 zQPsSzz936O0EGzobP3rx5Dm8MCWBmbZKUSpHw4jf7XJ+fEVII/SoVbfoRKA/aPDgavk uwuScjqVZUPdBXkXBlv5JW7vsSKJZp2pXcKLASg/S7eoMUu09C87JuQ7v0woPOX6BcuR bwKLKs/vebbnvgEMMp8zv0ZBfkKFHclcj1iTQ65XGuZY2aoECRCj+LS4cIhcieTg05AK 0vb0G7hMJyy+BpsI9hDSYhgMGncGULulxN1xc6WVbZd448NvY+PYXpke223qyti7sZqm WORg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=C7BHhulFR1p2fpuSJS5AyFuCRwwQBw3M6w71QuYYn7o=; b=xvTsGxMlARMYZpMcwcaI1IbExeVrDdzwY7Arn768mT8jOTAC0RYZBjxxfGqkl4oZ38 CHdake74GFep3ICWBSmzpbx6XixzPOPBQpXuns2/uzJLfOTQ4cFxeYOFeuJ7GwGDcGqw QDuNCfeeYOl8ceUQO2pMwveVzl6K/a+q0YEpcyhtcbGM/XBGW8ie+AqRKsM4SYkRJG9G W3RepvT8eW63BkcMpn1Ez8sQciE2v6ts1olstkccEcxSW1DaYUT3dSym3SvyUyjtm0zh MwMNIhTkchNlYZ1Rvq5wu56I0EJ/IDow2sfYE7hlx9y4vZbdh7LH7Wy8DwYmrljAm6mi IlWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=hOKunxsA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n63si13757854pjb.36.2019.07.23.14.11.26; Tue, 23 Jul 2019 14:11:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=hOKunxsA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389263AbfGWLKz (ORCPT + 99 others); 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-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 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.20.1