Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: ulpi: Make container_of() no-op in to_ulpi_dev()

Move embedded struct device member to make container_of() noop

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230621163122.5693-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Andy Shevchenko and committed by
Greg Kroah-Hartman
e6ecc041 ff399bab

+1 -1
+1 -1
include/linux/ulpi/driver.h
··· 15 15 * @dev: device interface 16 16 */ 17 17 struct ulpi { 18 + struct device dev; 18 19 struct ulpi_device_id id; 19 20 const struct ulpi_ops *ops; 20 - struct device dev; 21 21 }; 22 22 23 23 #define to_ulpi_dev(d) container_of(d, struct ulpi, dev)