summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c')
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c
index 17dc86f..90d2849 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c
@@ -670,7 +670,7 @@ static const struct dev_pm_ops shared_pm_ops = {
static int
dpaa_eth_shared_probe(struct platform_device *_of_dev)
{
- int err = 0, i;
+ int err = 0, i, channel;
struct device *dev;
struct device_node *dpa_node;
struct dpa_bp *dpa_bp;
@@ -755,13 +755,15 @@ dpaa_eth_shared_probe(struct platform_device *_of_dev)
priv->mac_dev = mac_dev;
- priv->channel = dpa_get_channel();
+ channel = dpa_get_channel();
- if (priv->channel < 0) {
- err = priv->channel;
+ if (channel < 0) {
+ err = channel;
goto get_channel_failed;
}
+ priv->channel = (uint16_t)channel;
+
/* Start a thread that will walk the cpus with affine portals
* and add this pool channel to each's dequeue mask.
*/