Skip to content

Commit bc8968e

Browse files
brooniekuba-moo
authored andcommitted
net: mscc: Fix non-GPL export of regmap APIs
The ocelot driver makes use of regmap, wrapping it with driver specific operations that are thin wrappers around the core regmap APIs. These are exported with EXPORT_SYMBOL, dropping the _GPL from the core regmap exports which is frowned upon. Add _GPL suffixes to at least the APIs that are doing register I/O. Signed-off-by: Mark Brown <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 88be326 commit bc8968e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/net/ethernet/mscc/ocelot_io.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ u32 __ocelot_read_ix(struct ocelot *ocelot, u32 reg, u32 offset)
2121
ocelot->map[target][reg & REG_MASK] + offset, &val);
2222
return val;
2323
}
24-
EXPORT_SYMBOL(__ocelot_read_ix);
24+
EXPORT_SYMBOL_GPL(__ocelot_read_ix);
2525

2626
void __ocelot_write_ix(struct ocelot *ocelot, u32 val, u32 reg, u32 offset)
2727
{
@@ -32,7 +32,7 @@ void __ocelot_write_ix(struct ocelot *ocelot, u32 val, u32 reg, u32 offset)
3232
regmap_write(ocelot->targets[target],
3333
ocelot->map[target][reg & REG_MASK] + offset, val);
3434
}
35-
EXPORT_SYMBOL(__ocelot_write_ix);
35+
EXPORT_SYMBOL_GPL(__ocelot_write_ix);
3636

3737
void __ocelot_rmw_ix(struct ocelot *ocelot, u32 val, u32 mask, u32 reg,
3838
u32 offset)
@@ -45,7 +45,7 @@ void __ocelot_rmw_ix(struct ocelot *ocelot, u32 val, u32 mask, u32 reg,
4545
ocelot->map[target][reg & REG_MASK] + offset,
4646
mask, val);
4747
}
48-
EXPORT_SYMBOL(__ocelot_rmw_ix);
48+
EXPORT_SYMBOL_GPL(__ocelot_rmw_ix);
4949

5050
u32 ocelot_port_readl(struct ocelot_port *port, u32 reg)
5151
{
@@ -58,7 +58,7 @@ u32 ocelot_port_readl(struct ocelot_port *port, u32 reg)
5858
regmap_read(port->target, ocelot->map[target][reg & REG_MASK], &val);
5959
return val;
6060
}
61-
EXPORT_SYMBOL(ocelot_port_readl);
61+
EXPORT_SYMBOL_GPL(ocelot_port_readl);
6262

6363
void ocelot_port_writel(struct ocelot_port *port, u32 val, u32 reg)
6464
{
@@ -69,15 +69,15 @@ void ocelot_port_writel(struct ocelot_port *port, u32 val, u32 reg)
6969

7070
regmap_write(port->target, ocelot->map[target][reg & REG_MASK], val);
7171
}
72-
EXPORT_SYMBOL(ocelot_port_writel);
72+
EXPORT_SYMBOL_GPL(ocelot_port_writel);
7373

7474
void ocelot_port_rmwl(struct ocelot_port *port, u32 val, u32 mask, u32 reg)
7575
{
7676
u32 cur = ocelot_port_readl(port, reg);
7777

7878
ocelot_port_writel(port, (cur & (~mask)) | val, reg);
7979
}
80-
EXPORT_SYMBOL(ocelot_port_rmwl);
80+
EXPORT_SYMBOL_GPL(ocelot_port_rmwl);
8181

8282
u32 __ocelot_target_read_ix(struct ocelot *ocelot, enum ocelot_target target,
8383
u32 reg, u32 offset)
@@ -128,7 +128,7 @@ int ocelot_regfields_init(struct ocelot *ocelot,
128128

129129
return 0;
130130
}
131-
EXPORT_SYMBOL(ocelot_regfields_init);
131+
EXPORT_SYMBOL_GPL(ocelot_regfields_init);
132132

133133
static struct regmap_config ocelot_regmap_config = {
134134
.reg_bits = 32,
@@ -148,4 +148,4 @@ struct regmap *ocelot_regmap_init(struct ocelot *ocelot, struct resource *res)
148148

149149
return devm_regmap_init_mmio(ocelot->dev, regs, &ocelot_regmap_config);
150150
}
151-
EXPORT_SYMBOL(ocelot_regmap_init);
151+
EXPORT_SYMBOL_GPL(ocelot_regmap_init);

0 commit comments

Comments
 (0)