Commit 9c33eef8 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge back int340x driver material for 5.17.

parents f872f736 764cedc5
......@@ -250,8 +250,9 @@ static int fill_art(char __user *ubuf)
get_single_name(arts[i].source, art_user[i].source_device);
get_single_name(arts[i].target, art_user[i].target_device);
/* copy the rest int data in addition to source and target */
memcpy(&art_user[i].weight, &arts[i].weight,
BUILD_BUG_ON(sizeof(art_user[i].data) !=
sizeof(u64) * (ACPI_NR_ART_ELEMENTS - 2));
memcpy(&art_user[i].data, &arts[i].data, sizeof(art_user[i].data));
}
if (copy_to_user(ubuf, art_user, art_len))
......
......@@ -17,6 +17,7 @@
struct art {
acpi_handle source;
acpi_handle target;
struct_group(data,
u64 weight;
u64 ac0_max;
u64 ac1_max;
......@@ -28,6 +29,7 @@ struct art {
u64 ac7_max;
u64 ac8_max;
u64 ac9_max;
);
} __packed;
struct trt {
......@@ -47,6 +49,7 @@ union art_object {
struct {
char source_device[8]; /* ACPI single name */
char target_device[8]; /* ACPI single name */
struct_group(data,
u64 weight;
u64 ac0_max_level;
u64 ac1_max_level;
......@@ -58,6 +61,7 @@ union art_object {
u64 ac7_max_level;
u64 ac8_max_level;
u64 ac9_max_level;
);
};
u64 __data[ACPI_NR_ART_ELEMENTS];
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment