virtio: Remove PM #ifdef guards to fix i2c driver
PATCH 1/1 virtio: Remove PM #ifdef guards to fix i2c driver
From: Arnd Bergmann <[email protected]>
A cleanup in the virtio i2c caused a build failure:
drivers/i2c/busses/i2c-virtio.c:270:10: error: 'struct virtio_driver' has no member named 'freeze' drivers/i2c/busses/i2c-virtio.c:271:10: error: 'struct virtio_driver' has no member named 'restore'
Change the structure definition to allow this cleanup to be applied everywhere.
--- include/linux/virtio.h | 2 -- 1 file changed, 2 deletions(-)
include/linux/virtio.h +0 -2
@@ -218,10 +218,8 @@ struct virtio_driver {void (*scan)(struct virtio_device *dev);void (*remove)(struct virtio_device *dev);void (*config_changed)(struct virtio_device *dev); -#ifdef CONFIG_PM int (*freeze)(struct virtio_device *dev);int (*restore)(struct virtio_device *dev); -#endif };static inline struct virtio_driver *drv_to_virtio (struct device_driver *drv)
Signature · 1 line
2.39.2
Hi Arnd,
Quoted 21 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
A cleanup in the virtio i2c caused a build failure:
drivers/i2c/busses/i2c-virtio.c:270:10: error: 'structvirtio_driver' has no member named 'freeze'drivers/i2c/busses/i2c-virtio.c:271:10: error: 'structvirtio_driver' has no member named 'restore'Change the structure definition to allow this cleanup to be applied everywhere.
Fixes 73d546c76235b ("i2c: virtio: Remove #ifdef guards for PM related functions")Signed-off-by Arnd Bergmann <[email protected]>--- include/linux/virtio.h | 2 -- 1 file changed, 2 deletions(-)include/linux/virtio.h +0
-0
include/linux/virtio.h struct virtio_driver { · line 224
Quoted 7 lines
include/linux/virtio.h +0
-2@@ -218,10 +218,8 @@ struct virtio_driver {void (*scan)(struct virtio_device *dev);void (*remove)(struct virtio_device *dev);void (*config_changed)(struct virtio_device *dev); -#ifdef CONFIG_PM int (*freeze)(struct virtio_device *dev);int (*restore)(struct virtio_device *dev); -#endif
oh yes! Thank you!
Andi
Hi,
Le mardi 01 août 2023 à 12:58 +0200, Arnd Bergmann a écrit :
Quoted 9 lines
From: Arnd Bergmann <[email protected]>
A cleanup in the virtio i2c caused a build failure:
drivers/i2c/busses/i2c-virtio.c:270:10: error: 'structvirtio_driver' has no member named 'freeze'drivers/i2c/busses/i2c-virtio.c:271:10: error: 'structvirtio_driver' has no member named 'restore'
Quoted 6 lines
Change the structure definition to allow this cleanup to be applied everywhere.
Fixes 73d546c76235b ("i2c: virtio: Remove #ifdef guards for PMrelated functions")
Signed-off-by Arnd Bergmann <[email protected]>
Thanks, I didn't realize it was merged already.
Cheers,
-Paul
Quoted 20 lines
---
include/linux/virtio.h | 2 --1 file changed, 2 deletions(-)include/linux/virtio.h +0
-2@@ -218,10 +218,8 @@ struct virtio_driver { void (*scan)(struct virtio_device *dev); void (*remove)(struct virtio_device *dev); void (*config_changed)(struct virtio_device *dev); -#ifdef CONFIG_PM int (*freeze)(struct virtio_device *dev); int (*restore)(struct virtio_device *dev); -#endif };
static inline structvirtio_driver*drv_to_virtio(structdevice_driver*drv)
Hi,
Quoted 15 lines · Paul Cercueil
Hi,
Le mardi 01 août 2023 à 12:58 +0200, Arnd Bergmann a écrit :
Quoted 12 lines
From: Arnd Bergmann <[email protected]>
A cleanup in the virtio i2c caused a build failure:
drivers/i2c/busses/i2c-virtio.c:270:10: error: 'structvirtio_driver' has no member named 'freeze'drivers/i2c/busses/i2c-virtio.c:271:10: error: 'structvirtio_driver' has no member named 'restore'Change the structure definition to allow this cleanup to be applied everywhere.
Quoted 7 lines
Quoted 3 lines
Fixes 73d546c76235b ("i2c: virtio: Remove #ifdef guards for PMrelated functions")
Signed-off-by Arnd Bergmann <[email protected]>Thanks, I didn't realize it was merged already.
Reviewed-by Paul Cercueil <[email protected]>
Actually this fix is taken from linux-next, it's not in Wolfram's branch, it's in mine. I can still force-push a fixed version in Paul's original patch in order to avoid breaking the bisectability.
Andi
Andi Shyti
AppliedHi
Quoted 9 lines · Arnd Bergmann
A cleanup in the virtio i2c caused a build failure:
drivers/i2c/busses/i2c-virtio.c:270:10: error: 'structvirtio_driver' has no member named 'freeze'drivers/i2c/busses/i2c-virtio.c:271:10: error: 'structvirtio_driver' has no member named 'restore'Change the structure definition to allow this cleanup to be applied everywhere.
[...]
Applied to i2c/andi-for-next on
https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git
Please note that this patch may still undergo further evaluation and the final decision will be made in collaboration with Wolfram.
Thank you,
Andi
Patches applied
===============
[1/1] virtio: Remove PM #ifdef guards to fix i2c driver
commit: 37097e6ffd22bb9ec0d87dfe5c6c3eec4d5b5421