hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/rtc/rtc-hid-sensor-time.c
....@@ -1,20 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * HID Sensor Time Driver
34 * Copyright (c) 2012, Alexander Holler.
4
- *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms and conditions of the GNU General Public License,
7
- * version 2, as published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope it will be useful, but WITHOUT
10
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
- * more details.
13
- *
14
- * You should have received a copy of the GNU General Public License along with
15
- * this program; if not, write to the Free Software Foundation, Inc.,
16
- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
17
- *
185 */
196 #include <linux/device.h>
207 #include <linux/platform_device.h>
....@@ -205,8 +192,7 @@
205192 static int hid_rtc_read_time(struct device *dev, struct rtc_time *tm)
206193 {
207194 unsigned long flags;
208
- struct hid_time_state *time_state =
209
- platform_get_drvdata(to_platform_device(dev));
195
+ struct hid_time_state *time_state = dev_get_drvdata(dev);
210196 int ret;
211197
212198 reinit_completion(&time_state->comp_last_time);