Skip to content

Commit b335f25

Browse files
martin-kaiserherbertx
authored andcommitted
hwrng: imx-rngc - switch to DEFINE_SIMPLE_DEV_PM_OPS
SIMPLE_DEV_PM_OPS is deprecated, replace it with DEFINE_SIMPLE_DEV_PM_OPS and use pm_sleep_ptr for setting the driver's pm routines. We can now remove the __maybe_unused qualifier in the suspend and resume functions. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 501e197 commit b335f25

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/char/hw_random/imx-rngc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ static int __init imx_rngc_probe(struct platform_device *pdev)
298298
return 0;
299299
}
300300

301-
static int __maybe_unused imx_rngc_suspend(struct device *dev)
301+
static int imx_rngc_suspend(struct device *dev)
302302
{
303303
struct imx_rngc *rngc = dev_get_drvdata(dev);
304304

@@ -307,7 +307,7 @@ static int __maybe_unused imx_rngc_suspend(struct device *dev)
307307
return 0;
308308
}
309309

310-
static int __maybe_unused imx_rngc_resume(struct device *dev)
310+
static int imx_rngc_resume(struct device *dev)
311311
{
312312
struct imx_rngc *rngc = dev_get_drvdata(dev);
313313

@@ -316,7 +316,7 @@ static int __maybe_unused imx_rngc_resume(struct device *dev)
316316
return 0;
317317
}
318318

319-
static SIMPLE_DEV_PM_OPS(imx_rngc_pm_ops, imx_rngc_suspend, imx_rngc_resume);
319+
static DEFINE_SIMPLE_DEV_PM_OPS(imx_rngc_pm_ops, imx_rngc_suspend, imx_rngc_resume);
320320

321321
static const struct of_device_id imx_rngc_dt_ids[] = {
322322
{ .compatible = "fsl,imx25-rngb" },
@@ -327,7 +327,7 @@ MODULE_DEVICE_TABLE(of, imx_rngc_dt_ids);
327327
static struct platform_driver imx_rngc_driver = {
328328
.driver = {
329329
.name = KBUILD_MODNAME,
330-
.pm = &imx_rngc_pm_ops,
330+
.pm = pm_sleep_ptr(&imx_rngc_pm_ops),
331331
.of_match_table = imx_rngc_dt_ids,
332332
},
333333
};

0 commit comments

Comments
 (0)