mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 06:34:12 +08:00
spi: lm70llp: switch to use modern name
Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230823033003.3407403-2-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
2d98bdad98
commit
7c5d1d9787
@ -24,7 +24,7 @@
|
|||||||
* the SPI/Microwire bus interface. This driver specifically supports an
|
* the SPI/Microwire bus interface. This driver specifically supports an
|
||||||
* NS LM70 LLP Evaluation Board, interfacing to a PC using its parallel
|
* NS LM70 LLP Evaluation Board, interfacing to a PC using its parallel
|
||||||
* port to bitbang an SPI-parport bridge. Accordingly, this is an SPI
|
* port to bitbang an SPI-parport bridge. Accordingly, this is an SPI
|
||||||
* master controller driver. The hwmon/lm70 driver is a "SPI protocol
|
* host controller driver. The hwmon/lm70 driver is a "SPI protocol
|
||||||
* driver", layered on top of this one and usable without the lm70llp.
|
* driver", layered on top of this one and usable without the lm70llp.
|
||||||
*
|
*
|
||||||
* Datasheet and Schematic:
|
* Datasheet and Schematic:
|
||||||
@ -189,7 +189,7 @@ static void spi_lm70llp_attach(struct parport *p)
|
|||||||
{
|
{
|
||||||
struct pardevice *pd;
|
struct pardevice *pd;
|
||||||
struct spi_lm70llp *pp;
|
struct spi_lm70llp *pp;
|
||||||
struct spi_master *master;
|
struct spi_controller *host;
|
||||||
int status;
|
int status;
|
||||||
struct pardev_cb lm70llp_cb;
|
struct pardev_cb lm70llp_cb;
|
||||||
|
|
||||||
@ -202,17 +202,17 @@ static void spi_lm70llp_attach(struct parport *p)
|
|||||||
* the lm70 driver could verify it, reading the manf ID.
|
* the lm70 driver could verify it, reading the manf ID.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
master = spi_alloc_master(p->physport->dev, sizeof(*pp));
|
host = spi_alloc_host(p->physport->dev, sizeof(*pp));
|
||||||
if (!master) {
|
if (!host) {
|
||||||
status = -ENOMEM;
|
status = -ENOMEM;
|
||||||
goto out_fail;
|
goto out_fail;
|
||||||
}
|
}
|
||||||
pp = spi_master_get_devdata(master);
|
pp = spi_controller_get_devdata(host);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SPI and bitbang hookup.
|
* SPI and bitbang hookup.
|
||||||
*/
|
*/
|
||||||
pp->bitbang.master = master;
|
pp->bitbang.master = host;
|
||||||
pp->bitbang.chipselect = lm70_chipselect;
|
pp->bitbang.chipselect = lm70_chipselect;
|
||||||
pp->bitbang.txrx_word[SPI_MODE_0] = lm70_txrx;
|
pp->bitbang.txrx_word[SPI_MODE_0] = lm70_txrx;
|
||||||
pp->bitbang.flags = SPI_3WIRE;
|
pp->bitbang.flags = SPI_3WIRE;
|
||||||
@ -228,7 +228,7 @@ static void spi_lm70llp_attach(struct parport *p)
|
|||||||
|
|
||||||
if (!pd) {
|
if (!pd) {
|
||||||
status = -ENOMEM;
|
status = -ENOMEM;
|
||||||
goto out_free_master;
|
goto out_free_host;
|
||||||
}
|
}
|
||||||
pp->pd = pd;
|
pp->pd = pd;
|
||||||
|
|
||||||
@ -287,8 +287,8 @@ out_off_and_release:
|
|||||||
parport_release(pp->pd);
|
parport_release(pp->pd);
|
||||||
out_parport_unreg:
|
out_parport_unreg:
|
||||||
parport_unregister_device(pd);
|
parport_unregister_device(pd);
|
||||||
out_free_master:
|
out_free_host:
|
||||||
spi_master_put(master);
|
spi_controller_put(host);
|
||||||
out_fail:
|
out_fail:
|
||||||
pr_info("spi_lm70llp probe fail, status %d\n", status);
|
pr_info("spi_lm70llp probe fail, status %d\n", status);
|
||||||
}
|
}
|
||||||
@ -309,7 +309,7 @@ static void spi_lm70llp_detach(struct parport *p)
|
|||||||
parport_release(pp->pd);
|
parport_release(pp->pd);
|
||||||
parport_unregister_device(pp->pd);
|
parport_unregister_device(pp->pd);
|
||||||
|
|
||||||
spi_master_put(pp->bitbang.master);
|
spi_controller_put(pp->bitbang.master);
|
||||||
|
|
||||||
lm70llp = NULL;
|
lm70llp = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user