summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-08-05 20:50:00 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-06 00:37:47 +0200
commitf572d96539e3764f56298b6e57f8ce3bea05c6fb (patch)
tree055dafa4ad59487530fcd900fcff5b4d674fb6ac /Kernel
parent32a150f2b4f2c100e88e198b78ca2b37cd24a28e (diff)
downloadserenity-f572d96539e3764f56298b6e57f8ce3bea05c6fb.zip
Kernel: Make HardwareTimer::model() return StringView
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Time/APICTimer.h2
-rw-r--r--Kernel/Time/HPETComparator.h2
-rw-r--r--Kernel/Time/HardwareTimer.h2
-rw-r--r--Kernel/Time/PIT.h2
-rw-r--r--Kernel/Time/RTC.h2
5 files changed, 5 insertions, 5 deletions
diff --git a/Kernel/Time/APICTimer.h b/Kernel/Time/APICTimer.h
index 3a442314b4..400adb79be 100644
--- a/Kernel/Time/APICTimer.h
+++ b/Kernel/Time/APICTimer.h
@@ -16,7 +16,7 @@ class APICTimer final : public HardwareTimer<GenericInterruptHandler> {
public:
static APICTimer* initialize(u8, HardwareTimerBase&);
virtual HardwareTimerType timer_type() const override { return HardwareTimerType::LocalAPICTimer; }
- virtual const char* model() const override { return "LocalAPIC"; }
+ virtual StringView model() const override { return "LocalAPIC"sv; }
virtual size_t ticks_per_second() const override;
virtual bool is_periodic() const override { return m_timer_mode == APIC::TimerMode::Periodic; }
diff --git a/Kernel/Time/HPETComparator.h b/Kernel/Time/HPETComparator.h
index 9d2bd5e141..a09408ce0d 100644
--- a/Kernel/Time/HPETComparator.h
+++ b/Kernel/Time/HPETComparator.h
@@ -19,7 +19,7 @@ public:
static NonnullRefPtr<HPETComparator> create(u8 number, u8 irq, bool periodic_capable, bool is_64bit_capable);
virtual HardwareTimerType timer_type() const override { return HardwareTimerType::HighPrecisionEventTimer; }
- virtual const char* model() const override { return "HPET"; }
+ virtual StringView model() const override { return "HPET"sv; }
u8 comparator_number() const { return m_comparator_number; }
bool is_enabled() const { return m_enabled; }
diff --git a/Kernel/Time/HardwareTimer.h b/Kernel/Time/HardwareTimer.h
index 5abe78c0c4..3d7a5f3dd1 100644
--- a/Kernel/Time/HardwareTimer.h
+++ b/Kernel/Time/HardwareTimer.h
@@ -35,7 +35,7 @@ public:
// classes then should forward this to e.g. GenericInterruptHandler.
virtual void will_be_destroyed() = 0;
- virtual const char* model() const = 0;
+ virtual StringView model() const = 0;
virtual HardwareTimerType timer_type() const = 0;
virtual Function<void(const RegisterState&)> set_callback(Function<void(const RegisterState&)>) = 0;
diff --git a/Kernel/Time/PIT.h b/Kernel/Time/PIT.h
index 1479698e79..3840693005 100644
--- a/Kernel/Time/PIT.h
+++ b/Kernel/Time/PIT.h
@@ -36,7 +36,7 @@ class PIT final : public HardwareTimer<IRQHandler> {
public:
static NonnullRefPtr<PIT> initialize(Function<void(const RegisterState&)>);
virtual HardwareTimerType timer_type() const override { return HardwareTimerType::i8253; }
- virtual const char* model() const override { return "i8254"; }
+ virtual StringView model() const override { return "i8254"sv; }
virtual size_t ticks_per_second() const override;
virtual bool is_periodic() const override { return m_periodic; }
diff --git a/Kernel/Time/RTC.h b/Kernel/Time/RTC.h
index 748f8e28a1..c745194a11 100644
--- a/Kernel/Time/RTC.h
+++ b/Kernel/Time/RTC.h
@@ -15,7 +15,7 @@ class RealTimeClock final : public HardwareTimer<IRQHandler> {
public:
static NonnullRefPtr<RealTimeClock> create(Function<void(const RegisterState&)> callback);
virtual HardwareTimerType timer_type() const override { return HardwareTimerType::RTC; }
- virtual const char* model() const override { return "Real Time Clock"; }
+ virtual StringView model() const override { return "Real Time Clock"sv; }
virtual size_t ticks_per_second() const override;
virtual bool is_periodic() const override { return true; }