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

ACPI: platform_profile: Remove platform_profile_handler from exported symbols

In order to protect the platform_profile_handler from API consumers,
allocate it in platform_profile_register() and modify it's signature
accordingly.

Remove the platform_profile_handler from all consumer drivers and
replace them with a pointer to the class device, which is
now returned from platform_profile_register().

Replace *pprof with a pointer to the class device in the rest of
exported symbols.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Link: https://lore.kernel.org/r/20250116002721.75592-16-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Kurt Borja and committed by
Ilpo Järvinen
07f531b3 31658c91

+129 -132
+61 -37
drivers/acpi/platform_profile.c
··· 4 4 5 5 #include <linux/acpi.h> 6 6 #include <linux/bits.h> 7 + #include <linux/cleanup.h> 7 8 #include <linux/init.h> 8 9 #include <linux/mutex.h> 9 10 #include <linux/platform_profile.h> ··· 213 212 }; 214 213 ATTRIBUTE_GROUPS(profile); 215 214 215 + static void pprof_device_release(struct device *dev) 216 + { 217 + struct platform_profile_handler *pprof = to_pprof_handler(dev); 218 + 219 + kfree(pprof); 220 + } 221 + 216 222 static const struct class platform_profile_class = { 217 223 .name = "platform-profile", 218 224 .dev_groups = profile_groups, 225 + .dev_release = pprof_device_release, 219 226 }; 220 227 221 228 /** ··· 417 408 .is_visible = profile_class_is_visible, 418 409 }; 419 410 420 - void platform_profile_notify(struct platform_profile_handler *pprof) 411 + void platform_profile_notify(struct device *dev) 421 412 { 422 413 scoped_cond_guard(mutex_intr, return, &profile_lock) { 423 - _notify_class_profile(&pprof->class_dev, NULL); 414 + _notify_class_profile(dev, NULL); 424 415 } 425 416 sysfs_notify(acpi_kobj, NULL, "platform_profile"); 426 417 } ··· 469 460 } 470 461 EXPORT_SYMBOL_GPL(platform_profile_cycle); 471 462 472 - int platform_profile_register(struct platform_profile_handler *pprof, void *drvdata) 463 + struct device *platform_profile_register(struct device *dev, const char *name, 464 + void *drvdata, 465 + const struct platform_profile_ops *ops) 473 466 { 467 + struct device *ppdev; 468 + int minor; 474 469 int err; 475 470 476 - /* Sanity check the profile handler */ 477 - if (!pprof || !pprof->ops->profile_set || !pprof->ops->profile_get || 478 - !pprof->ops->probe) { 479 - pr_err("platform_profile: handler is invalid\n"); 480 - return -EINVAL; 481 - } 471 + /* Sanity check */ 472 + if (WARN_ON_ONCE(!dev || !name || !ops || !ops->profile_get || 473 + !ops->profile_set || !ops->probe)) 474 + return ERR_PTR(-EINVAL); 482 475 483 - err = pprof->ops->probe(drvdata, pprof->choices); 476 + struct platform_profile_handler *pprof __free(kfree) = kzalloc( 477 + sizeof(*pprof), GFP_KERNEL); 478 + if (!pprof) 479 + return ERR_PTR(-ENOMEM); 480 + 481 + err = ops->probe(drvdata, pprof->choices); 484 482 if (err) { 485 - dev_err(pprof->dev, "platform_profile probe failed\n"); 486 - return err; 483 + dev_err(dev, "platform_profile probe failed\n"); 484 + return ERR_PTR(err); 487 485 } 488 486 489 487 if (bitmap_empty(pprof->choices, PLATFORM_PROFILE_LAST)) { 490 - dev_err(pprof->dev, "Failed to register a platform_profile class device with empty choices\n"); 491 - return -EINVAL; 488 + dev_err(dev, "Failed to register platform_profile class device with empty choices\n"); 489 + return ERR_PTR(-EINVAL); 492 490 } 493 491 494 492 guard(mutex)(&profile_lock); 495 493 496 494 /* create class interface for individual handler */ 497 - pprof->minor = ida_alloc(&platform_profile_ida, GFP_KERNEL); 498 - if (pprof->minor < 0) 499 - return pprof->minor; 495 + minor = ida_alloc(&platform_profile_ida, GFP_KERNEL); 496 + if (minor < 0) 497 + return ERR_PTR(minor); 500 498 499 + pprof->name = name; 500 + pprof->ops = ops; 501 + pprof->minor = minor; 501 502 pprof->class_dev.class = &platform_profile_class; 502 - pprof->class_dev.parent = pprof->dev; 503 + pprof->class_dev.parent = dev; 503 504 dev_set_drvdata(&pprof->class_dev, drvdata); 504 505 dev_set_name(&pprof->class_dev, "platform-profile-%d", pprof->minor); 505 - err = device_register(&pprof->class_dev); 506 + /* device_register() takes ownership of pprof/ppdev */ 507 + ppdev = &no_free_ptr(pprof)->class_dev; 508 + err = device_register(ppdev); 506 509 if (err) { 507 - put_device(&pprof->class_dev); 510 + put_device(ppdev); 508 511 goto cleanup_ida; 509 512 } 510 513 ··· 526 505 if (err) 527 506 goto cleanup_cur; 528 507 529 - return 0; 508 + return ppdev; 530 509 531 510 cleanup_cur: 532 - device_unregister(&pprof->class_dev); 511 + device_unregister(ppdev); 533 512 534 513 cleanup_ida: 535 - ida_free(&platform_profile_ida, pprof->minor); 514 + ida_free(&platform_profile_ida, minor); 536 515 537 - return err; 516 + return ERR_PTR(err); 538 517 } 539 518 EXPORT_SYMBOL_GPL(platform_profile_register); 540 519 541 - int platform_profile_remove(struct platform_profile_handler *pprof) 520 + int platform_profile_remove(struct device *dev) 542 521 { 522 + struct platform_profile_handler *pprof = to_pprof_handler(dev); 543 523 int id; 544 524 guard(mutex)(&profile_lock); 545 525 ··· 558 536 559 537 static void devm_platform_profile_release(struct device *dev, void *res) 560 538 { 561 - struct platform_profile_handler **pprof = res; 539 + struct device **ppdev = res; 562 540 563 - platform_profile_remove(*pprof); 541 + platform_profile_remove(*ppdev); 564 542 } 565 543 566 - int devm_platform_profile_register(struct platform_profile_handler *pprof, void *drvdata) 544 + struct device *devm_platform_profile_register(struct device *dev, const char *name, 545 + void *drvdata, 546 + const struct platform_profile_ops *ops) 567 547 { 568 - struct platform_profile_handler **dr; 569 - int ret; 548 + struct device *ppdev; 549 + struct device **dr; 570 550 571 551 dr = devres_alloc(devm_platform_profile_release, sizeof(*dr), GFP_KERNEL); 572 552 if (!dr) 573 - return -ENOMEM; 553 + return ERR_PTR(-ENOMEM); 574 554 575 - ret = platform_profile_register(pprof, drvdata); 576 - if (ret) { 555 + ppdev = platform_profile_register(dev, name, drvdata, ops); 556 + if (IS_ERR(ppdev)) { 577 557 devres_free(dr); 578 - return ret; 558 + return ppdev; 579 559 } 580 560 581 - *dr = pprof; 582 - devres_add(pprof->dev, dr); 561 + *dr = ppdev; 562 + devres_add(dev, dr); 583 563 584 - return 0; 564 + return ppdev; 585 565 } 586 566 EXPORT_SYMBOL_GPL(devm_platform_profile_register); 587 567
+5 -6
drivers/platform/surface/surface_platform_profile.c
··· 40 40 41 41 struct ssam_platform_profile_device { 42 42 struct ssam_device *sdev; 43 - struct platform_profile_handler handler; 43 + struct device *ppdev; 44 44 bool has_fan; 45 45 }; 46 46 ··· 228 228 tpd->sdev = sdev; 229 229 ssam_device_set_drvdata(sdev, tpd); 230 230 231 - tpd->handler.name = "Surface Platform Profile"; 232 - tpd->handler.dev = &sdev->dev; 233 - tpd->handler.ops = &ssam_platform_profile_ops; 234 - 235 231 tpd->has_fan = device_property_read_bool(&sdev->dev, "has_fan"); 236 232 237 - return devm_platform_profile_register(&tpd->handler, tpd); 233 + tpd->ppdev = devm_platform_profile_register(&sdev->dev, "Surface Platform Profile", 234 + tpd, &ssam_platform_profile_ops); 235 + 236 + return PTR_ERR_OR_ZERO(tpd->ppdev); 238 237 } 239 238 240 239 static const struct ssam_device_id ssam_platform_profile_match[] = {
+6 -12
drivers/platform/x86/acer-wmi.c
··· 784 784 {} 785 785 }; 786 786 787 - static struct platform_profile_handler platform_profile_handler; 787 + static struct device *platform_profile_device; 788 788 static bool platform_profile_support; 789 789 790 790 /* ··· 2073 2073 static int acer_platform_profile_setup(struct platform_device *device) 2074 2074 { 2075 2075 if (quirks->predator_v4) { 2076 - int err; 2077 - 2078 - platform_profile_handler.name = "acer-wmi"; 2079 - platform_profile_handler.dev = &device->dev; 2080 - platform_profile_handler.ops = 2081 - &acer_predator_v4_platform_profile_ops; 2082 - 2083 - err = devm_platform_profile_register(&platform_profile_handler, NULL); 2084 - if (err) 2085 - return err; 2076 + platform_profile_device = devm_platform_profile_register( 2077 + &device->dev, "acer-wmi", NULL, &acer_predator_v4_platform_profile_ops); 2078 + if (IS_ERR(platform_profile_device)) 2079 + return PTR_ERR(platform_profile_device); 2086 2080 2087 2081 platform_profile_support = true; 2088 2082 ··· 2119 2125 if (current_tp != acer_predator_v4_max_perf) 2120 2126 last_non_turbo_profile = current_tp; 2121 2127 2122 - platform_profile_notify(&platform_profile_handler); 2128 + platform_profile_notify(platform_profile_device); 2123 2129 } 2124 2130 } 2125 2131
+1 -1
drivers/platform/x86/amd/pmf/pmf.h
··· 338 338 struct mutex lock; /* protects the PMF interface */ 339 339 u32 supported_func; 340 340 enum platform_profile_option current_profile; 341 - struct platform_profile_handler pprof; 341 + struct device *ppdev; /* platform profile class device */ 342 342 struct dentry *dbgfs_dir; 343 343 int hb_interval; /* SBIOS heartbeat interval */ 344 344 struct delayed_work heart_beat;
+6 -11
drivers/platform/x86/amd/pmf/sps.c
··· 404 404 405 405 int amd_pmf_init_sps(struct amd_pmf_dev *dev) 406 406 { 407 - int err; 408 - 409 407 dev->current_profile = PLATFORM_PROFILE_BALANCED; 410 408 411 409 if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR)) { ··· 418 420 amd_pmf_set_sps_power_limits(dev); 419 421 } 420 422 421 - dev->pprof.name = "amd-pmf"; 422 - dev->pprof.dev = dev->dev; 423 - dev->pprof.ops = &amd_pmf_profile_ops; 424 - 425 423 /* Create platform_profile structure and register */ 426 - err = devm_platform_profile_register(&dev->pprof, dev); 427 - if (err) 428 - dev_err(dev->dev, "Failed to register SPS support, this is most likely an SBIOS bug: %d\n", 429 - err); 424 + dev->ppdev = devm_platform_profile_register(dev->dev, "amd-pmf", dev, 425 + &amd_pmf_profile_ops); 426 + if (IS_ERR(dev->ppdev)) 427 + dev_err(dev->dev, "Failed to register SPS support, this is most likely an SBIOS bug: %ld\n", 428 + PTR_ERR(dev->ppdev)); 430 429 431 - return err; 430 + return PTR_ERR_OR_ZERO(dev->ppdev); 432 431 }
+6 -9
drivers/platform/x86/asus-wmi.c
··· 313 313 bool mid_fan_curve_available; 314 314 struct fan_curve_data custom_fan_curves[3]; 315 315 316 - struct platform_profile_handler platform_profile_handler; 316 + struct device *ppdev; 317 317 bool platform_profile_support; 318 318 319 319 // The RSOC controls the maximum charging percentage. ··· 3789 3789 * Ensure that platform_profile updates userspace with the change to ensure 3790 3790 * that platform_profile and throttle_thermal_policy_mode are in sync. 3791 3791 */ 3792 - platform_profile_notify(&asus->platform_profile_handler); 3792 + platform_profile_notify(asus->ppdev); 3793 3793 3794 3794 return count; 3795 3795 } ··· 3891 3891 3892 3892 dev_info(dev, "Using throttle_thermal_policy for platform_profile support\n"); 3893 3893 3894 - asus->platform_profile_handler.name = "asus-wmi"; 3895 - asus->platform_profile_handler.dev = dev; 3896 - asus->platform_profile_handler.ops = &asus_wmi_platform_profile_ops; 3897 - 3898 - err = devm_platform_profile_register(&asus->platform_profile_handler, asus); 3899 - if (err) { 3894 + asus->ppdev = devm_platform_profile_register(dev, "asus-wmi", asus, 3895 + &asus_wmi_platform_profile_ops); 3896 + if (IS_ERR(asus->ppdev)) { 3900 3897 dev_err(dev, "Failed to register a platform_profile class device\n"); 3901 - return err; 3898 + return PTR_ERR(asus->ppdev); 3902 3899 } 3903 3900 3904 3901 asus->platform_profile_support = true;
+5 -5
drivers/platform/x86/dell/alienware-wmi.c
··· 406 406 407 407 static struct platform_device *platform_device; 408 408 static struct color_platform colors[4]; 409 - static struct platform_profile_handler pp_handler; 410 409 static enum wmax_thermal_mode supported_thermal_profiles[PLATFORM_PROFILE_LAST]; 411 410 412 411 static u8 interface; ··· 1134 1135 1135 1136 static int create_thermal_profile(struct platform_device *platform_device) 1136 1137 { 1137 - pp_handler.name = "alienware-wmi"; 1138 - pp_handler.dev = &platform_device->dev; 1139 - pp_handler.ops = &awcc_platform_profile_ops; 1138 + struct device *ppdev; 1140 1139 1141 - return devm_platform_profile_register(&pp_handler, NULL); 1140 + ppdev = devm_platform_profile_register(&platform_device->dev, "alienware-wmi", 1141 + NULL, &awcc_platform_profile_ops); 1142 + 1143 + return PTR_ERR_OR_ZERO(ppdev); 1142 1144 } 1143 1145 1144 1146 /*
+5 -16
drivers/platform/x86/dell/dell-pc.c
··· 109 109 #define DELL_ACC_SET_FIELD GENMASK(11, 8) 110 110 #define DELL_THERMAL_SUPPORTED GENMASK(3, 0) 111 111 112 - static struct platform_profile_handler *thermal_handler; 113 - 114 112 enum thermal_mode_bits { 115 113 DELL_BALANCED = BIT(0), 116 114 DELL_COOL_BOTTOM = BIT(1), ··· 252 254 253 255 static int thermal_init(void) 254 256 { 257 + struct device *ppdev; 255 258 int ret; 256 259 257 260 /* If thermal commands are not supported, exit without error */ ··· 270 271 if (IS_ERR(platform_device)) 271 272 return PTR_ERR(platform_device); 272 273 273 - thermal_handler = devm_kzalloc(&platform_device->dev, sizeof(*thermal_handler), GFP_KERNEL); 274 - if (!thermal_handler) { 275 - ret = -ENOMEM; 274 + ppdev = devm_platform_profile_register(&platform_device->dev, "dell-pc", 275 + NULL, &dell_pc_platform_profile_ops); 276 + if (IS_ERR(ppdev)) { 277 + ret = PTR_ERR(ppdev); 276 278 goto cleanup_platform_device; 277 279 } 278 - thermal_handler->name = "dell-pc"; 279 - thermal_handler->dev = &platform_device->dev; 280 - thermal_handler->ops = &dell_pc_platform_profile_ops; 281 - 282 - /* Clean up if failed */ 283 - ret = devm_platform_profile_register(thermal_handler, NULL); 284 - if (ret) 285 - goto cleanup_thermal_handler; 286 280 287 281 return 0; 288 - 289 - cleanup_thermal_handler: 290 - thermal_handler = NULL; 291 282 292 283 cleanup_platform_device: 293 284 platform_device_unregister(platform_device);
+9 -10
drivers/platform/x86/hp/hp-wmi.c
··· 273 273 static struct input_dev *hp_wmi_input_dev; 274 274 static struct input_dev *camera_shutter_input_dev; 275 275 static struct platform_device *hp_wmi_platform_dev; 276 - static struct platform_profile_handler platform_profile_handler; 276 + static struct device *platform_profile_device; 277 277 static struct notifier_block platform_power_source_nb; 278 278 static enum platform_profile_option active_platform_profile; 279 279 static bool platform_profile_support; ··· 1602 1602 1603 1603 static int thermal_profile_setup(struct platform_device *device) 1604 1604 { 1605 + const struct platform_profile_ops *ops; 1605 1606 int err, tp; 1606 1607 1607 1608 if (is_omen_thermal_profile()) { ··· 1618 1617 if (err < 0) 1619 1618 return err; 1620 1619 1621 - platform_profile_handler.ops = &platform_profile_omen_ops; 1620 + ops = &platform_profile_omen_ops; 1622 1621 } else if (is_victus_thermal_profile()) { 1623 1622 err = platform_profile_victus_get_ec(&active_platform_profile); 1624 1623 if (err < 0) ··· 1632 1631 if (err < 0) 1633 1632 return err; 1634 1633 1635 - platform_profile_handler.ops = &platform_profile_victus_ops; 1634 + ops = &platform_profile_victus_ops; 1636 1635 } else { 1637 1636 tp = thermal_profile_get(); 1638 1637 ··· 1647 1646 if (err) 1648 1647 return err; 1649 1648 1650 - platform_profile_handler.ops = &hp_wmi_platform_profile_ops; 1649 + ops = &hp_wmi_platform_profile_ops; 1651 1650 } 1652 1651 1653 - platform_profile_handler.name = "hp-wmi"; 1654 - platform_profile_handler.dev = &device->dev; 1655 - 1656 - err = devm_platform_profile_register(&platform_profile_handler, NULL); 1657 - if (err) 1658 - return err; 1652 + platform_profile_device = devm_platform_profile_register(&device->dev, "hp-wmi", 1653 + NULL, ops); 1654 + if (IS_ERR(platform_profile_device)) 1655 + return PTR_ERR(platform_profile_device); 1659 1656 1660 1657 platform_profile_support = true; 1661 1658
+8 -7
drivers/platform/x86/ideapad-laptop.c
··· 142 142 143 143 struct ideapad_dytc_priv { 144 144 enum platform_profile_option current_profile; 145 - struct platform_profile_handler pprof; 145 + struct device *ppdev; /* platform profile device */ 146 146 struct mutex mutex; /* protects the DYTC interface */ 147 147 struct ideapad_private *priv; 148 148 }; ··· 1050 1050 1051 1051 if (profile != priv->dytc->current_profile) { 1052 1052 priv->dytc->current_profile = profile; 1053 - platform_profile_notify(&priv->dytc->pprof); 1053 + platform_profile_notify(priv->dytc->ppdev); 1054 1054 } 1055 1055 } 1056 1056 ··· 1117 1117 1118 1118 mutex_init(&priv->dytc->mutex); 1119 1119 1120 - priv->dytc->pprof.name = "ideapad-laptop"; 1121 - priv->dytc->pprof.dev = &priv->platform_device->dev; 1122 1120 priv->dytc->priv = priv; 1123 - priv->dytc->pprof.ops = &dytc_profile_ops; 1124 1121 1125 1122 /* Create platform_profile structure and register */ 1126 - err = devm_platform_profile_register(&priv->dytc->pprof, &priv->dytc); 1127 - if (err) 1123 + priv->dytc->ppdev = devm_platform_profile_register(&priv->platform_device->dev, 1124 + "ideapad-laptop", &priv->dytc, 1125 + &dytc_profile_ops); 1126 + if (IS_ERR(priv->dytc->ppdev)) { 1127 + err = PTR_ERR(priv->dytc->ppdev); 1128 1128 goto pp_reg_failed; 1129 + } 1129 1130 1130 1131 /* Ensure initial values are correct */ 1131 1132 dytc_profile_refresh(priv);
+4 -5
drivers/platform/x86/inspur_platform_profile.c
··· 32 32 33 33 struct inspur_wmi_priv { 34 34 struct wmi_device *wdev; 35 - struct platform_profile_handler handler; 35 + struct device *ppdev; 36 36 }; 37 37 38 38 static int inspur_wmi_perform_query(struct wmi_device *wdev, ··· 190 190 priv->wdev = wdev; 191 191 dev_set_drvdata(&wdev->dev, priv); 192 192 193 - priv->handler.name = "inspur-wmi"; 194 - priv->handler.dev = &wdev->dev; 195 - priv->handler.ops = &inspur_platform_profile_ops; 193 + priv->ppdev = devm_platform_profile_register(&wdev->dev, "inspur-wmi", priv, 194 + &inspur_platform_profile_ops); 196 195 197 - return devm_platform_profile_register(&priv->handler, priv); 196 + return PTR_ERR_OR_ZERO(priv->ppdev); 198 197 } 199 198 200 199 static const struct wmi_device_id inspur_wmi_id_table[] = {
+5 -9
drivers/platform/x86/thinkpad_acpi.c
··· 962 962 static struct platform_device *tpacpi_pdev; 963 963 static struct platform_device *tpacpi_sensors_pdev; 964 964 static struct device *tpacpi_hwmon; 965 + static struct device *tpacpi_pprof; 965 966 static struct input_dev *tpacpi_inputdev; 966 967 static struct mutex tpacpi_inputdev_send_mutex; 967 968 static LIST_HEAD(tpacpi_all_drivers); ··· 10555 10554 .profile_set = dytc_profile_set, 10556 10555 }; 10557 10556 10558 - static struct platform_profile_handler dytc_profile = { 10559 - .name = "thinkpad-acpi", 10560 - .ops = &dytc_profile_ops, 10561 - }; 10562 - 10563 10557 static void dytc_profile_refresh(void) 10564 10558 { 10565 10559 enum platform_profile_option profile; ··· 10583 10587 err = convert_dytc_to_profile(funcmode, perfmode, &profile); 10584 10588 if (!err && profile != dytc_current_profile) { 10585 10589 dytc_current_profile = profile; 10586 - platform_profile_notify(&dytc_profile); 10590 + platform_profile_notify(tpacpi_pprof); 10587 10591 } 10588 10592 } 10589 10593 ··· 10644 10648 dbg_printk(TPACPI_DBG_INIT, 10645 10649 "DYTC version %d: thermal mode available\n", dytc_version); 10646 10650 10647 - dytc_profile.dev = &tpacpi_pdev->dev; 10648 10651 /* Create platform_profile structure and register */ 10649 - err = devm_platform_profile_register(&dytc_profile, NULL); 10652 + tpacpi_pprof = devm_platform_profile_register(&tpacpi_pdev->dev, "thinkpad-acpi", 10653 + NULL, &dytc_profile_ops); 10650 10654 /* 10651 10655 * If for some reason platform_profiles aren't enabled 10652 10656 * don't quit terminally. 10653 10657 */ 10654 - if (err) 10658 + if (IS_ERR(tpacpi_pprof)) 10655 10659 return -ENODEV; 10656 10660 10657 10661 /* Ensure initial values are correct */
+8 -4
include/linux/platform_profile.h
··· 45 45 const struct platform_profile_ops *ops; 46 46 }; 47 47 48 - int platform_profile_register(struct platform_profile_handler *pprof, void *drvdata); 49 - int platform_profile_remove(struct platform_profile_handler *pprof); 50 - int devm_platform_profile_register(struct platform_profile_handler *pprof, void *drvdata); 48 + struct device *platform_profile_register(struct device *dev, const char *name, 49 + void *drvdata, 50 + const struct platform_profile_ops *ops); 51 + int platform_profile_remove(struct device *dev); 52 + struct device *devm_platform_profile_register(struct device *dev, const char *name, 53 + void *drvdata, 54 + const struct platform_profile_ops *ops); 51 55 int platform_profile_cycle(void); 52 - void platform_profile_notify(struct platform_profile_handler *pprof); 56 + void platform_profile_notify(struct device *dev); 53 57 54 58 #endif /*_PLATFORM_PROFILE_H_*/