[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5Bad2OkWhxFrQax+V4_DrtajwjisMe3O39WfCU3qGd5zg@mail.gmail.com>
Date: Fri, 2 Mar 2018 09:35:27 -0300
From: Fabio Estevam <festevam@...il.com>
To: Mark Brown <broonie@...nel.org>
Cc: brgl@...ev.pl, David Lechner <david@...hnology.com>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: regmap: Failed to create debugfs directory
Hi Mark,
On Thu, Mar 1, 2018 at 9:27 PM, Fabio Estevam <festevam@...il.com> wrote:
> Hi Mark,
>
> On Thu, Mar 1, 2018 at 3:24 PM, Mark Brown <broonie@...nel.org> wrote:
>
>> Is this triggered by 9b947a13e7f6017f18 (regmap: use debugfs even when
>> no device)?
>
> Yes, exactly. If I revert this commit the warnings are gone.
>
> Should I send a revert or is there another way to solve it?
Does the change below look good?
diff --git a/drivers/base/regmap/regmap-debugfs.c
b/drivers/base/regmap/regmap-debugfs.c
index 7eb512b..018d3a2 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -575,7 +575,8 @@ void regmap_debugfs_init(struct regmap *map, const
char *name)
map->debugfs = debugfs_create_dir(name, regmap_debugfs_root);
if (!map->debugfs) {
- dev_warn(map->dev, "Failed to create debugfs directory\n");
+ if (map->dev)
+ dev_warn(map->dev, "Failed to create debugfs
directory\n");
return;
}
Powered by blists - more mailing lists