Re: [Outreachy kernel] [PATCH v2] staging: iio: ad9832: Moved contents of header file to source file

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

 



On Mon, Feb 27, 2017 at 5:29 PM, Narcisa Ana Maria Vasile
<narcisaanamaria12@xxxxxxxxx> wrote:
> The contents of the header file are used only by this single source
> file.
>
> Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@xxxxxxxxx>
> ---
> Changes in v2:
>     Removed the platform data struct from the ad9832.c file and added it
>     back to the ad9832.h header file, since this struct is supposed to be
>     used from somewhere else, other than the driver.
> ---
>  drivers/staging/iio/frequency/ad9832.c | 27 ++-----------------------
>  drivers/staging/iio/frequency/ad9832.h | 36 ++++++++++++++++++++++++++++++++++
>  2 files changed, 38 insertions(+), 25 deletions(-)
>  create mode 100644 drivers/staging/iio/frequency/ad9832.h
>
> diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c
> index 1b26843..8d40c8e 100644
> --- a/drivers/staging/iio/frequency/ad9832.c
> +++ b/drivers/staging/iio/frequency/ad9832.c
> @@ -20,6 +20,8 @@
>  #include <linux/iio/sysfs.h>
>  #include "dds.h"
>
> +#include "ad9832.h"
> +
>  /* Registers */
>
>  #define AD9832_FREQ0LL         0x0
> @@ -112,31 +114,6 @@ struct ad9832_state {
>         };
>  };
>
> -/*
> - * TODO: struct ad9832_platform_data needs to go into include/linux/iio
> - */
> -
> -/**
> - * struct ad9832_platform_data - platform specific information
> - * @mclk:              master clock in Hz
> - * @freq0:             power up freq0 tuning word in Hz
> - * @freq1:             power up freq1 tuning word in Hz
> - * @phase0:            power up phase0 value [0..4095] correlates with 0..2PI
> - * @phase1:            power up phase1 value [0..4095] correlates with 0..2PI
> - * @phase2:            power up phase2 value [0..4095] correlates with 0..2PI
> - * @phase3:            power up phase3 value [0..4095] correlates with 0..2PI
> - */
> -
> -struct ad9832_platform_data {
> -       unsigned long           mclk;
> -       unsigned long           freq0;
> -       unsigned long           freq1;
> -       unsigned short          phase0;
> -       unsigned short          phase1;
> -       unsigned short          phase2;
> -       unsigned short          phase3;
> -};
> -
>  static unsigned long ad9832_calc_freqreg(unsigned long mclk, unsigned long fout)
>  {
>         unsigned long long freqreg = (u64)fout *
> diff --git a/drivers/staging/iio/frequency/ad9832.h b/drivers/staging/iio/frequency/ad9832.h
> new file mode 100644
> index 0000000..39d326c
> --- /dev/null
> +++ b/drivers/staging/iio/frequency/ad9832.h
> @@ -0,0 +1,36 @@
> +/*
> + * AD9832 SPI DDS driver
> + *
> + * Copyright 2011 Analog Devices Inc.
> + *
> + * Licensed under the GPL-2 or later.
> + */
> +#ifndef IIO_DDS_AD9832_H_
> +#define IIO_DDS_AD9832_H_
> +
> +/*
> + * TODO: struct ad9832_platform_data needs to go into include/linux/iio
> + */
> +
> +/**
> + * struct ad9832_platform_data - platform specific information
> + * @mclk:              master clock in Hz
> + * @freq0:             power up freq0 tuning word in Hz
> + * @freq1:             power up freq1 tuning word in Hz
> + * @phase0:            power up phase0 value [0..4095] correlates with 0..2PI
> + * @phase1:            power up phase1 value [0..4095] correlates with 0..2PI
> + * @phase2:            power up phase2 value [0..4095] correlates with 0..2PI
> + * @phase3:            power up phase3 value [0..4095] correlates with 0..2PI
> + */
> +
> +struct ad9832_platform_data {
> +       unsigned long           mclk;
> +       unsigned long           freq0;
> +       unsigned long           freq1;
> +       unsigned short          phase0;
> +       unsigned short          phase1;
> +       unsigned short          phase2;
> +       unsigned short          phase3;
> +};
> +
> +#endif /* IIO_DDS_AD9832_H_ */

Hi,

It seems that you have sent a diff relative to v1. This isn't OK,
because v1 isn't already applied
to maintainers tree.

Please send a patch against the original code.

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux