Loading include/linux/usb/phy.h +9 −9 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ extern void usb_remove_phy(struct usb_phy *); /* helpers for direct access thru low-level io interface */ static inline int usb_phy_io_read(struct usb_phy *x, u32 reg) { if (x->io_ops && x->io_ops->read) if (x && x->io_ops && x->io_ops->read) return x->io_ops->read(x, reg); return -EINVAL; Loading @@ -153,7 +153,7 @@ static inline int usb_phy_io_read(struct usb_phy *x, u32 reg) static inline int usb_phy_io_write(struct usb_phy *x, u32 val, u32 reg) { if (x->io_ops && x->io_ops->write) if (x && x->io_ops && x->io_ops->write) return x->io_ops->write(x, val, reg); return -EINVAL; Loading @@ -162,7 +162,7 @@ static inline int usb_phy_io_write(struct usb_phy *x, u32 val, u32 reg) static inline int usb_phy_init(struct usb_phy *x) { if (x->init) if (x && x->init) return x->init(x); return 0; Loading @@ -171,14 +171,14 @@ usb_phy_init(struct usb_phy *x) static inline void usb_phy_shutdown(struct usb_phy *x) { if (x->shutdown) if (x && x->shutdown) x->shutdown(x); } static inline int usb_phy_vbus_on(struct usb_phy *x) { if (!x->set_vbus) if (!x || !x->set_vbus) return 0; return x->set_vbus(x, true); Loading @@ -187,7 +187,7 @@ usb_phy_vbus_on(struct usb_phy *x) static inline int usb_phy_vbus_off(struct usb_phy *x) { if (!x->set_vbus) if (!x || !x->set_vbus) return 0; return x->set_vbus(x, false); Loading Loading @@ -270,7 +270,7 @@ usb_phy_set_power(struct usb_phy *x, unsigned mA) static inline int usb_phy_set_suspend(struct usb_phy *x, int suspend) { if (x->set_suspend != NULL) if (x && x->set_suspend != NULL) return x->set_suspend(x, suspend); else return 0; Loading @@ -279,7 +279,7 @@ usb_phy_set_suspend(struct usb_phy *x, int suspend) static inline int usb_phy_notify_connect(struct usb_phy *x, enum usb_device_speed speed) { if (x->notify_connect) if (x && x->notify_connect) return x->notify_connect(x, speed); else return 0; Loading @@ -288,7 +288,7 @@ usb_phy_notify_connect(struct usb_phy *x, enum usb_device_speed speed) static inline int usb_phy_notify_disconnect(struct usb_phy *x, enum usb_device_speed speed) { if (x->notify_disconnect) if (x && x->notify_disconnect) return x->notify_disconnect(x, speed); else return 0; Loading Loading
include/linux/usb/phy.h +9 −9 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ extern void usb_remove_phy(struct usb_phy *); /* helpers for direct access thru low-level io interface */ static inline int usb_phy_io_read(struct usb_phy *x, u32 reg) { if (x->io_ops && x->io_ops->read) if (x && x->io_ops && x->io_ops->read) return x->io_ops->read(x, reg); return -EINVAL; Loading @@ -153,7 +153,7 @@ static inline int usb_phy_io_read(struct usb_phy *x, u32 reg) static inline int usb_phy_io_write(struct usb_phy *x, u32 val, u32 reg) { if (x->io_ops && x->io_ops->write) if (x && x->io_ops && x->io_ops->write) return x->io_ops->write(x, val, reg); return -EINVAL; Loading @@ -162,7 +162,7 @@ static inline int usb_phy_io_write(struct usb_phy *x, u32 val, u32 reg) static inline int usb_phy_init(struct usb_phy *x) { if (x->init) if (x && x->init) return x->init(x); return 0; Loading @@ -171,14 +171,14 @@ usb_phy_init(struct usb_phy *x) static inline void usb_phy_shutdown(struct usb_phy *x) { if (x->shutdown) if (x && x->shutdown) x->shutdown(x); } static inline int usb_phy_vbus_on(struct usb_phy *x) { if (!x->set_vbus) if (!x || !x->set_vbus) return 0; return x->set_vbus(x, true); Loading @@ -187,7 +187,7 @@ usb_phy_vbus_on(struct usb_phy *x) static inline int usb_phy_vbus_off(struct usb_phy *x) { if (!x->set_vbus) if (!x || !x->set_vbus) return 0; return x->set_vbus(x, false); Loading Loading @@ -270,7 +270,7 @@ usb_phy_set_power(struct usb_phy *x, unsigned mA) static inline int usb_phy_set_suspend(struct usb_phy *x, int suspend) { if (x->set_suspend != NULL) if (x && x->set_suspend != NULL) return x->set_suspend(x, suspend); else return 0; Loading @@ -279,7 +279,7 @@ usb_phy_set_suspend(struct usb_phy *x, int suspend) static inline int usb_phy_notify_connect(struct usb_phy *x, enum usb_device_speed speed) { if (x->notify_connect) if (x && x->notify_connect) return x->notify_connect(x, speed); else return 0; Loading @@ -288,7 +288,7 @@ usb_phy_notify_connect(struct usb_phy *x, enum usb_device_speed speed) static inline int usb_phy_notify_disconnect(struct usb_phy *x, enum usb_device_speed speed) { if (x->notify_disconnect) if (x && x->notify_disconnect) return x->notify_disconnect(x, speed); else return 0; Loading