Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp657196pxb; Wed, 29 Sep 2021 07:08:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxu04o/mb92UwprgA2xFRGd52IWFD6EAIUE1fy2Vq+tcr/1OiNdoypqYsJoTWGHhX65lcCw X-Received: by 2002:a17:90b:1a90:: with SMTP id ng16mr6747538pjb.130.1632924508190; Wed, 29 Sep 2021 07:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632924508; cv=none; d=google.com; s=arc-20160816; b=iX/xk54DXhGaT4+obrRsEzfS9FA/99nr975yyAweG+4JYZR/Xb8BXz2iTZBBC18M++ qNYD8jjtcZFq5oF+M/zzr1Wl9oGdYzgaNDj6n/QLyI7kwy3rYA4ShieLf9IM58u+ggaw ySTtS5o71mJoj52WoU2d1uN0cMhXFRh6PwModNoXqz7sWfUbkvtk1cn/IcU6PLVPbfK/ 86dav1FhG/MHWJVCGlcumDBEmldgnY6O712qXt+RI/RkjsbhYonP0l8IPpi5F+ABMQke DofpbrmXbVboWpF71x0T+ToNtSX3D92Aw/uiwOKsDYiH6yzE1JrfDpFK7Ct18hnyoI91 dEsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :subject:cc:to:from:date; bh=5Ip3Nhe3ktx4EjhBbiouHZDE5BVJinbFnJ2YMJm06ZI=; b=x30fW+9dPPgVZMwSw3zOI99hjx/vfAU/zqUGF56vFbkCgbIwshhTxybQxO60o8Twrc 27AocYkk0jQWj7rnRa5paaJxMVRRIhzWwuYwNjdv097WBbM/x4YL64B4PHjjQ0i/fR5y NHcJlJnF1BxUfFtCQQkKu6MMEIsWLJCQe8z3Hq6Wstg3BzInllUkhRr5/yeKmp79hJHJ ItzJp1KZo3asl/38tRb735WoIqBXkqjxgJXGNTAKBGRY/LulbXqo4o9nL0mNudFU/gT4 eFEyWvdYp348qj5DOizc+4biF6/7VDUgA9Ma3JoVRRoPyp2lVBu1bVUCcn2VD7NgBoBh do+Q== 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 r23si2812080pfg.256.2021.09.29.07.08.13; Wed, 29 Sep 2021 07:08:27 -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 S1343560AbhI2MAZ (ORCPT + 78 others); Wed, 29 Sep 2021 08:00:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245149AbhI2MAZ (ORCPT ); Wed, 29 Sep 2021 08:00:25 -0400 X-Greylist: delayed 2642 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 29 Sep 2021 04:58:44 PDT Received: from bues.ch (bues.ch [IPv6:2a01:138:9005::1:4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39EE3C06161C; Wed, 29 Sep 2021 04:58:43 -0700 (PDT) Received: by bues.ch with esmtpsa (Exim 4.92) (envelope-from ) id 1mVXXn-0002kr-6z; Wed, 29 Sep 2021 13:14:35 +0200 Date: Wed, 29 Sep 2021 13:13:48 +0200 From: Michael =?UTF-8?B?QsO8c2No?= To: Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= Cc: Bjorn Helgaas , Christoph Hellwig , linux-pci@vger.kernel.org, kernel@pengutronix.de, linux-wireless@vger.kernel.org Subject: Re: [PATCH v5 06/11] ssb: Simplify determination of driver name Message-ID: <20210929131348.4259f79d@wiggum> In-Reply-To: <20210929085306.2203850-7-u.kleine-koenig@pengutronix.de> References: <20210929085306.2203850-1-u.kleine-koenig@pengutronix.de> <20210929085306.2203850-7-u.kleine-koenig@pengutronix.de> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/CCfYodG4Q79G07r0GK6gWqX"; protocol="application/pgp-signature"; micalg=pgp-sha512 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --Sig_/CCfYodG4Q79G07r0GK6gWqX Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 29 Sep 2021 10:53:01 +0200 Uwe Kleine-K=C3=B6nig wrote: > 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. >=20 > This has the upside of not requiring the driver member of struct pci_dev > which is about to be removed and being simpler. > struct ssb_bus *ssb; > int err =3D -ENOMEM; > - const char *name; > u32 val; > =20 > ssb =3D kzalloc(sizeof(*ssb), GFP_KERNEL); > @@ -78,10 +77,7 @@ static int ssb_pcihost_probe(struct pci_dev *dev, > err =3D pci_enable_device(dev); > if (err) > goto err_kfree_ssb; > - name =3D dev_name(&dev->dev); > - if (dev->driver && dev->driver->name) > - name =3D dev->driver->name; > - err =3D pci_request_regions(dev, name); > + err =3D pci_request_regions(dev, dev_driver_string(&dev->dev)); > if (err) > goto err_pci_disable; > pci_set_master(dev); Makes sense. Acked-by: Michael B=C3=BCsch --=20 Michael https://bues.ch/ --Sig_/CCfYodG4Q79G07r0GK6gWqX Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEihRzkKVZOnT2ipsS9TK+HZCNiw4FAmFUSmwACgkQ9TK+HZCN iw4Lug/9HzQ/VJXDIfK8OXK9XTTMvFBkkqFYZpy1+AqlA8U7plSBraAQ7f4RyfF7 9CCwMq+pu7ufranUiqZpj8mSf+ibDZdvcl09votMb0Z2Z0/CZ9SGMI/Y1SXJHoFl 6QStGfhD3Pjc3XMYvUI6rEqzcqlN3tjieRPAE6PY2vnCf3i2UyKuQoVc0z4x7fL0 I8eOdV/nR7PR+bRYoItfi4e5sjc0XL9ZUAC2BXs5gUedQKW8KX9zvOROAxA2bHHM /GEmIVr2kjgir0oTjs8jS44GHE9MxCQI4gli0c26IkfF4djaqOKhTSgmo05fj5QF TyjJZj6DGaZ69Al1XUac55GbYmY4LD6bqvgeHjJ6UvazGsWWchcLP2Cf4RO+lQKZ CxZy/Qr9IVlsMJqdyhkDtA6rsPt7UjCp+AVoX9v/fJEQbig7M8dEVAktDhgWyxq9 6mFFnypRS7k3qAfMaaLNoBeAxCPEG69HtZ4Qb/aw9rg00aYKQsN/Q+DRQdRx9NjF S0k6EU5b88qbRlInS//JSgl/ucv16jXwadk2I9aGoXZ1HtCJcEZzYMaE7f6bg9O6 3b91zqG+Fo2Dn9vl8aFNKQF70yuDPvosyIGbH3bpQQaP5CpS2KZxDNap5+V5zeFe 4PuTkpbBnV9nDx38WVYY0rWWc7CAm6j30G4QJICxzKkbF7Y8tbo= =IWi9 -----END PGP SIGNATURE----- --Sig_/CCfYodG4Q79G07r0GK6gWqX--