Skip to content

Commit 91a940b

Browse files
Yang Yingliangbroonie
authored andcommitted
spi: sh-sci: switch to use modern name
Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 1cb3ebc commit 91a940b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

drivers/spi/spi-sh-sci.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ static inline void setbits(struct sh_sci_spi *sp, int bits, int on)
5656

5757
static inline void setsck(struct spi_device *dev, int on)
5858
{
59-
setbits(spi_master_get_devdata(dev->master), PIN_SCK, on);
59+
setbits(spi_controller_get_devdata(dev->controller), PIN_SCK, on);
6060
}
6161

6262
static inline void setmosi(struct spi_device *dev, int on)
6363
{
64-
setbits(spi_master_get_devdata(dev->master), PIN_TXD, on);
64+
setbits(spi_controller_get_devdata(dev->controller), PIN_TXD, on);
6565
}
6666

6767
static inline u32 getmiso(struct spi_device *dev)
6868
{
69-
struct sh_sci_spi *sp = spi_master_get_devdata(dev->master);
69+
struct sh_sci_spi *sp = spi_controller_get_devdata(dev->controller);
7070

7171
return (ioread8(SCSPTR(sp)) & PIN_RXD) ? 1 : 0;
7272
}
@@ -105,7 +105,7 @@ static u32 sh_sci_spi_txrx_mode3(struct spi_device *spi,
105105

106106
static void sh_sci_spi_chipselect(struct spi_device *dev, int value)
107107
{
108-
struct sh_sci_spi *sp = spi_master_get_devdata(dev->master);
108+
struct sh_sci_spi *sp = spi_controller_get_devdata(dev->controller);
109109

110110
if (sp->info->chip_select)
111111
(sp->info->chip_select)(sp->info, spi_get_chipselect(dev, 0), value);
@@ -114,18 +114,18 @@ static void sh_sci_spi_chipselect(struct spi_device *dev, int value)
114114
static int sh_sci_spi_probe(struct platform_device *dev)
115115
{
116116
struct resource *r;
117-
struct spi_master *master;
117+
struct spi_controller *host;
118118
struct sh_sci_spi *sp;
119119
int ret;
120120

121-
master = spi_alloc_master(&dev->dev, sizeof(struct sh_sci_spi));
122-
if (master == NULL) {
123-
dev_err(&dev->dev, "failed to allocate spi master\n");
121+
host = spi_alloc_host(&dev->dev, sizeof(struct sh_sci_spi));
122+
if (host == NULL) {
123+
dev_err(&dev->dev, "failed to allocate spi host\n");
124124
ret = -ENOMEM;
125125
goto err0;
126126
}
127127

128-
sp = spi_master_get_devdata(master);
128+
sp = spi_controller_get_devdata(host);
129129

130130
platform_set_drvdata(dev, sp);
131131
sp->info = dev_get_platdata(&dev->dev);
@@ -136,7 +136,7 @@ static int sh_sci_spi_probe(struct platform_device *dev)
136136
}
137137

138138
/* setup spi bitbang adaptor */
139-
sp->bitbang.master = master;
139+
sp->bitbang.master = host;
140140
sp->bitbang.master->bus_num = sp->info->bus_num;
141141
sp->bitbang.master->num_chipselect = sp->info->num_chipselect;
142142
sp->bitbang.chipselect = sh_sci_spi_chipselect;
@@ -166,7 +166,7 @@ static int sh_sci_spi_probe(struct platform_device *dev)
166166
setbits(sp, PIN_INIT, 0);
167167
iounmap(sp->membase);
168168
err1:
169-
spi_master_put(sp->bitbang.master);
169+
spi_controller_put(sp->bitbang.master);
170170
err0:
171171
return ret;
172172
}
@@ -178,7 +178,7 @@ static void sh_sci_spi_remove(struct platform_device *dev)
178178
spi_bitbang_stop(&sp->bitbang);
179179
setbits(sp, PIN_INIT, 0);
180180
iounmap(sp->membase);
181-
spi_master_put(sp->bitbang.master);
181+
spi_controller_put(sp->bitbang.master);
182182
}
183183

184184
static struct platform_driver sh_sci_spi_drv = {

0 commit comments

Comments
 (0)