Re: [PATCH 2/2] USB: io_ti: Fix Edgeport firmware download code

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

 



On Tue, 2015-05-05 at 12:43 -0500, Peter E. Berger wrote:
> +int wrap_request_firmware(const struct firmware **fw, struct device
> *dev,
> +               unsigned char *MajorVersion,
> +               unsigned char *MinorVersion,
> +               unsigned short *BuildNumber)
> +{
> +       const char *fw_name = "edgeport/down3.bin";
> +       int err;
> +
> +       err = request_firmware(fw, fw_name, dev);
> +       if (err) {
> +               dev_dbg(dev, "Failed to load image \"%s\" err %d\n",
> +                      fw_name, err);
> +       } else {
> +               /* Save Download Version Number */
> +               *MajorVersion = (*fw)->data[0];
> +               *MinorVersion = (*fw)->data[1];
> +               *BuildNumber = (*fw)->data[2] | ((*fw)->data[3] << 8);

We have macros for conversion of endianness.

	Regards
		Oliver


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux