Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp417497pxb; Wed, 29 Sep 2021 01:55:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKCecoZNjHH9+JIZGiHCbH/0TrgwJWCv753Zv0poNpVGIkYBVas3lH5NoLmqRTZvTl5y2m X-Received: by 2002:a17:90b:1102:: with SMTP id gi2mr5091938pjb.43.1632905737039; Wed, 29 Sep 2021 01:55:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632905737; cv=none; d=google.com; s=arc-20160816; b=WiAnjH5WnGf/Kv9QdvMXz6EgLpLsCHnKRQEbSxcA9b9qhunVXvGncfYQUP5ANfcc0W 0/wcf4TIxUCxl/CnZJ1uJwzb+XKpXkbgDuoJjmewyNd5LnUb5IyFqRwpETqFpHX/2xAW APjumSJGiOeSWegUhFSUmHuYXO00vRGPDkqQmtfPnrqmJyEgH3B7qT7sQK0urwA1BiIY Ew5bAj9kN6PcyOrp4JdOsCZ8D4EIj+YTNeFx22pTBAhm+sFvNfbYQ7VSkuC7fiJJw/X1 kCThYEA7KLaXrpD1xRzEMqx57EnwbR2dhDu9mm2RUWhFaZRIBYvvhMcI0D50+WeVzglT CluA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=W6n2lMFgn2ABg502RYGwxcYwzH0U0YZhRtg88N8HReY=; b=tnPEhLlGlouNPpnBLGYZubCKvUhfvusGUIIhAD/j+qGm7KrEZbsOOoEC/1s1aKVRcw xfteBxpyZu733Z5ASj7E6VP3PGOT6w2+bO6aCAGq9Drwo+8Ed2WHNzqTxZUzuSSHT81s 5Bf6M7ZWCbbpLxHnJx3GJoFtO/ngJp9jvcIFDQzIJzG696HRvcDhoHx+TbbOHbfdSboo UDFgH7TdVzG1mDt9MFthH122c7hZkYF4yBfsocKO5mDPR4jlQnqBPqsbSCoumNyJp/Qw QwUBue3UJwPzwa24RiS1BKe4kMvTjSNfrgTNhWkhMWuaqxsYBEdv7EoYgVEz5wjAxRkc NI7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q20si2346985plk.29.2021.09.29.01.55.15; Wed, 29 Sep 2021 01:55:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244918AbhI2IzH (ORCPT + 78 others); Wed, 29 Sep 2021 04:55:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244875AbhI2IzH (ORCPT ); Wed, 29 Sep 2021 04:55:07 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64830C06174E for ; Wed, 29 Sep 2021 01:53:26 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mVVL6-0001nC-Fk; Wed, 29 Sep 2021 10:53:20 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mVVL5-0004gh-Su; Wed, 29 Sep 2021 10:53:19 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1mVVL2-0000Qw-R7; Wed, 29 Sep 2021 10:53:16 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Bjorn Helgaas , Michael Buesch Cc: Christoph Hellwig , linux-pci@vger.kernel.org, kernel@pengutronix.de, linux-wireless@vger.kernel.org Subject: [PATCH v5 06/11] ssb: Simplify determination of driver name Date: Wed, 29 Sep 2021 10:53:01 +0200 Message-Id: <20210929085306.2203850-7-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210929085306.2203850-1-u.kleine-koenig@pengutronix.de> References: <20210929085306.2203850-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Patch-Hashes: v=1; h=sha256; i=98LA6DtO6x3YHoo9xrdF6tAQFUIynO6p1dMjF9yjRwA=; m=mHJAli6xdY7uFbp6iELfW4sNedbhs2KUAXIov4fr+Ac=; p=Pkc23pm1s8AeZXLg9vN/Ugj7OZ/vul9MFPqunUCTCFQ=; g=a63fc551b59edb3ff3251a4c4f7afaada4cebafa X-Patch-Sig: m=pgp; i=u.kleine-koenig@pengutronix.de; s=0x0D2511F322BFAB1C1580266BE2DCDD9132669BD6; b=iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmFUKVYACgkQwfwUeK3K7Am8SwgAnFm 8idVPWDFDmSLPZApFB/vIZzKwC+hgEIT4TxV5iSWIQ4CvQJfJ91xoygxlYqpuCc/KEzd4TDGkI2jw Y3WpkA4JNC8weZTJxkEdP3SdUugm7HziSF66CQXRyx2hwImI5O4vAqS7mZyMkBMCqkN7XWKKxtB4S ctbBsceZsBO1d1ra/fCU8+qVwLg3FAEbr2B+dV1v/S++1CrZiVFRaC5ozeGBVV+sRF0o152LXynUs CmEF/dU3ivEvjreraxMsC5h9SVt+90fJeZkrDwB1nuAP8Yfnk+QVWEdE7Q1vM0QcKSn0m3jxlwsoC XoALB+6CUXbDlTxH2VA8LuEtkJTodbg== Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-wireless@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org For all drivers that make use of ssb_pcihost_probe() (i.e. b43_pci_bridge_driver and b44_pci_driver) the driver name is set. As at the time for the function is called __pci_register_driver() already assigned drv->driver.name to hold the same value, use dev_driver_string() with the same result. This has the upside of not requiring the driver member of struct pci_dev which is about to be removed and being simpler. Signed-off-by: Uwe Kleine-König --- drivers/ssb/pcihost_wrapper.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/ssb/pcihost_wrapper.c b/drivers/ssb/pcihost_wrapper.c index 410215c16920..dd70fd41c77d 100644 --- a/drivers/ssb/pcihost_wrapper.c +++ b/drivers/ssb/pcihost_wrapper.c @@ -69,7 +69,6 @@ static int ssb_pcihost_probe(struct pci_dev *dev, { struct ssb_bus *ssb; int err = -ENOMEM; - const char *name; u32 val; ssb = kzalloc(sizeof(*ssb), GFP_KERNEL); @@ -78,10 +77,7 @@ static int ssb_pcihost_probe(struct pci_dev *dev, err = pci_enable_device(dev); if (err) goto err_kfree_ssb; - name = dev_name(&dev->dev); - if (dev->driver && dev->driver->name) - name = dev->driver->name; - err = pci_request_regions(dev, name); + err = pci_request_regions(dev, dev_driver_string(&dev->dev)); if (err) goto err_pci_disable; pci_set_master(dev); -- 2.30.2