Skip to content

Commit 25d490e

Browse files
Wang KefengRussell King (Oracle)
authored andcommitted
ARM: 9172/1: amba: Cleanup amba pclk operation
There is no user about amba_pclk_[un]prepare() besides pl330.c, directly use clk_[un]prepare(). After this, all the function about amba pclk operation, enable, disable, [un]prepare could be killed. Acked-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
1 parent e783362 commit 25d490e

2 files changed

Lines changed: 2 additions & 22 deletions

File tree

drivers/dma/pl330.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2968,7 +2968,7 @@ static int __maybe_unused pl330_suspend(struct device *dev)
29682968
struct amba_device *pcdev = to_amba_device(dev);
29692969

29702970
pm_runtime_force_suspend(dev);
2971-
amba_pclk_unprepare(pcdev);
2971+
clk_unprepare(pcdev->pclk);
29722972

29732973
return 0;
29742974
}
@@ -2978,7 +2978,7 @@ static int __maybe_unused pl330_resume(struct device *dev)
29782978
struct amba_device *pcdev = to_amba_device(dev);
29792979
int ret;
29802980

2981-
ret = amba_pclk_prepare(pcdev);
2981+
ret = clk_prepare(pcdev->pclk);
29822982
if (ret)
29832983
return ret;
29842984

include/linux/amba/bus.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -121,26 +121,6 @@ struct amba_device *amba_find_device(const char *, struct device *, unsigned int
121121
int amba_request_regions(struct amba_device *, const char *);
122122
void amba_release_regions(struct amba_device *);
123123

124-
static inline int amba_pclk_enable(struct amba_device *dev)
125-
{
126-
return clk_enable(dev->pclk);
127-
}
128-
129-
static inline void amba_pclk_disable(struct amba_device *dev)
130-
{
131-
clk_disable(dev->pclk);
132-
}
133-
134-
static inline int amba_pclk_prepare(struct amba_device *dev)
135-
{
136-
return clk_prepare(dev->pclk);
137-
}
138-
139-
static inline void amba_pclk_unprepare(struct amba_device *dev)
140-
{
141-
clk_unprepare(dev->pclk);
142-
}
143-
144124
/* Some drivers don't use the struct amba_device */
145125
#define AMBA_CONFIG_BITS(a) (((a) >> 24) & 0xff)
146126
#define AMBA_REV_BITS(a) (((a) >> 20) & 0x0f)

0 commit comments

Comments
 (0)