mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
ACPI: TAD: Clear unused RT data in acpi_tad_set_real_time()
Move the clearing of the fields in struct acpi_tad_rt that are not used on the real time setting side to acpi_tad_set_real_time(). No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/8660506.T7Z3S40VBb@rafael.j.wysocki
This commit is contained in:
parent
3329a1416c
commit
fca4f233a2
|
|
@ -96,6 +96,10 @@ static int acpi_tad_set_real_time(struct device *dev, struct acpi_tad_rt *rt)
|
|||
if (acpi_tad_rt_is_invalid(rt))
|
||||
return -EINVAL;
|
||||
|
||||
rt->valid = 0;
|
||||
rt->msec = 0;
|
||||
memset(rt->padding, 0, 3);
|
||||
|
||||
args[0].buffer.pointer = (u8 *)rt;
|
||||
args[0].buffer.length = sizeof(*rt);
|
||||
|
||||
|
|
@ -233,10 +237,6 @@ static ssize_t time_store(struct device *dev, struct device_attribute *attr,
|
|||
|
||||
rt.daylight = val;
|
||||
|
||||
rt.valid = 0;
|
||||
rt.msec = 0;
|
||||
memset(rt.padding, 0, 3);
|
||||
|
||||
ret = acpi_tad_set_real_time(dev, &rt);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user