Skip to content

Commit c42a288

Browse files
wensbebarino
authored andcommitted
clk: mediatek: mtk: Clean up included headers
Some included headers aren't actually used anywhere, while other headers with the declaration of functions and structures aren't directly included. Get rid of the unused ones, and add the ones that should be included directly. On the header side, replace headers that are included purely for data structure definitions with forward declarations. This decreases the amount of preprocessing and compilation effort required for each inclusion. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Miles Chen <miles.chen@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220208124034.414635-21-wenst@chromium.org Reviewed-by: Chun-Jie Chen <chun-jie.chen@mediatek.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 2204d96 commit c42a288

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

drivers/clk/mediatek/clk-mtk.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@
44
* Author: James Liao <jamesjj.liao@mediatek.com>
55
*/
66

7-
#include <linux/of.h>
8-
#include <linux/of_address.h>
7+
#include <linux/bitops.h>
8+
#include <linux/clk-provider.h>
99
#include <linux/err.h>
1010
#include <linux/io.h>
11-
#include <linux/slab.h>
12-
#include <linux/delay.h>
13-
#include <linux/clkdev.h>
14-
#include <linux/module.h>
1511
#include <linux/mfd/syscon.h>
16-
#include <linux/device.h>
12+
#include <linux/module.h>
13+
#include <linux/of.h>
1714
#include <linux/of_device.h>
15+
#include <linux/platform_device.h>
16+
#include <linux/slab.h>
1817

1918
#include "clk-mtk.h"
2019
#include "clk-gate.h"

drivers/clk/mediatek/clk-mtk.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
#ifndef __DRV_CLK_MTK_H
88
#define __DRV_CLK_MTK_H
99

10-
#include <linux/regmap.h>
11-
#include <linux/bitops.h>
1210
#include <linux/clk-provider.h>
13-
#include <linux/platform_device.h>
14-
15-
struct clk;
16-
struct clk_onecell_data;
11+
#include <linux/io.h>
12+
#include <linux/kernel.h>
13+
#include <linux/spinlock.h>
14+
#include <linux/types.h>
1715

1816
#define MAX_MUX_GATE_BIT 31
1917
#define INVALID_MUX_GATE_BIT (MAX_MUX_GATE_BIT + 1)
2018

2119
#define MHZ (1000 * 1000)
2220

21+
struct platform_device;
22+
2323
struct mtk_fixed_clk {
2424
int id;
2525
const char *name;

0 commit comments

Comments
 (0)