Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/include/linux kvmalloc, kludgey platfo...



details:   https://anonhg.NetBSD.org/src/rev/edbe4f30dd52
branches:  trunk
changeset: 1028371:edbe4f30dd52
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 10:49:55 2021 +0000

description:
kvmalloc, kludgey platformdev hacks

diffstat:

 sys/external/bsd/drm2/include/linux/mm.h              |   9 ++++++++-
 sys/external/bsd/drm2/include/linux/platform_device.h |  17 ++++++++++++++++-
 2 files changed, 24 insertions(+), 2 deletions(-)

diffs (52 lines):

diff -r 385b1a6d4429 -r edbe4f30dd52 sys/external/bsd/drm2/include/linux/mm.h
--- a/sys/external/bsd/drm2/include/linux/mm.h  Sun Dec 19 10:49:47 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/mm.h  Sun Dec 19 10:49:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mm.h,v 1.18 2021/12/19 09:56:10 riastradh Exp $        */
+/*     $NetBSD: mm.h,v 1.19 2021/12/19 10:49:55 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -93,6 +93,13 @@
 }
 
 static inline void *
+kvmalloc(size_t size, gfp_t gfp)
+{
+
+       return kmalloc(size, gfp);
+}
+
+static inline void *
 kvzalloc(size_t size, gfp_t gfp)
 {
 
diff -r 385b1a6d4429 -r edbe4f30dd52 sys/external/bsd/drm2/include/linux/platform_device.h
--- a/sys/external/bsd/drm2/include/linux/platform_device.h     Sun Dec 19 10:49:47 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/platform_device.h     Sun Dec 19 10:49:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: platform_device.h,v 1.7 2015/10/27 13:21:18 riastradh Exp $    */
+/*     $NetBSD: platform_device.h,v 1.8 2021/12/19 10:49:55 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -57,4 +57,19 @@
        return platformdev->pd_dev;
 }
 
+static inline const char *
+platform_device_name(const struct platform_device *platformdev)
+{
+
+       return device_xname(platformdev->pd_dev);
+}
+
+static inline struct platform_device *
+to_platform_device(device_t self)
+{
+
+       /* XXX */
+       return device_private(self);
+}
+
 #endif  /* _LINUX_PLATFORM_DEVICE_H_ */



Home | Main Index | Thread Index | Old Index