Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…git/stable/linux into 11.0

This is the 4.19.221 stable release
  • Loading branch information
GtrCraft committed Dec 14, 2021
2 parents fbd661f + 5fd3cce commit 1df7a5b
Show file tree
Hide file tree
Showing 115 changed files with 874 additions and 318 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 19
SUBLEVEL = 220
SUBLEVEL = 221
EXTRAVERSION =
NAME = "People's Front"

Expand Down
3 changes: 3 additions & 0 deletions block/ioprio.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ SYSCALL_DEFINE2(ioprio_get, int, which, int, who)
pgrp = task_pgrp(current);
else
pgrp = find_vpid(who);
read_lock(&tasklist_lock);
do_each_pid_thread(pgrp, PIDTYPE_PGID, p) {
tmpio = get_task_ioprio(p);
if (tmpio < 0)
Expand All @@ -215,6 +216,8 @@ SYSCALL_DEFINE2(ioprio_get, int, which, int, who)
else
ret = ioprio_best(ret, tmpio);
} while_each_pid_thread(pgrp, PIDTYPE_PGID, p);
read_unlock(&tasklist_lock);

break;
case IOPRIO_WHO_USER:
uid = make_kuid(current_user_ns(), who);
Expand Down
21 changes: 9 additions & 12 deletions drivers/android/binder.c
Original file line number Diff line number Diff line change
Expand Up @@ -4880,23 +4880,20 @@ static int binder_thread_release(struct binder_proc *proc,
}

/*
* If this thread used poll, make sure we remove the waitqueue
* from any epoll data structures holding it with POLLFREE.
* waitqueue_active() is safe to use here because we're holding
* the inner lock.
* If this thread used poll, make sure we remove the waitqueue from any
* poll data structures holding it.
*/
if ((thread->looper & BINDER_LOOPER_STATE_POLL) &&
waitqueue_active(&thread->wait)) {
wake_up_poll(&thread->wait, EPOLLHUP | POLLFREE);
}
if (thread->looper & BINDER_LOOPER_STATE_POLL)
wake_up_pollfree(&thread->wait);

binder_inner_proc_unlock(thread->proc);

/*
* This is needed to avoid races between wake_up_poll() above and
* and ep_remove_waitqueue() called for other reasons (eg the epoll file
* descriptor being closed); ep_remove_waitqueue() holds an RCU read
* lock, so we can be sure it's done after calling synchronize_rcu().
* This is needed to avoid races between wake_up_pollfree() above and
* someone else removing the last entry from the queue for other reasons
* (e.g. ep_remove_wait_queue() being called due to an epoll file
* descriptor being closed). Such other users hold an RCU read lock, so
* we can be sure they're done after we call synchronize_rcu().
*/
if (thread->looper & BINDER_LOOPER_STATE_POLL)
synchronize_rcu();
Expand Down
2 changes: 2 additions & 0 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4453,6 +4453,8 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "VRFDFC22048UCHC-TE*", NULL, ATA_HORKAGE_NODMA },
/* Odd clown on sil3726/4726 PMPs */
{ "Config Disk", NULL, ATA_HORKAGE_DISABLE },
/* Similar story with ASMedia 1092 */
{ "ASMT109x- Config", NULL, ATA_HORKAGE_DISABLE },

/* Weird ATAPI devices */
{ "TORiSAN DVD-ROM DRD-N216", NULL, ATA_HORKAGE_MAX_SEC_128 },
Expand Down
2 changes: 1 addition & 1 deletion drivers/clk/qcom/clk-regmap-mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static u8 mux_get_parent(struct clk_hw *hw)
val &= mask;

if (mux->parent_map)
return qcom_find_src_index(hw, mux->parent_map, val);
return qcom_find_cfg_index(hw, mux->parent_map, val);

return val;
}
Expand Down
12 changes: 12 additions & 0 deletions drivers/clk/qcom/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ int qcom_find_src_index(struct clk_hw *hw, const struct parent_map *map, u8 src)
}
EXPORT_SYMBOL_GPL(qcom_find_src_index);

int qcom_find_cfg_index(struct clk_hw *hw, const struct parent_map *map, u8 cfg)
{
int i, num_parents = clk_hw_get_num_parents(hw);

for (i = 0; i < num_parents; i++)
if (cfg == map[i].cfg)
return i;

return -ENOENT;
}
EXPORT_SYMBOL_GPL(qcom_find_cfg_index);

struct regmap *
qcom_cc_map(struct platform_device *pdev, const struct qcom_cc_desc *desc)
{
Expand Down
2 changes: 2 additions & 0 deletions drivers/clk/qcom/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ extern void
qcom_pll_set_fsm_mode(struct regmap *m, u32 reg, u8 bias_count, u8 lock_count);
extern int qcom_find_src_index(struct clk_hw *hw, const struct parent_map *map,
u8 src);
extern int qcom_find_cfg_index(struct clk_hw *hw, const struct parent_map *map,
u8 cfg);

extern int qcom_cc_register_board_clk(struct device *dev, const char *path,
const char *name, unsigned long rate);
Expand Down
10 changes: 5 additions & 5 deletions drivers/hid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ config HID_CHERRY

config HID_CHICONY
tristate "Chicony devices"
depends on HID
depends on USB_HID
default !EXPERT
---help---
Support for Chicony Tactical pad and special keys on Chicony keyboards.

config HID_CORSAIR
tristate "Corsair devices"
depends on HID && USB && LEDS_CLASS
depends on USB_HID && LEDS_CLASS
---help---
Support for Corsair devices that are not fully compliant with the
HID standard.
Expand All @@ -219,7 +219,7 @@ config HID_COUGAR

config HID_PRODIKEYS
tristate "Prodikeys PC-MIDI Keyboard support"
depends on HID && SND
depends on USB_HID && SND
select SND_RAWMIDI
---help---
Support for Prodikeys PC-MIDI Keyboard device support.
Expand Down Expand Up @@ -484,7 +484,7 @@ config HID_LENOVO

config HID_LOGITECH
tristate "Logitech devices"
depends on HID
depends on USB_HID
default !EXPERT
---help---
Support for Logitech devices that are not fully compliant with HID standard.
Expand Down Expand Up @@ -854,7 +854,7 @@ config HID_SAITEK

config HID_SAMSUNG
tristate "Samsung InfraRed remote control or keyboards"
depends on HID
depends on USB_HID
---help---
Support for Samsung InfraRed remote control or keyboards.

Expand Down
2 changes: 1 addition & 1 deletion drivers/hid/hid-asus.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
if (drvdata->quirks & QUIRK_IS_MULTITOUCH)
drvdata->tp = &asus_i2c_tp;

if (drvdata->quirks & QUIRK_T100_KEYBOARD) {
if ((drvdata->quirks & QUIRK_T100_KEYBOARD) && hid_is_usb(hdev)) {
struct usb_interface *intf = to_usb_interface(hdev->dev.parent);

if (intf->altsetting->desc.bInterfaceNumber == T100_TPAD_INTF) {
Expand Down
8 changes: 6 additions & 2 deletions drivers/hid/hid-chicony.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@ static int ch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
static __u8 *ch_switch12_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
struct usb_interface *intf = to_usb_interface(hdev->dev.parent);

struct usb_interface *intf;

if (!hid_is_usb(hdev))
return rdesc;

intf = to_usb_interface(hdev->dev.parent);
if (intf->cur_altsetting->desc.bInterfaceNumber == 1) {
/* Change usage maximum and logical maximum from 0x7fff to
* 0x2fff, so they don't exceed HID_MAX_USAGES */
Expand Down
7 changes: 6 additions & 1 deletion drivers/hid/hid-corsair.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,12 @@ static int corsair_probe(struct hid_device *dev, const struct hid_device_id *id)
int ret;
unsigned long quirks = id->driver_data;
struct corsair_drvdata *drvdata;
struct usb_interface *usbif = to_usb_interface(dev->dev.parent);
struct usb_interface *usbif;

if (!hid_is_usb(dev))
return -EINVAL;

usbif = to_usb_interface(dev->dev.parent);

drvdata = devm_kzalloc(&dev->dev, sizeof(struct corsair_drvdata),
GFP_KERNEL);
Expand Down
2 changes: 1 addition & 1 deletion drivers/hid/hid-elan.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct elan_drvdata {

static int is_not_elan_touchpad(struct hid_device *hdev)
{
if (hdev->bus == BUS_USB) {
if (hid_is_usb(hdev)) {
struct usb_interface *intf = to_usb_interface(hdev->dev.parent);

return (intf->altsetting->desc.bInterfaceNumber !=
Expand Down
3 changes: 3 additions & 0 deletions drivers/hid/hid-elo.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ static int elo_probe(struct hid_device *hdev, const struct hid_device_id *id)
struct elo_priv *priv;
int ret;

if (!hid_is_usb(hdev))
return -EINVAL;

priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
Expand Down
2 changes: 2 additions & 0 deletions drivers/hid/hid-google-hammer.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ static int hammer_input_configured(struct hid_device *hdev,
static const struct hid_device_id hammer_devices[] = {
{ HID_DEVICE(BUS_USB, HID_GROUP_GENERIC,
USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_DON) },
{ HID_DEVICE(BUS_USB, HID_GROUP_GENERIC,
USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_EEL) },
{ HID_DEVICE(BUS_USB, HID_GROUP_GENERIC,
USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_HAMMER) },
{ HID_DEVICE(BUS_USB, HID_GROUP_GENERIC,
Expand Down
9 changes: 7 additions & 2 deletions drivers/hid/hid-holtek-kbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,17 @@ static int holtek_kbd_input_event(struct input_dev *dev, unsigned int type,
static int holtek_kbd_probe(struct hid_device *hdev,
const struct hid_device_id *id)
{
struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
int ret = hid_parse(hdev);
struct usb_interface *intf;
int ret;

if (!hid_is_usb(hdev))
return -EINVAL;

ret = hid_parse(hdev);
if (!ret)
ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);

intf = to_usb_interface(hdev->dev.parent);
if (!ret && intf->cur_altsetting->desc.bInterfaceNumber == 1) {
struct hid_input *hidinput;
list_for_each_entry(hidinput, &hdev->inputs, list) {
Expand Down
9 changes: 9 additions & 0 deletions drivers/hid/hid-holtek-mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc,
return rdesc;
}

static int holtek_mouse_probe(struct hid_device *hdev,
const struct hid_device_id *id)
{
if (!hid_is_usb(hdev))
return -EINVAL;
return 0;
}

static const struct hid_device_id holtek_mouse_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT,
USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067) },
Expand All @@ -86,6 +94,7 @@ static struct hid_driver holtek_mouse_driver = {
.name = "holtek_mouse",
.id_table = holtek_mouse_devices,
.report_fixup = holtek_mouse_report_fixup,
.probe = holtek_mouse_probe,
};

module_hid_driver(holtek_mouse_driver);
Expand Down
1 change: 1 addition & 0 deletions drivers/hid/hid-ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@
#define USB_DEVICE_ID_GOOGLE_MAGNEMITE 0x503d
#define USB_DEVICE_ID_GOOGLE_MOONBALL 0x5044
#define USB_DEVICE_ID_GOOGLE_DON 0x5050
#define USB_DEVICE_ID_GOOGLE_EEL 0x5057

#define USB_VENDOR_ID_GOTOP 0x08f2
#define USB_DEVICE_ID_SUPER_Q2 0x007f
Expand Down
10 changes: 8 additions & 2 deletions drivers/hid/hid-lg.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,12 +714,18 @@ static int lg_raw_event(struct hid_device *hdev, struct hid_report *report,

static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id)
{
struct usb_interface *iface = to_usb_interface(hdev->dev.parent);
__u8 iface_num = iface->cur_altsetting->desc.bInterfaceNumber;
struct usb_interface *iface;
__u8 iface_num;
unsigned int connect_mask = HID_CONNECT_DEFAULT;
struct lg_drv_data *drv_data;
int ret;

if (!hid_is_usb(hdev))
return -EINVAL;

iface = to_usb_interface(hdev->dev.parent);
iface_num = iface->cur_altsetting->desc.bInterfaceNumber;

/* G29 only work with the 1st interface */
if ((hdev->product == USB_DEVICE_ID_LOGITECH_G29_WHEEL) &&
(iface_num != 0)) {
Expand Down
10 changes: 8 additions & 2 deletions drivers/hid/hid-prodikeys.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,12 +802,18 @@ static int pk_raw_event(struct hid_device *hdev, struct hid_report *report,
static int pk_probe(struct hid_device *hdev, const struct hid_device_id *id)
{
int ret;
struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
unsigned short ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
struct usb_interface *intf;
unsigned short ifnum;
unsigned long quirks = id->driver_data;
struct pk_device *pk;
struct pcmidi_snd *pm = NULL;

if (!hid_is_usb(hdev))
return -EINVAL;

intf = to_usb_interface(hdev->dev.parent);
ifnum = intf->cur_altsetting->desc.bInterfaceNumber;

pk = kzalloc(sizeof(*pk), GFP_KERNEL);
if (pk == NULL) {
hid_err(hdev, "can't alloc descriptor\n");
Expand Down
3 changes: 3 additions & 0 deletions drivers/hid/hid-roccat-arvo.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ static int arvo_probe(struct hid_device *hdev,
{
int retval;

if (!hid_is_usb(hdev))
return -EINVAL;

retval = hid_parse(hdev);
if (retval) {
hid_err(hdev, "parse failed\n");
Expand Down
3 changes: 3 additions & 0 deletions drivers/hid/hid-roccat-isku.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ static int isku_probe(struct hid_device *hdev,
{
int retval;

if (!hid_is_usb(hdev))
return -EINVAL;

retval = hid_parse(hdev);
if (retval) {
hid_err(hdev, "parse failed\n");
Expand Down
3 changes: 3 additions & 0 deletions drivers/hid/hid-roccat-kone.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,9 @@ static int kone_probe(struct hid_device *hdev, const struct hid_device_id *id)
{
int retval;

if (!hid_is_usb(hdev))
return -EINVAL;

retval = hid_parse(hdev);
if (retval) {
hid_err(hdev, "parse failed\n");
Expand Down
3 changes: 3 additions & 0 deletions drivers/hid/hid-roccat-koneplus.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,9 @@ static int koneplus_probe(struct hid_device *hdev,
{
int retval;

if (!hid_is_usb(hdev))
return -EINVAL;

retval = hid_parse(hdev);
if (retval) {
hid_err(hdev, "parse failed\n");
Expand Down
3 changes: 3 additions & 0 deletions drivers/hid/hid-roccat-konepure.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ static int konepure_probe(struct hid_device *hdev,
{
int retval;

if (!hid_is_usb(hdev))
return -EINVAL;

retval = hid_parse(hdev);
if (retval) {
hid_err(hdev, "parse failed\n");
Expand Down
3 changes: 3 additions & 0 deletions drivers/hid/hid-roccat-kovaplus.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,9 @@ static int kovaplus_probe(struct hid_device *hdev,
{
int retval;

if (!hid_is_usb(hdev))
return -EINVAL;

retval = hid_parse(hdev);
if (retval) {
hid_err(hdev, "parse failed\n");
Expand Down
3 changes: 3 additions & 0 deletions drivers/hid/hid-roccat-lua.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ static int lua_probe(struct hid_device *hdev,
{
int retval;

if (!hid_is_usb(hdev))
return -EINVAL;

retval = hid_parse(hdev);
if (retval) {
hid_err(hdev, "parse failed\n");
Expand Down
3 changes: 3 additions & 0 deletions drivers/hid/hid-roccat-pyra.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,9 @@ static int pyra_probe(struct hid_device *hdev, const struct hid_device_id *id)
{
int retval;

if (!hid_is_usb(hdev))
return -EINVAL;

retval = hid_parse(hdev);
if (retval) {
hid_err(hdev, "parse failed\n");
Expand Down
3 changes: 3 additions & 0 deletions drivers/hid/hid-roccat-ryos.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ static int ryos_probe(struct hid_device *hdev,
{
int retval;

if (!hid_is_usb(hdev))
return -EINVAL;

retval = hid_parse(hdev);
if (retval) {
hid_err(hdev, "parse failed\n");
Expand Down
Loading

0 comments on commit 1df7a5b

Please sign in to comment.