Skip to content

Commit

Permalink
net/ethernet/sfc: Don't use of_node_to_eeh_dev()
Browse files Browse the repository at this point in the history
This is deprecated, it forces the driver to hop via the OF node
that may or may not exist, instead use pci_dev_to_eeh_dev() which
is simpler.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Shradha Shah <sshah@solarflare.com>
  • Loading branch information
Benjamin Herrenschmidt committed Mar 24, 2015
1 parent 2f6cf79 commit 12a89db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ethernet/sfc/efx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2523,9 +2523,7 @@ int efx_try_recovery(struct efx_nic *efx)
* schedule a 'recover or reset', leading to this recovery handler.
* Manually call the eeh failure check function.
*/
struct eeh_dev *eehdev =
of_node_to_eeh_dev(pci_device_to_OF_node(efx->pci_dev));

struct eeh_dev *eehdev = pci_dev_to_eeh_dev(efx->pci_dev);
if (eeh_dev_check_failure(eehdev)) {
/* The EEH mechanisms will handle the error and reset the
* device if necessary.
Expand Down
3 changes: 1 addition & 2 deletions drivers/net/ethernet/sfc/siena.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ static int siena_map_reset_flags(u32 *flags)
*/
static void siena_monitor(struct efx_nic *efx)
{
struct eeh_dev *eehdev =
of_node_to_eeh_dev(pci_device_to_OF_node(efx->pci_dev));
struct eeh_dev *eehdev = pci_dev_to_eeh_dev(efx->pci_dev);

eeh_dev_check_failure(eehdev);
}
Expand Down

0 comments on commit 12a89db

Please sign in to comment.