title: How to call `struct dev_archdata' function?
body: <p>I have found a lot of questions with this error (<code>initializer element is not constant</code>) but I don't know how to adapt the answers in my code.</p>
  
  <p>(I'm new in C)</p>
  
  <p>I have an error with this part:</p>
  
  <pre><code>#include &lt;mach/i2c.h&gt;
  #include &lt;mach/irqs-sun7i.h&gt;
  /*
   * /////////// from mach/i2c.h //////////
  struct sun7i_i2c_platform_data {
      int          bus_num;
      unsigned int frequency;
  };
  */
  
  static struct    sun7i_i2c_platform_data    sun7i_i2c_platform_data = {
      .bus_num = 1,
      .frequency = 100*1000,
  };
  
  static struct mpu_platform_data gyro_platform_data = {
      .int_config  = 0x10,
      .level_shifter = 0,
      .orientation = {  -1,  0,  0,
                 0,  1,  0,
                 0,  0, -1 },
      .sec_slave_type = SECONDARY_SLAVE_TYPE_COMPASS,
      .sec_slave_id   = COMPASS_ID_AK8972,
      .secondary_i2c_addr = 0x0E
  };
  
  /*
   *  /////////// from mach/i2c.h //////////
   * 
   * struct i2c_board_info {
      char        type[I2C_NAME_SIZE];
      unsigned short  flags;
      unsigned short  addr;
      void        *platform_data;
      struct dev_archdata *archdata;
      struct device_node *of_node;
      int     irq;
  };*/
  
  static struct i2c_board_info __initdata sun7i_i2c_platform_device[] = {
      {
          I2C_BOARD_INFO("mpu6050", 0x68),
          .platform_data = &amp;gyro_platform_data,
          .archdata = sun7i_i2c_platform_data,
      },
  };
  /*
  // ORIGINAL //
  static struct i2c_board_info __initdata single_chip_board_info[] = {
      {
          I2C_BOARD_INFO("mpu6050", 0x68),
          .irq = (IH_GPIO_BASE + MPUIRQ_GPIO),
          .platform_data = &amp;gyro_platform_data,
      },
  };
  */
  
  static void __init sun7i_i2c_init(void)
  {  
          i2c_register_board_info(2, sun7i_i2c_platform_device,
                         ARRAY_SIZE(sun7i_i2c_platform_device));
  }
  </code></pre>
  
  <p>My problem come from <code>.archdata</code> init:</p>
  
  <pre><code>c:160:17: error: initializer element is not constant
  </code></pre>
  
  <p>I have tried with</p>
  
  <pre><code>.archdata = &amp;sun7i_i2c_platform_data,
  </code></pre>
  
  <p>but in this case I have a warning and the line is ignored:</p>
  
  <pre><code>warning: initialization from incompatible pointer type [enabled by default]
  </code></pre>
  
  <p>So, how to call properly my fonction ?
  Thanks</p>