Skip to content

Commit c2d5304

Browse files
committed
Merge tag 'platform-drivers-x86-v6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform drivers fixes from Ilpo Järvinen: "Just a few fixes (one with two non-fix deps) plus tidying up MAINTAINERS" * tag 'platform-drivers-x86-v6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: intel_telemetry: Fix kernel doc descriptions MAINTAINERS: Drop Mark Gross as maintainer for x86 platform drivers platform/x86/amd/pmc: adjust getting DRAM size behavior platform/x86: hp-bioscfg: Remove unused obj in hp_add_other_attributes() platform/x86: hp-bioscfg: Fix error handling in hp_add_other_attributes() platform/x86: hp-bioscfg: move mutex_lock() down in hp_add_other_attributes() platform/x86: hp-bioscfg: Simplify return check in hp_add_other_attributes() platform/x86: ideapad-laptop: Set max_brightness before using it MAINTAINERS: Remove stale entry for SBL platform driver
2 parents 6b65522 + a658471 commit c2d5304

File tree

5 files changed

+20
-56
lines changed

5 files changed

+20
-56
lines changed

MAINTAINERS

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11025,7 +11025,6 @@ F: drivers/net/wireless/intel/iwlwifi/
1102511025

1102611026
INTEL WMI SLIM BOOTLOADER (SBL) FIRMWARE UPDATE DRIVER
1102711027
M: Jithu Joseph <[email protected]>
11028-
R: Maurice Ma <[email protected]>
1102911028
S: Maintained
1103011029
W: https://slimbootloader.github.io/security/firmware-update.html
1103111030
F: drivers/platform/x86/intel/wmi/sbl-fw-update.c
@@ -13779,7 +13778,6 @@ F: drivers/net/ethernet/mellanox/mlxfw/
1377913778
MELLANOX HARDWARE PLATFORM SUPPORT
1378013779
M: Hans de Goede <[email protected]>
1378113780
M: Ilpo Järvinen <[email protected]>
13782-
M: Mark Gross <[email protected]>
1378313781
M: Vadim Pasternak <[email protected]>
1378413782
1378513783
S: Supported
@@ -14388,7 +14386,6 @@ F: drivers/platform/surface/surface_gpe.c
1438814386
MICROSOFT SURFACE HARDWARE PLATFORM SUPPORT
1438914387
M: Hans de Goede <[email protected]>
1439014388
M: Ilpo Järvinen <[email protected]>
14391-
M: Mark Gross <[email protected]>
1439214389
M: Maximilian Luz <[email protected]>
1439314390
1439414391
S: Maintained
@@ -23665,7 +23662,6 @@ F: drivers/platform/x86/x86-android-tablets/
2366523662
X86 PLATFORM DRIVERS
2366623663
M: Hans de Goede <[email protected]>
2366723664
M: Ilpo Järvinen <[email protected]>
23668-
M: Mark Gross <[email protected]>
2366923665
2367023666
S: Maintained
2367123667
Q: https://patchwork.kernel.org/project/platform-driver-x86/list/

drivers/platform/x86/amd/pmc/pmc.c

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -964,33 +964,6 @@ static const struct pci_device_id pmc_pci_ids[] = {
964964
{ }
965965
};
966966

967-
static int amd_pmc_get_dram_size(struct amd_pmc_dev *dev)
968-
{
969-
int ret;
970-
971-
switch (dev->cpu_id) {
972-
case AMD_CPU_ID_YC:
973-
if (!(dev->major > 90 || (dev->major == 90 && dev->minor > 39))) {
974-
ret = -EINVAL;
975-
goto err_dram_size;
976-
}
977-
break;
978-
default:
979-
ret = -EINVAL;
980-
goto err_dram_size;
981-
}
982-
983-
ret = amd_pmc_send_cmd(dev, S2D_DRAM_SIZE, &dev->dram_size, dev->s2d_msg_id, true);
984-
if (ret || !dev->dram_size)
985-
goto err_dram_size;
986-
987-
return 0;
988-
989-
err_dram_size:
990-
dev_err(dev->dev, "DRAM size command not supported for this platform\n");
991-
return ret;
992-
}
993-
994967
static int amd_pmc_s2d_init(struct amd_pmc_dev *dev)
995968
{
996969
u32 phys_addr_low, phys_addr_hi;
@@ -1009,8 +982,8 @@ static int amd_pmc_s2d_init(struct amd_pmc_dev *dev)
1009982
return -EIO;
1010983

1011984
/* Get DRAM size */
1012-
ret = amd_pmc_get_dram_size(dev);
1013-
if (ret)
985+
ret = amd_pmc_send_cmd(dev, S2D_DRAM_SIZE, &dev->dram_size, dev->s2d_msg_id, true);
986+
if (ret || !dev->dram_size)
1014987
dev->dram_size = S2D_TELEMETRY_DRAMBYTES_MAX;
1015988

1016989
/* Get STB DRAM address */

drivers/platform/x86/hp/hp-bioscfg/bioscfg.c

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -588,17 +588,14 @@ static void release_attributes_data(void)
588588
static int hp_add_other_attributes(int attr_type)
589589
{
590590
struct kobject *attr_name_kobj;
591-
union acpi_object *obj = NULL;
592591
int ret;
593592
char *attr_name;
594593

595-
mutex_lock(&bioscfg_drv.mutex);
596-
597594
attr_name_kobj = kzalloc(sizeof(*attr_name_kobj), GFP_KERNEL);
598-
if (!attr_name_kobj) {
599-
ret = -ENOMEM;
600-
goto err_other_attr_init;
601-
}
595+
if (!attr_name_kobj)
596+
return -ENOMEM;
597+
598+
mutex_lock(&bioscfg_drv.mutex);
602599

603600
/* Check if attribute type is supported */
604601
switch (attr_type) {
@@ -615,42 +612,41 @@ static int hp_add_other_attributes(int attr_type)
615612
default:
616613
pr_err("Error: Unknown attr_type: %d\n", attr_type);
617614
ret = -EINVAL;
618-
goto err_other_attr_init;
615+
kfree(attr_name_kobj);
616+
goto unlock_drv_mutex;
619617
}
620618

621619
ret = kobject_init_and_add(attr_name_kobj, &attr_name_ktype,
622620
NULL, "%s", attr_name);
623621
if (ret) {
624622
pr_err("Error encountered [%d]\n", ret);
625-
kobject_put(attr_name_kobj);
626623
goto err_other_attr_init;
627624
}
628625

629626
/* Populate attribute data */
630627
switch (attr_type) {
631628
case HPWMI_SECURE_PLATFORM_TYPE:
632629
ret = hp_populate_secure_platform_data(attr_name_kobj);
633-
if (ret)
634-
goto err_other_attr_init;
635630
break;
636631

637632
case HPWMI_SURE_START_TYPE:
638633
ret = hp_populate_sure_start_data(attr_name_kobj);
639-
if (ret)
640-
goto err_other_attr_init;
641634
break;
642635

643636
default:
644637
ret = -EINVAL;
645-
goto err_other_attr_init;
646638
}
647639

640+
if (ret)
641+
goto err_other_attr_init;
642+
648643
mutex_unlock(&bioscfg_drv.mutex);
649644
return 0;
650645

651646
err_other_attr_init:
647+
kobject_put(attr_name_kobj);
648+
unlock_drv_mutex:
652649
mutex_unlock(&bioscfg_drv.mutex);
653-
kfree(obj);
654650
return ret;
655651
}
656652

drivers/platform/x86/ideapad-laptop.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,18 +1425,17 @@ static int ideapad_kbd_bl_init(struct ideapad_private *priv)
14251425
if (WARN_ON(priv->kbd_bl.initialized))
14261426
return -EEXIST;
14271427

1428-
brightness = ideapad_kbd_bl_brightness_get(priv);
1429-
if (brightness < 0)
1430-
return brightness;
1431-
1432-
priv->kbd_bl.last_brightness = brightness;
1433-
14341428
if (ideapad_kbd_bl_check_tristate(priv->kbd_bl.type)) {
14351429
priv->kbd_bl.led.max_brightness = 2;
14361430
} else {
14371431
priv->kbd_bl.led.max_brightness = 1;
14381432
}
14391433

1434+
brightness = ideapad_kbd_bl_brightness_get(priv);
1435+
if (brightness < 0)
1436+
return brightness;
1437+
1438+
priv->kbd_bl.last_brightness = brightness;
14401439
priv->kbd_bl.led.name = "platform::" LED_FUNCTION_KBD_BACKLIGHT;
14411440
priv->kbd_bl.led.brightness_get = ideapad_kbd_bl_led_cdev_brightness_get;
14421441
priv->kbd_bl.led.brightness_set_blocking = ideapad_kbd_bl_led_cdev_brightness_set;

drivers/platform/x86/intel/telemetry/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static const struct telemetry_core_ops telm_defpltops = {
102102
/**
103103
* telemetry_update_events() - Update telemetry Configuration
104104
* @pss_evtconfig: PSS related config. No change if num_evts = 0.
105-
* @pss_evtconfig: IOSS related config. No change if num_evts = 0.
105+
* @ioss_evtconfig: IOSS related config. No change if num_evts = 0.
106106
*
107107
* This API updates the IOSS & PSS Telemetry configuration. Old config
108108
* is overwritten. Call telemetry_reset_events when logging is over
@@ -176,7 +176,7 @@ EXPORT_SYMBOL_GPL(telemetry_reset_events);
176176
/**
177177
* telemetry_get_eventconfig() - Returns the pss and ioss events enabled
178178
* @pss_evtconfig: Pointer to PSS related configuration.
179-
* @pss_evtconfig: Pointer to IOSS related configuration.
179+
* @ioss_evtconfig: Pointer to IOSS related configuration.
180180
* @pss_len: Number of u32 elements allocated for pss_evtconfig array
181181
* @ioss_len: Number of u32 elements allocated for ioss_evtconfig array
182182
*

0 commit comments

Comments
 (0)