diff options
author | Basavaraj Natikar | 2022-07-12 23:48:33 +0530 |
---|---|---|
committer | Jiri Kosina | 2022-07-21 13:43:59 +0200 |
commit | 87cb795291bb048d7f547db2f6b769bdb8e9be3b (patch) | |
tree | ede18ea483fec6b39e03d018aefeb11808e0623f /drivers/hid/amd-sfh-hid | |
parent | 722658f86a23e5aa46f321e370503f557b20b0c8 (diff) |
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 <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/amd-sfh-hid')
-rw-r--r-- | drivers/hid/amd-sfh-hid/amd_sfh_client.c | 4 | ||||
-rw-r--r-- | drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 6 | ||||
-rw-r--r-- | drivers/hid/amd-sfh-hid/amd_sfh_pcie.h | 7 |
3 files changed, 5 insertions, 12 deletions
diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_client.c b/drivers/hid/amd-sfh-hid/amd_sfh_client.c index b198b564db7d..1f59fabded85 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_client.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_client.c @@ -129,7 +129,7 @@ static void amd_sfh_work_buffer(struct work_struct *work) schedule_delayed_work(&cli_data->work_buffer, msecs_to_jiffies(AMD_SFH_IDLE_LOOP)); } -u32 amd_sfh_wait_for_response(struct amd_mp2_dev *mp2, u8 sid, u32 sensor_sts) +static u32 amd_sfh_wait_for_response(struct amd_mp2_dev *mp2, u8 sid, u32 sensor_sts) { if (mp2->mp2_ops->response) sensor_sts = mp2->mp2_ops->response(mp2, sid, sensor_sts); @@ -137,7 +137,7 @@ u32 amd_sfh_wait_for_response(struct amd_mp2_dev *mp2, u8 sid, u32 sensor_sts) return sensor_sts; } -const char *get_sensor_name(int idx) +static const char *get_sensor_name(int idx) { switch (idx) { case accel_idx: diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c index 62e6757f889d..c9a9ac11f124 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c @@ -136,7 +136,7 @@ static int amd_sfh_dis_sts_v2(struct amd_mp2_dev *privdata) SENSOR_DISCOVERY_STATUS_MASK) >> SENSOR_DISCOVERY_STATUS_SHIFT; } -void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info info) +static void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info info) { union sfh_cmd_param cmd_param; 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 writel(cmd_base.ul, privdata->mmio + AMD_C2P_MSG0); } -void amd_stop_sensor(struct amd_mp2_dev *privdata, u16 sensor_idx) +static void amd_stop_sensor(struct amd_mp2_dev *privdata, u16 sensor_idx) { union sfh_cmd_base cmd_base; @@ -171,7 +171,7 @@ void amd_stop_sensor(struct amd_mp2_dev *privdata, u16 sensor_idx) writel(cmd_base.ul, privdata->mmio + AMD_C2P_MSG0); } -void amd_stop_all_sensors(struct amd_mp2_dev *privdata) +static void amd_stop_all_sensors(struct amd_mp2_dev *privdata) { union sfh_cmd_base cmd_base; diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h index 71c114acdd2b..dfb7cabd82ef 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h @@ -98,16 +98,9 @@ struct hpd_status { }; }; -void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info info); -void amd_stop_sensor(struct amd_mp2_dev *privdata, u16 sensor_idx); -void amd_stop_all_sensors(struct amd_mp2_dev *privdata); int amd_mp2_get_sensor_num(struct amd_mp2_dev *privdata, u8 *sensor_id); int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata); int amd_sfh_hid_client_deinit(struct amd_mp2_dev *privdata); -u32 amd_sfh_wait_for_response(struct amd_mp2_dev *mp2, u8 sid, u32 sensor_sts); -void amd_mp2_suspend(struct amd_mp2_dev *mp2); -void amd_mp2_resume(struct amd_mp2_dev *mp2); -const char *get_sensor_name(int idx); void amd_sfh_set_desc_ops(struct amd_mp2_ops *mp2_ops); #endif |