Re: [char-misc-next 08/11 V5] mei: nfc: Initial nfc implementation

From: Greg KH
Date: Fri Mar 29 2013 - 11:49:51 EST


On Wed, Mar 27, 2013 at 05:30:00PM +0200, Tomas Winkler wrote:
> --- a/drivers/misc/mei/mei_dev.h
> +++ b/drivers/misc/mei/mei_dev.h
> @@ -498,6 +498,34 @@ struct mei_cl_cb *mei_amthif_find_read_list_entry(struct mei_device *dev,
>
> void mei_amthif_run_next_cmd(struct mei_device *dev);
>
> +#ifdef CONFIG_INTEL_MEI_BUS_NFC
> +/*
> + * NFC functions
> + */
> +int mei_nfc_host_init(struct mei_device *dev);
> +void mei_nfc_host_exit(void);
> +
> +/*
> + * NFC Client UUID
> + */
> +extern const uuid_le mei_nfc_guid;
> +
> +#else /* CONFIG_INTEL_MEI_BUS_NFC */
> +
> +static inline int mei_nfc_host_init(struct mei_device *dev)
> +{
> + return 0;
> +}
> +
> +static inline void mei_nfc_host_exit(void)
> +{
> + return;
> +}
> +
> +static const uuid_le mei_nfc_guid = UUID_LE(0x0bb17a78, 0x2a8e, 0x4c50,
> + 0x94, 0xd4, 0x50, 0x26,
> + 0x67, 0x23, 0x77, 0x5c);
> +#endif /* CONFIG_INTEL_MEI_BUS_NFC */


As you are using the bus model, why do you need "fake" init and exit
functions at all? Your core shouldn't care about if the nfc code is
build or not, that's why we have driver model in the first place...

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/