Skip to content

Commit 58c043d

Browse files
krzkwsakernel
authored andcommitted
i2c: xiic: hide OF related data for COMPILE_TEST
The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/i2c/busses/i2c-xiic.c:1202:39: error: ‘xiic_2_00’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent 79a1725 commit 58c043d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/i2c/busses/i2c-xiic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1199,11 +1199,11 @@ static const struct i2c_adapter xiic_adapter = {
11991199
.algo = &xiic_algorithm,
12001200
};
12011201

1202+
#if defined(CONFIG_OF)
12021203
static const struct xiic_version_data xiic_2_00 = {
12031204
.quirks = DYNAMIC_MODE_READ_BROKEN_BIT,
12041205
};
12051206

1206-
#if defined(CONFIG_OF)
12071207
static const struct of_device_id xiic_of_match[] = {
12081208
{ .compatible = "xlnx,xps-iic-2.00.a", .data = &xiic_2_00 },
12091209
{ .compatible = "xlnx,axi-iic-2.1", },

0 commit comments

Comments
 (0)