Commit 5b6acb55 authored by Sean Anderson's avatar Sean Anderson Committed by David S. Miller

net: fman: Specify type of mac_dev for exception_cb

Instead of using a void pointer for mac_dev, specify its type
explicitly.
Signed-off-by: default avatarSean Anderson <sean.anderson@seco.com>
Acked-by: default avatarCamelia Groza <camelia.groza@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 19c788b1
......@@ -301,7 +301,7 @@ struct fman_mac {
/* Ethernet physical interface */
phy_interface_t phy_if;
u16 max_speed;
void *dev_id; /* device cookie used by the exception cbs */
struct mac_device *dev_id; /* device cookie used by the exception cbs */
fman_mac_exception_cb *exception_cb;
fman_mac_exception_cb *event_cb;
/* Number of individual addresses in registers for this station */
......
......@@ -41,6 +41,7 @@
#include <linux/if_ether.h>
struct fman_mac;
struct mac_device;
/* Ethernet Address */
typedef u8 enet_addr_t[ETH_ALEN];
......@@ -158,7 +159,7 @@ struct eth_hash_entry {
struct list_head node;
};
typedef void (fman_mac_exception_cb)(void *dev_id,
typedef void (fman_mac_exception_cb)(struct mac_device *dev_id,
enum fman_mac_exceptions exceptions);
/* FMan MAC config input */
......
......@@ -311,7 +311,7 @@ struct fman_mac {
/* Ethernet physical interface */
phy_interface_t phy_if;
u16 max_speed;
void *dev_id; /* device cookie used by the exception cbs */
struct mac_device *dev_id; /* device cookie used by the exception cbs */
fman_mac_exception_cb *exception_cb;
fman_mac_exception_cb *event_cb;
/* Pointer to driver's global address hash table */
......
......@@ -180,7 +180,7 @@ struct fman_mac {
/* MAC address of device; */
u64 addr;
u16 max_speed;
void *dev_id; /* device cookie used by the exception cbs */
struct mac_device *dev_id; /* device cookie used by the exception cbs */
fman_mac_exception_cb *exception_cb;
fman_mac_exception_cb *event_cb;
/* pointer to driver's global address hash table */
......@@ -728,7 +728,8 @@ static int tgec_free(struct fman_mac *tgec)
return 0;
}
static struct fman_mac *tgec_config(struct mac_device *mac_dev, struct fman_mac_params *params)
static struct fman_mac *tgec_config(struct mac_device *mac_dev,
struct fman_mac_params *params)
{
struct fman_mac *tgec;
struct tgec_cfg *cfg;
......
......@@ -41,10 +41,9 @@ struct mac_address {
struct list_head list;
};
static void mac_exception(void *handle, enum fman_mac_exceptions ex)
static void mac_exception(struct mac_device *mac_dev,
enum fman_mac_exceptions ex)
{
struct mac_device *mac_dev = handle;
if (ex == FM_MAC_EX_10G_RX_FIFO_OVFL) {
/* don't flag RX FIFO after the first */
mac_dev->set_exception(mac_dev->fman_mac,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment