usb: ulpi: Make container_of() no-op in to_ulpi_dev()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 21 Jun 2023 16:31:22 +0000 (19:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Jun 2023 06:59:56 +0000 (08:59 +0200)
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>
include/linux/ulpi/driver.h

index c7a1810..a8cb617 100644 (file)
@@ -15,9 +15,9 @@ struct ulpi_ops;
  * @dev: device interface
  */
 struct ulpi {
+       struct device dev;
        struct ulpi_device_id id;
        const struct ulpi_ops *ops;
-       struct device dev;
 };
 
 #define to_ulpi_dev(d) container_of(d, struct ulpi, dev)