Thread (27 messages) flat view 27 messages, 5 authors, 2011-06-15
STALE5530d

[PATCH v2 2/5] net: ep93xx_eth: pass struct device to DMA API functions

From: H Hartley Sweeten <hidden>
Date: 2011-06-09 23:40:21
Also in: netdev

On Thursday, June 02, 2011 12:00 PM, Mika Westerberg wrote:
quoted hunk ↗ jump to hunk
We shouldn't use NULL for any DMA API functions, unless we are dealing with
ISA or EISA device. So pass correct struct dev pointer to these functions.

Signed-off-by: Mika Westerberg <redacted>
Acked-by: Russell King <redacted>
---
 drivers/net/arm/ep93xx_eth.c |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c
index 5a77001..8779d3b 100644
--- a/drivers/net/arm/ep93xx_eth.c
+++ b/drivers/net/arm/ep93xx_eth.c
@@ -159,6 +159,8 @@ struct ep93xx_priv
 	void __iomem		*base_addr;
 	int			irq;
 
+	struct device		*dma_dev;
Mika,

I just noticed this macro in include/linux/netdevice.h

/* Set the sysfs physical device reference for the network logical device
 * if set prior to registration will cause a symlink during initialization.
 */
#define SET_NETDEV_DEV(net, pdev)       ((net)->dev.parent = (pdev))

Is there anyway you could use that macro in the probe to save the platform_device
(with it's associated device) instead of introducing a new struct device * in the
private data?

Regards,
Hartley
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help