Commit ecb87018 authored by Fabian Krueger's avatar Fabian Krueger Committed by Greg Kroah-Hartman

staging: kpc2000: introduce usage of __packed

Replaced __attribute__((packed)) with __packed. Both ways of attributing
are equivalent, but being shorter, __packed should be preferred.
This refactoring makes the core more readable.
Signed-off-by: default avatarFabian Krueger <fabian.krueger@fau.de>
Signed-off-by: default avatarMichael Scheiderer <michael.scheiderer@fau.de>
Cc: <linux-kernel@i4.cs.fau.de>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c70c7284
...@@ -114,7 +114,7 @@ struct kp_spi_controller_state { ...@@ -114,7 +114,7 @@ struct kp_spi_controller_state {
union kp_spi_config { union kp_spi_config {
/* use this to access individual elements */ /* use this to access individual elements */
struct __attribute__((packed)) spi_config_bitfield { struct __packed spi_config_bitfield {
unsigned int pha : 1; /* spim_clk Phase */ unsigned int pha : 1; /* spim_clk Phase */
unsigned int pol : 1; /* spim_clk Polarity */ unsigned int pol : 1; /* spim_clk Polarity */
unsigned int epol : 1; /* spim_csx Polarity */ unsigned int epol : 1; /* spim_csx Polarity */
...@@ -133,7 +133,7 @@ union kp_spi_config { ...@@ -133,7 +133,7 @@ union kp_spi_config {
}; };
union kp_spi_status { union kp_spi_status {
struct __attribute__((packed)) spi_status_bitfield { struct __packed spi_status_bitfield {
unsigned int rx : 1; /* Rx Status */ unsigned int rx : 1; /* Rx Status */
unsigned int tx : 1; /* Tx Status */ unsigned int tx : 1; /* Tx Status */
unsigned int eo : 1; /* End of Transfer */ unsigned int eo : 1; /* End of Transfer */
...@@ -148,7 +148,7 @@ union kp_spi_status { ...@@ -148,7 +148,7 @@ union kp_spi_status {
}; };
union kp_spi_ffctrl { union kp_spi_ffctrl {
struct __attribute__((packed)) spi_ffctrl_bitfield { struct __packed spi_ffctrl_bitfield {
unsigned int ffstart : 1; /* FIFO Start */ unsigned int ffstart : 1; /* FIFO Start */
unsigned int : 31; unsigned int : 31;
} bitfield; } bitfield;
......
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