struct anybuss_client *adev =
to_anybuss_client(dev);
- return adrv->fieldbus_type == adev->fieldbus_type;
+ return adrv->fieldbus_type == be16_to_cpu(adev->fieldbus_type);
}
static int anybus_bus_probe(struct device *dev)
{
int ret, i;
u8 val[4];
- u16 fieldbus_type;
+ __be16 fieldbus_type;
struct anybuss_host *cd;
cd = devm_kzalloc(dev, sizeof(*cd), GFP_KERNEL);
add_device_randomness(&val, 4);
regmap_bulk_read(cd->regmap, REG_FIELDBUS_TYPE, &fieldbus_type,
sizeof(fieldbus_type));
- fieldbus_type = be16_to_cpu(fieldbus_type);
- dev_info(dev, "Fieldbus type: %04X", fieldbus_type);
+ dev_info(dev, "Fieldbus type: %04X", be16_to_cpu(fieldbus_type));
regmap_bulk_read(cd->regmap, REG_MODULE_SW_V, val, 2);
dev_info(dev, "Module SW version: %02X%02X",
val[0], val[1]);