lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 18 Apr 2015 10:27:25 +0200
From:	Paul Bolle <pebolle@...cali.nl>
To:	S Twiss <stwiss.opensource@...semi.com>
Cc:	LINUXKERNEL <linux-kernel@...r.kernel.org>,
	Lee Jones <lee.jones@...aro.org>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Alessandro Zummo <a.zummo@...ertech.it>,
	DEVICETREE <devicetree@...r.kernel.org>,
	David Dajun Chen <david.chen@...semi.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	LINUXINPUT <linux-input@...r.kernel.org>,
	LINUXWATCHDOG <linux-watchdog@...r.kernel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Pawel Moll <pawel.moll@....com>,
	RTCLINUX <rtc-linux@...glegroups.com>,
	Rob Herring <robh+dt@...nel.org>,
	Support Opensource <support.opensource@...semi.com>,
	Wim Van Sebroeck <wim@...ana.be>
Subject: Re: [PATCH V1 1/6] mfd: da9062: DA9062 MFD core driver

On Fri, 2015-04-17 at 15:23 +0100, S Twiss wrote:
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig

> +config MFD_DA9062
> +	bool "Dialog Semiconductor DA9062 PMIC Support"
> +	select MFD_CORE
> +	select REGMAP_I2C
> +	select REGMAP_IRQ
> +	depends on I2C=y
> +	help
> +	  Say yes here for support for the Dialog Semiconductor DA9062 PMIC.
> +	  This includes the I2C driver and core APIs.
> +	  Additional drivers must be enabled in order to use the functionality
> +	  of the device.

> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile

> +obj-$(CONFIG_MFD_DA9062)	+= da9062-core.o

MFD_DA9062 is a bool symbol. So da9062-core.o can never be part of a
module, right?

> --- /dev/null
> +++ b/drivers/mfd/da9062-core.c

> +#include <linux/module.h>

So you might not need this include.

> +MODULE_DEVICE_TABLE(of, da9062_dt_ids);

This macro will be preprocessed away for built-in code, according to
include/linux/module.h.

> +MODULE_DEVICE_TABLE(i2c, da9062_i2c_id);

Ditto.

> +static struct i2c_driver da9062_i2c_driver = {
> +	.driver = {
> +		.name = "da9062",
> +		.of_match_table = of_match_ptr(da9062_dt_ids),
> +	},
> +	.probe    = da9062_i2c_probe,
> +	.remove   = da9062_i2c_remove,
> +	.id_table = da9062_i2c_id,
> +};
> +
> +module_i2c_driver(da9062_i2c_driver);

After looking at a few levels of #defines I think this is equivalent to
     i2c_register_driver(NULL, da9062_i2c_driver);

for built-in code. Did I grep that right?

> +MODULE_DESCRIPTION("CORE device driver for Dialog DA9062");
> +MODULE_AUTHOR("S Twiss <stwiss.opensource@...semi.com>");
> +MODULE_LICENSE("GPL v2");

These macros will be effectively preprocessed away for built-in only
code.

Thanks,


Paul Bolle

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ