device: Fix structure attributes access
Since struct devconfig was merged earlier into struct device, let's fix accessing config_info, name, ... attributes everywhere via: grep -rlZ 'dev->config->' | xargs -0 sed -i 's/dev->config->/dev->/g' Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
8d7bb8ffd8
commit
97326c0445
348 changed files with 1155 additions and 1174 deletions
|
@ -44,7 +44,7 @@ static int mcux_elcdif_write(const struct device *dev, const u16_t x,
|
|||
const struct display_buffer_descriptor *desc,
|
||||
const void *buf)
|
||||
{
|
||||
const struct mcux_elcdif_config *config = dev->config->config_info;
|
||||
const struct mcux_elcdif_config *config = dev->config_info;
|
||||
struct mcux_elcdif_data *data = dev->driver_data;
|
||||
|
||||
u8_t write_idx = data->write_idx;
|
||||
|
@ -132,7 +132,7 @@ static int mcux_elcdif_set_pixel_format(const struct device *dev,
|
|||
const enum display_pixel_format
|
||||
pixel_format)
|
||||
{
|
||||
const struct mcux_elcdif_config *config = dev->config->config_info;
|
||||
const struct mcux_elcdif_config *config = dev->config_info;
|
||||
|
||||
if (pixel_format == config->pixel_format) {
|
||||
return 0;
|
||||
|
@ -154,7 +154,7 @@ static int mcux_elcdif_set_orientation(const struct device *dev,
|
|||
static void mcux_elcdif_get_capabilities(const struct device *dev,
|
||||
struct display_capabilities *capabilities)
|
||||
{
|
||||
const struct mcux_elcdif_config *config = dev->config->config_info;
|
||||
const struct mcux_elcdif_config *config = dev->config_info;
|
||||
|
||||
memset(capabilities, 0, sizeof(struct display_capabilities));
|
||||
capabilities->x_resolution = config->rgb_mode.panelWidth;
|
||||
|
@ -167,7 +167,7 @@ static void mcux_elcdif_get_capabilities(const struct device *dev,
|
|||
static void mcux_elcdif_isr(void *arg)
|
||||
{
|
||||
struct device *dev = (struct device *)arg;
|
||||
const struct mcux_elcdif_config *config = dev->config->config_info;
|
||||
const struct mcux_elcdif_config *config = dev->config_info;
|
||||
struct mcux_elcdif_data *data = dev->driver_data;
|
||||
u32_t status;
|
||||
|
||||
|
@ -179,7 +179,7 @@ static void mcux_elcdif_isr(void *arg)
|
|||
|
||||
static int mcux_elcdif_init(struct device *dev)
|
||||
{
|
||||
const struct mcux_elcdif_config *config = dev->config->config_info;
|
||||
const struct mcux_elcdif_config *config = dev->config_info;
|
||||
struct mcux_elcdif_data *data = dev->driver_data;
|
||||
int i;
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ static inline void sleep(u32_t sleep_in_ms)
|
|||
void glcd_print(struct device *port, char *data, u32_t size)
|
||||
{
|
||||
const struct glcd_driver * const rom = (struct glcd_driver *)
|
||||
port->config->config_info;
|
||||
port->config_info;
|
||||
struct glcd_data *dev = port->driver_data;
|
||||
u8_t buf[] = { GLCD_CMD_SET_CGRAM_ADDR, 0 };
|
||||
int i;
|
||||
|
@ -120,7 +120,7 @@ void glcd_print(struct device *port, char *data, u32_t size)
|
|||
void glcd_cursor_pos_set(struct device *port, u8_t col, u8_t row)
|
||||
{
|
||||
const struct glcd_driver * const rom = (struct glcd_driver *)
|
||||
port->config->config_info;
|
||||
port->config_info;
|
||||
struct glcd_data *dev = port->driver_data;
|
||||
|
||||
unsigned char data[2];
|
||||
|
@ -141,7 +141,7 @@ void glcd_cursor_pos_set(struct device *port, u8_t col, u8_t row)
|
|||
void glcd_clear(struct device *port)
|
||||
{
|
||||
const struct glcd_driver * const rom = (struct glcd_driver *)
|
||||
port->config->config_info;
|
||||
port->config_info;
|
||||
struct glcd_data *dev = port->driver_data;
|
||||
u8_t clear[] = { 0, GLCD_CMD_SCREEN_CLEAR };
|
||||
|
||||
|
@ -154,7 +154,7 @@ void glcd_clear(struct device *port)
|
|||
void glcd_display_state_set(struct device *port, u8_t opt)
|
||||
{
|
||||
const struct glcd_driver * const rom = (struct glcd_driver *)
|
||||
port->config->config_info;
|
||||
port->config_info;
|
||||
struct glcd_data *dev = port->driver_data;
|
||||
u8_t data[] = { 0, 0 };
|
||||
|
||||
|
@ -178,7 +178,7 @@ u8_t glcd_display_state_get(struct device *port)
|
|||
|
||||
void glcd_input_state_set(struct device *port, u8_t opt)
|
||||
{
|
||||
const struct glcd_driver * const rom = port->config->config_info;
|
||||
const struct glcd_driver * const rom = port->config_info;
|
||||
struct glcd_data *dev = port->driver_data;
|
||||
u8_t data[] = { 0, 0 };
|
||||
|
||||
|
@ -223,7 +223,7 @@ void glcd_color_set(struct device *port, u8_t r, u8_t g, u8_t b)
|
|||
|
||||
void glcd_function_set(struct device *port, u8_t opt)
|
||||
{
|
||||
const struct glcd_driver * const rom = port->config->config_info;
|
||||
const struct glcd_driver * const rom = port->config_info;
|
||||
struct glcd_data *dev = port->driver_data;
|
||||
u8_t data[] = { 0, 0 };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue