static u32 tcan4x5x_read_reg(struct m_can_classdev *cdev, int reg)
{
- struct tcan4x5x_priv *priv = (struct tcan4x5x_priv *)cdev->device_data;
+ struct tcan4x5x_priv *priv = cdev->device_data;
u32 val;
tcan4x5x_check_wake(priv);
static u32 tcan4x5x_read_fifo(struct m_can_classdev *cdev, int addr_offset)
{
- struct tcan4x5x_priv *priv = (struct tcan4x5x_priv *)cdev->device_data;
+ struct tcan4x5x_priv *priv = cdev->device_data;
u32 val;
tcan4x5x_check_wake(priv);
static int tcan4x5x_write_reg(struct m_can_classdev *cdev, int reg, int val)
{
- struct tcan4x5x_priv *priv = (struct tcan4x5x_priv *)cdev->device_data;
+ struct tcan4x5x_priv *priv = cdev->device_data;
tcan4x5x_check_wake(priv);
static int tcan4x5x_write_fifo(struct m_can_classdev *cdev,
int addr_offset, int val)
{
- struct tcan4x5x_priv *priv =
- (struct tcan4x5x_priv *)cdev->device_data;
+ struct tcan4x5x_priv *priv = cdev->device_data;
tcan4x5x_check_wake(priv);
static int tcan4x5x_write_tcan_reg(struct m_can_classdev *cdev,
int reg, int val)
{
- struct tcan4x5x_priv *priv =
- (struct tcan4x5x_priv *)cdev->device_data;
+ struct tcan4x5x_priv *priv = cdev->device_data;
tcan4x5x_check_wake(priv);
static int tcan4x5x_clear_interrupts(struct m_can_classdev *cdev)
{
- struct tcan4x5x_priv *tcan4x5x =
- (struct tcan4x5x_priv *)cdev->device_data;
+ struct tcan4x5x_priv *tcan4x5x = cdev->device_data;
int ret;
tcan4x5x_check_wake(tcan4x5x);
static int tcan4x5x_init(struct m_can_classdev *cdev)
{
- struct tcan4x5x_priv *tcan4x5x =
- (struct tcan4x5x_priv *)cdev->device_data;
+ struct tcan4x5x_priv *tcan4x5x = cdev->device_data;
int ret;
tcan4x5x_check_wake(tcan4x5x);
static int tcan4x5x_parse_config(struct m_can_classdev *cdev)
{
- struct tcan4x5x_priv *tcan4x5x =
- (struct tcan4x5x_priv *)cdev->device_data;
+ struct tcan4x5x_priv *tcan4x5x = cdev->device_data;
tcan4x5x->interrupt_gpio = devm_gpiod_get(cdev->dev, "data-ready",
GPIOD_IN);