Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

can: at91: remove at91_can_data

struct at91_can_data was used to pass a callback to the driver, allowing it
to switch the transceiver on and off. As all at91 boards are now using DT,
this is not used anymore, remove that structure.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

authored by

Alexandre Belloni and committed by
Marc Kleine-Budde
42160a04 ba61a8d9

-26
-21
drivers/net/can/at91_can.c
··· 8 8 * Public License ("GPL") version 2 as distributed in the 'COPYING' 9 9 * file from the main directory of the linux kernel source. 10 10 * 11 - * 12 - * Your platform definition file should specify something like: 13 - * 14 - * static struct at91_can_data ek_can_data = { 15 - * transceiver_switch = sam9263ek_transceiver_switch, 16 - * }; 17 - * 18 - * at91_add_device_can(&ek_can_data); 19 - * 20 11 */ 21 12 22 13 #include <linux/clk.h> ··· 24 33 #include <linux/spinlock.h> 25 34 #include <linux/string.h> 26 35 #include <linux/types.h> 27 - #include <linux/platform_data/atmel.h> 28 36 29 37 #include <linux/can/dev.h> 30 38 #include <linux/can/error.h> ··· 314 324 return reg_mid; 315 325 } 316 326 317 - /* 318 - * Swtich transceiver on or off 319 - */ 320 - static void at91_transceiver_switch(const struct at91_priv *priv, int on) 321 - { 322 - if (priv->pdata && priv->pdata->transceiver_switch) 323 - priv->pdata->transceiver_switch(on); 324 - } 325 - 326 327 static void at91_setup_mailboxes(struct net_device *dev) 327 328 { 328 329 struct at91_priv *priv = netdev_priv(dev); ··· 397 416 398 417 at91_set_bittiming(dev); 399 418 at91_setup_mailboxes(dev); 400 - at91_transceiver_switch(priv, 1); 401 419 402 420 /* enable chip */ 403 421 if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY) ··· 424 444 reg_mr = at91_read(priv, AT91_MR); 425 445 at91_write(priv, AT91_MR, reg_mr & ~AT91_MR_CANEN); 426 446 427 - at91_transceiver_switch(priv, 0); 428 447 priv->can.state = state; 429 448 } 430 449
-5
include/linux/platform_data/atmel.h
··· 74 74 struct serial_rs485 rs485; /* rs485 settings */ 75 75 }; 76 76 77 - /* CAN */ 78 - struct at91_can_data { 79 - void (*transceiver_switch)(int on); 80 - }; 81 - 82 77 /* FIXME: this needs a better location, but gets stuff building again */ 83 78 extern int at91_suspend_entering_slow_clock(void); 84 79