RE: [PATCH 2/3] staging: brcm80211: making device object accessible from wlc and phy

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

 



Hi guys,

> Yes, why would a normal driver ever mess with a "raw" kobject or struct
> device?  They would use the standard functions to properly handle this
> type of reference counting depending on their subsystem type (hint, you
> should be doing this from the network device structure functions...)

The 'why' I want to mess with struct device in my driver is that the alternative is to include cfg80211.h in every brc80211 source file that does message logging, which is a form of coupling that I think is ugly. In this alternative, I would have to use wiphy_err() and friends. 

wiphy_err() is defined as:

#define wiphy_err(wiphy, format, args...)                       \
        dev_err(&(wiphy)->dev, format, ##args)

(ref: http://lxr.linux.no/#linux+v2.6.38/include/net/cfg80211.h#L2719).

An alternative would be if these message logging macro's (wiphy_err() etc) would be moved to a separate include file. 

Thanks, Roland.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux