lkml.org 
[lkml]   [2011]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/4] PM / Sleep: Make pm op() and pm noirq op() return callback pointers
Date
Rafael J. Wysocki <rjw <at> sisk.pl> writes:

>
> From: Rafael J. Wysocki <rjw <at> sisk.pl>
>
> Make the pm_op() and pm_noirq_op() functions return pointers to
> appropriate callbacks instead of executing those callbacks and
> returning their results.
>
> This change is required for a subsequent modification that will
> execute the corresponding driver callback if the subsystem
> callback returned by either pm_op(), or pm_noirq_op() is NULL.
>

Hello Rafael,

How about typedef'ing something like pm_callback_t for readability?

typedef int (*pm_callback_t)(struct device *);

This way, the code will be easier to read.
(Dropped inline changes below due to the grumpiness of the GMANE's
web interface)

Thanks.
Namhyung Kim




\
 
 \ /
  Last update: 2011-12-12 05:07    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog