Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8828827ybi; Tue, 23 Jul 2019 16:11:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwT+GR4E+pG+ZrLBqRghdRIVdvx1OpfEf+qR/UoLg7ALS6th7YGJ9Eh1RakCdauUnzpm0J2 X-Received: by 2002:a63:550d:: with SMTP id j13mr15440036pgb.173.1563923495970; Tue, 23 Jul 2019 16:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563923495; cv=none; d=google.com; s=arc-20160816; b=xRb3iMmSmDrM/FMg4FTYsP/uHG9sALvd9q6dZfgj7sXmafoEUDF8MT1wQ0CLg11SDn 5Z/es9LrIjb2pfKcs/KYLR4yUcBSepEjumKCttWCKtRy+UETi0hYln9E+anV2atBvHN6 cK6AkXdx92+LSOeEjyYely/nhkAe3HdUFZGH2vPgmzjosXUa3WgqHSIXjwM446/GGRrQ HxoVIcg1DFesvOkrTau/92wvuP6C00aXDMRuJPen+0NtcLI7GmZWY7VDzfX+la07SAml fCZDRmINeILkP56RZ0QFvoVZDxqjIMLcgVoUfClmN/7JacBHxtLTnW6FS1H5g/xvkngo aLMA== 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=m3CjjylHJDgM8UoL8N43slI27v5A02DOYCpC+keeaAg=; b=kI1Xcdyge6g1VpMfF3K1SlO/DRvai7cdK+8nHGXfOBzx0ccVdpbUsGev8aUbCMuRqM lt9r6HrhW6eUiPIZI719z3B7/6vNug7eDb93Ug202+s6y/cvTNZ8xROG/IIErAXca131 I71MTyQJEo+j2PEzSshHhRZ8dz7tV1bh+q29IwJzkvV7OgSJXoqhTd7AChznzdhTtwdX w7RByQlqgLP7yBiUEGQa9z78iO0SdNxEw4OPkwPXESeOpfUveXEV15qBpSAzZeicyPb2 UVkscmsdLoaYp/YBT3i5nHmavs0Ux3RFFy8R9yfjmgpvFfPQDKv1j0JjBBqoGM2L6PsP jkZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=jQONPhns; 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 g13si12469212pgp.405.2019.07.23.16.11.19; Tue, 23 Jul 2019 16:11:35 -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=jQONPhns; 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 S2389865AbfGWMrd (ORCPT + 99 others); Tue, 23 Jul 2019 08:47:33 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:43096 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729444AbfGWMrd (ORCPT ); Tue, 23 Jul 2019 08:47:33 -0400 Received: by mail-pf1-f196.google.com with SMTP id i189so19101585pfg.10 for ; Tue, 23 Jul 2019 05:47:33 -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=m3CjjylHJDgM8UoL8N43slI27v5A02DOYCpC+keeaAg=; b=jQONPhnsbtkqI89cDYc0XbTjhAMYlmACChJwcksDP4iNqLLEGtOGc7Fr3jqrf3A4E4 8vydhwcufcKFSWeWVQHbGNRUTtSjaH/38/CNHUB4cO90CwWzRaFb2wscf53npIPO7N8A WYw10FlPHd0Y+ni458dxI/F0AaqkeHDzq7Sb6FVdfq6LvS+DMWVIyMi4rnyKWyA4JseN gqKSrKiPuVbEe40l6AMUHKl/OXQdds55rfkwnu/SmY+fuayu436lyMxv5yQzqPqH48xB 3300c2zsFmkgMP3NNxJdbiFKKGRde2g+/mujOPOdS1WIzhkLMSK3b3GMTJSEhQ4Zgyt4 U0Uw== 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=m3CjjylHJDgM8UoL8N43slI27v5A02DOYCpC+keeaAg=; b=Mw4XG/xstTv2nlazE4CscWnqjcaXjz/dQ5qqk2AeOFbk8ctrALTpM/XJb/mflE7ogY oGdBTf+4Q4eKECalV7Vr7AMmqVIz1s9tt5b5i02ttZyZoWM2ZBP/GCv4QUeNppBnkqFq n1h6XxuTrXpMBunM6QULfUpNSIJ0jqwyKtohL7TQvaZj43EdXu3RFSKQr5BeWkeMCJ2Y SXs09X+PerM8hxu6nhD/h0aguO5Rp1S6J/L1WYckJaS3Se4F+xX6PKTuyuscMAbtMNmk CGlmrY+wOVB/K5hM9t5JBttVXlcS/slDnEl0OJ/xZ05mfZut3L69YfFOAMUyktYrizse jBrw== X-Gm-Message-State: APjAAAWGAILVhtK+JLIWEFoVvs0yqSydX7OqbwqluiBvKrsO/OLE0/l7 peXXVYuT5jS6XZF0Hjio1Do= X-Received: by 2002:a17:90a:2562:: with SMTP id j89mr82421377pje.123.1563886052811; Tue, 23 Jul 2019 05:47:32 -0700 (PDT) Received: from suzukaze.ipads-lab.se.sjtu.edu.cn ([89.31.126.54]) by smtp.gmail.com with ESMTPSA id g2sm72335839pfq.88.2019.07.23.05.47.29 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 05:47:32 -0700 (PDT) From: Chuhong Yuan Cc: Maxim Levitsky , Miquel Raynal , David Woodhouse , Brian Norris , Marek Vasut , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Chuhong Yuan Subject: [PATCH] mtd: rawnand: r852: Use dev_get_drvdata Date: Tue, 23 Jul 2019 20:47:27 +0800 Message-Id: <20190723124727.24851-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/mtd/nand/raw/r852.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/r852.c b/drivers/mtd/nand/raw/r852.c index dae0d235bb17..77774250fb11 100644 --- a/drivers/mtd/nand/raw/r852.c +++ b/drivers/mtd/nand/raw/r852.c @@ -998,7 +998,7 @@ static void r852_shutdown(struct pci_dev *pci_dev) #ifdef CONFIG_PM_SLEEP static int r852_suspend(struct device *device) { - struct r852_device *dev = pci_get_drvdata(to_pci_dev(device)); + struct r852_device *dev = dev_get_drvdata(device); if (dev->ctlreg & R852_CTL_CARDENABLE) return -EBUSY; @@ -1019,7 +1019,7 @@ static int r852_suspend(struct device *device) static int r852_resume(struct device *device) { - struct r852_device *dev = pci_get_drvdata(to_pci_dev(device)); + struct r852_device *dev = dev_get_drvdata(device); r852_disable_irqs(dev); r852_card_update_present(dev); -- 2.20.1