diff options
author | Vincent Whitchurch <vincent.whitchurch@axis.com> | 2022-03-01 12:18:30 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-03-02 13:45:30 +0000 |
commit | d2fb5487ecb2a28b61ff261ae18488afc98d24a6 (patch) | |
tree | aa81bba110588db96cfaa56569639a1d80a25702 /drivers/regulator | |
parent | 75c3543e39f0c94644eac5965b3efe50c2c5c39d (diff) | |
download | lwn-d2fb5487ecb2a28b61ff261ae18488afc98d24a6.tar.gz lwn-d2fb5487ecb2a28b61ff261ae18488afc98d24a6.zip |
regulator: virtual: warn against production use
This driver is only meant for debugging and testing. Currently, it's
not possible to use it without patching the kernel since it requires
platform data, but we'll be adding devicetree support, so add a loud
warning to make it clear that it's still only meant for debugging and
testing.
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Link: https://lore.kernel.org/r/20220301111831.3742383-3-vincent.whitchurch@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/virtual.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/regulator/virtual.c b/drivers/regulator/virtual.c index 50d2e9caaa71..9e0abbee1df5 100644 --- a/drivers/regulator/virtual.c +++ b/drivers/regulator/virtual.c @@ -285,8 +285,21 @@ static int regulator_virtual_probe(struct platform_device *pdev) { char *reg_id = dev_get_platdata(&pdev->dev); struct virtual_consumer_data *drvdata; + static bool warned; int ret; + if (!warned) { + warned = true; + pr_warn("**********************************************************\n"); + pr_warn("** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **\n"); + pr_warn("** **\n"); + pr_warn("** regulator-virtual-consumer is only for testing and **\n"); + pr_warn("** debugging. Do not use it in a production kernel. **\n"); + pr_warn("** **\n"); + pr_warn("** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **\n"); + pr_warn("**********************************************************\n"); + } + drvdata = devm_kzalloc(&pdev->dev, sizeof(struct virtual_consumer_data), GFP_KERNEL); if (drvdata == NULL) |