]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb: chipidea: ci13xxx_imx: remove reg_vbus
authorFabio Estevam <fabio.estevam@freescale.com>
Thu, 13 Jun 2013 14:59:49 +0000 (17:59 +0300)
committerJason Liu <r64343@freescale.com>
Wed, 30 Oct 2013 01:54:07 +0000 (09:54 +0800)
commite154f17efb46ebd3645eb10294cc4a3a6ef1fedb
tree28a7caf0c506f52b3431466444ae5ff835e8f70a
parent2686f5536fdc2c5f52a57cb4988354267bb42299
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