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 'pm+acpi-4.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management and ACPI fixes from Rafael Wysocki:
"These fix a recent regression in the ACPI backlight code and a memory
leak in the Exynos cpufreq driver.

Specifics:

- Fix a recently introduced issue in the ACPI backlight code which
causes lockdep to complain about a circular lock dependency during
initialization (Hans de Goede).

- Fix a possible memory during initialization in the Exynos cpufreq
driver (Shailendra Verma)"

* tag 'pm+acpi-4.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: exynos: Fix for memory leak in case SoC name does not match
ACPI / video: Fix circular lock dependency issue in the video-detect code

+17 -5
+13 -3
drivers/acpi/video_detect.c
··· 32 32 #include <linux/module.h> 33 33 #include <linux/pci.h> 34 34 #include <linux/types.h> 35 + #include <linux/workqueue.h> 35 36 #include <acpi/video.h> 36 37 37 38 ACPI_MODULE_NAME("video"); ··· 42 41 43 42 static bool backlight_notifier_registered; 44 43 static struct notifier_block backlight_nb; 44 + static struct work_struct backlight_notify_work; 45 45 46 46 static enum acpi_backlight_type acpi_backlight_cmdline = acpi_backlight_undef; 47 47 static enum acpi_backlight_type acpi_backlight_dmi = acpi_backlight_undef; ··· 264 262 { }, 265 263 }; 266 264 265 + /* This uses a workqueue to avoid various locking ordering issues */ 266 + static void acpi_video_backlight_notify_work(struct work_struct *work) 267 + { 268 + if (acpi_video_get_backlight_type() != acpi_backlight_video) 269 + acpi_video_unregister_backlight(); 270 + } 271 + 267 272 static int acpi_video_backlight_notify(struct notifier_block *nb, 268 273 unsigned long val, void *bd) 269 274 { ··· 278 269 279 270 /* A raw bl registering may change video -> native */ 280 271 if (backlight->props.type == BACKLIGHT_RAW && 281 - val == BACKLIGHT_REGISTERED && 282 - acpi_video_get_backlight_type() != acpi_backlight_video) 283 - acpi_video_unregister_backlight(); 272 + val == BACKLIGHT_REGISTERED) 273 + schedule_work(&backlight_notify_work); 284 274 285 275 return NOTIFY_OK; 286 276 } ··· 312 304 acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, 313 305 ACPI_UINT32_MAX, find_video, NULL, 314 306 &video_caps, NULL); 307 + INIT_WORK(&backlight_notify_work, 308 + acpi_video_backlight_notify_work); 315 309 backlight_nb.notifier_call = acpi_video_backlight_notify; 316 310 backlight_nb.priority = 0; 317 311 if (backlight_register_notifier(&backlight_nb) == 0)
+4 -2
drivers/cpufreq/exynos-cpufreq.c
··· 180 180 ret = exynos5250_cpufreq_init(exynos_info); 181 181 } else { 182 182 pr_err("%s: Unknown SoC type\n", __func__); 183 - return -ENODEV; 183 + ret = -ENODEV; 184 184 } 185 185 186 186 if (ret) ··· 188 188 189 189 if (exynos_info->set_freq == NULL) { 190 190 dev_err(&pdev->dev, "No set_freq function (ERR)\n"); 191 + ret = -EINVAL; 191 192 goto err_vdd_arm; 192 193 } 193 194 194 195 arm_regulator = regulator_get(NULL, "vdd_arm"); 195 196 if (IS_ERR(arm_regulator)) { 196 197 dev_err(&pdev->dev, "failed to get resource vdd_arm\n"); 198 + ret = -EINVAL; 197 199 goto err_vdd_arm; 198 200 } 199 201 ··· 227 225 regulator_put(arm_regulator); 228 226 err_vdd_arm: 229 227 kfree(exynos_info); 230 - return -EINVAL; 228 + return ret; 231 229 } 232 230 233 231 static struct platform_driver exynos_cpufreq_platdrv = {