Skip to content

Commit 87cb795

Browse files
basuamdJiri Kosina
authored andcommitted
HID: amd_sfh: Move global functions to static
Move global functions declared from header files and make them as static functions wherever applicable. Signed-off-by: Basavaraj Natikar <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 722658f commit 87cb795

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

drivers/hid/amd-sfh-hid/amd_sfh_client.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@ static void amd_sfh_work_buffer(struct work_struct *work)
129129
schedule_delayed_work(&cli_data->work_buffer, msecs_to_jiffies(AMD_SFH_IDLE_LOOP));
130130
}
131131

132-
u32 amd_sfh_wait_for_response(struct amd_mp2_dev *mp2, u8 sid, u32 sensor_sts)
132+
static u32 amd_sfh_wait_for_response(struct amd_mp2_dev *mp2, u8 sid, u32 sensor_sts)
133133
{
134134
if (mp2->mp2_ops->response)
135135
sensor_sts = mp2->mp2_ops->response(mp2, sid, sensor_sts);
136136

137137
return sensor_sts;
138138
}
139139

140-
const char *get_sensor_name(int idx)
140+
static const char *get_sensor_name(int idx)
141141
{
142142
switch (idx) {
143143
case accel_idx:

drivers/hid/amd-sfh-hid/amd_sfh_pcie.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static int amd_sfh_dis_sts_v2(struct amd_mp2_dev *privdata)
136136
SENSOR_DISCOVERY_STATUS_MASK) >> SENSOR_DISCOVERY_STATUS_SHIFT;
137137
}
138138

139-
void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info info)
139+
static void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info info)
140140
{
141141
union sfh_cmd_param cmd_param;
142142
union sfh_cmd_base cmd_base;
@@ -157,7 +157,7 @@ void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info i
157157
writel(cmd_base.ul, privdata->mmio + AMD_C2P_MSG0);
158158
}
159159

160-
void amd_stop_sensor(struct amd_mp2_dev *privdata, u16 sensor_idx)
160+
static void amd_stop_sensor(struct amd_mp2_dev *privdata, u16 sensor_idx)
161161
{
162162
union sfh_cmd_base cmd_base;
163163

@@ -171,7 +171,7 @@ void amd_stop_sensor(struct amd_mp2_dev *privdata, u16 sensor_idx)
171171
writel(cmd_base.ul, privdata->mmio + AMD_C2P_MSG0);
172172
}
173173

174-
void amd_stop_all_sensors(struct amd_mp2_dev *privdata)
174+
static void amd_stop_all_sensors(struct amd_mp2_dev *privdata)
175175
{
176176
union sfh_cmd_base cmd_base;
177177

drivers/hid/amd-sfh-hid/amd_sfh_pcie.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,9 @@ struct hpd_status {
9898
};
9999
};
100100

101-
void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info info);
102-
void amd_stop_sensor(struct amd_mp2_dev *privdata, u16 sensor_idx);
103-
void amd_stop_all_sensors(struct amd_mp2_dev *privdata);
104101
int amd_mp2_get_sensor_num(struct amd_mp2_dev *privdata, u8 *sensor_id);
105102
int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata);
106103
int amd_sfh_hid_client_deinit(struct amd_mp2_dev *privdata);
107-
u32 amd_sfh_wait_for_response(struct amd_mp2_dev *mp2, u8 sid, u32 sensor_sts);
108-
void amd_mp2_suspend(struct amd_mp2_dev *mp2);
109-
void amd_mp2_resume(struct amd_mp2_dev *mp2);
110-
const char *get_sensor_name(int idx);
111104
void amd_sfh_set_desc_ops(struct amd_mp2_ops *mp2_ops);
112105

113106
#endif

0 commit comments

Comments
 (0)