mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 41/46] NET: convert the phy_device file to use bus_find_device_by_name
Date: Thu, 16 Oct 2008 10:10:42 -0700	[thread overview]
Message-ID: <1224177047-11859-41-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20081016170954.GA11824@kroah.com>

The driver core now has this helper function, so might as well use it
instead of forcing the phy code to roll their own version.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/net/phy/phy_device.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index f11e900..e11b03b 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -309,11 +309,6 @@ void phy_disconnect(struct phy_device *phydev)
 }
 EXPORT_SYMBOL(phy_disconnect);
 
-static int phy_compare_id(struct device *dev, void *data)
-{
-	return strcmp((char *)data, dev->bus_id) ? 0 : 1;
-}
-
 /**
  * phy_attach - attach a network device to a particular PHY device
  * @dev: network device to attach
@@ -337,8 +332,7 @@ struct phy_device *phy_attach(struct net_device *dev,
 
 	/* Search the list of PHY devices on the mdio bus for the
 	 * PHY with the requested name */
-	d = bus_find_device(bus, NULL, (void *)bus_id, phy_compare_id);
-
+	d = bus_find_device_by_name(bus, NULL, bus_id);
 	if (d) {
 		phydev = to_phy_device(d);
 	} else {
-- 
1.6.0.2


  parent reply	other threads:[~2008-10-16 17:29 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-16 17:09 [GIT PATCH] driver core patches for your 2.6-git tree Greg KH
2008-10-16 17:10 ` [PATCH 01/46] modules: fix module "notes" kobject leak Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 02/46] sysfs: crash debugging Greg Kroah-Hartman
2008-10-16 17:40   ` Mathieu Desnoyers
2008-10-20 20:57     ` Greg KH
2008-10-16 17:10 ` [PATCH 03/46] device create: block: convert device_create_drvdata to device_create Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 04/46] device create: char: " Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 05/46] device create: ieee1394: " Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 06/46] device create: infiniband: " Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 07/46] device create: misc: " Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 08/46] device create: net: " Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 09/46] device create: s390: " Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 10/46] device create: scsi: " Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 11/46] device create: sound: " Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 12/46] device create: usb: " Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 13/46] device create: video: " Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 14/46] device create: ide: " Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 15/46] device create: remove device_create_drvdata Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 16/46] usb gadget: link fixes for serial gadget Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 17/46] usb gadget: link fixes for gadget zero Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 18/46] usb gadget: link fixes for MIDI gadget Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 19/46] usb gadget: link fixes for printer gadget Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 20/46] usb gadget: link fixes for storage gadget Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 21/46] usb gadget: link fixes for cdc composite gadget Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 22/46] usb gadget: link fixes for network gadget Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 23/46] driver core: basic infrastructure for per-module dynamic debug messages Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 24/46] driver core: make struct platform_pm_ops static Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 25/46] sysfs: Support sysfs_notify from atomic context with new sysfs_notify_dirent Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 26/46] drivers/firmware/iscsi_ibft.c: make 3 functions static Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 27/46] Driver core: Clarify device cleanup Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 28/46] Driver core: Fix cleanup in device_create_vargs() Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 29/46] device model: Do a quickcheck for driver binding before doing an expensive check Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 30/46] sysfs: fix deadlock Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 31/46] debug: Introduce a dev_WARN() function Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 32/46] debug: use dev_WARN() rather than WARN_ON() in device_pm_add() Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 33/46] usb: turn dev_warn+WARN_ON combos into dev_WARN Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 34/46] Driver core: make bus_find_device_by_name() more robust Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 35/46] PNP: create device attributes via default device attributes Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 36/46] sysfs: use ilookup5() instead of ilookup5_nowait() Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 37/46] platform: add new device registration helper Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 38/46] sysfs: Make dir and name args to sysfs_notify() const Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 39/46] kobject: Fix kobject_rename and !CONFIG_SYSFS Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 40/46] kobject: Cleanup " Greg Kroah-Hartman
2008-10-16 17:10 ` Greg Kroah-Hartman [this message]
2008-10-16 17:10 ` [PATCH 42/46] Driver core: add bus_sort_breadthfirst() function Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 43/46] UIO: Add alignment warnings for uio-mem Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 44/46] UIO: Change driver name of uio_pdrv Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 45/46] UIO: add automata sercos3 pci card support Greg Kroah-Hartman
2008-10-16 17:10 ` [PATCH 46/46] UIO: Fix mapping of logical and virtual memory Greg Kroah-Hartman
2008-10-17 15:31 ` [GIT PATCH] driver core patches for your 2.6-git tree Jason Baron
2008-10-17 18:01   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1224177047-11859-41-git-send-email-gregkh@suse.de \
    --to=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®