Skip to content

Commit 9ffa7b9

Browse files
committed
thermal: core: Clean up headers of thermal zone registration functions
For consistency, add a missing thermal_zone_device_register_with_trips() stub for the CONFIG_THERMAL unset case, specify argument names in all of the thermal zone registration and unregistration function headers and make all of them use white space consistently. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 0ca4080 commit 9ffa7b9

File tree

1 file changed

+37
-16
lines changed

1 file changed

+37
-16
lines changed

include/linux/thermal.h

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -300,16 +300,24 @@ int thermal_acpi_critical_trip_temp(struct acpi_device *adev, int *ret_temp);
300300
#endif
301301

302302
#ifdef CONFIG_THERMAL
303-
struct thermal_zone_device *thermal_zone_device_register(const char *, int, int,
304-
void *, struct thermal_zone_device_ops *,
305-
const struct thermal_zone_params *, int, int);
306-
307-
void thermal_zone_device_unregister(struct thermal_zone_device *);
308-
309-
struct thermal_zone_device *
310-
thermal_zone_device_register_with_trips(const char *, struct thermal_trip *, int, int,
311-
void *, struct thermal_zone_device_ops *,
312-
const struct thermal_zone_params *, int, int);
303+
struct thermal_zone_device *thermal_zone_device_register(
304+
const char *type,
305+
int num_trips, int mask,
306+
void *devdata,
307+
struct thermal_zone_device_ops *ops,
308+
const struct thermal_zone_params *tzp,
309+
int passive_delay, int polling_delay);
310+
311+
struct thermal_zone_device *thermal_zone_device_register_with_trips(
312+
const char *type,
313+
struct thermal_trip *trips,
314+
int num_trips, int mask,
315+
void *devdata,
316+
struct thermal_zone_device_ops *ops,
317+
const struct thermal_zone_params *tzp,
318+
int passive_delay, int polling_delay);
319+
320+
void thermal_zone_device_unregister(struct thermal_zone_device *tz);
313321

314322
void *thermal_zone_device_priv(struct thermal_zone_device *tzd);
315323
const char *thermal_zone_device_type(struct thermal_zone_device *tzd);
@@ -351,14 +359,27 @@ int thermal_zone_device_disable(struct thermal_zone_device *tz);
351359
void thermal_zone_device_critical(struct thermal_zone_device *tz);
352360
#else
353361
static inline struct thermal_zone_device *thermal_zone_device_register(
354-
const char *type, int trips, int mask, void *devdata,
355-
struct thermal_zone_device_ops *ops,
356-
const struct thermal_zone_params *tzp,
357-
int passive_delay, int polling_delay)
362+
const char *type,
363+
int num_trips, int mask,
364+
void *devdata,
365+
struct thermal_zone_device_ops *ops,
366+
const struct thermal_zone_params *tzp,
367+
int passive_delay, int polling_delay)
368+
{ return ERR_PTR(-ENODEV); }
369+
370+
static inline struct thermal_zone_device *thermal_zone_device_register_with_trips(
371+
const char *type,
372+
struct thermal_trip *trips,
373+
int num_trips, int mask,
374+
void *devdata,
375+
struct thermal_zone_device_ops *ops,
376+
const struct thermal_zone_params *tzp,
377+
int passive_delay, int polling_delay)
358378
{ return ERR_PTR(-ENODEV); }
359-
static inline void thermal_zone_device_unregister(
360-
struct thermal_zone_device *tz)
379+
380+
static inline void thermal_zone_device_unregister(struct thermal_zone_device *tz)
361381
{ }
382+
362383
static inline struct thermal_cooling_device *
363384
thermal_cooling_device_register(const char *type, void *devdata,
364385
const struct thermal_cooling_device_ops *ops)

0 commit comments

Comments
 (0)