mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
clk: rs9: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Convert the Renesas 9-series PCIe clock generator driver from SIMPLE_DEV_PM_OPS() to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr(). This lets us drop the __maybe_unused annotations from its suspend and resume callbacks, and reduces kernel size in case CONFIG_PM or CONFIG_PM_SLEEP is disabled. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Brian Masney <bmasney@redhat.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
5ec820fc28
commit
37eb3349a3
1 changed files with 4 additions and 4 deletions
|
|
@ -354,7 +354,7 @@ static int rs9_probe(struct i2c_client *client)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int __maybe_unused rs9_suspend(struct device *dev)
|
||||
static int rs9_suspend(struct device *dev)
|
||||
{
|
||||
struct rs9_driver_data *rs9 = dev_get_drvdata(dev);
|
||||
|
||||
|
|
@ -364,7 +364,7 @@ static int __maybe_unused rs9_suspend(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused rs9_resume(struct device *dev)
|
||||
static int rs9_resume(struct device *dev)
|
||||
{
|
||||
struct rs9_driver_data *rs9 = dev_get_drvdata(dev);
|
||||
int ret;
|
||||
|
|
@ -410,12 +410,12 @@ static const struct of_device_id clk_rs9_of_match[] = {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(of, clk_rs9_of_match);
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(rs9_pm_ops, rs9_suspend, rs9_resume);
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(rs9_pm_ops, rs9_suspend, rs9_resume);
|
||||
|
||||
static struct i2c_driver rs9_driver = {
|
||||
.driver = {
|
||||
.name = "clk-renesas-pcie-9series",
|
||||
.pm = &rs9_pm_ops,
|
||||
.pm = pm_sleep_ptr(&rs9_pm_ops),
|
||||
.of_match_table = clk_rs9_of_match,
|
||||
},
|
||||
.probe = rs9_probe,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue