net/ethernet/sfc: Don't use of_node_to_eeh_dev()
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 23 Mar 2015 03:00:47 +0000 (14:00 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 24 Mar 2015 02:12:45 +0000 (13:12 +1100)
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>
drivers/net/ethernet/sfc/efx.c
drivers/net/ethernet/sfc/siena.c

index 238482495e81fa3111554fc1d98fd0209e1499a8..77d6453f6a3ea865e68434b56750f1e060bda80d 100644 (file)
@@ -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.
index 3583f0208a6ebbf08e04a55f53d6145283ed37d2..f12c811938d26b6450c536fcc66d92b3d7d3fa73 100644 (file)
@@ -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);
 }