Skip to content

Commit

Permalink
hwmon: (amd_energy) modify the visibility of the counters
Browse files Browse the repository at this point in the history
This patch limits the visibility to owner and groups only for the
energy counters exposed through the hwmon based amd_energy driver.

Cc: stable@vger.kernel.org
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
Link: https://lore.kernel.org/r/20201112172159.8781-1-nchatrad@amd.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Naveen Krishna Chatradhi authored and Guenter Roeck committed Nov 13, 2020
1 parent 4d64bb4 commit 60268b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/amd_energy.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static umode_t amd_energy_is_visible(const void *_data,
enum hwmon_sensor_types type,
u32 attr, int channel)
{
return 0444;
return 0440;
}

static int energy_accumulator(void *p)
Expand Down

0 comments on commit 60268b0

Please sign in to comment.