summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth_macless.c10
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c10
2 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_macless.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_macless.c
index f27ce5c..0258c90 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_macless.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_macless.c
@@ -310,7 +310,7 @@ struct proxy_device *dpa_macless_proxy_probe(struct platform_device *_of_dev)
static int dpaa_eth_macless_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;
@@ -393,13 +393,15 @@ static int dpaa_eth_macless_probe(struct platform_device *_of_dev)
if (err < 0)
goto bp_create_failed;
- 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.
*/
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.
*/