Skip to content

Commit 12a89db

Browse files
committed
net/ethernet/sfc: Don't use of_node_to_eeh_dev()
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>
1 parent 2f6cf79 commit 12a89db

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

drivers/net/ethernet/sfc/efx.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2523,9 +2523,7 @@ int efx_try_recovery(struct efx_nic *efx)
25232523
* schedule a 'recover or reset', leading to this recovery handler.
25242524
* Manually call the eeh failure check function.
25252525
*/
2526-
struct eeh_dev *eehdev =
2527-
of_node_to_eeh_dev(pci_device_to_OF_node(efx->pci_dev));
2528-
2526+
struct eeh_dev *eehdev = pci_dev_to_eeh_dev(efx->pci_dev);
25292527
if (eeh_dev_check_failure(eehdev)) {
25302528
/* The EEH mechanisms will handle the error and reset the
25312529
* device if necessary.

drivers/net/ethernet/sfc/siena.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,7 @@ static int siena_map_reset_flags(u32 *flags)
205205
*/
206206
static void siena_monitor(struct efx_nic *efx)
207207
{
208-
struct eeh_dev *eehdev =
209-
of_node_to_eeh_dev(pci_device_to_OF_node(efx->pci_dev));
208+
struct eeh_dev *eehdev = pci_dev_to_eeh_dev(efx->pci_dev);
210209

211210
eeh_dev_check_failure(eehdev);
212211
}

0 commit comments

Comments
 (0)