mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
net: dsa: move headers exported by switch.c to switch.h
Reduce code bloat in dsa_priv.h by moving the prototypes exported by switch.h into their own header file. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
bd954b8260
commit
0c603136e1
@ -22,6 +22,7 @@
|
||||
#include "master.h"
|
||||
#include "port.h"
|
||||
#include "slave.h"
|
||||
#include "switch.h"
|
||||
#include "tag.h"
|
||||
|
||||
static DEFINE_MUTEX(dsa2_mutex);
|
||||
|
@ -155,10 +155,6 @@ bool dsa_schedule_work(struct work_struct *work);
|
||||
/* netlink.c */
|
||||
extern struct rtnl_link_ops dsa_link_ops __read_mostly;
|
||||
|
||||
/* switch.c */
|
||||
int dsa_switch_register_notifier(struct dsa_switch *ds);
|
||||
void dsa_switch_unregister_notifier(struct dsa_switch *ds);
|
||||
|
||||
static inline bool dsa_switch_supports_uc_filtering(struct dsa_switch *ds)
|
||||
{
|
||||
return ds->ops->port_fdb_add && ds->ops->port_fdb_del &&
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "dsa_priv.h"
|
||||
#include "port.h"
|
||||
#include "slave.h"
|
||||
#include "switch.h"
|
||||
|
||||
/**
|
||||
* dsa_port_notify - Notify the switching fabric of changes to a port
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "dsa_priv.h"
|
||||
#include "port.h"
|
||||
#include "slave.h"
|
||||
#include "switch.h"
|
||||
|
||||
static unsigned int dsa_switch_fastest_ageing_time(struct dsa_switch *ds,
|
||||
unsigned int ageing_time)
|
||||
|
11
net/dsa/switch.h
Normal file
11
net/dsa/switch.h
Normal file
@ -0,0 +1,11 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#ifndef __DSA_SWITCH_H
|
||||
#define __DSA_SWITCH_H
|
||||
|
||||
struct dsa_switch;
|
||||
|
||||
int dsa_switch_register_notifier(struct dsa_switch *ds);
|
||||
void dsa_switch_unregister_notifier(struct dsa_switch *ds);
|
||||
|
||||
#endif
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include "dsa_priv.h"
|
||||
#include "port.h"
|
||||
#include "switch.h"
|
||||
#include "tag.h"
|
||||
|
||||
/* Binary structure of the fake 12-bit VID field (when the TPID is
|
||||
|
Loading…
Reference in New Issue
Block a user