Message ID | 20200402142747.8307-2-daniel.lezcano@linaro.org (mailing list archive) |
---|---|
State | Mainlined, archived |
Headers | show |
Series | [V2,1/9] thermal: Move default governor config option to the internal header | expand |
On Thu, Apr 2, 2020 at 7:58 PM Daniel Lezcano <daniel.lezcano@linaro.org> wrote: > > The structure belongs to the thermal core internals but it is exported > in the include/linux/thermal.h > > For better self-encapsulation and less impact for the compilation if a > change is made on it. Move the structure in the thermal core internal > header file. > > Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org> > --- > drivers/thermal/thermal_core.h | 5 +++++ > include/linux/thermal.h | 6 +----- > 2 files changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h > index 828305508556..5d08ad60d9df 100644 > --- a/drivers/thermal/thermal_core.h > +++ b/drivers/thermal/thermal_core.h > @@ -41,6 +41,11 @@ extern struct thermal_governor *__governor_thermal_table_end[]; > __governor < __governor_thermal_table_end; \ > __governor++) > > +struct thermal_attr { > + struct device_attribute attr; > + char name[THERMAL_NAME_LENGTH]; > +}; > + > /* > * This structure is used to describe the behavior of > * a certain cooling device on a certain trip point > diff --git a/include/linux/thermal.h b/include/linux/thermal.h > index 71cff87dcb46..5aa80fb2fb61 100644 > --- a/include/linux/thermal.h > +++ b/include/linux/thermal.h > @@ -35,6 +35,7 @@ > struct thermal_zone_device; > struct thermal_cooling_device; > struct thermal_instance; > +struct thermal_attr; > > enum thermal_device_mode { > THERMAL_DEVICE_DISABLED = 0, > @@ -119,11 +120,6 @@ struct thermal_cooling_device { > struct list_head node; > }; > > -struct thermal_attr { > - struct device_attribute attr; > - char name[THERMAL_NAME_LENGTH]; > -}; > - > /** > * struct thermal_zone_device - structure for a thermal zone > * @id: unique id number for each thermal zone > -- > 2.17.1 >
diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 828305508556..5d08ad60d9df 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -41,6 +41,11 @@ extern struct thermal_governor *__governor_thermal_table_end[]; __governor < __governor_thermal_table_end; \ __governor++) +struct thermal_attr { + struct device_attribute attr; + char name[THERMAL_NAME_LENGTH]; +}; + /* * This structure is used to describe the behavior of * a certain cooling device on a certain trip point diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 71cff87dcb46..5aa80fb2fb61 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -35,6 +35,7 @@ struct thermal_zone_device; struct thermal_cooling_device; struct thermal_instance; +struct thermal_attr; enum thermal_device_mode { THERMAL_DEVICE_DISABLED = 0, @@ -119,11 +120,6 @@ struct thermal_cooling_device { struct list_head node; }; -struct thermal_attr { - struct device_attribute attr; - char name[THERMAL_NAME_LENGTH]; -}; - /** * struct thermal_zone_device - structure for a thermal zone * @id: unique id number for each thermal zone
The structure belongs to the thermal core internals but it is exported in the include/linux/thermal.h For better self-encapsulation and less impact for the compilation if a change is made on it. Move the structure in the thermal core internal header file. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> --- drivers/thermal/thermal_core.h | 5 +++++ include/linux/thermal.h | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-)