Re: [PATCH] [MMC] wbsd pnp suspend

From: Andrew Morton
Date: Tue Nov 08 2005 - 01:50:19 EST


Pierre Ossman <drzeus@xxxxxxxxx> wrote:
>
> Allow the wbsd driver to use the new suspend/resume functions added to
> the PnP layer.
>

Doesn't Russell handle mmc stuff?

> -static int wbsd_suspend(struct device *dev, pm_message_t state)
> +static int wbsd_suspend(struct wbsd_host *host, pm_message_t state)
> +{
> + BUG_ON(host == NULL);
> +
> + return mmc_suspend_host(host->mmc, state);
> +}

There's not much point in this BUG_ON. If host==0 then we'll get a
perfectly good oops in the next statement - it's just as informative.

> +static int wbsd_resume(struct wbsd_host *host)
> +{
> + BUG_ON(host == NULL);

Ditto.

> + if (host->config != 0)
> + {
> + if (!wbsd_chip_validate(host))
> + {

Like:

if (host->config != 0) {
if (!wbsd_chip_validate(host)) {

please.

-
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/