clk: Fix debugfs_create_*() usage
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 3 Jan 2018 11:06:15 +0000 (12:06 +0100)
committerStephen Boyd <sboyd@codeaurora.org>
Wed, 10 Jan 2018 21:13:23 +0000 (13:13 -0800)
commit4c8326d5ebb0de3191e98980c80ab644026728d0
tree1ef8d1c0c4d358278bfec77ab56fa0a75fd000b4
parenta6059ab98130fb561157682d320c51c5ccd4b647
clk: Fix debugfs_create_*() usage

When exposing data access through debugfs, the correct
debugfs_create_*() functions must be used, matching the data
types.

Remove all casts from data pointers passed to debugfs_create_*()
functions, as such casts prevent the compiler from flagging bugs.

clk_core.rate and .accuracy are "unsigned long", hence casting
their addresses to "u32 *" exposed the wrong halves on big-endian
64-bit systems. Fix this by using debugfs_create_ulong() instead.

Octal permissions are preferred, as they are easier to read than
symbolic permissions. Hence replace "S_IRUGO" by "0444"
throughout.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[sboyd@codeaurora.org: Squash the octal change in too]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk.c