We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5aabe58 + f798488 commit ecf0ed9Copy full SHA for ecf0ed9
examples/dht11.c
@@ -148,12 +148,10 @@ static ssize_t device_read(struct file *filp, char __user *buffer,
148
}
149
150
static struct file_operations fops = {
151
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
152
.owner = THIS_MODULE,
153
-#endif
154
.open = device_open,
155
.release = device_release,
156
- .read = device_read
+ .read = device_read,
157
};
158
159
/* Initialize the module - Register the character device */
@@ -182,9 +180,7 @@ static int __init dht11_init(void)
182
180
MINOR(dht11_device.dev_num));
183
181
184
/* Prevents module unloading while operations are in use */
185
186
dht11_device.cdev.owner = THIS_MODULE;
187
188
189
cdev_init(&dht11_device.cdev, &fops);
190
ret = cdev_add(&dht11_device.cdev, dht11_device.dev_num, 1);
examples/ioctl.c
@@ -140,9 +140,7 @@ static int test_ioctl_open(struct inode *inode, struct file *filp)
140
141
142
143
144
145
146
.open = test_ioctl_open,
147
.release = test_ioctl_close,
.read = test_ioctl_read,
examples/static_key.c
@@ -41,9 +41,7 @@ static struct class *cls;
41
static DEFINE_STATIC_KEY_FALSE(fkey);
42
43
static struct file_operations chardev_fops = {
44
45
46
47
48
49
.read = device_read,
examples/vinput.c
@@ -133,9 +133,7 @@ static ssize_t vinput_write(struct file *file, const char __user *buffer,
133
134
135
static const struct file_operations vinput_fops = {
136
137
138
139
.open = vinput_open,
.release = vinput_release,
.read = vinput_read,
@@ -337,6 +335,9 @@ ATTRIBUTE_GROUPS(vinput_class);
337
335
338
336
static struct class vinput_class = {
339
.name = "vinput",
+/* .owner was removed in Linux v6.4 via upstream commit 6e30a66433af ("driver core: class: remove
+ * struct module owner out of struct class")
340
+ */
341
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
342
343
#endif
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments