All callers have a struct vfio_device trivially available, pass it in directly and avoid calling the expensive vfio_group_get_from_dev().
Showing the changes to include (1 of 5 files). Show all
Unified · Split
| @@ -178,11 +178,11 @@ enum vfio_notify_type { · 177 unmodified lines | |||
| 178 | /* events for VFIO_GROUP_NOTIFY */ | 178 | /* events for VFIO_GROUP_NOTIFY */ |
| 179 | #define VFIO_GROUP_NOTIFY_SET_KVM BIT(0) | 179 | #define VFIO_GROUP_NOTIFY_SET_KVM BIT(0) |
| 180 | 180 | ||
| 181 | extern int vfio_register_notifier(struct device *dev, | 181 | extern int vfio_register_notifier(struct vfio_device *device, |
| 182 | enum vfio_notify_type type, | 182 | enum vfio_notify_type type, |
| 183 | unsigned long *required_events, | 183 | unsigned long *required_events, |
| 184 | struct notifier_block *nb); | 184 | struct notifier_block *nb); |
| 185 | extern int vfio_unregister_notifier(struct device *dev, | 185 | extern int vfio_unregister_notifier(struct vfio_device *device, |
| 186 | enum vfio_notify_type type, | 186 | enum vfio_notify_type type, |
| 187 | struct notifier_block *nb); | 187 | struct notifier_block *nb); |
| 188 | 188 | ||