usb: phy: tegra: Avoid use of sizeof(void)
authorThierry Reding <treding@nvidia.com>
Mon, 21 Jul 2014 11:37:37 +0000 (13:37 +0200)
committerFelipe Balbi <balbi@ti.com>
Wed, 3 Sep 2014 14:16:01 +0000 (09:16 -0500)
commit9ce9ec95fb9b82e09b55a52f1bb8a362bf8f74d8
tree81ae94686d8f07f9d16bdfd76bc9229f55531c95
parent36687e30565100e45f29f8db52dd223dca1d6d99
usb: phy: tegra: Avoid use of sizeof(void)

The PHY configuration is stored in an opaque "config" field, but when
allocating the structure, its proper size needs to be known. In the case
of UTMI, the proper structure is tegra_utmip_config of which a local
variable already exists, so we can use that to obtain the size from.

Fixes the following warning from the sparse checker:

drivers/usb/phy/phy-tegra-usb.c:882:17: warning: expression using sizeof(void)

Fixes: 81d5dfe6d8b3 (usb: phy: tegra: Read UTMIP parameters from device tree)
Cc: stable@vger.kernel.org
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/phy/phy-tegra-usb.c