diff options
Diffstat (limited to 'drivers/net/can/ti_hecc.c')
| -rw-r--r-- | drivers/net/can/ti_hecc.c | 24 | 
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c index 3a349a22d5b..258b9c4856e 100644 --- a/drivers/net/can/ti_hecc.c +++ b/drivers/net/can/ti_hecc.c @@ -37,7 +37,6 @@   */  #include <linux/module.h> -#include <linux/init.h>  #include <linux/kernel.h>  #include <linux/types.h>  #include <linux/interrupt.h> @@ -286,15 +285,6 @@ static inline u32 hecc_get_bit(struct ti_hecc_priv *priv, int reg, u32 bit_mask)  	return (hecc_read(priv, reg) & bit_mask) ? 1 : 0;  } -static int ti_hecc_get_state(const struct net_device *ndev, -	enum can_state *state) -{ -	struct ti_hecc_priv *priv = netdev_priv(ndev); - -	*state = priv->can.state; -	return 0; -} -  static int ti_hecc_set_btc(struct ti_hecc_priv *priv)  {  	struct can_bittiming *bit_timing = &priv->can.bittiming; @@ -527,10 +517,10 @@ static netdev_tx_t ti_hecc_xmit(struct sk_buff *skb, struct net_device *ndev)  		data = (cf->can_id & CAN_SFF_MASK) << 18;  	hecc_write_mbx(priv, mbxno, HECC_CANMID, data);  	hecc_write_mbx(priv, mbxno, HECC_CANMDL, -		be32_to_cpu(*(u32 *)(cf->data))); +		be32_to_cpu(*(__be32 *)(cf->data)));  	if (cf->can_dlc > 4)  		hecc_write_mbx(priv, mbxno, HECC_CANMDH, -			be32_to_cpu(*(u32 *)(cf->data + 4))); +			be32_to_cpu(*(__be32 *)(cf->data + 4)));  	else  		*(u32 *)(cf->data + 4) = 0;  	can_put_echo_skb(skb, ndev, mbxno); @@ -578,12 +568,10 @@ static int ti_hecc_rx_pkt(struct ti_hecc_priv *priv, int mbxno)  		cf->can_id |= CAN_RTR_FLAG;  	cf->can_dlc = get_can_dlc(data & 0xF);  	data = hecc_read_mbx(priv, mbxno, HECC_CANMDL); -	*(u32 *)(cf->data) = cpu_to_be32(data); +	*(__be32 *)(cf->data) = cpu_to_be32(data);  	if (cf->can_dlc > 4) {  		data = hecc_read_mbx(priv, mbxno, HECC_CANMDH); -		*(u32 *)(cf->data + 4) = cpu_to_be32(data); -	} else { -		*(u32 *)(cf->data + 4) = 0; +		*(__be32 *)(cf->data + 4) = cpu_to_be32(data);  	}  	spin_lock_irqsave(&priv->mbx_lock, flags);  	hecc_clear_bit(priv, HECC_CANME, mbx_mask); @@ -883,6 +871,7 @@ static const struct net_device_ops ti_hecc_netdev_ops = {  	.ndo_open		= ti_hecc_open,  	.ndo_stop		= ti_hecc_close,  	.ndo_start_xmit		= ti_hecc_xmit, +	.ndo_change_mtu		= can_change_mtu,  };  static int ti_hecc_probe(struct platform_device *pdev) @@ -894,7 +883,7 @@ static int ti_hecc_probe(struct platform_device *pdev)  	void __iomem *addr;  	int err = -ENODEV; -	pdata = pdev->dev.platform_data; +	pdata = dev_get_platdata(&pdev->dev);  	if (!pdata) {  		dev_err(&pdev->dev, "No platform data\n");  		goto probe_exit; @@ -940,7 +929,6 @@ static int ti_hecc_probe(struct platform_device *pdev)  	priv->can.bittiming_const = &ti_hecc_bittiming_const;  	priv->can.do_set_mode = ti_hecc_do_set_mode; -	priv->can.do_get_state = ti_hecc_get_state;  	priv->can.do_get_berr_counter = ti_hecc_get_berr_counter;  	priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES;  | 
