mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-07-05 21:35:46 +02:00
spi: slave-mt27xx: switch to use target_abort
Switch to use modern name target_abort. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://patch.msgid.link/20240910022618.1397-6-yangyingliang@huaweicloud.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
94628e5a07
commit
be03763d24
|
@ -69,7 +69,7 @@ struct mtk_spi_slave {
|
||||||
struct clk *spi_clk;
|
struct clk *spi_clk;
|
||||||
struct completion xfer_done;
|
struct completion xfer_done;
|
||||||
struct spi_transfer *cur_transfer;
|
struct spi_transfer *cur_transfer;
|
||||||
bool slave_aborted;
|
bool target_aborted;
|
||||||
const struct mtk_spi_compatible *dev_comp;
|
const struct mtk_spi_compatible *dev_comp;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ static void mtk_spi_slave_disable_xfer(struct mtk_spi_slave *mdata)
|
||||||
static int mtk_spi_slave_wait_for_completion(struct mtk_spi_slave *mdata)
|
static int mtk_spi_slave_wait_for_completion(struct mtk_spi_slave *mdata)
|
||||||
{
|
{
|
||||||
if (wait_for_completion_interruptible(&mdata->xfer_done) ||
|
if (wait_for_completion_interruptible(&mdata->xfer_done) ||
|
||||||
mdata->slave_aborted) {
|
mdata->target_aborted) {
|
||||||
dev_err(mdata->dev, "interrupted\n");
|
dev_err(mdata->dev, "interrupted\n");
|
||||||
return -EINTR;
|
return -EINTR;
|
||||||
}
|
}
|
||||||
|
@ -286,7 +286,7 @@ static int mtk_spi_slave_transfer_one(struct spi_controller *ctlr,
|
||||||
struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr);
|
struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr);
|
||||||
|
|
||||||
reinit_completion(&mdata->xfer_done);
|
reinit_completion(&mdata->xfer_done);
|
||||||
mdata->slave_aborted = false;
|
mdata->target_aborted = false;
|
||||||
mdata->cur_transfer = xfer;
|
mdata->cur_transfer = xfer;
|
||||||
|
|
||||||
if (xfer->len > mdata->dev_comp->max_fifo_size)
|
if (xfer->len > mdata->dev_comp->max_fifo_size)
|
||||||
|
@ -314,11 +314,11 @@ static int mtk_spi_slave_setup(struct spi_device *spi)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mtk_slave_abort(struct spi_controller *ctlr)
|
static int mtk_target_abort(struct spi_controller *ctlr)
|
||||||
{
|
{
|
||||||
struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr);
|
struct mtk_spi_slave *mdata = spi_controller_get_devdata(ctlr);
|
||||||
|
|
||||||
mdata->slave_aborted = true;
|
mdata->target_aborted = true;
|
||||||
complete(&mdata->xfer_done);
|
complete(&mdata->xfer_done);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -402,7 +402,7 @@ static int mtk_spi_slave_probe(struct platform_device *pdev)
|
||||||
ctlr->prepare_message = mtk_spi_slave_prepare_message;
|
ctlr->prepare_message = mtk_spi_slave_prepare_message;
|
||||||
ctlr->transfer_one = mtk_spi_slave_transfer_one;
|
ctlr->transfer_one = mtk_spi_slave_transfer_one;
|
||||||
ctlr->setup = mtk_spi_slave_setup;
|
ctlr->setup = mtk_spi_slave_setup;
|
||||||
ctlr->slave_abort = mtk_slave_abort;
|
ctlr->target_abort = mtk_target_abort;
|
||||||
|
|
||||||
of_id = of_match_node(mtk_spi_slave_of_match, pdev->dev.of_node);
|
of_id = of_match_node(mtk_spi_slave_of_match, pdev->dev.of_node);
|
||||||
if (!of_id) {
|
if (!of_id) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user