Search Linux Wireless

RE: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Felipe Balbi [mailto:felipe.balbi@xxxxxxxxx]
> Sent: Thursday, August 12, 2010 12:27 AM
> To: DebBarma, Tarun Kanti
> Cc: Balbi Felipe (Nokia-MS/Helsinki); Ohad Ben-Cohen; linux-
> wireless@xxxxxxxxxxxxxxx; linux-mmc@xxxxxxxxxxxxxxx; linux-
> omap@xxxxxxxxxxxxxxx; Ido Yariv; Mark Brown; linux-arm-
> kernel@xxxxxxxxxxxxxxxxxxx; Chikkature Rajashekar, Madhusudhan; Coelho
> Luciano (Nokia-MS/Helsinki); akpm@xxxxxxxxxxxxxxxxxxxx; San Mehat; Quadros
> Roger (Nokia-MS/Helsinki); Tony Lindgren; Nicolas Pitre; Pandita, Vikram;
> Kalle Valo
> Subject: Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get
> board data
> 
> Hi,
> 
> On Wed, Aug 11, 2010 at 08:52:54PM +0200, ext DebBarma, Tarun Kanti wrote:
> >True; however if we go by that argument than we can also assume pdata
> >is valid, so that we would not need the below check.
> 
> of course not. You can have devices that just play well with default
> values or devices where you don't need the flexibility of platform data.
> That's why we check.
> 
> platform_device pointers on the other hand, are guaranteed to be always
> true, if it isn't then you should oops, you deserve to oops because
> something is really really wrong.
>
Sounds perfect!
What that means is _probe() function makes sense only for cases where we have valid platform data because we are returning right at the top if pdata is not valid. If this is the case I was curious to know why not framework make another check for valid pdata before calling _probe() instead of coming all the way to _probe() and then returning! 
 
> >Still, I would go ahead and find out if there is any scenario where
> >pdev can go wrong during device registration. Thanks.
> 
> if that scenario ever happens, it's either a bug on your implementation
> or driver-core. In both cases you deserve to oops so we catch such
> problems at early stages.
> 
> --
> balbi
> 
> DefectiveByDesign.org
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux