PowerCap: Fix mode for energy counter
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Wed, 4 Dec 2013 19:12:59 +0000 (11:12 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 5 Dec 2013 01:05:48 +0000 (02:05 +0100)
As per the documentation of powercap sysfs, energy_uj field is read only,
if it can't be reset. Currently it always allows write but will fail,
if there is no reset callback.
Changing mode field, to read only if there is no reset callback.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reported-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

No differences found