Hi Brian, > From: Brian Norris [mailto:briannorris@xxxxxxxxxxxx] > Sent: Saturday, November 12, 2016 2:20 AM > To: Amitkumar Karwar > Cc: linux-wireless@xxxxxxxxxxxxxxx; Cathy Luo; Nishant Sarmukadam; > rajatja@xxxxxxxxxx; dmitry.torokhov@xxxxxxxxx > Subject: Re: [PATCH v2 2/3] mwifiex: Introduce mwifiex_probe_of() to > parse common properties > > On Fri, Nov 11, 2016 at 04:45:10PM +0530, Amitkumar Karwar wrote: > > From: Rajat Jain <rajatja@xxxxxxxxxx> > > > > Introduce function mwifiex_probe_of() to parse common properties. > > Since the interface drivers get to decide whether or not the device > > tree node was a valid one (depending on the compatible property), let > > the interface drivers pass a flag to indicate whether the device tree > > node was a valid one. > > Wait, what? I don't understand why this is needed. The current of_node > user (SDIO) always checks dev->of_node (if !NULL), and if it's not > matching, it rejects the device and doesn't even try to register the > card at all. That's a common pattern for DT-based drivers, and I don't > see why we need to do differently for any other driver (e.g., PCIe). > > So...isn't 'dev->of_node != NULL' an equivalent test to > 'of_node_valid'? > Or put another way, mwifiex_add_card() should never see a 'struct > device' whose of_node is not compatible. Do you agree? I agree. 'of_node_valid' seems to be redundant here. I will remove it and post updated version. Regards, Amitkumar