Re: [PATCH] Acer Aspire One Fan Control

From: Borislav Petkov
Date: Wed Jun 03 2009 - 04:01:04 EST


Hi,

On Wed, Jun 03, 2009 at 09:52:01AM +0200, Peter Feuerer wrote:
>>> +#define pr_fmt(fmt) "acerhdf: " fmt
>>
>> This is new but it's not used anywhere. Maybe some debug leftovers?
>
> This is the way Joe suggested, how to use printk's:
> You define the pr_fmt(fmt) before any includes and you can just do
> 'pr_notice("Fan control off, to enable:\n");' to printk a notice which
> looks like this: "acerhdf: Fan control off...". Same with pr_err(...)
> which prints an error.

Ah, this thing. Ok.

...

+static int acerhdf_unbind(struct thermal_zone_device *thermal,
+ struct thermal_cooling_device *cdev)
+{
+ if (cdev != acerhdf_cool_dev)
+ return 0;
+
+ if (thermal_zone_unbind_cooling_device(thermal, 0, cdev)) {
+ pr_err("acerhdf: error unbinding cooling dev\n");

you've missed one here.

+ return -EINVAL;
+ }
+ return 0;
+}

...


--
Regards/Gruss,
Boris.
--
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/