Hi Hans, Commit subject should follow Linux kernel convention: <subsytem tag>: <short description for change>, in our case: iio: accel: Add support for MiraMEMS DA311 3-axis 12-bit digital accelerometer If not sure what tag to use, look into git log for previous commits in your driver working directory. On Wed, Sep 21, 2016 at 11:02 AM, Hans de Goede <hdegoede@xxxxxxxxxx> wrote: > This driver is based on the DA311 Android driver which can be found here: > https://git.matricom.net/Firmware/kernel_amlogic_meson-common/tree/1e70113a5befd07debb68f537156def84c5be57a/drivers/amlogic/input/sensor > the mir3da_* files are the DA311 driver. > > Unfortunately there is no datasheet. > <snip> > +static int da311_probe(struct i2c_client *client, > + const struct i2c_device_id *id) > +{ > + int ret; > + struct iio_dev *indio_dev; > + struct da311_data *data; > + > + ret = i2c_smbus_read_byte_data(client, DA311_REG_CHIP_ID); > + if (ret != DA311_CHIP_ID) > + return (ret < 0) ? ret : -ENODEV; > + > + indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data)); > + if (!indio_dev) { > + dev_err(&client->dev, "iio allocation failed!\n"); No need for this message. If allocation fail you'll get one from the core. <snip> Other than that looks good AFAICT. Please run checkpatch.pl and sparse (make C=2) if you haven't already done that :). thanks, Daniel. -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html