[PATCH 11/11] drm: i915: i915_sysfs: constify attribute_group structures.

2017-08-03 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by  work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/gpu/drm/i915/i915_sysfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_sysfs.c 
b/drivers/gpu/drm/i915/i915_sysfs.c
index 1eef3fa..3fe3e56 100644
--- a/drivers/gpu/drm/i915/i915_sysfs.c
+++ b/drivers/gpu/drm/i915/i915_sysfs.c
@@ -96,7 +96,7 @@ static u32 calc_residency(struct drm_i915_private *dev_priv,
NULL
 };
 
-static struct attribute_group rc6_attr_group = {
+static const struct attribute_group rc6_attr_group = {
.name = power_group_name,
.attrs =  rc6_attrs
 };
@@ -107,7 +107,7 @@ static u32 calc_residency(struct drm_i915_private *dev_priv,
NULL
 };
 
-static struct attribute_group rc6p_attr_group = {
+static const struct attribute_group rc6p_attr_group = {
.name = power_group_name,
.attrs =  rc6p_attrs
 };
@@ -117,7 +117,7 @@ static u32 calc_residency(struct drm_i915_private *dev_priv,
NULL
 };
 
-static struct attribute_group media_rc6_attr_group = {
+static const struct attribute_group media_rc6_attr_group = {
.name = power_group_name,
.attrs =  media_rc6_attrs
 };
-- 
1.9.1



[PATCH 11/11] drm: i915: i915_sysfs: constify attribute_group structures.

2017-08-03 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by  work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/gpu/drm/i915/i915_sysfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_sysfs.c 
b/drivers/gpu/drm/i915/i915_sysfs.c
index 1eef3fa..3fe3e56 100644
--- a/drivers/gpu/drm/i915/i915_sysfs.c
+++ b/drivers/gpu/drm/i915/i915_sysfs.c
@@ -96,7 +96,7 @@ static u32 calc_residency(struct drm_i915_private *dev_priv,
NULL
 };
 
-static struct attribute_group rc6_attr_group = {
+static const struct attribute_group rc6_attr_group = {
.name = power_group_name,
.attrs =  rc6_attrs
 };
@@ -107,7 +107,7 @@ static u32 calc_residency(struct drm_i915_private *dev_priv,
NULL
 };
 
-static struct attribute_group rc6p_attr_group = {
+static const struct attribute_group rc6p_attr_group = {
.name = power_group_name,
.attrs =  rc6p_attrs
 };
@@ -117,7 +117,7 @@ static u32 calc_residency(struct drm_i915_private *dev_priv,
NULL
 };
 
-static struct attribute_group media_rc6_attr_group = {
+static const struct attribute_group media_rc6_attr_group = {
.name = power_group_name,
.attrs =  media_rc6_attrs
 };
-- 
1.9.1