mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-03 14:34:27 -05:00 
			
		
		
		
	generic: ar8216: allow to use chip specific cleanup callback
It will be used for AR8327. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 39337
This commit is contained in:
		
							parent
							
								
									c7652f1f9e
								
							
						
					
					
						commit
						15d41de1eb
					
				@ -67,6 +67,8 @@ struct ar8xxx_chip {
 | 
				
			|||||||
	unsigned long caps;
 | 
						unsigned long caps;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	int (*hw_init)(struct ar8xxx_priv *priv);
 | 
						int (*hw_init)(struct ar8xxx_priv *priv);
 | 
				
			||||||
 | 
						void (*cleanup)(struct ar8xxx_priv *priv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	void (*init_globals)(struct ar8xxx_priv *priv);
 | 
						void (*init_globals)(struct ar8xxx_priv *priv);
 | 
				
			||||||
	void (*init_port)(struct ar8xxx_priv *priv, int port);
 | 
						void (*init_port)(struct ar8xxx_priv *priv, int port);
 | 
				
			||||||
	void (*setup_port)(struct ar8xxx_priv *priv, int port, u32 egress,
 | 
						void (*setup_port)(struct ar8xxx_priv *priv, int port, u32 egress,
 | 
				
			||||||
@ -2234,6 +2236,9 @@ ar8xxx_create(void)
 | 
				
			|||||||
static void
 | 
					static void
 | 
				
			||||||
ar8xxx_free(struct ar8xxx_priv *priv)
 | 
					ar8xxx_free(struct ar8xxx_priv *priv)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						if (priv->chip && priv->chip->cleanup)
 | 
				
			||||||
 | 
							priv->chip->cleanup(priv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	kfree(priv->mib_stats);
 | 
						kfree(priv->mib_stats);
 | 
				
			||||||
	kfree(priv);
 | 
						kfree(priv);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user