提交 9c33eef8 编写于 作者: R Rafael J. Wysocki

Merge back int340x driver material for 5.17.

...@@ -250,8 +250,9 @@ static int fill_art(char __user *ubuf) ...@@ -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].source, art_user[i].source_device);
get_single_name(arts[i].target, art_user[i].target_device); get_single_name(arts[i].target, art_user[i].target_device);
/* copy the rest int data in addition to source and target */ /* 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)); 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)) if (copy_to_user(ubuf, art_user, art_len))
......
...@@ -17,17 +17,19 @@ ...@@ -17,17 +17,19 @@
struct art { struct art {
acpi_handle source; acpi_handle source;
acpi_handle target; acpi_handle target;
u64 weight; struct_group(data,
u64 ac0_max; u64 weight;
u64 ac1_max; u64 ac0_max;
u64 ac2_max; u64 ac1_max;
u64 ac3_max; u64 ac2_max;
u64 ac4_max; u64 ac3_max;
u64 ac5_max; u64 ac4_max;
u64 ac6_max; u64 ac5_max;
u64 ac7_max; u64 ac6_max;
u64 ac8_max; u64 ac7_max;
u64 ac9_max; u64 ac8_max;
u64 ac9_max;
);
} __packed; } __packed;
struct trt { struct trt {
...@@ -47,17 +49,19 @@ union art_object { ...@@ -47,17 +49,19 @@ union art_object {
struct { struct {
char source_device[8]; /* ACPI single name */ char source_device[8]; /* ACPI single name */
char target_device[8]; /* ACPI single name */ char target_device[8]; /* ACPI single name */
u64 weight; struct_group(data,
u64 ac0_max_level; u64 weight;
u64 ac1_max_level; u64 ac0_max_level;
u64 ac2_max_level; u64 ac1_max_level;
u64 ac3_max_level; u64 ac2_max_level;
u64 ac4_max_level; u64 ac3_max_level;
u64 ac5_max_level; u64 ac4_max_level;
u64 ac6_max_level; u64 ac5_max_level;
u64 ac7_max_level; u64 ac6_max_level;
u64 ac8_max_level; u64 ac7_max_level;
u64 ac9_max_level; u64 ac8_max_level;
u64 ac9_max_level;
);
}; };
u64 __data[ACPI_NR_ART_ELEMENTS]; u64 __data[ACPI_NR_ART_ELEMENTS];
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册