aboutsummaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
Diffstat (limited to 'samples')
-rw-r--r--samples/kobject/kobject-example.c4
-rw-r--r--samples/kobject/kset-example.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/samples/kobject/kobject-example.c b/samples/kobject/kobject-example.c
index 8d9b55a12023..86ea0c3ad975 100644
--- a/samples/kobject/kobject-example.c
+++ b/samples/kobject/kobject-example.c
@@ -44,7 +44,7 @@ static struct kobj_attribute foo_attribute =
44 __ATTR(foo, 0666, foo_show, foo_store); 44 __ATTR(foo, 0666, foo_show, foo_store);
45 45
46/* 46/*
47 * More complex function where we determine which varible is being accessed by 47 * More complex function where we determine which variable is being accessed by
48 * looking at the attribute for the "baz" and "bar" files. 48 * looking at the attribute for the "baz" and "bar" files.
49 */ 49 */
50static ssize_t b_show(struct kobject *kobj, struct kobj_attribute *attr, 50static ssize_t b_show(struct kobject *kobj, struct kobj_attribute *attr,
@@ -79,7 +79,7 @@ static struct kobj_attribute bar_attribute =
79 79
80 80
81/* 81/*
82 * Create a group of attributes so that we can create and destory them all 82 * Create a group of attributes so that we can create and destroy them all
83 * at once. 83 * at once.
84 */ 84 */
85static struct attribute *attrs[] = { 85static struct attribute *attrs[] = {
diff --git a/samples/kobject/kset-example.c b/samples/kobject/kset-example.c
index 45b7d56fb541..3b126d1f8599 100644
--- a/samples/kobject/kset-example.c
+++ b/samples/kobject/kset-example.c
@@ -87,7 +87,7 @@ static ssize_t foo_attr_store(struct kobject *kobj,
87} 87}
88 88
89/* Our custom sysfs_ops that we will associate with our ktype later on */ 89/* Our custom sysfs_ops that we will associate with our ktype later on */
90static struct sysfs_ops foo_sysfs_ops = { 90static const struct sysfs_ops foo_sysfs_ops = {
91 .show = foo_attr_show, 91 .show = foo_attr_show,
92 .store = foo_attr_store, 92 .store = foo_attr_store,
93}; 93};
@@ -127,7 +127,7 @@ static struct foo_attribute foo_attribute =
127 __ATTR(foo, 0666, foo_show, foo_store); 127 __ATTR(foo, 0666, foo_show, foo_store);
128 128
129/* 129/*
130 * More complex function where we determine which varible is being accessed by 130 * More complex function where we determine which variable is being accessed by
131 * looking at the attribute for the "baz" and "bar" files. 131 * looking at the attribute for the "baz" and "bar" files.
132 */ 132 */
133static ssize_t b_show(struct foo_obj *foo_obj, struct foo_attribute *attr, 133static ssize_t b_show(struct foo_obj *foo_obj, struct foo_attribute *attr,
@@ -161,7 +161,7 @@ static struct foo_attribute bar_attribute =
161 __ATTR(bar, 0666, b_show, b_store); 161 __ATTR(bar, 0666, b_show, b_store);
162 162
163/* 163/*
164 * Create a group of attributes so that we can create and destory them all 164 * Create a group of attributes so that we can create and destroy them all
165 * at once. 165 * at once.
166 */ 166 */
167static struct attribute *foo_default_attrs[] = { 167static struct attribute *foo_default_attrs[] = {