usb: r8a66597-hcd: fix wrong data access in SuperH on-chip USB

When I used SuperH on-chip USB, there was the problem that accessed
r8a66597_root_hub which was not allocated.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

authored by Yoshihiro Shimoda and committed by Paul Mundt ade7a9b4 51ee3d92

+3 -2
+3 -2
drivers/usb/host/r8a66597-hcd.c
··· 1763 1763 { 1764 1764 struct r8a66597 *r8a66597 = (struct r8a66597 *)_r8a66597; 1765 1765 unsigned long flags; 1766 + int port; 1766 1767 1767 1768 spin_lock_irqsave(&r8a66597->lock, flags); 1768 1769 1769 - r8a66597_root_hub_control(r8a66597, 0); 1770 - r8a66597_root_hub_control(r8a66597, 1); 1770 + for (port = 0; port < R8A66597_MAX_ROOT_HUB; port++) 1771 + r8a66597_root_hub_control(r8a66597, port); 1771 1772 1772 1773 spin_unlock_irqrestore(&r8a66597->lock, flags); 1773 1774 }