Skip to content

Commit ea3fba7

Browse files
ambarusbroonie
authored andcommitted
spi: s3c64xx: get rid of the OF alias ID dependency
Compatibles that set ``port_conf->{rx, tx}_fifomask`` are now safe to get rid of the OF alias ID dependency. Let the driver probe even without the alias for these. With this we also protect the FIFO_LVL_MASK calls from s3c64xx_spi_set_fifomask(). Signed-off-by: Tudor Ambarus <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 2cda362 commit ea3fba7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/spi/spi-s3c64xx.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,8 +1203,12 @@ static inline const struct s3c64xx_spi_port_config *s3c64xx_spi_get_port_config(
12031203
static int s3c64xx_spi_set_port_id(struct platform_device *pdev,
12041204
struct s3c64xx_spi_driver_data *sdd)
12051205
{
1206+
const struct s3c64xx_spi_port_config *port_conf = sdd->port_conf;
12061207
int ret;
12071208

1209+
if (port_conf->rx_fifomask && port_conf->tx_fifomask)
1210+
return 0;
1211+
12081212
if (pdev->dev.of_node) {
12091213
ret = of_alias_get_id(pdev->dev.of_node, "spi");
12101214
if (ret < 0)

0 commit comments

Comments
 (0)