Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1455220yba; Wed, 24 Apr 2019 23:22:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwA/X2U001yprBo34VUvK/s00kv5E9hg9h+sZyp9WoONRE3Ndc2sGTkegXLQ3B4FuPcvYTx X-Received: by 2002:a62:6845:: with SMTP id d66mr12910237pfc.21.1556173361762; Wed, 24 Apr 2019 23:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556173361; cv=none; d=google.com; s=arc-20160816; b=Fx0QiEiEg51Ra4xsmVOUi5N92UWfEHZiKHHblJB2qrIhTXXGghlT+Ej/XyjvkWbdyW gbSxGnvP7lFqQF248Ufdts7sEsDXLE9hAGaogOouodrd6FymJqP9Q37wZD2DgFBrF4On I0Ec9c+xHisfRFcUD+OJFcyHVgailqtuPDKV+C8VDxi9dznbRMzDoOBx9FsKMyy9M5G8 VzREAfzbQS5vswhi0Cobvl7rRyPwgQftyGIP5WkXILSaDsnegSZTe47ywc1I392fR6C/ k4gJyfVg7khEikQl8WrDtu4/L/zoghqnp1VjJMw+Utmu6pdj0wfDb4d5yZPByY1z+Q6+ RwFA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature; bh=HyUIjv1ZcTz3BJRhp2dFVjFVc8FZkCvFMerRUJk35rs=; b=0C6klOs2iEI6m/u0BkqOGb5BNdBtjTAbGth5Vh8drh2D+xZ5nIdgyCZCTfmLKzA6Y2 4VdALIWLT8lsbgLxJGOl96kXa+8iRaW/mUzibdOd2wCbxzoAN/uL3oe7Z9hCG17I//fW wHc8By2Z45XqT0qwjFD25RHtUoZaRp7pjJrIotDsZRmDqLUtNhdMrg+dLty7EccadDaj tioB3ebamQ1/8FbLsipkzI6NbcCxdzgaBRQSybsla4BF7IaueUg8kTu3/AkHPeEUnuqV lt8/2CZD8PpzCRKHVhYKnBK0+LGPPU1+m8NQoOwNm0Jwi61/6rjOmsHcw8l33YccZ1mb Th+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mWGOnKfd; 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=pass (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 o12si21441772plk.310.2019.04.24.23.22.26; Wed, 24 Apr 2019 23:22:41 -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=@gmail.com header.s=20161025 header.b=mWGOnKfd; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389585AbfDXTSC (ORCPT + 99 others); Wed, 24 Apr 2019 15:18:02 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:39229 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389451AbfDXTSB (ORCPT ); Wed, 24 Apr 2019 15:18:01 -0400 Received: by mail-wm1-f67.google.com with SMTP id n25so6647929wmk.4; Wed, 24 Apr 2019 12:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HyUIjv1ZcTz3BJRhp2dFVjFVc8FZkCvFMerRUJk35rs=; b=mWGOnKfdu64PXdK4VkEsSESr1A3fAGLATh3SgnROHhCWvMZgDNu3SbfVQoPybvG9pK eigLrw6HkNx5eSa60OFNw6I6AzBlh0qp0v52mQi8APrNqu/ZnNdmaA+iKPOVsqt2sCoO UOUnXM4kOp9PKJ9lKXwfABww/PaNtFz+94XxKPe2LJODsi37G30Gy73vot5PxxNWqeiU hxNThydhzbWKbCUtL5M5CZw60KzQgBVKTQSh5IWajOiiGVoJwP0oDJwDu0qP8ZACVfS0 vA0rmAJ6uWd6gloEFSDqu1PVRiB4HPHDDZoCDdJeh3wY72Eu3UBBlWTKHV+DIA2o1TxV vjqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HyUIjv1ZcTz3BJRhp2dFVjFVc8FZkCvFMerRUJk35rs=; b=hVlyt6uN5BHkc3rEd9vxUFsgBManGqjIwPTxo9vzIT6quJrgDk3AvwcVtBAVDespnY oTks6jiyODo4xLdiFgd8j/6OUXV3e1TtWXyyq2pJsnOezyTaPYvKyreuDlySNaZKyWXz glRJ8Vn4gQ0pAp3FofVKaGAAu5MSV8Wl97ZJ2TcrmweXncV1Ks/ewtnh1WTdCAFQmVT/ v1vCPdS21SI0DoixXLaXxEUjsiGUPxc+6CJzPDzTxkbbNTBeJJiov0rhnKLypnFsB+Nt rn46awZAmo1JsJg0e65KxoNsM9agrGgGy0+ULTPJW5BjNTWGlLX9hlwcmAM2w+F1IbPS V7JA== X-Gm-Message-State: APjAAAXOahAPzrFw3MKpZCtI58yvx/J90G3Xe6kfaWF/tgCZkBSh9Mek 8sf9//q+/FJYsYs7Hjprt7KI2t2oWN4= X-Received: by 2002:a1c:9c03:: with SMTP id f3mr478703wme.67.1556133478847; Wed, 24 Apr 2019 12:17:58 -0700 (PDT) Received: from ?IPv6:2003:ea:8bd4:5700:c498:ee8f:ff0a:13e5? (p200300EA8BD45700C498EE8FFF0A13E5.dip0.t-ipconnect.de. [2003:ea:8bd4:5700:c498:ee8f:ff0a:13e5]) by smtp.googlemail.com with ESMTPSA id t17sm17033907wrr.26.2019.04.24.12.17.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Apr 2019 12:17:58 -0700 (PDT) Subject: [PATCH v2 9/9] platform/chrome: chromeos_laptop: use helper pci_dev_id From: Heiner Kallweit To: Benjamin Herrenschmidt , Michael Ellerman , Oded Gabbay , Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter , Joerg Roedel , David Woodhouse , Realtek linux nic maintainers , "David S. Miller" , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Bjorn Helgaas , Benson Leung , Enric Balletbo i Serra , Stephen Rothwell , Paul Mackerras Cc: open list , "open list:AMD KFD" , "open list:RADEON and AMDGPU DRM DRIVERS" , "open list:AMD IOMMU (AMD-VI)" , "open list:8169 10/100/1000 GIGABIT ETHERNET DRIVER" , "moderated list:ARM/STM32 ARCHITECTURE" , "moderated list:ARM/STM32 ARCHITECTURE" , "open list:PCI SUBSYSTEM" References: <2e1f9a57-6d08-d017-24da-3e6b97fa2449@gmail.com> Message-ID: Date: Wed, 24 Apr 2019 21:17:19 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <2e1f9a57-6d08-d017-24da-3e6b97fa2449@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use new helper pci_dev_id() to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/platform/chrome/chromeos_laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c index 24326eecd..7abbb6167 100644 --- a/drivers/platform/chrome/chromeos_laptop.c +++ b/drivers/platform/chrome/chromeos_laptop.c @@ -125,7 +125,7 @@ static bool chromeos_laptop_match_adapter_devid(struct device *dev, u32 devid) return false; pdev = to_pci_dev(dev); - return devid == PCI_DEVID(pdev->bus->number, pdev->devfn); + return devid == pci_dev_id(pdev); } static void chromeos_laptop_check_adapter(struct i2c_adapter *adapter) -- 2.21.0