Subject: [PATCH 1/3] ohci-at91: add vbus_pin_inverted platform attribute

From: [email-masked] (Thomas Petazzoni)
Date: Tue, 5 Jul 2011 13:54:55 +0200

Le Tue, 05 Jul 2011 15:39:18 +0400,
Sergei Shtylyov <[email-masked]> a ?crit :

> > -			gpio_direction_output(pdata->vbus_pin[i], 0);
> > +			gpio_direction_output(pdata->vbus_pin[i], 0 ^ pdata->vbus_pin_inverted);
> 
>     Why not simply 'pdata->vbus_pin_inverted'?

> > -			gpio_direction_output(pdata->vbus_pin[i], 1);
> > +			gpio_direction_output(pdata->vbus_pin[i], 1 ^ pdata->vbus_pin_inverted);
> 
>     Why not simply '!pdata->vbus_pin_inverted'?

Ah, correct. The 0 and 1 were present before, and I just wanted to xor
them with vbus_pin_inverted, but obviously, there's a simpler way of
writing things, as you suggest.

I'll update my patch and send a new version after gathering comments
from other reviewers.

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com