]> Git Repo - J-linux.git/commitdiff
Merge branch 'for-6.5/apple' into for-linus
authorJiri Kosina <[email protected]>
Tue, 27 Jun 2023 20:37:24 +0000 (22:37 +0200)
committerJiri Kosina <[email protected]>
Tue, 27 Jun 2023 20:37:24 +0000 (22:37 +0200)
- improved support for Keychron K8 keyboard (Lasse Brun)

1  2 
drivers/hid/hidraw.c

diff --combined drivers/hid/hidraw.c
index b617aada50b06dfdb7805a64923ffdce325e9cb5,93e62b161501cca7afaee1af80d86a58962968ed..e63c56a0d57fb43281c61e7b40816d5caff89702
@@@ -272,12 -272,7 +272,12 @@@ static int hidraw_open(struct inode *in
                goto out;
        }
  
 -      down_read(&minors_rwsem);
 +      /*
 +       * Technically not writing to the hidraw_table but a write lock is
 +       * required to protect the device refcount. This is symmetrical to
 +       * hidraw_release().
 +       */
 +      down_write(&minors_rwsem);
        if (!hidraw_table[minor] || !hidraw_table[minor]->exist) {
                err = -ENODEV;
                goto out_unlock;
        spin_unlock_irqrestore(&hidraw_table[minor]->list_lock, flags);
        file->private_data = list;
  out_unlock:
 -      up_read(&minors_rwsem);
 +      up_write(&minors_rwsem);
  out:
        if (err < 0)
                kfree(list);
@@@ -623,7 -618,7 +623,7 @@@ int __init hidraw_init(void
  
        hidraw_major = MAJOR(dev_id);
  
-       hidraw_class = class_create(THIS_MODULE, "hidraw");
+       hidraw_class = class_create("hidraw");
        if (IS_ERR(hidraw_class)) {
                result = PTR_ERR(hidraw_class);
                goto error_cdev;
This page took 0.058371 seconds and 4 git commands to generate.