mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-12-26 12:21:01 +01:00
spi: remove {devm_}spi_alloc_master/slave()
All the {devm_}spi_alloc_master/slave() have been replaced,
so they can be removed and replaced in doc and comment.
No functional changed.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://patch.msgid.link/20240902125947.1368-8-yangyingliang@huaweicloud.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
5c303090e1
commit
0809a9ccac
@@ -462,8 +462,8 @@ SLAVE DMA ENGINE
|
||||
devm_acpi_dma_controller_free()
|
||||
|
||||
SPI
|
||||
devm_spi_alloc_master()
|
||||
devm_spi_alloc_slave()
|
||||
devm_spi_alloc_host()
|
||||
devm_spi_alloc_target()
|
||||
devm_spi_optimize_message()
|
||||
devm_spi_register_controller()
|
||||
devm_spi_register_host()
|
||||
|
||||
@@ -3238,9 +3238,9 @@ static int spi_controller_id_alloc(struct spi_controller *ctlr, int start, int e
|
||||
}
|
||||
|
||||
/**
|
||||
* spi_register_controller - register SPI master or slave controller
|
||||
* @ctlr: initialized master, originally from spi_alloc_master() or
|
||||
* spi_alloc_slave()
|
||||
* spi_register_controller - register SPI host or target controller
|
||||
* @ctlr: initialized controller, originally from spi_alloc_host() or
|
||||
* spi_alloc_target()
|
||||
* Context: can sleep
|
||||
*
|
||||
* SPI controllers connect to their drivers using some non-SPI bus,
|
||||
@@ -3390,11 +3390,11 @@ static void devm_spi_unregister(struct device *dev, void *res)
|
||||
}
|
||||
|
||||
/**
|
||||
* devm_spi_register_controller - register managed SPI master or slave
|
||||
* devm_spi_register_controller - register managed SPI host or target
|
||||
* controller
|
||||
* @dev: device managing SPI controller
|
||||
* @ctlr: initialized controller, originally from spi_alloc_master() or
|
||||
* spi_alloc_slave()
|
||||
* @ctlr: initialized controller, originally from spi_alloc_host() or
|
||||
* spi_alloc_target()
|
||||
* Context: can sleep
|
||||
*
|
||||
* Register a SPI device as with spi_register_controller() which will
|
||||
@@ -3478,7 +3478,7 @@ void spi_unregister_controller(struct spi_controller *ctlr)
|
||||
|
||||
/*
|
||||
* Release the last reference on the controller if its driver
|
||||
* has not yet been converted to devm_spi_alloc_master/slave().
|
||||
* has not yet been converted to devm_spi_alloc_host/target().
|
||||
*/
|
||||
if (!ctlr->devm_allocated)
|
||||
put_device(&ctlr->dev);
|
||||
|
||||
@@ -824,21 +824,6 @@ void spi_take_timestamp_post(struct spi_controller *ctlr,
|
||||
extern struct spi_controller *__spi_alloc_controller(struct device *host,
|
||||
unsigned int size, bool slave);
|
||||
|
||||
static inline struct spi_controller *spi_alloc_master(struct device *host,
|
||||
unsigned int size)
|
||||
{
|
||||
return __spi_alloc_controller(host, size, false);
|
||||
}
|
||||
|
||||
static inline struct spi_controller *spi_alloc_slave(struct device *host,
|
||||
unsigned int size)
|
||||
{
|
||||
if (!IS_ENABLED(CONFIG_SPI_SLAVE))
|
||||
return NULL;
|
||||
|
||||
return __spi_alloc_controller(host, size, true);
|
||||
}
|
||||
|
||||
static inline struct spi_controller *spi_alloc_host(struct device *dev,
|
||||
unsigned int size)
|
||||
{
|
||||
@@ -858,21 +843,6 @@ struct spi_controller *__devm_spi_alloc_controller(struct device *dev,
|
||||
unsigned int size,
|
||||
bool slave);
|
||||
|
||||
static inline struct spi_controller *devm_spi_alloc_master(struct device *dev,
|
||||
unsigned int size)
|
||||
{
|
||||
return __devm_spi_alloc_controller(dev, size, false);
|
||||
}
|
||||
|
||||
static inline struct spi_controller *devm_spi_alloc_slave(struct device *dev,
|
||||
unsigned int size)
|
||||
{
|
||||
if (!IS_ENABLED(CONFIG_SPI_SLAVE))
|
||||
return NULL;
|
||||
|
||||
return __devm_spi_alloc_controller(dev, size, true);
|
||||
}
|
||||
|
||||
static inline struct spi_controller *devm_spi_alloc_host(struct device *dev,
|
||||
unsigned int size)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user