mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 15:46:52 +07:00
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: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Dan Murphy <dmurphy@ti.com> Acked-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
f524f829b7
commit
441ac34016
File diff suppressed because it is too large
Load Diff
@ -57,19 +57,19 @@ struct mram_cfg {
|
||||
u8 num;
|
||||
};
|
||||
|
||||
struct m_can_priv;
|
||||
struct m_can_classdev;
|
||||
struct m_can_ops {
|
||||
/* Device specific call backs */
|
||||
int (*clear_interrupts)(struct m_can_priv *m_can_class);
|
||||
u32 (*read_reg)(struct m_can_priv *m_can_class, int reg);
|
||||
int (*write_reg)(struct m_can_priv *m_can_class, int reg, int val);
|
||||
u32 (*read_fifo)(struct m_can_priv *m_can_class, int addr_offset);
|
||||
int (*write_fifo)(struct m_can_priv *m_can_class, int addr_offset,
|
||||
int (*clear_interrupts)(struct m_can_classdev *cdev);
|
||||
u32 (*read_reg)(struct m_can_classdev *cdev, int reg);
|
||||
int (*write_reg)(struct m_can_classdev *cdev, int reg, int val);
|
||||
u32 (*read_fifo)(struct m_can_classdev *cdev, int addr_offset);
|
||||
int (*write_fifo)(struct m_can_classdev *cdev, int addr_offset,
|
||||
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 napi_struct napi;
|
||||
struct net_device *net;
|
||||
@ -98,12 +98,12 @@ struct m_can_priv {
|
||||
struct mram_cfg mcfg[MRAM_CFG_NUM];
|
||||
};
|
||||
|
||||
struct m_can_priv *m_can_class_allocate_dev(struct device *dev);
|
||||
int m_can_class_register(struct m_can_priv *m_can_dev);
|
||||
void m_can_class_unregister(struct m_can_priv *m_can_dev);
|
||||
int m_can_class_get_clocks(struct m_can_priv *m_can_dev);
|
||||
void m_can_init_ram(struct m_can_priv *priv);
|
||||
void m_can_config_endisable(struct m_can_priv *priv, bool enable);
|
||||
struct m_can_classdev *m_can_class_allocate_dev(struct device *dev);
|
||||
int m_can_class_register(struct m_can_classdev *cdev);
|
||||
void m_can_class_unregister(struct m_can_classdev *cdev);
|
||||
int m_can_class_get_clocks(struct m_can_classdev *cdev);
|
||||
void m_can_init_ram(struct m_can_classdev *priv);
|
||||
void m_can_config_endisable(struct m_can_classdev *priv, bool enable);
|
||||
|
||||
int m_can_class_suspend(struct device *dev);
|
||||
int m_can_class_resume(struct device *dev);
|
||||
|
@ -14,7 +14,7 @@ struct m_can_plat_priv {
|
||||
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 *)cdev->device_data;
|
||||
@ -22,7 +22,7 @@ static u32 iomap_read_reg(struct m_can_priv *cdev, int 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 *)cdev->device_data;
|
||||
@ -30,7 +30,7 @@ static u32 iomap_read_fifo(struct m_can_priv *cdev, int 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 *)cdev->device_data;
|
||||
@ -40,7 +40,7 @@ static int iomap_write_reg(struct m_can_priv *cdev, int reg, int val)
|
||||
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 *)cdev->device_data;
|
||||
@ -59,7 +59,7 @@ static struct m_can_ops m_can_plat_ops = {
|
||||
|
||||
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 resource *res;
|
||||
void __iomem *addr;
|
||||
@ -131,7 +131,7 @@ static __maybe_unused int m_can_resume(struct device *dev)
|
||||
static int m_can_plat_remove(struct platform_device *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);
|
||||
|
||||
@ -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)
|
||||
{
|
||||
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);
|
||||
|
||||
@ -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)
|
||||
{
|
||||
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;
|
||||
|
||||
err = clk_prepare_enable(mcan_class->hclk);
|
||||
|
Loading…
Reference in New Issue
Block a user