[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120501111629.GD20224@sortiz-mobl>
Date: Tue, 1 May 2012 13:16:29 +0200
From: Samuel Ortiz <sameo@...ux.intel.com>
To: Linus Walleij <linus.walleij@...ricsson.com>
Cc: linux-kernel@...r.kernel.org,
Jonas Aaberg <jonas.aberg@...ricsson.com>,
Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH 4/6] mfd/ab8500: print switch off cause
Hi Linus,
On Tue, Apr 17, 2012 at 09:30:40AM +0200, Linus Walleij wrote:
> @@ -1139,7 +1149,20 @@ int __devinit ab8500_init(struct ab8500 *ab8500, enum ab8500_version version)
> AB8500_SWITCH_OFF_STATUS, &value);
> if (ret < 0)
> return ret;
> - dev_info(ab8500->dev, "switch off status: %#x", value);
> + dev_info(ab8500->dev, "switch off cause(s) (%#x): ", value);
> +
> + if (value) {
> + for (i = 0; i < ARRAY_SIZE(switch_off_status); i++) {
> + if (value & 1)
> + printk("\"%s\" ", switch_off_status[i]);
> + value = value >> 1;
> +
> + }
> + printk("\n");
> + } else {
> + printk("None\n");
> + }
So if your default loglevel is not KERN_INFO, you may miss the dev_info
output while getting the printk one. Why not using dev_info() only with e.g.
tabs for the causes ?
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists