]> asedeno.scripts.mit.edu Git - linux.git/commit
regmap: debugfs: Disambiguate dummy debugfs file name
authorFabio Estevam <fabio.estevam@nxp.com>
Mon, 5 Mar 2018 18:52:09 +0000 (15:52 -0300)
committerMark Brown <broonie@kernel.org>
Mon, 5 Mar 2018 19:23:26 +0000 (19:23 +0000)
commita430ab205d29e7d1537b220fcf989b8080d8267f
treeb44fc875943a75361e4311df725883a6cc62d856
parent9b947a13e7f6017f18470f665992dbae267852b3
regmap: debugfs: Disambiguate dummy debugfs file name

Since commit 9b947a13e7f6 ("regmap: use debugfs even when no device")
allows the usage of regmap debugfs even when there is no device
associated, which causes several warnings like this:

(NULL device *): Failed to create debugfs directory

This happens when the debugfs file name is 'dummy'.

The first dummy debugfs creation works fine, but subsequent creations
fail as they have all the same name.

Disambiguate the 'dummy' debugfs file name by adding a suffix entry,
so that the names become dummy0, dummy1, dummy2, etc.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap-debugfs.c