From c37893847aee14934df0188a7d70b19d1f8921de Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Sun, 17 Jul 2022 05:44:19 +0200 Subject: [PATCH] atimach64gx: self-registration with the device registry. --- devices/video/atimach64gx.cpp | 7 +++++++ devices/video/atimach64gx.h | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/devices/video/atimach64gx.cpp b/devices/video/atimach64gx.cpp index f3795d5..c5cd38c 100644 --- a/devices/video/atimach64gx.cpp +++ b/devices/video/atimach64gx.cpp @@ -25,6 +25,7 @@ along with this program. If not, see . */ #include +#include #include #include #include @@ -356,3 +357,9 @@ void AtiMach64Gx::rgb514_write_ind_reg(uint8_t reg_addr, uint8_t value) break; } } + +static const DeviceDescription AtiMach64Gx_Descriptor = { + AtiMach64Gx::create, {}, {} +}; + +REGISTER_DEVICE(AtiMach64Gx, AtiMach64Gx_Descriptor); diff --git a/devices/video/atimach64gx.h b/devices/video/atimach64gx.h index bda2dfc..57957cd 100644 --- a/devices/video/atimach64gx.h +++ b/devices/video/atimach64gx.h @@ -37,6 +37,10 @@ public: AtiMach64Gx(); ~AtiMach64Gx() = default; + static std::unique_ptr create() { + return std::unique_ptr(new AtiMach64Gx()); + } + /* PCI device methods */ bool supports_io_space(void) { return true;