Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9728694ybi; Wed, 24 Jul 2019 08:59:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTfIoWYARN0frnzDWXQq/mFTwg2LMEv7JCdTn0ylWjRi5Hwn9YozevKl5l1dXw5zTEFHhM X-Received: by 2002:aa7:97b7:: with SMTP id d23mr12529684pfq.203.1563983966078; Wed, 24 Jul 2019 08:59:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563983966; cv=none; d=google.com; s=arc-20160816; b=NdOJ/PnQjEuT50X4E4X71rS+TjtIyNiYoARF1imd8pLCl80WlVhB6da+Rhg1re1exK 2c3RnQqY6KXdSasj4wvhS55egddOPuGDZfjrKjgLffsrcRU6KNMrXitUeDeL4qGR3LC/ uahXPMmw/mv4DiFZGRPcNjXyakfzUnwQsEiXoL9wwJlLxrGoJgz+lK9WjgndNgpwPaEI TKu/63TQckZxdoqG2h80/Kx1bZV2+eT3xkgk+KJxaV88yiq6CPXWg+gbRcqgwdAzuLmd eBQhD1XPB4I+erETT3tFTIwXZHs6kzF2bC8zDQjmU4UHNnSd1/okeSX7bCczim5Cgsfk VcbA== 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=30qJDnmCZ4/uvVlJ+Clx3gFmvQD0xujSfEYRo/JqAkM=; b=VtXxO137UrM++VtmGB3rNPXNgHH1x6RDETQkVGem6F+e6/kYe6t9V5IhsDjBfnMhfr +eJ3Maq6c47OatAbppZTtYN3yC16N9ZOX8uL3pgf64X8NtkMt+nWHGlOc8qA4NFDbHTN GYWqhRL9PFVaWqNhd79gzvea2g/artL/nj2uzs+khSZAjwrIlkwoqRTW9SPaYW4/eW+Y 6vIgmkw6N+gbY+eYNKZGQUxThkCBaKLmtsBKpz4ptIcHlFBud6edEb42qy1SbegIC6IC uB+qH9M5Qm3p8Ce2Fugw1qWf4izeopfzBZrRwvkqJ0neZr4KW6iu0qjY2Gewk5KDl1+b /m6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Xxjy88ue; 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 w6si17440993pfn.84.2019.07.24.08.59.11; Wed, 24 Jul 2019 08:59:26 -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=Xxjy88ue; 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 S1728585AbfGXNSz (ORCPT + 99 others); Wed, 24 Jul 2019 09:18:55 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:40898 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727528AbfGXNSy (ORCPT ); Wed, 24 Jul 2019 09:18:54 -0400 Received: by mail-pf1-f196.google.com with SMTP id p184so20946439pfp.7; Wed, 24 Jul 2019 06:18: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=30qJDnmCZ4/uvVlJ+Clx3gFmvQD0xujSfEYRo/JqAkM=; b=Xxjy88ue/S0k3dOrtCWTrdLRFLhpaxvyecCyQNVQR83iuol49E+cry9FaW+ccHNTsq to9scdoCVuEZJmvWtzodOB4kZOyDhn3Sh7IzCsRvYIPjhS4SHYzR7BjVZ8JA9hNoxtQE jE83AjBB2kV/MfqS8I0HEArR6rfBjAV2RarGp0KESkT2n87Lmm0+mgr0uevcWYoslfMs E4BAjxAqvGthv5KhEkU7+438c0OLGHR5J94owMT3XCHC4F2Sv/ZJzhkrpns0Rk+gQ6dO Dq9wde94GaspO+IwxxaRXO1/PSHbMTtV9zhS1SJSiLEfWXBtYrIOglyq9qEZRFvQwyyR mbvQ== 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=30qJDnmCZ4/uvVlJ+Clx3gFmvQD0xujSfEYRo/JqAkM=; b=Bv7B3mqXnmidnIKcJDfrERGtZfUsjUl4w01RKv5D3RLyRQNxy8uoULiPVt0sFsia1h fRH3DBATK1PV0B92p5w1L4ePrmpbWrtH33Imqmsvyw7R4u+p0+cicpYgMA/AHbwJE2Hn PJSlk/9r+wNuyESaNJ0POyMMjIkBMSVrfl5jrNp7JwHOJsxOrRnLxRtDvCUb16UGj0m9 f05iiqwzG4RTRLqisMW/RWWa5WZ7hsz4Q+vPahcJDEVcCnaXZJZJBsSV8cGx2xW7RNpx q82xvd6uGXQuHg7qI+rKEogx8Kf8Q8SJAMAk5FH33CjuRdG6JSC7hYZ17mXWit7IKkMK T9ng== X-Gm-Message-State: APjAAAXnkjFiOgXYNtjiVK5n7AjtF0O1HEj3FFXhH0OArU69stcI9sRA 8aYZM27RGoUcN5wetCFtyPU= X-Received: by 2002:a63:6f81:: with SMTP id k123mr83112839pgc.12.1563974334092; Wed, 24 Jul 2019 06:18:54 -0700 (PDT) Received: from suzukaze.ipads-lab.se.sjtu.edu.cn ([89.31.126.54]) by smtp.gmail.com with ESMTPSA id y23sm48371791pfo.106.2019.07.24.06.18.51 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 06:18:53 -0700 (PDT) From: Chuhong Yuan Cc: Felipe Balbi , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Chuhong Yuan Subject: [PATCH] usb: gadget: pch_udc: Use dev_get_drvdata Date: Wed, 24 Jul 2019 21:18:49 +0800 Message-Id: <20190724131849.1985-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/usb/gadget/udc/pch_udc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/pch_udc.c b/drivers/usb/gadget/udc/pch_udc.c index cded51f36fc1..265dab2bbfac 100644 --- a/drivers/usb/gadget/udc/pch_udc.c +++ b/drivers/usb/gadget/udc/pch_udc.c @@ -3046,8 +3046,7 @@ static void pch_udc_remove(struct pci_dev *pdev) #ifdef CONFIG_PM_SLEEP static int pch_udc_suspend(struct device *d) { - struct pci_dev *pdev = to_pci_dev(d); - struct pch_udc_dev *dev = pci_get_drvdata(pdev); + struct pch_udc_dev *dev = dev_get_drvdata(d); pch_udc_disable_interrupts(dev, UDC_DEVINT_MSK); pch_udc_disable_ep_interrupts(dev, UDC_EPINT_MSK_DISABLE_ALL); -- 2.20.1