Thread (1 message) 1 message, 1 author, 2015-02-11

Re: [PATCH V4 3/4] mmc: pwrseq: Initial support for the simple MMC power sequence provider

From: Alexandre Courbot <hidden>
Date: 2015-02-11 04:34:26
Also in: linux-arm-kernel, linux-mmc

On Wed, Feb 11, 2015 at 1:28 PM, Ulf Hansson [off-list ref] wrote:
[...]
quoted
quoted
+int mmc_pwrseq_simple_alloc(struct mmc_host *host, struct device *dev)
+{
+       struct mmc_pwrseq_simple *pwrseq;
+
+       pwrseq = kzalloc(sizeof(struct mmc_pwrseq_simple), GFP_KERNEL);
+       if (!pwrseq)
+               return -ENOMEM;
+
+       pwrseq->pwrseq.ops = &mmc_pwrseq_simple_ops;
+       host->pwrseq = &pwrseq->pwrseq;
How about making this function return a struct mmc_pwrseq * so this
last line can be moved to mmc_pwrseq_alloc() instead of requiring all
power sequences to do it?

The same applies to

    host->pwrseq = NULL;

in mmc_pwrseq_simple_free(), which could be done in mmc_pwrseq_free() it seems.
Thanks for reviewing!

I like you suggestion, though $subject patch is already part of the PR for 3.20.

Feel free to send a patch, I would happily apply it.
Damn, why am I always so late to review patches...

I will send a fixup patch - better to have this done early.

Thanks!
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help