Commit 28b0ffe9 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

can: m_can_platform: remove not needed casts to struct m_can_plat_priv *

The struct m_can_classdev::device_data is a void pointer, so there's no
need to cast it to struct m_can_plat_priv *, when assigning the struct
m_can_plat_priv pointer.

This patch removes the not needed casts from the m_can_platform driver.
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 6093f744
......@@ -16,24 +16,21 @@ struct m_can_plat_priv {
static u32 iomap_read_reg(struct m_can_classdev *cdev, int reg)
{
struct m_can_plat_priv *priv =
(struct m_can_plat_priv *)cdev->device_data;
struct m_can_plat_priv *priv = cdev->device_data;
return readl(priv->base + reg);
}
static u32 iomap_read_fifo(struct m_can_classdev *cdev, int offset)
{
struct m_can_plat_priv *priv =
(struct m_can_plat_priv *)cdev->device_data;
struct m_can_plat_priv *priv = cdev->device_data;
return readl(priv->mram_base + offset);
}
static int iomap_write_reg(struct m_can_classdev *cdev, int reg, int val)
{
struct m_can_plat_priv *priv =
(struct m_can_plat_priv *)cdev->device_data;
struct m_can_plat_priv *priv = cdev->device_data;
writel(val, priv->base + reg);
......@@ -42,8 +39,7 @@ static int iomap_write_reg(struct m_can_classdev *cdev, int reg, int val)
static int iomap_write_fifo(struct m_can_classdev *cdev, int offset, int val)
{
struct m_can_plat_priv *priv =
(struct m_can_plat_priv *)cdev->device_data;
struct m_can_plat_priv *priv = cdev->device_data;
writel(val, priv->mram_base + offset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment