Skip to content

Commit 202580b

Browse files
danish-tinmenon
authored andcommitted
soc: ti: pruss: Fix pruss APIs
PRUSS APIs in pruss_driver.h produce lots of compilation errors when CONFIG_TI_PRUSS is not set. The errors and warnings, warning: returning 'void *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion] error: expected identifier or '(' before '{' token Fix these warnings and errors by fixing the return type of pruss APIs as well as removing the misplaced semicolon from pruss_cfg_xfr_enable() Fixes: 0211cc1 ("soc: ti: pruss: Add helper functions to set GPI mode, MII_RT_event and XFR") Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Reviewed-by: Roger Quadros <rogerq@kernel.org> Link: https://lore.kernel.org/r/20241220100508.1554309-2-danishanwar@ti.com Signed-off-by: Nishanth Menon <nm@ti.com>
1 parent 40384c8 commit 202580b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

include/linux/pruss_driver.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,32 +144,32 @@ static inline int pruss_release_mem_region(struct pruss *pruss,
144144
static inline int pruss_cfg_get_gpmux(struct pruss *pruss,
145145
enum pruss_pru_id pru_id, u8 *mux)
146146
{
147-
return ERR_PTR(-EOPNOTSUPP);
147+
return -EOPNOTSUPP;
148148
}
149149

150150
static inline int pruss_cfg_set_gpmux(struct pruss *pruss,
151151
enum pruss_pru_id pru_id, u8 mux)
152152
{
153-
return ERR_PTR(-EOPNOTSUPP);
153+
return -EOPNOTSUPP;
154154
}
155155

156156
static inline int pruss_cfg_gpimode(struct pruss *pruss,
157157
enum pruss_pru_id pru_id,
158158
enum pruss_gpi_mode mode)
159159
{
160-
return ERR_PTR(-EOPNOTSUPP);
160+
return -EOPNOTSUPP;
161161
}
162162

163163
static inline int pruss_cfg_miirt_enable(struct pruss *pruss, bool enable)
164164
{
165-
return ERR_PTR(-EOPNOTSUPP);
165+
return -EOPNOTSUPP;
166166
}
167167

168168
static inline int pruss_cfg_xfr_enable(struct pruss *pruss,
169169
enum pru_type pru_type,
170-
bool enable);
170+
bool enable)
171171
{
172-
return ERR_PTR(-EOPNOTSUPP);
172+
return -EOPNOTSUPP;
173173
}
174174

175175
#endif /* CONFIG_TI_PRUSS */

0 commit comments

Comments
 (0)