mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
spi: tegra124-slave: Fix callback prototype
The Tegra124 SPI slave driver declares a prototype for the function
tegra_spi_slave_register_callback() that does not exist. The correct
function name is tegra124_spi_slave_register_callback() and so fix the
prototype accordingly. Move the prototype to an actual header because
this is the correct place for defining prototypes for other drivers to
reference. This was caught by enabling the compiler flag
-Wmissing-prototype.
Bug 4404965
Change-Id: I765723d0a5ed6369784e5f6c480a6f03500659f3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027487
(cherry picked from commit 19a85c968c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031243
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
0940779cd6
commit
c196de1377
@@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
// Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
|
// SPDX-FileCopyrightText: Copyright (C) 2023 NVIDIA CORPORATION. All rights reserved.
|
||||||
|
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/reset.h>
|
#include <linux/reset.h>
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/of_device.h>
|
#include <linux/of_device.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
|
#include <linux/spi/spi-tegra124-slave.h>
|
||||||
#include <linux/clk/tegra.h>
|
#include <linux/clk/tegra.h>
|
||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
|
|
||||||
@@ -277,12 +278,6 @@ struct tegra_spi_controller_data {
|
|||||||
int cs_gpio;
|
int cs_gpio;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef int (*spi_callback)(void *client_data);
|
|
||||||
int tegra_spi_slave_register_callback(struct spi_device *spi,
|
|
||||||
spi_callback func_ready,
|
|
||||||
spi_callback func_isr,
|
|
||||||
void *client_data);
|
|
||||||
|
|
||||||
struct tegra_spi_data {
|
struct tegra_spi_data {
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
struct spi_controller *controller;
|
struct spi_controller *controller;
|
||||||
|
|||||||
17
include/linux/spi/spi-tegra124-slave.h
Normal file
17
include/linux/spi/spi-tegra124-slave.h
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: Copyright (C) 2023 NVIDIA CORPORATION. All rights reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __LINUX_SPI_TEGRA124_SLAVE_H
|
||||||
|
#define __LINUX_SPI_TEGRA124_SLAVE_H
|
||||||
|
|
||||||
|
#include <linux/spi/spi.h>
|
||||||
|
|
||||||
|
typedef int (*spi_callback)(void *client_data);
|
||||||
|
|
||||||
|
int tegra124_spi_slave_register_callback(struct spi_device *spi,
|
||||||
|
spi_callback func_ready,
|
||||||
|
spi_callback func_isr,
|
||||||
|
void *client_data);
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user