diff options
author | Mugunthan V N <mugunthanvnm@ti.com> | 2012-11-27 02:53:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-28 17:51:16 -0500 |
commit | 3177bf6f922f62743133abbcbbbb5545f4133b2d (patch) | |
tree | 4fd61e11cf9b4e2b600c21e94470e1bb36ac37a9 /drivers | |
parent | 83a9d197c7ecd1913e84aaa982a7215666b656f2 (diff) |
net: ethernet: cpsw: fix build warnings for CPSW when CPTS not selected
CC drivers/net/ethernet/ti/cpsw.o
drivers/net/ethernet/ti/cpsw.c: In function 'cpsw_ndo_ioctl':
drivers/net/ethernet/ti/cpsw.c:881:20: warning: unused variable 'priv'
The build warning is generated when CPTS is not selected in Kernel Build.
Fixing by passing the net_device pointer to cpts IOCTL instead of passing priv
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 02c24777e23b..c9714e1c164a 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c | |||
@@ -812,8 +812,9 @@ static void cpsw_hwtstamp_v2(struct cpsw_priv *priv) | |||
812 | __raw_writel(ETH_P_1588, &priv->regs->ts_ltype); | 812 | __raw_writel(ETH_P_1588, &priv->regs->ts_ltype); |
813 | } | 813 | } |
814 | 814 | ||
815 | static int cpsw_hwtstamp_ioctl(struct cpsw_priv *priv, struct ifreq *ifr) | 815 | static int cpsw_hwtstamp_ioctl(struct net_device *dev, struct ifreq *ifr) |
816 | { | 816 | { |
817 | struct cpsw_priv *priv = netdev_priv(dev); | ||
817 | struct cpts *cpts = &priv->cpts; | 818 | struct cpts *cpts = &priv->cpts; |
818 | struct hwtstamp_config cfg; | 819 | struct hwtstamp_config cfg; |
819 | 820 | ||
@@ -878,14 +879,12 @@ static int cpsw_hwtstamp_ioctl(struct cpsw_priv *priv, struct ifreq *ifr) | |||
878 | 879 | ||
879 | static int cpsw_ndo_ioctl(struct net_device *dev, struct ifreq *req, int cmd) | 880 | static int cpsw_ndo_ioctl(struct net_device *dev, struct ifreq *req, int cmd) |
880 | { | 881 | { |
881 | struct cpsw_priv *priv = netdev_priv(dev); | ||
882 | |||
883 | if (!netif_running(dev)) | 882 | if (!netif_running(dev)) |
884 | return -EINVAL; | 883 | return -EINVAL; |
885 | 884 | ||
886 | #ifdef CONFIG_TI_CPTS | 885 | #ifdef CONFIG_TI_CPTS |
887 | if (cmd == SIOCSHWTSTAMP) | 886 | if (cmd == SIOCSHWTSTAMP) |
888 | return cpsw_hwtstamp_ioctl(priv, req); | 887 | return cpsw_hwtstamp_ioctl(dev, req); |
889 | #endif | 888 | #endif |
890 | return -ENOTSUPP; | 889 | return -ENOTSUPP; |
891 | } | 890 | } |