Commit 441ac340 authored by Dan Murphy's avatar Dan Murphy Committed by Marc Kleine-Budde

can: m_can: Rename m_can_priv to m_can_classdev

Rename the common m_can_priv class structure to m_can_classdev as this
is more descriptive.
Acked-by: default avatarWolfgang Grandegger <wg@grandegger.com>
Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
Acked-by: default avatarFaiz Abbas <faiz_abbas@ti.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent f524f829
This diff is collapsed.
...@@ -57,19 +57,19 @@ struct mram_cfg { ...@@ -57,19 +57,19 @@ struct mram_cfg {
u8 num; u8 num;
}; };
struct m_can_priv; struct m_can_classdev;
struct m_can_ops { struct m_can_ops {
/* Device specific call backs */ /* Device specific call backs */
int (*clear_interrupts)(struct m_can_priv *m_can_class); int (*clear_interrupts)(struct m_can_classdev *cdev);
u32 (*read_reg)(struct m_can_priv *m_can_class, int reg); u32 (*read_reg)(struct m_can_classdev *cdev, int reg);
int (*write_reg)(struct m_can_priv *m_can_class, int reg, int val); int (*write_reg)(struct m_can_classdev *cdev, int reg, int val);
u32 (*read_fifo)(struct m_can_priv *m_can_class, int addr_offset); u32 (*read_fifo)(struct m_can_classdev *cdev, int addr_offset);
int (*write_fifo)(struct m_can_priv *m_can_class, int addr_offset, int (*write_fifo)(struct m_can_classdev *cdev, int addr_offset,
int val); int val);
int (*init)(struct m_can_priv *m_can_class); int (*init)(struct m_can_classdev *cdev);
}; };
struct m_can_priv { struct m_can_classdev {
struct can_priv can; struct can_priv can;
struct napi_struct napi; struct napi_struct napi;
struct net_device *net; struct net_device *net;
...@@ -98,12 +98,12 @@ struct m_can_priv { ...@@ -98,12 +98,12 @@ struct m_can_priv {
struct mram_cfg mcfg[MRAM_CFG_NUM]; struct mram_cfg mcfg[MRAM_CFG_NUM];
}; };
struct m_can_priv *m_can_class_allocate_dev(struct device *dev); struct m_can_classdev *m_can_class_allocate_dev(struct device *dev);
int m_can_class_register(struct m_can_priv *m_can_dev); int m_can_class_register(struct m_can_classdev *cdev);
void m_can_class_unregister(struct m_can_priv *m_can_dev); void m_can_class_unregister(struct m_can_classdev *cdev);
int m_can_class_get_clocks(struct m_can_priv *m_can_dev); int m_can_class_get_clocks(struct m_can_classdev *cdev);
void m_can_init_ram(struct m_can_priv *priv); void m_can_init_ram(struct m_can_classdev *priv);
void m_can_config_endisable(struct m_can_priv *priv, bool enable); void m_can_config_endisable(struct m_can_classdev *priv, bool enable);
int m_can_class_suspend(struct device *dev); int m_can_class_suspend(struct device *dev);
int m_can_class_resume(struct device *dev); int m_can_class_resume(struct device *dev);
......
...@@ -14,7 +14,7 @@ struct m_can_plat_priv { ...@@ -14,7 +14,7 @@ struct m_can_plat_priv {
void __iomem *mram_base; void __iomem *mram_base;
}; };
static u32 iomap_read_reg(struct m_can_priv *cdev, int reg) static u32 iomap_read_reg(struct m_can_classdev *cdev, int reg)
{ {
struct m_can_plat_priv *priv = struct m_can_plat_priv *priv =
(struct m_can_plat_priv *)cdev->device_data; (struct m_can_plat_priv *)cdev->device_data;
...@@ -22,7 +22,7 @@ static u32 iomap_read_reg(struct m_can_priv *cdev, int reg) ...@@ -22,7 +22,7 @@ static u32 iomap_read_reg(struct m_can_priv *cdev, int reg)
return readl(priv->base + reg); return readl(priv->base + reg);
} }
static u32 iomap_read_fifo(struct m_can_priv *cdev, int offset) static u32 iomap_read_fifo(struct m_can_classdev *cdev, int offset)
{ {
struct m_can_plat_priv *priv = struct m_can_plat_priv *priv =
(struct m_can_plat_priv *)cdev->device_data; (struct m_can_plat_priv *)cdev->device_data;
...@@ -30,7 +30,7 @@ static u32 iomap_read_fifo(struct m_can_priv *cdev, int offset) ...@@ -30,7 +30,7 @@ static u32 iomap_read_fifo(struct m_can_priv *cdev, int offset)
return readl(priv->mram_base + offset); return readl(priv->mram_base + offset);
} }
static int iomap_write_reg(struct m_can_priv *cdev, int reg, int val) 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 *priv =
(struct m_can_plat_priv *)cdev->device_data; (struct m_can_plat_priv *)cdev->device_data;
...@@ -40,7 +40,7 @@ static int iomap_write_reg(struct m_can_priv *cdev, int reg, int val) ...@@ -40,7 +40,7 @@ static int iomap_write_reg(struct m_can_priv *cdev, int reg, int val)
return 0; return 0;
} }
static int iomap_write_fifo(struct m_can_priv *cdev, int offset, 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 *priv =
(struct m_can_plat_priv *)cdev->device_data; (struct m_can_plat_priv *)cdev->device_data;
...@@ -59,7 +59,7 @@ static struct m_can_ops m_can_plat_ops = { ...@@ -59,7 +59,7 @@ static struct m_can_ops m_can_plat_ops = {
static int m_can_plat_probe(struct platform_device *pdev) static int m_can_plat_probe(struct platform_device *pdev)
{ {
struct m_can_priv *mcan_class; struct m_can_classdev *mcan_class;
struct m_can_plat_priv *priv; struct m_can_plat_priv *priv;
struct resource *res; struct resource *res;
void __iomem *addr; void __iomem *addr;
...@@ -131,7 +131,7 @@ static __maybe_unused int m_can_resume(struct device *dev) ...@@ -131,7 +131,7 @@ static __maybe_unused int m_can_resume(struct device *dev)
static int m_can_plat_remove(struct platform_device *pdev) static int m_can_plat_remove(struct platform_device *pdev)
{ {
struct net_device *dev = platform_get_drvdata(pdev); struct net_device *dev = platform_get_drvdata(pdev);
struct m_can_priv *mcan_class = netdev_priv(dev); struct m_can_classdev *mcan_class = netdev_priv(dev);
m_can_class_unregister(mcan_class); m_can_class_unregister(mcan_class);
...@@ -143,7 +143,7 @@ static int m_can_plat_remove(struct platform_device *pdev) ...@@ -143,7 +143,7 @@ static int m_can_plat_remove(struct platform_device *pdev)
static int __maybe_unused m_can_runtime_suspend(struct device *dev) static int __maybe_unused m_can_runtime_suspend(struct device *dev)
{ {
struct net_device *ndev = dev_get_drvdata(dev); struct net_device *ndev = dev_get_drvdata(dev);
struct m_can_priv *mcan_class = netdev_priv(ndev); struct m_can_classdev *mcan_class = netdev_priv(ndev);
m_can_class_suspend(dev); m_can_class_suspend(dev);
...@@ -156,7 +156,7 @@ static int __maybe_unused m_can_runtime_suspend(struct device *dev) ...@@ -156,7 +156,7 @@ static int __maybe_unused m_can_runtime_suspend(struct device *dev)
static int __maybe_unused m_can_runtime_resume(struct device *dev) static int __maybe_unused m_can_runtime_resume(struct device *dev)
{ {
struct net_device *ndev = dev_get_drvdata(dev); struct net_device *ndev = dev_get_drvdata(dev);
struct m_can_priv *mcan_class = netdev_priv(ndev); struct m_can_classdev *mcan_class = netdev_priv(ndev);
int err; int err;
err = clk_prepare_enable(mcan_class->hclk); err = clk_prepare_enable(mcan_class->hclk);
......
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