lkml.org 
[lkml]   [2011]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 08/18] mfd: twl6040: Add initial support
Hi Peter,

On Tue, Jun 21, 2011 at 04:39:06PM +0300, Peter Ujfalusi wrote:
> +int twl6040_is_powered(struct twl6040 *twl6040)
> +{
> + return twl6040->power_count;
> +}
> +EXPORT_SYMBOL(twl6040_is_powered);
Do we really need to export this one ?

> +static inline int twl6040_get_rev(struct twl6040 *twl6040)
> +{
> + return twl6040->rev;
> +}
> +
> +static inline int twl6040_request_irq(struct twl6040 *twl6040, int irq,
> + irq_handler_t handler,
> + unsigned long irqflags,
> + const char *name,
> + void *data)
> +{
> + if (!twl6040->irq_base)
> + return -EINVAL;
> +
> + return request_threaded_irq(twl6040->irq_base + irq, NULL, handler,
> + irqflags, name, data);
> +}
> +
> +static inline void twl6040_free_irq(struct twl6040 *twl6040, int irq,
> + void *data)
> +{
> + if (!twl6040->irq_base)
> + return;
> +
> + free_irq(twl6040->irq_base + irq, data);
> +}
I don't see the value of those 3 inline functions. Removing them would make
the code actually more understandable (especially for the 2nd one).

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/


\
 
 \ /
  Last update: 2011-07-04 13:51    [W:0.164 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site