RFC: of_device_id: use pointer for the data field

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

 



Hi!

Just now barebox' of_device_id struct uses unsigned long type for data field:

  struct of_device_id {
          char *compatible;
          unsigned long data;
  };

Here is of_device_id struct in linux kernel:

  struct of_device_id {
          char name[32];
          char type[32];
          char compatible[128];
          const void *data;
  };

Just all data fields are used as pointers and need 'unsigned long' casting.
E.g. see 'git grep -A 4 of_device_id drivers/' output:

  drivers/ata/sata-imx.c:static __maybe_unused struct of_device_id imx_sata_dt_ids[] = {
  drivers/ata/sata-imx.c- {
  drivers/ata/sata-imx.c-         .compatible = "fsl,imx6q-ahci",
  drivers/ata/sata-imx.c-         .data = (unsigned long)&data_imx6,
  drivers/ata/sata-imx.c- }, {

Could we use 'const void *' type for data field as linux kernel does?

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux