hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/clk/clk-xgene.c
....@@ -1,24 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * clk-xgene.c - AppliedMicro X-Gene Clock Interface
34 *
45 * Copyright (c) 2013, Applied Micro Circuits Corporation
56 * Author: Loc Ho <lho@apm.com>
6
- *
7
- * This program is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU General Public License as
9
- * published by the Free Software Foundation; either version 2 of
10
- * the License, or (at your option) any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program; if not, write to the Free Software
19
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20
- * MA 02111-1307 USA
21
- *
227 */
238 #include <linux/module.h>
249 #include <linux/spinlock.h>
....@@ -142,7 +127,7 @@
142127 {
143128 struct xgene_clk_pll *apmclk;
144129 struct clk *clk;
145
- struct clk_init_data init = {};
130
+ struct clk_init_data init;
146131
147132 /* allocate the APM clock structure */
148133 apmclk = kzalloc(sizeof(*apmclk), GFP_KERNEL);
....@@ -262,7 +247,7 @@
262247 else
263248 __acquire(fd->lock);
264249
265
- val = clk_readl(fd->reg);
250
+ val = readl(fd->reg);
266251
267252 if (fd->lock)
268253 spin_unlock_irqrestore(fd->lock, flags);
....@@ -333,10 +318,10 @@
333318 else
334319 __acquire(fd->lock);
335320
336
- val = clk_readl(fd->reg);
321
+ val = readl(fd->reg);
337322 val &= ~fd->mask;
338323 val |= (scale << fd->shift);
339
- clk_writel(val, fd->reg);
324
+ writel(val, fd->reg);
340325
341326 if (fd->lock)
342327 spin_unlock_irqrestore(fd->lock, flags);
....@@ -359,7 +344,7 @@
359344 u8 width, u64 denom, u32 clk_flags, spinlock_t *lock)
360345 {
361346 struct xgene_clk_pmd *fd;
362
- struct clk_init_data init = {};
347
+ struct clk_init_data init;
363348 struct clk *clk;
364349
365350 fd = kzalloc(sizeof(*fd), GFP_KERNEL);
....@@ -643,7 +628,7 @@
643628 {
644629 struct xgene_clk *apmclk;
645630 struct clk *clk;
646
- struct clk_init_data init = {};
631
+ struct clk_init_data init;
647632 int rc;
648633
649634 /* allocate the APM clock structure */