* [patch net-next v2] rocker: set physical device for port netdevice
@ 2016-10-27 20:32 Jiri Pirko
2016-10-29 21:16 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Pirko @ 2016-10-27 20:32 UTC (permalink / raw)
To: netdev; +Cc: davem
From: Jiri Pirko <jiri@mellanox.com>
Do this so the sysfs has "device" link correctly set.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
v1->v2:
- make pdev non-const as pointerd out by kbuild test robot
---
drivers/net/ethernet/rocker/rocker_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c
index 2e81b70..55b2ab9 100644
--- a/drivers/net/ethernet/rocker/rocker_main.c
+++ b/drivers/net/ethernet/rocker/rocker_main.c
@@ -2534,7 +2534,7 @@ static void rocker_port_dev_addr_init(struct rocker_port *rocker_port)
#define ROCKER_PORT_MAX_MTU 9000
static int rocker_probe_port(struct rocker *rocker, unsigned int port_number)
{
- const struct pci_dev *pdev = rocker->pdev;
+ struct pci_dev *pdev = rocker->pdev;
struct rocker_port *rocker_port;
struct net_device *dev;
int err;
@@ -2542,6 +2542,7 @@ static int rocker_probe_port(struct rocker *rocker, unsigned int port_number)
dev = alloc_etherdev(sizeof(struct rocker_port));
if (!dev)
return -ENOMEM;
+ SET_NETDEV_DEV(dev, &pdev->dev);
rocker_port = netdev_priv(dev);
rocker_port->dev = dev;
rocker_port->rocker = rocker;
--
2.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch net-next v2] rocker: set physical device for port netdevice
2016-10-27 20:32 [patch net-next v2] rocker: set physical device for port netdevice Jiri Pirko
@ 2016-10-29 21:16 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-10-29 21:16 UTC (permalink / raw)
To: jiri; +Cc: netdev
From: Jiri Pirko <jiri@resnulli.us>
Date: Thu, 27 Oct 2016 22:32:22 +0200
> From: Jiri Pirko <jiri@mellanox.com>
>
> Do this so the sysfs has "device" link correctly set.
>
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
> ---
> v1->v2:
> - make pdev non-const as pointerd out by kbuild test robot
Applied, thanks Jiri.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-29 21:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-27 20:32 [patch net-next v2] rocker: set physical device for port netdevice Jiri Pirko
2016-10-29 21:16 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).