Re: [PATCH v4 2/5] hwmon: exynos4: Move thermal sensor driver todriver/thermal directory
From: Guenter Roeck
Date: Sat May 12 2012 - 11:41:48 EST
On Sat, May 12, 2012 at 05:40:42AM -0400, Amit Daniel Kachhap wrote:
> This movement is needed because the hwmon entries and corresponding
> sysfs interface is a duplicate of utilities already provided by
> driver/thermal/thermal_sys.c. The goal is to place it in thermal folder
> and add necessary functions to use the in-kernel thermal interfaces.
>
> CC: Guenter Roeck <guenter.roeck@xxxxxxxxxxxx>
> Signed-off-by: Amit Daniel Kachhap <amit.kachhap@xxxxxxxxxx>
> Signed-off-by: Donggeun Kim <dg77.kim@xxxxxxxxxxx>
Acked-by: Guenter Roeck <guenter.roeck@xxxxxxxxxxxx>
Some suggestions, possibly for later cleanup.
> -
> - data = kzalloc(sizeof(struct exynos4_tmu_data), GFP_KERNEL);
If you use devm_kzalloc, you won't have to free it.
[ ...]
> - data->mem = request_mem_region(data->mem->start,
> - resource_size(data->mem), pdev->name);
Same here, with devm_request_mem_region.
[ ... ]
> - data->base = ioremap(data->mem->start, resource_size(data->mem));
and devm_ioremap
[ ... ]
> - ret = request_irq(data->irq, exynos4_tmu_irq,
and devm_request_irq
Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/