summaryrefslogtreecommitdiff
path: root/rust/helpers/platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'rust/helpers/platform.c')
-rw-r--r--rust/helpers/platform.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/rust/helpers/platform.c b/rust/helpers/platform.c
new file mode 100644
index 000000000000..ab9b9f317301
--- /dev/null
+++ b/rust/helpers/platform.c
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/platform_device.h>
+
+void *rust_helper_platform_get_drvdata(const struct platform_device *pdev)
+{
+ return platform_get_drvdata(pdev);
+}
+
+void rust_helper_platform_set_drvdata(struct platform_device *pdev, void *data)
+{
+ platform_set_drvdata(pdev, data);
+}