@@ -31,7 +31,7 @@ MODULE_LICENSE("GPL v2");
3131
3232struct sja1000_of_data {
3333 size_t priv_sz ;
34- int (* init )(struct sja1000_priv * priv , struct device_node * of );
34+ void (* init )(struct sja1000_priv * priv , struct device_node * of );
3535};
3636
3737struct technologic_priv {
@@ -94,15 +94,13 @@ static void sp_technologic_write_reg16(const struct sja1000_priv *priv,
9494 spin_unlock_irqrestore (& tp -> io_lock , flags );
9595}
9696
97- static int sp_technologic_init (struct sja1000_priv * priv , struct device_node * of )
97+ static void sp_technologic_init (struct sja1000_priv * priv , struct device_node * of )
9898{
9999 struct technologic_priv * tp = priv -> priv ;
100100
101101 priv -> read_reg = sp_technologic_read_reg16 ;
102102 priv -> write_reg = sp_technologic_write_reg16 ;
103103 spin_lock_init (& tp -> io_lock );
104-
105- return 0 ;
106104}
107105
108106static void sp_populate (struct sja1000_priv * priv ,
@@ -266,11 +264,8 @@ static int sp_probe(struct platform_device *pdev)
266264 if (of ) {
267265 sp_populate_of (priv , of );
268266
269- if (of_data && of_data -> init ) {
270- err = of_data -> init (priv , of );
271- if (err )
272- goto exit_free ;
273- }
267+ if (of_data && of_data -> init )
268+ of_data -> init (priv , of );
274269 } else {
275270 sp_populate (priv , pdata , res_mem -> flags );
276271 }
0 commit comments