[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120813210444.GJ24088@thinkpad-t410>
Date: Mon, 13 Aug 2012 16:04:44 -0500
From: Seth Forshee <seth.forshee@...onical.com>
To: Matthew Garrett <mjg@...hat.com>
Cc: linux-kernel@...r.kernel.org, platform-driver-x86@...r.kernel.org,
Bernhard Froemel <froemel@...rs.tuwien.ac.at>
Subject: Re: [PATCH 2/2] apple_gmux: Add support for newer hardware
On Mon, Aug 13, 2012 at 04:20:32PM -0400, Matthew Garrett wrote:
> +static int gmux_index_wait_ready(struct apple_gmux_data *gmux_data)
> +{
> + int i = 200;
> + u8 gwr = inb(gmux_data->iostart + GMUX_PORT_WRITE);
> +
> + while (i && (gwr & 0x01)) {
> + inb(gmux_data->iostart + GMUX_PORT_READ);
> + gwr = inb(gmux_data->iostart + GMUX_PORT_WRITE);
> + msleep(100);
Wouldn't it make more sense if the msleep was before reading the port
again? Otherwise there's no substantial dely between the first and
second times we read it.
> +static int gmux_index_wait_complete(struct apple_gmux_data *gmux_data)
> +{
> + int i = 200;
> + u8 gwr = inb(gmux_data->iostart + GMUX_PORT_WRITE);
> +
> + while (i && (gwr & 0x01)) {
> + gwr = inb(gmux_data->iostart + GMUX_PORT_WRITE);
> + msleep(100);
Likewise.
--
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