Skip to content

Commit 660ed6b

Browse files
committed
drm/ast: Rename struct i2c_algo_bit_data callbacks and their parameters
Align the names of the algo-bit helpers with ast's convention of using an ast prefix plus the struct's name plus the callback's name for such function symbols. Change the parameter names of these helpers to 'data' and 'state', as used in the declaration of struct i2c_algo_bit_data. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sui Jingfeng <sui.jingfeng@linux.dev> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240325200855.21150-10-tzimmermann@suse.de
1 parent d95e92e commit 660ed6b

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

drivers/gpu/drm/ast/ast_ddc.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,41 +27,41 @@
2727
#include "ast_ddc.h"
2828
#include "ast_drv.h"
2929

30-
static void ast_i2c_setsda(void *i2c_priv, int data)
30+
static void ast_ddc_algo_bit_data_setsda(void *data, int state)
3131
{
32-
struct ast_ddc *ddc = i2c_priv;
32+
struct ast_ddc *ddc = data;
3333
struct ast_device *ast = ddc->ast;
3434
int i;
3535
u8 ujcrb7, jtemp;
3636

3737
for (i = 0; i < 0x10000; i++) {
38-
ujcrb7 = ((data & 0x01) ? 0 : 1) << 2;
38+
ujcrb7 = ((state & 0x01) ? 0 : 1) << 2;
3939
ast_set_index_reg_mask(ast, AST_IO_VGACRI, 0xb7, 0xf1, ujcrb7);
4040
jtemp = ast_get_index_reg_mask(ast, AST_IO_VGACRI, 0xb7, 0x04);
4141
if (ujcrb7 == jtemp)
4242
break;
4343
}
4444
}
4545

46-
static void ast_i2c_setscl(void *i2c_priv, int clock)
46+
static void ast_ddc_algo_bit_data_setscl(void *data, int state)
4747
{
48-
struct ast_ddc *ddc = i2c_priv;
48+
struct ast_ddc *ddc = data;
4949
struct ast_device *ast = ddc->ast;
5050
int i;
5151
u8 ujcrb7, jtemp;
5252

5353
for (i = 0; i < 0x10000; i++) {
54-
ujcrb7 = ((clock & 0x01) ? 0 : 1);
54+
ujcrb7 = ((state & 0x01) ? 0 : 1);
5555
ast_set_index_reg_mask(ast, AST_IO_VGACRI, 0xb7, 0xf4, ujcrb7);
5656
jtemp = ast_get_index_reg_mask(ast, AST_IO_VGACRI, 0xb7, 0x01);
5757
if (ujcrb7 == jtemp)
5858
break;
5959
}
6060
}
6161

62-
static int ast_i2c_getsda(void *i2c_priv)
62+
static int ast_ddc_algo_bit_data_getsda(void *data)
6363
{
64-
struct ast_ddc *ddc = i2c_priv;
64+
struct ast_ddc *ddc = data;
6565
struct ast_device *ast = ddc->ast;
6666
uint32_t val, val2, count, pass;
6767

@@ -81,9 +81,9 @@ static int ast_i2c_getsda(void *i2c_priv)
8181
return val & 1 ? 1 : 0;
8282
}
8383

84-
static int ast_i2c_getscl(void *i2c_priv)
84+
static int ast_ddc_algo_bit_data_getscl(void *data)
8585
{
86-
struct ast_ddc *ddc = i2c_priv;
86+
struct ast_ddc *ddc = data;
8787
struct ast_device *ast = ddc->ast;
8888
uint32_t val, val2, count, pass;
8989

@@ -133,10 +133,10 @@ struct ast_ddc *ast_ddc_create(struct ast_device *ast)
133133
bit->udelay = 20;
134134
bit->timeout = 2;
135135
bit->data = ddc;
136-
bit->setsda = ast_i2c_setsda;
137-
bit->setscl = ast_i2c_setscl;
138-
bit->getsda = ast_i2c_getsda;
139-
bit->getscl = ast_i2c_getscl;
136+
bit->setsda = ast_ddc_algo_bit_data_setsda;
137+
bit->setscl = ast_ddc_algo_bit_data_setscl;
138+
bit->getsda = ast_ddc_algo_bit_data_getsda;
139+
bit->getscl = ast_ddc_algo_bit_data_getscl;
140140

141141
adapter->algo_data = bit;
142142
ret = i2c_bit_add_bus(adapter);

0 commit comments

Comments
 (0)