Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'platform-drivers-x86-v6.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Hans de Goede:
"Bug fixes, build warning fixes and DMI quirk additions"

* tag 'platform-drivers-x86-v6.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
platform/x86: hp-wmi:: Mark driver struct with __refdata to prevent section mismatch warning
platform/x86: touchscreen_dmi: Add info for the Positivo C4128B
platform/x86: touchscreen_dmi: Add info for the BUSH Bush Windows tablet
platform/mellanox: tmfifo: fix kernel-doc warnings
platform/x86/intel/ifs: release cpus_read_lock()
platform/x86: hp-bioscfg: Fix reference leak
platform/x86: think-lmi: Fix reference leak

+94 -18
+8 -6
drivers/platform/mellanox/mlxbf-tmfifo.c
··· 53 53 struct mlxbf_tmfifo; 54 54 55 55 /** 56 - * mlxbf_tmfifo_vring - Structure of the TmFifo virtual ring 56 + * struct mlxbf_tmfifo_vring - Structure of the TmFifo virtual ring 57 57 * @va: virtual address of the ring 58 58 * @dma: dma address of the ring 59 59 * @vq: pointer to the virtio virtqueue ··· 113 113 }; 114 114 115 115 /** 116 - * mlxbf_tmfifo_vdev - Structure of the TmFifo virtual device 116 + * struct mlxbf_tmfifo_vdev - Structure of the TmFifo virtual device 117 117 * @vdev: virtio device, in which the vdev.id.device field has the 118 118 * VIRTIO_ID_xxx id to distinguish the virtual device. 119 119 * @status: status of the device 120 120 * @features: supported features of the device 121 121 * @vrings: array of tmfifo vrings of this device 122 + * @config: non-anonymous union for cons and net 122 123 * @config.cons: virtual console config - 123 124 * select if vdev.id.device is VIRTIO_ID_CONSOLE 124 125 * @config.net: virtual network config - ··· 139 138 }; 140 139 141 140 /** 142 - * mlxbf_tmfifo_irq_info - Structure of the interrupt information 141 + * struct mlxbf_tmfifo_irq_info - Structure of the interrupt information 143 142 * @fifo: pointer to the tmfifo structure 144 143 * @irq: interrupt number 145 144 * @index: index into the interrupt array ··· 151 150 }; 152 151 153 152 /** 154 - * mlxbf_tmfifo_io - Structure of the TmFifo IO resource (for both rx & tx) 153 + * struct mlxbf_tmfifo_io - Structure of the TmFifo IO resource (for both rx & tx) 155 154 * @ctl: control register offset (TMFIFO_RX_CTL / TMFIFO_TX_CTL) 156 155 * @sts: status register offset (TMFIFO_RX_STS / TMFIFO_TX_STS) 157 156 * @data: data register offset (TMFIFO_RX_DATA / TMFIFO_TX_DATA) ··· 163 162 }; 164 163 165 164 /** 166 - * mlxbf_tmfifo - Structure of the TmFifo 165 + * struct mlxbf_tmfifo - Structure of the TmFifo 167 166 * @vdev: array of the virtual devices running over the TmFifo 168 167 * @lock: lock to protect the TmFifo access 169 168 * @res0: mapped resource block 0 ··· 199 198 }; 200 199 201 200 /** 202 - * mlxbf_tmfifo_msg_hdr - Structure of the TmFifo message header 201 + * struct mlxbf_tmfifo_msg_hdr - Structure of the TmFifo message header 203 202 * @type: message type 204 203 * @len: payload length in network byte order. Messages sent into the FIFO 205 204 * will be read by the other side as data stream in the same byte order. ··· 209 208 struct mlxbf_tmfifo_msg_hdr { 210 209 u8 type; 211 210 __be16 len; 211 + /* private: */ 212 212 u8 unused[5]; 213 213 } __packed __aligned(sizeof(u64)); 214 214
+10 -4
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
··· 659 659 const char *guid, int min_elements, 660 660 int instance_id) 661 661 { 662 - struct kobject *attr_name_kobj; 662 + struct kobject *attr_name_kobj, *duplicate; 663 663 union acpi_object *elements; 664 664 struct kset *temp_kset; 665 665 ··· 704 704 } 705 705 706 706 /* All duplicate attributes found are ignored */ 707 - if (kset_find_obj(temp_kset, str_value)) { 707 + duplicate = kset_find_obj(temp_kset, str_value); 708 + if (duplicate) { 708 709 pr_debug("Duplicate attribute name found - %s\n", str_value); 710 + /* kset_find_obj() returns a reference */ 711 + kobject_put(duplicate); 709 712 goto pack_attr_exit; 710 713 } 711 714 ··· 771 768 const char *guid, int min_elements, 772 769 int instance_id) 773 770 { 774 - struct kobject *attr_name_kobj; 771 + struct kobject *attr_name_kobj, *duplicate; 775 772 struct kset *temp_kset; 776 773 char str[MAX_BUFF_SIZE]; 777 774 ··· 797 794 temp_kset = bioscfg_drv.main_dir_kset; 798 795 799 796 /* All duplicate attributes found are ignored */ 800 - if (kset_find_obj(temp_kset, str)) { 797 + duplicate = kset_find_obj(temp_kset, str); 798 + if (duplicate) { 801 799 pr_debug("Duplicate attribute name found - %s\n", str); 800 + /* kset_find_obj() returns a reference */ 801 + kobject_put(duplicate); 802 802 goto buff_attr_exit; 803 803 } 804 804
+7 -1
drivers/platform/x86/hp/hp-wmi.c
··· 1548 1548 .restore = hp_wmi_resume_handler, 1549 1549 }; 1550 1550 1551 - static struct platform_driver hp_wmi_driver = { 1551 + /* 1552 + * hp_wmi_bios_remove() lives in .exit.text. For drivers registered via 1553 + * module_platform_driver_probe() this is ok because they cannot get unbound at 1554 + * runtime. So mark the driver struct with __refdata to prevent modpost 1555 + * triggering a section mismatch warning. 1556 + */ 1557 + static struct platform_driver hp_wmi_driver __refdata = { 1552 1558 .driver = { 1553 1559 .name = "hp-wmi", 1554 1560 .pm = &hp_wmi_pm_ops,
+4 -3
drivers/platform/x86/intel/ifs/runtest.c
··· 331 331 switch (test->test_num) { 332 332 case IFS_TYPE_SAF: 333 333 if (!ifsd->loaded) 334 - return -EPERM; 335 - ifs_test_core(cpu, dev); 334 + ret = -EPERM; 335 + else 336 + ifs_test_core(cpu, dev); 336 337 break; 337 338 case IFS_TYPE_ARRAY_BIST: 338 339 ifs_array_test_core(cpu, dev); 339 340 break; 340 341 default: 341 - return -EINVAL; 342 + ret = -EINVAL; 342 343 } 343 344 out: 344 345 cpus_read_unlock();
+20 -4
drivers/platform/x86/think-lmi.c
··· 1248 1248 kset_unregister(tlmi_priv.authentication_kset); 1249 1249 } 1250 1250 1251 + static int tlmi_validate_setting_name(struct kset *attribute_kset, char *name) 1252 + { 1253 + struct kobject *duplicate; 1254 + 1255 + if (!strcmp(name, "Reserved")) 1256 + return -EINVAL; 1257 + 1258 + duplicate = kset_find_obj(attribute_kset, name); 1259 + if (duplicate) { 1260 + pr_debug("Duplicate attribute name found - %s\n", name); 1261 + /* kset_find_obj() returns a reference */ 1262 + kobject_put(duplicate); 1263 + return -EBUSY; 1264 + } 1265 + 1266 + return 0; 1267 + } 1268 + 1251 1269 static int tlmi_sysfs_init(void) 1252 1270 { 1253 1271 int i, ret; ··· 1294 1276 continue; 1295 1277 1296 1278 /* check for duplicate or reserved values */ 1297 - if (kset_find_obj(tlmi_priv.attribute_kset, tlmi_priv.setting[i]->display_name) || 1298 - !strcmp(tlmi_priv.setting[i]->display_name, "Reserved")) { 1299 - pr_debug("duplicate or reserved attribute name found - %s\n", 1300 - tlmi_priv.setting[i]->display_name); 1279 + if (tlmi_validate_setting_name(tlmi_priv.attribute_kset, 1280 + tlmi_priv.setting[i]->display_name) < 0) { 1301 1281 kfree(tlmi_priv.setting[i]->possible_values); 1302 1282 kfree(tlmi_priv.setting[i]); 1303 1283 tlmi_priv.setting[i] = NULL;
+45
drivers/platform/x86/touchscreen_dmi.c
··· 42 42 .properties = archos_101_cesium_educ_props, 43 43 }; 44 44 45 + static const struct property_entry bush_bush_windows_tablet_props[] = { 46 + PROPERTY_ENTRY_U32("touchscreen-size-x", 1850), 47 + PROPERTY_ENTRY_U32("touchscreen-size-y", 1280), 48 + PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), 49 + PROPERTY_ENTRY_U32("silead,max-fingers", 10), 50 + PROPERTY_ENTRY_BOOL("silead,home-button"), 51 + PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-bush-bush-windows-tablet.fw"), 52 + { } 53 + }; 54 + 55 + static const struct ts_dmi_data bush_bush_windows_tablet_data = { 56 + .acpi_name = "MSSL1680:00", 57 + .properties = bush_bush_windows_tablet_props, 58 + }; 59 + 45 60 static const struct property_entry chuwi_hi8_props[] = { 46 61 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665), 47 62 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140), ··· 771 756 .properties = pipo_w11_props, 772 757 }; 773 758 759 + static const struct property_entry positivo_c4128b_props[] = { 760 + PROPERTY_ENTRY_U32("touchscreen-min-x", 4), 761 + PROPERTY_ENTRY_U32("touchscreen-min-y", 13), 762 + PROPERTY_ENTRY_U32("touchscreen-size-x", 1915), 763 + PROPERTY_ENTRY_U32("touchscreen-size-y", 1269), 764 + PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-positivo-c4128b.fw"), 765 + PROPERTY_ENTRY_U32("silead,max-fingers", 10), 766 + { } 767 + }; 768 + 769 + static const struct ts_dmi_data positivo_c4128b_data = { 770 + .acpi_name = "MSSL1680:00", 771 + .properties = positivo_c4128b_props, 772 + }; 773 + 774 774 static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = { 775 775 PROPERTY_ENTRY_U32("touchscreen-min-x", 32), 776 776 PROPERTY_ENTRY_U32("touchscreen-min-y", 16), ··· 1098 1068 .driver_data = (void *)&archos_101_cesium_educ_data, 1099 1069 .matches = { 1100 1070 DMI_MATCH(DMI_PRODUCT_NAME, "ARCHOS 101 Cesium Educ"), 1071 + }, 1072 + }, 1073 + { 1074 + /* Bush Windows tablet */ 1075 + .driver_data = (void *)&bush_bush_windows_tablet_data, 1076 + .matches = { 1077 + DMI_MATCH(DMI_PRODUCT_NAME, "Bush Windows tablet"), 1101 1078 }, 1102 1079 }, 1103 1080 { ··· 1515 1478 DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"), 1516 1479 /* Exact match, different versions need different fw */ 1517 1480 DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"), 1481 + }, 1482 + }, 1483 + { 1484 + /* Positivo C4128B */ 1485 + .driver_data = (void *)&positivo_c4128b_data, 1486 + .matches = { 1487 + DMI_MATCH(DMI_SYS_VENDOR, "Positivo Tecnologia SA"), 1488 + DMI_MATCH(DMI_PRODUCT_NAME, "C4128B-1"), 1518 1489 }, 1519 1490 }, 1520 1491 {