Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8447127ybi; Tue, 23 Jul 2019 08:42:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqx756BamP0CBz/sjlRotgo9xYGQM+0hmufjyqNqGfcjDhYCNXEUIcdFrMoo/xREXzPX+Nio X-Received: by 2002:a17:90a:ac13:: with SMTP id o19mr83167478pjq.143.1563896543458; Tue, 23 Jul 2019 08:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563896543; cv=none; d=google.com; s=arc-20160816; b=q67yed/3QOD+16WcDwA7W0jPiHMlCbHYGnpeS+nti5wadYJdQ53QhOP8HXF9OiReJT gft9nFTdPOpcAGBehf2/uVWobCLU5S7B8B2+1Jj03m246ONfnJijLfR+WxMNeyUiDcvU r5TIc6l0G1BkUyrOc3B8BPWAfN7/AAYG44oonn8UUf1l2EE1Gjex5LMYZLZsvmIL9MBz Ztn4kaSCqf3kVfgFVX4WraqRa0zwOrcz+gu+BSdCrdSBgTjcUKqHZ/YuTy4tDYnVQwaS vrv2FEwagvNF4sNrkeZH9z2IasgrHeNc0VTPcV9ORE3eTcw4BfO/Ly5qiTXxioyj9OuC kkdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=sh8Gc/dDBQF/6zDo3pKFTalGj99cpIcGxIJ53WfTdj0=; b=uWJMXklYB7eSJaItfJ6O7mlDHVvAM835bx1NryHsUXJsgHkvm81n4hWeI7baaq4pXU I1VdTueBTynL3/8oLtlkeoyj/h3txz8nmXOAoL+MGHuFb1yTsFEpx2EKObV3wyRz0dn+ JvFfDXedyGKIU4NCqGhmTAe2OPqh5omeft5bmZHSCiZWwz0U+sh2WwcSNoZHqw3CS2bo 9SvrhD9AOOrWHh21ROFsJPuw1gWCbQTLwUUv19QUjPa/odLzHKXLEqDLZPOAb0uIUmcu Xq8fAgsJySnm0RqsH8hi8ghBkbWY9TuS0uiZTQQKZqHKwGrIbmKLgDMLB/jmEOaXWO/i Q20A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=nke0MrUX; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u38si11609882pgl.507.2019.07.23.08.42.08; Tue, 23 Jul 2019 08:42:23 -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=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=nke0MrUX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730997AbfGWJt6 (ORCPT + 99 others); Tue, 23 Jul 2019 05:49:58 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:44351 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726305AbfGWJt6 (ORCPT ); Tue, 23 Jul 2019 05:49:58 -0400 Received: by mail-ot1-f66.google.com with SMTP id b7so4940769otl.11 for ; Tue, 23 Jul 2019 02:49:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=sh8Gc/dDBQF/6zDo3pKFTalGj99cpIcGxIJ53WfTdj0=; b=nke0MrUX3OvwZpA1bB9noPZ3vMbhXdQw+Cz3LO/mmo/787/8QWtACjGrTkwx8pggC0 x0MzMTWbECWPn/YZ1n4y+tzbUdlwpZFUXDBGX2Nqlcd8APDfD/jilQGorn3ax9AtXNlv ex6ECuI1kIPDkry1PxIyIIWG4V3buANHA6NGp41bQaq1sT5vHdzq+6rsB4qQH5wkpowi dQhYNRDEiJQvkD7dvdr/F1wHeXIFbdB0R4ybMnh/D2som7n+C5pN2wEdn4AvlgDlmnmI IvD082Y3295uyUC5JuH8yCaFpVWpHnhuljaRwWGGUoj75LBwhqRbiqk5fliVQaCSXk1Q sY3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=sh8Gc/dDBQF/6zDo3pKFTalGj99cpIcGxIJ53WfTdj0=; b=gYOFLqm+6X4/LfUrKoCWK1AZPPz2aAMqRmB+xudYf6XmppM6KO3JTZLeCo0IMEggMg uRZdHDR0icS77UnAkDlPCDhWBNx599aYmixBoD6tfsaqm6+hwjchIsKIdMkZu56iYJof VWrbxQ/yQ3vIxfIkMo1zCJTq1RN3nMC4MkvLV8zF7k3R7nhBx+TUWToQhLhiiiPM41u5 FSXE895mfYvTkKdYc+zvedQRBxGnwbD6FjM/Fvzp2ytw3/xbemNGRLZzHq6SPupW4OPL 5v1iy5fd3Q607HT+kNGAITMVuPCoi46W+yT8rX2+UxM7XL3j4sZb+7nIIqXBFjOYzRLo JWBQ== X-Gm-Message-State: APjAAAUg9RlbuHfaMN6wZr1BSwewU3z7oP+c/tEnmXJQR30LyOmU4s+t vCiFXOUSsWIh/ktaXrXl5MLDqFSu5PMP/uPkQzXCMQ== X-Received: by 2002:a9d:7352:: with SMTP id l18mr51709290otk.292.1563875397393; Tue, 23 Jul 2019 02:49:57 -0700 (PDT) MIME-Version: 1.0 References: <20190723083923.21392-1-hslester96@gmail.com> In-Reply-To: <20190723083923.21392-1-hslester96@gmail.com> From: Bartosz Golaszewski Date: Tue, 23 Jul 2019 11:49:46 +0200 Message-ID: Subject: Re: [PATCH v2] gpio: pch: Use dev_get_drvdata To: Chuhong Yuan Cc: Andy Shevchenko , Linus Walleij , linux-gpio , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wt., 23 lip 2019 o 10:39 Chuhong Yuan napisa=C5=82(a= ): > > Instead of using to_pci_dev + pci_get_drvdata, > use dev_get_drvdata to make code simpler. > > Signed-off-by: Chuhong Yuan > --- > Changes in v2: > - Change the subject line to gpio: pch: ... > > drivers/gpio/gpio-pch.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c > index 1d99293096f2..3f3d9a94b709 100644 > --- a/drivers/gpio/gpio-pch.c > +++ b/drivers/gpio/gpio-pch.c > @@ -409,8 +409,7 @@ static int pch_gpio_probe(struct pci_dev *pdev, > > static int __maybe_unused pch_gpio_suspend(struct device *dev) > { > - struct pci_dev *pdev =3D to_pci_dev(dev); > - struct pch_gpio *chip =3D pci_get_drvdata(pdev); > + struct pch_gpio *chip =3D dev_get_drvdata(dev); > unsigned long flags; > > spin_lock_irqsave(&chip->spinlock, flags); > @@ -422,8 +421,7 @@ static int __maybe_unused pch_gpio_suspend(struct dev= ice *dev) > > static int __maybe_unused pch_gpio_resume(struct device *dev) > { > - struct pci_dev *pdev =3D to_pci_dev(dev); > - struct pch_gpio *chip =3D pci_get_drvdata(pdev); > + struct pch_gpio *chip =3D dev_get_drvdata(dev); > unsigned long flags; > > spin_lock_irqsave(&chip->spinlock, flags); > -- > 2.20.1 > Acked-by: Bartosz Golaszewski