Message ID | 20170306200401.29923-5-niklas.soderlund+renesas@ragnatech.se (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Eduardo Valentin |
Headers | show |
On Mon, Mar 6, 2017 at 9:03 PM, Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> wrote: > The struct rcar_gen3_thermal_tsc benefits from knowing which TSC it > represent. Record this at probe time before this information is lost. > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Niklas, On Mon, Mar 6, 2017 at 9:03 PM, Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> wrote: > The struct rcar_gen3_thermal_tsc benefits from knowing which TSC it > represent. Record this at probe time before this information is lost. > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> > --- > drivers/thermal/rcar_gen3_thermal.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c > index 5d4a5483eb13e796..65f7204936a18278 100644 > --- a/drivers/thermal/rcar_gen3_thermal.c > +++ b/drivers/thermal/rcar_gen3_thermal.c > @@ -68,6 +68,8 @@ struct equation_coefs { > }; > > struct rcar_gen3_thermal_tsc { > + struct device *dev; > + int num; BTW, adding the "int" here will introduce a 4-byte gap on 64-bit platforms. Note that it doesn't hurt much in this case, as the struct will be padded to a multiple of 8 bytes anyway. > void __iomem *base; > struct thermal_zone_device *zone; > struct equation_coefs coef; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
On Mon, Mar 06, 2017 at 09:03:58PM +0100, Niklas Söderlund wrote: > The struct rcar_gen3_thermal_tsc benefits from knowing which TSC it > represent. Record this at probe time before this information is lost. > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> See next review. I don't think this is needed.
diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c index 5d4a5483eb13e796..65f7204936a18278 100644 --- a/drivers/thermal/rcar_gen3_thermal.c +++ b/drivers/thermal/rcar_gen3_thermal.c @@ -68,6 +68,8 @@ struct equation_coefs { }; struct rcar_gen3_thermal_tsc { + struct device *dev; + int num; void __iomem *base; struct thermal_zone_device *zone; struct equation_coefs coef; @@ -282,6 +284,9 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev) goto error_unregister; } + tsc->dev = dev; + tsc->num = i; + res = platform_get_resource(pdev, IORESOURCE_MEM, i); if (!res) { ret = -ENODEV;
The struct rcar_gen3_thermal_tsc benefits from knowing which TSC it represent. Record this at probe time before this information is lost. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> --- drivers/thermal/rcar_gen3_thermal.c | 5 +++++ 1 file changed, 5 insertions(+)