Skip to content

Commit

Permalink
linuxkpi: Use devm_add_action from base
Browse files Browse the repository at this point in the history
Sponsored by:	Beckhoff Automation GmbH & Co. KG
  • Loading branch information
evadot committed Mar 28, 2023
1 parent dc76e97 commit 727cf70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions linuxkpi/gplv2/include/linux/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include_next <linux/device.h>

#if __FreeBSD_version < 1400085

/* allows to add/remove a custom action to devres stack */
int devm_add_action(struct device *dev, void (*action)(void *), void *data);

Expand All @@ -17,5 +19,6 @@ static inline int devm_add_action_or_reset(struct device *dev,

return ret;
}
#endif

#endif /* _LINUX_DEVICE_H_ */
4 changes: 4 additions & 0 deletions linuxkpi/gplv2/src/linux_devres.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#include <sys/param.h>

#if __FreeBSD_version < 1400085
#include <linux/device.h>

/*
Expand Down Expand Up @@ -42,3 +45,4 @@ int devm_add_action(struct device *dev, void (*action)(void *), void *data)
return 0;
}
EXPORT_SYMBOL_GPL(devm_add_action);
#endif

0 comments on commit 727cf70

Please sign in to comment.