diff mbox series

[RFC,1/2] net-next: ax88796: export ax_NS8390_init() hook

Message ID 1528523869-3403-2-git-send-email-schmitzmic@gmail.com
State RFC, archived
Delegated to: David Miller
Headers show
Series net-next: cleanup use of lib8390.c code in xsurf100.c | expand

Commit Message

Michael Schmitz June 9, 2018, 5:57 a.m. UTC
The block I/O code for the new X-Surf 100 ax88796 driver needs
ax_NS8390_init() for error fixup in its block_output function.

Export this function so we can lose the lib8380.c include in the
X-Surf 100 driver.

Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
---
 drivers/net/ethernet/8390/ax88796.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Geert Uytterhoeven June 9, 2018, 2:31 p.m. UTC | #1
Hi Michael,

On Sat, Jun 9, 2018 at 7:58 AM Michael Schmitz <schmitzmic@gmail.com> wrote:
> The block I/O code for the new X-Surf 100 ax88796 driver needs
> ax_NS8390_init() for error fixup in its block_output function.
>
> Export this function so we can lose the lib8380.c include in the
> X-Surf 100 driver.
>
> Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>

Thanks for your patch!

> --- a/drivers/net/ethernet/8390/ax88796.c
> +++ b/drivers/net/ethernet/8390/ax88796.c
> @@ -62,6 +62,8 @@
>
>  #include "lib8390.c"
>
> +EXPORT_SYMBOL_GPL(ax_NS8390_init);

While that works for the modular case, it doesn't work for the builtin case,
as the function is static.

You can fix that by adding a non-static wrapper, and exporting that one instead.

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c
index 2a0ddec..470142f 100644
--- a/drivers/net/ethernet/8390/ax88796.c
+++ b/drivers/net/ethernet/8390/ax88796.c
@@ -62,6 +62,8 @@ 
 
 #include "lib8390.c"
 
+EXPORT_SYMBOL_GPL(ax_NS8390_init);
+
 #define DRV_NAME "ax88796"
 #define DRV_VERSION "1.00"