summaryrefslogtreecommitdiffstats
path: root/hw/s390x/css.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/s390x/css.c')
-rw-r--r--hw/s390x/css.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index 38fd46b9a9..fe47751df4 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -2344,7 +2344,7 @@ static void get_css_devid(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
{
Property *prop = opaque;
- CssDevId *dev_id = qdev_get_prop_ptr(obj, prop);
+ CssDevId *dev_id = object_field_prop_ptr(obj, prop);
char buffer[] = "xx.x.xxxx";
char *p = buffer;
int r;
@@ -2372,25 +2372,19 @@ static void get_css_devid(Object *obj, Visitor *v, const char *name,
static void set_css_devid(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
{
- DeviceState *dev = DEVICE(obj);
Property *prop = opaque;
- CssDevId *dev_id = qdev_get_prop_ptr(obj, prop);
+ CssDevId *dev_id = object_field_prop_ptr(obj, prop);
char *str;
int num, n1, n2;
unsigned int cssid, ssid, devid;
- if (dev->realized) {
- qdev_prop_set_after_realize(dev, name, errp);
- return;
- }
-
if (!visit_type_str(v, name, &str, errp)) {
return;
}
num = sscanf(str, "%2x.%1x%n.%4x%n", &cssid, &ssid, &n1, &devid, &n2);
if (num != 3 || (n2 - n1) != 5 || strlen(str) != n2) {
- error_set_from_qdev_prop_error(errp, EINVAL, obj, prop, str);
+ error_set_from_qdev_prop_error(errp, EINVAL, obj, name, str);
goto out;
}
if ((cssid > MAX_CSSID) || (ssid > MAX_SSID)) {