usb: chipidea: ci13xxx_imx: remove reg_vbus
authorFabio Estevam <fabio.estevam@freescale.com>
Thu, 13 Jun 2013 14:59:49 +0000 (17:59 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Jun 2013 20:45:46 +0000 (13:45 -0700)
commite56ae54ff157701ab811b03cab195d8e5eca6628
tree6e9371772fabcb82208fb3feb75cb542ba106ac8
parent770719df7b2cee6b4c497cfacee9cb8427fd34c2
usb: chipidea: ci13xxx_imx: remove reg_vbus

There is no need to keep a 'reg_vbus' indirection, so get rid of it.

The motivation for doing this change is that in the case of error, the current
code only sets the local reg_vbus to NULL instead of updating the private
structure 'data->reg_vbus'.

Updating only the local reg_vbus is wrong, since we currently check for
data->reg_vbus in the ci13xxx_imx_remove() function.

In order to avoid such issue, just use 'data->reg_vbus' directly.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/ci13xxx_imx.c