Re: [PATCH 02/10] battery: Implement Generic device battery

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

 



Johan,

On 09/12/2012 11:45 AM, Johan Hedberg wrote:
Hi Chen,

On Wed, Sep 12, 2012, Chen Ganir wrote:
Since this symbol is being exported, shouldn't it be prefixed with
btd_ as well?

I will rename it to struct btd_battery. Is that ok ?

Yes.

Thanks.


+typedef void (*RefreshBattFunc) (struct device_battery *batt);

I don't think we use CamelCase for anything other than D-Bus method names.

We use it in gattrib.h for function pointers. What is the correct
convention for function pointers ? same as in adapter_ops ?

+
+typedef enum {
+       BATTERY_OPT_INVALID = 0,
+       BATTERY_OPT_LEVEL,
+       BATTERY_OPT_REFRESH_FUNC,
+} BatteryOption;

Fix CamelCase usage here and on uses of this type as well.

btio.h also uses this convention. What should be the correct convention ?

Both BtIO and GAttrib intend to mimic GLib-like libraries where this is
the convention. The plan is not to let this spread to the entire code
base (particularly with the likely move to libell in the long run), so
please don't use CamelCase.

Ok. So for the battery options i'll simply change it to battery_option. What about the convention for defining a function pointer ?


Johan



--
BR,
Chen Ganir
Texas Instruments
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux