From patchwork Fri Oct 8 16:35:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Peter X-Patchwork-Id: 12545827 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFB4FC433EF for ; Fri, 8 Oct 2021 16:44:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A893D60F6D for ; Fri, 8 Oct 2021 16:44:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A893D60F6D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=svenpeter.dev Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F0X5oxjS774q7AuS44GZ/Gl5i379yBJxn294zBwGbbs=; b=A098kxpyVLpM1u OIYE5akk23jyyr/hGuHUd9iUJmW1+L3R/9krrV7M5Ama+1g2XmIhNkjO/FHLFjCE/w2X595hUp2RB SzmWe6Y3vKllpkyKnET7ErG7bcfMnrviBD3C37OTFMluwJJv1X67FdubgoMG0L7rP72Py3mV0y0ne icOdrqWkmKqJVweg46EF/k/kV2rNoBOVBu+xGbTZK8JpDxx+LGss6CsAv7upQx8WcZ0dgsCgQIKHq sMTYGamvUThuTiyf/ywIiI+3D9GFm/pu0NHvXNcBa5QTUc6Eob2wJy8vo5WwRUEYfXpQoLy+rGz0n 3MgPSmu11HKMM3EWjLHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYswi-003Ynz-Uk; Fri, 08 Oct 2021 16:42:10 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYsrC-003XNB-AG for linux-arm-kernel@lists.infradead.org; Fri, 08 Oct 2021 16:36:27 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 9F525580FF3; Fri, 8 Oct 2021 12:36:25 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 08 Oct 2021 12:36:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=fr6ByaE9Vg0E3 Hjmq3os9yydpuvF8PLVujJlpVytji8=; b=QvPZ9kFUqLD2gOtUiSCrVo8UoSRh9 SN9jBtRJl45cFujqA5nxD0AowPEFieJdzXEKFHGhg5emXZUN3P0WmlVMJkeqreIf w/9ZPFjamFDoVE86yN2VarcTt28aCIxkoPJoUMnENf7JzqAjC8lClwhe0Cu/8rc/ dKAP44ph34NHuxd5b1DDxagLehQaRFTqToIplATROrKQ59pG6HUjnYZWc0/zm0j2 AMqnyPzpKcWqbtvk9OkW+Dr0niSY/f8sKYgnjzei8WmKrmJNFWl2fnUMz41CJAC4 XMCycyJpwmq3Gq6qZZDGEw5eESXxVADGZQsYel09rRVoepMg6LB9x+9RQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=fr6ByaE9Vg0E3Hjmq3os9yydpuvF8PLVujJlpVytji8=; b=C21NNuGW eJ4JfSPezr7JVeTopivj+JKLYNkjciYwopmMR1F36nN7wPJ/aUOTr0vN7LWAtYEn 4Fw3TJB8qa2ITfVxNrknSNc3EAd0EbAqX9MacHuy3mNRRvQQrSwLTcAISjsxVnR8 l72KMat/efHuyJ2dKUgsmqlTFULB3f8MNNdjFNVVz3Hw2vlHDRC5BMhQDv7Gt0WO +Kj3opwJXlle1I+p6lNDUXcVVFe+Yd2dnIODcsxMqc6JjD2yiWYJXv03bWsdfpyY 17bLokQ976il4qspCHAG40ReX4gFv6gH+7yKbUuHU/TVtkrstDfsDf5iHBnHfDDc xd1Ko7fOFLRS6Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddttddgleelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefuvhgvnhcu rfgvthgvrhcuoehsvhgvnhesshhvvghnphgvthgvrhdruggvvheqnecuggftrfgrthhtvg hrnheptedvkeetleeuffffhfekteetffeggffgveehieelueefvddtueffveevlefhfeej necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhvvg hnsehsvhgvnhhpvghtvghrrdguvghv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Oct 2021 12:36:22 -0400 (EDT) From: Sven Peter To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Olof Johansson , Christian Zigotzky , Wolfram Sang Cc: Sven Peter , Arnd Bergmann , Hector Martin , Mohamed Mediouni , Stan Skowronek , Mark Kettenis , Alyssa Rosenzweig , linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 04/11] i2c: pasemi: Remove usage of pci_dev Date: Fri, 8 Oct 2021 18:35:25 +0200 Message-Id: <20211008163532.75569-5-sven@svenpeter.dev> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20211008163532.75569-1-sven@svenpeter.dev> References: <20211008163532.75569-1-sven@svenpeter.dev> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211008_093626_479376_36B6E03A X-CRM114-Status: GOOD ( 13.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Prepare to create a platform driver by removing all usages of pci_dev we can. Reviewed-by: Arnd Bergmann Signed-off-by: Sven Peter --- v1 -> v2: no changes drivers/i2c/busses/i2c-pasemi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-pasemi.c b/drivers/i2c/busses/i2c-pasemi.c index ca5a86cf53f1..a018e9376023 100644 --- a/drivers/i2c/busses/i2c-pasemi.c +++ b/drivers/i2c/busses/i2c-pasemi.c @@ -18,7 +18,7 @@ static struct pci_driver pasemi_smb_driver; struct pasemi_smbus { - struct pci_dev *dev; + struct device *dev; struct i2c_adapter adapter; void __iomem *ioaddr; unsigned long base; @@ -52,7 +52,7 @@ struct pasemi_smbus { static inline void reg_write(struct pasemi_smbus *smbus, int reg, int val) { - dev_dbg(&smbus->dev->dev, "smbus write reg %lx val %08x\n", + dev_dbg(smbus->dev, "smbus write reg %lx val %08x\n", smbus->base + reg, val); iowrite32(val, smbus->ioaddr + reg); } @@ -61,7 +61,7 @@ static inline int reg_read(struct pasemi_smbus *smbus, int reg) { int ret; ret = ioread32(smbus->ioaddr + reg); - dev_dbg(&smbus->dev->dev, "smbus read reg %lx val %08x\n", + dev_dbg(smbus->dev, "smbus read reg %lx val %08x\n", smbus->base + reg, ret); return ret; } @@ -94,7 +94,7 @@ static int pasemi_smb_waitready(struct pasemi_smbus *smbus) return -ENXIO; if (timeout < 0) { - dev_warn(&smbus->dev->dev, "Timeout, status 0x%08x\n", status); + dev_warn(smbus->dev, "Timeout, status 0x%08x\n", status); reg_write(smbus, REG_SMSTA, status); return -ETIME; } @@ -342,7 +342,7 @@ static int pasemi_smb_probe(struct pci_dev *dev, if (!smbus) return -ENOMEM; - smbus->dev = dev; + smbus->dev = &dev->dev; smbus->base = pci_resource_start(dev, 0); smbus->size = pci_resource_len(dev, 0); @@ -366,7 +366,7 @@ static int pasemi_smb_probe(struct pci_dev *dev, smbus->adapter.algo_data = smbus; /* set up the sysfs linkage to our parent device */ - smbus->adapter.dev.parent = &dev->dev; + smbus->adapter.dev.parent = smbus->dev; reg_write(smbus, REG_CTL, (CTL_MTR | CTL_MRR | (CLK_100K_DIV & CTL_CLK_M)));