RE: [RFC PATCH v3 3/8] CAIF Protocol Stack
From: Sjur Brændeland <hidden>
Date: 2009-12-16 16:18:28
stefano babic wrote:
sjur.brandeland@stericsson.com wrote:quoted
diff --git a/include/net/caif/caif_chr.hb/include/net/caif/caif_chr.h new file mode 100644 index 0000000..ebd89f8--- /dev/null +++ b/include/net/caif/caif_chr.hOnly a question of taste, but there is no chr device anymore, maybe another name for the file should be more appropriate.
Yes, I'll rename to caif_dev.h
quoted
+struct caif_service_config; +enum cf_chr_dev_type {
...
quoted
+extern int serial_use_stx; +extern int (*netdev_mgmt_func) (int action, union caif_action *param); +int caifdev_phy_reg(struct layer *phyif, struct cfcnfg_phy_mgmt *mgmt); +int caifdev_phy_instanciate(struct cfcnfg_phy_config *phy_config); +int caifdev_phy_register(struct layer *phyif, + enum cfcnfg_phy_type phy_type, + enum cfcnfg_phy_preference phy_pref); +int caifdev_phy_unregister(struct layer *phyif); +int caifdev_phy_loop_register(struct layer *phyif, + enum cfcnfg_phy_type phy_type); +int caifdev_phy_spi_xmitlen(struct cfspil *layr); +struct cfpkt *caifdev_phy_spi_getxmitpkt(struct cfspil *layr);All these functions seem obsolete.quoted
+int caif_register_chrdev(int (*chrdev_mgmt) + (int action, union caif_action *param)); +void caif_unregister_chrdev(void);Obsolete, too.
Yes, I agree. This header file needs some serious cleanup. I'll rename it to caif_dev.h add config_util and strip it down to something like this: [snip] struct caif_service_config; int caifdev_adapt_register(struct caif_channel_config *config, struct layer *adap_layer); int caifdev_adapt_unregister(struct layer *adap_layer); struct cfcnfg *get_caif_conf(void); void caif_register_ioctl(int (*ioctl)(unsigned int cmd, unsigned long arg, bool)); int caif_ioctl(unsigned int cmd, unsigned long arg, bool from_use_land); void caif_unregister_netdev(void); int channel_config_2_link_param(struct cfcnfg *cnfg, struct caif_channel_config *s, struct cfctrl_link_param *l);
quoted
diff --git a/include/net/caif/caif_config_util.h
...
Do we need an extra-header only to set the prototype of a single function ? Probably can we move it into another header file.
You're right, I'll move this into caif_dev.h (see above). BR/Sjur