mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
AMD_SFH: Removed unused activecontrolstatus member from the amd_mp2_dev struct
This value is only used once inside amd_mp2_get_sensor_num(),
so there is no need to store this in the amd_mp2_dev struct,
amd_mp2_get_sensor_num() can simple use a local variable for this.
Fixes: 4f567b9f81
("SFH: PCIe driver to add support of AMD sensor fusion hub")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Sandeep Singh <sandeep.singh@amd.com
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
e29c62ffb0
commit
a9e54f4b62
2 changed files with 4 additions and 3 deletions
|
@ -76,9 +76,11 @@ 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 activestatus, num_of_sensors = 0;
|
||||
u32 activecontrolstatus;
|
||||
|
||||
activecontrolstatus = readl(privdata->mmio + AMD_P2C_MSG3);
|
||||
activestatus = activecontrolstatus >> 4;
|
||||
|
||||
privdata->activecontrolstatus = readl(privdata->mmio + AMD_P2C_MSG3);
|
||||
activestatus = privdata->activecontrolstatus >> 4;
|
||||
if (ACEL_EN & activestatus)
|
||||
sensor_id[num_of_sensors++] = accel_idx;
|
||||
|
||||
|
|
|
@ -61,7 +61,6 @@ struct amd_mp2_dev {
|
|||
struct pci_dev *pdev;
|
||||
struct amdtp_cl_data *cl_data;
|
||||
void __iomem *mmio;
|
||||
u32 activecontrolstatus;
|
||||
};
|
||||
|
||||
struct amd_mp2_sensor_info {
|
||||
|
|
Loading…
Reference in a new issue